Commit Graph

1950 Commits

Author SHA1 Message Date
Malkierian
099d9cd0fd
Threaded save was causing issues for old oot-save.sav conversion. Added an option just for that instance to run SaveManager::SaveFileThreaded outside of a thread. Everything else still runs threaded. (#2894) 2023-05-17 15:51:17 -04:00
Adam Bird
5244cda90e expose thieves hideout selection for keyrings in randomizer settings 2023-05-16 17:40:50 -04:00
Malkierian
4cf3172a3d Fixed trying to emplace in sectionRegistry without index. 2023-05-15 17:40:10 -07:00
Malkierian
1a9ef29ac5 Added function to get sectionID for a specified section name, returning -1 if section name not registered. 2023-05-15 17:32:49 -07:00
Malkierian
50fbe5d00c Modified sectional saving to utilize an integer ID for calling specific sections to cut down on string copying. Utilizes enum values for non-mod sections to allow for cross-project use of those IDs, and sets up AddSaveFunction to add mod sections after that using max value enum. 2023-05-15 17:21:14 -07:00
Malkierian
4bc0d7d60d v3 >:( 2023-05-13 18:41:10 -07:00
Malkierian
b5740bc878 v2 2023-05-13 18:35:27 -07:00
Malkierian
374301db9b Formatting and whitespace cleanup. 2023-05-13 18:29:05 -07:00
Malkierian
7861b4c092 Missed baseBlock -> saveBlock change in WiiU/Switch file writing block XD. 2023-05-13 12:33:10 -07:00
Malkierian
22531fed27 A little more code clarification. 2023-05-13 11:47:22 -07:00
Malkierian
e2177d7392 Added sanity check to clearing sectionBlock["data"] to only be for randomizer and only when the save file is not randomizer (to clear the existing structure from the loaded spoiler log). 2023-05-13 11:45:20 -07:00
Malkierian
550c10b1c3 Little bit of code clarification. 2023-05-13 11:41:28 -07:00
Malkierian
dbe672444c Changed string paramaters for save functions to proper const pointer type.
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.
2023-05-13 11:26:30 -07:00
Malkierian
42b35634a5 Fixed residual values in global save block causing new files to save all sections previously loaded for metadata initialization, regardless of that section's execution during the save process.
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`.
2023-05-12 15:18:26 -07:00
Malkierian
685925cbb8 Moved sohStats to its own section, and moved the saving and loading to its own registered load and save functions within gameplaystats.cpp. Required making a new loader version for base without sohStats loading code.
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.
2023-05-12 13:23:50 -07:00
Malkierian
2ae713464d Moved sohStats to separate section, load and save code now in gameplaystats.cpp. Still needs new load version for base? 2023-05-11 12:02:04 -07:00
Malkierian
2a8810d6a5
Merge branch 'HarbourMasters:develop' into sectional-saves 2023-05-11 09:56:08 -07:00
briaguya
7dff8b6efc
Spock Bravo -> Develop 2023-05-11 00:15:37 -04:00
Christopher Leggett
d8891f1fe4
Version Bump (#2867) 2023-05-10 21:57:22 -04:00
Garrett Cox
85385db099
Use OnGameFrameUpdate for rainbow tick instead of relying on ImGui hidden window (#2872) 2023-05-10 21:48:01 -04:00
briaguya
d1c930b5e5
reserved thread count (#2868)
* reserved thread count

* add comment, use latest main

---------

Co-authored-by: briaguya <briaguya@alice>
2023-05-10 21:32:15 -04:00
aMannus
6d4761f349
Fix several enemy ID's for Hyper Rush (#2871) 2023-05-10 20:44:40 -04:00
Malkierian
07bfba0162 Preliminary work on persistent save data json block.
Added autosaveRegistry to set section to save with overall autosave triggers.
2023-05-10 14:10:13 -07:00
aMannus
23d89122b3
CC: No longer rely on received parameter to be 0 (#2870) 2023-05-10 09:15:33 -04:00
Garrett Cox
2ea72f835a
Cleanup cvars that are set on boot (#2863) 2023-05-10 09:08:35 -04:00
Christopher Leggett
a72997f12b
RANDO: Fix logic with OGC and mixed entrance pools (#2830)
* 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
2023-05-09 23:41:45 -04:00
Adam Bird
c70bdb7700
improve built in extraction detection (#2865) 2023-05-09 23:39:57 -04:00
briaguya
72358eb4d7
fix for day/night textures (#2853)
* 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>
2023-05-09 23:33:27 -04:00
briaguya
b887d38f5f
bump LUS for thread stuff (#2866)
* bump for threads

* use latest lus main

---------

Co-authored-by: briaguya <briaguya@alice>
2023-05-09 23:04:02 -04:00
aMannus
23d40c1ca5
Fixed small error in CC .cs file (#2858) 2023-05-08 20:58:42 -04:00
Adam Bird
caf8f1badc
fix own dungeon items not using rando GI item when boss rooms are shuffled (#2859) 2023-05-08 15:44:50 -04:00
Kenix3
77987a42cf
Bump LUS (#2855)
* Bump LUS

* Ship -> LUS namespace change

* z_scene_otr Ship -> LUS namespace
2023-05-07 23:01:12 -04:00
Christopher Leggett
b166bdd3fc
Reverts part of PR #2851 that required OTR regen. (#2856) 2023-05-07 22:54:54 -04:00
briaguya
f5aacaf38b
fix build (#2852)
Co-authored-by: briaguya <briaguya@alice>
2023-05-07 20:48:55 -04:00
Lutzx
fac898d759
Add stdint headers (#1) (#2832)
* Add stdint header

* Add stdint header

Co-authored-by: Christopher Leggett <chris@leggett.dev>
2023-05-07 20:23:12 -04:00
Kenix3
91bd693ff6
Bump LUS version (#2849)
* Bump LUS version

* Removes the "now" boolean from the LUS resource bridge functions.

* Bump LUS

* More LUS bump

* Update soh/soh/resource/importer/AudioSampleFactory.cpp

---------

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
2023-05-07 20:18:54 -04:00
louist103
f31a841789
ZAPD Update (#2851)
* git subrepo clone --force --branch=rebase2 C:/ZeldaStuff/ZAPDTR ZAPDTR/

subrepo:
  subdir:   "ZAPDTR"
  merged:   "6aa54a551"
upstream:
  origin:   "C:/ZeldaStuff/ZAPDTR"
  branch:   "rebase2"
  commit:   "6aa54a551"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"

* git subrepo clone --force --branch=rebase2 C:/ZeldaStuff/ZAPDTR ZAPDTR/

subrepo:
  subdir:   "ZAPDTR"
  merged:   "88b012240"
upstream:
  origin:   "C:/ZeldaStuff/ZAPDTR"
  branch:   "rebase2"
  commit:   "88b012240"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"

* Update (its broken)

* fix the enum

* git subrepo push --remote=C:/ZeldaStuff/ZAPDTR/ ZAPDTR

subrepo:
  subdir:   "ZAPDTR"
  merged:   "b7b6e1c82"
upstream:
  origin:   "C:/ZeldaStuff/ZAPDTR/"
  branch:   "rebase2"
  commit:   "b7b6e1c82"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"

* New names for LUS actions

* git subrepo push --remote=C:/ZeldaStuff/ZAPDTR/ ZAPDTR

subrepo:
  subdir:   "ZAPDTR"
  merged:   "c5cfebeee"
upstream:
  origin:   "C:/ZeldaStuff/ZAPDTR/"
  branch:   "rebase2"
  commit:   "c5cfebeee"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"

* git subrepo clone (merge) --force --branch=rebase2 C:/ZeldaStuff/ZAPDTR ZAPDTR/

subrepo:
  subdir:   "ZAPDTR"
  merged:   "d5f4769b8"
upstream:
  origin:   "C:/ZeldaStuff/ZAPDTR"
  branch:   "rebase2"
  commit:   "d5f4769b8"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"

* Fix missing commands in the exporter.

* Cleanups.

* git subrepo pull --force --remote=https://github.com/harbourmasters/ZAPDTR --branch=master ZAPDTR

subrepo:
  subdir:   "ZAPDTR"
  merged:   "d4c35b90a"
upstream:
  origin:   "https://github.com/harbourmasters/ZAPDTR"
  branch:   "master"
  commit:   "d4c35b90a"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"

* Add unordered_map include to fix MacOS

* fix string_view

* Update Main.cpp

* fix string view

* So close I can almost taste it

* So close

* Fix missed git marker.

* Fix surface types and

* Update ZFile.cpp

* Delete Jenkinsfile

---------

Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
2023-05-07 19:58:50 -04:00
briaguya
dd43719a14
Spock -> develop 2023-05-06 16:38:50 -04:00
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
aMannus
81372c092d
CrowdControl 2.0 compatibility & category tweak (#2814)
* Updated CC 2.0 .cs file and small category fix

* Remove old comments

* Prepare prices and descriptions in .cs file

* Finalize 2.0 files
2023-05-05 17:18:29 -04:00
Adam Bird
79a10c62ef
remove tts hotkey for linux and update readme (#2833) 2023-05-05 02:38:54 -04:00
Adam Bird
5f0f2731ee
udpate mac launch script to set SHIP_HOME (#2831) 2023-05-05 02:34:07 -04:00
Kenix3
f9cfcde627
Lus updates (#2835)
* 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>
2023-05-04 23:56:57 -04:00
Christopher Leggett
1fbec4c69c
Merge pull request #2829 from HarbourMasters/develop-spock
Spock -> Develop
2023-05-04 08:52:50 -04:00
briaguya
c3ba15ed57
fix: don't crash when changing margins (#2828)
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>
2023-05-04 00:35:56 -04:00
PurpleHato
d025ca0d90
TWEAK: Rupee dash duplication (#2815)
* 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>
2023-05-04 00:31:52 -04:00
Christopher Leggett
071a2d0418
Merge pull request #2826 from HarbourMasters/develop-spock
Spock -> Develop
2023-05-03 23:00:45 -04:00
briaguya
c02dcb598a
fix: properly load textures for debug text (#2775)
Co-authored-by: briaguya <briaguya@alice>
2023-05-03 22:23:50 -04:00
GaryOderNichts
176650cb3a
GCC 13 support (#2780) 2023-05-03 21:55:49 -04:00
briaguya
7d0515c501
fix: properly load custom models on scene transition (#2779)
* 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>
2023-05-03 21:54:23 -04:00