Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
saves.c File Reference

The save list: the saves on a memory card, loading and saving them, and the errors. More...

Include dependency graph for saves.c:

Go to the source code of this file.

Functions

void STGMCARD_showPort (MemCardSaves *saves, MemCardSavesWindows *win, s32 show)
 Shows the line with the memory card's port number, or hides it.
 
void STGMCARD_showError (MemCardSaves *saves, MemCardSavesWindows *win)
 Shows the error of the last card operation (saves->result, made an index of STGMCARD_errorTexts), hiding the choices, the cursor and the panel.
 
void STGMCARD_closeMenuForError (MemCardSaves *saves, MemCardSavesWindows *win)
 Hides the message and panel and closes the slot picker, then shows the error in saves->result.
 
void STGMCARD_refreshSaves (MemCardSaves *saves)
 Fills the details window with the selected save again (saves->refresh)
 
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 the screen (saves->hide)
 
static void STGMCARD_openSaves (MemCardSaves *saves, MemCardSavesWindows *win)
 Starts the save list: titles it for saving or loading and creates the details window.
 
static void STGMCARD_slideInTitle (MemCardSaves *saves, MemCardSavesWindows *win)
 Slides the title in, then asks which memory card port to use.
 
static void STGMCARD_pickPort (MemCardSaves *saves, MemCardSavesWindows *win)
 Moves the port cursor: cross starts checking the card in that port, triangle leaves the screen.
 
static void STGMCARD_acceptCard (MemCardSaves *saves, MemCardSavesWindows *win)
 Waits for the card in the port to answer: a ready card (1 or 4) has its files listed (11), any other answer ends the check (12)
 
static void STGMCARD_listCard (MemCardSaves *saves, MemCardSavesWindows *win)
 Lists the card's files, then ends the check (12)
 
static void STGMCARD_endCardCheck (MemCardSaves *saves, MemCardSavesWindows *win)
 Once the panel is done, goes on to read the info section (20) or shows the card's error.
 
static void STGMCARD_startInfoRead (MemCardSaves *saves, MemCardSavesWindows *win)
 Once the panel is done, shows the reading message and restarts the panel.
 
static void STGMCARD_readInfo (MemCardSaves *saves, MemCardSavesWindows *win)
 Reads the save file's info section (the slots' summaries)
 
static void STGMCARD_checkInfo (MemCardSaves *saves, MemCardSavesWindows *win)
 Once the panel is done, checks the info section read: one without the magic starts empty, a wrong checksum is error 9, else it is kept with its last slot; then opens the slot picker (30)
 
static void STGMCARD_openSlots (MemCardSaves *saves, MemCardSavesWindows *win)
 Hides the messages and shows the slot picker and the details window.
 
static void STGMCARD_showSlots (MemCardSaves *saves, MemCardSavesWindows *win)
 Slides the picker's header and slots in, then starts the pick at the last slot used.
 
static void STGMCARD_promptSlot (MemCardSaves *saves, MemCardSavesWindows *win)
 Once the picker waits, asks for the slot to save to or load from and shows its details.
 
static void STGMCARD_pickSlot (MemCardSaves *saves, MemCardSavesWindows *win)
 Waits for the slot: cross saves to it (asking first over a used one) or loads it, triangle closes the picker, and a card that fails its check shows its error.
 
static void STGMCARD_closeSlots (MemCardSaves *saves, MemCardSavesWindows *win)
 Slides the slots and header out, then goes on to saves->step.
 
static void STGMCARD_closeSlotsToLeave (MemCardSaves *saves, MemCardSavesWindows *win)
 Slides the slots and header out before leaving the screen (601)
 
static void STGMCARD_startLoad (MemCardSaves *saves, MemCardSavesWindows *win)
 Loads from the selected slot: an empty one only tells so and goes back to the pick (501), else shows the loading message and starts the panel.
 
static void STGMCARD_loadSave (MemCardSaves *saves, MemCardSavesWindows *win)
 Reads the selected slot's save into the game: a wrong checksum, or another save version while loading, is error 8, and a failed read shows its error.
 
static void STGMCARD_hideChoices (MemCardSavesWindows *win)
 Hides the two choices and their cursor.
 
