Skip to Content
The Alchemy Project

src/window/screens_save.c

Saving, loading, copying and erasing the three save files, and the file list the player picks one from: for the file under the cursor, its summary, its party and its Djinn, in that file's own window colours. More…

Included by screens.c.

Macros

NameDescription
#defineBUP_PART_BYTES 4096A file's half in bytes: the first is written to the file's own part, the second to the part BUP_FILE_COUNT on.
#defineSAVE_NO_FREE_FILE 999mnSaveFindFreeFile's result when all three files are in use.
#defineSAVE_ERROR_READ -2What the save functions return when they fail, after showing the message.
#defineSAVE_ERROR_WRITE
#defineSAVE_ERROR_ERASE -4erasing failed: "Failed to erase."
#defineSAVE_ERROR_NO_FILE -5no empty file to copy into: "Failed to erase."
#defineSAVE_ERROR_NO_MEMORY
#defineFILE_LIST_NO_FILE -2mnFileListSelectFile's result when no file can be chosen in its mode.
#definePLAY_TIME_HOURS_MAX 999The play time shown stops at PLAY_TIME_HOURS_MAX hours and 59 minutes.
#defineMINUTES_PER_HOUR 60
#defineSECONDS_PER_MINUTE 60
#defineWITH_LEADING_ZERO (n) ((n) + 100)A two-digit field for mnStringFormatNumber: with 100 added, its last two digits keep their leading zero.
#defineSCENE_LOCAL_STATE_WORDS 30The words of SceneLocalState (system/ewram.s), which InventorySnapshotWork follows.
#defineBUP_CHECKSUM_WORDS 968The words from GameFlagBytes that a file's checksum sums.
#defineFILE_LIST_GLOW_RED 22The file list's glow: the middle colour that HIGHLIGHT_PALETTE's colours 8 to 11 sway round, red twice as far as green and blue.
#defineFILE_LIST_GLOW_GREEN 16
#defineFILE_LIST_GLOW_BLUE 20
#defineFILE_LIST_BAR_TILE 6The window tile the file list's highlight bar is made of, drawn in HIGHLIGHT_PALETTE.
#defineFILE_LIST_SPRITE_SPACING 3The file list shows the chosen file's party as standing sprites in a row, and four Djinn sprites, one for each element, over the file's Djinn counts: both rows three tiles apart.
#defineSUMMARY_LEVEL_X BY_LANGUAGE(72, 72, 72, 64, 59, 72)Where each edition draws the "Lv" label and the coin label, in pixels.
#defineSUMMARY_COINS_X BY_LANGUAGE(48, 48, 48, 56, 56, 48)
#defineSUMMARY_DRAW_LEVEL

Functions

