Move the code to change those values based on the child trade slot item to the selecting mask loop to not be setting them every frame just because you're in the inventory.
* Adds const specifiers to some appropriate functions.
* Implements move semantics for ReplaceStringInMessage.
Should result in much fewer allocations when rendering custom messages during a Randomizer playthrough.
* Implements some more move semantics.
* First pass on improved Custom Messages API.
This should allow for fewer allocations during randomizer seed generation and runtime, plus a couple of other enhancements that utilize custom messages. It does this by taking advantage of move semantics to prevent extraneous allocations when string literals are passed in. It also takes advantage of OOP to hopefully end up with a cleaner API.
* Additional API/allocation related improvements.
* Removes an unnecessary destructor and constructor.
* Updates documentation
* Adds a bit more documentation.
* Fixes switch build problem and minor syntax error
* Renames slightly unclear operator parameter
* Replaces magic numbers with LANGUAGE_MAX
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>