Implemented subsectional saving (handled in the section's save function, and passed to the save function by & pointer). Default of "all" passed in from SaveFile for game saves.
Implemented subsectional saving for sohStats and entrances/scenes discovered.
Fixed check for game save registry by putting the check against the registry in the "all" section save code.
Fixed loading and saving of blank sceneTimestamps due to default construction of data structures during JSON loading making all "empty" entries have scene and room of 0.
Moved SoH stats initialization to `gameplaystats.cpp` via `SaveManager::AddInitFunction`.
Improved save file efficiency by adding code to not write any "empty" entries in `sceneTimestamps` (as determined by room and scene being 254) when saving, and initializing them to 254 if not loaded from the save file.
* RANDO: Fix logic with OGC and mixed entrance pools
Adds a `GANONS_CASTLE_LEDGE` area and a `BuiltRainbowBridge` logic var. Added an event to `GANONS_CASTLE_GROUNDS` that sets `BuiltRainbowBridge` to true. Adds Entrances for `GANONS_CASTLE_LEDGE` to `GANONS_CASTLE_GROUNDS` when `IsAdult` and `BuiltRainbowBridge` (or the glitched logic that lets you skip the rainbow bridge) are true, `HYRULE_CASTLE_GROUNDS` when `IsChild` is true, and `GANONS_CASTLE_ENTRYWAY` When IsAdult is true (if child enters `GANONS_CASTLE_LEDGE` in game they are in `HYRULE_CASTLE_GROUNDS` and thus cannot go back into GANONS_CASTLE_ENTRYWAY). Adds Entrance for `GANONS_CASTLE_GROUNDS` to `GANONS_CASTLE_LEDGE` when `BuiltRainbowBridge` is true, or when the glitched logic that lets you skip the Rainbow Bridge is true.
* Adds intermediate area for age-gating
* Fixes the logic for actually killing the skulltula
* Adds hammer crouch stab as a way to kill OGC_GS
* hacky fix for deku tree entrance
* lonlon windows
* only hack in one place instead of everywhere
* dehack deku
* goron city entrance
* gerudo cell, zd entrance
* kak windows
* fix pot house
* back to the hacks
* back back
* space
* globals
* just hack it together to fix em all
---------
Co-authored-by: briaguya <briaguya@alice>
* Refactor `Vec2f`, `Vec3f`, `Vec3s` in `z64math` to avoid reserved identifiers.
* Include `z64save` in SaveManager, which requires encapsulating `#include gameplaystats.h` and `InitStatTracker` in the cpp to fix compile issues.
Adds SaveContext reference parameters to SaveFunc and existing implementations in preparation for threaded saves.
* Threaded saves fully implemented.
Platform-specific save code removed.
Thread safety added. Will wait for thread pool tasks to finish before resetting or closing.
* Converted gSaveContext copy for save threads to the heap with `new`, deleted at the end of the threaded function to prevent possible issues with the stack.
* Turns out leaving the call to `ThreadPoolWait` in a `GameInteractor::OnExitGame` hook seems to be just fine.
* Removed unnecessary references to `SaveManager::ThreadPoolWait()`, game hooks are the only places it's called now.
* Re-added WiiU/Switch performance save code.
* Added call to `SaveManager::ThreadPoolWait` in `Sram_InitSave` to prevent trying to load a newly "created" save before the save file was actually written.
---------
Co-authored-by: Christopher Leggett <chris@leggett.dev>
* Changes for LUS renames in ResourceManager and Archive.
* Moves WriteSaveFile and ReadSaveFile to SaveManager.
* Removes ImGui namespace.
* Bump LUS
* Updates gitignore for intellij projects.
* Controller usage is now up to date with newest LUS.
* Adapters for removal of Controller.WriteToSource from LUS.
* Uses correct capitalization on Controller.GetProfile()
* Bump LUS
---------
Co-authored-by: Christopher Leggett <chris@leggett.dev>
for some reason we were getting garbage data in cvarNameMargins when doing things the `const char *` way. i wasn't able to figure out why that was getting garbage but this makes it so we don't get garbage in there
Co-authored-by: briaguya <briaguya@alice>
* TWEAK: Rupee dash duplication
Rupee dash was duplicated while being moved over the EXTRA MODES, so this fixes the duplication and put it only there
* Update soh/soh/GameMenuBar.cpp
---------
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* hack that makes it so custom models still work on scene transition
* Update soh/soh/OTRGlobals.cpp
Co-authored-by: Nicholas Estelami <NEstelami@users.noreply.github.com>
* naming/formatting
---------
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: Nicholas Estelami <NEstelami@users.noreply.github.com>