Skip to Content
The Alchemy Project

struct ITEM_MENU_STATE

The item menu's state, in the HEAP_SLOT_MENU heap slot: its windows, the party figures, the items listed and the two choices a command makes.

Declared in menu_internal.h.

Fields

NameDescription
Uint8unused [8]No view of the menu state names it (see menu/README.md).
Sint32selectedMemberThe party member chosen.
struct WINDOW *moneyWindowSHOP_STATE's; not named here.
struct WINDOW *mainWindow
WINDOW_SPR *sideIcons [2]The two sides: the party member whose items are shown, and the one an item is given to.
Sint8sideIndex [2]The party member chosen, in memberIds; -1 for none at first.
Sint8sideCount [2]Party members to choose from; 1 at first.
struct WINDOW *itemWindow
struct WINDOW *statusWindow
struct WINDOW *buttonHelpWindow
struct WINDOW *descriptionWindow
struct WINDOW *equipWindow
struct WINDOW *listWindow
struct WINDOW *unopenedWindowNever given a window; only closed.
struct WINDOW *modalWindow
struct WINDOW *secondUnopenedWindowNever given a window; only closed.
WINDOW_SPR *gridCursorOnly prepared by name.
WINDOW_SPR *entryIcons [MENU_ENTRY_ICONS]
WINDOW_SPR *statusIcons [8]
Uint8unusedAfterIcons [36]No view of the menu state names it.
struct WINDOW *questionWindow
Uint8selectedColumnThe cursor grid: its place and its size, 1 by 1 at first.
Uint8selectedRow
Uint8columnCount
Uint8rowCount
struct SPR *memberSprites [8]The party members' figures.
Sint16memberX [8]Screen pixels.
Sint16memberY [8]Screen pixels.
FIXEDmemberScale [8]16.16 fixed point, toFIXED(1) full size.
Uint16selectedSlots [2]Each side's inventory slot chosen.
Uint16selectedItems [2]Each side's inventory entry chosen.
WINDOW_SPR *cursor
Uint8aroundBackdrop [72]DJINN_MENU_STATE's backdrop pointer at 388; no view names the rest.
Uint16items [32]The inventory entries listed.
Uint16memberIds [8]The party in order (gmPartyListMembers).
Uint8itemCount
Uint8partyCount
Uint8sideMember [2]Each side's party member.
WINDOW_SPR *selectedItemIcon
Uint16flags1 while the item's name and command grid are drawn.
Sint16completionFlagSet to 1 as item commands end; not read by name.
struct SPR *figures [4]The row of four figures the Djinn and status screens show (menu_djinn_figures.c): each one's sprite and place in screen pixels, and its scale in 16.16, which closes a third of its gap to toFIXED(1) each tick, or holds -scale while negative.
Sint16figureX [4]
Sint16figureY [4]
Sint32figureScales [4]
Uint8unusedAfterFigures [6]DJINN_MENU_STATE's pair; not named here.
Sint16msgOffsetThe item use's result, after MsgItemUseResult.
Sint8equipPreview1 while the stats preview a removal, not an equip.
Uint8listModeThe command chosen last (ITEM_MENU_COMMAND); -1 for none.
Uint8unusedAfterListMode [2]No view of the menu state names it.
Sint8selectedIndexByMember [8]Each party member's entry chosen last.
Uint8modeNot named through this struct; PSYNERGY_MENU_STATE.mode.
Uint8shopStock [297]SHOP_STATE's stock, party and cursor; not named here.
Uint16resourceSlots [2]VRAM cache slots of two arrow pictures.

Description

The item menu's state, in the HEAP_SLOT_MENU heap slot: its windows, the party figures, the items listed and the two choices a command makes.

struct ITEM_MENU_STATE

Referenced by mnAbilityApplyToTargets(), mnDjinnFiguresInitBottomRow(), mnDjinnFiguresInitTopRow(), mnDjinnFiguresReplaceSlot(), mnDjinnFiguresSetSlotPhase(), mnDjinnFiguresSetSlotPos(), mnDjinnFiguresUpdateAllPositions(), mnDjinnFiguresUpdateBottomRow(), mnEquipmentMenuStopCompatibilityIndicators(), mnEquipmentMenuUpdateCompatibilityIndicators(), mnHideEmptyEntryIcons(), mnHideEntryIcons(), mnIconCreateDjinnArrow(), mnIconCreateStatChangeArrow(), mnIconMenuReleaseArrows(), mnInitState(), mnItemMenuBuildCommands(), mnItemMenuBuildPagedList(), mnItemMenuChooseCommand(), mnItemMenuClose(), mnItemMenuConfirmEquip(), mnItemMenuDrawEquipment(), mnItemMenuDrawEquipPreview(), mnItemMenuDrawIcons(), mnItemMenuDrawItemHead(), mnItemMenuDrawListPage(), mnItemMenuDrawMessage(), mnItemMenuFitMessageWindowToItemChoices(), mnItemMenuFitMessageWindowToItemQuestion(), mnItemMenuFitMessageWindowToLongItemQuestion(), mnItemMenuFitMessageWindowToQuestion(), mnItemMenuHideAllIcons(), mnItemMenuHidePageIcons(), mnItemMenuInit(), mnItemMenuOpenDetail(), mnItemMenuPlaceEquippedIcons(), mnItemMenuPlaceIcons(), mnItemMenuPlaceItemWindowBelowItemQuestion(), mnItemMenuPlaceItemWindowBelowQuestion(), mnItemMenuRefreshMember(), mnItemMenuRun(), mnItemMenuRunCommands(), mnItemMenuRunList(), mnItemMenuRunMemberSelection(), mnItemMenuSelectGiveQuantity(), mnItemMenuSelectMember(), mnItemMenuSelectTarget(), mnItemMenuShowDetails(), mnItemMenuShowEquipment(), mnItemMenuShowMessage() and 23 more.