NameDescription
void *mnStringFormatPlayTime (Sint32 ticks, Uint8 *out)Writes the play time ticks (at 60 ticks a second) into out as hours and minutes, "hhh:mm" with the hours right-aligned in three characters, and returns out.
Uint32mnSaveFindFreeFile (void)Returns the first save file whose summary shows it empty (level 0), or SAVE_NO_FREE_FILE when all three are in use.
Sint32mnSaveCountFilesExcludingSent (Sint32 excludeSent)Returns how many save files there are, leaving out those whose summary has its send flag set (the files saved at the end of the game) when excludeSent is nonzero, or SAVE_ERROR_NO_MEMORY when the backup memory cannot be read.
Sint32mnSaveScanFileSummaries (void)Loads the save file summaries for the File Screen and returns how many files there are: plus SAVE_SCAN_ALL_CLEARED when every file is cleared (its send flag set), or SAVE_ERROR_NO_MEMORY when the backup memory cannot be read.
Uint32mnSaveBuildFileSummary (void)Prepares the save buffer for writing: stamps the main routine's state with the time and options, then fills the file summary shown on the file menus (the leader's name, level and class, the play time, area, coins, Djinn of each element, the party, the send flag and how many Djinn have been found) and its checksum, the sum of BUP_CHECKSUM_WORDS words from GameFlagBytes on.
Sint16mnSaveWriteCurrentFile (void)Saves the game to the current file (BupSlot): builds the summary and writes both halves of the save buffer, as parts BupSlot and BupSlot + BUP_FILE_COUNT.
Sint32mnSaveWriteFile (Sint32 file)Writes both halves of the save buffer, as they are, to save file file.
Sint32mnSaveWriteLinkTallies (void)Saves the Battle Arena's results, under "Saving battle results." or "Saving Monster Battle results.": writes the 16 bytes at BattleArenaSaveStamp, which lie in the first half of the save buffer, into the current file's first part, and leaves the rest of the file as it was saved.
Sint32mnSaveConfirmAndWriteLinkTallies (void)Asks whether to save over the current file and, on Yes, writes the Battle Arena's results into it (mnSaveWriteLinkTallies) and says "Your game was saved."
Sint32mnSaveCopyFile (void)The file list's Copy (scene/file_screen.c): lets the player choose a file, reads both of its parts into the save buffer, overwriting it, and writes them to the first empty file.
Sint32mnSaveEraseSelectedFile (void)The file list's Erase (scene/file_screen.c): lets the player choose a file, asks whether to erase it and on Yes deletes both of its parts.
voidmnFileListUpdateGlow (void)An event that makes colours 8 to 11 of HIGHLIGHT_PALETTE glow: each follows a sine wave of the frame count, eight frames behind the one before.
voidmnFileListStartGlow (void)Starts the palette glow (mnFileListUpdateGlow) as an event.
voidmnFileListStopGlow (void)Stops the file list's glow (mnFileListUpdateGlow).
voidmnWindowFillTilemapRect ( WINDOW *window, Sint32 x, Sint32 y, Sint32 width, Sint32 height)Fills the width x height tile rectangle at (x, y) inside window, clipped to the screen as mnWindowSetInteriorPaletteBit clips, with the highlight bar's tile in HIGHLIGHT_PALETTE, the palette mnFileListUpdateGlow makes glow.
voidmnFileListShowPartySprites (WINDOW *window, Sint32 x, Sint32 y, BUP_FILE_SUMMARY *summary)Shows the party of save file summary (up to four party members) as sprites in a row from tile (x, y) inside window, and starts placing them every tick (mnFileListPlacePartySprites).
voidmnFileListHidePartySprites (void)Stops placing the party sprites of the file list and releases them.
voidmnFileListPlacePartySprites (void)An event: draws each party sprite of the file list at its place and scale for this tick.
voidmnFileListShowDjinnSprites (WINDOW *window, Sint32 x, Sint32 y)Shows the four Djinn sprites, one for each element, in a row from tile (x, y) inside window, and starts placing them every tick (mnFileListPlaceDjinnSprites).
voidmnFileListHideDjinnSprites (void)Stops placing the Djinn sprites of the file list and releases them.
voidmnFileListPlaceDjinnSprites (void)An event: draws each Djinn sprite of the file list at its place, at scale 1.0, for this tick.
voidmnFileListDrawDjinnCounts (WINDOW *window, BUP_FILE_SUMMARY *summary)Draws the Djinn counts of save file summary, one for each element, two digits each, 24 pixels apart on row 16 of window, under the Djinn sprites.
voidmnFileListDrawSummary (WINDOW *window, BUP_FILE_SUMMARY *summary)Draws the summary of save file summary into window: the leader's name, level and class, the play time and the coins.
Sint32mnFileListSelectFile (Sint32 selectedFile, Sint32 menuMode)The file list: lists the three files with each one's leader and area (or why it cannot be chosen) and, for the file under the cursor, its summary, its party and its Djinn, with the file's own palette glow.
Sint32mnSaveToChosenFile (void)The Save command: lets the player choose a file (the current one first), asks whether to save over it when it has data, then saves the game to it, ActorsWork included, and makes it the current file.
Sint32mnSaveChooseAndLoadFile (Sint32 mode)Lets the player choose a file in file list mode (see FILE_LIST_MODE) and loads it into the save buffer as the current file, restoring its play time and options.
Sint32mnPointingHandLoadIntoFreeSlot (void)Loads the pointing hand cursor's tiles (PointingHandTiles, 128 bytes) into a free VRAM slot and returns the slot, which the caller frees with syVRAMCacheFreeEntry.

Description