static void STGMCARD_moveChoiceCursor (MemCardSaves *saves, MemCardSavesWindows *win)
 Moves the cursor between the two choices (saves->choice)
 
static void STGMCARD_answerOverwrite (MemCardSaves *saves, MemCardSavesWindows *win)
 Yes to saving over the slot saves the game there (50), no goes back to the pick.
 
static void STGMCARD_cancelOverwrite (MemCardSaves *saves, MemCardSavesWindows *win)
 Without cross on the question to save over the slot: triangle goes back to the pick, and a card that fails its check shows its error.
 
static void STGMCARD_startSave (MemCardSaves *saves, MemCardSavesWindows *win)
 Shows the saving message and starts the panel.
 
static void STGMCARD_fillSave (MemCardSaves *saves)
 Copies the game to the save buffer with its checksum, fills the slot's summary (name, place, money, play time and the party's levels and partners), and makes it the last slot.
 
static void STGMCARD_writeInfo (MemCardSaves *saves, MemCardSavesWindows *win)
 Writes the info section with the slot's new summary.
 
static void STGMCARD_writeSave (MemCardSaves *saves, MemCardSavesWindows *win)
 Saves the game to the selected slot's section, then ends the panel (500)
 
static void STGMCARD_showDone (MemCardSaves *saves, MemCardSavesWindows *win)
 Once the panel is done, tells that the game was saved (501) or loaded (502)
 
static void STGMCARD_confirmMessage (MemCardSaves *saves, MemCardSavesWindows *win)
 Waits for cross on the message (saved, or an empty slot to load): goes back to the pick, or after loading on to leaving (600); a card that fails its check shows error 1.
 
static void STGMCARD_waitLoadedMessage (MemCardSaves *saves, MemCardSavesWindows *win)
 Waits for cross on the loaded message, then waits for the card (400) and leaves the screen (600)
 
static void STGMCARD_askError (MemCardSaves *saves, MemCardSavesWindows *win)
 Shows the error STGMCARD_errorTexts[result] with the port: when saving, an unformatted card (4) asks to format it and a card without the save file (5) asks to create it, unless the card lacks the room for it (7); other errors wait for cross.
 
static void STGMCARD_answerError (MemCardSaves *saves, MemCardSavesWindows *win)
 Waits for the answer to the error: yes formats the card (110) or creates the save file (120), no or triangle goes back to the port pick, and a card that fails its check shows its error; other errors wait for cross.
 
static void STGMCARD_endWaitCard (MemCardSaves *saves, MemCardSavesWindows *win)
 Shows the error of a card that failed its check, then goes on to saves->step.
 
static void STGMCARD_formatCard (MemCardSaves *saves, MemCardSavesWindows *win)
 Formats the card, then ends the panel (111)
 
static void STGMCARD_endFormat (MemCardSaves *saves, MemCardSavesWindows *win)
 Once the panel is done, asks to create the save file (error 5)
 
static void STGMCARD_createFile (MemCardSaves *saves, MemCardSavesWindows *win)
 Creates the save file on the card.
 
static void STGMCARD_writeHeader (MemCardSaves *saves, MemCardSavesWindows *win)
 Writes the new save file's header; a wrong icon count is error 3.
 
static void STGMCARD_writeIcons (MemCardSaves *saves, MemCardSavesWindows *win)
 Writes the new save file's icon frames, one per call, then makes its empty info section.
 
static void STGMCARD_writeNewInfo (MemCardSaves *saves, MemCardSavesWindows *win)
 Writes the new save file's info section, then ends the panel (125)
 
static void STGMCARD_endCreate (MemCardSaves *saves, MemCardSavesWindows *win)
 Once the panel is done, opens the slot picker (30) or shows the error.
 
void STGMCARD_runSaves (MemCardSaves *saves, MemCardSavesWindows *win)
 The save list's states (saves->substate): picks the port, reads the card's info section, lets the menu pick a slot, then loads or saves it.
 
void STGMCARD_drawSaves (MemCardSaves *saves)
 Draws the save list's sprites: the blinking cross button while a message waits for it, the list's frame and the box of the cursor's two choices.
 
