Skip to Content
The Alchemy Project

struct SHOP_STATE

The shop's state (heap slot 220, the menus' state), as The Broken Seal's SHOP_STATE, its lists longer here: the windows, the party row, the stock, the hand cursor and its icons, what the player chose, the sanctum service's particles and the item icon grid.

Declared in shop_internal.h.

Fields

NameDescription
Uint8unused [8]No view of the menu state names it.
Sint32selectedMemberThe menu screens' chosen party member; not named here.
void *moneyWindowThe coins window.
Uint8menuSides [20]The menu screens' first window and
void *itemWindowtheir two sides; not named here.
Uint8menuWindows [208]The menu screens' windows, icons and cursor grid; not named here.
void *partyMemberIcons [8]The party row's sprites.
Sint16partyMemberX [8]Pixels.
Sint16partyMemberY [8]
FIXEDpartyMemberScale [8]16.16 fixed point, toFIXED(1) full size.
Uint8menuLists [280]The menu screens' choices, entries and party and the row of figures; not named here.
Sint16stockItemIds [301]The items on sale, ended by 0.
Sint16partyMemberIds [9]The party in order.
MENU_CURSORcursorThe hand cursor.
Uint16cursorIconThe hand.
Uint16prevPageIcon
Uint16nextPageIcon
Uint16gemIcon
Uint16statUpIcon
Uint16statDownIcon
Uint8unusedBeforeKeeper [2]No view of the menu state names it.
Uint16keeperGraphicsThe shopkeeper's animation; picks the portrait.
Uint16selectedItemThe item being bought, sold or repaired.
Uint8unusedAfterSelection [4]No view of the menu state names it.
Sint16stockCount
Sint8partyMemberCount
Uint8cursorFrameThe ticks the hand cursor takes to its next place.
Sint8shopTypeThe stock row's type (SHOP_TYPE).
Sint8actionThe counter or service chosen (SHOP_ACTION or SANCTUM_SERVICE).
Sint8burstMemberThe sanctum's party member whose pose is randomized; -1 for none.
Uint8memberSpritesShownITEM_MENU_STATE's: nonzero while mnUpdatePartyFigures places the party figures; cleared while a details window covers them.
Uint8figuresShownITEM_MENU_STATE's; not named here.
Sint8itemModeThe item picker's check: 0 for an item to drop, 1 for one to remove.
FIELD_PARTICLEeffects [SANCTUM_PARTICLE_COUNT]The sanctum service's particles.
Uint8menuIcons [72]ITEM_MENU_STATE's five menu icons; not named here.
ICON_SPRiconSprites [INVENTORY_SLOTS]The item icon grid
Uint16iconSlots [INVENTORY_SLOTS](mnItemIconGridShowInventory): a sprite and a VRAM cache slot (ICON_NONE when empty) for each inventory slot.
Sint8iconsVisibleNonzero while mnItemIconGridDraw queues the icons.
void *listWindowThe party row's window at the sell and forge counters.

Description

The shop's state (heap slot 220, the menus' state), as The Broken Seal's SHOP_STATE, its lists longer here: the windows, the party row, the stock, the hand cursor and its icons, what the player chose, the sanctum service's particles and the item icon grid.

struct SHOP_STATE

Referenced by mnCursorPlace(), mnCursorStep(), mnForgeOfferItem(), mnForgeRun(), mnInnCheckIn(), mnInnQuoteRoomPrice(), mnInnRoomPrice(), mnItemIconGridDraw(), mnItemIconGridInit(), mnItemIconGridLoadItems(), mnItemIconGridRelease(), mnItemIconGridSetPos(), mnItemIconGridSetVisible(), mnItemPickerDrawItem(), mnItemPickerRun(), mnItemPickerSelectItem(), mnSanctumAskYesNo(), mnSanctumCountMembersInNeed(), mnSanctumDrawFee(), mnSanctumGetServiceMessage(), mnSanctumHighlightMembers(), mnSanctumRun(), mnSanctumRunMemberIconBurst(), mnSanctumRunPartyService(), mnSanctumShowKeeperMessage(), mnSanctumShowKeeperMessageHidingCursor(), mnSanctumUpdateBurst(), mnShopAskYesNo(), mnShopChooseMember(), mnShopConfirmEquip(), mnShopDrawEquipComparison(), mnShopDrawMoney(), mnShopDrawParty(), mnShopDrawStock(), mnShopGiveGameTicket(), mnShopInitState(), mnShopListAvailableArtifacts(), mnShopReleaseState(), mnShopRepairItem(), mnShopRun(), mnShopSelectBuy(), mnShopSelectBuyCount(), mnShopSelectSell(), mnShopSelectSellCount(), mnShopSellItem(), mnShopShowKeeperMessage() and mnShopShowKeeperMessageHidingCursor().