Saving, loading, copying and erasing the three save files, and the file list the player picks one from: for the file under the cursor, its summary, its party and its Djinn, in that file's own window colours. Part of screens.c.

Macros in detail

BUP_PART_BYTES

#define BUP_PART_BYTES 4096

A file's half in bytes: the first is written to the file's own part, the second to the part BUP_FILE_COUNT on.

Referenced by mnSaveChooseAndLoadFile(), mnSaveCopyFile(), mnSaveToChosenFile(), mnSaveWriteCurrentFile(), mnSaveWriteFile() and mnSaveWriteLinkTallies().

Definition at line 7 of file screens_save.c.

SAVE_NO_FREE_FILE

#define SAVE_NO_FREE_FILE 999

mnSaveFindFreeFile's result when all three files are in use.

Referenced by mnSaveCopyFile() and mnSaveFindFreeFile().

Definition at line 9 of file screens_save.c.

SAVE_ERROR_READ

#define SAVE_ERROR_READ -2

What the save functions return when they fail, after showing the message.

a part could not be read

Referenced by mnSaveChooseAndLoadFile(), mnSaveCopyFile() and mnSaveWriteLinkTallies().

Definition at line 12 of file screens_save.c.

SAVE_ERROR_WRITE

#define SAVE_ERROR_WRITE

Referenced by mnSaveCopyFile(), mnSaveToChosenFile(), mnSaveWriteCurrentFile(), mnSaveWriteFile() and mnSaveWriteLinkTallies().

Definition at line 13 of file screens_save.c.

SAVE_ERROR_ERASE

#define SAVE_ERROR_ERASE -4

erasing failed: "Failed to erase."

Referenced by mnSaveEraseSelectedFile().

Definition at line 16 of file screens_save.c.

SAVE_ERROR_NO_FILE

#define SAVE_ERROR_NO_FILE -5

no empty file to copy into: "Failed to erase."

Referenced by mnSaveCopyFile().

Definition at line 17 of file screens_save.c.

SAVE_ERROR_NO_MEMORY

#define SAVE_ERROR_NO_MEMORY

Referenced by mnSaveChooseAndLoadFile(), mnSaveCopyFile(), mnSaveCountFilesExcludingSent(), mnSaveEraseSelectedFile(), mnSaveScanFileSummaries(), mnSaveToChosenFile(), mnSaveWriteCurrentFile(), mnSaveWriteFile() and mnSaveWriteLinkTallies().

Definition at line 18 of file screens_save.c.

FILE_LIST_NO_FILE

#define FILE_LIST_NO_FILE -2

mnFileListSelectFile's result when no file can be chosen in its mode.

Referenced by mnFileListSelectFile().

Definition at line 23 of file screens_save.c.

PLAY_TIME_HOURS_MAX

#define PLAY_TIME_HOURS_MAX 999

The play time shown stops at PLAY_TIME_HOURS_MAX hours and 59 minutes.

Referenced by mnStringFormatPlayTime().

Definition at line 26 of file screens_save.c.

MINUTES_PER_HOUR

#define MINUTES_PER_HOUR 60

Referenced by mnStringFormatPlayTime().

Definition at line 27 of file screens_save.c.

SECONDS_PER_MINUTE

#define SECONDS_PER_MINUTE 60

Referenced by mnStringFormatPlayTime().

Definition at line 28 of file screens_save.c.

WITH_LEADING_ZERO

#define WITH_LEADING_ZERO(n) ((n) + 100)

A two-digit field for mnStringFormatNumber: with 100 added, its last two digits keep their leading zero.

Referenced by mnStringFormatPlayTime().

Definition at line 32 of file screens_save.c.

SCENE_LOCAL_STATE_WORDS

#define SCENE_LOCAL_STATE_WORDS 30

The words of SceneLocalState (system/ewram.s), which InventorySnapshotWork follows.

Referenced by mnSaveBuildFileSummary().

Definition at line 36 of file screens_save.c.

BUP_CHECKSUM_WORDS

#define BUP_CHECKSUM_WORDS 968

The words from GameFlagBytes that a file's checksum sums.

Referenced by mnSaveBuildFileSummary().

Definition at line 38 of file screens_save.c.

FILE_LIST_GLOW_RED

