include/save.h file

Classes

struct KinstoneSave
Contains save data regarding kinstones.
struct SaveFile
Contains all information about a save file.

Enums

enum SaveResult { SAVE_BUSY = 0, SAVE_OK = 1, SAVE_ERROR = -1 }
enum SaveState { SAVE_INIT, SAVE_IN_PROGRESS, SAVE_DONE }

Functions

auto HandleSave(u32 idx) -> SaveResult
Attempt to save the game.
auto InitSaveData(void) -> u32
Initialize the save system.
auto ReadSaveHeader(SaveHeader* saveHeader) -> u32
Read save header.
auto WriteSaveHeader(SaveHeader* saveHeader) -> u32
Write save header.
auto ReadSaveFile(u32 index, SaveFile* saveFile) -> s32
Read save file.
void SetFileStatusDeleted(u32 index)
Mark a save file as deleted.
void UpdateGlobalProgress(void)
Update the global progress (0 - 10).
void sub_0807CD9C(void)

Variables

SaveFile gSave
The current save file.
const char gUnk_0811E470

Defines

#define FILENAME_LENGTH

Function documentation

SaveResult HandleSave(u32 idx)

Attempt to save the game.

Parameters
idx The save slot.
Returns SaveResult result.

u32 InitSaveData(void)

Initialize the save system.

Returns Success

u32 ReadSaveHeader(SaveHeader* saveHeader)

Read save header.

Returns Success.

u32 WriteSaveHeader(SaveHeader* saveHeader)

Write save header.

Returns Success.

s32 ReadSaveFile(u32 index, SaveFile* saveFile)

Read save file.

Returns Success.

void SetFileStatusDeleted(u32 index)

Mark a save file as deleted.

Parameters
index The save file index.

void UpdateGlobalProgress(void)

Update the global progress (0 - 10).

There are 10 different indicators of game completion: 9 : Flag SEIIKI_STAINED_GLASS 8 : Flag LV5_CLEAR 7 : Flag OUBO_KAKERA 6 : Flag LV4_CLEAR 5 : Flag LV3_CLEAR 4 : Flag SOUGEN_08_TORITSUKI 2 : Flag LV1_CLEAR 1 : Default }