Commit Graph

113 Commits

Author SHA1 Message Date
Malkierian b3d51441eb
Rando Enhancement: Mysterious Shuffled Items (#3227)
* Add rando enhancement "Mysterious Shuffled Items", which obfuscates shuffled freestanding/drawn-in-world items (PoH, tokens, shop items) with a custom question mark model (thanks Hato), and uses the "mysterious item" functionality of `GetMerchantMessage` for everything that supports it, regardless of hint status on generation.

* Reverted back to rando enhancement, but added condition for Mysterious Shuffle not being on for the gem rotation fix to apply.

* First attempt at changing to fake GetItemEntry instead of directly calling the mystery draw function. Needs more work.

* Updated CVar to reflect CVar rework values.

Added `IsCheckShuffled` as preliminary function for checking *only* if a check is shuffled, not necessarily if it is just visible on the tracker. This accounts for the difference between tokensanity and "Always Show GS On Tracker", where you don't want to obfuscate the latter.

* Bit of cleanup.

* Cross-platform building edits. If anyone has a better idea of how to handle this fake GIE, I'm all ears.

* Update to CVar macros.

* Fix freestanding item gives.
Fix mysterious item model colors.

* Fix bombchu bowling mystery.

* Remove bowling bomchus check obfuscation (unused, removed in v3).
2024-05-06 19:17:08 -05:00
Malkierian 715bf39d43
Incorporate LUS CMake CVar system (#4093)
* Incorporate LUS CMake CVar system.
Customize all LUS CMake CVars to align with plans for preset system.
Swap "gOverlayFont" usage back to LUS CVar macro.

* Change CMake sets to use the cache to allow for including LUS's file for the add_compile_defines and remove the duplication on SoH's side.

* Move SoH CMake CVars to `soh-cvars.cmake` for clarity.
2024-05-01 14:48:51 -04:00
briaguya 552bb2886f
support lus renamespacing (#4075) 2024-04-28 21:36:44 -04:00
Malkierian 33aef87907
CVar Macro Cleanup (#4062)
* Standardized CVar macros to have `CVAR_` at the front instead of the end.
Removed excluded and replaced sequence macros.

* Missed a few developer CVars outside of `SohMenuBar.cpp`

* 1 more.
2024-04-21 10:25:06 -05:00
Malkierian e2622af004
Step 3 of CVar macro/sectionalizing: Dev Tools, Cheats, Audio Editor, Remote (#4030)
* Swapped Audio Editor CVars.

* Swapped Cheat CVars.

* Swapped Developer Tools CVars. Also a couple General CVars.

* Added REMOTE_CVAR.
Swapped Remote CVars.

* Missed an include.
2024-04-20 18:56:32 +00:00
Malkierian 694a876a70
Step 2 of CVar macro/sectionalizing: Trackers/Windows (#3238)
* Add all macros.

Replace all randomizer seed setting CVars with appropriate macro.

Cleaned up non-gameplay-critical things that are part of Spock Race rando presets (like RTA timing, displaying timer, displaying the glitch lineup tick, or Fast File Select).

* Wrong slash...

* Fix DEVELOPER_CVAR macro.
Add GENERAL_CVAR macro.

* Change Item Tracker CVars, including open window CVar.

* Swapped open window CVars.

* Swapped Entrance Tracker CVars.

* Swapped Check Tracker CVars.
Changed Item Tracker "HudEditMode" to "Draggable".

* Renamed `RANDOMIZER_CVAR` to `RANDO_ENHANCEMENT_CVAR`.
Swapped rando enhancement CVars.

* Mirroring last commit from part 1 in randomizer.cpp

* Another mirror from pt 1
2024-04-20 18:34:02 +00:00
Malkierian b045689df1
Step 1 of CVar macro/sectionalizing: Randomizer Settings (#3206)
* Add all macros.

Replace all randomizer seed setting CVars with appropriate macro.

Cleaned up non-gameplay-critical things that are part of Spock Race rando presets (like RTA timing, displaying timer, displaying the glitch lineup tick, or Fast File Select).

* Wrong slash...

* Forgot "gManualSeedEntry".

* Renamed CVars from "Mq..." to "MQ...".
2024-04-20 09:29:19 -05:00
briaguya 375349e4f7
Support font as resource LUS changes (#3993) 2024-03-04 23:36:23 -05:00
Adam Bird 5db4ce0b53 Merge remote-tracking branch 'origin/develop-macready' into mergeDevelopMacreadyJan31 2024-01-31 18:12:06 -05:00
Archez 1da1b1a2bb
Tweak: Improve pause menu dungeon map performance (#3773)
* add map palettes per pulse to leverage shader caching

* use unregister blended with kaleido maps

* use Gfx_TextureCacheDelete for KD lava

* bump lus

* add miss tex clears for KD
2024-01-15 09:39:54 -06:00
Adam Bird 03da69d7b7 Merge tag '8.0.4' into HEAD
MacReady Echo
2023-12-18 00:34:59 -05:00
Garrett Cox fcf2141266
Fix JSON parsing every frame on file select (#3513)
* Fix JSON parsing every frame on file select

* string (#73)

---------

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
2023-12-16 21:40:09 -05:00
Garrett Cox 1fea642f33
Fix OnItemReceive hook for items in the extendedVanillaGetItem table (#3063) 2023-12-04 07:26:55 -06:00
briaguya 351f896cfa Merge branch 'develop' into delta-to-dev 2023-11-29 02:16:54 -05:00
Garrett Cox fdcd9a7508
Race Integrity QoL (#3445)
* Add gDisableChangingSettings

* Add support for dropping a config file to overwrite CVars
2023-11-28 23:42:37 -05:00
Adam Bird f4e4545180
Re-implement King Dodongo's Lava texture effects (#3434)
* fix alt backgrounds not always loading

* include gfx lookup with the original unload

* Add hook for alt toggle

* handle cpu modified texture for kd lava

* malloc array instead of illegal initialize
2023-11-23 09:07:30 -05:00
briaguya 76e90c0928
Controllers (#3378)
* lay some groundwork

* use custom window (which is currently identical to the LUS window)

* start making it shippy

* start moving stuff out of gamecontroleditor

* clean up shouldrumble

* include the other way

* wii u

* latest lus main

* notch snap angle buttons

* buttons on all the sliders

* just use a hidden id

* handle debug for port 2 and rename tabs so everything fits

* button line buttons look better

* padding fixed

* clang format

* bump to latest LUS main

* big buttons

* just default the analog stick options to open for now

* fix wii u build

* bonus: make it all scale-aware

* clang format

* fix horizontal scrolling

* fix all +/- buttons

* keyboard set defaults

* axis threshold helper text

* bonus: test rumble button

* clang format

* fix otrexporter submodule

* bump to latest lus main
2023-11-20 08:02:15 -05:00
Adam Bird e66eb8756d
Fix: Prevent patching custom models (#3367)
* fix prevent patching custom models

* prevent patching chests textures for custom chest models

* add tooltip for cosmetic editor about custom models

* chest texture handling for alt toggles
2023-11-14 16:37:03 -05:00
Malkierian 8745881815
Add UI scaling combobox with 4 options (one smaller than default, two larger) and experimental tag. (#3037) 2023-11-05 21:21:44 -05:00
Malkierian 70a83f647f
Check Tracker Update (#2668)
* Initial commit. What works so far:

Data file loads, saves, deletes, and is created properly.
 - Need to run `HasItemBeenCollected` when creating in case of mid-seed regen.
Organized checks into maps set by area.
Areas show in tracker.

 - Checks pulled from checkObjectsByArea are not currently listed.
 - Areas are being assumed completed and hidden at the start.

* Checks now populate. Still not counting area totals properly.

* Don't track RC_LINKS_POCKET in the data file, and instead manually add it in every time a save is load. rcObjects doesn't contain Link's Pocket location (duh).

* Moved ItemReceive hook to randomizer_check_tracker.cpp.

Skipped items are properly sorted and formatted.

Saved items contribute to an area's gotten/skipped checks on load.

Changed skipped items default main color to gray.

General code cleanup.

* Skipped checks now contribute to area totals for area completion logic.

* Mid-menu rework transfer.

* Started check lookup on item receive.
Tried to enable scum checking on save.

* Fixed scum check on save.

* More code cleanup, which revealed some issues with loading and saving. Loading now works 100%, but entries in checkTrackerData are disappearing in code somewhere, causing issues with later checks.

Scummed color now displays properly.

Collected but unsaved displays properly.

Unchecked, Skipped, Seen and Scummed checks all have arrows for skipping/unskipping.

Counts a little messed up, probably double adding skips.

* Fixed item counts being off across resets. Restarts were fine.

* Beginning of rework for individual check updates. Adds `Actor lastCheck` to PlayState to allow assigning of last actor to give an item. This allows precise tracking of GS, freestanding PoH, etc. Works for chests too. Currently does not work for shops, unknown for normal NPC gives. Doesn't track last gives for non-checks, like drops from grass, pots, crates, etc.

* Actor-based checks fully fleshed out, but can't help with sale-based checks. Implemented `pendingSaleCheck` to back out of an RC check cycle if `gSaveContext->pendingSale` is not NONE when `OnItemReceive` is called, processed through `OnSaleEnd`. This should be the final change necessary to streamline the checks.

* Temporary hook to message box close to tie in trackers for non-gs/chest actors that aren't added to `GetCheckFromActor`. This triggers a 2-frame countdown to check with `HasItemBeenCollected` since half of the methods in there aren't updated until after a text box closes.

Added scene tracking to get last scene so that checks in scenes that span several overworld areas could be tied to their areas properly.

Modified tracker data creation to apply Link's Pocket and Song from Impa conditionally based on randomizer settings instead of just being assumed to be done. May need modification for checking click and drag spoiler loading.

Removed the scene equivalence check from CheckChecks so that an entire area is checked each time to avoid issues with, e.g., leaving a shop before a pending sale finishes.

* Changed check data creation to use RSKs from gRandomizer to account for settings loaded from drag and drop spoilers.

* Beginning of tracker code organization.

Changed check color defaults.

* Reverted moving tracker colors to header.

Some individual check fixes.

* Missed something from previous merge?

* Removed last remnant of removed performance mode.

* Better handle checking when skullsanity is off.

* Song checks sceneIDs don't match the scenes they're actually in for some reason. Removed that check.

* SaleEnd checks don't need the GetItemEntry parameter. Also set a flag that should prevent the check tracker from running during vanilla saves should that not be resolved by the time it's merged.

* Attempting to have only the relevant checks added to the tracker data, as well as showing vanilla checks for non-rando saves. Not working yet (everything is displayed in vanilla).

* Added vanilla check tracker population via `vanillaCheck` bool in `RandomizerCheckObject`. This is also added to `IsVisibleInImGui` to handle file loading and saving to eliminate checks that aren't part of vanilla or the rando seed.

Implemented deleted tracker data file recreation.

Added some extra item name text checks. Songs are still... tricky, so they stay blank.

Utilize local copies of the randomizer check objects that are applicable for performance purposes.

Fixed vanilla item-giving cutscene crashes when triggered mid-transition.

* Apparently not all toolchains can handle macro instantiation without all parameters, like VS can.

* Fixed scummed detail color not showing properly on tracker.

* Fixed dungeon area totals and GS checks not functioning properly.

* Major revamp of checking code. Doesn't rely on `GetCheckFromActor` at all anymore, but instead simply sets a flag to evaluate a number of checks in an area every frame until the check that was gotten is identified. With the new setup, it's much less hardware intensive, and at 60fps 6 checks per frame shows no noticeable effect on framerate. I can envision needing to add a collectedCount in order to account for times when two checks are gotten one right after the other.

Changed area scroll to happen from `OnTransitionEnd`, and allow for scrolling in bazaar (was disabled previously because it would jump back and forth between Kak and Market while you were in one).

Also setup area check order updating by area instead of all at the same time.

* Fixed shooting gallery not reporting proper area.

Prevent checks from actually happening if area is RCAREA_INVALID, now that all areas are reporting something if they have checks.

Fixed `GetCheckArea()` not updating checks for standard scenes.

Lots of vanilla tracking updates, mainly manual checks for gems, medallions and songs, since the often don't have proper scenes in the data.

Prevent vanilla from triggering check loops if junk items are collected.

Fixed sorting based on saved vs collected.

Prevent item name display for vanilla runs.

Change coloring of checks so the check name reflects status in vanilla runs.

* Fixed "Recheck Area" button erroneously adding to an area's check totals?

* Fix DMC vanilla checks.

* Fix check tracker data recreation on data file loss.

Removed redundant file exists check from SaveTrackerDataHook, as it doesn't matter if it exists or not at that point.

Limited check loops to 3 to avoid infinite check loops on non-check/junk item pickup.

Added more checks to disable tracker operations if a save is not running.

Changed check ordering to put boss reward and heart container checks at the end of whatever RCSHOW group they belong to.

* Fixed IsRunning calculation.

Further improving vanilla checking.

Starting framework for checking medallions, stones, and songs on data file recreation.

Fixed medallion check collection.

Added GIFT_FROM_SAGES to check list for vanilla file for tracking light medallion.

Added check loop limitation to prevent infinite checking after picking up junk item from the ground.

* Finished vanilla file recreation and recheck (songs and dungeon rewards all check properly now). This includes deku shield with KF shop item 3.

Finished Gift from Raoru light medallion tracking for vanilla.

Commented all CheckByScene functionality for now.

* Fixed new save data file creation.

Disabled entrance area calculation for now, as it only tracks the previous entrance for some reason.

Fixed area detection for ToT checks.

* GetCheckArea() now utilizes EntranceData almost exclusively, via either `gSaveContext.entranceIndex` or the entrance tracker's `currentGrottoId` in the case of grottos.

This also means that EVERYTHING CAN AUTOSCROLL NOW. Entrance shuffles are now much easier to track.

Autoscroll is now also triggered on save, just in case someone isn't autosaving and has a lot of checks that get converted to saved.

* Fixed missing GS check in LW.

* Added area scroll on toggling Show Hidden Items. May configure differently later.

Fixed area detection for entrances in Gerudo Fortress/Valley and Collossus. Haunted wasteland doesn't autoscroll due to a bug in `OnTransitionEnd` hook, but checks still evaluate properly there.

Rely on scene-based area detection if scene is a main overworld or dungeon scene.

* Fixed grotto detection when shuffle is off.

* Small code cleanup.

Fixed Colossus hand chest checks.

* Missing lus bump from merge conflict resolution

* Fixed Colossus Grotto making `GetCheckArea` return Wasteland.

* Improved OnItemReceive processing for non-token GS checks, since they can sometimes take long enough for the checking process to time out before the item is registered as received.

* First attempt at thread safety for tracker data file writing. Seems to work, but might need more testing.

* Fixed Recheck Area not unskipping items that register as saved.

Improved delayed saving with autosaving, as the autosave triggered quite often before the tracker data save, making things not properly register as saved.

* merge cleanup

* Converted check tracker data to the sectional saves, adding `CheckTrackerData` to `SaveContext`.

Implemented section ID returning and fullSave boolean passing to section functions from my PR temporarily for it to work properly.

Moved `RandomizerCheckTrackerData` enum to `randomizerTypes.h` to accommodate that.

Changed `Randomizer_SaveInit` to a `SaveManager::InitFunc` to allow for other randomizer-dependent sections to be initialized after that. Required a little refactoring to maintain intro cutscene skip when starting a randomizer file.

* Revert section index return and randomizer init changes. Will need to wait on yet more changes to main.

* Fixed check tracker initialization (shouldn't be tied to window initialization), restored saving/loading functionality.

* Removed `CheckTracker::Init` and put SaveManager calls in `CheckTrackerWindow::InitElement`. Also a bit of cleanup from transition back to save file use.

* Fixed tracker displaying check categories while file not loaded.

* Fix Darunia's Joy check not marking in vanilla.

* Fix autosave not triggering change from collected to saved in tracker data.

* Changed default colors for scummed and collected display.

* Merge upgrade code cleanup.

* Add `OnTransitionEnd` calls to sandstorm transitions both to and from Wasteland. Also improved `gSaveContext.lastScene` assignment for both transition types. Allowed a bit of cleanup in `GetCheckArea`.

* Added `StateButton`, a button like `ArrowButton` but that allows text instead of arrow icons. Apparently the changes from ArrowButton to StateButton happened in a previous commit...

* Changed section name to `trackerDataCheck` to force SoH to load it after the randomizer section, as it required some randoSettings to be loaded first, and nothing else I tried to make the randomizer section load before it worked. This hacks a solution to checks not displaying on fast file load to a specific slot.

F*** you, SaveManager, and f*** you too, JSON.

* Forgot to change the section string for loading with the name change.

* Fix check ordering for checks that trigger the autosave.

* Adds option to remove right-side shop items (slots 1-4) from the tracker list. Enabled by default.

* Fix default state of Hide Shop Right Checks checkbox.

* Fixes grotto and great fairy scrolling and checks.

Fixes array overflow from `checkTrackerData` which was creating the issue trying to load the base and randomizer sections first, among other things.

That also fixed the massive file loads that were being exhibited in debug mode.

* Fix shooting galleries being set as collected again when being played a second time after getting the checks.

* Fix Bazaar autoscroll.

* Add Saria's Song to `GetCheckFromActor` and removed some limitations from the messageCloseCheck function to make that check track properly.

* Fix Song from Impa check.

Implemented prevention for multiple "collections" of great fairies, just in case getting the health refill would trigger it with the previous setup.

* Fix ice traps on GS tokens not triggering OnItemReceive.

* Complete fix for ice trap collection from GS.

Add autoscroll when clicking "Expand All".

* Add `OnShopSlotChange` with cursorSlot and basePrice parameters.

* Fixed include in en_ossan for shop slot hook.

Added registration for `OnShopSlotChange` in the tracker, storing the price in a new `price` field in `CheckTrackerData`.

Added "seen" functionality to shop checks. Displays the model item name upon first entering a shop, adding the price and switching to trickName (if it's an ice trap) upon navigating to the slot in buy mode, triggered by an invisible "identified" status that mirrors "seen" in every other way.

Added tooltips to most options for check tracker color picking to describe what each status actually means.

* `std::format` pls

* So apparently std::format just decided to break with the latest merge from develop, but fmt::format exists and works?

* Removed the last vestiges of `locationsSkipped`. Other general code and formatting cleanups.

Moved `IsGameRunning` to `OTRGlobals` so the item tracker could also access it.

Used preceding to "fix" item and bottle display in the item tracker on startup.

* Some more code cleanup.

Removed "Recheck Area" button and relevant code.

Backported changes to Anchor branch applicable for single-player, including making a checkAreas vector and structuring the frame by frame checks around that. Also includes fix for Silver Gauntlets and Mirror Shield check collection crash associated with those changes.

Fixed Kakariko Bazaar "seen" updates.

Fixed tracker window not showing on initial load like it should.

* Forgot 1 formatting fix.

* Removed conditions for showing Song from Impa (isn't junk under certain conditions, so should show all the time).

* Fix vanilla checks, add Zelda's Letter and Malon's Egg to manual check collection.

Fix autoscroll while in child stealth section.

* Fix crash in Happy Mask Shop in OnSlotChange (referenced non-existent shop id in a tracker-specific enum).

* General code cleanup.

* Missed one reversion.

* One more.

* Fix column alignment in `randomizer_check_objects`.

* Fix file encoding on `randomizer_check_tracker`. Again.

* Fix indentation for `actualItemtrackerItemMap`. Also removed unnecessary parts of the map.

* Rename `HasEqItem` to `HasEquipment`.

* Slightly better indentation for `actualItemTrackerItemMap`.

* Add magic bean salesman to vanilla check tracking, and genericized deku shield to trigger KF shop item 3 wherever you get the shield.

Renamed `vanillaCheck` to `vanillaHundoCheck` to (supposedly) clarify the meaning of the usage.

* One more rename to `vanillaCompletion` to avoid possible confusion with 100% speedrun conditions.

* give me a break XD

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>

* Changes suggested by briaguya (rename `RandomizerCheckShow` to `Status`, unused code, newline formatting)

* Remove unused `itemNames` table.

* Remove `IsGameRunning` in favor of `GameInteractor::IsSaveLoaded`.

* Restore anti-spoiler functionality for dungeons with dungeon maps.

* Review cleanup.

* Fix prices not showing for Kak bazaar items.

---------

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
2023-10-04 10:03:36 -05:00
Adam Bird 633bec3a1c Merge remote-tracking branch 'origin/develop' into mergeSuluBravo 2023-08-13 20:50:59 -04:00
Christopher Leggett b94d7f135d
#3040 give em to the distro packagers + LUS submodule bump (#3119)
* implement for install method packagers

* use std::filesystem::temp_directory_path

* absolutely impeccable

* include libultraship proof

* fix windows compilation

* rename "Installation" back to "Bundle"

---------

Co-authored-by: Alto1772 <56553686+Alto1772@users.noreply.github.com>
2023-08-13 18:45:45 -04:00
Adam Bird b7dca5d5a8
Fix: Various PAL1.1 asset offsets and Main Menu options screen (#3045)
* fix pal11 ganondorf falling platform offsets

* fix pal11 dins fire offsets

* add game region and platform methods

* fix pal11 file menu options

* move
2023-07-03 10:29:06 -04:00
louist103 acfc04d0ac
Add an error for implicit functions (#3017)
* Add the flag and fix errors

* switch assert and skin matrix

* new LUS

* Use normal assert

* hopefully fix WiiU

Signed-off-by: Louis <louist103@pop-os.localdomain>

---------

Signed-off-by: Louis <louist103@pop-os.localdomain>
Co-authored-by: Louis <louist103@pop-os.localdomain>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
2023-06-27 19:53:35 -04:00
briaguya 2308ab8823
build soh with LUS 1.0.0 (#2881)
* Bump LUS

* Ship -> LUS namespace change

* z_scene_otr Ship -> LUS namespace

* Starting to get SoH to build with LUS imgui changes.

* start stuff

* gamecontroleditor build issues resolved maybe

* cosmetics editor and what not

* console

* actor viewer

* more stuff

* more stuff

* on to errors that make sense

* putting this down for a bit

* no idea what these errors mean now

* some kind of progress maybe

* latest lus main

* more

* back to linker errors and being lost

* Fixes command function signature.

* More fixes

* Even more fixes

* Bump LUS

* More Fixes.

* Fixes even more errors.

* lus bump

* input editor as var

* audio editor working

* it builds with this

* bump lus

* it opens

* bump lus to latest main again

* make sure to do all the command registering in debugconsole

* lus and what not

* switch type stuff plz

* undo

* do the thing that fixes the thing

* fix mac?

* correctly show/hide menubar on boot

* bump lus

* input blocking updates

* bump lus

* Bump LUS

* Press F1 to open enhancement menus moved to SoH

* lus and rendering backend stuff

* audio backend and lus

* Bump LUS

* Fixes WindowBackend dropdown

* Bump LUS

* misc -> utils and moves binarytools to utils.

* Window refactor

* bump lus

* make it work

* Fixes for moved files again

* Bump LUS

* Mercury -> Config

* Bump LUS

* Reacts to removed LUS hooks and bump LUS

* Remove Hook: GfxInit

* Removes debug audio_setgamevolume to 1

* use non-crashing branch of lus

* fix: make audio init work without hooks

* game icon stuff

* multifix bmp

* use input viewer class branch for now

* just "Ship" it's cleaner

* Bump LUS

* Removed ExitGame hook.

* Bump LUS

* Hook system removed from LUS.

* More LUS updates

* Changes to make window position saving.

* Bump LUS

* Bump LUS (for real)

* LUS resources now return a specialized pointer.

* Bump LUS

* Fixes issue in SetPathways::GetPointerSize

* Bump LUS to 1.0.0

* builds but crashes

* fix crash

* better macro names in debug console

* remove commeted out line

* remove redundant check tracker settings window logic

* remove commented out line

* move the *

* remove extra seqplayers enum def

* this sneaky little guy was hiding behind a wii u ifdef

* remove extra check tracker header

---------

Co-authored-by: Kenix <kenixwhisperwind@gmail.com>
Co-authored-by: briaguya <briaguya@alice>
2023-06-03 15:27:45 -04:00
Adam Bird c9d24f2e98
Fix: Better debug warp MQ detection and other warp menu bugs (#2932)
* fix: add mq detection to better debug warp

* replace special characters for debug warp translations

* reorder better debug warp printing

* adjust french translation
2023-06-01 22:00:45 -04:00
aMannus 2957dc61c3
[Feature] Boss Rush (#2923)
* Ganon(dorf) cutscene skips

* Remove leftover code

* Load into chamber of sages

* Fix loading into chamber without fast file select

* Boss warps in chamber done

* Change warps back to chamber

* Initial proof of concept done

* ganon(dorf) cutscene skips

* Code cleanup & auto age equipment

* Gameplay stats timer + tweaks

* Scuffed timer

* Better timer

* remove arena props + fix arena exits

* Fix blue warps

* Attempt to fix build

* Fix build again

* And again..

* Try no. 9001

* Handle dying and saving

* Child link face fire medallion

* Fix build

* Fix warps after reset/death

* Disable doors and move player spawns in boss rooms

* Fix boss rush logo rendering

* Start of ingame options menu

* File Select cleanup

* Fix build

* Render char text PoC

* Move functions to be more generic

* Fix build

* Fix other builds

* Initial text scaling/kerning

* Special characters prep

* All special characters work now

* Attempt to fix build

* Fix build question mark

* Finish all kerning

* Start of ingame options menu with vertical scrolling

* Barebones functional options menu

* More options menu progress

* More visual elements for options menu

* Options menu visual changes, implement all options, tons of cleanup

* Cleanup and comments

* Shorter enums

* More options

* Change default heart count

* Finish French translations

* Implement timer in cosmetics editor

* Uncomment timer requirement

* Variable name change

* German translation & small UI tweaks

* Animated up/down arrows in options UI

* Better arrows in options UI

* Cleaner timer + make it usable for general gameplay

* More cleanup + ganon & ganondorf boss option

* Implement never heal option

* Slight up arrow in options UI tweak

* Add BGS option

* Reintroduce ganondorf cutscene skip

* Change encoding to UTF on bossrush.cpp

* Fix build hopefully

* Fixed static variables leading to options not properly resetting

* Fix BR completed timestamp

* Change timer to render on top of everything

* Offset final BR time by 0.1 second from boss timestamps

* Add missing check for boss rush

* Implement soh_assets.h

* Revert merge mistake

* Fix special characters with UTF-8

* Fix build

* here's the fix you can merge from your phone

* Fix quest select crash with oot.otr only

* Use OoT's kerning

* Fix HD textures on options menu

* Fix special character kerning

* "Heal every boss" fixes

* Seperate headers + bunny hood option

* Remove GetUnixTimestamp() externing

* Clean up extern "C"'s

* Address review comments

* Fix build question mark

* Remove accidental styling change

---------

Co-authored-by: briaguya <briaguya@alice>
2023-06-01 21:40:10 -04:00
Christopher Leggett fe6705cc4d
Merge pull request #2906 from HarbourMasters/develop-spock
Spock -> develop
2023-05-23 09:18:15 -04:00
Garrett Cox 5de1240391
Cleanup gameplay stats code/UI and support RTA timing (#2862) 2023-05-21 18:35:56 -04:00
Christopher Leggett 4d02d89e03
Fixes buying songs crash on Switch (#2899) 2023-05-20 09:24:02 -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
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
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
briaguya 4166dbf907
spockalicious (#2751)
* Rough mockup of LUS XML loading

* Updated code for merge

* Loading from FS support and custom DList WIP implementation

* Added current directory support to F3D and impl most of the dlist cmds

* WIP Skeleton support

* Almost done

* Rebase fixes

* Submodule updates

* HD Texture Support

* Fixes

* bump lus

* fix exporter build, header update

* soh builds

* setMesh image path cleanup

* Update soh/src/overlays/actors/ovl_player_actor/z_player.c

* Update soh/src/overlays/actors/ovl_player_actor/z_player.c

* Update OTRExporter/OTRExporter/Main.cpp

* Update ZAPDTR/ZAPD/ZResource.h

* Update soh/src/code/z_skelanime.c

* Update OTRExporter/OTRExporter/Main.cpp

* Fixed jpeg backgrounds and decreased icon buffer size

* Bump lus

* Increased even more the buffer because it crashes on long texts

* Removed print because sometimes the if is not triggered when the image is already byteswapped

* fix non-windows build

* fix build

Co-authored-by: Kenix <kenixwhisperwind@gmail.com>

* add hd checkbox

* Various fixes for custom model support (#23)

* Some fixes

* Updated LUS Version

* Fixed issue with Link Skirt on pause menu

* Added CVar for custom link model changes

* Fixed headers

* Additional header fixes

* Tweaks

* Unload HD game assets on scene transition. (#16)

* Unload game assets on scene transition.

* Bump LUS

* Unloads all HD assets on scene transition.

* Only unload hd assets if hd assets are turned on.

* Fixes issues on toggling between HD and non HD assets.

---------

Co-authored-by: briaguya <briaguya@alice>

* fix: actually load hd debug font (#27)

* fix: actually load hd debug font

* toggle debug text correctly

---------

Co-authored-by: briaguya <briaguya>

* Yes. (#28)

* Merge branch 'develop' into dev-to-ghost

* HD Skeleton Swapping and Language Fixes (#32)

* Yes.

* HD Skeleton Swapping and Language Fixes

* Test

* Fixed issues with ganon cape (#34)

* Fixed Bongo Bongo Crash (#35)

* Added HD Assets Toggle (#37)

* Ivan the Fairy - Coop Mode (#36)

* wip

* hookshotable ivan

* added hookshot item

* new items & changes & fixes & restored navi

* farore, din and nayru's spells are done

* fixed slingshot & bow

* added more items supported

* done with all main items

* bug fixes & ready

* added imgui button

* wip

* hookshotable ivan

* added hookshot item

* new items & changes & fixes & restored navi

* farore, din and nayru's spells are done

* fixed slingshot & bow

* added more items supported

* fix own dungeon items on shuffled boss rooms (#2683)

* bump lus (#2692)

* fix: lowercase package names for vcpkg (#2693)

vcpkg was throwing an error `error: invalid character in package name (must be lowercase, digits, '-')`
this updates our calls to `vcpkg_install_packages` to use lowercase package names instead of uppercase

* fix death mountain cloud in rando (#2691)

* Fix: Switch Age No Longer Reloads Start Room (#2679)

* [Reduced Clutter] Disable Hot/Underwater Warning Text (#2684)

* Disable Warning Text

* Moved to Reduced Clutter

* done with all main items

* bug fixes & ready

* fix: process roms in consistent order (#2696)

* chore: move rando savefile setup and document flags (#2697)

* remove rando save init from sram

* move rando savefile init logic and set more flags

* document flags for rando save creation

* Fix: Use correct fps value for frame interpolation with match refresh rate (#2694)

* Fix: Kak GS placement on construction site (#2695)

* added imgui button

* addressed kenix's comments

* fixed useless null

* added rupee dash mode in extra modes

* changed menu position

---------

Co-authored-by: Adam Bird <Archez@users.noreply.github.com>
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
Co-authored-by: inspectredc <78732756+inspectredc@users.noreply.github.com>
Co-authored-by: Patrick12115 <115201185+Patrick12115@users.noreply.github.com>

* LUS Scancodes (#42)

* Added HD Assets Toggle

* Switched out SDL for LUS scancodes

* Ivan tweaks (#45)

* Magic consumption slowed down;
Bosses now affected by Ivan's Din spell

* Adjust magic timer

* clean up imgui

* model fixes/improvements (#50)

* replace `gUseCustomLinkModel` with custom resource check

* handle adult/child

* bump lus

* fix model switching with tab

* use lus main

* fix carpet man (#52)

Co-authored-by: Rozelette <Rozelette@users.noreply.github.com>

* get ship model and lus texture into soh.otr, use `gAuthenticLogo` to toggle between ship and authentic (#55)

* Use libultra features for CPU-modified textures (#40)

* Use libultra features for CPU-modified textures

* Comment

* bump lus on ghost (#58)

* fix: properly use `Interface_LoadActionLabel` to display start button text (#61)

* Changes hd -> alt for texture replacement. (#65)

* Changes hd -> alt for texture replacement.

* Renames variables in gfxprint for hd -> alt change.

* Update soh/soh/resource/type/Skeleton.cpp

---------

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>

* Fixes kaleido dungeon maps (#67)

* skeleton stuff (#69)

* comment out wii u build (#70)

* bump lus (#71)

* Rework readme (#72)

* Update README.md

* docs

* put custom music docs somewhere

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* dark/light title image

* lus

* Update README.md

* Fixed vanilla minimap (#73)

* Fixed vanilla minimap

* Workaround for pulsing SD maps with non-broken HD maps.

---------

Co-authored-by: Christopher Leggett <chris@leggett.dev>

* Skeleton fix fixed (#75)

* WIP skelton patcher fix

* Fixes skeleton reference change.

* Adds const back to name in ResourceMgr_LoadSkeletonByName

---------

Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: Kenix <kenixwhisperwind@gmail.com>

* Fixes z_message_otr memory leak.

* Update soh/soh/z_message_OTR.cpp

* Update soh/src/code/game.c

* docs: add how to find otr files to switch instructions (#78)

* bump lus (#79)

* comment out RegisterBlendedTexture in king d (#80)

---------

Co-authored-by: Nicholas Estelami <NEstelami@users.noreply.github.com>
Co-authored-by: David Chavez <david@dcvz.io>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>
Co-authored-by: KiritoDv <kiritodev01@gmail.com>
Co-authored-by: briaguya <briaguya>
Co-authored-by: Ralphie Morell <stratomaster64@gmail.com>
Co-authored-by: MelonSpeedruns <melonspeedruns@outlook.com>
Co-authored-by: Adam Bird <Archez@users.noreply.github.com>
Co-authored-by: inspectredc <78732756+inspectredc@users.noreply.github.com>
Co-authored-by: Patrick12115 <115201185+Patrick12115@users.noreply.github.com>
Co-authored-by: Rozelette <Rozelette@users.noreply.github.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: Lywx <36680385+KiritoDv@users.noreply.github.com>
2023-04-27 19:20:41 -04:00
briaguya 44906598e4
fix: properly display static background scenes (#2669) 2023-04-04 03:12:09 -04:00
Malkierian 04d0cd8532
Adds `OnTransitionEnd` hook to `GameInteractor`, called at the end of a transition after all mid-transition setup is called. (#2635)
Transitions final autosave location to `OnTransitionEnd`.

Adds functionality to autosave to set a delayed save flag if AutoSave is set to Major or All Items and one is obtained in a grotto, to avoid grotto autosaving but still provide for the autosave when location-based saving is off.

Fixes small bug with item lookup where sometimes an item's `modIndex` would sometimes be reported one way, but the way Randomizer does things it would be in a the other `modIndex`, and the lookup would fail.

Minor variable name clarification in ItemTableManager.

Modifies AutoSave to account for item ID overlap from `MOD_RANDOMIZER` table (all items in the randomizer table is considered major for AutoSave purposes except ice traps).
2023-04-02 04:47:23 -04:00
briaguya 356d959b70
bump lus 2023-03-14 02:45:19 -04:00
David Chavez b13f6f4b70
[Interpolation] Allow Matching & Limit Max FPS (#2466) 2023-03-01 16:12:55 +01:00
David Chavez 109345e94d
[Resources] Properly encode soh textures and remove raw load (#2548) 2023-03-01 10:18:26 +01:00
David Chavez 2cb4a6ee7e
[Resources] Cleanup old hacks and rename (#2546) 2023-02-27 02:55:40 +01:00
Christopher Leggett 1b9962dfc2
Enhancement: Adds Slider for Duration of Sequence Names on the Overlay (#2375)
* New function: overlay text duration in seconds.

`Overlay_DisplayText` took a float as an argument, with no clear indication of what that float represented. That float also evaluates to different durations given different frame rates. However, since we know what the frame rate should be at any given time (since it's stored in a CVar) we can calculate what this duration should be based on the number of seconds we want the overlay to be displayed. That's what `Overlay_DisplayText_Seconds` does.

* Adds Slider for Overlay Sequence Name Durations
2023-01-20 21:48:17 -05:00
briaguya ba13e6b2c4 refactor: use LUS 1.0 RC
Co-authored-by: kenix3 <kenixwhisperwind@gmail.com>
Co-authored-by: David Chavez <david@dcvz.io>
Co-authored-by: KiritoDv <kiritodev01@gmail.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
2023-01-17 00:33:56 -05:00
briaguya f42f86e3ef
fix: make fisherman rumble text work (#2279)
we weren't correctly setting the pakType in padMgr because
the depreciated `gRumbleEnabled` cvar was being checked
2022-12-26 06:37:40 -05:00
briaguya 73873a6dbc
fix: no longer leak memory, invalidate textures properly (#2223)
* Revert "Fix Ganondorf boss battle ending (MQ only) (#2072)"

This reverts commit 52b896271c.

* yolo this should work

* finish comment

* see if this doesn't lag switches!

* formatting

* formatting

Co-authored-by: briaguya <briaguya@alice>
2022-12-21 01:26:13 -05:00
Christopher Leggett 8c8c761726
Custom Sequences (#2066)
* Allows OTRExporter to parse pairs of .seq and .meta files

* Gets added sequences available to SfxEditor and playing in game.

* Some cleanup of the names appearing in the SfxEditor.

* Moves sequence swap lower in the audio command stack.

* Increases temp cache memory available on title/file-select screen.

Certain sequences wouldn't play on the file select and title screen
because they were too large to be cached.

* Introduces workaround for 255 sequence limit.

* Bug fixes and cleanup.

* Fixes bug where fanfares would sometimes disable the sequence player.

* Fixes bug causing certain areas to discard caches when loading enemy music.

* Fixes potential config-related crash by replacing invalid characters.

* Allows custom bgm to play in all BGM categories.

* Properly randomizes the custom tracks.

* Moves custom sequences to a patch OTR.

* If custom music was not loaded, fall back to default values.

* Prevents OOB crash on Synthwave array and adds octave drop feature.

Added octave drop to experimental features, which drops the octave of
a note that is too high for the audio engine to actually play. Without
this, some custom sequences have notes which cap at a specific value
and sound terrible. At least with this they will still harmonize with
the other notes. Experimental tab added to the SfxEditor to house
the checkbox for the octave drop feature.

* Adds more pool memory for a few tracks that couldn't fit.

* Some cleanup on the generated music archive process.

* Fixes missed memory boost from earlier.

* Adds ability to remove enemy proximity music.

* Applies correct cache policy to fanfares to prevent unloading sequences.

* Removes case-sensitiveness of the sequence type.

* Fixes not reverting to sequence after miniboss.

* Fixes transition to/from miniboss (again) and ocarina bug.

To be clear, fixes the more rampant portable ocarina bug present in my earlier builds, not the authentic one.

* Finally properly fixes transitions between sequences

For miniboss fights and SfxEditor previews.

* Removes unneeded boolean expression.

* Adds randomize button to individual SFX Editor entries.

* Fixes lost woods music overwriting goron city music.

* Plays swapped Hyrule Field music when transitioning to daytime.

* Fixes swapping Gerudo Valley music when transitioning from daytime.

* Updates custom sequence OTRPath to match SequenceOTRizer.

* Reverts changes to OTRExporter in favor of external tool

* Fixes formatting issues.

* Attempts to fix formatting issue in git diff.

* Should actually fix formatting issues.

* Should fix mac/linux exclusive build error.

* Fixes segfault on macos.

* sort custom seqs

* Fixes audioseq crash when under 255 seqs

* Removes magic numbers.

* Removes commented out code.

* fixes formatting in SfxEditor.h

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>

* Cleans up the one hardcoded QueueSeqCmd call.

* Fixes unneeded erroneous memory boost applied earlier.

* Applies additional formatting/cleanliness suggestions from review

* Fixes small logic bug

Co-authored-by: RaelCappra <rael.cappra@gmail.com>
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
2022-12-08 23:07:45 -05:00
Adam Bird 8337e4e24f
Rando: Entrance Tracker v1 (#2005)
* initial pass for entrance tracker

* add search meta tags to entrance tracker data; clear entrance tracker on title screen

* rename to use playstate/play

* fix lus imports

* move discovered entrance info to SohStats struct

* Add scene info and highlighting to entrance tracker

* hide undiscovered text when searching

* add comments for entrance tracker

* fix merge conflict error

* account for zora river -> hyrule field water entrance in tracker

* fix assignement error

* remove unneeded defaults from debug file init

* adjust entrance tracker settings and add more search tags

* convert magic numbers to defines; add more comments to entrance tracker; clarify variable names

* add reverse index to entrance tracker data to compare with instead of using strings

* rename variables
2022-12-06 23:44:14 -05:00
Amaro Martínez 52b896271c
Fix Ganondorf boss battle ending (MQ only) (#2072) 2022-12-06 19:24:09 -05:00
GaryOderNichts 5dcc7e41b9
Display all game versions in build info (#1982) 2022-11-20 20:13:54 +01:00
Adam Bird 15a9975200
Entrance Rando (#1760) 2022-11-14 12:13:21 +01:00
briaguya 3914781ebf
Import libultraship as a submodule (#1943)
Co-authored-by: briaguya <briaguya>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: David Chavez <davi@dcvz.io>
2022-11-14 11:22:34 +01:00