#define FILE_LIST_GLOW_RED 22

The file list's glow: the middle colour that HIGHLIGHT_PALETTE's colours 8 to 11 sway round, red twice as far as green and blue.

Referenced by mnFileListUpdateGlow().

Definition at line 42 of file screens_save.c.

FILE_LIST_GLOW_GREEN

#define FILE_LIST_GLOW_GREEN 16

Referenced by mnFileListUpdateGlow().

Definition at line 43 of file screens_save.c.

FILE_LIST_GLOW_BLUE

#define FILE_LIST_GLOW_BLUE 20

Referenced by mnFileListUpdateGlow().

Definition at line 44 of file screens_save.c.

FILE_LIST_BAR_TILE

#define FILE_LIST_BAR_TILE 6

The window tile the file list's highlight bar is made of, drawn in HIGHLIGHT_PALETTE.

Referenced by mnWindowFillTilemapRect().

Definition at line 616 of file screens_save.c.

FILE_LIST_SPRITE_SPACING

#define FILE_LIST_SPRITE_SPACING 3

The file list shows the chosen file's party as standing sprites in a row, and four Djinn sprites, one for each element, over the file's Djinn counts: both rows three tiles apart.

Referenced by mnFileListDrawDjinnCounts(), mnFileListShowDjinnSprites() and mnFileListShowPartySprites().

Definition at line 681 of file screens_save.c.

SUMMARY_LEVEL_X

#define SUMMARY_LEVEL_X BY_LANGUAGE(72, 72, 72, 64, 59, 72)

Where each edition draws the "Lv" label and the coin label, in pixels.

Referenced by mnFileListDrawSummary().

Definition at line 863 of file screens_save.c.

SUMMARY_COINS_X

#define SUMMARY_COINS_X BY_LANGUAGE(48, 48, 48, 56, 56, 48)

Definition at line 864 of file screens_save.c.

SUMMARY_DRAW_LEVEL

#define SUMMARY_DRAW_LEVEL

Referenced by mnFileListDrawSummary().

Definition at line 865 of file screens_save.c.

Functions in detail

mnStringFormatPlayTime

void *mnStringFormatPlayTime(Sint32 ticks, Uint8 *out)

Writes the play time ticks (at 60 ticks a second) into out as hours and minutes, "hhh:mm" with the hours right-aligned in three characters, and returns out. The time stops at 999:59.

References mnStringFormatNumber() and Sint32.

Referenced by mnFileListDrawSummary().

Definition at line 49 of file screens_save.c.

mnSaveFindFreeFile

Uint32 mnSaveFindFreeFile(void)

Returns the first save file whose summary shows it empty (level 0), or SAVE_NO_FREE_FILE when all three are in use. The summaries must be loaded.

Referenced by mnSaveCopyFile().

Definition at line 90 of file screens_save.c.

mnSaveCountFilesExcludingSent

Sint32 mnSaveCountFilesExcludingSent(Sint32 excludeSent)

Returns how many save files there are, leaving out those whose summary has its send flag set (the files saved at the end of the game) when excludeSent is nonzero, or SAVE_ERROR_NO_MEMORY when the backup memory cannot be read. It opens and releases the save state itself.

References Sint32, syBupInitState(), syBupLoadFileSummaries() and syBupReleaseState().

Referenced by scSanctumChooseRestartOption().

Definition at line 108 of file screens_save.c.

mnSaveScanFileSummaries

Sint32 mnSaveScanFileSummaries(void)

Loads the save file summaries for the File Screen and returns how many files there are: plus SAVE_SCAN_ALL_CLEARED when every file is cleared (its send flag set), or SAVE_ERROR_NO_MEMORY when the backup memory cannot be read.

References PerData, Sint32, state, syBupInitState(), syBupLoadFileSummaries(), syBupReleaseState(), TitleBattleOptionEnabled and TitleSendOptionEnabled.

Referenced by mnFileListSelectAction() and scInit().

Definition at line 138 of file screens_save.c.

mnSaveBuildFileSummary

Uint32 mnSaveBuildFileSummary(void)

