Alchemy

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.

FieldDeclared as
unk000u8 unk000[0x0c]not named by TBS code
moneyWindowstruct UiWindow *moneyWindowthe coins window
unk010u8 unk010[0x10]not named by TBS code
itemWindowstruct UiWindow *itemWindow
unk024u8 unk024[0xf0]not named by TBS code
partyMemberIconsstruct AnimationObject *partyMemberIcons[8]the party row's sprites
partyMemberXs16 partyMemberX[8]pixels
partyMemberYs16 partyMemberY[8]pixels
partyMemberScales32 partyMemberScale[8]16.16 fixed point, 0x10000 full size
unk174u8 unk174[0xf8]not named by TBS code
stockItemIdss16 stockItemIds[129]the items on sale, ended by 0
partyMemberIdss16 partyMemberIds[9]the party in order (Party_ListActiveOwners)
cursorstruct ShopCursor cursorthe hand cursor
cursorIconu16 cursorIconVRAM cache slots of the six cursor icons, loaded when the work is set up and freed with it. @{ the hand
previousPageIconu16 previousPageIcon
nextPageIconu16 nextPageIcon
gemIconu16 gemIcon
statUpIconu16 statUpIcon
statDownIconu16 statDownIcon
unk39cu16 unk39c@} not named by TBS code
selectedItemu16 selectedItemthe item being bought, sold or repaired
unk3a0u8 unk3a0[4]not named by TBS code
keeperResourceu16 keeperResourcethe shopkeeper's animation; picks the portrait
stockCounts8 stockCount
partyMemberCounts8 partyMemberCount
modeu8 modepassed on as the hand cursor's kind; set to 12 at first
shopTypeu8 shopTypethe stock row's type: 0 items, 2 armor, else weapons
partyActions8 partyActionthe counter chosen (enum ShopAction)
burstMembers8 burstMemberthe sanctum's member whose pose is randomized; -1 none
warriorShopu8 warriorShop1 for stock rows 16 to 18, which greet as warriors'
unk3adu8 unk3ad[3]not named by TBS code
effectsstruct 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.

Line 18

Globals, without a comment: gShop_HandTiles, gShop_GemTiles, gShop_SmallDownArrowTiles, gShop_SmallUpArrowTiles, gShop_UpArrowTiles, gShop_DownArrowTiles, gShop_PriceTiles, gShop_QuantityTiles.

On this page