Shipwright/soh/include
Malkierian 778f548b01
Move Game Saving to Separate Thread (#2820)
* 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>
2023-05-05 17:20:34 -04:00
..
boost_custom/container_hash Add manual seed input for rando generation (#2057) 2023-01-25 18:33:27 -05:00
libc refactor: use LUS 1.0 RC 2023-01-17 00:33:56 -05:00
tables spockalicious (#2751) 2023-04-27 19:20:41 -04:00
align_asset_macro.h Simplify Asset Headers (#2474) 2023-03-02 15:37:47 +01:00
alignment.h [docs] Upstream updates 1 (#1955) 2022-11-30 00:28:57 +01:00
alloca.h Linux/GCC Support (#28) 2022-05-11 13:18:24 -04:00
command_macros_base.h Big-endian support (#909) 2022-07-27 23:50:56 +02:00
fp.h refactor: use LUS 1.0 RC 2023-01-17 00:33:56 -05:00
functions.h spockalicious (#2751) 2023-04-27 19:20:41 -04:00
global.h refactor: use LUS 1.0 RC 2023-01-17 00:33:56 -05:00
ichain.h git subrepo clone https://github.com/HarbourMasters/soh.git 2022-03-22 02:51:23 +01:00
macro.inc git subrepo clone https://github.com/HarbourMasters/soh.git 2022-03-22 02:51:23 +01:00
macros.h refactor: use LUS 1.0 RC 2023-01-17 00:33:56 -05:00
message_data_fmt.h git subrepo clone https://github.com/HarbourMasters/soh.git 2022-03-22 02:51:23 +01:00
message_data_static.h Randomizer v2 (#1065) 2022-09-21 00:50:22 -04:00
message_data_textbox_types.h Randomizer v2 (#1065) 2022-09-21 00:50:22 -04:00
regs.h git subrepo clone https://github.com/HarbourMasters/soh.git 2022-03-22 02:51:23 +01:00
segment_symbols.h Linux crash handler (#1209) 2022-08-31 22:59:38 -04:00
sequence.h git subrepo clone https://github.com/HarbourMasters/soh.git 2022-03-22 02:51:23 +01:00
sfx.h git subrepo clone https://github.com/HarbourMasters/soh.git 2022-03-22 02:51:23 +01:00
unk.h git subrepo clone https://github.com/HarbourMasters/soh.git 2022-03-22 02:51:23 +01:00
variables.h Rando version warning on different builds (#2420) 2023-02-28 20:46:55 -05:00
vt.h Disable BEL char by default when terminal attached (#2306) 2023-01-17 15:18:13 -05:00
z64.h spockalicious (#2751) 2023-04-27 19:20:41 -04:00
z64actor.h documentation: use NpcInteractInfo from zret (#2370) 2023-01-19 02:38:04 -05:00
z64animation.h refactor: use LUS 1.0 RC 2023-01-17 00:33:56 -05:00
z64audio.h Makes sequenceMap and seqLoadStatus a dynamic size (#2610) 2023-03-12 15:55:25 -04:00
z64bgcheck.h Use PlayState instead of GlobalContext (#1927) 2022-11-06 09:24:34 +01:00
z64camera.h refactor: use LUS 1.0 RC 2023-01-17 00:33:56 -05:00
z64collision_check.h git subrepo clone https://github.com/HarbourMasters/soh.git 2022-03-22 02:51:23 +01:00
z64cutscene_commands.h git subrepo clone https://github.com/HarbourMasters/soh.git 2022-03-22 02:51:23 +01:00
z64cutscene.h refactor: use LUS 1.0 RC 2023-01-17 00:33:56 -05:00
z64dma.h refactor: use LUS 1.0 RC 2023-01-17 00:33:56 -05:00
z64effect.h refactor: use LUS 1.0 RC 2023-01-17 00:33:56 -05:00
z64elf_message.h refactor: use LUS 1.0 RC 2023-01-17 00:33:56 -05:00
z64environment.h git subrepo clone https://github.com/HarbourMasters/soh.git 2022-03-22 02:51:23 +01:00
z64interface.h DPad items 2022-06-22 23:13:32 -04:00
z64item.h Rework Get Item Table to be more flexible for adding custom items (#1050) 2022-08-23 20:11:38 -04:00
z64light.h refactor: use LUS 1.0 RC 2023-01-17 00:33:56 -05:00
z64map_mark.h refactor: use LUS 1.0 RC 2023-01-17 00:33:56 -05:00
z64math.h Move Game Saving to Separate Thread (#2820) 2023-05-05 17:20:34 -04:00
z64object.h git subrepo clone https://github.com/HarbourMasters/soh.git 2022-03-22 02:51:23 +01:00
z64player.h spockalicious (#2751) 2023-04-27 19:20:41 -04:00
z64save.h chore: move rando savefile setup and document flags (#2697) 2023-04-11 18:27:51 -04:00
z64scene.h Enable MQ Dungeons in Randomizer (#1828) 2022-10-21 21:43:37 -04:00
z64skin.h Use PlayState instead of GlobalContext (#1927) 2022-11-06 09:24:34 +01:00
z64transition.h refactor: use LUS 1.0 RC 2023-01-17 00:33:56 -05:00