mirror of
https://github.com/zeldaret/tmc
synced 2026-09-07 11:21:35 -04:00
SaveFile cleanup part 1
This commit is contained in:
@@ -145,4 +145,11 @@ union SplitHWord {
|
||||
/* forward decls */
|
||||
struct Entity_;
|
||||
|
||||
/**
|
||||
* bitset macros
|
||||
*/
|
||||
|
||||
#define BIT(bit) (1 << (bit))
|
||||
#define IS_BIT_SET(value, bit) ((value) & BIT(bit))
|
||||
|
||||
#endif // GLOBAL_H
|
||||
|
||||
+10
-3
@@ -133,7 +133,7 @@ typedef struct {
|
||||
/* 0x04 */ s16 start_pos_x;
|
||||
/* 0x06 */ s16 start_pos_y;
|
||||
/* 0x08 */ u8 layer;
|
||||
/* 0x09 */ u8 field_0x15;
|
||||
/* 0x09 */ u8 filler9;
|
||||
/* 0x0a */ u8 dungeon_area;
|
||||
/* 0x0b */ u8 dungeon_room;
|
||||
/* 0x0c */ s16 dungeon_x;
|
||||
@@ -142,7 +142,7 @@ typedef struct {
|
||||
/* 0x12 */ u16 dungeon_map_y;
|
||||
/* 0x14 */ u16 overworld_map_x;
|
||||
/* 0x16 */ u16 overworld_map_y;
|
||||
/* 0x18 */ u8 field_0x24[8];
|
||||
/* 0x18 */ u8 filler18[8];
|
||||
} PlayerRoomStatus;
|
||||
static_assert(sizeof(PlayerRoomStatus) == 0x20);
|
||||
|
||||
@@ -155,7 +155,14 @@ typedef struct {
|
||||
/* 0x0a */ u16 stairs_idx; // seems to be a tile type
|
||||
/* 0x0c */ PlayerRoomStatus player_status;
|
||||
/* 0x2c */ u8 entity_update_type; // differentiates entity priority on kinstone menu?
|
||||
/* 0x2d */ u8 field_0x2c[0x8];
|
||||
/* 0x2d */ u8 field2d;
|
||||
/* 0x2e */ u8 location;
|
||||
/* 0x2f */ u8 field2f;
|
||||
/* 0x30 */ u8 field30;
|
||||
/* 0x31 */ u8 field31;
|
||||
/* 0x32 */ u8 field32;
|
||||
/* 0x33 */ u8 field33;
|
||||
/* 0x34 */ u8 hint_heightEU;
|
||||
/* 0x35 */ u8 hint_height;
|
||||
/* 0x36 */ u16 hint_idx;
|
||||
/* 0x38 */ u8 field_0x38;
|
||||
|
||||
+21
-19
@@ -33,25 +33,27 @@ extern SaveResult HandleSave(u32 idx);
|
||||
* The contents of this structure are read from and written to EEPROM.
|
||||
*/
|
||||
typedef struct {
|
||||
/*0x000*/ u8 invalid; /**< File is invalid. */
|
||||
/*0x001*/ u8 initialized; /**< File is initialized. */
|
||||
/*0x002*/ u8 msg_speed; /**< Message speed. */
|
||||
/*0x003*/ u8 brightness; /**< Brightness. */
|
||||
/*0x004*/ u8 filler4[0x2];
|
||||
/*0x006*/ u8 saw_staffroll;
|
||||
/*0x007*/ u8 unk7; // TODO rolling barrel state?
|
||||
/*0x008*/ u8 global_progress; /**< @see UpdateGlobalProgress */
|
||||
/*0x009*/ u8 field_0x9[0x17];
|
||||
/*0x020*/ u16 field_0x20;
|
||||
/*0x022*/ u8 field_0x22[0x1e];
|
||||
/*0x040*/ u32 windcrests; /**< Windcrest flags. */
|
||||
/*0x044*/ u8 filler44[0xC];
|
||||
/*0x050*/ u32 unk50;
|
||||
/*0x054*/ u8 filler54[0x8];
|
||||
/*0x05C*/ u32 unk5C;
|
||||
/*0x060*/ u32 areaVisitFlags[8]; /**< Area visit flags. */
|
||||
/*0x080*/ char name[FILENAME_LENGTH]; /**< Save file name. */
|
||||
/*0x086*/ u8 filler86[0x2];
|
||||
/*0x000*/ u8 invalid; /**< File is invalid. */
|
||||
/*0x001*/ u8 initialized; /**< File is initialized. */
|
||||
/*0x002*/ u8 msg_speed; /**< Message speed. */
|
||||
/*0x003*/ u8 brightness; /**< Brightness. */
|
||||
/*0x004*/ u8 filler4[0x2]; /**< unused filler */
|
||||
/*0x006*/ u8 saw_staffroll; /**< beat the game and watched the credits */
|
||||
/*0x007*/ u8 dws_barrel_state; /**< state of the big barrel in DWS, 0 or 2 */
|
||||
/*0x008*/ u8 global_progress; /**< @see UpdateGlobalProgress */
|
||||
/*0x009*/ u8 available_figurines; /**< figurines available to get */
|
||||
/*0x00A*/ u8 fillerA[0x16]; /**< unused filler */
|
||||
/*0x020*/ u16 map_hints; /**< bitmask, used by subtask MapHint */
|
||||
/*0x022*/ u8 filler22[0x1e]; /**< unused filler */
|
||||
/*0x040*/ u32 windcrests; /**< upper 8 bit Windcrest flags @see WindcrestID
|
||||
* lower bits used for other things */
|
||||
/*0x044*/ u8 filler44[0xC]; /**< unused filler */
|
||||
/*0x050*/ u32 enemies_killed; /**< number of enemies killed */
|
||||
/*0x054*/ u8 filler54[0x8]; /**< unused filler */
|
||||
/*0x05C*/ u32 items_bought; /**< number of items bought in stockwells shop */
|
||||
/*0x060*/ u32 areaVisitFlags[8]; /**< Area visit flags. */
|
||||
/*0x080*/ char name[FILENAME_LENGTH]; /**< Save file name. */
|
||||
/*0x086*/ u8 filler86[0x2]; /**< unused filler */
|
||||
/*0x088*/ PlayerRoomStatus saved_status; /**< Player room status. */
|
||||
/*0x0A8*/ Stats stats; /**< Player stats. */
|
||||
/*0x0D0*/ u8 fillerD0[34];
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#ifndef SAVEFILE_WINDCREST_H
|
||||
#define SAVEFILE_WINDCREST_H
|
||||
|
||||
typedef enum WindcrestID {
|
||||
WINDCREST_MT_CRENEL = 24,
|
||||
WINDCREST_VEIL_FALLS,
|
||||
WINDCREST_CLOUD_TOPS,
|
||||
WINDCREST_HYRULE_TOWN,
|
||||
WINDCREST_LAKE_HYLIA,
|
||||
WINDCREST_CASTOR_WILDS,
|
||||
WINDCREST_SOUTH_HYRULE_FIELD,
|
||||
WINDCREST_MINISH_WOODS,
|
||||
} WindcrestID;
|
||||
|
||||
#endif // SAVEFILE_WINDCREST_H
|
||||
Reference in New Issue
Block a user