99 if (choice != shop->
choice) {
128 if (shop->
step == 0) {
143 if (shop->
step != 0) {
172 switch (shop->
state) {
GameState GAME
The save data, the game mode and the methods.
#define TASK_INIT
Tasks: every game object is a task, a heap block that starts with this header and is updated once per...
Cursor * createCursor(s16 layerId, s32 depth, s16 x, s16 y)
A menu cursor on a layer at (x, y)
#define TEXT_ITEM_INFO
ITMINF.
#define TEXT_ITEM_SHOP
ITSHOP: STITSHOP's.
#define TEXT_ITEM_NAMES
ITMNAM.
#define TEXT_SHOP_NAMES
SHPNAM.
FileCache FILE_CACHE
The file cache.
#define STRETCH_SPRITE(sprite, level, x, y)
#define SCREEN_LAYER
The layer over the whole screen that most modes create first and draw their menus on (FIELDSTG and ST...
STITSHOP.PRO: the item shop.
#define FILE_SHOP_SPRITES
The shop's sprite sheet; the next file is its texture archive.
ScreenFade * STITSHOP_createFader(void)
#define PAD_PRESSED(button)
One button of pad 1: newly pressed, auto-repeated while held, or held.
SoundState SOUND
rsin and rcos (libgte) read rsin_tbl[a - 0x800] and the like: their addresses before the table fall i...
#define SOUND_SELECT
Sounds the overlays share, with SOUNDTST's names.
#define SOUND_MENU_CANCEL
SYSTEM01.
#define SOUND_CURSOR
SYSTEM02: a cursor moves.
void initSpriteDrawer(SpriteDrawer *obj)
Clears a sprite drawer to neutral (no scale, gray tint, follows the scroll), gives it its methods and...
ItemShopFuncs STITSHOP_funcs
The shop's helpers.
s32 STITSHOP_shopNames[]
The shops' names, by ItemShop.shop.
void(* setPos)()
(cursor, x, y)
void(* setVisible)()
(cursor, visible)
s32(* isLoading)(s32 file)
void(* request)(s32 file)
void *(* getEntry)(u32 fileAndIndex)
void(* requestMode)(s32 mode, s32 arg)
s32 fieldMode
where the menu returns to
s32(* updateFade)(PanelAnim *fade)
void(* startFade)(PanelAnim *fade, s32 fadeIn)
s32(* filesLoading)(void)
The children of the shop.
Task * dialog
ShopBuy or ShopSell.
TextWindow * title
the shop's name
The main task of the shop (STITSHOP_createShop)
s32 shop
the game mode's argument
void(* showMoney)(struct ItemShop *shop)
void(* nextState)(struct ItemShop *task)
void(* setSubstate)(struct ItemShop *task, s32 substate)
void(* start)(struct ScreenFade *fade, s32 fadeIn, s32 frames)
TASK_DONE when done.
short(* playSound)(s32 id)
returns the voice of a key-on
Draws sprites from a sprite sheet (such as file 0x277, the menu graphics): a sheet has a table of fra...
void(* setScale)()
(x, y, z), ONE = 1.0
void(* setLayerId)()
(id, depth)
void(* draw)()
(sheet, frame, x, y)
void(* setTexture)()
(x, y)
Any task, seen through its header.
void(* setRightAlign)()
no prototype: callers would truncate u8 args
void(* setVisible)(struct TextWindow *obj, u8 arg)
Uploads TIM images to VRAM (initTimLoader); acts on TIM_LOADER.
void(* setImagePos)()
(x, y)
void(* loadArchive)()
(archive): each image 64 halfwords to the right
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find
TextWindow * createTextWindow(s16 layerId, s16 style, s16 x, s16 y)
A text window on a layer, in a font style, at (x, y)
void initTimLoader(TimLoader *obj)
Clears a TIM loader, gives it its methods and binds it.
ShopSell * STITSHOP_createSell(ItemShop *shop)
Creates the selling dialog (task), when sell is chosen in the shop.
ShopBuy * STITSHOP_createBuy(ItemShop *shop)
Creates the buying dialog (task), when buy is chosen in the shop.