1#ifndef GUARD_SAVE_STATE_H
2#define GUARD_SAVE_STATE_H
91#define DMA3_BUSY 0x80000000
93#define START_DMA(source_, destination_, control_) \
94 Dma_Set((const void *)(source_), (void *)(destination_), (control_), REG_DMA3)
101#define WAIT_DMA() WaitDma(DMA3)
DMA channel registers, and the DMA and CPU fills.
16.16 fixed-point constants, sine and cosine, and the library division.
Flash memory: erasing, programming and reading sectors.
The work slots of gWorkSlot, read through their own names.
struct SaveWorkspace * gSaveWorkspace
static __inline__ void WaitDma(struct DmaRegisters volatile *channel)
s16 gTitleSendOptionEnabled
STATIC_ASSERT, a compile-time check that emits nothing.
#define STATIC_ASSERT(condition)
C89 permits repeated extern declarations of the same array.
#define offsetof(type, member)
A DMA channel's registers (DMAxSAD, DMAxDAD, DMAxCNT).
u32 control
The count in the low half, DMAxCNT_H's flags above it.
A save file's summary for the file screen: the leader's name, level and class, the area,...
u16 paletteGlow
bits: 15..8 paletteGlowSub | 7..0 paletteGlow
u8 unk38[4]
Filled on reading: the play time from the file's second record.
u8 hasFlag20
FLAG_CHILDHOOD is set; remaps the party's sprites.
u16 frames
Low half of GameState.buildStamp; a file below the current stamp is listed as from an older build.
u32 checksum
the sum of the 968 words from gGameFlagBytes
s8 sendFlag
Copied from GameState.unk20f, which saving at the end of the game sets; the file menu for cleared dat...
u8 djinn[4]
the party's Djinn of each element
u8 slotHeader[16]
room for the record's SaveSlotHeader
u8 level
the leader's; 0 for an empty file
s8 flagCount
how many of game flags 48 to 127 are set
u16 paletteGlowSub
GameState.paletteGlow[1].
u16 area
area name number (Scene_GetAreaNameIndex)
s8 party[5]
up to four party members, ended by -1
struct SaveSlotHeader header
The save work: which of the 16 flash sectors hold a record, their record ids and sequence numbers,...
struct SaveSummary summary[3]
each file's, read from its first record
u8 recordId[16]
each sector's record; 16 for none
u8 occupied[16]
1 for a sector holding the current copy of a record
u16 sequence[16]
each sector's sequence number
union SaveWorkspace::@331263107057156204162071305274032234046256201132 slot
one sector, read from or written to flash
The integer types, TRUE, UNUSED and the fixed-address macros.
struct SaveWorkspace::@331263107057156204162071305274032234046256201132::@306255313117204121245047232313241013312013006065 record