shop.h
games/tbs/include/shop.h on GitHub
Structures
ShopRuntime
struct ShopRuntime
A shop's work: its windows, the party members' icons, the stock, the cursor and its icons, and the particle effects.
| Field | Declared as | |
|---|---|---|
unk000 | u8 unk000[0x0c] | not named by TBS code |
moneyWindow | struct UiWindow *moneyWindow | the coins window |
unk010 | u8 unk010[0x10] | not named by TBS code |
itemWindow | struct UiWindow *itemWindow | |
unk024 | u8 unk024[0xf0] | not named by TBS code |
partyMemberIcons | struct AnimationObject *partyMemberIcons[8] | the party row's sprites |
partyMemberX | s16 partyMemberX[8] | pixels |
partyMemberY | s16 partyMemberY[8] | pixels |
partyMemberScale | s32 partyMemberScale[8] | 16.16 fixed point, 0x10000 full size |
unk174 | u8 unk174[0xf8] | not named by TBS code |
stockItemIds | s16 stockItemIds[129] | the items on sale, ended by 0 |
partyMemberIds | s16 partyMemberIds[9] | the party in order (Party_ListActiveOwners) |
cursor | struct ShopCursor cursor | the hand cursor |
cursorIcon | u16 cursorIcon | VRAM cache slots of the six cursor icons, loaded when the work is set up and freed with it. @{ the hand |
previousPageIcon | u16 previousPageIcon | |
nextPageIcon | u16 nextPageIcon | |
gemIcon | u16 gemIcon | |
statUpIcon | u16 statUpIcon | |
statDownIcon | u16 statDownIcon | |
unk39c | u16 unk39c | @} not named by TBS code |
selectedItem | u16 selectedItem | the item being bought, sold or repaired |
unk3a0 | u8 unk3a0[4] | not named by TBS code |
keeperResource | u16 keeperResource | the shopkeeper's animation; picks the portrait |
stockCount | s8 stockCount | |
partyMemberCount | s8 partyMemberCount | |
mode | u8 mode | passed on as the hand cursor's kind; set to 12 at first |
shopType | u8 shopType | the stock row's type: 0 items, 2 armor, else weapons |
partyAction | s8 partyAction | the counter chosen (enum ShopAction) |
burstMember | s8 burstMember | the sanctum's member whose pose is randomized; -1 none |
warriorShop | u8 warriorShop | 1 for stock rows 16 to 18, which greet as warriors' |
unk3ad | u8 unk3ad[3] | not named by TBS code |
effects | struct EffectSlot effects[24] | the sanctum service's particles |
Used by Inn_RoomPrice, Sanctum_RunPartyService, SaveMenu_HidePartySprites, SaveMenu_PlacePartySprites, SaveMenu_SelectSlot, SaveMenu_ShowPartySprites, Shop_BuySpecialItem, Shop_ConfirmAct, Shop_ConfirmEquip, Shop_CountUnits, Shop_DrawEquipComparison, Shop_DrawMoney, Shop_DrawParty, Shop_DrawSelectMsg, Shop_DrawStock, Shop_HiliteUnit, Shop_InitializeCursorWork, Shop_ListAvailableArtifacts, Shop_MsgByMode, Shop_PickUnit, Shop_PickUnitItem, Shop_PlaceCursor, Shop_ReleaseCursorWork, Shop_RepairItem, Shop_ResetEffects, Shop_Run, Shop_RunPartyMemberIconBurst, Shop_SelectBuy, Shop_SelectBuyNum, Shop_SelectRepair, Shop_SelectSell, Shop_SelectSellNum, Shop_SelectUse, Shop_SellItem, Shop_StepCursor, UiMessage_ShowAndRestoreState, UiMessage_ShowAndWait, UiMessage_ShowChoice, UiMessage_ShowChoiceVariant, UiMessage_ShowResolvedAndRestoreState and 1 more.
Globals, without a comment: gShop_HandTiles, gShop_GemTiles, gShop_SmallDownArrowTiles, gShop_SmallUpArrowTiles, gShop_UpArrowTiles, gShop_DownArrowTiles, gShop_PriceTiles, gShop_QuantityTiles.