11 300, 300, 300, 300, 300,
12 500, 500, 500, 500, 500,
13 1000, 1000, 1000, 1000, 1000,
14 2000, 2000, 2000, 2000, 2000,
15 4000, 4000, 4000, 4000, 4000,
16 8000, 8000, 8000, 8000, 8000,
23 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
24 16, 195, 38, 84, 89, 90, 180, 181, 190, 0,
35 u32 savedSelectedItem;
53 messageBase = MsgTokenGift;
126 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
127 0, 0, 0, 0, 0, 0, 0, 0,
131 1, 16, 43, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
132 0, 0, 0, 0, 0, 0, 0, 0,
136 89, 90, 103, 118, 127, 156, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
137 0, 0, 0, 0, 0, 0, 0, 0,
141 180, 187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
142 0, 0, 0, 0, 0, 0, 0, 0,
146 1, 16, 31, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
147 56, 0, 0, 0, 0, 0, 0, 0,
151 90, 118, 127, 136, 156, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
152 0, 0, 0, 0, 0, 0, 0, 0,
156 180, 187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
157 0, 0, 0, 0, 0, 0, 0, 0,
161 1, 2, 17, 31, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
162 57, 0, 0, 0, 0, 0, 0, 0,
166 75, 90, 104, 119, 128, 136, 145, 157, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
167 0, 0, 0, 0, 0, 0, 0, 0,
171 180, 187, 188, 236, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
172 0, 0, 0, 0, 0, 0, 0, 0,
176 2, 17, 31, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
177 58, 0, 0, 0, 0, 0, 0, 0,
181 75, 92, 119, 128, 136, 145, 157, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
182 0, 0, 0, 0, 0, 0, 0, 0,
186 180, 187, 188, 236, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
187 0, 0, 0, 0, 0, 0, 0, 0,
191 2, 17, 32, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
192 0, 0, 0, 0, 0, 0, 0, 0,
196 75, 92, 119, 128, 137, 146, 157, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
197 0, 0, 0, 0, 0, 0, 0, 0,
201 180, 187, 188, 236, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
202 0, 0, 0, 0, 0, 0, 0, 0,
206 2, 18, 32, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
207 0, 0, 0, 0, 0, 0, 0, 0,
211 92, 105, 120, 137, 146, 157, 167, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
212 106, 0, 0, 0, 0, 0, 0, 0,
216 180, 187, 188, 236, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
217 0, 0, 0, 0, 0, 0, 0, 0,
221 3, 18, 32, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
222 59, 0, 0, 0, 0, 0, 0, 0,
226 77, 92, 105, 120, 129, 137, 147, 167, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
227 0, 0, 0, 0, 0, 0, 0, 0,
231 180, 181, 187, 188, 236, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
232 0, 0, 0, 0, 0, 0, 0, 0,
236 3, 18, 33, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
237 60, 0, 0, 0, 0, 0, 0, 0,
241 77, 107, 120, 129, 138, 147, 158, 167, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
242 0, 0, 0, 0, 0, 0, 0, 0,
246 180, 181, 187, 188, 236, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
247 0, 0, 0, 0, 0, 0, 0, 0,
251 180, 187, 188, 236, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
252 0, 0, 0, 0, 0, 0, 0, 0,
256 4, 19, 33, 46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
257 61, 0, 0, 0, 0, 0, 0, 0,
261 78, 94, 107, 121, 129, 138, 148, 158, 168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
262 0, 0, 0, 0, 0, 0, 0, 0,
266 180, 181, 187, 188, 236, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
267 182, 189, 0, 0, 0, 0, 0, 0,
271 4, 19, 33, 46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
272 5, 20, 34, 62, 0, 0, 0, 0,
276 79, 139, 149, 169, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
277 109, 131, 0, 0, 0, 0, 0, 0,
281 180, 181, 187, 188, 236, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
282 182, 183, 189, 186, 0, 0, 0, 0,
286 4, 19, 33, 46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
287 6, 21, 47, 63, 0, 0, 0, 0,
291 80, 150, 169, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
292 110, 122, 140, 159, 0, 0, 0, 0,
296 180, 181, 187, 188, 236, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
297 182, 183, 189, 186, 0, 0, 0, 0,
310 const s16 *stockEntries;
311 const s16 *artifactCursor;
330 itemId = *artifactCursor;
331 }
while (itemId != 0);
351 *dst = *(
const volatile s16 *)src;
static const s16 sStockTable[SHOP_STOCK_ROWS][SHOP_STOCK_COLUMNS]
s32 EventTable_CopyRowHeader(s32 stockRow, s16 *output)
Copies the shop's ordinary stock, up to 24 items, to output with a 0 after, and returns how many.
@ SHOP_STOCK_ARTIFACT_COUNT
static const s16 sGameTicketCreditCosts[30]
The shop credit each Game Ticket costs, by how many have been given: five at each price: 300,...
s32 EventTable_GetRowType(s32 stockRow)
Returns the shop's type from the last column of its stock row: 0 items, 1 weapons,...
s32 EventTable_GetRowLimit(void)
Returns how many stock rows there are; Shop_Run refuses a row past them.
void Shop_BuySpecialItem(struct UiWindow *window, struct UiWindow *itemWindow)
Gives a Game Ticket once the party's shop credit (what it has spent in shops) reaches the next ticket...
void EventTable_ApplyRowAbilities(s32 stockRow)
Adds a shop's artifacts to the shared stock counters once, on its first visit, and sets the shop's fl...
const s16 gShop_GiftItemIds[21]
Gift items, terminated by 0; no function reads this table.
void Shop_DrawParty(struct UiWindow *window, s32 selected, s32 itemId)
Shows the chosen member walking and the others standing, and draws at four fifths of their size the m...
void Shop_DrawUnitItem(struct UiWindow *window, s32 unitId, s32 itemId)
Shows the quantity already carried and the member's inventory icons.
void Shop_PlaceCursor(struct UiWindow *window, s32 x, s32 y)
Starts the hand cursor's glide to (x, y) pixels inside window (the screen when it is NULL),...
s32 Item_AdjustCounterFar(s32 item_id, s32 delta)
s32 GameFlag_TestFar(s32 flag)
s32 Inventory_CountFar(s32 owner)
s32 Inventory_AddItemFar(s32 owner_id, s32 item_id)
s32 GameFlag_SetBitFar(s32 flag)
s32 Inventory_RemoveFar(s32 owner, s32 slot)
s32 Party_AdjustShopGiftsFar(s32 amount)
s32 Party_AdjustShopCreditFar(s32 amount)
void AudioCommand_PlayFar(s32 id)
void UiWork_PushValueSlotFar(u32 value, u32 kind)
#define FLAG_SHOP_ARTIFACTS_STOCKED
Plus a row of the shop stock table: that place's artifacts are in stock.
void WaitFrames(s32 frames)
The game's frame loop: runs frames frames and returns.
struct GameState gGameState
volatile u32 gKeysPressed
Keys that went down this frame.
volatile u32 gKeysRepeat
Pressed keys, repeating while held: after 19 frames, then every 6.
void UiMessage_ShowAndRestoreState(s32 messageId)
Shows a shopkeeper's line as UiMessage_ShowAndWait does, hiding the hand cursor while it shows and pu...
void UiMessage_ShowAndWait(s32 messageId)
Shows a shopkeeper's line and waits for its window to finish, one more frame included.
What every part of the shop object shares: its includes, the shop actions and sanctum services,...
#define SE_MENU_CURSOR_MOVE
s8 shopGifts
indexes the Game Ticket's credit cost
s32 shopCredit
spent on a Game Ticket; not written by name in TBS
A shop's work: its windows, the party members' icons, the stock, the cursor and its icons,...
struct UiWindow * itemWindow
s16 partyMemberIds[9]
the party in order (Party_ListActiveOwners)
u16 selectedItem
the item being bought, sold or repaired
u8 mode
passed on as the hand cursor's kind; set to 12 at first
A window: a framed rectangle of the tilemap with its sprite outputs, its opening or closing animation...