void STGMCARD_updateSaves (MemCardSaves *saves, MemCardSavesWindows *win)
 The save list's task: creates its windows, then runs it.
 
MemCardSaves * STGMCARD_createSaves (MemCardScreen *screen)
 Creates the save list (task) of the main task.
 

Detailed Description

The save list: the saves on a memory card, loading and saving them, and the errors.

Definition in file saves.c.

Function Documentation

◆ STGMCARD_showPort()

void STGMCARD_showPort ( MemCardSaves *  saves,
MemCardSavesWindows *  win,
s32  show 
)

Shows the line with the memory card's port number, or hides it.

saves.c

< MEMCRD

Definition at line 7 of file saves.c.

Referenced by STGMCARD_answerError(), STGMCARD_askError(), STGMCARD_pickPort(), and STGMCARD_startInfoRead().

Here is the caller graph for this function:

◆ STGMCARD_showError()

void STGMCARD_showError ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)

Shows the error of the last card operation (saves->result, made an index of STGMCARD_errorTexts), hiding the choices, the cursor and the panel.

Definition at line 18 of file saves.c.

Referenced by STGMCARD_answerError(), STGMCARD_checkInfo(), STGMCARD_createFile(), STGMCARD_endCardCheck(), STGMCARD_endCreate(), STGMCARD_endFormat(), STGMCARD_endWaitCard(), STGMCARD_formatCard(), STGMCARD_writeHeader(), and STGMCARD_writeIcons().

Here is the caller graph for this function:

◆ STGMCARD_closeMenuForError()

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 at line 41 of file saves.c.

Referenced by STGMCARD_cancelOverwrite(), STGMCARD_confirmMessage(), STGMCARD_loadSave(), STGMCARD_pickSlot(), STGMCARD_writeInfo(), and STGMCARD_writeSave().

Here is the caller graph for this function:

◆ STGMCARD_refreshSaves()

void STGMCARD_refreshSaves ( MemCardSaves *  saves)

Fills the details window with the selected save again (saves->refresh)

Definition at line 50 of file saves.c.

Referenced by STGMCARD_createSaves().

Here is the caller graph for this function:

◆ STGMCARD_hideSaves()

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 the screen (saves->hide)

Definition at line 58 of file saves.c.

Referenced by STGMCARD_createSaves().

Here is the caller graph for this function:

◆ STGMCARD_openSaves()

static void STGMCARD_openSaves ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Starts the save list: titles it for saving or loading and creates the details window.

< MEMCRD

< MEMCRD

Definition at line 87 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STGMCARD_slideInTitle()

static void STGMCARD_slideInTitle ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Slides the title in, then asks which memory card port to use.

< MEMCRD

< MEMCRD

< MEMCRD

< MEMCRD

< MEMCRD

Definition at line 101 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the caller graph for this function:

◆ STGMCARD_pickPort()

static void STGMCARD_pickPort ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Moves the port cursor: cross starts checking the card in that port, triangle leaves the screen.

< SYSTEM02: a cursor moves

< MEMCRD

< SYSTEM00: a choice is taken

< SYSTEM01

Definition at line 125 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STGMCARD_acceptCard()

static void STGMCARD_acceptCard ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Waits for the card in the port to answer: a ready card (1 or 4) has its files listed (11), any other answer ends the check (12)

Definition at line 163 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the caller graph for this function:

◆ STGMCARD_listCard()

static void STGMCARD_listCard ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Lists the card's files, then ends the check (12)

Definition at line 181 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the caller graph for this function:

◆ STGMCARD_endCardCheck()

static void STGMCARD_endCardCheck ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Once the panel is done, goes on to read the info section (20) or shows the card's error.

Definition at line 193 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STGMCARD_startInfoRead()

static void STGMCARD_startInfoRead ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Once the panel is done, shows the reading message and restarts the panel.

< MEMCRD

Definition at line 204 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STGMCARD_readInfo()

static void STGMCARD_readInfo ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Reads the save file's info section (the slots' summaries)

Definition at line 215 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the caller graph for this function:

◆ STGMCARD_checkInfo()