Prepares the save buffer for writing: stamps the main routine's state with the time and options, then fills the file summary shown on the file menus (the leader's name, level and class, the play time, area, coins, Djinn of each element, the party, the send flag and how many Djinn have been found) and its checksum, the sum of BUP_CHECKSUM_WORDS words from GameFlagBytes on.

References BupBuffer, fdAreaGetNameIndexStub(), GameFlagBytes, gmBuildStampGetTimeStub(), gmFlagGetStub(), gmPartyListMembersStub(), gmPartySumDjinnCountsStub(), gmUnitGetStub(), IdleSleepEnabled, InventorySnapshotWork, MainRoutineStateWork, PlayTimeTicks and Sint32.

Referenced by mnSaveToChosenFile() and mnSaveWriteCurrentFile().

Definition at line 187 of file screens_save.c.

mnSaveWriteCurrentFile

Sint16 mnSaveWriteCurrentFile(void)

Saves the game to the current file (BupSlot): builds the summary and writes both halves of the save buffer, as parts BupSlot and BupSlot + BUP_FILE_COUNT.

References BupBuffer, BupSlot, mnFieldMessageShow(), mnSaveBuildFileSummary(), Sint32, syBupInitState(), syBupReleaseState() and syBupWritePart().

Definition at line 282 of file screens_save.c.

mnSaveWriteFile

Sint32 mnSaveWriteFile(Sint32 file)

Writes both halves of the save buffer, as they are, to save file file. Returns 0, or a SAVE_ERROR_* after showing its message.

References BupBuffer, mnFieldMessageShow(), Sint32, syBupInitState(), syBupReleaseState() and syBupWritePart().

Definition at line 324 of file screens_save.c.

mnSaveWriteLinkTallies

Sint32 mnSaveWriteLinkTallies(void)

Saves the Battle Arena's results, under "Saving battle results." or "Saving Monster Battle results.": writes the 16 bytes at BattleArenaSaveStamp, which lie in the first half of the save buffer, into the current file's first part, and leaves the rest of the file as it was saved.

References BattleArenaSaveStamp, BupBuffer, BupSlot, mnFieldMessageShow(), Sint32, syBupInitState(), syBupReadPart(), syBupReleaseState(), syBupWritePart(), syHeapAllocateEWRAM(), syHeapRelease() and syWordsCopy().

Referenced by mnSaveConfirmAndWriteLinkTallies(), scBattleArenaSaveBattleResults() and scBattleArenaSaveMonsterBattleResults().

Definition at line 356 of file screens_save.c.

mnSaveConfirmAndWriteLinkTallies

Sint32 mnSaveConfirmAndWriteLinkTallies(void)

Asks whether to save over the current file and, on Yes, writes the Battle Arena's results into it (mnSaveWriteLinkTallies) and says "Your game was saved."

References mnFieldMessageShow(), mnMessageAllTyped(), mnMessageCloseFinishedWindows(), mnMessageOpenWindow(), mnSaveWriteLinkTallies(), mnYesNoMenuRun(), Sint32, sySoundPlayStub() and sySynch().

Definition at line 403 of file screens_save.c.

mnSaveCopyFile

Sint32 mnSaveCopyFile(void)

The file list's Copy (scene/file_screen.c): lets the player choose a file, reads both of its parts into the save buffer, overwriting it, and writes them to the first empty file.

References BupBuffer, mnFieldMessageShow(), mnFileListSelectFile(), mnSaveFindFreeFile(), Sint32, syBupInitState(), syBupLoadFileSummaries(), syBupReadPart(), syBupReleaseState() and syBupWritePart().

Referenced by scInit().

Definition at line 437 of file screens_save.c.

mnSaveEraseSelectedFile

Sint32 mnSaveEraseSelectedFile(void)

The file list's Erase (scene/file_screen.c): lets the player choose a file, asks whether to erase it and on Yes deletes both of its parts.

References mnFieldMessageShow(), mnFileListSelectFile(), mnMessageAllTyped(), mnMessageCloseFinishedWindows(), mnMessageOpenWindow(), mnYesNoMenuRun(), Sint32, syBupDeletePart(), syBupInitState(), syBupLoadFileSummaries(), syBupReleaseState() and sySynch().

Referenced by scInit().

Definition at line 504 of file screens_save.c.

mnFileListUpdateGlow

