Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
item_shop.h
Go to the documentation of this file.
1#ifndef STITSHOP_H
2#define STITSHOP_H
3
4/* STITSHOP.PRO: the item shop. The game mode's argument picks the shop
5 (STITSHOP_shops, a list of the items it sells); the player buys items
6 for the money, sells them, and equips what was bought on a partner.
7 Its strings are in file 0x72. Its modules are in src/menus/item_shop/, and the
8 functions below are by module, in the order they link. */
9
10#include "engine/game.h"
11
12/* The name of this overlay's copy of a function of src/shared/ */
13#define OVL_NAME(name) STITSHOP_##name
14
15/* The shop's sprite sheet; the next file is its texture archive */
16#if VERSION_US || VERSION_JP
17#define FILE_SHOP_SPRITES 0x3F2
18#elif VERSION_EU
19#define FILE_SHOP_SPRITES 0x402
20#endif
21
22/* The main task of the shop (STITSHOP_createShop) */
23typedef struct ItemShop {
25 /* 0x50 */ s32 layer;
26 /* 0x54 */ s32 depth;
27 /* 0x58 */ s32 bgScroll;
28 /* 0x5C */ s32 bgTick;
29 /* 0x60 */ s32 shop; /* the game mode's argument */
30 /* 0x64 */ s32 choice;
31 /* 0x68 */ PanelAnim panels[4];
32 /* 0xA8 */ void (*showMoney)(struct ItemShop *shop);
33} ItemShop;
34
35/* The children of the shop */
36typedef struct ItemShopWindows {
37 /* 0x00 */ TextWindow *title; /* the shop's name */
38 /* 0x04 */ TextWindow *help;
39 /* 0x08 */ TextWindow *money;
41 /* 0x10 */ TextWindow *buy;
42 /* 0x14 */ TextWindow *sell;
43 /* 0x18 */ Cursor *cursor;
44 /* 0x1C */ Task *dialog; /* ShopBuy or ShopSell */
45 /* 0x20 */ ScreenFade *fade;
47
48/* What the details panel shows of a partner */
49typedef struct ShopPartnerInfo {
50 /* 0x00 */ StatBlock current;
51 /* 0x2C */ StatBlock withItem; /* with the item equipped */
52 /* 0x58 */ s32 slot;
53 /* 0x5C */ s32 changes; /* how many of the stats would change */
54 /* 0x60 */ s32 rows[8]; /* from 2: the stats that change (from 1) */
56
57/* A row of the details panel's stats */
58typedef struct ShopStatRow {
59 /* 0x00 */ s32 partner;
60 /* 0x04 */ s32 stat; /* into STITSHOP_stats */
61 /* 0x08 */ s32 compare; /* show the stat with the item equipped */
62 /* 0x0C */ s32 skip;
63 /* 0x10 */ s32 skip2; /* -1: none */
65
66/* The panel with the selected item's details (STITSHOP_createInfo) */
67typedef struct ShopInfo {
69 /* 0x050 */ s32 layer;
70 /* 0x054 */ s32 depth;
71 /* 0x058 */ s32 selling;
72 /* 0x05C */ s32 page; /* 0: the description, 1: the partners' stats */
73 /* 0x060 */ s32 partyCount;
74 /* 0x064 */ ShopPartnerInfo partners[3];
75 /* 0x1E4 */ s32 item;
76 /* 0x1E8 */ s32 quantity;
77 /* 0x1EC */ s32 hasStats;
78 /* 0x1F0 */ s32 shown;
79 /* 0x1F4 */ PanelAnim panels[4];
80 /* 0x234 */ void (*showItem)(struct ShopInfo *info, s32 item, s32 quantity);
81 /* 0x238 */ void (*close)(struct ShopInfo *info);
82 /* 0x23C */ void (*setKindVisible)(struct ShopInfo *info, s32 visible);
83 /* 0x240 */ void (*turnPage)(struct ShopInfo *info);
84 /* 0x244 */ void (*refreshPartner)(struct ShopInfo *info, s32 member);
85} ShopInfo;
86
87/* A partner's rows of the details panel's second page */
88typedef struct ShopInfoPartner {
89 /* 0x00 */ TextWindow *name;
90 /* 0x04 */ TextWindow *stats[2];
91 /* 0x0C */ TextWindow *changes[8];
93
94typedef struct ShopInfoWindows {
95 /* 0x00 */ TextWindow *name;
97 /* 0x08 */ TextWindow *equipped; /* GAME.equippedItems */
99 /* 0x10 */ TextWindow *owned; /* GAME.items */
101 /* 0x18 */ TextWindow *price;
102 /* 0x1C */ TextWindow *desc;
103 /* 0x20 */ TextWindow *kind; /* the weapons' */
105 /* 0xA8 */ TextWindow *pageHint;
107
108/* What ShopBuy and ShopSell start with, and are passed to the item list as:
109 the list shows its selection in it */
110typedef struct ShopDialog {
112 /* 0x50 */ void (*showItem)(struct ShopDialog *dialog, s32 item, s32 quantity);
113} ShopDialog;
114
115/* The list of the items to buy or sell (STITSHOP_createItemList) */
116typedef struct ShopItemList {
118 /* 0x050 */ ShopDialog *dialog; /* ShopBuy or ShopSell */
119 /* 0x054 */ s32 layer;
120 /* 0x058 */ s32 depth;
121 /* 0x05C */ s32 selling; /* 0: the shop's items, 1: the bag's */
122 /* 0x060 */ s32 type; /* the shop, or the item type to sell */
123 /* 0x064 */ s16 items[0x194]; /* the bag's items that can be sold */
124 /* 0x38C */ s16 bag[0x194];
125 /* 0x6B4 */ s16 *shopItems;
126 /* 0x6B8 */ s32 active;
127 /* 0x6BC */ s32 selection;
128 /* 0x6C0 */ s32 count;
129 /* 0x6C4 */ s32 page;
130 /* 0x6C8 */ s32 pages;
131 /* 0x6CC */ s32 clutRow; /* the arrows' blink */
132 /* 0x6D0 */ s32 blinkTime;
133 /* 0x6D4 */ s32 pageSize;
134 /* 0x6D8 */ PanelAnim panel;
135 /* 0x6E8 */ void (*start)(struct ShopItemList *list);
136 /* 0x6EC */ void (*close)(struct ShopItemList *list);
137 /* 0x6F0 */ s32 (*getSelected)(struct ShopItemList *list);
138 /* 0x6F4 */ void (*showCursor)(struct ShopItemList *list, s32 visible);
139 /* 0x6F8 */ void (*freezeCursor)(struct ShopItemList *list, s32 frozen);
140 /* 0x6FC */ void (*refresh)(struct ShopItemList *list);
141 /* 0x700 */ void (*listBag)(struct ShopItemList *list);
143
144typedef struct ShopItemListWindows {
145 /* 0x00 */ TextWindow *items[14];
146 /* 0x38 */ TextWindow *page;
147 /* 0x3C */ TextWindow *slash;
148 /* 0x40 */ TextWindow *pages;
149 /* 0x44 */ TextWindow *l1Label;
150 /* 0x48 */ TextWindow *r1Label;
151 /* 0x4C */ Cursor *cursor;
153
154/* The dialog to buy an item (STITSHOP_createBuy) */
155typedef struct ShopBuy {
157 /* 0x50 */ void (*showItem)(struct ShopBuy *buy, s32 item, s32 quantity);
158 /* 0x54 */ struct ItemShop *shop;
159 /* 0x58 */ s32 layer;
160 /* 0x5C */ s32 depth;
161 /* 0x60 */ s32 item;
162 /* 0x64 */ s32 quantity;
163 /* 0x68 */ s32 max;
164 /* 0x6C */ s32 blink;
165 /* 0x70 */ s32 blinkTime;
166 /* 0x74 */ s32 choice;
167 /* 0x78 */ s32 partner; /* the one the marker is over */
168 /* 0x7C */ s32 markerShown;
169 /* 0x80 */ s32 markerFrame; /* the marker's clut row, 0-7 */
170 /* 0x84 */ s32 markerTime;
171 /* 0x88 */ PanelAnim panels[4];
172} ShopBuy;
173
174typedef struct ShopBuyWindows {
175 /* 0x00 */ ShopItemList *list;
176 /* 0x04 */ ShopInfo *info;
178 /* 0x0C */ TextWindow *times;
179 /* 0x10 */ TextWindow *quantity;
180 /* 0x14 */ TextWindow *total;
181 /* 0x18 */ TextWindow *yes;
182 /* 0x1C */ TextWindow *no;
183 /* 0x20 */ Cursor *cursor;
185
186/* The dialog to sell an item (STITSHOP_createSell) */
187typedef struct ShopSell {
189 /* 0x50 */ void (*showItem)(struct ShopSell *sell, s32 item, s32 quantity);
190 /* 0x54 */ struct ItemShop *shop;
191 /* 0x58 */ s32 layer;
192 /* 0x5C */ s32 depth;
193 /* 0x60 */ s32 type;
194 /* 0x64 */ s32 item;
195 /* 0x68 */ s32 quantity;
196 /* 0x6C */ s32 max;
197 /* 0x70 */ s32 blink; /* the quantity's arrows are shown */
198 /* 0x74 */ s32 blinkTime;
199 /* 0x78 */ s32 choice;
200 /* 0x7C */ PanelAnim panels[5];
201} ShopSell;
202
203typedef struct ShopSellWindows {
204 /* 0x00 */ ShopItemList *list;
205 /* 0x04 */ ShopInfo *info;
206 /* 0x08 */ Cursor *cursor;
207 /* 0x0C */ TextWindow *types[4];
209 /* 0x20 */ TextWindow *times;
210 /* 0x24 */ TextWindow *quantity;
211 /* 0x28 */ TextWindow *total;
212 /* 0x2C */ TextWindow *yes;
213 /* 0x30 */ TextWindow *no;
214 /* 0x34 */ TextWindow *message;
216
217/* A shop: the items it sells */
218typedef struct ShopList {
219 /* 0x0 */ s32 count;
220 /* 0x4 */ s16 *items;
221} ShopList;
222
223/* The shop's helpers (STITSHOP_funcs) */
224typedef struct ItemShopFuncs {
225 /* 0x00 */ s32 count; /* the items of the shop getShopItems returned */
226 /* 0x04 */ void (*loadFiles)(void);
227 /* 0x08 */ s32 (*filesLoading)(void);
228 /* 0x0C */ void (*startFade)(PanelAnim *fade, s32 fadeIn);
229 /* 0x10 */ s32 (*updateFade)(PanelAnim *fade);
230 /* 0x14 */ void (*startLerp)(MenuLerp *lerp, s32 from, s32 to, s32 frames);
231 /* 0x18 */ s32 (*updateLerp)(MenuLerp *lerp);
232 /* 0x1C */ s16 *(*getShopItems)(s32 shop);
233 /* 0x20 */ s32 (*canEquip)(s32 partner, s32 item);
234 /* 0x24 */ s32 (*compareEquip)(s32 partner, s32 item);
235 /* 0x28 */ void (*equip)(s32 partner, s32 slot, s32 item, s32 fromBag);
237
238/* scene.c */
239void STITSHOP_updateScene(Task *task, ItemShop **child);
240void STITSHOP_startFader(ScreenFade *task, s32 fadeIn, s32 duration);
244
245/* trade.c */
247void STITSHOP_showQuantity(ShopBuy *buy, ShopBuyWindows *win, s32 show);
248void STITSHOP_showBuyTotal(ShopBuy *buy, ShopBuyWindows *win, s32 show);
250void STITSHOP_runBuy(ShopBuy *buy, ShopBuyWindows *win);
252void STITSHOP_showBuyItem(ShopBuy *buy, s32 item, s32 quantity);
258void STITSHOP_showSellItem(ShopSell *sell, s32 item, s32 quantity);
260
261/* item_list.c */
267void STITSHOP_freezeListCursor(ShopItemList *list, s32 frozen);
268void STITSHOP_showListCursor(ShopItemList *list, s32 visible);
274ShopItemList *STITSHOP_createItemList(ShopDialog *dialog, s32 type, s32 selling);
275
276/* info.c */
277void STITSHOP_computeStats(s32 partner, StatBlock *out);
278void STITSHOP_addStat(s16 *p, s32 stat, s32 delta);
279void STITSHOP_showStat(ShopInfo *info, TextWindow *win, ShopStatRow *row);
280void STITSHOP_colorStat(ShopInfo *info, TextWindow *win, ShopStatRow *row);
282void STITSHOP_fillPartnerRows(ShopInfo *info, ShopInfoWindows *win, s32 member);
284void STITSHOP_showItemRows(ShopInfo *info, ShopInfoWindows *win, s32 show);
285void STITSHOP_showItemDesc(ShopInfo *info, ShopInfoWindows *win, s32 show);
291void STITSHOP_setInfoItem(ShopInfo *info, s32 item, s32 quantity);
292void STITSHOP_closeInfo(ShopInfo *info);
293void STITSHOP_setKindVisible(ShopInfo *info, s32 visible);
295void STITSHOP_refreshPartner(ShopInfo *info, s32 member);
296ShopInfo *STITSHOP_createInfo(s32 selling, s32 item);
297
298/* shop.c */
303void STITSHOP_showMoney(ItemShop *shop);
305void STITSHOP_loadFiles(void);
307void STITSHOP_startFade(PanelAnim *fade, s32 fadeIn);
309void STITSHOP_startLerp(MenuLerp *lerp, s32 from, s32 to, s32 frames);
311
312/* equip.c */
314s32 STITSHOP_canEquip(s32 partner, s32 item);
315s32 STITSHOP_compareEquip(s32 partner, s32 item);
316void STITSHOP_equip(s32 partner, s32 slot, s32 item, s32 fromBag);
317
318/* STITSHOP's data (data/stitshop.c), in its order */
319extern s32 STITSHOP_sellLists[]; /* the item list each kind of sale shows */
320extern Vec2 STITSHOP_changePos[];
321extern s32 STITSHOP_stats[]; /* the stats the info shows */
322extern s32 STITSHOP_kindStrings[]; /* the strings of the item kinds */
323extern s32 STITSHOP_shopNames[];
324/* STITSHOP_stock0 to 30, the items of each shop, are only STITSHOP_shops' */
325extern ShopList STITSHOP_shops[31];
327
328#endif /* STITSHOP_H */
signed int s32
Definition common.h:11
signed short s16
Definition common.h:9
#define TASK_HEADER(Type)
Definition task.h:39
void STITSHOP_startFade(PanelAnim *fade, s32 fadeIn)
void STITSHOP_listSellable(ShopItemList *list)
Lists the bag's items of the list's type that can be sold, those with a sell price (list->listBag,...
Definition item_list.c:331
void STITSHOP_createBuyWindows(ShopBuy *buy, ShopBuyWindows *win)
trade.c
Definition trade.c:8
void STITSHOP_startLerp(MenuLerp *lerp, s32 from, s32 to, s32 frames)
void STITSHOP_drawShop(ItemShop *shop, ItemShopWindows *win)
Draws the shop's four frames as they open by scaling, and the background, which scrolls one pixel eve...
Definition shop.c:21
void STITSHOP_computeStats(s32 partner, StatBlock *out)
info.c
Definition info.c:10
void STITSHOP_updateBuy(ShopBuy *buy, ShopBuyWindows *win)
The buying dialog's task: creates its windows, starting at a quantity of 1, then runs and draws it.
Definition trade.c:652
void STITSHOP_refreshItemList(ShopItemList *list)
Lists the sellable items again, shows the page and the selection in the dialog (list->refresh)
Definition item_list.c:321
void STITSHOP_showItemRows(ShopInfo *info, ShopInfoWindows *win, s32 show)
Shows the item's name, how many are equipped and in the bag, and its price; or hides them.
Definition info.c:398
ShopInfo * STITSHOP_createInfo(s32 selling, s32 item)
Creates the details panel (task) of the item selected, when buying or selling.
Definition info.c:865
void STITSHOP_createInfoWindows(ShopInfo *info, ShopInfoWindows *win)
Creates the details panel's windows: the item's rows, then, when buying, each partner's name,...
Definition info.c:351
void STITSHOP_refreshPartner(ShopInfo *info, s32 member)
Refreshes the details panel once the item is equipped on a party member (info->refreshPartner): the i...
Definition info.c:856
ShopSell * STITSHOP_createSell(ItemShop *shop)
Creates the selling dialog (task), when sell is chosen in the shop.
Definition trade.c:1206
void STITSHOP_runSell(ShopSell *sell, ShopSellWindows *win)
The selling dialog: pick the kind of item, then the item in the list, how many, and confirm.
Definition trade.c:1007
s32 STITSHOP_getSelectedItem(ShopItemList *list)
The item at the list's selection, of the shop's or of the bag's sellable ones (list->getSelected)
Definition item_list.c:312
s32 STITSHOP_stats[]
the stats the info shows
Definition stitshop.c:15
void STITSHOP_closeItemList(ShopItemList *list)
Closes the list (list->close): hides the cursor and fades it out.
Definition item_list.c:304
void STITSHOP_showOtherChanges(ShopInfo *info, TextWindow **win, ShopStatRow *row)
Shows the new values of the other stats the item would change (palette 1 up, 5 down),...
Definition info.c:171
void STITSHOP_createSellWindows(ShopSell *sell, ShopSellWindows *win)
Creates the selling dialog's windows: the cursor, the four kinds of sale, the quantity,...
Definition trade.c:695
void STITSHOP_drawStatsPage(ShopInfo *info, ShopInfoWindows *win)
Draws the second page's frames: the panel, then for each partner its frame and either the icons of th...
Definition info.c:483
s32 STITSHOP_updateLerp(MenuLerp *lerp)
void STITSHOP_updateScene(Task *task, ItemShop **child)
scene.c
s32 STITSHOP_sellLists[]
STITSHOP's data (data/stitshop.c), in its order.
Definition stitshop.c:6
void STITSHOP_showQuantity(ShopBuy *buy, ShopBuyWindows *win, s32 show)
Shows the quantity to buy; or hides it.
Definition trade.c:20
s32 STITSHOP_updateFade(PanelAnim *fade)
s32 STITSHOP_filesLoading(void)
Whether the shop's strings are still loading.
Definition shop.c:237
void STITSHOP_createItemListWindows(ShopItemList *list, ShopItemListWindows *win)
item_list.c
Definition item_list.c:7
void STITSHOP_updateItemList(ShopItemList *list, ShopItemListWindows *win)
The item list: L1 and R1 turn its pages, the d-pad moves in the page, and the dialog shows the select...
Definition item_list.c:176
s32 STITSHOP_kindStrings[]
the strings of the item kinds
Definition stitshop.c:21
s16 * STITSHOP_getShopItems(s32 shop)
equip.c
Definition equip.c:7
void STITSHOP_showItemPage(ShopItemList *list, ShopItemListWindows *win, s32 show)
Shows the page of items, the page number and the arrows' labels; or hides them.
Definition item_list.c:26
void STITSHOP_showMoney(ItemShop *shop)
Shows the money left (shop->showMoney), after buying or selling.
Definition shop.c:206
ItemShopFuncs STITSHOP_funcs
The shop's helpers.
Definition stitshop.c:228
void STITSHOP_drawBuy(ShopBuy *buy, ShopBuyWindows *win)
Draws the buying screen's frames, the quantity's blinking arrows and the marker over a partner.
Definition trade.c:49
ItemShop * STITSHOP_createShop(void)
Creates the item shop (task) for the shop of the mode's argument.
Definition shop.c:214
void STITSHOP_updateShop(ItemShop *shop, ItemShopWindows *win)
The shop's task: loads its files, then runs it; goes back to the field when killed.
Definition shop.c:171
void STITSHOP_fillPartnerRows(ShopInfo *info, ShopInfoWindows *win, s32 member)
Fills a partner's rows of the details panel's second page: the stats of the slot the item goes in,...
Definition info.c:203
ShopItemList * STITSHOP_createItemList(ShopDialog *dialog, s32 type, s32 selling)
Creates the item list (task) of a dialog: the items of the shop type when buying, the bag's of the it...
Definition item_list.c:346
void STITSHOP_addStat(s16 *p, s32 stat, s32 delta)
Adds an item's bonus to a stat, up to 999: 1 to 6 one of the six battle stats, 7 all of them,...
Definition info.c:87
void STITSHOP_createShopWindows(ItemShop *shop, ItemShopWindows *win)
shop.c
Definition shop.c:8
void STITSHOP_closeInfo(ShopInfo *info)
Closes the details panel (info->close), when it is open and idle.
Definition info.c:829
void STITSHOP_runSellInfo(ShopInfo *info, ShopInfoWindows *win)
The details panel's first page: fades in, shows the item, then fades out when closed.
Definition info.c:711
ScreenFade * STITSHOP_createFader(void)
void STITSHOP_drawSell(ShopSell *sell, ShopSellWindows *win)
Draws the selling screen's frames, and the quantity's blinking arrows.
Definition trade.c:713
void STITSHOP_updateInfo(ShopInfo *info, ShopInfoWindows *win)
The details panel: counts the party, then runs the pages and draws the item's icon and frames.
Definition info.c:751
void STITSHOP_updateSell(ShopSell *sell, ShopSellWindows *win)
The selling dialog's task: creates its windows, starting at a quantity of 1, then runs and draws it.
Definition trade.c:1174
void STITSHOP_startFader(ScreenFade *task, s32 fadeIn, s32 duration)
void STITSHOP_equip(s32 partner, s32 slot, s32 item, s32 fromBag)
Puts an item in a partner's equipment slot like STSTATUS_equip, moving the counts between GAME....
Definition equip.c:115
ShopList STITSHOP_shops[31]
STITSHOP_stock0 to 30, the items of each shop, are only STITSHOP_shops'.
Definition stitshop.c:194
s32 STITSHOP_canEquip(s32 partner, s32 item)
1 when a partner can equip an item: the partner's bit in its partners
Definition equip.c:16
void STITSHOP_runBuy(ShopBuy *buy, ShopBuyWindows *win)
The buying dialog: pick the item in the list, how many, confirm, then (equipment) whether to equip it...
Definition trade.c:439
void STITSHOP_showStat(ShopInfo *info, TextWindow *win, ShopStatRow *row)
Shows a row's stat of a partner in the details panel: as it is, or with the item equipped when the ro...
Definition info.c:116
void STITSHOP_runItemList(ShopItemList *list, ShopItemListWindows *win)
The list's states: lists the shop's items or the bag's, fades in, then fades out when closed.
Definition item_list.c:133
void STITSHOP_updateFader(ScreenFade *task)
void STITSHOP_drawItemList(ShopItemList *list)
Draws the list's frame, the items' icons and the blinking page arrows.
Definition item_list.c:75
void STITSHOP_showBuyItem(ShopBuy *buy, s32 item, s32 quantity)
Shows the item selected in the list, and the quantity, in the details panel (buy->showItem)
Definition trade.c:676
void STITSHOP_showListCursor(ShopItemList *list, s32 visible)
Shows the list's cursor at the selection and takes the d-pad, or hides it and stops (list->showCursor...
Definition item_list.c:287
void STITSHOP_setKindVisible(ShopInfo *info, s32 visible)
Shows or hides the weapon's kind in the details panel (info->setKindVisible)
Definition info.c:836
ShopBuy * STITSHOP_createBuy(ItemShop *shop)
Creates the buying dialog (task), when buy is chosen in the shop.
Definition trade.c:683
s32 STITSHOP_shopNames[]
The shops' names, by ItemShop.shop.
Definition stitshop.c:27
Vec2 STITSHOP_changePos[]
Where the stat change arrows go in a partner's column.
Definition stitshop.c:10
void STITSHOP_turnInfoPage(ShopInfo *info)
Turns the details panel between the description and the partners' stats (info->turnPage); only for th...
Definition info.c:844
void STITSHOP_runShop(ItemShop *shop, ItemShopWindows *win)
Opens the shop's panels, then up/down and cross pick buy or sell and run that dialog,...
Definition shop.c:60
void STITSHOP_showItemDesc(ShopInfo *info, ShopInfoWindows *win, s32 show)
Shows the item's description and, for a weapon, its kind; or hides them.
Definition info.c:426
void STITSHOP_loadFiles(void)
Loads the shop's textures and requests its strings.
Definition shop.c:224
void STITSHOP_startItemList(ShopItemList *list)
Runs the list's states again (list->start), to reopen it after the quantity and the yes/no.
Definition item_list.c:299
void STITSHOP_showBuyTotal(ShopBuy *buy, ShopBuyWindows *win, s32 show)
Shows the total price with yes and no to confirm the purchase; or hides them.
Definition trade.c:34
void STITSHOP_setInfoItem(ShopInfo *info, s32 item, s32 quantity)
Shows an item and the quantity (for the price) in the details panel (info->showItem); the windows are...
Definition info.c:812
void STITSHOP_freezeListCursor(ShopItemList *list, s32 frozen)
Freezes the list's cursor (still, in palette 7) and its input, or lets them go again (list->freezeCur...
Definition item_list.c:271
void STITSHOP_drawFader(ScreenFade *task)
void STITSHOP_showPartnerStats(ShopInfo *info, ShopInfoWindows *win, s32 show)
Shows the party's names and, for those who can equip the item, the stats it changes; or hides them.
Definition info.c:446
s32 STITSHOP_compareEquip(s32 partner, s32 item)
Which equipment slot a bought item would go in: 2 or 3 for the weapons (the one with the weaker item ...
Definition equip.c:23
void STITSHOP_showSellItem(ShopSell *sell, s32 item, s32 quantity)
Shows the item selected in the list, and the quantity, in the details panel (sell->showItem)
Definition trade.c:1199
void STITSHOP_runBuyInfo(ShopInfo *info, ShopInfoWindows *win)
The details panel's states when buying: fades in its first page, turns between the pages (10-16),...
Definition info.c:603
void STITSHOP_colorStat(ShopInfo *info, TextWindow *win, ShopStatRow *row)
Colors a row's stat: palette 1 when the item would raise it, 5 when it would lower it,...
Definition info.c:132
A menu cursor: a text window showing one of the CURSOR_FRAMES glyphs.
Definition text.h:19
The shop's helpers (STITSHOP_funcs)
Definition item_shop.h:224
s32(* updateLerp)(MenuLerp *lerp)
Definition item_shop.h:231
void(* loadFiles)(void)
Definition item_shop.h:226
void(* equip)(s32 partner, s32 slot, s32 item, s32 fromBag)
Definition item_shop.h:235
s32 count
the items of the shop getShopItems returned
Definition item_shop.h:225
s32(* updateFade)(PanelAnim *fade)
Definition item_shop.h:229
void(* startFade)(PanelAnim *fade, s32 fadeIn)
Definition item_shop.h:228
s32(* compareEquip)(s32 partner, s32 item)
Definition item_shop.h:234
void(* startLerp)(MenuLerp *lerp, s32 from, s32 to, s32 frames)
Definition item_shop.h:230
s32(* filesLoading)(void)
Definition item_shop.h:227
s32(* canEquip)(s32 partner, s32 item)
Definition item_shop.h:233
The children of the shop.
Definition item_shop.h:36
TextWindow * buy
Definition item_shop.h:41
Task * dialog
ShopBuy or ShopSell.
Definition item_shop.h:44
TextWindow * moneyLabel
Definition item_shop.h:40
TextWindow * money
Definition item_shop.h:39
Cursor * cursor
Definition item_shop.h:43
TextWindow * title
the shop's name
Definition item_shop.h:37
TextWindow * sell
Definition item_shop.h:42
ScreenFade * fade
Definition item_shop.h:45
TextWindow * help
Definition item_shop.h:38
The main task of the shop (STITSHOP_createShop)
Definition item_shop.h:23
s32 bgScroll
Definition item_shop.h:27
s32 shop
the game mode's argument
Definition item_shop.h:29
PanelAnim panels[4]
Definition item_shop.h:31
s32 depth
Definition item_shop.h:26
s32 choice
Definition item_shop.h:30
void(* showMoney)(struct ItemShop *shop)
Definition item_shop.h:32
s32 bgTick
Definition item_shop.h:28
s32 layer
Definition item_shop.h:25
Moves a value towards a target in fixed point, as the menu overlays' startLerp and updateLerp do.
Definition menu.h:27
Opens or closes a menu panel: level goes 0 -> ONE in duration frames (or back at twice the speed),...
Definition menu.h:18
Fades the whole screen to black and back with a subtractive rectangle.
Definition gfx.h:361
Cursor * cursor
Definition item_shop.h:183
TextWindow * times
Definition item_shop.h:178
TextWindow * total
Definition item_shop.h:180
ShopItemList * list
Definition item_shop.h:175
TextWindow * yes
Definition item_shop.h:181
TextWindow * quantity
Definition item_shop.h:179
TextWindow * no
Definition item_shop.h:182
TextWindow * quantityLabel
Definition item_shop.h:177
ShopInfo * info
Definition item_shop.h:176
The dialog to buy an item (STITSHOP_createBuy)
Definition item_shop.h:155
s32 blink
Definition item_shop.h:164
s32 layer
Definition item_shop.h:159
s32 max
Definition item_shop.h:163
PanelAnim panels[4]
Definition item_shop.h:171
s32 markerShown
Definition item_shop.h:168
s32 blinkTime
Definition item_shop.h:165
void(* showItem)(struct ShopBuy *buy, s32 item, s32 quantity)
Definition item_shop.h:157
s32 partner
the one the marker is over
Definition item_shop.h:167
s32 markerFrame
the marker's clut row, 0-7
Definition item_shop.h:169
s32 markerTime
Definition item_shop.h:170
s32 item
Definition item_shop.h:161
struct ItemShop * shop
Definition item_shop.h:158
s32 quantity
Definition item_shop.h:162
s32 depth
Definition item_shop.h:160
s32 choice
Definition item_shop.h:166
What ShopBuy and ShopSell start with, and are passed to the item list as: the list shows its selectio...
Definition item_shop.h:110
void(* showItem)(struct ShopDialog *dialog, s32 item, s32 quantity)
Definition item_shop.h:112
A partner's rows of the details panel's second page.
Definition item_shop.h:88
TextWindow * changes[8]
Definition item_shop.h:91
TextWindow * name
Definition item_shop.h:89
TextWindow * stats[2]
Definition item_shop.h:90
TextWindow * pageHint
Definition item_shop.h:105
TextWindow * equippedLabel
Definition item_shop.h:96
TextWindow * price
Definition item_shop.h:101
TextWindow * kind
the weapons'
Definition item_shop.h:103
TextWindow * owned
GAME.items.
Definition item_shop.h:99
TextWindow * priceLabel
Definition item_shop.h:100
TextWindow * name
Definition item_shop.h:95
TextWindow * desc
Definition item_shop.h:102
ShopInfoPartner partners[3]
Definition item_shop.h:104
TextWindow * ownedLabel
Definition item_shop.h:98
TextWindow * equipped
GAME.equippedItems.
Definition item_shop.h:97
The panel with the selected item's details (STITSHOP_createInfo)
Definition item_shop.h:67
s32 hasStats
Definition item_shop.h:77
void(* turnPage)(struct ShopInfo *info)
Definition item_shop.h:83
void(* showItem)(struct ShopInfo *info, s32 item, s32 quantity)
Definition item_shop.h:80
void(* close)(struct ShopInfo *info)
Definition item_shop.h:81
s32 partyCount
Definition item_shop.h:73
s32 selling
Definition item_shop.h:71
s32 quantity
Definition item_shop.h:76
void(* setKindVisible)(struct ShopInfo *info, s32 visible)
Definition item_shop.h:82
s32 page
0: the description, 1: the partners' stats
Definition item_shop.h:72
s32 item
Definition item_shop.h:75
s32 depth
Definition item_shop.h:70
PanelAnim panels[4]
Definition item_shop.h:79
s32 shown
Definition item_shop.h:78
s32 layer
Definition item_shop.h:69
void(* refreshPartner)(struct ShopInfo *info, s32 member)
Definition item_shop.h:84
ShopPartnerInfo partners[3]
Definition item_shop.h:74
TextWindow * slash
Definition item_shop.h:147
TextWindow * page
Definition item_shop.h:146
TextWindow * pages
Definition item_shop.h:148
TextWindow * items[14]
Definition item_shop.h:145
TextWindow * l1Label
Definition item_shop.h:149
TextWindow * r1Label
Definition item_shop.h:150
The list of the items to buy or sell (STITSHOP_createItemList)
Definition item_shop.h:116
void(* freezeCursor)(struct ShopItemList *list, s32 frozen)
Definition item_shop.h:139
s16 * shopItems
Definition item_shop.h:125
void(* close)(struct ShopItemList *list)
Definition item_shop.h:136
void(* refresh)(struct ShopItemList *list)
Definition item_shop.h:140
s16 items[0x194]
the bag's items that can be sold
Definition item_shop.h:123
void(* showCursor)(struct ShopItemList *list, s32 visible)
Definition item_shop.h:138
void(* start)(struct ShopItemList *list)
Definition item_shop.h:135
void(* listBag)(struct ShopItemList *list)
Definition item_shop.h:141
s32(* getSelected)(struct ShopItemList *list)
Definition item_shop.h:137
s32 clutRow
the arrows' blink
Definition item_shop.h:131
s32 type
the shop, or the item type to sell
Definition item_shop.h:122
ShopDialog * dialog
ShopBuy or ShopSell.
Definition item_shop.h:118
s32 selling
0: the shop's items, 1: the bag's
Definition item_shop.h:121
s16 bag[0x194]
Definition item_shop.h:124
PanelAnim panel
Definition item_shop.h:134
A shop: the items it sells.
Definition item_shop.h:218
s32 count
Definition item_shop.h:219
s16 * items
Definition item_shop.h:220
What the details panel shows of a partner.
Definition item_shop.h:49
s32 changes
how many of the stats would change
Definition item_shop.h:53
StatBlock current
Definition item_shop.h:50
s32 rows[8]
from 2: the stats that change (from 1)
Definition item_shop.h:54
StatBlock withItem
with the item equipped
Definition item_shop.h:51
TextWindow * message
Definition item_shop.h:214
Cursor * cursor
Definition item_shop.h:206
TextWindow * types[4]
Definition item_shop.h:207
ShopItemList * list
Definition item_shop.h:204
TextWindow * quantityLabel
Definition item_shop.h:208
ShopInfo * info
Definition item_shop.h:205
TextWindow * yes
Definition item_shop.h:212
TextWindow * quantity
Definition item_shop.h:210
TextWindow * times
Definition item_shop.h:209
TextWindow * no
Definition item_shop.h:213
TextWindow * total
Definition item_shop.h:211
The dialog to sell an item (STITSHOP_createSell)
Definition item_shop.h:187
struct ItemShop * shop
Definition item_shop.h:190
s32 depth
Definition item_shop.h:192
s32 layer
Definition item_shop.h:191
s32 choice
Definition item_shop.h:199
s32 quantity
Definition item_shop.h:195
s32 blinkTime
Definition item_shop.h:198
void(* showItem)(struct ShopSell *sell, s32 item, s32 quantity)
Definition item_shop.h:189
PanelAnim panels[5]
Definition item_shop.h:200
s32 blink
the quantity's arrows are shown
Definition item_shop.h:197
A row of the details panel's stats.
Definition item_shop.h:58
s32 skip2
-1: none
Definition item_shop.h:63
s32 compare
show the stat with the item equipped
Definition item_shop.h:61
s32 stat
into STITSHOP_stats
Definition item_shop.h:60
PartnerStats' stats[] and the status[] after them as one block, which computeStats and STITSHOP_compu...
Definition game_state.h:324
Any task, seen through its header.
Definition task.h:62
A text window (createTextWindow): up to six text buffers (0 is shown, 1-5 are "work" buffers that con...
Definition text.h:131
Definition gfx.h:352