Definition at line 179 of file shop_internal.h.

Fields in detail

unused

Uint8 unused[8]

No view of the menu state names it.

selectedMember

Sint32 selectedMember

The menu screens' chosen party member; not named here.

moneyWindow

void *moneyWindow

The coins window.

Uint8 menuSides[20]

The menu screens' first window and

itemWindow

void *itemWindow

their two sides; not named here.

Uint8 menuWindows[208]

The menu screens' windows, icons and cursor grid; not named here.

partyMemberIcons

void *partyMemberIcons[8]

The party row's sprites.

partyMemberX

Sint16 partyMemberX[8]

Pixels.

partyMemberY

Sint16 partyMemberY[8]

partyMemberScale

FIXED partyMemberScale[8]

16.16 fixed point, toFIXED(1) full size.

Uint8 menuLists[280]

The menu screens' choices, entries and party and the row of figures; not named here.

stockItemIds

Sint16 stockItemIds[301]

The items on sale, ended by 0.

partyMemberIds

Sint16 partyMemberIds[9]

The party in order.

cursor

MENU_CURSOR cursor

The hand cursor.

cursorIcon

Uint16 cursorIcon

The hand.

prevPageIcon

Uint16 prevPageIcon

nextPageIcon

Uint16 nextPageIcon

gemIcon

Uint16 gemIcon

statUpIcon

Uint16 statUpIcon

statDownIcon

Uint16 statDownIcon

unusedBeforeKeeper

Uint8 unusedBeforeKeeper[2]

No view of the menu state names it.

keeperGraphics

Uint16 keeperGraphics

The shopkeeper's animation; picks the portrait.

selectedItem

Uint16 selectedItem

The item being bought, sold or repaired.

unusedAfterSelection

Uint8 unusedAfterSelection[4]

No view of the menu state names it.

stockCount

Sint16 stockCount

partyMemberCount

Sint8 partyMemberCount

cursorFrame

Uint8 cursorFrame

The ticks the hand cursor takes to its next place.

shopType

Sint8 shopType

The stock row's type (SHOP_TYPE).

action

Sint8 action

The counter or service chosen (SHOP_ACTION or SANCTUM_SERVICE).

burstMember

Sint8 burstMember

The sanctum's party member whose pose is randomized; -1 for none.

memberSpritesShown

Uint8 memberSpritesShown

ITEM_MENU_STATE's: nonzero while mnUpdatePartyFigures places the party figures; cleared while a details window covers them.

figuresShown

Uint8 figuresShown

ITEM_MENU_STATE's; not named here.

itemMode

Sint8 itemMode

The item picker's check: 0 for an item to drop, 1 for one to remove.

effects

FIELD_PARTICLE effects[SANCTUM_PARTICLE_COUNT]

The sanctum service's particles.

Uint8 menuIcons[72]

ITEM_MENU_STATE's five menu icons; not named here.

iconSprites

ICON_SPR iconSprites[INVENTORY_SLOTS]

The item icon grid

iconSlots

Uint16 iconSlots[INVENTORY_SLOTS]

(mnItemIconGridShowInventory): a sprite and a VRAM cache slot (ICON_NONE when empty) for each inventory slot.

iconsVisible

Sint8 iconsVisible

Nonzero while mnItemIconGridDraw queues the icons.

listWindow

void *listWindow

The party row's window at the sell and forge counters.