Definition at line 54 of file menu_internal.h.

Fields in detail

unused

Uint8 unused[8]

No view of the menu state names it (see menu/README.md).

selectedMember

Sint32 selectedMember

The party member chosen.

moneyWindow

struct WINDOW *moneyWindow

SHOP_STATE's; not named here.

mainWindow

struct WINDOW *mainWindow

sideIcons

WINDOW_SPR *sideIcons[2]

The two sides: the party member whose items are shown, and the one an item is given to.

sideIndex

Sint8 sideIndex[2]

The party member chosen, in memberIds; -1 for none at first.

sideCount

Sint8 sideCount[2]

Party members to choose from; 1 at first.

itemWindow

struct WINDOW *itemWindow

statusWindow

struct WINDOW *statusWindow

buttonHelpWindow

struct WINDOW *buttonHelpWindow

descriptionWindow

struct WINDOW *descriptionWindow

equipWindow

struct WINDOW *equipWindow

listWindow

struct WINDOW *listWindow

unopenedWindow

struct WINDOW *unopenedWindow

Never given a window; only closed.

struct WINDOW *modalWindow

secondUnopenedWindow

struct WINDOW *secondUnopenedWindow

Never given a window; only closed.

gridCursor

WINDOW_SPR *gridCursor

Only prepared by name.

entryIcons

WINDOW_SPR *entryIcons[MENU_ENTRY_ICONS]

statusIcons

WINDOW_SPR *statusIcons[8]

unusedAfterIcons

Uint8 unusedAfterIcons[36]

No view of the menu state names it.

questionWindow

struct WINDOW *questionWindow

selectedColumn

Uint8 selectedColumn

The cursor grid: its place and its size, 1 by 1 at first.

selectedRow

Uint8 selectedRow

columnCount

Uint8 columnCount

rowCount

Uint8 rowCount

memberSprites

struct SPR *memberSprites[8]

The party members' figures.

memberX

Sint16 memberX[8]

Screen pixels.

memberY

Sint16 memberY[8]

Screen pixels.

memberScale

FIXED memberScale[8]

16.16 fixed point, toFIXED(1) full size.

selectedSlots

Uint16 selectedSlots[2]

Each side's inventory slot chosen.

selectedItems

Uint16 selectedItems[2]

Each side's inventory entry chosen.

cursor

WINDOW_SPR *cursor

aroundBackdrop

Uint8 aroundBackdrop[72]

DJINN_MENU_STATE's backdrop pointer at 388; no view names the rest.

items

Uint16 items[32]

The inventory entries listed.

memberIds

Uint16 memberIds[8]

The party in order (gmPartyListMembers).

itemCount

Uint8 itemCount

partyCount

Uint8 partyCount

sideMember

Uint8 sideMember[2]

Each side's party member.

selectedItemIcon

WINDOW_SPR *selectedItemIcon

flags

Uint16 flags

1 while the item's name and command grid are drawn.

completionFlag

Sint16 completionFlag

Set to 1 as item commands end; not read by name.

figures

struct SPR *figures[4]

The row of four figures the Djinn and status screens show (menu_djinn_figures.c): each one's sprite and place in screen pixels, and its scale in 16.16, which closes a third of its gap to toFIXED(1) each tick, or holds -scale while negative.

figureX

Sint16 figureX[4]

figureY

Sint16 figureY[4]

figureScales

Sint32 figureScales[4]

unusedAfterFigures

Uint8 unusedAfterFigures[6]

DJINN_MENU_STATE's pair; not named here.

msgOffset

Sint16 msgOffset

The item use's result, after MsgItemUseResult.

equipPreview

Sint8 equipPreview

1 while the stats preview a removal, not an equip.

listMode

Uint8 listMode

The command chosen last (ITEM_MENU_COMMAND); -1 for none.

unusedAfterListMode

Uint8 unusedAfterListMode[2]

No view of the menu state names it.

selectedIndexByMember

Sint8 selectedIndexByMember[8]

Each party member's entry chosen last.

mode

Uint8 mode

Not named through this struct; PSYNERGY_MENU_STATE.mode.

shopStock

Uint8 shopStock[297]

SHOP_STATE's stock, party and cursor; not named here.

resourceSlots

Uint16 resourceSlots[2]

VRAM cache slots of two arrow pictures.