void mnFileListUpdateGlow(void)

An event that makes colours 8 to 11 of HIGHLIGHT_PALETTE glow: each follows a sine wave of the frame count, eight frames behind the one before.

References colour, FrameCount, Sint32 and sySin().

Referenced by mnFileListStartGlow() and mnFileListStopGlow().

Definition at line 560 of file screens_save.c.

mnFileListStartGlow

void mnFileListStartGlow(void)

Starts the palette glow (mnFileListUpdateGlow) as an event.

References mnFileListUpdateGlow() and sySetEvent().

Referenced by mnFileListSelectFile().

Definition at line 603 of file screens_save.c.

mnFileListStopGlow

void mnFileListStopGlow(void)

Stops the file list's glow (mnFileListUpdateGlow).

References mnFileListUpdateGlow() and syCloseEvent().

Referenced by mnFileListSelectFile().

Definition at line 609 of file screens_save.c.

mnWindowFillTilemapRect

void mnWindowFillTilemapRect( WINDOW *window, Sint32 x, Sint32 y, Sint32 width, Sint32 height)

Fills the width x height tile rectangle at (x, y) inside window, clipped to the screen as mnWindowSetInteriorPaletteBit clips, with the highlight bar's tile in HIGHLIGHT_PALETTE, the palette mnFileListUpdateGlow makes glow.

References Sint32 and width.

Referenced by mnFileListSelectFile().

Definition at line 622 of file screens_save.c.

mnFileListShowPartySprites

void mnFileListShowPartySprites(WINDOW *window, Sint32 x, Sint32 y, BUP_FILE_SUMMARY *summary)

Shows the party of save file summary (up to four party members) as sprites in a row from tile (x, y) inside window, and starts placing them every tick (mnFileListPlacePartySprites).

References fdPartyGetCharacterSpriteForChildhoodStub(), fdSpriteCreateStub(), fdSpriteStartAnimationStub(), mnFileListPlacePartySprites(), Sint32 and sySetEvent().

Referenced by mnFileListSelectFile().

Definition at line 686 of file screens_save.c.

mnFileListHidePartySprites

void mnFileListHidePartySprites(void)

Stops placing the party sprites of the file list and releases them.

References fdSpriteDestroyStub(), mnFileListPlacePartySprites(), Sint32 and syCloseEvent().

Referenced by mnFileListSelectFile().

Definition at line 718 of file screens_save.c.

mnFileListPlacePartySprites

void mnFileListPlacePartySprites(void)

An event: draws each party sprite of the file list at its place and scale for this tick.

References fdRenderApplyProjectedPlacementStub() and Sint32.

Referenced by mnFileListHidePartySprites() and mnFileListShowPartySprites().

Definition at line 736 of file screens_save.c.

mnFileListShowDjinnSprites

void mnFileListShowDjinnSprites(WINDOW *window, Sint32 x, Sint32 y)

Shows the four Djinn sprites, one for each element, in a row from tile (x, y) inside window, and starts placing them every tick (mnFileListPlaceDjinnSprites). Does nothing when window is NULL.

References fdSpriteCreateStub(), fdSpriteStartAnimationStub(), FileListDjinnSpriteIds, mnFileListPlaceDjinnSprites(), Sint32 and sySetEvent().

Referenced by mnFileListSelectFile().

Definition at line 770 of file screens_save.c.

mnFileListHideDjinnSprites

void mnFileListHideDjinnSprites(void)

Stops placing the Djinn sprites of the file list and releases them.

References fdSpriteDestroyStub(), mnFileListPlaceDjinnSprites(), Sint32 and syCloseEvent().

Referenced by mnFileListSelectFile().

Definition at line 799 of file screens_save.c.

mnFileListPlaceDjinnSprites

void mnFileListPlaceDjinnSprites(void)

An event: draws each Djinn sprite of the file list at its place, at scale 1.0, for this tick.

References fdRenderApplyProjectedPlacementStub() and Sint32.

Referenced by mnFileListHideDjinnSprites() and mnFileListShowDjinnSprites().

Definition at line 817 of file screens_save.c.

mnFileListDrawDjinnCounts

void mnFileListDrawDjinnCounts(WINDOW *window, BUP_FILE_SUMMARY *summary)

