Enhancement: Room/Scene Timers (#2478)

* Groundwork on scene/room timers; naming changes

* added to save manager; reworked storing timestamps

* actually saved stuff to savemanager;
accounted for null playstate

* finally fixed the fucking timers

* Added scene mapping

* Added CVar for room/scene level; fixed some displays

* reworked logic

* increase name spec for scene timestamps

* Actually save item timestamps when loading v3 save

* Cleanup

* fix merge artifact

* apply suggestions
This commit is contained in:
Ralphie Morell 2023-04-03 00:06:55 -04:00 committed by GitHub
commit ff1d8a9e9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 591 additions and 318 deletions

View file

@ -53,6 +53,14 @@ typedef struct {
/* 0x5C */ s16 gsTokens;
} Inventory; // size = 0x5E
typedef struct {
u16 scene;
u8 room;
u32 sceneTime;
u32 roomTime;
u8 isRoom;
} SceneTimestamp;
typedef struct {
/* */ char buildVersion[50];
/* */ s16 buildVersionMajor;
@ -63,8 +71,14 @@ typedef struct {
/* */ u8 dungeonKeys[19];
/* */ u32 playTimer;
/* */ u32 pauseTimer;
/* */ u32 sceneTimer;
/* */ u32 roomTimer;
/* */ s16 sceneNum;
/* */ s8 roomNum;
/* */ bool gameComplete;
/* */ u32 timestamp[TIMESTAMP_MAX];
/* */ u32 itemTimestamp[TIMESTAMP_MAX];
/* */ SceneTimestamp sceneTimestamps[8191];
/* */ u32 tsIdx;
/* */ u32 count[COUNT_MAX];
/* */ u32 entrancesDiscovered[SAVEFILE_ENTRANCES_DISCOVERED_IDX_COUNT];
/* */ u32 scenesDiscovered[SAVEFILE_SCENES_DISCOVERED_IDX_COUNT];