static void STGMCARD_checkInfo ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Once the panel is done, checks the info section read: one without the magic starts empty, a wrong checksum is error 9, else it is kept with its last slot; then opens the slot picker (30)

Definition at line 228 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STGMCARD_openSlots()

static void STGMCARD_openSlots ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Hides the messages and shows the slot picker and the details window.

Definition at line 254 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the caller graph for this function:

◆ STGMCARD_showSlots()

static void STGMCARD_showSlots ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Slides the picker's header and slots in, then starts the pick at the last slot used.

Definition at line 268 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the caller graph for this function:

◆ STGMCARD_promptSlot()

static void STGMCARD_promptSlot ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Once the picker waits, asks for the slot to save to or load from and shows its details.

< MEMCRD

< MEMCRD

Definition at line 283 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the caller graph for this function:

◆ STGMCARD_pickSlot()

static void STGMCARD_pickSlot ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Waits for the slot: cross saves to it (asking first over a used one) or loads it, triangle closes the picker, and a card that fails its check shows its error.

< SYSTEM07

< MEMCRD

< MEMCRD

< MEMCRD

< SYSTEM01

Definition at line 301 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STGMCARD_closeSlots()

static void STGMCARD_closeSlots ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Slides the slots and header out, then goes on to saves->step.

Definition at line 343 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the caller graph for this function:

◆ STGMCARD_closeSlotsToLeave()

static void STGMCARD_closeSlotsToLeave ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Slides the slots and header out before leaving the screen (601)

Definition at line 361 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the caller graph for this function:

◆ STGMCARD_startLoad()

static void STGMCARD_startLoad ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Loads from the selected slot: an empty one only tells so and goes back to the pick (501), else shows the loading message and starts the panel.

< MEMCRD

< MEMCRD

Definition at line 375 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the caller graph for this function:

◆ STGMCARD_loadSave()

static void STGMCARD_loadSave ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Reads the selected slot's save into the game: a wrong checksum, or another save version while loading, is error 8, and a failed read shows its error.

Definition at line 391 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STGMCARD_hideChoices()

static void STGMCARD_hideChoices ( MemCardSavesWindows *  win)
inlinestatic

Hides the two choices and their cursor.

Definition at line 419 of file saves.c.

Referenced by STGMCARD_cancelOverwrite(), and STGMCARD_runSaves().

Here is the caller graph for this function:

◆ STGMCARD_moveChoiceCursor()

static void STGMCARD_moveChoiceCursor ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Moves the cursor between the two choices (saves->choice)

< SYSTEM02: a cursor moves

Definition at line 426 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the caller graph for this function:

◆ STGMCARD_answerOverwrite()

static void STGMCARD_answerOverwrite ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Yes to saving over the slot saves the game there (50), no goes back to the pick.

Definition at line 442 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the caller graph for this function:

◆ STGMCARD_cancelOverwrite()

static void STGMCARD_cancelOverwrite ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Without cross on the question to save over the slot: triangle goes back to the pick, and a card that fails its check shows its error.

< SYSTEM01

Definition at line 453 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STGMCARD_startSave()

static void STGMCARD_startSave ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Shows the saving message and starts the panel.

< MEMCRD

Definition at line 477 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the caller graph for this function:

◆ STGMCARD_fillSave()

static void STGMCARD_fillSave ( MemCardSaves *  saves)
inlinestatic

Copies the game to the save buffer with its checksum, fills the slot's summary (name, place, money, play time and the party's levels and partners), and makes it the last slot.

Definition at line 486 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STGMCARD_writeInfo()

static void STGMCARD_writeInfo ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Writes the info section with the slot's new summary.

Definition at line 512 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STGMCARD_writeSave()

static void STGMCARD_writeSave ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Saves the game to the selected slot's section, then ends the panel (500)

Definition at line 527 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STGMCARD_showDone()

static void STGMCARD_showDone ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Once the panel is done, tells that the game was saved (501) or loaded (502)

< MEMCRD

< MEMCRD

Definition at line 543 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the caller graph for this function:

◆ STGMCARD_confirmMessage()

static void STGMCARD_confirmMessage ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Waits for cross on the message (saved, or an empty slot to load): goes back to the pick, or after loading on to leaving (600); a card that fails its check shows error 1.