Draws the Djinn counts of save file summary, one for each element, two digits each, 24 pixels apart on row 16 of window, under the Djinn sprites.

References mnTextDrawNumberAtOffset() and Sint32.

Referenced by mnFileListSelectFile().

Definition at line 847 of file screens_save.c.

mnFileListDrawSummary

void mnFileListDrawSummary(WINDOW *window, BUP_FILE_SUMMARY *summary)

Draws the summary of save file summary into window: the leader's name, level and class, the play time and the coins.

References mnStringFormatPlayTime(), mnTextDrawMessageAsTiles(), mnTextDrawNumberAtOffset(), mnTextDrawNumberInWindow(), mnTextDrawStringAtOffset(), mnTextDrawStringInWindow(), mnWindowDrawDividerLine(), mnWindowSpritePrepareForRedraw(), Sint32 and StatusScreenLevelLetterString.

Referenced by mnFileListSelectFile().

Definition at line 875 of file screens_save.c.

mnFileListSelectFile

Sint32 mnFileListSelectFile(Sint32 selectedFile, Sint32 menuMode)

The file list: lists the three files with each one's leader and area (or why it cannot be chosen) and, for the file under the cursor, its summary, its party and its Djinn, with the file's own palette glow.

References gmBuildStampGetTimeStub(), MainRoutineStateWork, mnFileListDrawDjinnCounts(), mnFileListDrawSummary(), mnFileListHideDjinnSprites(), mnFileListHidePartySprites(), mnFileListShowDjinnSprites(), mnFileListShowPartySprites(), mnFileListStartGlow(), mnFileListStopGlow(), mnTextDrawMessage(), mnTextDrawString(), mnTitleBob(), mnTitleCreate(), mnWindowClose(), mnWindowColorApply(), mnWindowCreate(), mnWindowDrawDividerLine(), mnWindowFillTilemapRect(), mnWindowSpriteRedrawSavedRect(), PerPush, PerRepeat, Sint32, state, syHeapSlotAllocate(), syHeapSlotRelease(), sySoundPlayStub() and sySynch().

Referenced by mnSaveChooseAndLoadFile(), mnSaveCopyFile(), mnSaveEraseSelectedFile() and mnSaveToChosenFile().

Definition at line 928 of file screens_save.c.

mnSaveToChosenFile

Sint32 mnSaveToChosenFile(void)

The Save command: lets the player choose a file (the current one first), asks whether to save over it when it has data, then saves the game to it, ActorsWork included, and makes it the current file.

References BupBuffer, BupSlot, fdActorSnapshotStub(), mnFieldMessageShow(), mnFileListSelectFile(), mnMessageAllTyped(), mnMessageCloseFinishedWindows(), mnSaveBuildFileSummary(), mnYesNoMenuRun(), Sint32, state, syBupInitState(), syBupLoadFileSummaries(), syBupReleaseState(), syBupWritePart(), sySoundPlayStub() and sySynch().

Referenced by mnPauseMenuRun() and scInit().

Definition at line 1348 of file screens_save.c.

mnSaveChooseAndLoadFile

Sint32 mnSaveChooseAndLoadFile(Sint32 mode)

Lets the player choose a file in file list mode (see FILE_LIST_MODE) and loads it into the save buffer as the current file, restoring its play time and options.

References BupBuffer, BupSlot, IdleSleepEnabled, IdleTicks, MainRoutineStateWork, mnFieldMessageShow(), mnFileListSelectFile(), PlayTimeTicks, Sint32, syBupInitState(), syBupLoadFileSummaries(), syBupReadPart() and syBupReleaseState().

Referenced by scInit().

Definition at line 1424 of file screens_save.c.

mnPointingHandLoadIntoFreeSlot

Sint32 mnPointingHandLoadIntoFreeSlot(void)

Loads the pointing hand cursor's tiles (PointingHandTiles, 128 bytes) into a free VRAM slot and returns the slot, which the caller frees with syVRAMCacheFreeEntry.

References PointingHandTiles, Sint32, syVRAMCacheFindFreeEntry() and syVRAMCacheLoad().

Referenced by scColossoLoadPointer().

Definition at line 1472 of file screens_save.c.