Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
memory_card.h
Go to the documentation of this file.
1#ifndef STGMCARD_H
2#define STGMCARD_H
3
4/* STGMCARD.PRO: the memory card screen (MODE_CONTINUE). Its modules are in
5 src/menus/memory_card/, and the functions below are by module, in the order they
6 link. */
7
8#include "engine/game.h"
9
10/* The name of this overlay's copy of a function of src/shared/ */
11#define OVL_NAME(name) STGMCARD_##name
12
13/* The sprite archive of the screen */
14#if VERSION_US || VERSION_JP
15#define FILE_GMCARD_SPRITES 0x28F
16#define FILE_GMCARD_SHEET 0x28E /* the sprite sheet of its images */
17#elif VERSION_EU
18#define FILE_GMCARD_SPRITES 0x29E
19#define FILE_GMCARD_SHEET 0x29D
20#endif
21
22/* The root task of the overlay (STGMCARD_start) */
23typedef struct MemCardScene {
25 /* 0x50 */ s32 pad[2]; /* never read or written: createTask allocates 0x58 bytes */
27
28/* A mode (or stage) the screen can be opened from, and the area a save made
29 from it shows (STGMCARD_prevModes, which ends with a zero mode) */
30typedef struct MemCardModeEntry {
31 /* 0x0 */ u8 area; /* a string of TEXT_AREA_NAMES */
32 /* 0x1 */ u8 stage; /* a string of TEXT_STAGE_NAMES; nothing reads it */
33 /* 0x2 */ s16 mode;
35
36/* The main task of the screen (STGMCARD_createScreen) */
37typedef struct MemCardScreen {
39 /* 0x50 */ s32 loading; /* opened from the title screen: the game mode's
40 argument is not negative (saving: negative) */
41 /* 0x54 */ s32 layer;
42 /* 0x58 */ s32 bgScroll; /* the background's offset, 0 to 95 */
43 /* 0x5C */ s32 bgTick; /* it moves every other frame */
44 /* 0x60 */ s32 pad[2]; /* never read or written */
45 /* 0x68 */ s32 area; /* a string of TEXT_AREA_NAMES, from the previous mode */
46 /* 0x6C */ s32 place; /* a string of TEXT_SHOP_NAMES (STGMCARD_places) */
48
49struct MemCardMenu;
50struct MemCardPanel;
51struct MemCardInfo;
52struct MemCardSaves;
53
54/* The children of the main task */
55typedef struct MemCardScreenTasks {
56 /* 0x0 */ struct MemCardSaves *saves;
57 /* 0x4 */ ScreenFade *fade;
59
60/* The children of the save list */
61typedef struct MemCardSavesWindows {
62 /* 0x00 */ TextWindow *title; /* save or load */
63 /* 0x04 */ TextWindow *windows[5];
64 /* 0x18 */ Cursor *cursor;
65 /* 0x1C */ struct MemCardPanel *panel;
66 /* 0x20 */ struct MemCardMenu *menu;
67 /* 0x24 */ struct MemCardInfo *info;
69
70/* A save of the memory card, as the list shows it */
71typedef struct MemCardSave {
72 /* 0x00 */ u8 name[0x18]; /* empty for a free slot */
73 /* 0x18 */ s32 area; /* MemCardScreen's */
74 /* 0x1C */ s32 place;
75 /* 0x20 */ s32 money;
76 /* 0x24 */ PlayTime time;
77 /* 0x30 */ s32 partners[3]; /* 3 and up: a partner, whose animation the
78 details show */
79 /* 0x3C */ s16 levels[3];
81
82/* The memory card's info section: the three slots' saves, as the list shows
83 them (STGMCARD_funcs.infoBuf, and the list's copy) */
84typedef struct MemCardFile {
85 /* 0x00 */ u8 checksum; /* of the rest, from magic */
86 /* 0x01 */ u8 last; /* the slot last saved to */
87 /* 0x02 */ u8 version; /* MEMCARD_SAVE_VERSION */
88 /* 0x04 */ s32 magic; /* "DMW3" */
89 /* 0x08 */ MemCardSave saves[3];
91
92#define MEMCARD_FILE_MAGIC 0x33574D44
93
94/* A save's data section is GAME's first GAME_SAVE_SIZE bytes (SaveData).
95 GameState.checksum and .version hold the checksum of the rest, from byte
96 SAVE_CHECKED, and MEMCARD_SAVE_VERSION. */
97#if VERSION_US
98#define MEMCARD_SAVE_VERSION 3
99#elif VERSION_EU || VERSION_JP
100#define MEMCARD_SAVE_VERSION 4
101#endif
102#define SAVE_CHECKED 4
103
104/* The durations of the panels shown while loading and saving */
105#if VERSION_US
106#define MEMCARD_LOAD_FRAMES 1239
107#define MEMCARD_SAVE_FRAMES 1266
108#elif VERSION_EU || VERSION_JP
109#define MEMCARD_LOAD_FRAMES 1240
110#define MEMCARD_SAVE_FRAMES 1267
111#endif
112
113/* The saved part of the game state, to copy it whole */
114typedef struct GameSave {
115 /* 0x0000 */ s32 data[GAME_SAVE_SIZE / 4];
116} GameSave;
117
118/* GAME's saved part, which a load overwrites and a save copies: GameState
119 (game_state.h) has no GameSave view of itself */
120#define GAME_SAVE (*(GameSave *)&GAME)
121
122/* A save's data section (STGMCARD_funcs.dataBuf): copied whole to and from
123 GAME, read by its fields, and checksummed as bytes */
129
130/* MEMCARD followed by MEMCARD_FUNCS, as STGMCARD_runSaves reaches the functions:
131 through MEMCARD's address. */
132typedef struct MemCardSystem {
133 /* 0x000 */ MemCard card;
134 /* 0x328 */ MemCardFuncs funcs;
136
137#define MEMCARD_SYSTEM (*(MemCardSystem *)&MEMCARD)
138
139/* A text window of the details (STGMCARD_detailWindows) */
140typedef struct MemCardWindowSpec {
141 /* 0x00 */ s32 text; /* a string of text file 0x79 */
142 /* 0x04 */ s32 type;
143 /* 0x08 */ s32 x;
144 /* 0x0C */ s32 y;
145 /* 0x10 */ s32 isNumber; /* shows 0, right-aligned, for an empty slot */
147
148/* The saves of a memory card (STGMCARD_updateSaves) */
149typedef struct MemCardSaves {
151 /* 0x0050 */ MemCardScreen *screen;
152 /* 0x0054 */ s32 layer;
153 /* 0x0058 */ s32 origin[3]; /* x and y of the list's windows */
154 /* 0x0064 */ s32 port;
155 /* 0x0068 */ s32 result; /* of the last card operation, then the error
156 (STGMCARD_errorTexts) */
157 /* 0x006C */ MemCardFile file; /* the card's */
158 /* 0x0140 */ u8 pad[GAME_SAVE_SIZE]; /* never read or written */
159 /* 0x27FC */ s32 choice; /* of a yes/no question, 0 for yes; 0x2804 in the
160 European version, as all below */
161 /* 0x2800 */ MenuLerp slide[2]; /* the list's x and y offsets */
162 /* 0x2838 */ s32 prompting; /* a message waits for the cross button */
163 /* 0x283C */ s32 blinkTime;
164 /* 0x2840 */ s32 blinkFrame;
165 /* 0x2844 */ s32 choosing; /* the cursor's two choices are shown */
166 /* 0x2848 */ s32 backToPick; /* the message returns to the slot picker */
167 /* 0x284C */ void (*refresh)(struct MemCardSaves *saves);
168 /* 0x2850 */ void (*hide)(struct MemCardSaves *saves);
170
171/* The window with the selected save's details (STGMCARD_updateInfo) */
172typedef struct MemCardInfo {
174 /* 0x50 */ MemCardSaves *saves;
175 /* 0x54 */ s32 layer;
176 /* 0x58 */ s32 depth;
177 /* 0x5C */ s32 drawing; /* the partners and frame are drawn */
178 /* 0x60 */ s32 shown;
179 /* 0x64 */ s32 time;
180 /* 0x68 */ s32 frames[3]; /* of the three partners' animations */
181 /* 0x74 */ PanelAnim fade;
182 /* 0x84 */ void (*show)(struct MemCardInfo *info);
183 /* 0x88 */ void (*hide)(struct MemCardInfo *info);
184 /* 0x8C */ void (*refresh)(struct MemCardInfo *info);
186
187/* The slot picker (STGMCARD_updateMenu): the header with the port, the
188 three slots and their cursor, each sliding in and out with a lerp */
189typedef struct MemCardMenu {
191 /* 0x50 */ MemCardSaves *saves;
192 /* 0x54 */ s32 layer;
193 /* 0x58 */ s32 depth;
194 /* 0x5C */ MenuLerp lerps[4]; /* slots x, header y, cursor x, cursor move */
195 /* 0xCC */ s32 slid; /* the last slide done: 1 header in, 2 slots in,
196 3 slots out */
197 /* 0xD0 */ s32 blinkTime;
198 /* 0xD4 */ s32 blinkFrame;
199 /* 0xD8 */ s32 blinkDown; /* the frame counts down */
200 /* 0xDC */ void (*reset)(struct MemCardMenu *menu);
201 /* 0xE0 */ void (*slideInHeader)(struct MemCardMenu *menu);
202 /* 0xE4 */ void (*startPick)(struct MemCardMenu *menu, s32 slot);
203 /* 0xE8 */ void (*slideOutHeader)(struct MemCardMenu *menu);
204 /* 0xEC */ void (*slideInSlots)(struct MemCardMenu *menu);
205 /* 0xF0 */ void (*slideOutSlots)(struct MemCardMenu *menu);
207
208/* A gradient panel that opens by scaling (STGMCARD_updatePanel) */
209typedef struct MemCardPanel {
211 /* 0x50 */ s32 layer;
212 /* 0x54 */ s32 depth;
213 /* 0x58 */ s32 x;
214 /* 0x5C */ s32 y;
215 /* 0x60 */ s32 w;
216 /* 0x64 */ s32 h;
217 /* 0x68 */ s32 done;
218 /* 0x6C */ CVECTOR top;
219 /* 0x70 */ CVECTOR bottom;
220 /* 0x74 */ s32 duration;
221 /* 0x78 */ s32 rate; /* ONE / duration */
222 /* 0x7C */ s32 pad[2]; /* never read or written */
223 /* 0x84 */ s32 pivotX;
224 /* 0x88 */ s32 pivotY;
225 /* 0x8C */ VECTOR scale;
226 /* 0x9C */ SVECTOR rot;
227 /* 0xA4 */ MATRIX matrix;
228 /* 0xC4 */ void (*reset)(struct MemCardPanel *panel);
229 /* 0xC8 */ void (*start)(struct MemCardPanel *panel, s32 substate, s32 duration);
230 /* 0xCC */ void (*setTopColor)(struct MemCardPanel *panel, u8 r, u8 g, u8 b);
231 /* 0xD0 */ void (*setBottomColor)(struct MemCardPanel *panel, u8 r, u8 g, u8 b);
232 /* 0xD4 */ void (*setPos)(struct MemCardPanel *panel, s32 x, s32 y);
234
235/* A frame of the save's icon, a sector of the save file: 16x16 pixels of 4
236 bits, the left one of each byte in its low bits, that index the CLUT */
237typedef struct SaveIconFrame {
238 /* 0x00 */ u8 pixels[16][8];
240
241/* The save's icon for the memory card's directory */
242typedef struct SaveIcon {
243 /* 0x0 */ CardClut *clut;
244 /* 0x4 */ SaveIconFrame *frames[3];
245} SaveIcon;
246
247/* The overlay's buffers and helpers (STGMCARD_funcs) */
248typedef struct MemCardScreenFuncs {
249 /* 0x00 */ s32 lastSlot; /* the card's last saved one */
250 /* 0x04 */ s32 slot; /* the selected one */
251 /* 0x08 */ s32 prevSlot; /* where the cursor moves from */
252 /* 0x0C */ MemCardFile *infoBuf;
253 /* 0x10 */ SaveData *dataBuf; /* the saved part of the game state */
254 /* 0x14 */ s32 infoSize;
255 /* 0x18 */ s32 dataSize;
256 /* 0x1C */ void (*loadFiles)(void);
257 /* 0x20 */ s32 (*filesLoading)(void);
258 /* 0x24 */ void (*freeBuffers)(void);
259 /* 0x28 */ void (*startFade)(PanelAnim *fade, s32 fadeIn);
260 /* 0x2C */ s32 (*updateFade)(PanelAnim *fade);
261 /* 0x30 */ void (*startLerp)(MenuLerp *lerp, s32 from, s32 to, s32 frames);
262 /* 0x34 */ s32 (*updateLerp)(MenuLerp *lerp);
264
265/* scene.c */
267void STGMCARD_startFader(ScreenFade *task, s32 fadeIn, s32 duration);
271
272/* info.c */
278
279/* panel.c */
281void STGMCARD_startPanel(MemCardPanel *panel, s32 substate, s32 duration);
282void STGMCARD_setPanelTopColor(MemCardPanel *panel, u8 r, u8 g, u8 b);
283void STGMCARD_setPanelBottomColor(MemCardPanel *panel, u8 r, u8 g, u8 b);
284void STGMCARD_setPanelPos(MemCardPanel *panel, s32 x, s32 y);
287
288/* menu.c */
290void STGMCARD_startSlotPick(MemCardMenu *menu, s32 slot);
296void STGMCARD_updateMenu(MemCardMenu *menu, TextWindow **windows);
298
299/* saves.c */
309
310/* screen.c */
313void STGMCARD_loadFiles(void);
315void STGMCARD_freeBuffers(void);
316void STGMCARD_startFade(PanelAnim *fade, s32 fadeIn);
318void STGMCARD_startLerp(MenuLerp *lerp, s32 from, s32 to, s32 frames);
320
321/* STGMCARD's data (data/stgmcard.c) */
325extern s32 STGMCARD_partnerAnims[][7];
327extern s32 STGMCARD_slotIconX[];
328extern s32 STGMCARD_errorTexts[]; /* the texts of the errors, by result */
329extern s32 STGMCARD_places[];
331
332#endif /* STGMCARD_H */
signed int s32
Definition common.h:11
signed short s16
Definition common.h:9
unsigned char u8
Definition common.h:8
#define TASK_HEADER(Type)
Definition task.h:39
#define GAME_SAVE_SIZE
The saved part of the game state, GAME up to mode: a save's data section (stgmcard....
Definition game_state.h:591
void STGMCARD_slideInSlots(MemCardMenu *menu)
Slides the slot picker's three slots in from the right.
Definition menu.c:40
MemCardWindowSpec STGMCARD_detailWindows[]
the details' text windows: their text, type and place
Definition stgmcard.c:6
MemCardPanel * STGMCARD_createPanel(s32 x, s32 y, s32 w, s32 h)
Creates a gradient panel (task) at x, y, w by h, empty until started.
Definition panel.c:147
void STGMCARD_hideInfo(MemCardInfo *info)
Hides the details window's text and starts fading it out (info->hide)
Definition info.c:11
void STGMCARD_showInfo(MemCardInfo *info)
info.c
Definition info.c:6
MemCardScreenFuncs STGMCARD_funcs
STGMCARD's data (data/stgmcard.c)
Definition stgmcard.c:127
void STGMCARD_startFader(ScreenFade *task, s32 fadeIn, s32 duration)
void STGMCARD_refreshInfo(MemCardInfo *info)
Fills the details window with the selected save, or hides it.
Definition info.c:25
ScreenFade * STGMCARD_createFader(void)
void STGMCARD_updateSaves(MemCardSaves *saves, MemCardSavesWindows *win)
The save list's task: creates its windows, then runs it.
Definition saves.c:1028
void STGMCARD_setPanelBottomColor(MemCardPanel *panel, u8 r, u8 g, u8 b)
Sets the color of the panel's gradient at its bottom (panel->setBottomColor)
Definition panel.c:35
MemCardInfo * STGMCARD_createInfo(MemCardSaves *saves)
Creates the details window (task) of the save list.
Definition info.c:202
void STGMCARD_updatePanel(MemCardPanel *panel)
The panel's task: opens it by scaling it horizontally, then draws it as a gradient with a sprite.
Definition panel.c:50
void STGMCARD_startSlotPick(MemCardMenu *menu, s32 slot)
Selects slot, slides the slot picker's cursor into place and moves it to the slot; then the player pi...
Definition menu.c:20
void STGMCARD_freeBuffers(void)
Frees the buffers of a save and of the card's info section, when leaving the screen.
Definition screen.c:151
void STGMCARD_setPanelPos(MemCardPanel *panel, s32 x, s32 y)
Moves the panel (panel->setPos)
Definition panel.c:43
MemCardSaves * STGMCARD_createSaves(MemCardScreen *screen)
Creates the save list (task) of the main task.
Definition saves.c:1071
void STGMCARD_closeMenuForError(MemCardSaves *saves, MemCardSavesWindows *win)
Hides the message and panel and closes the slot picker, then shows the error in saves->result.
Definition saves.c:41
void STGMCARD_setPanelTopColor(MemCardPanel *panel, u8 r, u8 g, u8 b)
Sets the color of the panel's gradient at its top (panel->setTopColor)
Definition panel.c:27
void STGMCARD_resetMenu(MemCardMenu *menu)
Puts the slot picker back out of view, idle, with slot 0 selected.
Definition menu.c:52
void STGMCARD_slideOutSlots(MemCardMenu *menu)
Slides the slot picker's three slots out to the right.
Definition menu.c:46
SaveIcon STGMCARD_saveIcon
Definition stgmcard.c:196
void STGMCARD_hideSaves(MemCardSaves *saves)
Hides the save list's windows and ends it (TASK_DONE), which makes the main task fade out and leave t...
Definition saves.c:58
MemCardMenu * STGMCARD_createMenu(MemCardSaves *saves)
Creates the slot picker (task) of the save list.
Definition menu.c:187
void STGMCARD_runSaves(MemCardSaves *saves, MemCardSavesWindows *win)
The save list's states (saves->substate): picks the port, reads the card's info section,...
Definition saves.c:863
void STGMCARD_resetPanel(MemCardPanel *panel)
panel.c
Definition panel.c:6
void STGMCARD_startPanel(MemCardPanel *panel, s32 substate, s32 duration)
Starts the panel (panel->start): substate 1 opens it to 95% over duration frames while a card operati...
Definition panel.c:20
void STGMCARD_slideOutHeader(MemCardMenu *menu)
Slides the slot picker's header up out of view, then resets the picker.
Definition menu.c:28
s32 STGMCARD_updateLerp(MenuLerp *lerp)
void STGMCARD_showError(MemCardSaves *saves, MemCardSavesWindows *win)
Shows the error of the last card operation (saves->result, made an index of STGMCARD_errorTexts),...
Definition saves.c:18
void STGMCARD_startFade(PanelAnim *fade, s32 fadeIn)
void STGMCARD_updateInfo(MemCardInfo *info)
The details window's task: creates its text windows, fades it in and out, and draws the selected save...
Definition info.c:96
void STGMCARD_updateMenu(MemCardMenu *menu, TextWindow **windows)
The save picker's task: slides in and out, moves between the first three saves with left and right,...
Definition menu.c:66
MemCardModeEntry STGMCARD_prevModes[]
Definition stgmcard.c:64
void STGMCARD_updateFader(ScreenFade *task)
void STGMCARD_loadFiles(void)
Loads the screen's images, gives the memory card's save file its title and icon, allocates the buffer...
Definition screen.c:106
s32 STGMCARD_places[]
the place a save shows (a string of TEXT_SHOP_NAMES), by the low byte of the game mode: the save poin...
Definition stgmcard.c:55
void STGMCARD_drawSaves(MemCardSaves *saves)
Draws the save list's sprites: the blinking cross button while a message waits for it,...
Definition saves.c:1001
void STGMCARD_showPort(MemCardSaves *saves, MemCardSavesWindows *win, s32 show)
saves.c
Definition saves.c:7
void STGMCARD_moveSlotCursor(MemCardMenu *menu)
Slides the slot picker's cursor from the previous slot to the selected one.
Definition menu.c:34
void STGMCARD_refreshSaves(MemCardSaves *saves)
Fills the details window with the selected save again (saves->refresh)
Definition saves.c:50
void STGMCARD_drawFader(ScreenFade *task)
s32 STGMCARD_updateFade(PanelAnim *fade)
s32 STGMCARD_errorTexts[]
the texts of the errors, by result
Definition stgmcard.c:48
void STGMCARD_updateScene(MemCardScene *task, MemCardScreen **child)
scene.c
void STGMCARD_slideInHeader(MemCardMenu *menu)
menu.c
Definition menu.c:7
void STGMCARD_updateScreen(MemCardScreen *screen, MemCardScreenTasks *tasks)
screen.c
Definition screen.c:8
s32 STGMCARD_slotIconX[]
Definition stgmcard.c:45
void STGMCARD_startLerp(MenuLerp *lerp, s32 from, s32 to, s32 frames)
s32 STGMCARD_filesLoading(void)
Whether the screen's strings are still loading.
Definition screen.c:140
s32 STGMCARD_partnerIcons[]
the sprite of a save's first partner, by partner (from 3), and its x, by save
Definition stgmcard.c:41
MemCardScreen * STGMCARD_createScreen(void)
Creates the screen's main task, with what it needs from the mode it was opened from and the one it wa...
Definition screen.c:83
s32 STGMCARD_partnerAnims[][7]
the partners' sprites while they wait, by partner (from 3): -1 ends a loop
Definition stgmcard.c:29
Memory card save header (first CARD_SECTOR_SIZE bytes of a save)
Definition memcard.h:57
A menu cursor: a text window showing one of the CURSOR_FRAMES glyphs.
Definition text.h:19
The saved part of the game state, to copy it whole.
s32 data[0x26C4/4]
The game state (GAME): the first 0x26BC bytes are what newGame clears (the save data),...
Definition game_state.h:491
The memory card's info section: the three slots' saves, as the list shows them (STGMCARD_funcs....
Definition memory_card.h:84
u8 version
MEMCARD_SAVE_VERSION.
Definition memory_card.h:87
u8 checksum
of the rest, from magic
Definition memory_card.h:85
s32 magic
"DMW3"
Definition memory_card.h:88
MemCardSave saves[3]
Definition memory_card.h:89
u8 last
the slot last saved to
Definition memory_card.h:86
The memory card functions (MEMCARD_FUNCS); like MemCard's operations, the card ones return 0 while th...
Definition memcard.h:110
The window with the selected save's details (STGMCARD_updateInfo)
MemCardSaves * saves
s32 frames[3]
of the three partners' animations
void(* hide)(struct MemCardInfo *info)
void(* refresh)(struct MemCardInfo *info)
PanelAnim fade
s32 drawing
the partners and frame are drawn
void(* show)(struct MemCardInfo *info)
The slot picker (STGMCARD_updateMenu): the header with the port, the three slots and their cursor,...
s32 blinkDown
the frame counts down
s32 slid
the last slide done: 1 header in, 2 slots in, 3 slots out
void(* slideInSlots)(struct MemCardMenu *menu)
void(* slideInHeader)(struct MemCardMenu *menu)
void(* slideOutSlots)(struct MemCardMenu *menu)
MemCardSaves * saves
void(* reset)(struct MemCardMenu *menu)
MenuLerp lerps[4]
slots x, header y, cursor x, cursor move
void(* slideOutHeader)(struct MemCardMenu *menu)
void(* startPick)(struct MemCardMenu *menu, s32 slot)
A mode (or stage) the screen can be opened from, and the area a save made from it shows (STGMCARD_pre...
Definition memory_card.h:30
u8 area
a string of TEXT_AREA_NAMES
Definition memory_card.h:31
u8 stage
a string of TEXT_STAGE_NAMES; nothing reads it
Definition memory_card.h:32
A gradient panel that opens by scaling (STGMCARD_updatePanel)
void(* setPos)(struct MemCardPanel *panel, s32 x, s32 y)
void(* setBottomColor)(struct MemCardPanel *panel, u8 r, u8 g, u8 b)
void(* start)(struct MemCardPanel *panel, s32 substate, s32 duration)
s32 rate
ONE / duration.
void(* reset)(struct MemCardPanel *panel)
s32 pad[2]
never read or written
void(* setTopColor)(struct MemCardPanel *panel, u8 r, u8 g, u8 b)
CVECTOR bottom
A save of the memory card, as the list shows it.
Definition memory_card.h:71
u8 name[0x18]
empty for a free slot
Definition memory_card.h:72
s16 levels[3]
Definition memory_card.h:79
PlayTime time
Definition memory_card.h:76
s32 area
MemCardScreen's.
Definition memory_card.h:73
s32 partners[3]
3 and up: a partner, whose animation the details show
Definition memory_card.h:77
The children of the save list.
Definition memory_card.h:61
struct MemCardInfo * info
Definition memory_card.h:67
TextWindow * title
save or load
Definition memory_card.h:62
TextWindow * windows[5]
Definition memory_card.h:63
struct MemCardMenu * menu
Definition memory_card.h:66
struct MemCardPanel * panel
Definition memory_card.h:65
The saves of a memory card (STGMCARD_updateSaves)
s32 choice
of a yes/no question, 0 for yes; 0x2804 in the European version, as all below
u8 pad[0x26C4]
never read or written
void(* hide)(struct MemCardSaves *saves)
s32 choosing
the cursor's two choices are shown
s32 result
of the last card operation, then the error (STGMCARD_errorTexts)
s32 prompting
a message waits for the cross button
MemCardFile file
the card's
void(* refresh)(struct MemCardSaves *saves)
MenuLerp slide[2]
the list's x and y offsets
s32 origin[3]
x and y of the list's windows
MemCardScreen * screen
s32 backToPick
the message returns to the slot picker
The root task of the overlay (STGMCARD_start)
Definition memory_card.h:23
s32 pad[2]
never read or written: createTask allocates 0x58 bytes
Definition memory_card.h:25
The overlay's buffers and helpers (STGMCARD_funcs)
void(* startLerp)(MenuLerp *lerp, s32 from, s32 to, s32 frames)
SaveData * dataBuf
the saved part of the game state
s32(* filesLoading)(void)
s32(* updateFade)(PanelAnim *fade)
MemCardFile * infoBuf
s32 prevSlot
where the cursor moves from
s32 slot
the selected one
void(* freeBuffers)(void)
void(* startFade)(PanelAnim *fade, s32 fadeIn)
s32 lastSlot
the card's last saved one
void(* loadFiles)(void)
s32(* updateLerp)(MenuLerp *lerp)
The children of the main task.
Definition memory_card.h:55
ScreenFade * fade
Definition memory_card.h:57
struct MemCardSaves * saves
Definition memory_card.h:56
The main task of the screen (STGMCARD_createScreen)
Definition memory_card.h:37
s32 bgScroll
the background's offset, 0 to 95
Definition memory_card.h:42
s32 place
a string of TEXT_SHOP_NAMES (STGMCARD_places)
Definition memory_card.h:46
s32 bgTick
it moves every other frame
Definition memory_card.h:43
s32 area
a string of TEXT_AREA_NAMES, from the previous mode
Definition memory_card.h:45
s32 loading
opened from the title screen: the game mode's argument is not negative (saving: negative)
Definition memory_card.h:39
s32 pad[2]
never read or written
Definition memory_card.h:44
MEMCARD followed by MEMCARD_FUNCS, as STGMCARD_runSaves reaches the functions: through MEMCARD's addr...
MemCardFuncs funcs
A text window of the details (STGMCARD_detailWindows)
s32 text
a string of text file 0x79
s32 isNumber
shows 0, right-aligned, for an empty slot
Memory card access (MEMCARD), one step per call: every operation returns 0 while it runs,...
Definition memcard.h:86
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
GameState's play time, which a memory card save copies whole.
Definition game_state.h:330
A frame of the save's icon, a sector of the save file: 16x16 pixels of 4 bits, the left one of each b...
u8 pixels[16][8]
The save's icon for the memory card's directory.
CardClut * clut
SaveIconFrame * frames[3]
Fades the whole screen to black and back with a subtractive rectangle.
Definition gfx.h:361
A text window (createTextWindow): up to six text buffers (0 is shown, 1-5 are "work" buffers that con...
Definition text.h:131
A save's data section (STGMCARD_funcs.dataBuf): copied whole to and from GAME, read by its fields,...
u8 bytes[0x26C4]
GameSave save
GameState game