< SYSTEM07

Definition at line 564 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STGMCARD_waitLoadedMessage()

static void STGMCARD_waitLoadedMessage ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Waits for cross on the loaded message, then waits for the card (400) and leaves the screen (600)

< SYSTEM07

Definition at line 597 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the caller graph for this function:

◆ STGMCARD_askError()

static void STGMCARD_askError ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Shows the error STGMCARD_errorTexts[result] with the port: when saving, an unformatted card (4) asks to format it and a card without the save file (5) asks to create it, unless the card lacks the room for it (7); other errors wait for cross.

< MEMCRD

< McErrFileNotExist: "File cannot be found"

< McErrBlockFull: "There are not enough blocks"

< McErrBlockFull: "There are not enough blocks"

< MEMCRD

< MEMCRD

< MEMCRD

< MEMCRD

Definition at line 612 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STGMCARD_answerError()

static void STGMCARD_answerError ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Waits for the answer to the error: yes formats the card (110) or creates the save file (120), no or triangle goes back to the port pick, and a card that fails its check shows its error; other errors wait for cross.

< McErrFileNotExist: "File cannot be found"

< SYSTEM02: a cursor moves

< SYSTEM00: a choice is taken

< MEMCRD

< MEMCRD

< SYSTEM01

< SYSTEM07

Definition at line 664 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STGMCARD_endWaitCard()

static void STGMCARD_endWaitCard ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Shows the error of a card that failed its check, then goes on to saves->step.

Definition at line 738 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STGMCARD_formatCard()

static void STGMCARD_formatCard ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Formats the card, then ends the panel (111)

Definition at line 748 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STGMCARD_endFormat()

static void STGMCARD_endFormat ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Once the panel is done, asks to create the save file (error 5)

Definition at line 763 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STGMCARD_createFile()

static void STGMCARD_createFile ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Creates the save file on the card.

Definition at line 771 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STGMCARD_writeHeader()

static void STGMCARD_writeHeader ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Writes the new save file's header; a wrong icon count is error 3.

Definition at line 785 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STGMCARD_writeIcons()

static void STGMCARD_writeIcons ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Writes the new save file's icon frames, one per call, then makes its empty info section.

Definition at line 807 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STGMCARD_writeNewInfo()

static void STGMCARD_writeNewInfo ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Writes the new save file's info section, then ends the panel (125)

Definition at line 833 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the caller graph for this function:

◆ STGMCARD_endCreate()

static void STGMCARD_endCreate ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)
inlinestatic

Once the panel is done, opens the slot picker (30) or shows the error.

Definition at line 844 of file saves.c.

Referenced by STGMCARD_runSaves().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STGMCARD_runSaves()

void STGMCARD_runSaves ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)

The save list's states (saves->substate): picks the port, reads the card's info section, lets the menu pick a slot, then loads or saves it.

A failed operation leaves its error in saves->result and goes to 100, which shows STGMCARD_errorTexts[result] and can format the card (110) or create the save file (120). 400 waits for the card and goes on to step. Match depends on status, which 40 and 400 share.

< SYSTEM00: a choice is taken

Definition at line 863 of file saves.c.

Referenced by STGMCARD_updateSaves().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STGMCARD_drawSaves()

void STGMCARD_drawSaves ( MemCardSaves *  saves)

Draws the save list's sprites: the blinking cross button while a message waits for it, the list's frame and the box of the cursor's two choices.

Definition at line 1001 of file saves.c.

Referenced by STGMCARD_updateSaves().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STGMCARD_updateSaves()

void STGMCARD_updateSaves ( MemCardSaves *  saves,
MemCardSavesWindows *  win 
)

The save list's task: creates its windows, then runs it.

Definition at line 1028 of file saves.c.

Referenced by STGMCARD_createSaves().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STGMCARD_createSaves()

MemCardSaves * STGMCARD_createSaves ( MemCardScreen *  screen)

Creates the save list (task) of the main task.

Definition at line 1071 of file saves.c.

Referenced by STGMCARD_updateScreen().

Here is the call graph for this function:
Here is the caller graph for this function: