Commit Graph

51 Commits

Author SHA1 Message Date
Malkierian 6443a986d9
Final Step of CVar macro/sectionalizing (#4107)
* p

* Missed the prefix renames.

* More missed ones.

* Mostly finished cleanup.
Removed a few CVars and some related functionality.

* Bit more (prepping non-existent title card color editing).

* Resolve gCrowdControl.

* Final cleanup.

* Universal constant, not acceleration...

* Preset CVars.
2024-05-05 14:14:55 -05:00
briaguya 8480f37f77
fetch imgui (#4094) 2024-04-30 22:49:54 -04:00
briaguya 552bb2886f
support lus renamespacing (#4075) 2024-04-28 21:36:44 -04:00
Malkierian 303fe7d906
Swap all cosmetics CVars to macros. (#4065)
Lots of renames.

Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
2024-04-26 02:41:55 +00: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
Garrett Cox 10b6f8cf80
Merge pull request #3945 from HarbourMasters/develop-macready
macready -> develop
2024-02-15 21:21:18 -06:00
Pepe20129 7319e4db57
More player documentation from decomp (#3819)
* FallImpactInfo & AnimSfx stuff

* IA function naming & Player_UseItem

* ActionChange

* Speed modes

* Fix build

* Misc cleanup

* Name Player_Action funcs

* PlayerAgeProperties

* Most of the Player struct

* Update z_player.c

---------

Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
2024-02-15 20:44:46 -06:00
Garrett Cox a84227cbbb
Support hook unregistration (#3538) 2024-02-15 20:08:31 -06:00
Archez 3d3b8bfc5b
Allow IsSaveLoaded to consider debug saves (#3929) 2024-02-15 19:54:35 -06:00
mckinlee 3187564f5b
Pause Warp Enhancement (#3223)
* Pause Warp Enhancement

This commit introduces the PauseWarp mod, a feature that allows players to warp to different locations in the game directly from the pause menu.

- Add PauseWarpState structure to manage flags and cooldowns for the pause warp feature.
- Implement IsStateValid function for state validation.
- Implement ResetStateFlags function to reset all state flags to default values.
- Add InitiateWarp function to handle the initiation of warp sequences.
- Implement HandleWarpConfirmation function to confirm and execute warp actions.
- Implement HandleCooldowns function to manage various cooldown timers.
- Add PauseWarp_Main function as the main logic, called every frame to handle pause warp functionality.
- Map warp song messages to in-game text messages.

* Warp Song Check

-Now if you do not have a warp song you won't be able to select the empty slot and still teleport.

* Added Audio Fanfares and Changed stateFlag1 to PLAYER_STATE1_IN_CUTSCENE

-When selecting a warp song the audio for the applicable warp song will now play for a extra vanilla feel.
-Changed the stateFlag1 because previously it just disabled input allowing enemies to harm you. Now that won't happen because the game is put into a cutscene state.

* Feedback Update

-A new hook was created 'OnPauseMenu' so now PauseWarp_Main is only called when the pause menu is open
-Moved pauswarp.c to the Enhancements folder
-Removed from graph.c

PR Change:
Changing to the main branch instead of sulu

* Feedback Update #2

-Introduced new function 'PauseWarp_Idle' now that 'PauseWarp_Main' is no longer called every frame
-Added C wrapper to access 'GameInteractor::IsSaveLoaded' and scrapped the 'IsStateValid' function
-Added 'PauseWarp_Idle' to the the 'RegisterPauseWarp' function
-Refactored the code some

* Linux Compile Issue

-Added a missing header that was causing a compile issue for linux
-Hopefully, it won't crash

* Minor Bug Fix

-Now link won't get soft locked when warping to the same location twice

* Update libultraship

* Revert "Update libultraship"

This reverts commit 746fc23479.

* Bug Fix
-Added more checks to ensure vanilla behavior when a Ocarina is not in the players inventory.

* WIP

* Done unless I'm missing headers

* now we done

* clean up, these arn't needed anymore

* Rename OnPauseMenu to OnKaleidoUpdate
2024-02-15 19:13: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 86044a1c50
Remote GI Work (#3073)
Co-authored-by: David Chavez <david@dcvz.io>
2023-12-17 13:41:33 -06: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
aMannus 19cede44c3
Merge pull request #3468 from briaguya-ai/delta-to-dev
MacReady Delta -> develop
2023-11-30 00:07:38 +01:00
briaguya 351f896cfa Merge branch 'develop' into delta-to-dev 2023-11-29 02:16:54 -05:00
Pepe20129 5b81964ea5
Bring over some player documentation from decomp (#3380)
* Document static variables

* Document enums and structs

* Document some functions

* Document more functions

* actionParam to itemAction and fix build

* Document some local variables and a define

* General cleanup

* Use PlayerMeleeWeaponAnimation enum when appropiate

* Document some function parameters and local variables

* Document some of player struct
2023-11-26 11:54:54 -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
inspectredc 80ef399c52
Entrance Docs (#3332)
* transition variables renamed

* transition circle

* transition wipe

* sand storm

* remaining sceneloadflag rename

* transition trigger macros

* transition mode enum

* transition type enum

* tc set params

* creg debug transitions

* introduce entrance table + return entrance indices + entrance info macros

* randomizer entrance pass through

* cleanup some missing scene enums

* randomizer entrance tracker pass through

* randomizer grotto pass through

* gSaveContext.entranceIndex

* misc lists

* z_select pass through

* respawn entrance index

* nextEntranceIndex

* add missing include
2023-11-19 14:29:56 -05:00
inspectredc 2b1327c41a
Transition docs (#3322)
* transition variables renamed

* transition circle

* transition wipe

* sand storm

* remaining sceneloadflag rename

* transition trigger macros

* transition mode enum

* transition type enum

* tc set params

* creg debug transitions
2023-11-19 02:38:07 -05:00
inspectredc 5dd82f59e2
Player Equip Docs (#3282)
* hopefully everything

* update docs for MS shuffle sections
2023-10-30 10:56:36 -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
inspectredc 82d87ff680
Clear Cutscene Pointer Button/Cheat (#2837)
* clear custcene pointer button

* now use RawAction for button

* add button to new menu bar
2023-10-02 14:28:27 +00:00
Garrett Cox db10864e95
Add flag set/unset hooks and GI actions (#3065) 2023-09-26 08:45:51 -05:00
aMannus bae6cf4203
Randomizer feature: Triforce Hunt (#3062)
* Initial work to make triforce pieces their own rando item

* Disable triforce greyscaling

* Better triforce model, finish adding triforce pieces to logic

* Triforce model is now a shard

* Credits warp + start of item tracker

* Initial item tracker stuff

* Completed triangle on triforce completion

* Completed triforce model on GI done

* Multiple triforce piece models

* Triforce pieces in save editor & fix build

* Finish item tracker

* Gameplaystats timestamp

* Revert parts of logic

* More reverting

* Start of making Triforce Hunt the win condition

* Bit of cleanup

* Triforce pieces can show up as icetraps

* Grant GBK to player after hunt is completed

* Better text boxes

* Disable GBK option in ImGui with Triforce Hunt on

* Clean-up

* Forced save on completion improvements

* Update Item Tracker Settings initial size

* Small ImGui adjustments

* French translation and update defaults

* Finish translations

* Fix timer completion & 50+ triforce pieces

* Remove GI_ and ITEM_ enum usage, add french ice trap names

* Fix build & small fixes

* Review comments

* Comment clarification
2023-09-26 08:45:37 -05:00
aMannus d32d8836f8
Disable CC knockback while crawling (#3187) 2023-09-14 21:54:04 -05:00
Pepe20129 5cf0eeef52
Add OnActorKill & OnEnemyDefeat hooks (#3112)
* Add OnActorKill & OnEnemyDefeat hooks

* Remove commented out code

* Re-run build

* Add missing include statements
2023-09-10 12:23:43 -05:00
Adam Bird b2ad348508
support for pal 1.1 change language option (#3124) 2023-09-10 12:21:13 -05:00
Pepe20129 45b7520dcb
Add scene table (#3131)
* Add scene table

* Re-add accidentally deleted entry

* Update CrashHandlerExt.cpp

* Update CrashHandlerExt.cpp
2023-09-01 11:46:19 -05:00
Caladius 0e7c658523
V1 - Chestapalooza (#2922)
* V1- Adds additional trap variants to Chests

* Create and use OnTrapProcessed hook

* Update naming for Traps, extends to NPC and Token Rewards.

New Hook for Rando traps.

Restore Vanilla code for ice traps.

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

Co-authored-by: Garrett Cox <garrettjcox@gmail.com>

* More tweaks, remove processed trap hook

---------

Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
2023-08-30 17:34:06 +00:00
Adam Bird f19f303651
Actor Nametag System (#3083)
* initial nametag system

* add debug name tags in actor viewer
2023-08-20 12:59:23 -05:00
briaguya d69c07cd75
numbers aren't magic (#2976)
* numbers aren't magic

* chest style matches contents

renamed everything except the cvar itself at this point
(waiting for versioned configs for that)

* tracker as part of names

* finish the tracker rename

---------

Co-authored-by: briaguya <briaguya@alice>
2023-06-09 17:22:25 -04:00
Adam Bird 820fdf78cc
Improve TTS for file select menus (#2950)
* improve TTS for file select menus

* french translation change recommendation
2023-06-05 17:18:18 -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
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 4980ae8dcc
Lus updates (#2822)
* Changes for LUS renames in ResourceManager and Archive.

* Moves WriteSaveFile and ReadSaveFile to SaveManager.

* Removes ImGui namespace.

* Bump LUS

* Update soh/soh/GameMenuBar.cpp

* Bump LUS

---------

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
2023-05-03 20:46:26 -04:00
Patrick12115 2af952b180
[Time Saver Enhancement] Nighttime GS Always Spawn (#2611)
* Nighttime GS Always Spawn

* add hook onSceneSpawnActors

* implement onSceneSpawnActors hook to spawn GS in various day scenes

* handle the kak tree skull during the day

* Update mods.cpp

* Add the &

* Fixes

* Update soh/soh/Enhancements/mods.cpp

Co-authored-by: Adam Bird <Archez@users.noreply.github.com>

---------

Co-authored-by: Adam Bird <archez39@me.com>
Co-authored-by: Adam Bird <Archez@users.noreply.github.com>
2023-04-02 21:11:08 -04:00
PurpleHato 77cc91d0de
ADD: Time Saver --> Time Travel with the Song of Time (#2575)
* ADD: Time Saver --> Time Travel with the Song of Time

Co-Authored-By: aMannus <4244591+aMannus@users.noreply.github.com>
Co-Authored-By: David Chavez <david@dcvz.io>

* TWEAK: one liner for the gPlayState check

* ADD: Time Saver --> Time Travel with the Song of Time

Co-Authored-By: aMannus <4244591+aMannus@users.noreply.github.com>
Co-Authored-By: David Chavez <david@dcvz.io>

* TWEAK: one liner for the gPlayState check

* Timetravel stuff

* tweazk oopsies

* Fixes timeline

* tweak frog dist

* ADD: Time Saver --> Time Travel with the Song of Time

Co-Authored-By: aMannus <4244591+aMannus@users.noreply.github.com>
Co-Authored-By: David Chavez <david@dcvz.io>

* TWEAK: one liner for the gPlayState check

* Timetravel stuff

* tweazk oopsies

* Fixes timeline

* tweak frog dist

* oppsie²

* del dupe

* del dupe

* tweak tooltip

---------

Co-authored-by: aMannus <4244591+aMannus@users.noreply.github.com>
Co-authored-by: David Chavez <david@dcvz.io>
2023-04-02 12:34:02 -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
aMannus ca23d87a3a
Hyper Bosses (act and move twice as fast) (#2555)
* Hyper bosses

* Actor* to void* + cast to fix build

* Cleaner implementation

* Fix enemies taking double damage

* Fix smaller dodongo's being sped up

* Additional fix and code cleanup

* Proper fix for double damage

* Extern variable -> GI state
2023-04-02 04:00:21 -04:00
aMannus 866882e4c6
CrowdControl V2: Effect Overhaul (#2433) 2023-03-13 11:37:50 +01:00
aMannus 76e99ffe19
Feature - Bonk damage under difficulty options (#2584) 2023-03-12 08:10:03 +01:00
Malkierian 73052617ed
[GI] Item_Give and OnReceiveItem updates (#2580)
* Changed OnReceiveItem hook to pass GetItemEntry, which required the following changes:

Reworked the references to it in `z_parameter` to call a single function with the item return and hook call in it for ease of editing.

Modified the pendingSale functionality to set and pass a modIndex value as well, as mod items (like randomizer) in shops still use the vanilla sale path.

* Missed some files for the pendingSale changes.

Also added Randomizer_Item_Give to the OnReceiveItem system.

* Ice traps now trigger OnReceiveItem.

* All ice traps truly do work now.

As a side effect, item autosave doesn't work for shop/scrub/merchant transactions, requires new OnSaleEnded hook that can also call the autosave.

* Removed unnecessary calls to ItemTable_RetrieveEntry where GetItemEntry properties were being used to call it.  General code cleanup.

* Added OnSaleEnd hook for when rupees are finished deducting after a sale.

Migrated AutoSave to its own function, registered AutoSave function to OnReceiveItem and OnSaleEnd hooks to help with autsaving after buying items.

Some futureproofing for AutoSave function with parameters for skipping autosave, for when transition end is migrated to AutoSave function (whether through direct call or through a hook).

* Renamed hook paramaters, and registered hook function parameters, to a more descriptive alternative.

* Missed a couple, fixed a typo.

* One more missed paramater name refactor.

Refactored all references to OnReceiveItem to OnItemReceive to mirror upcoming full hook refactor for name ordering conventions.

Up-to-date with develop.
2023-03-12 08:00:03 +01:00
David Chavez 21466192e5
[Accessibility] Text to Speech (#2487) 2023-03-02 09:27:28 +01:00
David Chavez c91a044d46
[GameInteractor] Introduce GameFrameUpdate Hook and Migrate Cheats (#2554) 2023-02-28 11:20:43 +01:00
briaguya 7f5221b149
Supersonic merge fixes (#2553)
* ss2

* Remove Comments and Rupees when dead.

* Rupees removal for real

* Updated Inline formatting as well as changed Mode Idenitifier from Super Sonic to Rupee Dash.

* Add OnPlayerUpdate hook

* Move rupee dash to hooks

* Update comment for DashInterval

* ss2

* Remove Comments and Rupees when dead.

* Rupees removal for real

* Updated Inline formatting as well as changed Mode Idenitifier from Super Sonic to Rupee Dash.

* Add OnPlayerUpdate hook

* Move rupee dash to hooks

* Update comment for DashInterval

* Update Health to not crash on less than 16 units.

* lus

* fix build, use `Health_ChangeBy`

---------

Co-authored-by: Caladius <Caladius@users.noreply.github.com>
Co-authored-by: David Chavez <david@dcvz.io>
2023-02-28 03:52:32 -05:00
Adam Bird f7bb807940
[Game Interactor] Add LoadGame and ExitGame hooks (#2542)
* add loadgame/exitgame GI hooks

* implement loadgame/exitgame hooks in game code

* move entrance tracker data lifecycle to hooks

* update cosmetic editor to update onloadgame hook
2023-02-26 23:04:57 -05:00
David Chavez 8934274c67
[GameInteractor] Game Hooks (#2481) 2023-02-15 20:30:34 +01:00
aMannus e14fcf92d2
Fix GI overruling link size over anything else (#2424) 2023-01-31 07:21:16 -05:00