2023-05-03 21:54:23 -04:00
# include " OTRGlobals.h "
2022-05-12 13:28:24 -04:00
# include "OTRAudio.h"
2022-03-21 21:51:23 -04:00
# include <iostream>
testing out item replacement (#416)
* skip learning song of storms
* don't set flag when getting goron tunic as child
* Initiates prelude check when master sword unloads.
Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again.
* Stops Shadow Temple lore prompts from appearing in rando.
* Skips cutscene of royal tomb explosion in rando.
Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here.
* Improves visual of exploding gravestone.
* Adds some comments explaining the rando differences
* Skip ruto text box in jabu blue warp
For rando
* skip intro cutscene in dodongo's cavern
* load spoiler files on boot, fix spoilerfile existing check when making new saves
* name entry dropped spoiler logic
* make sure to actually init the cvar
* no chime on load
* uncomment
* Skip ganondrof cutscene
Skip to scream part of the death animation, skipping the text boxes etc. For rando
* Update z_boss_ganondrof.c
* skip owl flight cutscenes in rando
* Fixes skipped text so it only applies to shadow temple.
Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors.
* Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case.
* TEST: Text for item
* Adding ganon flavor text
* ADD: AMMO Count
* format ganon text/hint text
* Autoskip the tower cutscene if settings call for tower collapse.
* ganon hint text logic
* Improved prelude after time travel fix
* swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things.
* this is all i did
* not the cleanest code ever but it's working
* ADD: GS Count
* ADD: Wallter (crash for now)
* TWEAK: Wallet check
* FIX: Use DrawItem instread of DrawUpgrade... b-baka!
* Fixes some vanilla bugs introduced by rando code.
* Added cutscene skip for zelda escaping
Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger
* ADD: X Spacing + Placeholders for song
* ADD: default case for items
* TWEAK: Spacing
* FIX: Light Arrow
* ADD: Ammo Option
* use groups instead
* ADD: More spacing logic
* songs and names
* TWEAK: Color on wallet
* colors
* Added flags cutscene before nabooru fight
* ADD: ChromaKey text
* First attempt skip cs after nabooru defeat
* Better implementation for specific rando cutscene skips
* use pulseaudio defaults
* spaces/tabs
* move color push/pop to stop crash
* make the colors work again
* the real bottle fix
* pulseaudio values tuned for n64 audio at 44.1khz
* update tlength
* remove one hardcoded samplerate
* Cleaned up and fixed zelda escape skip
The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of.
* Revert one line to match original
nothing functional
* another hint line that breaks autonewline logic
* don't autospawn epona if we don't have the song/ocarina
* Trying to use iron knuckle death effects
not working yet
* Streamlined OoT cutscene skip for future additions
Also cleaned up if statement in general
* Made if statement more readable
Also added clarity for what cutscene was skipped
* Fixed typo in comment
* Janky nabooru defeat cs skip
* altar text formatting (gonna need help shortening some of the french ones)
* more altar text formatting
* english altar text formatting complete
* make gtg blocking guard check for card not bridge
* FIX: Typo!
* FIX: Uppercases
* FIX: Typo
* TWEAK: Alter + some names
* TWEAK: More caps!
* ADD: Missing string
TWEAK more uppercases and namefixe
s
* Hide nabooru death by covering her in flames
* bandaid fix for death crash issue
* Twinrova defeat cs skip
Skips the animation and manually calls the function to show the "beam" around the sisters
* fix crash
* fix caps to match
* fix great fairy reward mashing/shielding issue
* TWEAK : Typo clé to Clé
* TWEAK: Some Altar hints
TWEAK: Some capitals
* TWEAK: Unmatching text + some cap again
* TWEAK: More tweaks
* fix build
* remove extra json.hpp, add hint
* Update randomizer_item_tracker.cpp
* TWEAK: Double Defense with RedParticles instead of white
* make sure we don't optimize out the check to ensure a spoilerfile exists
* vanilla ganon boss key hint formatting
* TWEAK: FR- better way of the hero text
* fix
* and again
* Initializes dungeonsDone items in gSaveContext to 0.
* Replaces sizeof calculation with a NUM_DUNGEONS constant.
* Fixes Saria's Gift on the LW Bridge from getting killed when holding shield.
* More airtight fix for Saria's Gift on the Bridge.
* Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId.
* Invalidate text box icon before drawing
* Fixes the case where Saria's gift is an Ice Trap.
We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine.
* Initial commit
Might need changing when we change the settings in the future
* Fixes Door of Time opening cutscene after warping with prelude.
* Initial waterfall skip
Very rudimentary way of doing things but it seems to work so :shrug:
* inital rework
* fixed default rotation for 2D sprites
* fix tab/space issues
* 3d drops rando merge fix again
* Allows Impa to appear in the Lullaby check post drawbridge escape.
* Changes Ganon's Trials Count setting to a checkbox
The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed.
* Sets all Ganon's Trials to incomplete in new saves.
Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131
* fix castle guards when oot throw cutscene has already played in rando
* Properly removes the beams when trials are cleared.
* Removes Question Mark from Skip Ganon's Trials UI.
* Adds a todo comment about when to change back to slider.
* make deku seeds check for bullet bag
* Various tweaks
TWEAK: Altar Text
TWEAK: Hint names
TWEAK: Replace more problematic œ to oe
* upgrade ocarina on both child and adult equips
* FIX: Jabu Item
* update equipped hookshot/longshot when obtained as other age
* add hint
* don't give the bgs check without the claim check
* Skips Darunia Cutscene in Fire Temple
* Added a TODO note about not skipping the cutscene.
There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch.
* remove todo
* restore fast ocarina option in imgui that was lost in merge
* Fixes grey screen issue + tooltip for 2 handed shield
* update to use dg instead of g for textures in item tracker
* TWEAK: Default color for cosmetic RAND button was not the corect one
* fix texture crash, remove unused item tracker code
* don't open mask shop until we get zelda's letter
* Update README.md
* Prevents "correct" chime under incorrect conditions.
* Fixes typo in conditional and adds "bonk" sound effect.
"Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time.
* remove modify dpad equips toggle, replace with checks for dpad menu
* remove extra check
* add ability to hold c-up to assign to dpad when dpad menuing is enabled
* disable d-pad navigation on item menu when holding c-up to equip
* dpad+c-up stuff for equipment menu
* ADD: Checbox for songs colors
* TWEAK: RandoColors for normal songs
* kind of quick and dirty but it works
* TWEAK: Clarity of the tooltip
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Dog <5172592+Dog@users.noreply.github.com>
Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com>
Co-authored-by: Baoulettes <perlouzerie@hotmail.fr>
Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
# include <algorithm>
2022-06-20 13:54:44 -04:00
# include <filesystem>
2022-08-21 21:08:01 -04:00
# include <fstream>
2023-05-21 18:35:56 -04:00
# include <chrono>
2022-08-21 21:08:01 -04:00
2023-05-03 20:46:26 -04:00
# include <ResourceManager.h>
# include <File.h>
2022-11-14 05:22:34 -05:00
# include <DisplayList.h>
# include <Window.h>
# include <GameVersions.h>
2022-09-29 19:07:48 -04:00
2022-03-21 21:51:23 -04:00
# include "z64animation.h"
# include "z64bgcheck.h"
2022-05-11 13:18:24 -04:00
# include "Enhancements/gameconsole.h"
2023-01-17 00:17:49 -05:00
# include <libultraship/libultra/gbi.h>
2022-05-11 13:18:24 -04:00
# ifdef _WIN32
2022-03-21 21:51:23 -04:00
# include <Windows.h>
2022-05-11 13:18:24 -04:00
# else
# include <time.h>
# endif
2022-11-14 05:22:34 -05:00
# include <Array.h>
2022-09-03 00:00:04 -04:00
# include <stb/stb_image.h>
2022-06-15 15:18:41 -04:00
# define DRMP3_IMPLEMENTATION
2022-09-03 00:00:04 -04:00
# include <dr_libs/mp3.h>
2022-06-15 15:18:41 -04:00
# define DRWAV_IMPLEMENTATION
2022-09-03 00:00:04 -04:00
# include <dr_libs/wav.h>
2022-11-14 05:22:34 -05:00
# include <AudioPlayer.h>
2023-03-02 03:27:28 -05:00
# include "Enhancements/speechsynthesizer/SpeechSynthesizer.h"
2023-11-20 08:02:15 -05:00
# include "Enhancements/controls/SohInputEditorWindow.h"
2022-07-05 20:52:01 -04:00
# include "Enhancements/cosmetics/CosmeticsEditor.h"
2023-02-16 09:49:45 -05:00
# include "Enhancements/audio/AudioCollection.h"
# include "Enhancements/audio/AudioEditor.h"
2023-06-18 18:23:06 -04:00
# include "Enhancements/enhancementTypes.h"
2022-05-11 13:18:24 -04:00
# include "Enhancements/debugconsole.h"
Randomizer v2 (#1065)
* Revert changes to GetItemFromGet
* Fixes Ganon's Boss Key shuffled while regular boss Keys aren't.
* Enum + combo box
* Add obtainability checks correctly
* combobox title rename + no number tracking
* Fix repeatable purchases and bottles rendering incorrectly
* Move shopsanity option in GUI
* Struct instead of ImVec + basic comportment for all case
* Attempt to fix odd build issue
* Cast randoGet for ganons boss key
* Remove redundancy in KD room
* Update logic Cvar names
* Fix Ganons Trials coming from old save files. Fixes #1365
* Fixes crash when entering Ganon's Castle lobby on linux.
* Makes `Item_Give` safe to use with a NULL globalCtx.
This should allow it's use for giving items to Link's Pocket
during rando save initialization.
* Converts Song from Impa to use `Item_Give`
* Adds more options for Link's starting item.
* Removes unneeded `GiveLinkItem` functions.
* and make it build
* bring back new rando dropdown
* gSaveContext access in GameMenuBar.cpp
* Implement Skip Scarecrow's Song
* Reimplement progressive Bombchus
* Rando-next: Deku Nut and Seed ammo gives a blue rupee
Fixes #1390
* Fixes Link starting with BGS
* Persist item tracker notes
* Adjust Hooks include
* Use SohImGui::RequestCvarSaveOnNextTick
* Fix issues from LUS refactor
* Fix for overriding deku scrub messages
* Fix mistake from merge
oops
* Restore checkboxes to enhancements menu
These got lost in the merge
* Update location access logic
Including MQ locations in Spirit and GC now
* Implement rando bombchu drops
* Missing break
* Simplify mudwall collision check
There was no need to have a second collider specifically for Ice Arrow hits
* Update settings.cpp
* Simplify mudwall collision check
* Restore checkboxes in menu
Accidentally lost these during merge
* Clean up bool
* Update logic Cvar name
* Fixed capacity on ammmo tracking
* Fix for beans obtainability
* Hook into file delete and clear notes
* Incorporate magic arrows in rando settings
* Update tooltip
To inform the player that they might have to reload the room if they're enabling this for the first time.
* Update tooltip
* Add line break in tooltip
* Tooltip wording + line break
* tweak on main logic
* All color logic for all types
* Fix: changes to please new LUS
* Ensure itemTrackerNotes vector is not fully empty
* Implement's Tycoon Wallet.
* Refactor DrawItemCount and Use EnhancementCombobox for tracker capacity options
* small tweaks and rename
* always display XX/YY when in ammo/capacity mode
* Move all merchant messages to be generated on file load
* added hovertext for the number display
* Swap german and french translations for shop messages
* Set key colors to be on by default
* Add another flag to skip mask shop
* Fix Sold Out bug
* Fix gerudo keys, add disabled checkbox
* tooltip line break
* Add trials required and merchant prices to save file instead of loading from active spoiler log
* Remove trialsRequired persisting in save manager
* Adds slotIndex to girla (shop item actor) and uses that for IdentifyShopItem.
* Fix issue when merchantPrices is empty
* Fix for a single zeroed merchantPrice entry
* Fix #1417
* Implements items selling out and fixes issues with purchasing some items.
* Fixes order of operations so Rupees will be spent.
* Fixes sold out items not getting overwritten by the randomized info.
* Clarify var names and comments
Also preserve chain platform cutscene in spirit based on Link's position
* Remove !=0 from cvar check
* Clarify var names and comments
* Rename randomizerMerchantPrices to merchantPrices
* Handle shop items in SaveManager
* Fix merge mistake
* Base whats in the bazaar shop on entranceIndex instead of age
* Tidy up chain platform cutscene check
* Fix merge error
Didn't mean to have Zhora changes in here yet
* Use 3drando item table for parsing spoiler names
* Use another nested method instead of one at the top level to fetch the table
* Add missing newline
* Remove log
* Respect custom draw functions
* Fix issues with rendering songs
* Fix localized item names for shopsanity
* Implements a larger array of Sprites for the Icon Hash.
* Uses the hash instead of seed for spoilerfile name and icons.
* Removes some unused functions and variables in `spoiler_log.cpp`
* Prevents leading 0s added to hash from being in file name
* Changes filename format to icon indexes separated by dashes
* Hopefully makes Jenkins happy
* Hopefully makes Jenkins happy
* [Rando] Child Gerudo Fortress 37th Heartpiece randomized
Fixes #1071
* Add descriptions to save editor flags editor, and added randomizer flags (#1386)
* Add descriptions to save editor flags editor, and added randomizer flags
* Hide randomizer flags when not on a randomizer save
* Move flag descriptions to header file
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Fix merge error
* crash on pause menu on linux (only in appimage)
Fixes #1437
* Applies fix to Song from Impa as well.
* Allow buying tunics as child when shopsanity is on
* Fix for custom draw methods overriding sold out sign
* Simplify logic around shopsanity and fix some issues
* Fix dungeon reward stone rotation and add particles
* Fix some issues with ice traps
* Fix adult wallet having its own max capacity
* Fix amount of keys given for BotW
* format
* Use EnGirlAShopItem enum instead of raw hex values
* [#1434] Renders non-warp songs more consistently with warp songs
* A few changes around merchant messages
* Various changes from PR feedback
* Rando: Junk Hint missing french translation
* Typo
* Fix free scrub being at 0 instead of TEXT_SCRUB_RANDOM
* Replace magic numbers in message handler
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Fix BGS softlock for shopsanity
* Support tycoon wallet on tracker
* Revert "Fix BGS softlock for shopsanity"
This reverts commit 5fdb961ea460fb9a035cf0bb6ae77bfeedc1de0f.
* [#1053] Resolves an issue with shop items and bombchu bowling where BGS would display two message boxes
* Implements some necessary plumbing and resolves several Ice Trap Softlocks.
Adds a way for an item entry to tell what type of check it came from (NPC vs Chest vs Freestanding, etc.)
Sets this value from chests and item00 actors.
Relocates pendingIceTraps to save context so it can persist through cutscenes and get stored on save init for Link's Pocket and Song from Impa.
Restructures pendingIceTraps into a counter rather than a true or false, so that we can be frozen multiple times in a row if applicable (atm that should only be at the start of a run if Link's Pocket and Song from Impa were both Ice Traps).
Adds a textbox for Ice Traps and a special case of holding up nothing in the get item process. This fixes all the cases where Ice Traps would softlock due to the actor giving the item expecting a closing textbox. After holding the item above his head Link increments the pendingIceTraps counter by one and sets whatever flag he has pending.
None of the above plumbing applies to Ice Traps from chests, those work exactly the same as before, as do freestanding item00 ice traps (thanks to the additional check for ITEM_FROM_FREESTANDING.
OoT and Ruto's Letter count as NPC's, so they get the FOWL text box and set a pending ice trap rather than immediately freezing, since Link weill be in the water. Link will get frozen the next time he touches land, which in the case of OoT is after the fade to white and right before the Song of Time check.
Fixes all the other softlocks I'm aware of, including Fishing, Bombchu Bowling, Skull Kid, and losing the second Gerudo Archery check.
* fix bgs check in player
* move bgs logic for tokensanity into MOD_NONE check
* set bgs flag before `Item_Give`ing
* move bgs flag into `MOD_NONE` check in girla
* use existing check in `z_player`
* Adds comment explaining the decision to default ITEM_FROM_NPC.
* Rename pendingIceTraps to pendingIceTrapCount
* Adds some RANDOTODO comments about cleaning up a couple things.
* Merge branch 'develop-zhora' into ztornn
* manually restore changes to `z_player.c`
* Fix after some ice trap prepwork from earlier
* Actual fix
* Woops
* More rupee names
* Actually fix it
* Add back comment
* Fix Skip Scarecrow Song
* Fix ruto's letter and LH sun stick rendering
* Also fixes it for treasure chest game
* Tweak: Rando French Wallet
* ADD: French Tycoon
* Hide dungeon items/notes by default
* [#1301] Fix issue with UI not restoring after getting an item from biggoron
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Fix random crash that only affected one person for some reason
Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Sarge-117 <adam_branston@outlook.com>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: lil David <1337lilDavid@gmail.com>
Co-authored-by: Sarge-117 <108380086+Sarge-117@users.noreply.github.com>
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
2022-09-21 00:50:22 -04:00
# include "Enhancements/randomizer/randomizer.h"
2022-12-06 23:44:14 -05:00
# include "Enhancements/randomizer/randomizer_entrance_tracker.h"
2022-09-03 00:00:04 -04:00
# include "Enhancements/randomizer/randomizer_item_tracker.h"
Randomizer Auto Location tracker (#1942)
* Initial Auto-Location Tracking
* Updates styling for checked items in Check Tracker
* Fixes crashing issues with Check Tracker rendering
* Auto scroll Check Tracker windows to current area
* Checks Tracker only shows checked locations once in game
* Fixes issue where Check Tracker would auto-scroll to wrong location when entering a grotto
* Fixes gerudo fortress checks showing in tracker when settings have them removed
* InfTable Check Location Fixes: Lost Dog Richard, Rolling Gorons, HBA 1000, Thawed Zora
* Fixes most Event Chk Inf Checks on Check Tracker, and Frogs
* Check Tracker - Song from Malon now works
* Check Tracker
- Fixes Claim Check check not tracking
- Fixes spoiler for Claim Check check when getting Biggoron's Sword
- Fixes LACS being spoiled and not tracking
* Check Tracker - Fixes #2 for Skull Mask and Mask of Truth checks
* Check Tracker
- Adds support for merchants
- Fixes #7 for Bomchu Salesman
- Fixes #12 for Medigoron
* Check Tracker - Fixes #8 for Song from Saria
* Check Tracker - Fixes #9 for Adult Shooting Gallery
* Check Tracker - Fixes #10 for Composer Grave
* Check Tracker - Fixes #14 for Song from Ocarina of Time
* Check Tracker - Fixes #16 for Shooting the Sun
* Check Tracker - Fixes #19 for Darunia's Joy
* Save Editor - Adds missing label for Treasure Chest Game
* Check Tracker - Fixes Great Faries checks
* Check Tracker - Fixes Sheik at Temple
* Check Tracker - Fixes Great Fairy auto-scroll to wrong location
* Check Tracker - Updates blue warp checks
- Fixes Bongo Bongo and Twinrova checks
* Check Tracker - Fixes Dampe's Gravedigging Tour
* Check Tracker - Fixes Prescription to King Zora
* Check Tracker - Fixes Bazaar showing under wrong area on tracker between adult/child
* Check Tracker - Fixes scroll for Hyrule Market and Bazaar
* Check Tracker - Fixes giving Adult Trade Items shown on tracker: Broken Sword, Saw, Cojiro, Eyeball Froge, and Eyedrops
* Cleans up item_location
* Check Tracker - Item List
- Fixes item list not updating when changing seeds/options
- Separates item exclusion list from item check list
- Clean up comments
* Check Tracker - Adds Skip functionality to buttons
* Check Tracker - Refactors adult trade items to RandomizerInf
* Check Tracker - Fixes an issue where any time an item is removed the tracker would cause an application crash
* Check Tracker - Item names are now dependent on file language
* Check Tracker - Fixes Gerudo Card check not showing in Fast setting
* Reorders headers to (hopefully) avoid CI build conflicts on linux/consoles
* Explicitly defines vector header in randomizer.h to fix compile errors
* Complete Refactor of Check Tracker ImGui
* Adds missing check tracker files to CMakeLists
* Reverts the Item_location whitespace cleanup from ad10807c
* Check Tracker - Loading Fixes
- Fixes a bug where loading a save file a second time would add all the checks again
- Fixes a bug where the check tracker would not render at all until in a save file
* Check Tracker - Fixes a bug where checks would sometimes fail to load
* Check Tracker - Fixes duplicated checks when using Only on Pause or Only on Combo
* Check Tracker - Works around issue where single characters don't show in EnhancementCombobox, and fixes a label for combo buttons held option
* Check Tracker - Applies all Check Tracker changes to Item Location
* Check Tracker - Updated Check List
- Adds Link's pocket, either in KF or HM depending on starting age
- Supports Scrubs and Merchants
- Uses enums instead of magic numbers
- Updates DC Scrub Short Names for MQ
* Check Tracker - Adds a performance mode option
* Check Tracker - List Fixes (requires new rando generation)
- Fixes Frogs Rupees always visible
- Fixes Kokiri Sword Chest not showing
- Fixes Weird Egg not showing
* Check Tracker - MQ List basic support
* Check Tracker - MQ/Vanilla anti-spoilers
* Check Tracker - Collecting a compass now spoils the area
* Check Tracker - Basic Vanilla Support and fixes
- Vanilla items show in check tracker, even if many won't auto check
- Fixes an issue with Gerudo Fortress Keys
- Refactors IsVisibleInCheckTracker to randomizer_check_tracjer
* Check Tracker - Fixes merge conflict from 08a487f35e1d760ab9e69b932edbe4da6bcd9edb
* Check Tracker - Fixes tracker loading as Floating when default value is set to Windowed
* Randomizer Location Exclusion List
- Adds Scrubs, Merchants, Shops. Adult Trade items, MQ Dungeons, and Bean Salesman
- Fixes Kokiri Sword Chest, Weird Egg, and Frog Song Rupees from misbehaving
- Updates Gerudo Fortress logic to be dependent on Open/Fast/Normal Fortress
- Removes Invalid Check
- Adds RO Enum for MQ settings
- Updates magic values to RO enum
* Location Exclusion List - Scrubs that are always randomized now always show on the list
* For now, removes some extra code only needed for a Check Tracker.
* Randomizer Location Exclusion List - Fixes Eyeball Frog from showing up when Adult Trade Items was off
* Location Tracker - Updates Eyedrops to use RandomizerInf instead of Chest
* Check Tracker - Fixes a bug where Link's Pocket item wasn't acting as checked for area item count
* Check Tracker - Fixes a bug where Locations would incorrectly say Vanilla due to the first check in the area being a non-MQ check
* Check Tracker - Fixes a crash when Check Tracker is docked but not visible
* Check Tracker - Fixes areas being spoiled when loading different save files
* Check Tracker - Only reset variables if they are initialized
* Check Tracker - Cleans up old comments, unused variables, methods, and macros, adds language TODOs,
* Check Tracker - Readds rainbow UI elements after Cosmetics Editor refactor
* Check Tracker - Removal of flag lookup that was refactored, no longer needed header, and some trivial whitespace fixes.
* Check Tracker - Refactors Index to Bitmask code to a macro
* Check Tracker - Changes ordering from alphabetical to RandomizerCheck ordering
* Check Tracker - Wraps everything in a namespace to avoid global variable usage
* Check Tracker - Explicitly defines for-loop scope
* Check Tracker - refactors dungeon lookup from static array to function
* Fixes a bug when using EnhancementColor with alpha
* Check Tracker - Refactors all colour to use direct conversions
* Check Tracker - refactors settings loading and check visibility for readability
* Check Tracker - Fixes a bug where the wrong label showed on the Check Tracker BG Color
* UIWidgets - Adds Alpha bar to EnhancementColor when using alpha parameter
2022-12-10 22:39:23 -05:00
# include "Enhancements/randomizer/randomizer_check_tracker.h"
2022-10-25 21:24:48 -04:00
# include "Enhancements/randomizer/3drando/random.hpp"
Rando Definition Deduplication (#3284)
* Initial StaticData and RandoItem class definitions
* Initial implementation of RandoItem class.
* Rerranges RandoItem Constructor parameters
The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on.
* Switches static data from map to static array.
Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values.
* Defines part of the randomizer item list.
* Adds more item class instances to item_list.cpp
Up through bottles, many more items still to go.
* Adds song items
* Adds Maps and Compasses to the item_list
* Added Key Items to item_list
* Added Key Rings to item_list
* Added Dungeon Rewards to item_list
* Adds generic items and refills to item_list
* Adds shop items, triforce, and hints
Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them.
* Adds in the stages of progressive items
These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.)
* Remove GetItemEntry data from progressive items
* Moves/adds function definitions to item/item_list
* Refactors GetItemEntry data
It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.)
* Adds item class member for if item is progressive
* Removes unneeded stuff from initializer list macro
* Replaces relevant `uint32_t`s w/ `RandomizerGet`s
Also replaces calls to the ItemTable method with StaticData::RetrieveItem
* Switches our runtime code to use the new itemList.
* Changes just enough hint gen code to compile
* Initial Definition of Location Class
* Initial Implementation of Location
* Fixes some names and definitions.
* Extracts ActorID and SceneID enums to separate files.
This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected.
* Replaces the forward definitions with the new imports.
* Adds missing data for RandomizerCheckObjects.
* Definition and first entry of locationTable
* Added Mido's House Locations
* Added locations up through lost woods.
* Adds in Hyrule Field locations.
* Adds Lake Hylia locations
* Adds location name comments
* Adds Gerudo Valley Locations
* Adds Gerudo Fortress locations.
* Adds the Wasteland and Collosus locations
* Adds Market locations
* Adds Hyrule Castle locations.
* Adds Kakariko and Graveyard locations.
* Adds Death Mountain checks.
* Adds Goron City locations
* Adds Death Mountain Crater locations
* Adds Zora's River locations
* Added Zora's Domain Locations.
* Added Zora's Fountain locations
* Adds Lon Lon Ranch locations.
* Adds Deku Tree locations
* Adds Dodongo's Cavern Locations.
* Adds Jabu Jabu's Belly Locations
* Adds Forest Temple Locations
* Adds Fire Temple Locations
* Adds Water Temple Locations
* Added Spirit Temple Locations
* Some of shadow temple locations.
* Adds remaining Shadow Temple locations
* Fixes a leftover merge conflict
* Adds Bottom of the Well locations.
* Adds Ice Cavern locations
* Adds GTG locations.
* Adds Ganon's Castle and Tower locations
* Adds dungeon Gold Skulltula locations.
* Adds Overworld Gold Skulltula locations
* Adds dungeon reward locations
* Adds Heart Container Locations
* Adds Cutscene and Song locations
* Adds Cow locations
* Adds Shop locations.
* Adds hint locations
* Adds function for retrieving the Location data.
* Initial definition of ItemLocation structure for tracking runtime data
* First push on converting code to use new location definitions
* Changes hints to use the new tables
* Further conversion of hints to new definitions.
* Adds new Hint and Location IDs to area tables
* Moves areaTable to use new RandomizerRegion keys
* Removal of 3drando/item_location files.
* Uses new RandomizerRegion keys in entrance.cpp
* Final push for removal of massive keys.hpp enum
* Uses new SceneID Enum Values
* Remove RandomizerCheckObject structs in favor of new location list.
* Fix a few stragglers to successfully build
* Rename of RandoItem to just Item, but in the Rando namespace
* Adds static hints (Light Arrows, Altar text, etc) to the new Hint table.
* More hint related fixes/edits
* small fix for #include path
* Fix various miscellaneous issues related to seed gen and spoiler parsing.
* Handle progressive items correctly.
* Fixes some hint generation logic
* Fix a few GetItemEntry niche bugs.
* Adds missing shop GI Entries
* Formatting fixes
* small formatting fix
* Namespace StaticData under Rando
* Added a note about a potential use-after-free.
I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used.
* Fixes missing location table entries
* Fixes LUS submodule and removes now-unused code
* Resolves weird duplicate definition issue
* Fix missing include
It was missed because not being included wasn't an issue on Windows.
* Fixes error present on Linux builds
* Fixes some issues with excluding locations
* Updates the Resolve Exclusion conflicts function
not sure if actually used, will look into that more later
* Removes some duplicate RGs
* More fixes of duplicate RG values.
* Fix a few duplication issues in the check tracker.
* Fix progressive bombchus.
* Minor typo fix, shouldn't really be affecting anything though
* Should fix some of the remaining check tracker issues.
* oops wrong boolean operator
* Fix skulltulas in the check tracker.
* oops, missing comma
* re-formatting of HintStone locations
* Fixes issue when picking up second Progressive Bullet Bag
* Hide bombchu bowling bombchus
* Fixes missed skullScene in location_list
* Reformats shop items
* Re-formats cow checks
* reformat song locations
* reformat "cutscene" checks
* reformat heart container locaitons
* reformat Boss/Dungeon reward checks
* Hide Triforce Completed if not playing Triforce Hunt
* Fixes incorrect chest param
* reformat GS Tokens locations and cuts down on duplicate data
* reformat Ganons Castle checks
* reformat GTG check locations
* Prevents Gift from Raoru from appearing in the check tracker
* more reformatting (botw, ice cavern, shadow temple)
* Should fix a couple more check tracker checks
* reformat spirit temple checks
* reformat water and fire temple checks
* fix RC_ZR_GS_ABOVE_BRIDGE flag typo
* reformat Forest Temple checks
* Fix RC_LW_TRADE_ODD_POTION in check tracker
* reformat child dungeon locations
* reformat overworld locations
* reformat item entries
2023-10-19 19:48:25 -04:00
# include "Enhancements/randomizer/static_data.h"
More gap-bridging (#3323)
* Initial StaticData and RandoItem class definitions
* Initial implementation of RandoItem class.
* Rerranges RandoItem Constructor parameters
The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on.
* Switches static data from map to static array.
Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values.
* Defines part of the randomizer item list.
* Adds more item class instances to item_list.cpp
Up through bottles, many more items still to go.
* Adds song items
* Adds Maps and Compasses to the item_list
* Added Key Items to item_list
* Added Key Rings to item_list
* Added Dungeon Rewards to item_list
* Adds generic items and refills to item_list
* Adds shop items, triforce, and hints
Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them.
* Adds in the stages of progressive items
These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.)
* Remove GetItemEntry data from progressive items
* Moves/adds function definitions to item/item_list
* Refactors GetItemEntry data
It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.)
* Adds item class member for if item is progressive
* Removes unneeded stuff from initializer list macro
* Replaces relevant `uint32_t`s w/ `RandomizerGet`s
Also replaces calls to the ItemTable method with StaticData::RetrieveItem
* Switches our runtime code to use the new itemList.
* Changes just enough hint gen code to compile
* Initial Definition of Location Class
* Initial Implementation of Location
* Fixes some names and definitions.
* Extracts ActorID and SceneID enums to separate files.
This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected.
* Replaces the forward definitions with the new imports.
* Adds missing data for RandomizerCheckObjects.
* Definition and first entry of locationTable
* Added Mido's House Locations
* Added locations up through lost woods.
* Adds in Hyrule Field locations.
* Adds Lake Hylia locations
* Adds location name comments
* Adds Gerudo Valley Locations
* Adds Gerudo Fortress locations.
* Adds the Wasteland and Collosus locations
* Adds Market locations
* Adds Hyrule Castle locations.
* Adds Kakariko and Graveyard locations.
* Adds Death Mountain checks.
* Adds Goron City locations
* Adds Death Mountain Crater locations
* Adds Zora's River locations
* Added Zora's Domain Locations.
* Added Zora's Fountain locations
* Adds Lon Lon Ranch locations.
* Adds Deku Tree locations
* Adds Dodongo's Cavern Locations.
* Adds Jabu Jabu's Belly Locations
* Adds Forest Temple Locations
* Adds Fire Temple Locations
* Adds Water Temple Locations
* Added Spirit Temple Locations
* Some of shadow temple locations.
* Adds remaining Shadow Temple locations
* Fixes a leftover merge conflict
* Adds Bottom of the Well locations.
* Adds Ice Cavern locations
* Adds GTG locations.
* Adds Ganon's Castle and Tower locations
* Adds dungeon Gold Skulltula locations.
* Adds Overworld Gold Skulltula locations
* Adds dungeon reward locations
* Adds Heart Container Locations
* Adds Cutscene and Song locations
* Adds Cow locations
* Adds Shop locations.
* Adds hint locations
* Adds function for retrieving the Location data.
* Initial definition of ItemLocation structure for tracking runtime data
* First push on converting code to use new location definitions
* Changes hints to use the new tables
* Further conversion of hints to new definitions.
* Adds new Hint and Location IDs to area tables
* Moves areaTable to use new RandomizerRegion keys
* Removal of 3drando/item_location files.
* Uses new RandomizerRegion keys in entrance.cpp
* Final push for removal of massive keys.hpp enum
* Uses new SceneID Enum Values
* Remove RandomizerCheckObject structs in favor of new location list.
* Fix a few stragglers to successfully build
* Rename of RandoItem to just Item, but in the Rando namespace
* Adds static hints (Light Arrows, Altar text, etc) to the new Hint table.
* More hint related fixes/edits
* small fix for #include path
* Fix various miscellaneous issues related to seed gen and spoiler parsing.
* Handle progressive items correctly.
* Fixes some hint generation logic
* Fix a few GetItemEntry niche bugs.
* Adds missing shop GI Entries
* Formatting fixes
* small formatting fix
* Namespace StaticData under Rando
* Added a note about a potential use-after-free.
I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used.
* Fixes missing location table entries
* Fixes LUS submodule and removes now-unused code
* Resolves weird duplicate definition issue
* Fix missing include
It was missed because not being included wasn't an issue on Windows.
* Fixes error present on Linux builds
* Fixes some issues with excluding locations
* Updates the Resolve Exclusion conflicts function
not sure if actually used, will look into that more later
* Removes some duplicate RGs
* More fixes of duplicate RG values.
* Fix a few duplication issues in the check tracker.
* Fix progressive bombchus.
* Minor typo fix, shouldn't really be affecting anything though
* Should fix some of the remaining check tracker issues.
* oops wrong boolean operator
* Fix skulltulas in the check tracker.
* oops, missing comma
* re-formatting of HintStone locations
* Fixes issue when picking up second Progressive Bullet Bag
* Hide bombchu bowling bombchus
* Fixes missed skullScene in location_list
* Reformats shop items
* Re-formats cow checks
* reformat song locations
* reformat "cutscene" checks
* reformat heart container locaitons
* reformat Boss/Dungeon reward checks
* Hide Triforce Completed if not playing Triforce Hunt
* Fixes incorrect chest param
* reformat GS Tokens locations and cuts down on duplicate data
* reformat Ganons Castle checks
* reformat GTG check locations
* Prevents Gift from Raoru from appearing in the check tracker
* more reformatting (botw, ice cavern, shadow temple)
* Should fix a couple more check tracker checks
* reformat spirit temple checks
* reformat water and fire temple checks
* fix RC_ZR_GS_ABOVE_BRIDGE flag typo
* reformat Forest Temple checks
* Fix RC_LW_TRADE_ODD_POTION in check tracker
* reformat child dungeon locations
* reformat overworld locations
* reformat item entries
* New Item Override system
* use new ItemOverrides and use ItemLocations table for getting items
* Saves/Loads directly from/to new ItemLocation table with overrides for traps
* Removes gSaveContext.itemLocations
* Don't load spoiler file on boot automatically.
Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that:
1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded.
2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present).
3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet).
4. After that, a seed is generated and you are taken back to the file select screen with the new file present.
5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is
already in memory and in the save file (or at least I'll make it so that it is if it isn't already).
6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing
for hints to be in the user's language of choice no matter what language the spoiler file was generated in.
7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there
instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out
custom message syntax for various types of custom hints and whatnot. But that will be probably much later.
* Auto-gen rando seed when making a new rando file.
Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations:
1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed.
2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown.
3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen.
Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet.
* Fix a few typos/bugs
* Partial conversion to new Settings/Option class
* Further conversion to new settings/options classes
* New settings struct (not fully working, need to wire it up to SaveManager)
* Move save files to new settings struct. Also fixes MQ options to match 3drando
* Fixes some spoilerfile related issues
* Cleans up now unused arrays
* Fixes some unhandled entries in parse settings switch case
* Reimplements parsing of settings on file drop to re-generate seeds
* Move merchantPrices into ItemLocation tables.
* Move hints to new struct
* Fixes a few seed gen bugs surrounding hints
* Fix treasure chest game.
* Relocate Entrance Shuffle code into ctx
* Move entrances to new context at runtime
* Remove now unused code from SaveContext and randomizer.cpp/.h
* Fix non-windows builds?
* Moves Dungeon Quests to new context
* Move trials into new context
* Whoops, forgot to construct the Trials in the context.
* Fixes accidental nullptr reference
* Fixes bug with saving MQ dungeons
* Implements plando mode and removes now unused code.
Largely untested, expect some bugfixes.
* prevent a multiple definition bug
* another attempt to fix the gSeedTextures multiple def error
* Fixes some minor hint issues from conflict resolution
* Some additional glue needed for merge
* Fixes another couple of miscellaneous issues/inconsistencies.
* A few french corrections
* Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
# include "Enhancements/randomizer/dungeon.h"
2022-11-22 20:04:40 -05:00
# include "Enhancements/gameplaystats.h"
2022-07-06 18:46:01 -04:00
# include "Enhancements/n64_weird_frame_data.inc"
2022-09-03 00:00:04 -04:00
# include "frame_interpolation.h"
2022-04-18 05:37:47 -04:00
# include "variables.h"
2023-01-26 18:43:09 -05:00
# include "z64.h"
2022-05-11 13:18:24 -04:00
# include "macros.h"
2023-11-05 21:21:44 -05:00
# include "Fonts.h"
2022-04-29 11:49:28 -04:00
# include <Utils/StringHelper.h>
2022-09-03 00:00:04 -04:00
# include "Enhancements/custom-message/CustomMessageManager.h"
2023-11-28 23:42:37 -05:00
# include "Enhancements/presets.h"
# include "util.h"
# include <boost_custom/container_hash/hash_32.hpp>
2022-03-21 21:51:23 -04:00
2023-04-25 00:01:17 -04:00
# if not defined (__SWITCH__) && not defined(__WIIU__)
# include "Extractor/Extract.h"
# endif
2022-09-03 00:00:04 -04:00
# include <Fast3D/gfx_pc.h>
# include <Fast3D/gfx_rendering_api.h>
2022-08-21 21:08:01 -04:00
2022-06-22 14:59:21 -04:00
# ifdef __APPLE__
# include <SDL_scancode.h>
# else
2022-05-12 13:28:24 -04:00
# include <SDL2/SDL_scancode.h>
2022-06-22 14:59:21 -04:00
# endif
Nintendo switch support (#935)
* Moved gfx effects to the gpu and removed loadtexbyname on some textures
* Readded empty if
* Added nintendo switch support
* Fixed compilation errors and window closing issue on linux
* Fixed kaleido on 64 bit
* Fixed audio on nintendo switch
* Implemented performance mode switcher
* Added suggestions from pr review
* Fixed ftruncate errors
* Fixed compilation errors
* Added missing include rule
* Fixed libstorm path
* Removed ftruncate extern to use a correct posix version
* Merge branch 'develop' from HarbourMasters into znx (#3)
* Add Support for macOS (#441)
* Fixed soh filters
* add more makefile changes
* almost ready
* more updates
* update
* update
* Update Makefiles to handle both platforms
* Allow for overriding the CXX and CC executables
* Restore original structure while supporting custom CXX flags
* Remove some platform specific libs
* Dynamic target name
* Make X11 paths package-agnostic
* Remove changes to `gfx_opengl.cpp`
* Use OpenGL2 on MacOS instead of OpenGL3
* make it actually render something
* render at least the first texture, still need to figure out the second
one
* Let’s use OpenGL 3 again
* maybe this works to get the right texture? link's eyes still look off a bit
* did this work?
* set the platform to macos
* actual numbers are right, but logic is ugly XXX/TODO, i know
* add zlib to ldflags for ZAPDUtils
* A bit of cleanup
* Revert unneeded changes
* Remove GL_CHECK
* Fix issues with z64 branch
* use an std::map instead of a giant array
* three point filter fix (#2)
* Fix mac compilation
* fix audio for 64 bit
* revert audio heap size, keep bigger pools
* Add more Apple specific checks to our modifications
* Add building instructions for macOS
* Remove unecessary step from building instructions
* Add missing SDL2 & GLEW to Linux LDLIBS
* Update BUILDING.md
Co-authored-by: BountyChocolate123456 <101743444+BountyChocolate123456@users.noreply.github.com>
* Update soh/.gitignore to include other arch binaries
Co-authored-by: BountyChocolate123456 <101743444+BountyChocolate123456@users.noreply.github.com>
* Use right platform name for debugging window
Co-authored-by: BountyChocolate123456 <101743444+BountyChocolate123456@users.noreply.github.com>
* Fix stormlib on macos (arm64)
* Simplify some of the ifdef checks
* Revert an older no longer necessary fix
* Remove remaining unecessary deviations
* Update building instructions after StormLib changes
* Feature: Use OpenGL 4.1 (#1)
* Further tweak the BUILDING
* Tidy up
* reword -j message
* Add Jenkins CI Support (#2)
* Fix type issues
* add target <appbundle> and <filledappbundle>
add makefile targets to create an .app
`filledappbundle` creates the target with the .otr included
this should perhaps be moved to Application Support though
* pull gcc's rpath from otool output
* move make target to the end so it's not default
* Add Jenkins and make exe in par with other platforms
* Actually save build artefacts
* Fix artefact path
* Remove x11 mentions and linking (not used)
* Update building instructions for generating app
* use appsupport directory
* Add new app icon
* Update target to match macOS types
* Update more audio types
* fix null deref in Audio_PlayFanfare
* Remove old import from z64
* address final nit with apple ifdefs
Co-authored-by: KiritoDev <36680385+KiritoDv@users.noreply.github.com>
Co-authored-by: Jeffrey Crowell <github@crowell.biz>
Co-authored-by: BountyChocolate123456 <101743444+BountyChocolate123456@users.noreply.github.com>
* Move macOS to parallel stage
* fix linux crash
* Ignore all named saves
Necessary after new save format
* DPad items
* Move UI location arrays from static to global to accomodate customizable UI
* FIX: Increased the maximum actor limit for draw distance
Fix issue #529
* FIX: Remove duplicates of gNewDrops from the enhancements menu
* Get rid of erroneous int casts
* casts jya_cobra's shadowTexture pointer to uintptr_t instead of s32.
* Fix ability to assign equipment you don't own
* Fix title cards for market potion shop and bombchu shop
* Invalidate message item icon texture before drawing
* Add margins for dpad
* Fixed some instances where the original OOT save is erroneously preserved or recreated, leading to another conversion next time you launched the game
* Headphones setting in game should now work.
Resolves #13
* Map Select name fixes
* Change Power to Upgrades
* Rename Soh* files
* Update names
* Add more files
* Add more files
* Add toggles for disabling heart drops and random drops (#507)
* Adds toggles for disabling random drops and fixed heart drops
* Changed the "No Fixed Heart Drops" toggle to the more useful "No Random Heart Drops" toggle
* Adds an explanation that the no heart drops option is similar to Hero Mode
* Moved difficulty options into their own sub-menu
Moved time saver options into their own sub-menu
Moved clutter reducing options into their own sub-menu
* fixed the tag name of mweep speed
* Moved Skip Text to Experimental
* Fix testing masks of DPad
* Fix audio, boot commands, and save staes.
* add menu from https://github.com/PurpleHato/Shipwright/tree/ResetMenu
* implement reset
* Update README.md
* command on mac
* special char doesn't work with default imgui font
* change name based on PR comment
* missed a couple spots
* change sunset in save editor so dampe is out
* Update to latest `docking` imgui (#582)
* Update to latest `docking` imgui
commit: 67410d53f739b6a0df138e2252f0e5136b42062f
* Fix modified import for SDL
* Update imgui_impl_sdl.cpp
* Add Imgui include path for better imports
* Controller Navigation Fix-Up (#544)
* Controller Navigation Fix-Up
* [MISC] Fix typo
* Use Macro for __FILE__ & __LINE__ when possible (#559)
* First batch some overlay
* Almost all overlay
* effect & gamestate
* kaleido stuffs
* more overlay
* more left over from code folder
* remaining hardcoded line and file
* Open & Close _DISP __FILE__ & __LINE__ clean up
* Some if (1) {} remove
* LOG_xxxx __FILE__ , __LINE__ cleaned
* ASSERT macro __FILE__ __LINE__
* mtx without line/file in functions
* " if (1) {} " & "if (0) {}" and tab/white place
* LogUtils as macro
* GameState_, GameAlloc_, SystemArena_ & ZeldaArena_
* Revert "GameState_, GameAlloc_, SystemArena_ & ZeldaArena_"
This reverts commit 0d85caaf7e342648c01a15fe21e93637352dc596.
* Like last commit but as macro
* Fix matrix not using macros
* use function not macro
* DebugArena_* functions
GameAlloc_MallocDebug
BgCheck_PosErrorCheck as macros
removed issues with ; in macro file
* MM Bunny Hood enhancements: no age restrictions & wear across entrances (#560)
* Remove age restriction on MM Bunny Hood
* Handle mask slot changing; init Link wearing mask
* Reset mask state after selling
* Use unordered maps in some hot paths (#566)
* Use unordered maps in some hot paths
* Address PR comments
* Cheat: Infinite Epona Boost (#577)
* Cheat: Infinite Epona Boost
* Edit for readability
* update pulseaudio for 44.1khz audio (#587)
* use pulseaudio defaults
* spaces/tabs
* pulseaudio values tuned for n64 audio at 44.1khz
* update tlength
* remove one hardcoded samplerate
Co-authored-by: briaguya <briaguya@alice>
* Restoration Item Sliders (#595)
* Allows players to set custom restoration values for potions and milk
* Fixed a dumb oversight
* implemented fairy sliders
* use ini window resolution (#410)
* use ini window resolution
* use arguments for directx window size
* default 640x480 not 320x240
* kick off a build
* and revert
* default config 640x480 not 320x240
* add todo
Co-authored-by: briaguya <briaguya@alice>
* 3D Drops & Projectiles update (#548)
* Fix remaining rupee and keys
* fix tabs -> spaces
* more fix about tabs -> spaces
* Better up <-> down mouvement for hearts
* remove useless comment
* Cosmetics menu rework (#589)
* -
* DPad/some margin fix(left side)
* various ImGui stuff and fixes
* disabled kaleido menu (non working)
* fix win being dumb
* same for C btn this time
* Fix windows build
* Beating hearts fix
* Default win size and some placement fix
* Fix Dpad Ammo & C notes, Kaleido, white dog
* some texts fix and tab move
* Add stone of agony, some fixes and build correctly
* precise item place with Dpad
* Gamecube -> GameCube
Co-authored-by: Baoulettes <iMacWin10>
* [CI] Create an Appimage for 64bit builds (#570)
* [CI] Create AppImage file
* [CI] Updated Jenkinsfile
* [MISC] fix indentation
* [MISC] Fix indentation
* [MISC] Fix indentation
* [CI] 7z appimage and readme
* [CI] AppImage icon file (#597)
* [CI] Add patchelf
* [BUILD] Include Hi-Res icon
* Fix portability use of std::clamp (#596)
* Add N64 weird frames and OOB Bombchus cvars (#602)
* Add gN64WeirdFrames and gBombchuOOB cvars
* Rename gBombchuOOB to gBombchusOOB
* Fix pipeline
* [BUILD] Do not strip ZAPD (#598)
* [BUILD] Do not strip ZAPD
* [BUILD] Reuse Icon Asset
* [APPIMAGE] Handle paths with spaces
* [macos] Distribute optimized builds (#599)
* Cosmetics texts fixes (#604)
* branch init + few fixes
* Reset button
* Several texts fixes and default color to GameCube
* space issues
* some more extra space that was not needed.
* space yes last time ...
* Arrows being able to be rainbow some more texts fixes
* more texts fixes
* c-buttons some plurial fix
* Fixes bug in demo effect due to removed display list set.
* King dodongo room crash (#613)
* first attempt
* force camera setting to be at least 0 (dirty!)
* -
* reverted something to just include fix
* Invalidate text box icon before drawing (#607)
* [APPIMAGE] Set lib path for ZAPD (#611)
* New drop runtime fix (#614)
* inital rework
* fixed default rotation for 2D sprites
* fix tab/space issues
* Fix Ganon's Castle title cards (#606)
* Checkered room crash workaround (#615)
* Increase poly and vertex count for dyna actors
* Add TODO
* Only apply fix in Forest Temple
* Enable globally
* Match case of 'Shipwright' in Linux build (#619)
* Fix 0xabababab crash (#617)
* Unconditionally setup the normal skybox
* Only call Skybox_Setup once ever
* Equipment upgrade text fix and any pause slot enhancement fix (#620)
* Fix upgrade name text not rendering
* Use cvar and don't render equip help for empty item slots
* Fix rendering logic
* Fix incorrect item name rendered for one frame
* Reorder comparison
* Remove extra indent
* Remove accidental changes
* ImGui grammer, consistency, and clarity fixes (#625)
* ImGui grammer, consistency, and clarity fixes
Co-Authored-By: Stormghetti <56653191+Stormghetti@users.noreply.github.com>
* Adds more new lines for users on smaller displays
Co-Authored-By: Stormghetti <56653191+Stormghetti@users.noreply.github.com>
Co-authored-by: Stormghetti <56653191+Stormghetti@users.noreply.github.com>
* New drops shadows & rotation fixes (#627)
* fixes
* forgot to add heart pieces in rotation logic
* Dodongo's Cavern blue warp crash fix (#622)
* Doodong's Cavern blue warp crash fix
* >= not >
* Don't waste a line of space
* add support for clang compiler (#592)
* hacks to align strings for clang... wow just wow
* start work to getting built with clang
* fix issues with struct constructors, all builds, doesn't link still
* fix some narrowing issues that clang complains about
* fix compliation of zapd
* fix null deref in VersionInfo
* builds with clang
* make stringbuilding use StringHelper instead of addition
* fix linking
* add CLANG SHIP overlay on clang built versions
* doesn't need to be volatile
* mark unknown strings as extern
* rename some stuff
* can't align extern
* hopefully fix compilation for everythign
* expandtab
* allow setting LD
* Revert "allow setting LD"
This reverts commit 711aba6db2c41bab476bd34e878af6a37a7f5559.
maybe to use lld it should be a LDFLAG?
* -Wno-deprecated-declarations is required for newer versions of clang
on macOS 13 beta sdk, the version of apple clang requires this
* Add jenkins support for clang
* Forward CXX flags to stormlib compilation
* Move GCC only flags to check
* use exports to set multiarch setup
* Fix Jenkins forever
* use make instead of cmake --build
add some flags to build with clang-11 as well
* address review coments
- rework extraction to allow multi thread
- misc readability cleanup
* update makefile to add WARN on linux+clang
Co-authored-by: David Chavez <david@dcvz.io>
* Fix develop
* Fixes grey screen issue + tooltip for 2 handed shield
* Don't close controller after SDL has quit (#642)
* Don't close controller after SDL has quit
* Don't check if controller can rumble if null
* Fixes Barinade's set whenever boss fight is reloaded (#639)
* Reimplements unused Barinade reset function.
* Removes the Jellyfish from Barinade's body on reset.
* add the ability to pull graves during the day (#637)
* change max internal res multiplier to 3x, use float and % instead of int (#638)
* change max internal res multiplier to 3x, use float and % instead of int
* Update libultraship/libultraship/ImGuiImpl.cpp
Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>
* Fixes crash on Biggoron trade failure screen wipe
Resolves #621
* fixes center docking (#652)
* testing out item replacement (#416)
* skip learning song of storms
* don't set flag when getting goron tunic as child
* Initiates prelude check when master sword unloads.
Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again.
* Stops Shadow Temple lore prompts from appearing in rando.
* Skips cutscene of royal tomb explosion in rando.
Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here.
* Improves visual of exploding gravestone.
* Adds some comments explaining the rando differences
* Skip ruto text box in jabu blue warp
For rando
* skip intro cutscene in dodongo's cavern
* load spoiler files on boot, fix spoilerfile existing check when making new saves
* name entry dropped spoiler logic
* make sure to actually init the cvar
* no chime on load
* uncomment
* Skip ganondrof cutscene
Skip to scream part of the death animation, skipping the text boxes etc. For rando
* Update z_boss_ganondrof.c
* skip owl flight cutscenes in rando
* Fixes skipped text so it only applies to shadow temple.
Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors.
* Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case.
* TEST: Text for item
* Adding ganon flavor text
* ADD: AMMO Count
* format ganon text/hint text
* Autoskip the tower cutscene if settings call for tower collapse.
* ganon hint text logic
* Improved prelude after time travel fix
* swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things.
* this is all i did
* not the cleanest code ever but it's working
* ADD: GS Count
* ADD: Wallter (crash for now)
* TWEAK: Wallet check
* FIX: Use DrawItem instread of DrawUpgrade... b-baka!
* Fixes some vanilla bugs introduced by rando code.
* Added cutscene skip for zelda escaping
Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger
* ADD: X Spacing + Placeholders for song
* ADD: default case for items
* TWEAK: Spacing
* FIX: Light Arrow
* ADD: Ammo Option
* use groups instead
* ADD: More spacing logic
* songs and names
* TWEAK: Color on wallet
* colors
* Added flags cutscene before nabooru fight
* ADD: ChromaKey text
* First attempt skip cs after nabooru defeat
* Better implementation for specific rando cutscene skips
* use pulseaudio defaults
* spaces/tabs
* move color push/pop to stop crash
* make the colors work again
* the real bottle fix
* pulseaudio values tuned for n64 audio at 44.1khz
* update tlength
* remove one hardcoded samplerate
* Cleaned up and fixed zelda escape skip
The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of.
* Revert one line to match original
nothing functional
* another hint line that breaks autonewline logic
* don't autospawn epona if we don't have the song/ocarina
* Trying to use iron knuckle death effects
not working yet
* Streamlined OoT cutscene skip for future additions
Also cleaned up if statement in general
* Made if statement more readable
Also added clarity for what cutscene was skipped
* Fixed typo in comment
* Janky nabooru defeat cs skip
* altar text formatting (gonna need help shortening some of the french ones)
* more altar text formatting
* english altar text formatting complete
* make gtg blocking guard check for card not bridge
* FIX: Typo!
* FIX: Uppercases
* FIX: Typo
* TWEAK: Alter + some names
* TWEAK: More caps!
* ADD: Missing string
TWEAK more uppercases and namefixe
s
* Hide nabooru death by covering her in flames
* bandaid fix for death crash issue
* Twinrova defeat cs skip
Skips the animation and manually calls the function to show the "beam" around the sisters
* fix crash
* fix caps to match
* fix great fairy reward mashing/shielding issue
* TWEAK : Typo clé to Clé
* TWEAK: Some Altar hints
TWEAK: Some capitals
* TWEAK: Unmatching text + some cap again
* TWEAK: More tweaks
* fix build
* remove extra json.hpp, add hint
* Update randomizer_item_tracker.cpp
* TWEAK: Double Defense with RedParticles instead of white
* make sure we don't optimize out the check to ensure a spoilerfile exists
* vanilla ganon boss key hint formatting
* TWEAK: FR- better way of the hero text
* fix
* and again
* Initializes dungeonsDone items in gSaveContext to 0.
* Replaces sizeof calculation with a NUM_DUNGEONS constant.
* Fixes Saria's Gift on the LW Bridge from getting killed when holding shield.
* More airtight fix for Saria's Gift on the Bridge.
* Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId.
* Invalidate text box icon before drawing
* Fixes the case where Saria's gift is an Ice Trap.
We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine.
* Initial commit
Might need changing when we change the settings in the future
* Fixes Door of Time opening cutscene after warping with prelude.
* Initial waterfall skip
Very rudimentary way of doing things but it seems to work so :shrug:
* inital rework
* fixed default rotation for 2D sprites
* fix tab/space issues
* 3d drops rando merge fix again
* Allows Impa to appear in the Lullaby check post drawbridge escape.
* Changes Ganon's Trials Count setting to a checkbox
The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed.
* Sets all Ganon's Trials to incomplete in new saves.
Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131
* fix castle guards when oot throw cutscene has already played in rando
* Properly removes the beams when trials are cleared.
* Removes Question Mark from Skip Ganon's Trials UI.
* Adds a todo comment about when to change back to slider.
* make deku seeds check for bullet bag
* Various tweaks
TWEAK: Altar Text
TWEAK: Hint names
TWEAK: Replace more problematic œ to oe
* upgrade ocarina on both child and adult equips
* FIX: Jabu Item
* update equipped hookshot/longshot when obtained as other age
* add hint
* don't give the bgs check without the claim check
* Skips Darunia Cutscene in Fire Temple
* Added a TODO note about not skipping the cutscene.
There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch.
* remove todo
* restore fast ocarina option in imgui that was lost in merge
* Fixes grey screen issue + tooltip for 2 handed shield
* update to use dg instead of g for textures in item tracker
* TWEAK: Default color for cosmetic RAND button was not the corect one
* fix texture crash, remove unused item tracker code
* don't open mask shop until we get zelda's letter
* Update README.md
* Prevents "correct" chime under incorrect conditions.
* Fixes typo in conditional and adds "bonk" sound effect.
"Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time.
* remove modify dpad equips toggle, replace with checks for dpad menu
* remove extra check
* add ability to hold c-up to assign to dpad when dpad menuing is enabled
* disable d-pad navigation on item menu when holding c-up to equip
* dpad+c-up stuff for equipment menu
* ADD: Checbox for songs colors
* TWEAK: RandoColors for normal songs
* kind of quick and dirty but it works
* TWEAK: Clarity of the tooltip
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Dog <5172592+Dog@users.noreply.github.com>
Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com>
Co-authored-by: Baoulettes <perlouzerie@hotmail.fr>
Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
* Cosmetics hotfixes (#640)
* Initial branch creation
* Revert Main Game so it do not conflict later
* should fix window build, made namespace for Cosmetics
* forgot to edit one title
* Ability to add hidden window (usefull for Rainbow)
Fix building issues
* Line break, unused bool remove
* add descriptive todo for death crash bandaid (#655)
Co-authored-by: briaguya <briaguya@alice>
* Removed legacy audio mode and fixed ganon sound bug (#657)
* Free Camera (#337)
* wip free cam
* Almost done, needs collision still
* Added free cam behind cvar
* added WIP collision
* Fixed & implemented "Manual mode" from WW & TP
* Fixed camera not rotating when Link is moving
* fixed initialized camera rotation
* Fixed camera getting stuck + made it smoother
* reduced deadzone
* fixed epona camera height + added WW z-target free camera
* Adjusted player camera height & fixed fov
* Fixed camera roll
* fixed fov when moving the camera while in z-target
* Camera resets to Auto when going through doors or changing maps
* Fixed building
* touch
* more touch work
* Added WIP mouse support to the free cam
* gui stuff
* fixed building
* fixed building error
* ok fixed building for real this time
* oops
* Fix compilation issues
* removed mouse stuff that magically appeared in this branch
* smoothed out stick values & removed remains of mouse support
* re-added manual camera when pressing Z
* reduced minimum Y position of camera
* Addressed dcsv's nitpicks
* part 2
* oops
Co-authored-by: David Chavez <david@dcvz.io>
* Rando: Allows Malon's Item Check to be obtained by pulling out the Ocarina. [FIXED PR] (#672)
* Fixes using the Ocarina to get the check from Malon.
Still some cleanup to do here. For some reason the player can shield before receiving the check. It doesn't set the flag if the player does that so they can still try again, but would prefer a different solution if possible.
* Prevents Shielding from blocking the Item_Give from happening.
* Code Cleanup and comments explaining the new rando flow.
* Removes inventory check when pulling out Ocarina
This allows OI to properly give the check, which is important for Glitched logic later down the line. Talking to Malon still requires the Ocarina in your inventory.
* Prevents non-malon textboxes from triggering the check.
Also adds a comment explaining the condtional for getting the check from talking to Malon since it got pretty long.
* Actually fixes checking for text boxes.
* Relocates a comment for improved clarity.
* Fix Rando Water Temple Softlock (#665)
We use 3DS logic to generate item placement, but didn't have this specific door in Water Temple unlocked from the beginning like 3DS does.
This meant that if people took specific paths through the temple, they could softlock themselves by missing a key.
* Rando: GtG and carpenter prompts skip (#663)
* Skip gtg and carpenter prompt
For rando. Tested and just works.
* Fixed missing break
* Hide debug overlay behind gDebugEnabled (#660)
* Introduce App Directory Path (#572)
* Introduce app directory path concept
* macos: Remove hacky way of using applicaiton directory
* Update the new SaveManager
* Address stack user after return
* Remove unecessary property
* Use std::string for filepath
* Improve clang specific detections
* Use new path system for imgui files
* Improve helper for getting relative paths
* fix hidden wnd (#744)
* Split damage multiplication into its own PR (#656)
* Split damage multiplication into its own PR
* Found a more elegant implementation of the powers char*[]
* Fixes Maps, Compasses, and Boss Keys in Vanilla. (#751)
* .xiF slebaL
* Update Keese labels
* Fixed soundfont issues
* Skip warp song cutscenes in rando (#664)
Does it by skipping to the last part of the cutscene data. Tested on all songs, both adult and child.
* don't spawn blocking mido after we've already shown him the sword/shield (#675)
Co-authored-by: briaguya <briaguya@alice>
* Controller Configuration UI and JSON Config (#760)
* Initial controller hud ui
* Reverted fbdemo changes
* Moved config to json and implemented controller config
* fix build on linux, gitignore new config file
* fix build
* Fix compilation and file directory paths
* Call save on cvar save
* Fixed cvar loading and added deck slots to the config
* Changed control deck port 0 to use a physical device by default
* Added gyro and rumble & fixed loading errors
* Save config on toggle menubar
* fix linux build
* Fixed drift calculation
* Controller config now saves when pressing F1
* Removed ExitGame hook from ImGuiImpl
* Moved mappings to a map
* Added GetKeyName
* untranslate scancodes
* Fixed hud layout on keyboard device
* Fixed keyboard read on hud
* Fixed crash when reloading controllers
* Removed ConfigFile and changed file extension
* Changed Dummy to Disconnected and fixed filters
* Removed function leftover
* Changed ControllerHud to InputEditor
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: David Chavez <david@dcvz.io>
* Enough! My ship sails in the morning.
* Fixed menubar items position (#763)
* Fixed menubar items position
* Reverted tooltip tab position
* Fixes macOS randomizer functionality with App Directory (#761)
* Fixes macOS randomizer functionality with App Directory
* Fix windows build
* Update soh/soh/Enhancements/randomizer/3drando/rando_main.cpp
* Update soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp
* Revert band-aid fix
Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>
* Fix migration cvar deletion path (#765)
* Various controller fixes (#771)
* Fix controller
* Also fix rumble strength being a bool
* Remove ControllerHud.cpp
* Downgrade platform toolset back to previous version
* Fix gyro
* Fix bug that makes binding axes difficult and clear buttons before reading
* Exaggerate gyro display and adjust stick binding threshold
* Initialize drift thresholds
* git subrepo push soh
subrepo:
subdir: "soh"
merged: "75ccbade8"
upstream:
origin: "https://github.com/HarbourMasters/soh.git"
branch: "master"
commit: "75ccbade8"
git-subrepo:
version: "0.4.1"
origin: "???"
commit: "???"
* One more change from PR review
* Fix some paths
* Fix merge conflict messup
* More merge conflict fixes
* And another conflict fix
* And another fix
* Remove reference to removed build files
* Add full path to switch cmake
Co-authored-by: David Chavez <david@dcvz.io>
Co-authored-by: KiritoDev <36680385+KiritoDv@users.noreply.github.com>
Co-authored-by: Jeffrey Crowell <github@crowell.biz>
Co-authored-by: BountyChocolate123456 <101743444+BountyChocolate123456@users.noreply.github.com>
Co-authored-by: sholdee <102821812+sholdee@users.noreply.github.com>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: rozlette <Rozelette@users.noreply.github.com>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>
Co-authored-by: vaguerant <vaguerant@users.noreply.github.com>
Co-authored-by: earthcrafterman <banddstudios@gmail.com>
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
Co-authored-by: qurious-pixel <62252937+qurious-pixel@users.noreply.github.com>
Co-authored-by: Baoulettes <perlouzerie@hotmail.fr>
Co-authored-by: Sirius902 <10891979+Sirius902@users.noreply.github.com>
Co-authored-by: modestposer <modestposer@gmail.com>
Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
Co-authored-by: Stormghetti <56653191+Stormghetti@users.noreply.github.com>
Co-authored-by: Sirius902 <3645979-Sirius902@users.noreply.gitlab.com>
Co-authored-by: MelonSpeedruns <melonspeedruns@outlook.com>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: Dog <5172592+Dog@users.noreply.github.com>
Co-authored-by: Nicholas Estelami <NEstelami@users.noreply.github.com>
Co-authored-by: ChristopherJTrent <ChristopherJTrent@outlook.com>
Co-authored-by: agamache <aaroncgamache@gmail.com>
Co-authored-by: M4xw <m4x@m4xw.net>
* Fixed switch compilation
* Fixed responsive on switch imgui
* Remove config save hook
* Added physical slots into controller name
* Add `ifdef` for switch specific code
* Add `ifdef` for switch specific code
* Added applet mode detection
* Replaced homebrew icon
* Fixed randomness on applet mode view
* Fixed clkrst initialization
* Switch profiles cleanup
* Cleaned code based on dcvz comments
* Remove unused hooks in Mercury
* Fixed compilation
* Use IMGUI_IMPL_OPENGL_LOADER_CUSTOM
* Fix up StormLib modifications
* Handle touch events at ImGui/SDL level
* Enable opening menu with -
* Load Nintendo Switch font
* Updates to window initiation
* Handle virtual keyboard via SDL
* Print OTR missing message to screen
* Rename makefile for Switch
* Some more additional fixes
* Branch creation plus edit
Changed ItemWidth & made label invisible (else issues)
Added a submit button next to the text field
* Removed set_texture_filter on imgui draw
* Readded nintendo switch font
* Fixed randomizer crash
* Fix issue with strdup windows
* [SWITCH] Update Jenkins file (#9)
* [SWITCH] Update Jenkins file
* [SWITCH] Dockerfile.switch
Can be combined with other Dockerfile
* [SWITCH] Add entrypoint file
* Update Jenkinsfile
* [SWITCH] Dockerfile mtab link
link `/proc/self/mounts /etc/mtab`
Co-authored-by: David Chavez <david@dcvz.io>
* Cleaned code based on PR comments
* Fixed switch compilation
* Cleaned full texture cache instead of doing it per char
* Randomizer only saves when its not a vanilla save
* Disabled input when menubar is opened
* Removed return from SetupFont
* Cleaned code based on comments
* Cleaned up random texts on switch error screen
* Killed
* Removed debug and changed compilation flags
Co-authored-by: KiritoDv <nohomoboi01@gmail.com>
Co-authored-by: Felipe Guaycuru <guaycuru@gmail.com>
Co-authored-by: David Chavez <david@dcvz.io>
Co-authored-by: Jeffrey Crowell <github@crowell.biz>
Co-authored-by: BountyChocolate123456 <101743444+BountyChocolate123456@users.noreply.github.com>
Co-authored-by: sholdee <102821812+sholdee@users.noreply.github.com>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: rozlette <Rozelette@users.noreply.github.com>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>
Co-authored-by: vaguerant <vaguerant@users.noreply.github.com>
Co-authored-by: earthcrafterman <banddstudios@gmail.com>
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
Co-authored-by: qurious-pixel <62252937+qurious-pixel@users.noreply.github.com>
Co-authored-by: Baoulettes <perlouzerie@hotmail.fr>
Co-authored-by: Sirius902 <10891979+Sirius902@users.noreply.github.com>
Co-authored-by: modestposer <modestposer@gmail.com>
Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
Co-authored-by: Stormghetti <56653191+Stormghetti@users.noreply.github.com>
Co-authored-by: Sirius902 <3645979-Sirius902@users.noreply.gitlab.com>
Co-authored-by: MelonSpeedruns <melonspeedruns@outlook.com>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: Dog <5172592+Dog@users.noreply.github.com>
Co-authored-by: Nicholas Estelami <NEstelami@users.noreply.github.com>
Co-authored-by: ChristopherJTrent <ChristopherJTrent@outlook.com>
Co-authored-by: agamache <aaroncgamache@gmail.com>
Co-authored-by: M4xw <m4x@m4xw.net>
2022-07-25 21:11:53 -04:00
# ifdef __SWITCH__
2022-11-14 05:22:34 -05:00
# include <port/switch/SwitchImpl.h>
2022-08-14 22:57:24 -04:00
# elif defined(__WIIU__)
2022-11-14 05:22:34 -05:00
# include <port/wiiu/WiiUImpl.h>
2023-11-05 12:34:39 -05:00
# include <coreinit/debug.h> // OSFatal
Nintendo switch support (#935)
* Moved gfx effects to the gpu and removed loadtexbyname on some textures
* Readded empty if
* Added nintendo switch support
* Fixed compilation errors and window closing issue on linux
* Fixed kaleido on 64 bit
* Fixed audio on nintendo switch
* Implemented performance mode switcher
* Added suggestions from pr review
* Fixed ftruncate errors
* Fixed compilation errors
* Added missing include rule
* Fixed libstorm path
* Removed ftruncate extern to use a correct posix version
* Merge branch 'develop' from HarbourMasters into znx (#3)
* Add Support for macOS (#441)
* Fixed soh filters
* add more makefile changes
* almost ready
* more updates
* update
* update
* Update Makefiles to handle both platforms
* Allow for overriding the CXX and CC executables
* Restore original structure while supporting custom CXX flags
* Remove some platform specific libs
* Dynamic target name
* Make X11 paths package-agnostic
* Remove changes to `gfx_opengl.cpp`
* Use OpenGL2 on MacOS instead of OpenGL3
* make it actually render something
* render at least the first texture, still need to figure out the second
one
* Let’s use OpenGL 3 again
* maybe this works to get the right texture? link's eyes still look off a bit
* did this work?
* set the platform to macos
* actual numbers are right, but logic is ugly XXX/TODO, i know
* add zlib to ldflags for ZAPDUtils
* A bit of cleanup
* Revert unneeded changes
* Remove GL_CHECK
* Fix issues with z64 branch
* use an std::map instead of a giant array
* three point filter fix (#2)
* Fix mac compilation
* fix audio for 64 bit
* revert audio heap size, keep bigger pools
* Add more Apple specific checks to our modifications
* Add building instructions for macOS
* Remove unecessary step from building instructions
* Add missing SDL2 & GLEW to Linux LDLIBS
* Update BUILDING.md
Co-authored-by: BountyChocolate123456 <101743444+BountyChocolate123456@users.noreply.github.com>
* Update soh/.gitignore to include other arch binaries
Co-authored-by: BountyChocolate123456 <101743444+BountyChocolate123456@users.noreply.github.com>
* Use right platform name for debugging window
Co-authored-by: BountyChocolate123456 <101743444+BountyChocolate123456@users.noreply.github.com>
* Fix stormlib on macos (arm64)
* Simplify some of the ifdef checks
* Revert an older no longer necessary fix
* Remove remaining unecessary deviations
* Update building instructions after StormLib changes
* Feature: Use OpenGL 4.1 (#1)
* Further tweak the BUILDING
* Tidy up
* reword -j message
* Add Jenkins CI Support (#2)
* Fix type issues
* add target <appbundle> and <filledappbundle>
add makefile targets to create an .app
`filledappbundle` creates the target with the .otr included
this should perhaps be moved to Application Support though
* pull gcc's rpath from otool output
* move make target to the end so it's not default
* Add Jenkins and make exe in par with other platforms
* Actually save build artefacts
* Fix artefact path
* Remove x11 mentions and linking (not used)
* Update building instructions for generating app
* use appsupport directory
* Add new app icon
* Update target to match macOS types
* Update more audio types
* fix null deref in Audio_PlayFanfare
* Remove old import from z64
* address final nit with apple ifdefs
Co-authored-by: KiritoDev <36680385+KiritoDv@users.noreply.github.com>
Co-authored-by: Jeffrey Crowell <github@crowell.biz>
Co-authored-by: BountyChocolate123456 <101743444+BountyChocolate123456@users.noreply.github.com>
* Move macOS to parallel stage
* fix linux crash
* Ignore all named saves
Necessary after new save format
* DPad items
* Move UI location arrays from static to global to accomodate customizable UI
* FIX: Increased the maximum actor limit for draw distance
Fix issue #529
* FIX: Remove duplicates of gNewDrops from the enhancements menu
* Get rid of erroneous int casts
* casts jya_cobra's shadowTexture pointer to uintptr_t instead of s32.
* Fix ability to assign equipment you don't own
* Fix title cards for market potion shop and bombchu shop
* Invalidate message item icon texture before drawing
* Add margins for dpad
* Fixed some instances where the original OOT save is erroneously preserved or recreated, leading to another conversion next time you launched the game
* Headphones setting in game should now work.
Resolves #13
* Map Select name fixes
* Change Power to Upgrades
* Rename Soh* files
* Update names
* Add more files
* Add more files
* Add toggles for disabling heart drops and random drops (#507)
* Adds toggles for disabling random drops and fixed heart drops
* Changed the "No Fixed Heart Drops" toggle to the more useful "No Random Heart Drops" toggle
* Adds an explanation that the no heart drops option is similar to Hero Mode
* Moved difficulty options into their own sub-menu
Moved time saver options into their own sub-menu
Moved clutter reducing options into their own sub-menu
* fixed the tag name of mweep speed
* Moved Skip Text to Experimental
* Fix testing masks of DPad
* Fix audio, boot commands, and save staes.
* add menu from https://github.com/PurpleHato/Shipwright/tree/ResetMenu
* implement reset
* Update README.md
* command on mac
* special char doesn't work with default imgui font
* change name based on PR comment
* missed a couple spots
* change sunset in save editor so dampe is out
* Update to latest `docking` imgui (#582)
* Update to latest `docking` imgui
commit: 67410d53f739b6a0df138e2252f0e5136b42062f
* Fix modified import for SDL
* Update imgui_impl_sdl.cpp
* Add Imgui include path for better imports
* Controller Navigation Fix-Up (#544)
* Controller Navigation Fix-Up
* [MISC] Fix typo
* Use Macro for __FILE__ & __LINE__ when possible (#559)
* First batch some overlay
* Almost all overlay
* effect & gamestate
* kaleido stuffs
* more overlay
* more left over from code folder
* remaining hardcoded line and file
* Open & Close _DISP __FILE__ & __LINE__ clean up
* Some if (1) {} remove
* LOG_xxxx __FILE__ , __LINE__ cleaned
* ASSERT macro __FILE__ __LINE__
* mtx without line/file in functions
* " if (1) {} " & "if (0) {}" and tab/white place
* LogUtils as macro
* GameState_, GameAlloc_, SystemArena_ & ZeldaArena_
* Revert "GameState_, GameAlloc_, SystemArena_ & ZeldaArena_"
This reverts commit 0d85caaf7e342648c01a15fe21e93637352dc596.
* Like last commit but as macro
* Fix matrix not using macros
* use function not macro
* DebugArena_* functions
GameAlloc_MallocDebug
BgCheck_PosErrorCheck as macros
removed issues with ; in macro file
* MM Bunny Hood enhancements: no age restrictions & wear across entrances (#560)
* Remove age restriction on MM Bunny Hood
* Handle mask slot changing; init Link wearing mask
* Reset mask state after selling
* Use unordered maps in some hot paths (#566)
* Use unordered maps in some hot paths
* Address PR comments
* Cheat: Infinite Epona Boost (#577)
* Cheat: Infinite Epona Boost
* Edit for readability
* update pulseaudio for 44.1khz audio (#587)
* use pulseaudio defaults
* spaces/tabs
* pulseaudio values tuned for n64 audio at 44.1khz
* update tlength
* remove one hardcoded samplerate
Co-authored-by: briaguya <briaguya@alice>
* Restoration Item Sliders (#595)
* Allows players to set custom restoration values for potions and milk
* Fixed a dumb oversight
* implemented fairy sliders
* use ini window resolution (#410)
* use ini window resolution
* use arguments for directx window size
* default 640x480 not 320x240
* kick off a build
* and revert
* default config 640x480 not 320x240
* add todo
Co-authored-by: briaguya <briaguya@alice>
* 3D Drops & Projectiles update (#548)
* Fix remaining rupee and keys
* fix tabs -> spaces
* more fix about tabs -> spaces
* Better up <-> down mouvement for hearts
* remove useless comment
* Cosmetics menu rework (#589)
* -
* DPad/some margin fix(left side)
* various ImGui stuff and fixes
* disabled kaleido menu (non working)
* fix win being dumb
* same for C btn this time
* Fix windows build
* Beating hearts fix
* Default win size and some placement fix
* Fix Dpad Ammo & C notes, Kaleido, white dog
* some texts fix and tab move
* Add stone of agony, some fixes and build correctly
* precise item place with Dpad
* Gamecube -> GameCube
Co-authored-by: Baoulettes <iMacWin10>
* [CI] Create an Appimage for 64bit builds (#570)
* [CI] Create AppImage file
* [CI] Updated Jenkinsfile
* [MISC] fix indentation
* [MISC] Fix indentation
* [MISC] Fix indentation
* [CI] 7z appimage and readme
* [CI] AppImage icon file (#597)
* [CI] Add patchelf
* [BUILD] Include Hi-Res icon
* Fix portability use of std::clamp (#596)
* Add N64 weird frames and OOB Bombchus cvars (#602)
* Add gN64WeirdFrames and gBombchuOOB cvars
* Rename gBombchuOOB to gBombchusOOB
* Fix pipeline
* [BUILD] Do not strip ZAPD (#598)
* [BUILD] Do not strip ZAPD
* [BUILD] Reuse Icon Asset
* [APPIMAGE] Handle paths with spaces
* [macos] Distribute optimized builds (#599)
* Cosmetics texts fixes (#604)
* branch init + few fixes
* Reset button
* Several texts fixes and default color to GameCube
* space issues
* some more extra space that was not needed.
* space yes last time ...
* Arrows being able to be rainbow some more texts fixes
* more texts fixes
* c-buttons some plurial fix
* Fixes bug in demo effect due to removed display list set.
* King dodongo room crash (#613)
* first attempt
* force camera setting to be at least 0 (dirty!)
* -
* reverted something to just include fix
* Invalidate text box icon before drawing (#607)
* [APPIMAGE] Set lib path for ZAPD (#611)
* New drop runtime fix (#614)
* inital rework
* fixed default rotation for 2D sprites
* fix tab/space issues
* Fix Ganon's Castle title cards (#606)
* Checkered room crash workaround (#615)
* Increase poly and vertex count for dyna actors
* Add TODO
* Only apply fix in Forest Temple
* Enable globally
* Match case of 'Shipwright' in Linux build (#619)
* Fix 0xabababab crash (#617)
* Unconditionally setup the normal skybox
* Only call Skybox_Setup once ever
* Equipment upgrade text fix and any pause slot enhancement fix (#620)
* Fix upgrade name text not rendering
* Use cvar and don't render equip help for empty item slots
* Fix rendering logic
* Fix incorrect item name rendered for one frame
* Reorder comparison
* Remove extra indent
* Remove accidental changes
* ImGui grammer, consistency, and clarity fixes (#625)
* ImGui grammer, consistency, and clarity fixes
Co-Authored-By: Stormghetti <56653191+Stormghetti@users.noreply.github.com>
* Adds more new lines for users on smaller displays
Co-Authored-By: Stormghetti <56653191+Stormghetti@users.noreply.github.com>
Co-authored-by: Stormghetti <56653191+Stormghetti@users.noreply.github.com>
* New drops shadows & rotation fixes (#627)
* fixes
* forgot to add heart pieces in rotation logic
* Dodongo's Cavern blue warp crash fix (#622)
* Doodong's Cavern blue warp crash fix
* >= not >
* Don't waste a line of space
* add support for clang compiler (#592)
* hacks to align strings for clang... wow just wow
* start work to getting built with clang
* fix issues with struct constructors, all builds, doesn't link still
* fix some narrowing issues that clang complains about
* fix compliation of zapd
* fix null deref in VersionInfo
* builds with clang
* make stringbuilding use StringHelper instead of addition
* fix linking
* add CLANG SHIP overlay on clang built versions
* doesn't need to be volatile
* mark unknown strings as extern
* rename some stuff
* can't align extern
* hopefully fix compilation for everythign
* expandtab
* allow setting LD
* Revert "allow setting LD"
This reverts commit 711aba6db2c41bab476bd34e878af6a37a7f5559.
maybe to use lld it should be a LDFLAG?
* -Wno-deprecated-declarations is required for newer versions of clang
on macOS 13 beta sdk, the version of apple clang requires this
* Add jenkins support for clang
* Forward CXX flags to stormlib compilation
* Move GCC only flags to check
* use exports to set multiarch setup
* Fix Jenkins forever
* use make instead of cmake --build
add some flags to build with clang-11 as well
* address review coments
- rework extraction to allow multi thread
- misc readability cleanup
* update makefile to add WARN on linux+clang
Co-authored-by: David Chavez <david@dcvz.io>
* Fix develop
* Fixes grey screen issue + tooltip for 2 handed shield
* Don't close controller after SDL has quit (#642)
* Don't close controller after SDL has quit
* Don't check if controller can rumble if null
* Fixes Barinade's set whenever boss fight is reloaded (#639)
* Reimplements unused Barinade reset function.
* Removes the Jellyfish from Barinade's body on reset.
* add the ability to pull graves during the day (#637)
* change max internal res multiplier to 3x, use float and % instead of int (#638)
* change max internal res multiplier to 3x, use float and % instead of int
* Update libultraship/libultraship/ImGuiImpl.cpp
Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>
* Fixes crash on Biggoron trade failure screen wipe
Resolves #621
* fixes center docking (#652)
* testing out item replacement (#416)
* skip learning song of storms
* don't set flag when getting goron tunic as child
* Initiates prelude check when master sword unloads.
Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again.
* Stops Shadow Temple lore prompts from appearing in rando.
* Skips cutscene of royal tomb explosion in rando.
Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here.
* Improves visual of exploding gravestone.
* Adds some comments explaining the rando differences
* Skip ruto text box in jabu blue warp
For rando
* skip intro cutscene in dodongo's cavern
* load spoiler files on boot, fix spoilerfile existing check when making new saves
* name entry dropped spoiler logic
* make sure to actually init the cvar
* no chime on load
* uncomment
* Skip ganondrof cutscene
Skip to scream part of the death animation, skipping the text boxes etc. For rando
* Update z_boss_ganondrof.c
* skip owl flight cutscenes in rando
* Fixes skipped text so it only applies to shadow temple.
Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors.
* Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case.
* TEST: Text for item
* Adding ganon flavor text
* ADD: AMMO Count
* format ganon text/hint text
* Autoskip the tower cutscene if settings call for tower collapse.
* ganon hint text logic
* Improved prelude after time travel fix
* swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things.
* this is all i did
* not the cleanest code ever but it's working
* ADD: GS Count
* ADD: Wallter (crash for now)
* TWEAK: Wallet check
* FIX: Use DrawItem instread of DrawUpgrade... b-baka!
* Fixes some vanilla bugs introduced by rando code.
* Added cutscene skip for zelda escaping
Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger
* ADD: X Spacing + Placeholders for song
* ADD: default case for items
* TWEAK: Spacing
* FIX: Light Arrow
* ADD: Ammo Option
* use groups instead
* ADD: More spacing logic
* songs and names
* TWEAK: Color on wallet
* colors
* Added flags cutscene before nabooru fight
* ADD: ChromaKey text
* First attempt skip cs after nabooru defeat
* Better implementation for specific rando cutscene skips
* use pulseaudio defaults
* spaces/tabs
* move color push/pop to stop crash
* make the colors work again
* the real bottle fix
* pulseaudio values tuned for n64 audio at 44.1khz
* update tlength
* remove one hardcoded samplerate
* Cleaned up and fixed zelda escape skip
The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of.
* Revert one line to match original
nothing functional
* another hint line that breaks autonewline logic
* don't autospawn epona if we don't have the song/ocarina
* Trying to use iron knuckle death effects
not working yet
* Streamlined OoT cutscene skip for future additions
Also cleaned up if statement in general
* Made if statement more readable
Also added clarity for what cutscene was skipped
* Fixed typo in comment
* Janky nabooru defeat cs skip
* altar text formatting (gonna need help shortening some of the french ones)
* more altar text formatting
* english altar text formatting complete
* make gtg blocking guard check for card not bridge
* FIX: Typo!
* FIX: Uppercases
* FIX: Typo
* TWEAK: Alter + some names
* TWEAK: More caps!
* ADD: Missing string
TWEAK more uppercases and namefixe
s
* Hide nabooru death by covering her in flames
* bandaid fix for death crash issue
* Twinrova defeat cs skip
Skips the animation and manually calls the function to show the "beam" around the sisters
* fix crash
* fix caps to match
* fix great fairy reward mashing/shielding issue
* TWEAK : Typo clé to Clé
* TWEAK: Some Altar hints
TWEAK: Some capitals
* TWEAK: Unmatching text + some cap again
* TWEAK: More tweaks
* fix build
* remove extra json.hpp, add hint
* Update randomizer_item_tracker.cpp
* TWEAK: Double Defense with RedParticles instead of white
* make sure we don't optimize out the check to ensure a spoilerfile exists
* vanilla ganon boss key hint formatting
* TWEAK: FR- better way of the hero text
* fix
* and again
* Initializes dungeonsDone items in gSaveContext to 0.
* Replaces sizeof calculation with a NUM_DUNGEONS constant.
* Fixes Saria's Gift on the LW Bridge from getting killed when holding shield.
* More airtight fix for Saria's Gift on the Bridge.
* Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId.
* Invalidate text box icon before drawing
* Fixes the case where Saria's gift is an Ice Trap.
We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine.
* Initial commit
Might need changing when we change the settings in the future
* Fixes Door of Time opening cutscene after warping with prelude.
* Initial waterfall skip
Very rudimentary way of doing things but it seems to work so :shrug:
* inital rework
* fixed default rotation for 2D sprites
* fix tab/space issues
* 3d drops rando merge fix again
* Allows Impa to appear in the Lullaby check post drawbridge escape.
* Changes Ganon's Trials Count setting to a checkbox
The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed.
* Sets all Ganon's Trials to incomplete in new saves.
Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131
* fix castle guards when oot throw cutscene has already played in rando
* Properly removes the beams when trials are cleared.
* Removes Question Mark from Skip Ganon's Trials UI.
* Adds a todo comment about when to change back to slider.
* make deku seeds check for bullet bag
* Various tweaks
TWEAK: Altar Text
TWEAK: Hint names
TWEAK: Replace more problematic œ to oe
* upgrade ocarina on both child and adult equips
* FIX: Jabu Item
* update equipped hookshot/longshot when obtained as other age
* add hint
* don't give the bgs check without the claim check
* Skips Darunia Cutscene in Fire Temple
* Added a TODO note about not skipping the cutscene.
There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch.
* remove todo
* restore fast ocarina option in imgui that was lost in merge
* Fixes grey screen issue + tooltip for 2 handed shield
* update to use dg instead of g for textures in item tracker
* TWEAK: Default color for cosmetic RAND button was not the corect one
* fix texture crash, remove unused item tracker code
* don't open mask shop until we get zelda's letter
* Update README.md
* Prevents "correct" chime under incorrect conditions.
* Fixes typo in conditional and adds "bonk" sound effect.
"Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time.
* remove modify dpad equips toggle, replace with checks for dpad menu
* remove extra check
* add ability to hold c-up to assign to dpad when dpad menuing is enabled
* disable d-pad navigation on item menu when holding c-up to equip
* dpad+c-up stuff for equipment menu
* ADD: Checbox for songs colors
* TWEAK: RandoColors for normal songs
* kind of quick and dirty but it works
* TWEAK: Clarity of the tooltip
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Dog <5172592+Dog@users.noreply.github.com>
Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com>
Co-authored-by: Baoulettes <perlouzerie@hotmail.fr>
Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
* Cosmetics hotfixes (#640)
* Initial branch creation
* Revert Main Game so it do not conflict later
* should fix window build, made namespace for Cosmetics
* forgot to edit one title
* Ability to add hidden window (usefull for Rainbow)
Fix building issues
* Line break, unused bool remove
* add descriptive todo for death crash bandaid (#655)
Co-authored-by: briaguya <briaguya@alice>
* Removed legacy audio mode and fixed ganon sound bug (#657)
* Free Camera (#337)
* wip free cam
* Almost done, needs collision still
* Added free cam behind cvar
* added WIP collision
* Fixed & implemented "Manual mode" from WW & TP
* Fixed camera not rotating when Link is moving
* fixed initialized camera rotation
* Fixed camera getting stuck + made it smoother
* reduced deadzone
* fixed epona camera height + added WW z-target free camera
* Adjusted player camera height & fixed fov
* Fixed camera roll
* fixed fov when moving the camera while in z-target
* Camera resets to Auto when going through doors or changing maps
* Fixed building
* touch
* more touch work
* Added WIP mouse support to the free cam
* gui stuff
* fixed building
* fixed building error
* ok fixed building for real this time
* oops
* Fix compilation issues
* removed mouse stuff that magically appeared in this branch
* smoothed out stick values & removed remains of mouse support
* re-added manual camera when pressing Z
* reduced minimum Y position of camera
* Addressed dcsv's nitpicks
* part 2
* oops
Co-authored-by: David Chavez <david@dcvz.io>
* Rando: Allows Malon's Item Check to be obtained by pulling out the Ocarina. [FIXED PR] (#672)
* Fixes using the Ocarina to get the check from Malon.
Still some cleanup to do here. For some reason the player can shield before receiving the check. It doesn't set the flag if the player does that so they can still try again, but would prefer a different solution if possible.
* Prevents Shielding from blocking the Item_Give from happening.
* Code Cleanup and comments explaining the new rando flow.
* Removes inventory check when pulling out Ocarina
This allows OI to properly give the check, which is important for Glitched logic later down the line. Talking to Malon still requires the Ocarina in your inventory.
* Prevents non-malon textboxes from triggering the check.
Also adds a comment explaining the condtional for getting the check from talking to Malon since it got pretty long.
* Actually fixes checking for text boxes.
* Relocates a comment for improved clarity.
* Fix Rando Water Temple Softlock (#665)
We use 3DS logic to generate item placement, but didn't have this specific door in Water Temple unlocked from the beginning like 3DS does.
This meant that if people took specific paths through the temple, they could softlock themselves by missing a key.
* Rando: GtG and carpenter prompts skip (#663)
* Skip gtg and carpenter prompt
For rando. Tested and just works.
* Fixed missing break
* Hide debug overlay behind gDebugEnabled (#660)
* Introduce App Directory Path (#572)
* Introduce app directory path concept
* macos: Remove hacky way of using applicaiton directory
* Update the new SaveManager
* Address stack user after return
* Remove unecessary property
* Use std::string for filepath
* Improve clang specific detections
* Use new path system for imgui files
* Improve helper for getting relative paths
* fix hidden wnd (#744)
* Split damage multiplication into its own PR (#656)
* Split damage multiplication into its own PR
* Found a more elegant implementation of the powers char*[]
* Fixes Maps, Compasses, and Boss Keys in Vanilla. (#751)
* .xiF slebaL
* Update Keese labels
* Fixed soundfont issues
* Skip warp song cutscenes in rando (#664)
Does it by skipping to the last part of the cutscene data. Tested on all songs, both adult and child.
* don't spawn blocking mido after we've already shown him the sword/shield (#675)
Co-authored-by: briaguya <briaguya@alice>
* Controller Configuration UI and JSON Config (#760)
* Initial controller hud ui
* Reverted fbdemo changes
* Moved config to json and implemented controller config
* fix build on linux, gitignore new config file
* fix build
* Fix compilation and file directory paths
* Call save on cvar save
* Fixed cvar loading and added deck slots to the config
* Changed control deck port 0 to use a physical device by default
* Added gyro and rumble & fixed loading errors
* Save config on toggle menubar
* fix linux build
* Fixed drift calculation
* Controller config now saves when pressing F1
* Removed ExitGame hook from ImGuiImpl
* Moved mappings to a map
* Added GetKeyName
* untranslate scancodes
* Fixed hud layout on keyboard device
* Fixed keyboard read on hud
* Fixed crash when reloading controllers
* Removed ConfigFile and changed file extension
* Changed Dummy to Disconnected and fixed filters
* Removed function leftover
* Changed ControllerHud to InputEditor
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: David Chavez <david@dcvz.io>
* Enough! My ship sails in the morning.
* Fixed menubar items position (#763)
* Fixed menubar items position
* Reverted tooltip tab position
* Fixes macOS randomizer functionality with App Directory (#761)
* Fixes macOS randomizer functionality with App Directory
* Fix windows build
* Update soh/soh/Enhancements/randomizer/3drando/rando_main.cpp
* Update soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp
* Revert band-aid fix
Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>
* Fix migration cvar deletion path (#765)
* Various controller fixes (#771)
* Fix controller
* Also fix rumble strength being a bool
* Remove ControllerHud.cpp
* Downgrade platform toolset back to previous version
* Fix gyro
* Fix bug that makes binding axes difficult and clear buttons before reading
* Exaggerate gyro display and adjust stick binding threshold
* Initialize drift thresholds
* git subrepo push soh
subrepo:
subdir: "soh"
merged: "75ccbade8"
upstream:
origin: "https://github.com/HarbourMasters/soh.git"
branch: "master"
commit: "75ccbade8"
git-subrepo:
version: "0.4.1"
origin: "???"
commit: "???"
* One more change from PR review
* Fix some paths
* Fix merge conflict messup
* More merge conflict fixes
* And another conflict fix
* And another fix
* Remove reference to removed build files
* Add full path to switch cmake
Co-authored-by: David Chavez <david@dcvz.io>
Co-authored-by: KiritoDev <36680385+KiritoDv@users.noreply.github.com>
Co-authored-by: Jeffrey Crowell <github@crowell.biz>
Co-authored-by: BountyChocolate123456 <101743444+BountyChocolate123456@users.noreply.github.com>
Co-authored-by: sholdee <102821812+sholdee@users.noreply.github.com>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: rozlette <Rozelette@users.noreply.github.com>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>
Co-authored-by: vaguerant <vaguerant@users.noreply.github.com>
Co-authored-by: earthcrafterman <banddstudios@gmail.com>
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
Co-authored-by: qurious-pixel <62252937+qurious-pixel@users.noreply.github.com>
Co-authored-by: Baoulettes <perlouzerie@hotmail.fr>
Co-authored-by: Sirius902 <10891979+Sirius902@users.noreply.github.com>
Co-authored-by: modestposer <modestposer@gmail.com>
Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
Co-authored-by: Stormghetti <56653191+Stormghetti@users.noreply.github.com>
Co-authored-by: Sirius902 <3645979-Sirius902@users.noreply.gitlab.com>
Co-authored-by: MelonSpeedruns <melonspeedruns@outlook.com>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: Dog <5172592+Dog@users.noreply.github.com>
Co-authored-by: Nicholas Estelami <NEstelami@users.noreply.github.com>
Co-authored-by: ChristopherJTrent <ChristopherJTrent@outlook.com>
Co-authored-by: agamache <aaroncgamache@gmail.com>
Co-authored-by: M4xw <m4x@m4xw.net>
* Fixed switch compilation
* Fixed responsive on switch imgui
* Remove config save hook
* Added physical slots into controller name
* Add `ifdef` for switch specific code
* Add `ifdef` for switch specific code
* Added applet mode detection
* Replaced homebrew icon
* Fixed randomness on applet mode view
* Fixed clkrst initialization
* Switch profiles cleanup
* Cleaned code based on dcvz comments
* Remove unused hooks in Mercury
* Fixed compilation
* Use IMGUI_IMPL_OPENGL_LOADER_CUSTOM
* Fix up StormLib modifications
* Handle touch events at ImGui/SDL level
* Enable opening menu with -
* Load Nintendo Switch font
* Updates to window initiation
* Handle virtual keyboard via SDL
* Print OTR missing message to screen
* Rename makefile for Switch
* Some more additional fixes
* Branch creation plus edit
Changed ItemWidth & made label invisible (else issues)
Added a submit button next to the text field
* Removed set_texture_filter on imgui draw
* Readded nintendo switch font
* Fixed randomizer crash
* Fix issue with strdup windows
* [SWITCH] Update Jenkins file (#9)
* [SWITCH] Update Jenkins file
* [SWITCH] Dockerfile.switch
Can be combined with other Dockerfile
* [SWITCH] Add entrypoint file
* Update Jenkinsfile
* [SWITCH] Dockerfile mtab link
link `/proc/self/mounts /etc/mtab`
Co-authored-by: David Chavez <david@dcvz.io>
* Cleaned code based on PR comments
* Fixed switch compilation
* Cleaned full texture cache instead of doing it per char
* Randomizer only saves when its not a vanilla save
* Disabled input when menubar is opened
* Removed return from SetupFont
* Cleaned code based on comments
* Cleaned up random texts on switch error screen
* Killed
* Removed debug and changed compilation flags
Co-authored-by: KiritoDv <nohomoboi01@gmail.com>
Co-authored-by: Felipe Guaycuru <guaycuru@gmail.com>
Co-authored-by: David Chavez <david@dcvz.io>
Co-authored-by: Jeffrey Crowell <github@crowell.biz>
Co-authored-by: BountyChocolate123456 <101743444+BountyChocolate123456@users.noreply.github.com>
Co-authored-by: sholdee <102821812+sholdee@users.noreply.github.com>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: rozlette <Rozelette@users.noreply.github.com>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>
Co-authored-by: vaguerant <vaguerant@users.noreply.github.com>
Co-authored-by: earthcrafterman <banddstudios@gmail.com>
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
Co-authored-by: qurious-pixel <62252937+qurious-pixel@users.noreply.github.com>
Co-authored-by: Baoulettes <perlouzerie@hotmail.fr>
Co-authored-by: Sirius902 <10891979+Sirius902@users.noreply.github.com>
Co-authored-by: modestposer <modestposer@gmail.com>
Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
Co-authored-by: Stormghetti <56653191+Stormghetti@users.noreply.github.com>
Co-authored-by: Sirius902 <3645979-Sirius902@users.noreply.gitlab.com>
Co-authored-by: MelonSpeedruns <melonspeedruns@outlook.com>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: Dog <5172592+Dog@users.noreply.github.com>
Co-authored-by: Nicholas Estelami <NEstelami@users.noreply.github.com>
Co-authored-by: ChristopherJTrent <ChristopherJTrent@outlook.com>
Co-authored-by: agamache <aaroncgamache@gmail.com>
Co-authored-by: M4xw <m4x@m4xw.net>
2022-07-25 21:11:53 -04:00
# endif
2022-11-14 05:22:34 -05:00
2022-09-03 00:00:04 -04:00
# include "Enhancements/custom-message/CustomMessageTypes.h"
2022-07-26 20:46:49 -04:00
# include <functions.h>
2022-09-03 00:00:04 -04:00
# include "Enhancements/item-tables/ItemTableManager.h"
2023-06-03 15:27:45 -04:00
# include "SohGui.hpp"
2023-06-01 21:39:50 -04:00
# include "ActorDB.h"
2022-03-21 21:51:23 -04:00
2023-12-17 14:41:33 -05:00
# ifdef ENABLE_REMOTE_CONTROL
2022-09-27 22:41:17 -04:00
# include "Enhancements/crowd-control/CrowdControl.h"
2023-12-17 14:41:33 -05:00
# include "Enhancements/game-interactor/GameInteractor_Sail.h"
2022-09-27 22:41:17 -04:00
CrowdControl * CrowdControl : : Instance ;
2023-12-17 14:41:33 -05:00
GameInteractorSail * GameInteractorSail : : Instance ;
2022-09-27 22:41:17 -04:00
# endif
2023-02-26 19:46:25 -05:00
# include "Enhancements/mods.h"
2023-01-25 18:13:33 -05:00
# include "Enhancements/game-interactor/GameInteractor.h"
2023-02-15 14:30:34 -05:00
# include <libultraship/libultraship.h>
2023-01-17 00:17:49 -05:00
// Resource Types/Factories
# include "soh/resource/type/Animation.h"
# include "soh/resource/type/AudioSample.h"
# include "soh/resource/type/AudioSequence.h"
# include "soh/resource/type/AudioSoundFont.h"
# include "soh/resource/type/CollisionHeader.h"
# include "soh/resource/type/Cutscene.h"
# include "soh/resource/type/Path.h"
# include "soh/resource/type/PlayerAnimation.h"
# include "soh/resource/type/Scene.h"
# include "soh/resource/type/Skeleton.h"
# include "soh/resource/type/SkeletonLimb.h"
# include "soh/resource/type/Text.h"
# include "soh/resource/importer/AnimationFactory.h"
# include "soh/resource/importer/AudioSampleFactory.h"
# include "soh/resource/importer/AudioSequenceFactory.h"
# include "soh/resource/importer/AudioSoundFontFactory.h"
# include "soh/resource/importer/CollisionHeaderFactory.h"
# include "soh/resource/importer/CutsceneFactory.h"
# include "soh/resource/importer/PathFactory.h"
# include "soh/resource/importer/PlayerAnimationFactory.h"
# include "soh/resource/importer/SceneFactory.h"
# include "soh/resource/importer/SkeletonFactory.h"
# include "soh/resource/importer/SkeletonLimbFactory.h"
# include "soh/resource/importer/TextFactory.h"
# include "soh/resource/importer/BackgroundFactory.h"
2023-06-12 18:59:23 -04:00
# include "soh/config/ConfigUpdaters.h"
2024-01-08 10:25:47 -05:00
extern " C " {
# include "src/overlays/actors/ovl_En_Dns/z_en_dns.h"
}
2023-12-16 21:40:09 -05:00
void SoH_ProcessDroppedFiles ( std : : string filePath ) ;
2022-05-12 13:28:24 -04:00
OTRGlobals * OTRGlobals : : Instance ;
2022-06-20 13:41:43 -04:00
SaveManager * SaveManager : : Instance ;
2022-07-25 22:33:38 -04:00
CustomMessageManager * CustomMessageManager : : Instance ;
2022-08-23 20:11:38 -04:00
ItemTableManager * ItemTableManager : : Instance ;
2023-01-25 18:13:33 -05:00
GameInteractor * GameInteractor : : Instance ;
2023-02-16 09:49:45 -05:00
AudioCollection * AudioCollection : : Instance ;
2023-03-02 03:27:28 -05:00
SpeechSynthesizer * SpeechSynthesizer : : Instance ;
2022-04-18 05:37:47 -04:00
2023-01-26 18:43:09 -05:00
extern " C " char * * cameraStrings ;
std : : vector < std : : shared_ptr < std : : string > > cameraStdStrings ;
2023-05-28 18:40:53 -04:00
Color_RGB8 kokiriColor = { 0x1E , 0x69 , 0x1B } ;
Color_RGB8 goronColor = { 0x64 , 0x14 , 0x00 } ;
Color_RGB8 zoraColor = { 0x00 , 0xEC , 0x64 } ;
2023-11-05 21:21:44 -05:00
float previousImGuiScale ;
2023-10-30 11:55:53 -04:00
// Same as NaviColor type from OoT src (z_actor.c), but modified to be sans alpha channel for Controller LED.
typedef struct {
Color_RGB8 inner ;
Color_RGB8 outer ;
} NaviColor_RGB8 ;
static NaviColor_RGB8 defaultIdleColor = { { 255 , 255 , 255 } , { 0 , 0 , 255 } } ;
static NaviColor_RGB8 defaultNPCColor = { { 150 , 150 , 255 } , { 150 , 150 , 255 } } ;
static NaviColor_RGB8 defaultEnemyColor = { { 255 , 255 , 0 } , { 200 , 155 , 0 } } ;
static NaviColor_RGB8 defaultPropsColor = { { 0 , 255 , 0 } , { 0 , 255 , 0 } } ;
// Labeled according to ActorCategory (included through ActorDB.h)
const NaviColor_RGB8 LEDColorDefaultNaviColorList [ ] = {
defaultPropsColor , // ACTORCAT_SWITCH Switch
defaultPropsColor , // ACTORCAT_BG Background (Prop type 1)
defaultIdleColor , // ACTORCAT_PLAYER Player
defaultPropsColor , // ACTORCAT_EXPLOSIVE Bomb
defaultNPCColor , // ACTORCAT_NPC NPC
defaultEnemyColor , // ACTORCAT_ENEMY Enemy
defaultPropsColor , // ACTORCAT_PROP Prop type 2
defaultPropsColor , // ACTORCAT_ITEMACTION Item/Action
defaultPropsColor , // ACTORCAT_MISC Misc.
defaultEnemyColor , // ACTORCAT_BOSS Boss
defaultPropsColor , // ACTORCAT_DOOR Door
defaultPropsColor , // ACTORCAT_CHEST Chest
defaultPropsColor , // ACTORCAT_MAX
} ;
2023-01-26 18:43:09 -05:00
// OTRTODO: A lot of these left in Japanese are used by the mempak manager. LUS does not currently support mempaks. Ignore unused ones.
const char * constCameraStrings [ ] = {
" INSUFFICIENT " ,
" KEYFRAMES " ,
" YOU CAN ADD MORE " ,
" FINISHED " ,
" PLAYING " ,
" DEMO CAMERA TOOL " ,
" CANNOT PLAY " ,
" KEYFRAME " ,
" PNT / " ,
" > > " ,
" < < " ,
" < > " ,
GFXP_KATAKANA " *プレイヤ-* " ,
" E MODE FIX " ,
" E MODE ABS " ,
GFXP_HIRAGANA " ガメン " GFXP_KATAKANA " デモ " , // OTRTODO: Unused, get a translation! Number 15
GFXP_HIRAGANA " ガメン フツウ " , // OTRTODO: Unused, get a translation! Number 16
" P TIME MAX " ,
GFXP_KATAKANA " リンク " GFXP_HIRAGANA " キオク " , // OTRTODO: Unused, get a translation! Number 18
GFXP_KATAKANA " リンク " GFXP_HIRAGANA " ムシ " , // OTRTODO: Unused, get a translation! Number 19
" *VIEWPT* " ,
" *CAMPOS* " ,
" DEBUG CAMERA " ,
" CENTER/LOCK " ,
" CENTER/FREE " ,
" DEMO CONTROL " ,
GFXP_KATAKANA " メモリ " GFXP_HIRAGANA " ガタリマセン " ,
" p " ,
" e " ,
" s " ,
" l " ,
" c " ,
GFXP_KATAKANA " メモリパック " ,
GFXP_KATAKANA " セーブ " ,
GFXP_KATAKANA " ロード " ,
GFXP_KATAKANA " クリア- " ,
GFXP_HIRAGANA " ヲヌカナイデネ " ,
" FREE BYTE " ,
" NEED BYTE " ,
GFXP_KATAKANA " *メモリ-パック* " ,
GFXP_HIRAGANA " ヲミツケラレマセン " ,
GFXP_KATAKANA " ファイル " GFXP_HIRAGANA " ヲ " ,
GFXP_HIRAGANA " シテモイイデスカ? " ,
GFXP_HIRAGANA " ゲンザイヘンシュウチュウノ " , // OTRTODO: Unused, get a translation! Number 43
GFXP_KATAKANA " ファイル " GFXP_HIRAGANA " ハハキサレマス " , // OTRTODO: Unused, get a translation! Number 44
GFXP_HIRAGANA " ハイ " ,
GFXP_HIRAGANA " イイエ " ,
GFXP_HIRAGANA " シテイマス " ,
GFXP_HIRAGANA " ウワガキ " , // OTRTODO: Unused, get a translation! Number 48
GFXP_HIRAGANA " シマシタ " ,
" USE BYTE " ,
GFXP_HIRAGANA " ニシッパイ " ,
" E MODE REL " ,
" FRAME " ,
" KEY / " ,
" (CENTER) " ,
" (ORIG) " ,
" (PLAYER) " ,
" (ALIGN) " ,
" (SET) " ,
" (OBJECT) " ,
GFXP_KATAKANA " ポイントNo. " , // OTRTODO: Unused, need translation. Number 62
" FOV " ,
" N FRAME " ,
" Z ROT " ,
GFXP_KATAKANA " モ-ド " , // OTRTODO: Unused, need translation. Number 65
" R FOCUS " ,
" PMAX " ,
" DEPTH " ,
" XROT " ,
" YROT " ,
GFXP_KATAKANA " フレ-ム " ,
GFXP_KATAKANA " ト-タル " ,
GFXP_KATAKANA " キ- / " ,
} ;
2022-03-21 21:51:23 -04:00
OTRGlobals : : OTRGlobals ( ) {
2022-10-16 23:07:35 -04:00
std : : vector < std : : string > OTRFiles ;
2023-08-13 18:45:45 -04:00
std : : string mqPath = LUS : : Context : : LocateFileAcrossAppDirs ( " oot-mq.otr " , appShortName ) ;
2022-10-16 23:07:35 -04:00
if ( std : : filesystem : : exists ( mqPath ) ) {
OTRFiles . push_back ( mqPath ) ;
}
2023-08-13 18:45:45 -04:00
std : : string ootPath = LUS : : Context : : LocateFileAcrossAppDirs ( " oot.otr " , appShortName ) ;
2022-10-16 23:07:35 -04:00
if ( std : : filesystem : : exists ( ootPath ) ) {
OTRFiles . push_back ( ootPath ) ;
}
2023-05-07 23:01:12 -04:00
std : : string sohOtrPath = LUS : : Context : : GetPathRelativeToAppBundle ( " soh.otr " ) ;
2023-04-12 21:14:33 -04:00
if ( std : : filesystem : : exists ( sohOtrPath ) ) {
OTRFiles . push_back ( sohOtrPath ) ;
}
2023-08-13 18:45:45 -04:00
std : : string patchesPath = LUS : : Context : : LocateFileAcrossAppDirs ( " mods " , appShortName ) ;
2023-11-28 19:34:00 -05:00
std : : vector < std : : string > patchOTRs = { } ;
2022-10-17 18:44:10 -04:00
if ( patchesPath . length ( ) > 0 & & std : : filesystem : : exists ( patchesPath ) ) {
if ( std : : filesystem : : is_directory ( patchesPath ) ) {
2023-11-24 09:40:30 -05:00
for ( const auto & p : std : : filesystem : : recursive_directory_iterator ( patchesPath , std : : filesystem : : directory_options : : follow_directory_symlink ) ) {
2022-10-17 18:44:10 -04:00
if ( StringHelper : : IEquals ( p . path ( ) . extension ( ) . string ( ) , " .otr " ) ) {
2023-11-28 19:34:00 -05:00
patchOTRs . push_back ( p . path ( ) . generic_string ( ) ) ;
2022-10-17 18:44:10 -04:00
}
}
}
}
2023-11-28 19:34:00 -05:00
std : : sort ( patchOTRs . begin ( ) , patchOTRs . end ( ) , [ ] ( const std : : string & a , const std : : string & b ) {
return std : : lexicographical_compare (
a . begin ( ) , a . end ( ) ,
b . begin ( ) , b . end ( ) ,
[ ] ( char c1 , char c2 ) {
return std : : tolower ( c1 ) < std : : tolower ( c2 ) ;
}
) ;
} ) ;
OTRFiles . insert ( OTRFiles . end ( ) , patchOTRs . begin ( ) , patchOTRs . end ( ) ) ;
2023-12-10 12:49:15 -05:00
std : : unordered_set < uint32_t > ValidHashes = {
2022-10-16 23:07:35 -04:00
OOT_PAL_MQ ,
OOT_NTSC_JP_MQ ,
OOT_NTSC_US_MQ ,
OOT_PAL_GC_MQ_DBG ,
2023-04-23 19:13:51 -04:00
OOT_NTSC_US_10 ,
OOT_NTSC_US_11 ,
OOT_NTSC_US_12 ,
2022-10-16 23:07:35 -04:00
OOT_PAL_10 ,
OOT_PAL_11 ,
OOT_NTSC_JP_GC_CE ,
OOT_NTSC_JP_GC ,
OOT_NTSC_US_GC ,
OOT_PAL_GC ,
OOT_PAL_GC_DBG1 ,
OOT_PAL_GC_DBG2
} ;
2023-11-20 08:02:15 -05:00
context = LUS : : Context : : CreateUninitializedInstance ( " Ship of Harkinian " , appShortName , " shipofharkinian.json " ) ;
context - > InitLogging ( ) ;
context - > InitConfiguration ( ) ;
context - > InitConsoleVariables ( ) ;
2023-05-10 21:32:15 -04:00
// tell LUS to reserve 3 SoH specific threads (Game, Audio, Save)
2023-11-20 08:02:15 -05:00
context - > InitResourceManager ( OTRFiles , { } , 3 ) ;
2023-12-10 12:49:15 -05:00
2023-11-20 08:02:15 -05:00
context - > InitControlDeck ( { BTN_MODIFIER1 , BTN_MODIFIER2 } ) ;
context - > GetControlDeck ( ) - > SetSinglePlayerMappingMode ( true ) ;
context - > InitCrashHandler ( ) ;
context - > InitConsole ( ) ;
2023-05-07 23:01:12 -04:00
2023-11-20 08:02:15 -05:00
auto sohInputEditorWindow = std : : make_shared < SohInputEditorWindow > ( " gControllerConfigurationEnabled " , " Input Editor " ) ;
context - > InitWindow ( sohInputEditorWindow ) ;
context - > InitAudio ( ) ;
2023-05-07 23:01:12 -04:00
2024-01-15 10:26:19 -05:00
SPDLOG_INFO ( " Starting Ship of Harkinian version {} " , ( char * ) gBuildVersion ) ;
2023-05-07 23:01:12 -04:00
context - > GetResourceManager ( ) - > GetResourceLoader ( ) - > RegisterResourceFactory ( LUS : : ResourceType : : SOH_Animation , " Animation " , std : : make_shared < LUS : : AnimationFactory > ( ) ) ;
context - > GetResourceManager ( ) - > GetResourceLoader ( ) - > RegisterResourceFactory ( LUS : : ResourceType : : SOH_PlayerAnimation , " PlayerAnimation " , std : : make_shared < LUS : : PlayerAnimationFactory > ( ) ) ;
context - > GetResourceManager ( ) - > GetResourceLoader ( ) - > RegisterResourceFactory ( LUS : : ResourceType : : SOH_Room , " Room " , std : : make_shared < LUS : : SceneFactory > ( ) ) ; // Is room scene? maybe?
context - > GetResourceManager ( ) - > GetResourceLoader ( ) - > RegisterResourceFactory ( LUS : : ResourceType : : SOH_CollisionHeader , " CollisionHeader " , std : : make_shared < LUS : : CollisionHeaderFactory > ( ) ) ;
context - > GetResourceManager ( ) - > GetResourceLoader ( ) - > RegisterResourceFactory ( LUS : : ResourceType : : SOH_Skeleton , " Skeleton " , std : : make_shared < LUS : : SkeletonFactory > ( ) ) ;
context - > GetResourceManager ( ) - > GetResourceLoader ( ) - > RegisterResourceFactory ( LUS : : ResourceType : : SOH_SkeletonLimb , " SkeletonLimb " , std : : make_shared < LUS : : SkeletonLimbFactory > ( ) ) ;
context - > GetResourceManager ( ) - > GetResourceLoader ( ) - > RegisterResourceFactory ( LUS : : ResourceType : : SOH_Path , " Path " , std : : make_shared < LUS : : PathFactory > ( ) ) ;
context - > GetResourceManager ( ) - > GetResourceLoader ( ) - > RegisterResourceFactory ( LUS : : ResourceType : : SOH_Cutscene , " Cutscene " , std : : make_shared < LUS : : CutsceneFactory > ( ) ) ;
context - > GetResourceManager ( ) - > GetResourceLoader ( ) - > RegisterResourceFactory ( LUS : : ResourceType : : SOH_Text , " Text " , std : : make_shared < LUS : : TextFactory > ( ) ) ;
context - > GetResourceManager ( ) - > GetResourceLoader ( ) - > RegisterResourceFactory ( LUS : : ResourceType : : SOH_AudioSample , " AudioSample " , std : : make_shared < LUS : : AudioSampleFactory > ( ) ) ;
context - > GetResourceManager ( ) - > GetResourceLoader ( ) - > RegisterResourceFactory ( LUS : : ResourceType : : SOH_AudioSoundFont , " AudioSoundFont " , std : : make_shared < LUS : : AudioSoundFontFactory > ( ) ) ;
context - > GetResourceManager ( ) - > GetResourceLoader ( ) - > RegisterResourceFactory ( LUS : : ResourceType : : SOH_AudioSequence , " AudioSequence " , std : : make_shared < LUS : : AudioSequenceFactory > ( ) ) ;
context - > GetResourceManager ( ) - > GetResourceLoader ( ) - > RegisterResourceFactory ( LUS : : ResourceType : : SOH_Background , " Background " , std : : make_shared < LUS : : BackgroundFactory > ( ) ) ;
2023-01-17 00:17:49 -05:00
2022-05-12 13:28:24 -04:00
gSaveStateMgr = std : : make_shared < SaveStateMgr > ( ) ;
Rando Definition Deduplication (#3284)
* Initial StaticData and RandoItem class definitions
* Initial implementation of RandoItem class.
* Rerranges RandoItem Constructor parameters
The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on.
* Switches static data from map to static array.
Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values.
* Defines part of the randomizer item list.
* Adds more item class instances to item_list.cpp
Up through bottles, many more items still to go.
* Adds song items
* Adds Maps and Compasses to the item_list
* Added Key Items to item_list
* Added Key Rings to item_list
* Added Dungeon Rewards to item_list
* Adds generic items and refills to item_list
* Adds shop items, triforce, and hints
Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them.
* Adds in the stages of progressive items
These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.)
* Remove GetItemEntry data from progressive items
* Moves/adds function definitions to item/item_list
* Refactors GetItemEntry data
It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.)
* Adds item class member for if item is progressive
* Removes unneeded stuff from initializer list macro
* Replaces relevant `uint32_t`s w/ `RandomizerGet`s
Also replaces calls to the ItemTable method with StaticData::RetrieveItem
* Switches our runtime code to use the new itemList.
* Changes just enough hint gen code to compile
* Initial Definition of Location Class
* Initial Implementation of Location
* Fixes some names and definitions.
* Extracts ActorID and SceneID enums to separate files.
This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected.
* Replaces the forward definitions with the new imports.
* Adds missing data for RandomizerCheckObjects.
* Definition and first entry of locationTable
* Added Mido's House Locations
* Added locations up through lost woods.
* Adds in Hyrule Field locations.
* Adds Lake Hylia locations
* Adds location name comments
* Adds Gerudo Valley Locations
* Adds Gerudo Fortress locations.
* Adds the Wasteland and Collosus locations
* Adds Market locations
* Adds Hyrule Castle locations.
* Adds Kakariko and Graveyard locations.
* Adds Death Mountain checks.
* Adds Goron City locations
* Adds Death Mountain Crater locations
* Adds Zora's River locations
* Added Zora's Domain Locations.
* Added Zora's Fountain locations
* Adds Lon Lon Ranch locations.
* Adds Deku Tree locations
* Adds Dodongo's Cavern Locations.
* Adds Jabu Jabu's Belly Locations
* Adds Forest Temple Locations
* Adds Fire Temple Locations
* Adds Water Temple Locations
* Added Spirit Temple Locations
* Some of shadow temple locations.
* Adds remaining Shadow Temple locations
* Fixes a leftover merge conflict
* Adds Bottom of the Well locations.
* Adds Ice Cavern locations
* Adds GTG locations.
* Adds Ganon's Castle and Tower locations
* Adds dungeon Gold Skulltula locations.
* Adds Overworld Gold Skulltula locations
* Adds dungeon reward locations
* Adds Heart Container Locations
* Adds Cutscene and Song locations
* Adds Cow locations
* Adds Shop locations.
* Adds hint locations
* Adds function for retrieving the Location data.
* Initial definition of ItemLocation structure for tracking runtime data
* First push on converting code to use new location definitions
* Changes hints to use the new tables
* Further conversion of hints to new definitions.
* Adds new Hint and Location IDs to area tables
* Moves areaTable to use new RandomizerRegion keys
* Removal of 3drando/item_location files.
* Uses new RandomizerRegion keys in entrance.cpp
* Final push for removal of massive keys.hpp enum
* Uses new SceneID Enum Values
* Remove RandomizerCheckObject structs in favor of new location list.
* Fix a few stragglers to successfully build
* Rename of RandoItem to just Item, but in the Rando namespace
* Adds static hints (Light Arrows, Altar text, etc) to the new Hint table.
* More hint related fixes/edits
* small fix for #include path
* Fix various miscellaneous issues related to seed gen and spoiler parsing.
* Handle progressive items correctly.
* Fixes some hint generation logic
* Fix a few GetItemEntry niche bugs.
* Adds missing shop GI Entries
* Formatting fixes
* small formatting fix
* Namespace StaticData under Rando
* Added a note about a potential use-after-free.
I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used.
* Fixes missing location table entries
* Fixes LUS submodule and removes now-unused code
* Resolves weird duplicate definition issue
* Fix missing include
It was missed because not being included wasn't an issue on Windows.
* Fixes error present on Linux builds
* Fixes some issues with excluding locations
* Updates the Resolve Exclusion conflicts function
not sure if actually used, will look into that more later
* Removes some duplicate RGs
* More fixes of duplicate RG values.
* Fix a few duplication issues in the check tracker.
* Fix progressive bombchus.
* Minor typo fix, shouldn't really be affecting anything though
* Should fix some of the remaining check tracker issues.
* oops wrong boolean operator
* Fix skulltulas in the check tracker.
* oops, missing comma
* re-formatting of HintStone locations
* Fixes issue when picking up second Progressive Bullet Bag
* Hide bombchu bowling bombchus
* Fixes missed skullScene in location_list
* Reformats shop items
* Re-formats cow checks
* reformat song locations
* reformat "cutscene" checks
* reformat heart container locaitons
* reformat Boss/Dungeon reward checks
* Hide Triforce Completed if not playing Triforce Hunt
* Fixes incorrect chest param
* reformat GS Tokens locations and cuts down on duplicate data
* reformat Ganons Castle checks
* reformat GTG check locations
* Prevents Gift from Raoru from appearing in the check tracker
* more reformatting (botw, ice cavern, shadow temple)
* Should fix a couple more check tracker checks
* reformat spirit temple checks
* reformat water and fire temple checks
* fix RC_ZR_GS_ABOVE_BRIDGE flag typo
* reformat Forest Temple checks
* Fix RC_LW_TRADE_ODD_POTION in check tracker
* reformat child dungeon locations
* reformat overworld locations
* reformat item entries
2023-10-19 19:48:25 -04:00
gRandoContext = Rando : : Context : : CreateInstance ( ) ;
2024-01-08 09:39:15 -05:00
gRandoContext - > InitStaticData ( ) ;
More gap-bridging (#3323)
* Initial StaticData and RandoItem class definitions
* Initial implementation of RandoItem class.
* Rerranges RandoItem Constructor parameters
The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on.
* Switches static data from map to static array.
Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values.
* Defines part of the randomizer item list.
* Adds more item class instances to item_list.cpp
Up through bottles, many more items still to go.
* Adds song items
* Adds Maps and Compasses to the item_list
* Added Key Items to item_list
* Added Key Rings to item_list
* Added Dungeon Rewards to item_list
* Adds generic items and refills to item_list
* Adds shop items, triforce, and hints
Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them.
* Adds in the stages of progressive items
These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.)
* Remove GetItemEntry data from progressive items
* Moves/adds function definitions to item/item_list
* Refactors GetItemEntry data
It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.)
* Adds item class member for if item is progressive
* Removes unneeded stuff from initializer list macro
* Replaces relevant `uint32_t`s w/ `RandomizerGet`s
Also replaces calls to the ItemTable method with StaticData::RetrieveItem
* Switches our runtime code to use the new itemList.
* Changes just enough hint gen code to compile
* Initial Definition of Location Class
* Initial Implementation of Location
* Fixes some names and definitions.
* Extracts ActorID and SceneID enums to separate files.
This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected.
* Replaces the forward definitions with the new imports.
* Adds missing data for RandomizerCheckObjects.
* Definition and first entry of locationTable
* Added Mido's House Locations
* Added locations up through lost woods.
* Adds in Hyrule Field locations.
* Adds Lake Hylia locations
* Adds location name comments
* Adds Gerudo Valley Locations
* Adds Gerudo Fortress locations.
* Adds the Wasteland and Collosus locations
* Adds Market locations
* Adds Hyrule Castle locations.
* Adds Kakariko and Graveyard locations.
* Adds Death Mountain checks.
* Adds Goron City locations
* Adds Death Mountain Crater locations
* Adds Zora's River locations
* Added Zora's Domain Locations.
* Added Zora's Fountain locations
* Adds Lon Lon Ranch locations.
* Adds Deku Tree locations
* Adds Dodongo's Cavern Locations.
* Adds Jabu Jabu's Belly Locations
* Adds Forest Temple Locations
* Adds Fire Temple Locations
* Adds Water Temple Locations
* Added Spirit Temple Locations
* Some of shadow temple locations.
* Adds remaining Shadow Temple locations
* Fixes a leftover merge conflict
* Adds Bottom of the Well locations.
* Adds Ice Cavern locations
* Adds GTG locations.
* Adds Ganon's Castle and Tower locations
* Adds dungeon Gold Skulltula locations.
* Adds Overworld Gold Skulltula locations
* Adds dungeon reward locations
* Adds Heart Container Locations
* Adds Cutscene and Song locations
* Adds Cow locations
* Adds Shop locations.
* Adds hint locations
* Adds function for retrieving the Location data.
* Initial definition of ItemLocation structure for tracking runtime data
* First push on converting code to use new location definitions
* Changes hints to use the new tables
* Further conversion of hints to new definitions.
* Adds new Hint and Location IDs to area tables
* Moves areaTable to use new RandomizerRegion keys
* Removal of 3drando/item_location files.
* Uses new RandomizerRegion keys in entrance.cpp
* Final push for removal of massive keys.hpp enum
* Uses new SceneID Enum Values
* Remove RandomizerCheckObject structs in favor of new location list.
* Fix a few stragglers to successfully build
* Rename of RandoItem to just Item, but in the Rando namespace
* Adds static hints (Light Arrows, Altar text, etc) to the new Hint table.
* More hint related fixes/edits
* small fix for #include path
* Fix various miscellaneous issues related to seed gen and spoiler parsing.
* Handle progressive items correctly.
* Fixes some hint generation logic
* Fix a few GetItemEntry niche bugs.
* Adds missing shop GI Entries
* Formatting fixes
* small formatting fix
* Namespace StaticData under Rando
* Added a note about a potential use-after-free.
I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used.
* Fixes missing location table entries
* Fixes LUS submodule and removes now-unused code
* Resolves weird duplicate definition issue
* Fix missing include
It was missed because not being included wasn't an issue on Windows.
* Fixes error present on Linux builds
* Fixes some issues with excluding locations
* Updates the Resolve Exclusion conflicts function
not sure if actually used, will look into that more later
* Removes some duplicate RGs
* More fixes of duplicate RG values.
* Fix a few duplication issues in the check tracker.
* Fix progressive bombchus.
* Minor typo fix, shouldn't really be affecting anything though
* Should fix some of the remaining check tracker issues.
* oops wrong boolean operator
* Fix skulltulas in the check tracker.
* oops, missing comma
* re-formatting of HintStone locations
* Fixes issue when picking up second Progressive Bullet Bag
* Hide bombchu bowling bombchus
* Fixes missed skullScene in location_list
* Reformats shop items
* Re-formats cow checks
* reformat song locations
* reformat "cutscene" checks
* reformat heart container locaitons
* reformat Boss/Dungeon reward checks
* Hide Triforce Completed if not playing Triforce Hunt
* Fixes incorrect chest param
* reformat GS Tokens locations and cuts down on duplicate data
* reformat Ganons Castle checks
* reformat GTG check locations
* Prevents Gift from Raoru from appearing in the check tracker
* more reformatting (botw, ice cavern, shadow temple)
* Should fix a couple more check tracker checks
* reformat spirit temple checks
* reformat water and fire temple checks
* fix RC_ZR_GS_ABOVE_BRIDGE flag typo
* reformat Forest Temple checks
* Fix RC_LW_TRADE_ODD_POTION in check tracker
* reformat child dungeon locations
* reformat overworld locations
* reformat item entries
* New Item Override system
* use new ItemOverrides and use ItemLocations table for getting items
* Saves/Loads directly from/to new ItemLocation table with overrides for traps
* Removes gSaveContext.itemLocations
* Don't load spoiler file on boot automatically.
Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that:
1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded.
2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present).
3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet).
4. After that, a seed is generated and you are taken back to the file select screen with the new file present.
5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is
already in memory and in the save file (or at least I'll make it so that it is if it isn't already).
6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing
for hints to be in the user's language of choice no matter what language the spoiler file was generated in.
7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there
instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out
custom message syntax for various types of custom hints and whatnot. But that will be probably much later.
* Auto-gen rando seed when making a new rando file.
Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations:
1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed.
2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown.
3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen.
Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet.
* Fix a few typos/bugs
* Partial conversion to new Settings/Option class
* Further conversion to new settings/options classes
* New settings struct (not fully working, need to wire it up to SaveManager)
* Move save files to new settings struct. Also fixes MQ options to match 3drando
* Fixes some spoilerfile related issues
* Cleans up now unused arrays
* Fixes some unhandled entries in parse settings switch case
* Reimplements parsing of settings on file drop to re-generate seeds
* Move merchantPrices into ItemLocation tables.
* Move hints to new struct
* Fixes a few seed gen bugs surrounding hints
* Fix treasure chest game.
* Relocate Entrance Shuffle code into ctx
* Move entrances to new context at runtime
* Remove now unused code from SaveContext and randomizer.cpp/.h
* Fix non-windows builds?
* Moves Dungeon Quests to new context
* Move trials into new context
* Whoops, forgot to construct the Trials in the context.
* Fixes accidental nullptr reference
* Fixes bug with saving MQ dungeons
* Implements plando mode and removes now unused code.
Largely untested, expect some bugfixes.
* prevent a multiple definition bug
* another attempt to fix the gSeedTextures multiple def error
* Fixes some minor hint issues from conflict resolution
* Some additional glue needed for merge
* Fixes another couple of miscellaneous issues/inconsistencies.
* A few french corrections
* Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
gRandoContext - > AddExcludedOptions ( ) ;
gRandoContext - > GetSettings ( ) - > CreateOptions ( ) ;
testing out item replacement (#416)
* skip learning song of storms
* don't set flag when getting goron tunic as child
* Initiates prelude check when master sword unloads.
Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again.
* Stops Shadow Temple lore prompts from appearing in rando.
* Skips cutscene of royal tomb explosion in rando.
Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here.
* Improves visual of exploding gravestone.
* Adds some comments explaining the rando differences
* Skip ruto text box in jabu blue warp
For rando
* skip intro cutscene in dodongo's cavern
* load spoiler files on boot, fix spoilerfile existing check when making new saves
* name entry dropped spoiler logic
* make sure to actually init the cvar
* no chime on load
* uncomment
* Skip ganondrof cutscene
Skip to scream part of the death animation, skipping the text boxes etc. For rando
* Update z_boss_ganondrof.c
* skip owl flight cutscenes in rando
* Fixes skipped text so it only applies to shadow temple.
Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors.
* Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case.
* TEST: Text for item
* Adding ganon flavor text
* ADD: AMMO Count
* format ganon text/hint text
* Autoskip the tower cutscene if settings call for tower collapse.
* ganon hint text logic
* Improved prelude after time travel fix
* swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things.
* this is all i did
* not the cleanest code ever but it's working
* ADD: GS Count
* ADD: Wallter (crash for now)
* TWEAK: Wallet check
* FIX: Use DrawItem instread of DrawUpgrade... b-baka!
* Fixes some vanilla bugs introduced by rando code.
* Added cutscene skip for zelda escaping
Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger
* ADD: X Spacing + Placeholders for song
* ADD: default case for items
* TWEAK: Spacing
* FIX: Light Arrow
* ADD: Ammo Option
* use groups instead
* ADD: More spacing logic
* songs and names
* TWEAK: Color on wallet
* colors
* Added flags cutscene before nabooru fight
* ADD: ChromaKey text
* First attempt skip cs after nabooru defeat
* Better implementation for specific rando cutscene skips
* use pulseaudio defaults
* spaces/tabs
* move color push/pop to stop crash
* make the colors work again
* the real bottle fix
* pulseaudio values tuned for n64 audio at 44.1khz
* update tlength
* remove one hardcoded samplerate
* Cleaned up and fixed zelda escape skip
The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of.
* Revert one line to match original
nothing functional
* another hint line that breaks autonewline logic
* don't autospawn epona if we don't have the song/ocarina
* Trying to use iron knuckle death effects
not working yet
* Streamlined OoT cutscene skip for future additions
Also cleaned up if statement in general
* Made if statement more readable
Also added clarity for what cutscene was skipped
* Fixed typo in comment
* Janky nabooru defeat cs skip
* altar text formatting (gonna need help shortening some of the french ones)
* more altar text formatting
* english altar text formatting complete
* make gtg blocking guard check for card not bridge
* FIX: Typo!
* FIX: Uppercases
* FIX: Typo
* TWEAK: Alter + some names
* TWEAK: More caps!
* ADD: Missing string
TWEAK more uppercases and namefixe
s
* Hide nabooru death by covering her in flames
* bandaid fix for death crash issue
* Twinrova defeat cs skip
Skips the animation and manually calls the function to show the "beam" around the sisters
* fix crash
* fix caps to match
* fix great fairy reward mashing/shielding issue
* TWEAK : Typo clé to Clé
* TWEAK: Some Altar hints
TWEAK: Some capitals
* TWEAK: Unmatching text + some cap again
* TWEAK: More tweaks
* fix build
* remove extra json.hpp, add hint
* Update randomizer_item_tracker.cpp
* TWEAK: Double Defense with RedParticles instead of white
* make sure we don't optimize out the check to ensure a spoilerfile exists
* vanilla ganon boss key hint formatting
* TWEAK: FR- better way of the hero text
* fix
* and again
* Initializes dungeonsDone items in gSaveContext to 0.
* Replaces sizeof calculation with a NUM_DUNGEONS constant.
* Fixes Saria's Gift on the LW Bridge from getting killed when holding shield.
* More airtight fix for Saria's Gift on the Bridge.
* Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId.
* Invalidate text box icon before drawing
* Fixes the case where Saria's gift is an Ice Trap.
We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine.
* Initial commit
Might need changing when we change the settings in the future
* Fixes Door of Time opening cutscene after warping with prelude.
* Initial waterfall skip
Very rudimentary way of doing things but it seems to work so :shrug:
* inital rework
* fixed default rotation for 2D sprites
* fix tab/space issues
* 3d drops rando merge fix again
* Allows Impa to appear in the Lullaby check post drawbridge escape.
* Changes Ganon's Trials Count setting to a checkbox
The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed.
* Sets all Ganon's Trials to incomplete in new saves.
Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131
* fix castle guards when oot throw cutscene has already played in rando
* Properly removes the beams when trials are cleared.
* Removes Question Mark from Skip Ganon's Trials UI.
* Adds a todo comment about when to change back to slider.
* make deku seeds check for bullet bag
* Various tweaks
TWEAK: Altar Text
TWEAK: Hint names
TWEAK: Replace more problematic œ to oe
* upgrade ocarina on both child and adult equips
* FIX: Jabu Item
* update equipped hookshot/longshot when obtained as other age
* add hint
* don't give the bgs check without the claim check
* Skips Darunia Cutscene in Fire Temple
* Added a TODO note about not skipping the cutscene.
There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch.
* remove todo
* restore fast ocarina option in imgui that was lost in merge
* Fixes grey screen issue + tooltip for 2 handed shield
* update to use dg instead of g for textures in item tracker
* TWEAK: Default color for cosmetic RAND button was not the corect one
* fix texture crash, remove unused item tracker code
* don't open mask shop until we get zelda's letter
* Update README.md
* Prevents "correct" chime under incorrect conditions.
* Fixes typo in conditional and adds "bonk" sound effect.
"Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time.
* remove modify dpad equips toggle, replace with checks for dpad menu
* remove extra check
* add ability to hold c-up to assign to dpad when dpad menuing is enabled
* disable d-pad navigation on item menu when holding c-up to equip
* dpad+c-up stuff for equipment menu
* ADD: Checbox for songs colors
* TWEAK: RandoColors for normal songs
* kind of quick and dirty but it works
* TWEAK: Clarity of the tooltip
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Dog <5172592+Dog@users.noreply.github.com>
Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com>
Co-authored-by: Baoulettes <perlouzerie@hotmail.fr>
Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
gRandomizer = std : : make_shared < Randomizer > ( ) ;
2022-10-16 23:07:35 -04:00
hasMasterQuest = hasOriginal = false ;
2023-11-05 21:21:44 -05:00
previousImGuiScale = defaultImGuiScale ;
defaultFontSmaller = CreateDefaultFontWithSize ( 10.0f ) ;
defaultFontLarger = CreateDefaultFontWithSize ( 16.0f ) ;
defaultFontLargest = CreateDefaultFontWithSize ( 20.0f ) ;
ScaleImGui ( ) ;
2023-01-26 18:43:09 -05:00
// Move the camera strings from read only memory onto the heap (writable memory)
// This is in OTRGlobals right now because this is a place that will only ever be run once at the beginning of startup.
// We should probably find some code in db_camera that does initialization and only run once, and then dealloc on deinitialization.
cameraStrings = ( char * * ) malloc ( sizeof ( constCameraStrings ) ) ;
for ( int32_t i = 0 ; i < sizeof ( constCameraStrings ) / sizeof ( char * ) ; i + + ) {
// OTRTODO: never deallocated...
auto dup = strdup ( constCameraStrings [ i ] ) ;
cameraStrings [ i ] = dup ;
}
2023-05-03 20:46:26 -04:00
auto versions = context - > GetResourceManager ( ) - > GetArchive ( ) - > GetGameVersions ( ) ;
2022-10-16 23:07:35 -04:00
for ( uint32_t version : versions ) {
2022-10-17 18:44:10 -04:00
if ( ! ValidHashes . contains ( version ) ) {
# if defined(__SWITCH__)
2022-10-22 12:31:20 -04:00
SPDLOG_ERROR ( " Invalid OTR File! " ) ;
2022-10-17 18:44:10 -04:00
# elif defined(__WIIU__)
2023-05-07 23:01:12 -04:00
LUS : : WiiU : : ThrowInvalidOTR ( ) ;
2022-10-17 18:44:10 -04:00
# else
SDL_ShowSimpleMessageBox ( SDL_MESSAGEBOX_ERROR , " Invalid OTR File " ,
" Attempted to load an invalid OTR file. Try regenerating. " , nullptr ) ;
SPDLOG_ERROR ( " Invalid OTR File! " ) ;
# endif
exit ( 1 ) ;
}
2022-10-16 23:07:35 -04:00
switch ( version ) {
case OOT_PAL_MQ :
case OOT_NTSC_JP_MQ :
case OOT_NTSC_US_MQ :
case OOT_PAL_GC_MQ_DBG :
hasMasterQuest = true ;
break ;
2023-04-23 19:13:51 -04:00
case OOT_NTSC_US_10 :
case OOT_NTSC_US_11 :
case OOT_NTSC_US_12 :
2022-10-16 23:07:35 -04:00
case OOT_PAL_10 :
case OOT_PAL_11 :
case OOT_NTSC_JP_GC_CE :
case OOT_NTSC_JP_GC :
case OOT_NTSC_US_GC :
case OOT_PAL_GC :
case OOT_PAL_GC_DBG1 :
case OOT_PAL_GC_DBG2 :
hasOriginal = true ;
break ;
default :
break ;
}
}
2022-03-21 21:51:23 -04:00
}
OTRGlobals : : ~ OTRGlobals ( ) {
}
2023-11-05 21:21:44 -05:00
void OTRGlobals : : ScaleImGui ( ) {
float scale = imguiScaleOptionToValue [ CVarGetInteger ( " gImGuiScale " , defaultImGuiScale ) ] ;
float newScale = scale / previousImGuiScale ;
ImGui : : GetStyle ( ) . ScaleAllSizes ( newScale ) ;
ImGui : : GetIO ( ) . FontGlobalScale = scale ;
previousImGuiScale = scale ;
}
ImFont * OTRGlobals : : CreateDefaultFontWithSize ( float size ) {
auto mImGuiIo = & ImGui : : GetIO ( ) ;
ImFontConfig fontCfg = ImFontConfig ( ) ;
fontCfg . OversampleH = fontCfg . OversampleV = 1 ;
fontCfg . PixelSnapH = true ;
fontCfg . SizePixels = size ;
ImFont * font = mImGuiIo - > Fonts - > AddFontDefault ( & fontCfg ) ;
// FontAwesome fonts need to have their sizes reduced by 2.0f/3.0f in order to align correctly
float iconFontSize = size * 2.0f / 3.0f ;
static const ImWchar sIconsRanges [ ] = { ICON_MIN_FA , ICON_MAX_16_FA , 0 } ;
ImFontConfig iconsConfig ;
iconsConfig . MergeMode = true ;
iconsConfig . PixelSnapH = true ;
iconsConfig . GlyphMinAdvanceX = iconFontSize ;
mImGuiIo - > Fonts - > AddFontFromMemoryCompressedBase85TTF ( fontawesome_compressed_data_base85 , iconFontSize , & iconsConfig , sIconsRanges ) ;
return font ;
}
2022-10-16 23:07:35 -04:00
bool OTRGlobals : : HasMasterQuest ( ) {
return hasMasterQuest ;
}
bool OTRGlobals : : HasOriginal ( ) {
return hasOriginal ;
}
2023-03-01 10:12:55 -05:00
uint32_t OTRGlobals : : GetInterpolationFPS ( ) {
2023-06-03 15:27:45 -04:00
if ( LUS : : Context : : GetInstance ( ) - > GetWindow ( ) - > GetWindowBackend ( ) = = LUS : : WindowBackend : : DX11 ) {
2023-04-20 20:57:32 -04:00
return CVarGetInteger ( " gInterpolationFPS " , 20 ) ;
}
if ( CVarGetInteger ( " gMatchRefreshRate " , 0 ) ) {
2023-05-07 23:01:12 -04:00
return LUS : : Context : : GetInstance ( ) - > GetWindow ( ) - > GetCurrentRefreshRate ( ) ;
2023-03-01 10:12:55 -05:00
}
2023-05-07 23:01:12 -04:00
return std : : min < uint32_t > ( LUS : : Context : : GetInstance ( ) - > GetWindow ( ) - > GetCurrentRefreshRate ( ) , CVarGetInteger ( " gInterpolationFPS " , 20 ) ) ;
2023-03-01 10:12:55 -05:00
}
2022-06-15 15:18:41 -04:00
struct ExtensionEntry {
std : : string path ;
std : : string ext ;
} ;
2022-03-21 21:51:23 -04:00
extern uintptr_t clearMtx ;
extern " C " Mtx gMtxClear ;
extern " C " MtxF gMtxFClear ;
extern " C " void OTRMessage_Init ( ) ;
2022-04-18 05:37:47 -04:00
extern " C " void AudioMgr_CreateNextAudioBuffer ( s16 * samples , u32 num_samples ) ;
extern " C " void AudioPlayer_Play ( const uint8_t * buf , uint32_t len ) ;
extern " C " int AudioPlayer_Buffered ( void ) ;
extern " C " int AudioPlayer_GetDesiredBuffered ( void ) ;
2023-03-14 02:45:19 -04:00
extern " C " void ResourceMgr_LoadDirectory ( const char * resName ) ;
2022-06-10 13:37:50 -04:00
extern " C " SequenceData ResourceMgr_LoadSeqByName ( const char * path ) ;
2022-06-15 15:18:41 -04:00
std : : unordered_map < std : : string , ExtensionEntry > ExtensionCache ;
2022-03-21 21:51:23 -04:00
2022-08-02 20:30:39 -04:00
void OTRAudio_Thread ( ) {
while ( audio . running ) {
{
std : : unique_lock < std : : mutex > Lock ( audio . mutex ) ;
while ( ! audio . processing & & audio . running ) {
audio . cv_to_thread . wait ( Lock ) ;
}
if ( ! audio . running ) {
break ;
}
}
std : : unique_lock < std : : mutex > Lock ( audio . mutex ) ;
//AudioMgr_ThreadEntry(&gAudioMgr);
// 528 and 544 relate to 60 fps at 32 kHz 32000/60 = 533.333..
// in an ideal world, one third of the calls should use num_samples=544 and two thirds num_samples=528
//#define SAMPLES_HIGH 560
//#define SAMPLES_LOW 528
// PAL values
//#define SAMPLES_HIGH 656
//#define SAMPLES_LOW 624
// 44KHZ values
# define SAMPLES_HIGH 752
# define SAMPLES_LOW 720
# define AUDIO_FRAMES_PER_UPDATE (R_UPDATE_RATE > 0 ? R_UPDATE_RATE : 1 )
# define NUM_AUDIO_CHANNELS 2
int samples_left = AudioPlayer_Buffered ( ) ;
u32 num_audio_samples = samples_left < AudioPlayer_GetDesiredBuffered ( ) ? SAMPLES_HIGH : SAMPLES_LOW ;
// 3 is the maximum authentic frame divisor.
s16 audio_buffer [ SAMPLES_HIGH * NUM_AUDIO_CHANNELS * 3 ] ;
for ( int i = 0 ; i < AUDIO_FRAMES_PER_UPDATE ; i + + ) {
AudioMgr_CreateNextAudioBuffer ( audio_buffer + i * ( num_audio_samples * NUM_AUDIO_CHANNELS ) , num_audio_samples ) ;
}
AudioPlayer_Play ( ( u8 * ) audio_buffer , num_audio_samples * ( sizeof ( int16_t ) * NUM_AUDIO_CHANNELS * AUDIO_FRAMES_PER_UPDATE ) ) ;
audio . processing = false ;
audio . cv_from_thread . notify_one ( ) ;
}
}
2022-03-21 21:51:23 -04:00
// C->C++ Bridge
2022-06-01 16:11:11 -04:00
extern " C " void OTRAudio_Init ( )
2022-06-01 13:06:32 -04:00
{
// Precache all our samples, sequences, etc...
2023-03-14 02:45:19 -04:00
ResourceMgr_LoadDirectory ( " audio " ) ;
2022-08-02 20:30:39 -04:00
if ( ! audio . running ) {
audio . running = true ;
audio . thread = std : : thread ( OTRAudio_Thread ) ;
}
}
extern " C " void OTRAudio_Exit ( ) {
// Tell the audio thread to stop
{
std : : unique_lock < std : : mutex > Lock ( audio . mutex ) ;
audio . running = false ;
}
audio . cv_to_thread . notify_all ( ) ;
// Wait until the audio thread quit
audio . thread . join ( ) ;
2022-06-01 13:06:32 -04:00
}
2022-08-23 20:11:38 -04:00
extern " C " void VanillaItemTable_Init ( ) {
2022-09-29 19:07:48 -04:00
static GetItemEntry getItemTable [ ] = {
2022-10-20 22:33:04 -04:00
GET_ITEM ( ITEM_BOMBS_5 , OBJECT_GI_BOMB_1 , GID_BOMB , 0x32 , 0x59 , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_BOMBS_5 ) ,
GET_ITEM ( ITEM_NUTS_5 , OBJECT_GI_NUTS , GID_NUTS , 0x34 , 0x0C , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_NUTS_5 ) ,
GET_ITEM ( ITEM_BOMBCHU , OBJECT_GI_BOMB_2 , GID_BOMBCHU , 0x33 , 0x80 , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_BOMBCHUS_10 ) ,
GET_ITEM ( ITEM_BOW , OBJECT_GI_BOW , GID_BOW , 0x31 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_BOW ) ,
GET_ITEM ( ITEM_SLINGSHOT , OBJECT_GI_PACHINKO , GID_SLINGSHOT , 0x30 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_SLINGSHOT ) ,
GET_ITEM ( ITEM_BOOMERANG , OBJECT_GI_BOOMERANG , GID_BOOMERANG , 0x35 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_BOOMERANG ) ,
GET_ITEM ( ITEM_STICK , OBJECT_GI_STICK , GID_STICK , 0x37 , 0x0D , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_STICKS_1 ) ,
GET_ITEM ( ITEM_HOOKSHOT , OBJECT_GI_HOOKSHOT , GID_HOOKSHOT , 0x36 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_HOOKSHOT ) ,
GET_ITEM ( ITEM_LONGSHOT , OBJECT_GI_HOOKSHOT , GID_LONGSHOT , 0x4F , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_LONGSHOT ) ,
GET_ITEM ( ITEM_LENS , OBJECT_GI_GLASSES , GID_LENS , 0x39 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_LENS ) ,
GET_ITEM ( ITEM_LETTER_ZELDA , OBJECT_GI_LETTER , GID_LETTER_ZELDA , 0x69 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_LETTER_ZELDA ) ,
GET_ITEM ( ITEM_OCARINA_TIME , OBJECT_GI_OCARINA , GID_OCARINA_TIME , 0x3A , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_OCARINA_OOT ) ,
GET_ITEM ( ITEM_HAMMER , OBJECT_GI_HAMMER , GID_HAMMER , 0x38 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_HAMMER ) ,
GET_ITEM ( ITEM_COJIRO , OBJECT_GI_NIWATORI , GID_COJIRO , 0x02 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_COJIRO ) ,
GET_ITEM ( ITEM_BOTTLE , OBJECT_GI_BOTTLE , GID_BOTTLE , 0x42 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_BOTTLE ) ,
GET_ITEM ( ITEM_POTION_RED , OBJECT_GI_LIQUID , GID_POTION_RED , 0x43 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_JUNK , MOD_NONE , GI_POTION_RED ) ,
GET_ITEM ( ITEM_POTION_GREEN , OBJECT_GI_LIQUID , GID_POTION_GREEN , 0x44 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_JUNK , MOD_NONE , GI_POTION_GREEN ) ,
GET_ITEM ( ITEM_POTION_BLUE , OBJECT_GI_LIQUID , GID_POTION_BLUE , 0x45 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_JUNK , MOD_NONE , GI_POTION_BLUE ) ,
GET_ITEM ( ITEM_FAIRY , OBJECT_GI_BOTTLE , GID_BOTTLE , 0x46 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_JUNK , MOD_NONE , GI_FAIRY ) ,
GET_ITEM ( ITEM_MILK_BOTTLE , OBJECT_GI_MILK , GID_MILK , 0x98 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_MILK_BOTTLE ) ,
GET_ITEM ( ITEM_LETTER_RUTO , OBJECT_GI_BOTTLE_LETTER , GID_LETTER_RUTO , 0x99 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_LETTER_RUTO ) ,
GET_ITEM ( ITEM_BEAN , OBJECT_GI_BEAN , GID_BEAN , 0x48 , 0x80 , CHEST_ANIM_SHORT , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_BEAN ) ,
GET_ITEM ( ITEM_MASK_SKULL , OBJECT_GI_SKJ_MASK , GID_MASK_SKULL , 0x10 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_MASK_SKULL ) ,
GET_ITEM ( ITEM_MASK_SPOOKY , OBJECT_GI_REDEAD_MASK , GID_MASK_SPOOKY , 0x11 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_MASK_SPOOKY ) ,
GET_ITEM ( ITEM_CHICKEN , OBJECT_GI_NIWATORI , GID_CHICKEN , 0x48 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_CHICKEN ) ,
GET_ITEM ( ITEM_MASK_KEATON , OBJECT_GI_KI_TAN_MASK , GID_MASK_KEATON , 0x12 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_MASK_KEATON ) ,
GET_ITEM ( ITEM_MASK_BUNNY , OBJECT_GI_RABIT_MASK , GID_MASK_BUNNY , 0x13 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_MASK_BUNNY ) ,
GET_ITEM ( ITEM_MASK_TRUTH , OBJECT_GI_TRUTH_MASK , GID_MASK_TRUTH , 0x17 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_MASK_TRUTH ) ,
GET_ITEM ( ITEM_POCKET_EGG , OBJECT_GI_EGG , GID_EGG , 0x01 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_POCKET_EGG ) ,
GET_ITEM ( ITEM_POCKET_CUCCO , OBJECT_GI_NIWATORI , GID_CHICKEN , 0x48 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_POCKET_CUCCO ) ,
GET_ITEM ( ITEM_ODD_MUSHROOM , OBJECT_GI_MUSHROOM , GID_ODD_MUSHROOM , 0x03 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_ODD_MUSHROOM ) ,
GET_ITEM ( ITEM_ODD_POTION , OBJECT_GI_POWDER , GID_ODD_POTION , 0x04 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_ODD_POTION ) ,
GET_ITEM ( ITEM_SAW , OBJECT_GI_SAW , GID_SAW , 0x05 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_SAW ) ,
GET_ITEM ( ITEM_SWORD_BROKEN , OBJECT_GI_BROKENSWORD , GID_SWORD_BROKEN , 0x08 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_SWORD_BROKEN ) ,
GET_ITEM ( ITEM_PRESCRIPTION , OBJECT_GI_PRESCRIPTION , GID_PRESCRIPTION , 0x09 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_PRESCRIPTION ) ,
GET_ITEM ( ITEM_FROG , OBJECT_GI_FROG , GID_FROG , 0x0D , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_FROG ) ,
GET_ITEM ( ITEM_EYEDROPS , OBJECT_GI_EYE_LOTION , GID_EYEDROPS , 0x0E , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_EYEDROPS ) ,
GET_ITEM ( ITEM_CLAIM_CHECK , OBJECT_GI_TICKETSTONE , GID_CLAIM_CHECK , 0x0A , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_CLAIM_CHECK ) ,
GET_ITEM ( ITEM_SWORD_KOKIRI , OBJECT_GI_SWORD_1 , GID_SWORD_KOKIRI , 0xA4 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_SWORD_KOKIRI ) ,
GET_ITEM ( ITEM_SWORD_BGS , OBJECT_GI_LONGSWORD , GID_SWORD_BGS , 0x4B , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_SWORD_KNIFE ) ,
GET_ITEM ( ITEM_SHIELD_DEKU , OBJECT_GI_SHIELD_1 , GID_SHIELD_DEKU , 0x4C , 0xA0 , CHEST_ANIM_SHORT , ITEM_CATEGORY_LESSER , MOD_NONE , GI_SHIELD_DEKU ) ,
GET_ITEM ( ITEM_SHIELD_HYLIAN , OBJECT_GI_SHIELD_2 , GID_SHIELD_HYLIAN , 0x4D , 0xA0 , CHEST_ANIM_SHORT , ITEM_CATEGORY_LESSER , MOD_NONE , GI_SHIELD_HYLIAN ) ,
GET_ITEM ( ITEM_SHIELD_MIRROR , OBJECT_GI_SHIELD_3 , GID_SHIELD_MIRROR , 0x4E , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_SHIELD_MIRROR ) ,
GET_ITEM ( ITEM_TUNIC_GORON , OBJECT_GI_CLOTHES , GID_TUNIC_GORON , 0x50 , 0xA0 , CHEST_ANIM_LONG , ITEM_CATEGORY_LESSER , MOD_NONE , GI_TUNIC_GORON ) ,
GET_ITEM ( ITEM_TUNIC_ZORA , OBJECT_GI_CLOTHES , GID_TUNIC_ZORA , 0x51 , 0xA0 , CHEST_ANIM_LONG , ITEM_CATEGORY_LESSER , MOD_NONE , GI_TUNIC_ZORA ) ,
GET_ITEM ( ITEM_BOOTS_IRON , OBJECT_GI_BOOTS_2 , GID_BOOTS_IRON , 0x53 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_BOOTS_IRON ) ,
GET_ITEM ( ITEM_BOOTS_HOVER , OBJECT_GI_HOVERBOOTS , GID_BOOTS_HOVER , 0x54 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_BOOTS_HOVER ) ,
GET_ITEM ( ITEM_QUIVER_40 , OBJECT_GI_ARROWCASE , GID_QUIVER_40 , 0x56 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_LESSER , MOD_NONE , GI_QUIVER_40 ) ,
GET_ITEM ( ITEM_QUIVER_50 , OBJECT_GI_ARROWCASE , GID_QUIVER_50 , 0x57 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_LESSER , MOD_NONE , GI_QUIVER_50 ) ,
GET_ITEM ( ITEM_BOMB_BAG_20 , OBJECT_GI_BOMBPOUCH , GID_BOMB_BAG_20 , 0x58 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_BOMB_BAG_20 ) ,
GET_ITEM ( ITEM_BOMB_BAG_30 , OBJECT_GI_BOMBPOUCH , GID_BOMB_BAG_30 , 0x59 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_LESSER , MOD_NONE , GI_BOMB_BAG_30 ) ,
GET_ITEM ( ITEM_BOMB_BAG_40 , OBJECT_GI_BOMBPOUCH , GID_BOMB_BAG_40 , 0x5A , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_LESSER , MOD_NONE , GI_BOMB_BAG_40 ) ,
GET_ITEM ( ITEM_GAUNTLETS_SILVER , OBJECT_GI_GLOVES , GID_GAUNTLETS_SILVER , 0x5B , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_GAUNTLETS_SILVER ) ,
GET_ITEM ( ITEM_GAUNTLETS_GOLD , OBJECT_GI_GLOVES , GID_GAUNTLETS_GOLD , 0x5C , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_GAUNTLETS_GOLD ) ,
GET_ITEM ( ITEM_SCALE_SILVER , OBJECT_GI_SCALE , GID_SCALE_SILVER , 0xCD , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_SCALE_SILVER ) ,
GET_ITEM ( ITEM_SCALE_GOLDEN , OBJECT_GI_SCALE , GID_SCALE_GOLDEN , 0xCE , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_SCALE_GOLD ) ,
GET_ITEM ( ITEM_STONE_OF_AGONY , OBJECT_GI_MAP , GID_STONE_OF_AGONY , 0x68 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_STONE_OF_AGONY ) ,
GET_ITEM ( ITEM_GERUDO_CARD , OBJECT_GI_GERUDO , GID_GERUDO_CARD , 0x7B , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_GERUDO_CARD ) ,
GET_ITEM ( ITEM_OCARINA_FAIRY , OBJECT_GI_OCARINA_0 , GID_OCARINA_FAIRY , 0x4A , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_OCARINA_FAIRY ) ,
GET_ITEM ( ITEM_SEEDS , OBJECT_GI_SEED , GID_SEEDS , 0xDC , 0x50 , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_SEEDS_5 ) ,
GET_ITEM ( ITEM_HEART_CONTAINER , OBJECT_GI_HEARTS , GID_HEART_CONTAINER , 0xC6 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_LESSER , MOD_NONE , GI_HEART_CONTAINER ) ,
GET_ITEM ( ITEM_HEART_PIECE_2 , OBJECT_GI_HEARTS , GID_HEART_PIECE , 0xC2 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_LESSER , MOD_NONE , GI_HEART_PIECE ) ,
GET_ITEM ( ITEM_KEY_BOSS , OBJECT_GI_BOSSKEY , GID_KEY_BOSS , 0xC7 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_BOSS_KEY , MOD_NONE , GI_KEY_BOSS ) ,
GET_ITEM ( ITEM_COMPASS , OBJECT_GI_COMPASS , GID_COMPASS , 0x67 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_LESSER , MOD_NONE , GI_COMPASS ) ,
GET_ITEM ( ITEM_DUNGEON_MAP , OBJECT_GI_MAP , GID_DUNGEON_MAP , 0x66 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_LESSER , MOD_NONE , GI_MAP ) ,
GET_ITEM ( ITEM_KEY_SMALL , OBJECT_GI_KEY , GID_KEY_SMALL , 0x60 , 0x80 , CHEST_ANIM_SHORT , ITEM_CATEGORY_SMALL_KEY , MOD_NONE , GI_KEY_SMALL ) ,
GET_ITEM ( ITEM_MAGIC_SMALL , OBJECT_GI_MAGICPOT , GID_MAGIC_SMALL , 0x52 , 0x6F , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_MAGIC_SMALL ) ,
GET_ITEM ( ITEM_MAGIC_LARGE , OBJECT_GI_MAGICPOT , GID_MAGIC_LARGE , 0x52 , 0x6E , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_MAGIC_LARGE ) ,
GET_ITEM ( ITEM_WALLET_ADULT , OBJECT_GI_PURSE , GID_WALLET_ADULT , 0x5E , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_WALLET_ADULT ) ,
GET_ITEM ( ITEM_WALLET_GIANT , OBJECT_GI_PURSE , GID_WALLET_GIANT , 0x5F , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_WALLET_GIANT ) ,
GET_ITEM ( ITEM_WEIRD_EGG , OBJECT_GI_EGG , GID_EGG , 0x9A , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_WEIRD_EGG ) ,
GET_ITEM ( ITEM_HEART , OBJECT_GI_HEART , GID_HEART , 0x55 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_JUNK , MOD_NONE , GI_HEART ) ,
GET_ITEM ( ITEM_ARROWS_SMALL , OBJECT_GI_ARROW , GID_ARROWS_SMALL , 0xE6 , 0x48 , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_ARROWS_SMALL ) ,
GET_ITEM ( ITEM_ARROWS_MEDIUM , OBJECT_GI_ARROW , GID_ARROWS_MEDIUM , 0xE6 , 0x49 , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_ARROWS_MEDIUM ) ,
GET_ITEM ( ITEM_ARROWS_LARGE , OBJECT_GI_ARROW , GID_ARROWS_LARGE , 0xE6 , 0x4A , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_ARROWS_LARGE ) ,
2023-02-16 20:10:31 -05:00
GET_ITEM ( ITEM_RUPEE_GREEN , OBJECT_GI_RUPY , GID_RUPEE_GREEN , 0x6F , 0x00 , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_RUPEE_GREEN ) ,
2022-10-20 22:33:04 -04:00
GET_ITEM ( ITEM_RUPEE_BLUE , OBJECT_GI_RUPY , GID_RUPEE_BLUE , 0xCC , 0x01 , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_RUPEE_BLUE ) ,
GET_ITEM ( ITEM_RUPEE_RED , OBJECT_GI_RUPY , GID_RUPEE_RED , 0xF0 , 0x02 , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_RUPEE_RED ) ,
GET_ITEM ( ITEM_HEART_CONTAINER , OBJECT_GI_HEARTS , GID_HEART_CONTAINER , 0xC6 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_LESSER , MOD_NONE , GI_HEART_CONTAINER_2 ) ,
GET_ITEM ( ITEM_MILK , OBJECT_GI_MILK , GID_MILK , 0x98 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_JUNK , MOD_NONE , GI_MILK ) ,
GET_ITEM ( ITEM_MASK_GORON , OBJECT_GI_GOLONMASK , GID_MASK_GORON , 0x14 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_MASK_GORON ) ,
GET_ITEM ( ITEM_MASK_ZORA , OBJECT_GI_ZORAMASK , GID_MASK_ZORA , 0x15 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_MASK_ZORA ) ,
GET_ITEM ( ITEM_MASK_GERUDO , OBJECT_GI_GERUDOMASK , GID_MASK_GERUDO , 0x16 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_MASK_GERUDO ) ,
GET_ITEM ( ITEM_BRACELET , OBJECT_GI_BRACELET , GID_BRACELET , 0x79 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_BRACELET ) ,
GET_ITEM ( ITEM_RUPEE_PURPLE , OBJECT_GI_RUPY , GID_RUPEE_PURPLE , 0xF1 , 0x14 , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_RUPEE_PURPLE ) ,
GET_ITEM ( ITEM_RUPEE_GOLD , OBJECT_GI_RUPY , GID_RUPEE_GOLD , 0xF2 , 0x13 , CHEST_ANIM_SHORT , ITEM_CATEGORY_LESSER , MOD_NONE , GI_RUPEE_GOLD ) ,
GET_ITEM ( ITEM_SWORD_BGS , OBJECT_GI_LONGSWORD , GID_SWORD_BGS , 0x0C , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_SWORD_BGS ) ,
GET_ITEM ( ITEM_ARROW_FIRE , OBJECT_GI_M_ARROW , GID_ARROW_FIRE , 0x70 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_ARROW_FIRE ) ,
GET_ITEM ( ITEM_ARROW_ICE , OBJECT_GI_M_ARROW , GID_ARROW_ICE , 0x71 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_ARROW_ICE ) ,
GET_ITEM ( ITEM_ARROW_LIGHT , OBJECT_GI_M_ARROW , GID_ARROW_LIGHT , 0x72 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_ARROW_LIGHT ) ,
GET_ITEM ( ITEM_SKULL_TOKEN , OBJECT_GI_SUTARU , GID_SKULL_TOKEN , 0xB4 , 0x80 , CHEST_ANIM_SHORT , ITEM_CATEGORY_SKULLTULA_TOKEN , MOD_NONE , GI_SKULL_TOKEN ) ,
GET_ITEM ( ITEM_DINS_FIRE , OBJECT_GI_GODDESS , GID_DINS_FIRE , 0xAD , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_DINS_FIRE ) ,
GET_ITEM ( ITEM_FARORES_WIND , OBJECT_GI_GODDESS , GID_FARORES_WIND , 0xAE , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_FARORES_WIND ) ,
GET_ITEM ( ITEM_NAYRUS_LOVE , OBJECT_GI_GODDESS , GID_NAYRUS_LOVE , 0xAF , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_MAJOR , MOD_NONE , GI_NAYRUS_LOVE ) ,
GET_ITEM ( ITEM_BULLET_BAG_30 , OBJECT_GI_DEKUPOUCH , GID_BULLET_BAG , 0x07 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_LESSER , MOD_NONE , GI_BULLET_BAG_30 ) ,
GET_ITEM ( ITEM_BULLET_BAG_40 , OBJECT_GI_DEKUPOUCH , GID_BULLET_BAG , 0x07 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_LESSER , MOD_NONE , GI_BULLET_BAG_40 ) ,
GET_ITEM ( ITEM_STICKS_5 , OBJECT_GI_STICK , GID_STICK , 0x37 , 0x0D , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_STICKS_5 ) ,
GET_ITEM ( ITEM_STICKS_10 , OBJECT_GI_STICK , GID_STICK , 0x37 , 0x0D , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_STICKS_10 ) ,
GET_ITEM ( ITEM_NUTS_5 , OBJECT_GI_NUTS , GID_NUTS , 0x34 , 0x0C , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_NUTS_5_2 ) ,
GET_ITEM ( ITEM_NUTS_10 , OBJECT_GI_NUTS , GID_NUTS , 0x34 , 0x0C , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_NUTS_10 ) ,
GET_ITEM ( ITEM_BOMB , OBJECT_GI_BOMB_1 , GID_BOMB , 0x32 , 0x59 , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_BOMBS_1 ) ,
GET_ITEM ( ITEM_BOMBS_10 , OBJECT_GI_BOMB_1 , GID_BOMB , 0x32 , 0x59 , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_BOMBS_10 ) ,
GET_ITEM ( ITEM_BOMBS_20 , OBJECT_GI_BOMB_1 , GID_BOMB , 0x32 , 0x59 , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_BOMBS_20 ) ,
GET_ITEM ( ITEM_BOMBS_30 , OBJECT_GI_BOMB_1 , GID_BOMB , 0x32 , 0x59 , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_BOMBS_30 ) ,
GET_ITEM ( ITEM_SEEDS_30 , OBJECT_GI_SEED , GID_SEEDS , 0xDC , 0x50 , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_SEEDS_30 ) ,
GET_ITEM ( ITEM_BOMBCHUS_5 , OBJECT_GI_BOMB_2 , GID_BOMBCHU , 0x33 , 0x80 , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_BOMBCHUS_5 ) ,
GET_ITEM ( ITEM_BOMBCHUS_20 , OBJECT_GI_BOMB_2 , GID_BOMBCHU , 0x33 , 0x80 , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_BOMBCHUS_20 ) ,
GET_ITEM ( ITEM_FISH , OBJECT_GI_FISH , GID_FISH , 0x47 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_JUNK , MOD_NONE , GI_FISH ) ,
GET_ITEM ( ITEM_BUG , OBJECT_GI_INSECT , GID_BUG , 0x7A , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_JUNK , MOD_NONE , GI_BUGS ) ,
GET_ITEM ( ITEM_BLUE_FIRE , OBJECT_GI_FIRE , GID_BLUE_FIRE , 0x5D , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_JUNK , MOD_NONE , GI_BLUE_FIRE ) ,
GET_ITEM ( ITEM_POE , OBJECT_GI_GHOST , GID_POE , 0x97 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_JUNK , MOD_NONE , GI_POE ) ,
GET_ITEM ( ITEM_BIG_POE , OBJECT_GI_GHOST , GID_BIG_POE , 0xF9 , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_JUNK , MOD_NONE , GI_BIG_POE ) ,
GET_ITEM ( ITEM_KEY_SMALL , OBJECT_GI_KEY , GID_KEY_SMALL , 0xF3 , 0x80 , CHEST_ANIM_SHORT , ITEM_CATEGORY_SMALL_KEY , MOD_NONE , GI_DOOR_KEY ) ,
2023-03-31 22:22:45 -04:00
GET_ITEM ( ITEM_RUPEE_GREEN , OBJECT_GI_RUPY , GID_RUPEE_GREEN , 0xF4 , 0x00 , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_RUPEE_GREEN_LOSE ) ,
2022-10-20 22:33:04 -04:00
GET_ITEM ( ITEM_RUPEE_BLUE , OBJECT_GI_RUPY , GID_RUPEE_BLUE , 0xF5 , 0x01 , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_RUPEE_BLUE_LOSE ) ,
GET_ITEM ( ITEM_RUPEE_RED , OBJECT_GI_RUPY , GID_RUPEE_RED , 0xF6 , 0x02 , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_RUPEE_RED_LOSE ) ,
GET_ITEM ( ITEM_RUPEE_PURPLE , OBJECT_GI_RUPY , GID_RUPEE_PURPLE , 0xF7 , 0x14 , CHEST_ANIM_SHORT , ITEM_CATEGORY_JUNK , MOD_NONE , GI_RUPEE_PURPLE_LOSE ) ,
GET_ITEM ( ITEM_HEART_PIECE_2 , OBJECT_GI_HEARTS , GID_HEART_PIECE , 0xFA , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_LESSER , MOD_NONE , GI_HEART_PIECE_WIN ) ,
GET_ITEM ( ITEM_STICK_UPGRADE_20 , OBJECT_GI_STICK , GID_STICK , 0x90 , 0x80 , CHEST_ANIM_SHORT , ITEM_CATEGORY_LESSER , MOD_NONE , GI_STICK_UPGRADE_20 ) ,
GET_ITEM ( ITEM_STICK_UPGRADE_30 , OBJECT_GI_STICK , GID_STICK , 0x91 , 0x80 , CHEST_ANIM_SHORT , ITEM_CATEGORY_LESSER , MOD_NONE , GI_STICK_UPGRADE_30 ) ,
GET_ITEM ( ITEM_NUT_UPGRADE_30 , OBJECT_GI_NUTS , GID_NUTS , 0xA7 , 0x80 , CHEST_ANIM_SHORT , ITEM_CATEGORY_LESSER , MOD_NONE , GI_NUT_UPGRADE_30 ) ,
GET_ITEM ( ITEM_NUT_UPGRADE_40 , OBJECT_GI_NUTS , GID_NUTS , 0xA8 , 0x80 , CHEST_ANIM_SHORT , ITEM_CATEGORY_LESSER , MOD_NONE , GI_NUT_UPGRADE_40 ) ,
GET_ITEM ( ITEM_BULLET_BAG_50 , OBJECT_GI_DEKUPOUCH , GID_BULLET_BAG_50 , 0x6C , 0x80 , CHEST_ANIM_LONG , ITEM_CATEGORY_LESSER , MOD_NONE , GI_BULLET_BAG_50 ) ,
2022-08-23 20:11:38 -04:00
GET_ITEM_NONE ,
GET_ITEM_NONE ,
2022-09-02 13:19:12 -04:00
GET_ITEM_NONE // GI_MAX - if you need to add to this table insert it before this entry.
2022-08-23 20:11:38 -04:00
} ;
ItemTableManager : : Instance - > AddItemTable ( MOD_NONE ) ;
for ( uint8_t i = 0 ; i < ARRAY_COUNT ( getItemTable ) ; i + + ) {
// The vanilla item table array started with ITEM_BOMBS_5,
// but the GetItemID enum started with GI_NONE. Then everywhere
// that table was accessed used `GetItemID - 1`. This allows the
// "first" item of the new map to start at 1, syncing it up with
// the GetItemID values and removing the need for the `- 1`
ItemTableManager : : Instance - > AddItemEntry ( MOD_NONE , i + 1 , getItemTable [ i ] ) ;
}
}
2023-12-04 08:26:55 -05:00
std : : unordered_map < ItemID , GetItemID > ItemIDtoGetItemIDMap {
2023-04-02 04:47:23 -04:00
{ ITEM_ARROWS_LARGE , GI_ARROWS_LARGE } ,
{ ITEM_ARROWS_MEDIUM , GI_ARROWS_MEDIUM } ,
{ ITEM_ARROWS_SMALL , GI_ARROWS_SMALL } ,
{ ITEM_ARROW_FIRE , GI_ARROW_FIRE } ,
{ ITEM_ARROW_ICE , GI_ARROW_ICE } ,
{ ITEM_ARROW_LIGHT , GI_ARROW_LIGHT } ,
{ ITEM_BEAN , GI_BEAN } ,
{ ITEM_BIG_POE , GI_BIG_POE } ,
{ ITEM_BLUE_FIRE , GI_BLUE_FIRE } ,
{ ITEM_BOMB , GI_BOMBS_1 } ,
{ ITEM_BOMBCHU , GI_BOMBCHUS_10 } ,
{ ITEM_BOMBCHUS_20 , GI_BOMBCHUS_20 } ,
{ ITEM_BOMBCHUS_5 , GI_BOMBCHUS_5 } ,
{ ITEM_BOMBS_10 , GI_BOMBS_10 } ,
{ ITEM_BOMBS_20 , GI_BOMBS_20 } ,
{ ITEM_BOMBS_30 , GI_BOMBS_30 } ,
{ ITEM_BOMBS_5 , GI_BOMBS_5 } ,
{ ITEM_BOMB_BAG_20 , GI_BOMB_BAG_20 } ,
{ ITEM_BOMB_BAG_30 , GI_BOMB_BAG_30 } ,
{ ITEM_BOMB_BAG_40 , GI_BOMB_BAG_40 } ,
{ ITEM_BOOMERANG , GI_BOOMERANG } ,
{ ITEM_BOOTS_HOVER , GI_BOOTS_HOVER } ,
{ ITEM_BOOTS_IRON , GI_BOOTS_IRON } ,
{ ITEM_BOTTLE , GI_BOTTLE } ,
{ ITEM_BOW , GI_BOW } ,
{ ITEM_BRACELET , GI_BRACELET } ,
{ ITEM_BUG , GI_BUGS } ,
{ ITEM_BULLET_BAG_30 , GI_BULLET_BAG_30 } ,
{ ITEM_BULLET_BAG_40 , GI_BULLET_BAG_40 } ,
2023-12-10 12:49:15 -05:00
{ ITEM_BULLET_BAG_50 , GI_BULLET_BAG_50 } ,
2023-12-04 08:26:55 -05:00
{ ITEM_CHICKEN , GI_CHICKEN } ,
2023-04-02 04:47:23 -04:00
{ ITEM_CLAIM_CHECK , GI_CLAIM_CHECK } ,
{ ITEM_COJIRO , GI_COJIRO } ,
{ ITEM_COMPASS , GI_COMPASS } ,
{ ITEM_DINS_FIRE , GI_DINS_FIRE } ,
{ ITEM_DUNGEON_MAP , GI_MAP } ,
{ ITEM_EYEDROPS , GI_EYEDROPS } ,
{ ITEM_FAIRY , GI_FAIRY } ,
{ ITEM_FARORES_WIND , GI_FARORES_WIND } ,
{ ITEM_FISH , GI_FISH } ,
{ ITEM_FROG , GI_FROG } ,
{ ITEM_GAUNTLETS_GOLD , GI_GAUNTLETS_GOLD } ,
{ ITEM_GAUNTLETS_SILVER , GI_GAUNTLETS_SILVER } ,
{ ITEM_GERUDO_CARD , GI_GERUDO_CARD } ,
{ ITEM_HAMMER , GI_HAMMER } ,
{ ITEM_HEART , GI_HEART } ,
{ ITEM_HEART_CONTAINER , GI_HEART_CONTAINER } ,
{ ITEM_HEART_CONTAINER , GI_HEART_CONTAINER_2 } ,
{ ITEM_HEART_PIECE_2 , GI_HEART_PIECE } ,
{ ITEM_HEART_PIECE_2 , GI_HEART_PIECE_WIN } ,
{ ITEM_HOOKSHOT , GI_HOOKSHOT } ,
{ ITEM_KEY_BOSS , GI_KEY_BOSS } ,
{ ITEM_KEY_SMALL , GI_DOOR_KEY } ,
{ ITEM_KEY_SMALL , GI_KEY_SMALL } ,
{ ITEM_LENS , GI_LENS } ,
{ ITEM_LETTER_RUTO , GI_LETTER_RUTO } ,
{ ITEM_LETTER_ZELDA , GI_LETTER_ZELDA } ,
{ ITEM_LONGSHOT , GI_LONGSHOT } ,
{ ITEM_MAGIC_LARGE , GI_MAGIC_LARGE } ,
{ ITEM_MAGIC_SMALL , GI_MAGIC_SMALL } ,
{ ITEM_MASK_BUNNY , GI_MASK_BUNNY } ,
{ ITEM_MASK_GERUDO , GI_MASK_GERUDO } ,
{ ITEM_MASK_GORON , GI_MASK_GORON } ,
{ ITEM_MASK_KEATON , GI_MASK_KEATON } ,
{ ITEM_MASK_SKULL , GI_MASK_SKULL } ,
{ ITEM_MASK_SPOOKY , GI_MASK_SPOOKY } ,
{ ITEM_MASK_TRUTH , GI_MASK_TRUTH } ,
{ ITEM_MASK_ZORA , GI_MASK_ZORA } ,
{ ITEM_MILK , GI_MILK } ,
{ ITEM_MILK_BOTTLE , GI_MILK_BOTTLE } ,
{ ITEM_NAYRUS_LOVE , GI_NAYRUS_LOVE } ,
{ ITEM_NUT , GI_NUTS_5 } ,
{ ITEM_NUTS_10 , GI_NUTS_10 } ,
{ ITEM_NUTS_5 , GI_NUTS_5 } ,
{ ITEM_NUTS_5 , GI_NUTS_5_2 } ,
{ ITEM_NUT_UPGRADE_30 , GI_NUT_UPGRADE_30 } ,
{ ITEM_NUT_UPGRADE_40 , GI_NUT_UPGRADE_40 } ,
{ ITEM_OCARINA_FAIRY , GI_OCARINA_FAIRY } ,
{ ITEM_OCARINA_TIME , GI_OCARINA_OOT } ,
{ ITEM_ODD_MUSHROOM , GI_ODD_MUSHROOM } ,
{ ITEM_ODD_POTION , GI_ODD_POTION } ,
{ ITEM_POCKET_CUCCO , GI_POCKET_CUCCO } ,
{ ITEM_POCKET_EGG , GI_POCKET_EGG } ,
{ ITEM_POE , GI_POE } ,
{ ITEM_POTION_BLUE , GI_POTION_BLUE } ,
{ ITEM_POTION_GREEN , GI_POTION_GREEN } ,
{ ITEM_POTION_RED , GI_POTION_RED } ,
{ ITEM_PRESCRIPTION , GI_PRESCRIPTION } ,
{ ITEM_QUIVER_40 , GI_QUIVER_40 } ,
{ ITEM_QUIVER_50 , GI_QUIVER_50 } ,
{ ITEM_RUPEE_BLUE , GI_RUPEE_BLUE } ,
{ ITEM_RUPEE_BLUE , GI_RUPEE_BLUE_LOSE } ,
{ ITEM_RUPEE_GOLD , GI_RUPEE_GOLD } ,
{ ITEM_RUPEE_GREEN , GI_RUPEE_GREEN } ,
{ ITEM_RUPEE_GREEN , GI_RUPEE_GREEN_LOSE } ,
{ ITEM_RUPEE_PURPLE , GI_RUPEE_PURPLE } ,
{ ITEM_RUPEE_PURPLE , GI_RUPEE_PURPLE_LOSE } ,
{ ITEM_RUPEE_RED , GI_RUPEE_RED } ,
{ ITEM_RUPEE_RED , GI_RUPEE_RED_LOSE } ,
{ ITEM_SAW , GI_SAW } ,
{ ITEM_SCALE_GOLDEN , GI_SCALE_GOLD } ,
{ ITEM_SCALE_SILVER , GI_SCALE_SILVER } ,
{ ITEM_SEEDS , GI_SEEDS_5 } ,
{ ITEM_SEEDS_30 , GI_SEEDS_30 } ,
{ ITEM_SHIELD_DEKU , GI_SHIELD_DEKU } ,
{ ITEM_SHIELD_HYLIAN , GI_SHIELD_HYLIAN } ,
{ ITEM_SHIELD_MIRROR , GI_SHIELD_MIRROR } ,
{ ITEM_SKULL_TOKEN , GI_SKULL_TOKEN } ,
{ ITEM_SLINGSHOT , GI_SLINGSHOT } ,
{ ITEM_STICK , GI_STICKS_1 } ,
{ ITEM_STICKS_10 , GI_STICKS_10 } ,
{ ITEM_STICKS_5 , GI_STICKS_5 } ,
{ ITEM_STICK_UPGRADE_20 , GI_STICK_UPGRADE_20 } ,
{ ITEM_STICK_UPGRADE_30 , GI_STICK_UPGRADE_30 } ,
{ ITEM_STONE_OF_AGONY , GI_STONE_OF_AGONY } ,
{ ITEM_SWORD_BGS , GI_SWORD_BGS } ,
{ ITEM_SWORD_BGS , GI_SWORD_KNIFE } ,
{ ITEM_SWORD_BROKEN , GI_SWORD_BROKEN } ,
{ ITEM_SWORD_KOKIRI , GI_SWORD_KOKIRI } ,
{ ITEM_TUNIC_GORON , GI_TUNIC_GORON } ,
{ ITEM_TUNIC_ZORA , GI_TUNIC_ZORA } ,
{ ITEM_WALLET_ADULT , GI_WALLET_ADULT } ,
{ ITEM_WALLET_GIANT , GI_WALLET_GIANT } ,
{ ITEM_WEIRD_EGG , GI_WEIRD_EGG }
} ;
2023-12-04 08:26:55 -05:00
extern " C " GetItemID RetrieveGetItemIDFromItemID ( ItemID itemID ) {
if ( ItemIDtoGetItemIDMap . contains ( itemID ) ) {
return ItemIDtoGetItemIDMap . at ( itemID ) ;
2023-05-20 09:24:02 -04:00
}
2023-12-04 08:26:55 -05:00
return GI_MAX ;
}
std : : unordered_map < ItemID , RandomizerGet > ItemIDtoRandomizerGetMap {
{ ITEM_SONG_MINUET , RG_MINUET_OF_FOREST } ,
{ ITEM_SONG_BOLERO , RG_BOLERO_OF_FIRE } ,
{ ITEM_SONG_SERENADE , RG_SERENADE_OF_WATER } ,
{ ITEM_SONG_REQUIEM , RG_REQUIEM_OF_SPIRIT } ,
{ ITEM_SONG_NOCTURNE , RG_NOCTURNE_OF_SHADOW } ,
{ ITEM_SONG_PRELUDE , RG_PRELUDE_OF_LIGHT } ,
{ ITEM_SONG_LULLABY , RG_ZELDAS_LULLABY } ,
{ ITEM_SONG_EPONA , RG_EPONAS_SONG } ,
{ ITEM_SONG_SARIA , RG_SARIAS_SONG } ,
{ ITEM_SONG_SUN , RG_SUNS_SONG } ,
{ ITEM_SONG_TIME , RG_SONG_OF_TIME } ,
{ ITEM_SONG_STORMS , RG_SONG_OF_STORMS } ,
{ ITEM_MEDALLION_FOREST , RG_FOREST_MEDALLION } ,
{ ITEM_MEDALLION_FIRE , RG_FIRE_MEDALLION } ,
{ ITEM_MEDALLION_WATER , RG_WATER_MEDALLION } ,
{ ITEM_MEDALLION_SPIRIT , RG_SPIRIT_MEDALLION } ,
{ ITEM_MEDALLION_SHADOW , RG_SHADOW_MEDALLION } ,
{ ITEM_MEDALLION_LIGHT , RG_LIGHT_MEDALLION } ,
{ ITEM_KOKIRI_EMERALD , RG_KOKIRI_EMERALD } ,
{ ITEM_GORON_RUBY , RG_GORON_RUBY } ,
{ ITEM_ZORA_SAPPHIRE , RG_ZORA_SAPPHIRE } ,
} ;
extern " C " RandomizerGet RetrieveRandomizerGetFromItemID ( ItemID itemID ) {
if ( ItemIDtoRandomizerGetMap . contains ( itemID ) ) {
return ItemIDtoRandomizerGetMap . at ( itemID ) ;
2023-05-20 09:24:02 -04:00
}
2023-12-04 08:26:55 -05:00
return RG_MAX ;
2023-04-02 04:47:23 -04:00
}
2022-06-15 15:18:41 -04:00
extern " C " void OTRExtScanner ( ) {
2023-05-07 23:01:12 -04:00
auto lst = * LUS : : Context : : GetInstance ( ) - > GetResourceManager ( ) - > GetArchive ( ) - > ListFiles ( " * " ) . get ( ) ;
2022-06-15 15:33:25 -04:00
2022-06-15 15:18:41 -04:00
for ( auto & rPath : lst ) {
std : : vector < std : : string > raw = StringHelper : : Split ( rPath , " . " ) ;
std : : string ext = raw [ raw . size ( ) - 1 ] ;
std : : string nPath = rPath . substr ( 0 , rPath . size ( ) - ( ext . size ( ) + 1 ) ) ;
replace ( nPath . begin ( ) , nPath . end ( ) , ' \\ ' , ' / ' ) ;
2022-06-15 15:33:25 -04:00
ExtensionCache [ nPath ] = { rPath , ext } ;
2022-06-15 15:18:41 -04:00
}
}
2023-11-05 12:34:39 -05:00
typedef struct {
uint16_t major ;
uint16_t minor ;
uint16_t patch ;
} OTRVersion ;
// Read the port version from an OTR file
OTRVersion ReadPortVersionFromOTR ( std : : string otrPath ) {
OTRVersion version = { } ;
// Use a temporary archive instance to load the otr and read the version file
auto archive = std : : make_shared < LUS : : Archive > ( otrPath , " " , std : : unordered_set < uint32_t > ( ) , false ) ;
if ( archive - > IsMainMPQValid ( ) ) {
auto t = archive - > LoadFile ( " portVersion " , false ) ;
if ( t ! = nullptr & & t - > IsLoaded ) {
auto stream = std : : make_shared < LUS : : MemoryStream > ( t - > Buffer . data ( ) , t - > Buffer . size ( ) ) ;
auto reader = std : : make_shared < LUS : : BinaryReader > ( stream ) ;
LUS : : Endianness endianness = ( LUS : : Endianness ) reader - > ReadUByte ( ) ;
reader - > SetEndianness ( endianness ) ;
version . major = reader - > ReadUInt16 ( ) ;
version . minor = reader - > ReadUInt16 ( ) ;
version . patch = reader - > ReadUInt16 ( ) ;
}
}
archive = nullptr ;
return version ;
}
// Check that a soh.otr exists and matches the version of soh running
// Otherwise show a message and exit
void CheckSoHOTRVersion ( std : : string otrPath ) {
std : : string msg ;
# if defined(__SWITCH__)
msg = " \x1b [4;2HPlease re-extract it from the download. "
" \x1b [6;2HPress the Home button to exit... " ;
# elif defined(__WIIU__)
msg = " Please extract the soh.otr from the Ship of Harkinian download \n to your folder. \n \n Press and hold the power button to shutdown... " ;
# else
msg = " Please extract the soh.otr from the Ship of Harkinian download to your folder. \n \n Exiting... " ;
# endif
if ( ! std : : filesystem : : exists ( otrPath ) ) {
# if not defined(__SWITCH__) && not defined(__WIIU__)
Extractor : : ShowErrorBox ( " soh.otr file is missing " , msg . c_str ( ) ) ;
exit ( 1 ) ;
# elif defined(__SWITCH__)
LUS : : Switch : : PrintErrorMessageToScreen ( ( " \x1b [2;2HYou are missing the soh.otr file. " + msg ) . c_str ( ) ) ;
# elif defined(__WIIU__)
OSFatal ( ( " You are missing the soh.otr file \n \n " + msg ) . c_str ( ) ) ;
# endif
}
OTRVersion otrVersion = ReadPortVersionFromOTR ( otrPath ) ;
if ( otrVersion . major ! = gBuildVersionMajor | | otrVersion . minor ! = gBuildVersionMinor | | otrVersion . patch ! = gBuildVersionPatch ) {
# if not defined(__SWITCH__) && not defined(__WIIU__)
Extractor : : ShowErrorBox ( " soh.otr file version does not match " , msg . c_str ( ) ) ;
exit ( 1 ) ;
# elif defined(__SWITCH__)
LUS : : Switch : : PrintErrorMessageToScreen ( ( " \x1b [2;2HYou have an old soh.otr file. " + msg ) . c_str ( ) ) ;
# elif defined(__WIIU__)
OSFatal ( ( " You have an old soh.otr file \n \n " + msg ) . c_str ( ) ) ;
# endif
}
}
// Checks the program version stored in the otr and compares the major value to soh
2023-12-10 12:49:15 -05:00
// For Windows/Mac/Linux if the version doesn't match, offer to
2023-11-05 12:34:39 -05:00
void DetectOTRVersion ( std : : string fileName , bool isMQ ) {
bool isOtrOld = false ;
std : : string otrPath = LUS : : Context : : LocateFileAcrossAppDirs ( fileName , appShortName ) ;
// Doesn't exist so nothing to do here
if ( ! std : : filesystem : : exists ( otrPath ) ) {
return ;
}
OTRVersion otrVersion = ReadPortVersionFromOTR ( otrPath ) ;
if ( otrVersion . major ! = gBuildVersionMajor ) {
isOtrOld = true ;
}
if ( isOtrOld ) {
# if not defined(__SWITCH__) && not defined(__WIIU__)
char msgBuf [ 250 ] ;
char version [ 18 ] ; // 5 digits for int16_max (x3) + separators + terminator
if ( otrVersion . major ! = 0 | | otrVersion . minor ! = 0 | | otrVersion . patch ! = 0 ) {
snprintf ( version , 18 , " %d.%d.%d " , otrVersion . major , otrVersion . minor , otrVersion . patch ) ;
} else {
snprintf ( version , 18 , " no version found " ) ;
}
snprintf ( msgBuf , 250 ,
" The %s file was generated with a different version of Ship of Harkinian. \n OTR version: %s \n \n "
" You must regenerate to be able to play, otherwise the program will exit. \n Would you like to regenerate it now? " ,
fileName . c_str ( ) , version ) ;
if ( Extractor : : ShowYesNoBox ( " Old OTR File Found " , msgBuf ) = = IDYES ) {
std : : string installPath = LUS : : Context : : GetAppBundlePath ( ) ;
if ( ! std : : filesystem : : exists ( installPath + " /assets/extractor " ) ) {
Extractor : : ShowErrorBox ( " Extractor assets not found " ,
" Unable to regenerate. Missing assets/extractor folder needed to generate OTR file. \n \n Exiting... " ) ;
exit ( 1 ) ;
}
Extractor extract ;
2023-11-06 17:46:48 -05:00
if ( ! extract . Run ( LUS : : Context : : GetAppDirectoryPath ( appShortName ) , isMQ ? RomSearchMode : : MQ : RomSearchMode : : Vanilla ) ) {
2023-11-05 12:34:39 -05:00
Extractor : : ShowErrorBox ( " Error " , " An error occured, no OTR file was generated. \n \n Exiting... " ) ;
exit ( 1 ) ;
}
extract . CallZapd ( installPath , LUS : : Context : : GetAppDirectoryPath ( appShortName ) ) ;
} else {
exit ( 1 ) ;
}
# elif defined(__SWITCH__)
LUS : : Switch : : PrintErrorMessageToScreen ( " \x1b [2;2HYou've launched the Ship with an old game OTR file. "
" \x1b [4;2HPlease regenerate a new game OTR and relaunch. "
" \x1b [6;2HPress the Home button to exit... " ) ;
# elif defined(__WIIU__)
OSFatal ( " You've launched the Ship with an old a game OTR file. \n \n "
" Please generate a game OTR and relaunch. \n \n "
" Press and hold the Power button to shutdown... " ) ;
# endif
}
}
2023-11-05 22:04:21 -05:00
bool IsSubpath ( const std : : filesystem : : path & path , const std : : filesystem : : path & base ) {
auto rel = std : : filesystem : : relative ( path , base ) ;
return ! rel . empty ( ) & & rel . native ( ) [ 0 ] ! = ' . ' ;
}
bool PathTestCleanup ( FILE * tfile ) {
try {
if ( std : : filesystem : : exists ( " ./text.txt " ) ) std : : filesystem : : remove ( " ./text.txt " ) ;
if ( std : : filesystem : : exists ( " ./test/ " ) ) std : : filesystem : : remove ( " ./test/ " ) ;
}
catch ( std : : filesystem : : filesystem_error const & ex ) { return false ; }
return true ;
}
2022-03-21 21:51:23 -04:00
extern " C " void InitOTR ( ) {
2023-11-05 12:34:39 -05:00
# ifdef __SWITCH__
LUS : : Switch : : Init ( LUS : : PreInitPhase ) ;
# elif defined(__WIIU__)
LUS : : WiiU : : Init ( appShortName ) ;
# endif
2023-11-06 17:46:48 -05:00
# ifdef _WIN32
2023-11-05 22:04:21 -05:00
char * tempVar = getenv ( " TEMP " ) ;
std : : filesystem : : path tempPath ;
try {
tempPath = std : : filesystem : : canonical ( tempVar ) ;
} catch ( std : : filesystem : : filesystem_error const & ex ) {
std : : string userPath = getenv ( " USERPROFILE " ) ;
userPath . append ( " \\ AppData \\ Local \\ Temp " ) ;
tempPath = std : : filesystem : : canonical ( userPath ) ;
}
wchar_t buffer [ MAX_PATH ] ;
GetModuleFileName ( NULL , buffer , _countof ( buffer ) ) ;
auto ownPath = std : : filesystem : : canonical ( buffer ) . parent_path ( ) ;
if ( IsSubpath ( ownPath , tempPath ) ) {
Extractor : : ShowErrorBox ( " Error " , " SoH is running in a temp folder. Extract the .zip and run again. " ) ;
exit ( 1 ) ;
}
FILE * tfile = fopen ( " ./text.txt " , " w " ) ;
std : : filesystem : : path tfolder = std : : filesystem : : path ( " ./test/ " ) ;
bool error = false ;
try {
create_directories ( tfolder ) ;
} catch ( std : : filesystem : : filesystem_error const & ex ) {
error = true ;
}
if ( tfile = = NULL | | error ) {
Extractor : : ShowErrorBox ( " Error " , " SoH does not have proper file permissions. Please move it to a folder that does and run again. " ) ;
PathTestCleanup ( tfile ) ;
exit ( 1 ) ;
}
fclose ( tfile ) ;
if ( ! PathTestCleanup ( tfile ) ) {
Extractor : : ShowErrorBox ( " Error " , " SoH does not have proper file permissions. Please move it to a folder that does and run again. " ) ;
exit ( 1 ) ;
}
# endif
2023-11-05 12:34:39 -05:00
CheckSoHOTRVersion ( LUS : : Context : : GetPathRelativeToAppBundle ( " soh.otr " ) ) ;
2023-08-13 18:45:45 -04:00
if ( ! std : : filesystem : : exists ( LUS : : Context : : LocateFileAcrossAppDirs ( " oot-mq.otr " , appShortName ) ) & &
! std : : filesystem : : exists ( LUS : : Context : : LocateFileAcrossAppDirs ( " oot.otr " , appShortName ) ) ) {
2023-11-05 12:34:39 -05:00
# if not defined(__SWITCH__) && not defined(__WIIU__)
2023-08-13 18:45:45 -04:00
std : : string installPath = LUS : : Context : : GetAppBundlePath ( ) ;
if ( ! std : : filesystem : : exists ( installPath + " /assets/extractor " ) ) {
Extractor : : ShowErrorBox ( " Extractor assets not found " ,
2023-11-05 12:34:39 -05:00
" No OTR files found. Missing assets/extractor folder needed to generate OTR file. \n \n Exiting... " ) ;
2023-08-13 18:45:45 -04:00
exit ( 1 ) ;
}
2023-05-09 23:39:57 -04:00
bool generatedOtrIsMQ = false ;
2023-04-25 00:01:17 -04:00
if ( Extractor : : ShowYesNoBox ( " No OTR Files " , " No OTR files found. Generate one now? " ) = = IDYES ) {
Extractor extract ;
2023-11-06 17:46:48 -05:00
if ( ! extract . Run ( LUS : : Context : : GetAppDirectoryPath ( appShortName ) ) ) {
2023-11-05 12:34:39 -05:00
Extractor : : ShowErrorBox ( " Error " , " An error occured, no OTR file was generated. \n \n Exiting... " ) ;
2023-04-25 00:01:17 -04:00
exit ( 1 ) ;
}
2023-08-13 18:45:45 -04:00
extract . CallZapd ( installPath , LUS : : Context : : GetAppDirectoryPath ( appShortName ) ) ;
2023-05-09 23:39:57 -04:00
generatedOtrIsMQ = extract . IsMasterQuest ( ) ;
2023-05-03 21:29:50 -04:00
} else {
exit ( 1 ) ;
2023-04-25 00:01:17 -04:00
}
if ( Extractor : : ShowYesNoBox ( " Extraction Complete " , " ROM Extracted. Extract another? " ) = = IDYES ) {
Extractor extract ;
2023-11-06 17:46:48 -05:00
if ( ! extract . Run ( LUS : : Context : : GetAppDirectoryPath ( appShortName ) , generatedOtrIsMQ ? RomSearchMode : : Vanilla : RomSearchMode : : MQ ) ) {
2023-11-05 12:34:39 -05:00
Extractor : : ShowErrorBox ( " Error " , " An error occured, an OTR file may have been generated by a different step. \n \n Continuing... " ) ;
2023-04-25 00:01:17 -04:00
} else {
2023-08-13 18:45:45 -04:00
extract . CallZapd ( installPath , LUS : : Context : : GetAppDirectoryPath ( appShortName ) ) ;
2023-04-25 00:01:17 -04:00
}
}
2023-11-05 12:34:39 -05:00
# elif defined(__SWITCH__)
LUS : : Switch : : PrintErrorMessageToScreen ( " \x1b [2;2HYou've launched the Ship without a game OTR file. "
" \x1b [4;2HPlease generate a game OTR and relaunch. "
" \x1b [6;2HPress the Home button to exit... " ) ;
2022-08-14 22:57:24 -04:00
# elif defined(__WIIU__)
2023-11-05 12:34:39 -05:00
OSFatal ( " You've launched the Ship without a game OTR file. \n \n "
" Please generate a game OTR and relaunch. \n \n "
" Press and hold the Power button to shutdown... " ) ;
Nintendo switch support (#935)
* Moved gfx effects to the gpu and removed loadtexbyname on some textures
* Readded empty if
* Added nintendo switch support
* Fixed compilation errors and window closing issue on linux
* Fixed kaleido on 64 bit
* Fixed audio on nintendo switch
* Implemented performance mode switcher
* Added suggestions from pr review
* Fixed ftruncate errors
* Fixed compilation errors
* Added missing include rule
* Fixed libstorm path
* Removed ftruncate extern to use a correct posix version
* Merge branch 'develop' from HarbourMasters into znx (#3)
* Add Support for macOS (#441)
* Fixed soh filters
* add more makefile changes
* almost ready
* more updates
* update
* update
* Update Makefiles to handle both platforms
* Allow for overriding the CXX and CC executables
* Restore original structure while supporting custom CXX flags
* Remove some platform specific libs
* Dynamic target name
* Make X11 paths package-agnostic
* Remove changes to `gfx_opengl.cpp`
* Use OpenGL2 on MacOS instead of OpenGL3
* make it actually render something
* render at least the first texture, still need to figure out the second
one
* Let’s use OpenGL 3 again
* maybe this works to get the right texture? link's eyes still look off a bit
* did this work?
* set the platform to macos
* actual numbers are right, but logic is ugly XXX/TODO, i know
* add zlib to ldflags for ZAPDUtils
* A bit of cleanup
* Revert unneeded changes
* Remove GL_CHECK
* Fix issues with z64 branch
* use an std::map instead of a giant array
* three point filter fix (#2)
* Fix mac compilation
* fix audio for 64 bit
* revert audio heap size, keep bigger pools
* Add more Apple specific checks to our modifications
* Add building instructions for macOS
* Remove unecessary step from building instructions
* Add missing SDL2 & GLEW to Linux LDLIBS
* Update BUILDING.md
Co-authored-by: BountyChocolate123456 <101743444+BountyChocolate123456@users.noreply.github.com>
* Update soh/.gitignore to include other arch binaries
Co-authored-by: BountyChocolate123456 <101743444+BountyChocolate123456@users.noreply.github.com>
* Use right platform name for debugging window
Co-authored-by: BountyChocolate123456 <101743444+BountyChocolate123456@users.noreply.github.com>
* Fix stormlib on macos (arm64)
* Simplify some of the ifdef checks
* Revert an older no longer necessary fix
* Remove remaining unecessary deviations
* Update building instructions after StormLib changes
* Feature: Use OpenGL 4.1 (#1)
* Further tweak the BUILDING
* Tidy up
* reword -j message
* Add Jenkins CI Support (#2)
* Fix type issues
* add target <appbundle> and <filledappbundle>
add makefile targets to create an .app
`filledappbundle` creates the target with the .otr included
this should perhaps be moved to Application Support though
* pull gcc's rpath from otool output
* move make target to the end so it's not default
* Add Jenkins and make exe in par with other platforms
* Actually save build artefacts
* Fix artefact path
* Remove x11 mentions and linking (not used)
* Update building instructions for generating app
* use appsupport directory
* Add new app icon
* Update target to match macOS types
* Update more audio types
* fix null deref in Audio_PlayFanfare
* Remove old import from z64
* address final nit with apple ifdefs
Co-authored-by: KiritoDev <36680385+KiritoDv@users.noreply.github.com>
Co-authored-by: Jeffrey Crowell <github@crowell.biz>
Co-authored-by: BountyChocolate123456 <101743444+BountyChocolate123456@users.noreply.github.com>
* Move macOS to parallel stage
* fix linux crash
* Ignore all named saves
Necessary after new save format
* DPad items
* Move UI location arrays from static to global to accomodate customizable UI
* FIX: Increased the maximum actor limit for draw distance
Fix issue #529
* FIX: Remove duplicates of gNewDrops from the enhancements menu
* Get rid of erroneous int casts
* casts jya_cobra's shadowTexture pointer to uintptr_t instead of s32.
* Fix ability to assign equipment you don't own
* Fix title cards for market potion shop and bombchu shop
* Invalidate message item icon texture before drawing
* Add margins for dpad
* Fixed some instances where the original OOT save is erroneously preserved or recreated, leading to another conversion next time you launched the game
* Headphones setting in game should now work.
Resolves #13
* Map Select name fixes
* Change Power to Upgrades
* Rename Soh* files
* Update names
* Add more files
* Add more files
* Add toggles for disabling heart drops and random drops (#507)
* Adds toggles for disabling random drops and fixed heart drops
* Changed the "No Fixed Heart Drops" toggle to the more useful "No Random Heart Drops" toggle
* Adds an explanation that the no heart drops option is similar to Hero Mode
* Moved difficulty options into their own sub-menu
Moved time saver options into their own sub-menu
Moved clutter reducing options into their own sub-menu
* fixed the tag name of mweep speed
* Moved Skip Text to Experimental
* Fix testing masks of DPad
* Fix audio, boot commands, and save staes.
* add menu from https://github.com/PurpleHato/Shipwright/tree/ResetMenu
* implement reset
* Update README.md
* command on mac
* special char doesn't work with default imgui font
* change name based on PR comment
* missed a couple spots
* change sunset in save editor so dampe is out
* Update to latest `docking` imgui (#582)
* Update to latest `docking` imgui
commit: 67410d53f739b6a0df138e2252f0e5136b42062f
* Fix modified import for SDL
* Update imgui_impl_sdl.cpp
* Add Imgui include path for better imports
* Controller Navigation Fix-Up (#544)
* Controller Navigation Fix-Up
* [MISC] Fix typo
* Use Macro for __FILE__ & __LINE__ when possible (#559)
* First batch some overlay
* Almost all overlay
* effect & gamestate
* kaleido stuffs
* more overlay
* more left over from code folder
* remaining hardcoded line and file
* Open & Close _DISP __FILE__ & __LINE__ clean up
* Some if (1) {} remove
* LOG_xxxx __FILE__ , __LINE__ cleaned
* ASSERT macro __FILE__ __LINE__
* mtx without line/file in functions
* " if (1) {} " & "if (0) {}" and tab/white place
* LogUtils as macro
* GameState_, GameAlloc_, SystemArena_ & ZeldaArena_
* Revert "GameState_, GameAlloc_, SystemArena_ & ZeldaArena_"
This reverts commit 0d85caaf7e342648c01a15fe21e93637352dc596.
* Like last commit but as macro
* Fix matrix not using macros
* use function not macro
* DebugArena_* functions
GameAlloc_MallocDebug
BgCheck_PosErrorCheck as macros
removed issues with ; in macro file
* MM Bunny Hood enhancements: no age restrictions & wear across entrances (#560)
* Remove age restriction on MM Bunny Hood
* Handle mask slot changing; init Link wearing mask
* Reset mask state after selling
* Use unordered maps in some hot paths (#566)
* Use unordered maps in some hot paths
* Address PR comments
* Cheat: Infinite Epona Boost (#577)
* Cheat: Infinite Epona Boost
* Edit for readability
* update pulseaudio for 44.1khz audio (#587)
* use pulseaudio defaults
* spaces/tabs
* pulseaudio values tuned for n64 audio at 44.1khz
* update tlength
* remove one hardcoded samplerate
Co-authored-by: briaguya <briaguya@alice>
* Restoration Item Sliders (#595)
* Allows players to set custom restoration values for potions and milk
* Fixed a dumb oversight
* implemented fairy sliders
* use ini window resolution (#410)
* use ini window resolution
* use arguments for directx window size
* default 640x480 not 320x240
* kick off a build
* and revert
* default config 640x480 not 320x240
* add todo
Co-authored-by: briaguya <briaguya@alice>
* 3D Drops & Projectiles update (#548)
* Fix remaining rupee and keys
* fix tabs -> spaces
* more fix about tabs -> spaces
* Better up <-> down mouvement for hearts
* remove useless comment
* Cosmetics menu rework (#589)
* -
* DPad/some margin fix(left side)
* various ImGui stuff and fixes
* disabled kaleido menu (non working)
* fix win being dumb
* same for C btn this time
* Fix windows build
* Beating hearts fix
* Default win size and some placement fix
* Fix Dpad Ammo & C notes, Kaleido, white dog
* some texts fix and tab move
* Add stone of agony, some fixes and build correctly
* precise item place with Dpad
* Gamecube -> GameCube
Co-authored-by: Baoulettes <iMacWin10>
* [CI] Create an Appimage for 64bit builds (#570)
* [CI] Create AppImage file
* [CI] Updated Jenkinsfile
* [MISC] fix indentation
* [MISC] Fix indentation
* [MISC] Fix indentation
* [CI] 7z appimage and readme
* [CI] AppImage icon file (#597)
* [CI] Add patchelf
* [BUILD] Include Hi-Res icon
* Fix portability use of std::clamp (#596)
* Add N64 weird frames and OOB Bombchus cvars (#602)
* Add gN64WeirdFrames and gBombchuOOB cvars
* Rename gBombchuOOB to gBombchusOOB
* Fix pipeline
* [BUILD] Do not strip ZAPD (#598)
* [BUILD] Do not strip ZAPD
* [BUILD] Reuse Icon Asset
* [APPIMAGE] Handle paths with spaces
* [macos] Distribute optimized builds (#599)
* Cosmetics texts fixes (#604)
* branch init + few fixes
* Reset button
* Several texts fixes and default color to GameCube
* space issues
* some more extra space that was not needed.
* space yes last time ...
* Arrows being able to be rainbow some more texts fixes
* more texts fixes
* c-buttons some plurial fix
* Fixes bug in demo effect due to removed display list set.
* King dodongo room crash (#613)
* first attempt
* force camera setting to be at least 0 (dirty!)
* -
* reverted something to just include fix
* Invalidate text box icon before drawing (#607)
* [APPIMAGE] Set lib path for ZAPD (#611)
* New drop runtime fix (#614)
* inital rework
* fixed default rotation for 2D sprites
* fix tab/space issues
* Fix Ganon's Castle title cards (#606)
* Checkered room crash workaround (#615)
* Increase poly and vertex count for dyna actors
* Add TODO
* Only apply fix in Forest Temple
* Enable globally
* Match case of 'Shipwright' in Linux build (#619)
* Fix 0xabababab crash (#617)
* Unconditionally setup the normal skybox
* Only call Skybox_Setup once ever
* Equipment upgrade text fix and any pause slot enhancement fix (#620)
* Fix upgrade name text not rendering
* Use cvar and don't render equip help for empty item slots
* Fix rendering logic
* Fix incorrect item name rendered for one frame
* Reorder comparison
* Remove extra indent
* Remove accidental changes
* ImGui grammer, consistency, and clarity fixes (#625)
* ImGui grammer, consistency, and clarity fixes
Co-Authored-By: Stormghetti <56653191+Stormghetti@users.noreply.github.com>
* Adds more new lines for users on smaller displays
Co-Authored-By: Stormghetti <56653191+Stormghetti@users.noreply.github.com>
Co-authored-by: Stormghetti <56653191+Stormghetti@users.noreply.github.com>
* New drops shadows & rotation fixes (#627)
* fixes
* forgot to add heart pieces in rotation logic
* Dodongo's Cavern blue warp crash fix (#622)
* Doodong's Cavern blue warp crash fix
* >= not >
* Don't waste a line of space
* add support for clang compiler (#592)
* hacks to align strings for clang... wow just wow
* start work to getting built with clang
* fix issues with struct constructors, all builds, doesn't link still
* fix some narrowing issues that clang complains about
* fix compliation of zapd
* fix null deref in VersionInfo
* builds with clang
* make stringbuilding use StringHelper instead of addition
* fix linking
* add CLANG SHIP overlay on clang built versions
* doesn't need to be volatile
* mark unknown strings as extern
* rename some stuff
* can't align extern
* hopefully fix compilation for everythign
* expandtab
* allow setting LD
* Revert "allow setting LD"
This reverts commit 711aba6db2c41bab476bd34e878af6a37a7f5559.
maybe to use lld it should be a LDFLAG?
* -Wno-deprecated-declarations is required for newer versions of clang
on macOS 13 beta sdk, the version of apple clang requires this
* Add jenkins support for clang
* Forward CXX flags to stormlib compilation
* Move GCC only flags to check
* use exports to set multiarch setup
* Fix Jenkins forever
* use make instead of cmake --build
add some flags to build with clang-11 as well
* address review coments
- rework extraction to allow multi thread
- misc readability cleanup
* update makefile to add WARN on linux+clang
Co-authored-by: David Chavez <david@dcvz.io>
* Fix develop
* Fixes grey screen issue + tooltip for 2 handed shield
* Don't close controller after SDL has quit (#642)
* Don't close controller after SDL has quit
* Don't check if controller can rumble if null
* Fixes Barinade's set whenever boss fight is reloaded (#639)
* Reimplements unused Barinade reset function.
* Removes the Jellyfish from Barinade's body on reset.
* add the ability to pull graves during the day (#637)
* change max internal res multiplier to 3x, use float and % instead of int (#638)
* change max internal res multiplier to 3x, use float and % instead of int
* Update libultraship/libultraship/ImGuiImpl.cpp
Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>
* Fixes crash on Biggoron trade failure screen wipe
Resolves #621
* fixes center docking (#652)
* testing out item replacement (#416)
* skip learning song of storms
* don't set flag when getting goron tunic as child
* Initiates prelude check when master sword unloads.
Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again.
* Stops Shadow Temple lore prompts from appearing in rando.
* Skips cutscene of royal tomb explosion in rando.
Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here.
* Improves visual of exploding gravestone.
* Adds some comments explaining the rando differences
* Skip ruto text box in jabu blue warp
For rando
* skip intro cutscene in dodongo's cavern
* load spoiler files on boot, fix spoilerfile existing check when making new saves
* name entry dropped spoiler logic
* make sure to actually init the cvar
* no chime on load
* uncomment
* Skip ganondrof cutscene
Skip to scream part of the death animation, skipping the text boxes etc. For rando
* Update z_boss_ganondrof.c
* skip owl flight cutscenes in rando
* Fixes skipped text so it only applies to shadow temple.
Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors.
* Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case.
* TEST: Text for item
* Adding ganon flavor text
* ADD: AMMO Count
* format ganon text/hint text
* Autoskip the tower cutscene if settings call for tower collapse.
* ganon hint text logic
* Improved prelude after time travel fix
* swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things.
* this is all i did
* not the cleanest code ever but it's working
* ADD: GS Count
* ADD: Wallter (crash for now)
* TWEAK: Wallet check
* FIX: Use DrawItem instread of DrawUpgrade... b-baka!
* Fixes some vanilla bugs introduced by rando code.
* Added cutscene skip for zelda escaping
Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger
* ADD: X Spacing + Placeholders for song
* ADD: default case for items
* TWEAK: Spacing
* FIX: Light Arrow
* ADD: Ammo Option
* use groups instead
* ADD: More spacing logic
* songs and names
* TWEAK: Color on wallet
* colors
* Added flags cutscene before nabooru fight
* ADD: ChromaKey text
* First attempt skip cs after nabooru defeat
* Better implementation for specific rando cutscene skips
* use pulseaudio defaults
* spaces/tabs
* move color push/pop to stop crash
* make the colors work again
* the real bottle fix
* pulseaudio values tuned for n64 audio at 44.1khz
* update tlength
* remove one hardcoded samplerate
* Cleaned up and fixed zelda escape skip
The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of.
* Revert one line to match original
nothing functional
* another hint line that breaks autonewline logic
* don't autospawn epona if we don't have the song/ocarina
* Trying to use iron knuckle death effects
not working yet
* Streamlined OoT cutscene skip for future additions
Also cleaned up if statement in general
* Made if statement more readable
Also added clarity for what cutscene was skipped
* Fixed typo in comment
* Janky nabooru defeat cs skip
* altar text formatting (gonna need help shortening some of the french ones)
* more altar text formatting
* english altar text formatting complete
* make gtg blocking guard check for card not bridge
* FIX: Typo!
* FIX: Uppercases
* FIX: Typo
* TWEAK: Alter + some names
* TWEAK: More caps!
* ADD: Missing string
TWEAK more uppercases and namefixe
s
* Hide nabooru death by covering her in flames
* bandaid fix for death crash issue
* Twinrova defeat cs skip
Skips the animation and manually calls the function to show the "beam" around the sisters
* fix crash
* fix caps to match
* fix great fairy reward mashing/shielding issue
* TWEAK : Typo clé to Clé
* TWEAK: Some Altar hints
TWEAK: Some capitals
* TWEAK: Unmatching text + some cap again
* TWEAK: More tweaks
* fix build
* remove extra json.hpp, add hint
* Update randomizer_item_tracker.cpp
* TWEAK: Double Defense with RedParticles instead of white
* make sure we don't optimize out the check to ensure a spoilerfile exists
* vanilla ganon boss key hint formatting
* TWEAK: FR- better way of the hero text
* fix
* and again
* Initializes dungeonsDone items in gSaveContext to 0.
* Replaces sizeof calculation with a NUM_DUNGEONS constant.
* Fixes Saria's Gift on the LW Bridge from getting killed when holding shield.
* More airtight fix for Saria's Gift on the Bridge.
* Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId.
* Invalidate text box icon before drawing
* Fixes the case where Saria's gift is an Ice Trap.
We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine.
* Initial commit
Might need changing when we change the settings in the future
* Fixes Door of Time opening cutscene after warping with prelude.
* Initial waterfall skip
Very rudimentary way of doing things but it seems to work so :shrug:
* inital rework
* fixed default rotation for 2D sprites
* fix tab/space issues
* 3d drops rando merge fix again
* Allows Impa to appear in the Lullaby check post drawbridge escape.
* Changes Ganon's Trials Count setting to a checkbox
The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed.
* Sets all Ganon's Trials to incomplete in new saves.
Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131
* fix castle guards when oot throw cutscene has already played in rando
* Properly removes the beams when trials are cleared.
* Removes Question Mark from Skip Ganon's Trials UI.
* Adds a todo comment about when to change back to slider.
* make deku seeds check for bullet bag
* Various tweaks
TWEAK: Altar Text
TWEAK: Hint names
TWEAK: Replace more problematic œ to oe
* upgrade ocarina on both child and adult equips
* FIX: Jabu Item
* update equipped hookshot/longshot when obtained as other age
* add hint
* don't give the bgs check without the claim check
* Skips Darunia Cutscene in Fire Temple
* Added a TODO note about not skipping the cutscene.
There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch.
* remove todo
* restore fast ocarina option in imgui that was lost in merge
* Fixes grey screen issue + tooltip for 2 handed shield
* update to use dg instead of g for textures in item tracker
* TWEAK: Default color for cosmetic RAND button was not the corect one
* fix texture crash, remove unused item tracker code
* don't open mask shop until we get zelda's letter
* Update README.md
* Prevents "correct" chime under incorrect conditions.
* Fixes typo in conditional and adds "bonk" sound effect.
"Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time.
* remove modify dpad equips toggle, replace with checks for dpad menu
* remove extra check
* add ability to hold c-up to assign to dpad when dpad menuing is enabled
* disable d-pad navigation on item menu when holding c-up to equip
* dpad+c-up stuff for equipment menu
* ADD: Checbox for songs colors
* TWEAK: RandoColors for normal songs
* kind of quick and dirty but it works
* TWEAK: Clarity of the tooltip
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Dog <5172592+Dog@users.noreply.github.com>
Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com>
Co-authored-by: Baoulettes <perlouzerie@hotmail.fr>
Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
* Cosmetics hotfixes (#640)
* Initial branch creation
* Revert Main Game so it do not conflict later
* should fix window build, made namespace for Cosmetics
* forgot to edit one title
* Ability to add hidden window (usefull for Rainbow)
Fix building issues
* Line break, unused bool remove
* add descriptive todo for death crash bandaid (#655)
Co-authored-by: briaguya <briaguya@alice>
* Removed legacy audio mode and fixed ganon sound bug (#657)
* Free Camera (#337)
* wip free cam
* Almost done, needs collision still
* Added free cam behind cvar
* added WIP collision
* Fixed & implemented "Manual mode" from WW & TP
* Fixed camera not rotating when Link is moving
* fixed initialized camera rotation
* Fixed camera getting stuck + made it smoother
* reduced deadzone
* fixed epona camera height + added WW z-target free camera
* Adjusted player camera height & fixed fov
* Fixed camera roll
* fixed fov when moving the camera while in z-target
* Camera resets to Auto when going through doors or changing maps
* Fixed building
* touch
* more touch work
* Added WIP mouse support to the free cam
* gui stuff
* fixed building
* fixed building error
* ok fixed building for real this time
* oops
* Fix compilation issues
* removed mouse stuff that magically appeared in this branch
* smoothed out stick values & removed remains of mouse support
* re-added manual camera when pressing Z
* reduced minimum Y position of camera
* Addressed dcsv's nitpicks
* part 2
* oops
Co-authored-by: David Chavez <david@dcvz.io>
* Rando: Allows Malon's Item Check to be obtained by pulling out the Ocarina. [FIXED PR] (#672)
* Fixes using the Ocarina to get the check from Malon.
Still some cleanup to do here. For some reason the player can shield before receiving the check. It doesn't set the flag if the player does that so they can still try again, but would prefer a different solution if possible.
* Prevents Shielding from blocking the Item_Give from happening.
* Code Cleanup and comments explaining the new rando flow.
* Removes inventory check when pulling out Ocarina
This allows OI to properly give the check, which is important for Glitched logic later down the line. Talking to Malon still requires the Ocarina in your inventory.
* Prevents non-malon textboxes from triggering the check.
Also adds a comment explaining the condtional for getting the check from talking to Malon since it got pretty long.
* Actually fixes checking for text boxes.
* Relocates a comment for improved clarity.
* Fix Rando Water Temple Softlock (#665)
We use 3DS logic to generate item placement, but didn't have this specific door in Water Temple unlocked from the beginning like 3DS does.
This meant that if people took specific paths through the temple, they could softlock themselves by missing a key.
* Rando: GtG and carpenter prompts skip (#663)
* Skip gtg and carpenter prompt
For rando. Tested and just works.
* Fixed missing break
* Hide debug overlay behind gDebugEnabled (#660)
* Introduce App Directory Path (#572)
* Introduce app directory path concept
* macos: Remove hacky way of using applicaiton directory
* Update the new SaveManager
* Address stack user after return
* Remove unecessary property
* Use std::string for filepath
* Improve clang specific detections
* Use new path system for imgui files
* Improve helper for getting relative paths
* fix hidden wnd (#744)
* Split damage multiplication into its own PR (#656)
* Split damage multiplication into its own PR
* Found a more elegant implementation of the powers char*[]
* Fixes Maps, Compasses, and Boss Keys in Vanilla. (#751)
* .xiF slebaL
* Update Keese labels
* Fixed soundfont issues
* Skip warp song cutscenes in rando (#664)
Does it by skipping to the last part of the cutscene data. Tested on all songs, both adult and child.
* don't spawn blocking mido after we've already shown him the sword/shield (#675)
Co-authored-by: briaguya <briaguya@alice>
* Controller Configuration UI and JSON Config (#760)
* Initial controller hud ui
* Reverted fbdemo changes
* Moved config to json and implemented controller config
* fix build on linux, gitignore new config file
* fix build
* Fix compilation and file directory paths
* Call save on cvar save
* Fixed cvar loading and added deck slots to the config
* Changed control deck port 0 to use a physical device by default
* Added gyro and rumble & fixed loading errors
* Save config on toggle menubar
* fix linux build
* Fixed drift calculation
* Controller config now saves when pressing F1
* Removed ExitGame hook from ImGuiImpl
* Moved mappings to a map
* Added GetKeyName
* untranslate scancodes
* Fixed hud layout on keyboard device
* Fixed keyboard read on hud
* Fixed crash when reloading controllers
* Removed ConfigFile and changed file extension
* Changed Dummy to Disconnected and fixed filters
* Removed function leftover
* Changed ControllerHud to InputEditor
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: David Chavez <david@dcvz.io>
* Enough! My ship sails in the morning.
* Fixed menubar items position (#763)
* Fixed menubar items position
* Reverted tooltip tab position
* Fixes macOS randomizer functionality with App Directory (#761)
* Fixes macOS randomizer functionality with App Directory
* Fix windows build
* Update soh/soh/Enhancements/randomizer/3drando/rando_main.cpp
* Update soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp
* Revert band-aid fix
Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>
* Fix migration cvar deletion path (#765)
* Various controller fixes (#771)
* Fix controller
* Also fix rumble strength being a bool
* Remove ControllerHud.cpp
* Downgrade platform toolset back to previous version
* Fix gyro
* Fix bug that makes binding axes difficult and clear buttons before reading
* Exaggerate gyro display and adjust stick binding threshold
* Initialize drift thresholds
* git subrepo push soh
subrepo:
subdir: "soh"
merged: "75ccbade8"
upstream:
origin: "https://github.com/HarbourMasters/soh.git"
branch: "master"
commit: "75ccbade8"
git-subrepo:
version: "0.4.1"
origin: "???"
commit: "???"
* One more change from PR review
* Fix some paths
* Fix merge conflict messup
* More merge conflict fixes
* And another conflict fix
* And another fix
* Remove reference to removed build files
* Add full path to switch cmake
Co-authored-by: David Chavez <david@dcvz.io>
Co-authored-by: KiritoDev <36680385+KiritoDv@users.noreply.github.com>
Co-authored-by: Jeffrey Crowell <github@crowell.biz>
Co-authored-by: BountyChocolate123456 <101743444+BountyChocolate123456@users.noreply.github.com>
Co-authored-by: sholdee <102821812+sholdee@users.noreply.github.com>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: rozlette <Rozelette@users.noreply.github.com>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>
Co-authored-by: vaguerant <vaguerant@users.noreply.github.com>
Co-authored-by: earthcrafterman <banddstudios@gmail.com>
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
Co-authored-by: qurious-pixel <62252937+qurious-pixel@users.noreply.github.com>
Co-authored-by: Baoulettes <perlouzerie@hotmail.fr>
Co-authored-by: Sirius902 <10891979+Sirius902@users.noreply.github.com>
Co-authored-by: modestposer <modestposer@gmail.com>
Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
Co-authored-by: Stormghetti <56653191+Stormghetti@users.noreply.github.com>
Co-authored-by: Sirius902 <3645979-Sirius902@users.noreply.gitlab.com>
Co-authored-by: MelonSpeedruns <melonspeedruns@outlook.com>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: Dog <5172592+Dog@users.noreply.github.com>
Co-authored-by: Nicholas Estelami <NEstelami@users.noreply.github.com>
Co-authored-by: ChristopherJTrent <ChristopherJTrent@outlook.com>
Co-authored-by: agamache <aaroncgamache@gmail.com>
Co-authored-by: M4xw <m4x@m4xw.net>
* Fixed switch compilation
* Fixed responsive on switch imgui
* Remove config save hook
* Added physical slots into controller name
* Add `ifdef` for switch specific code
* Add `ifdef` for switch specific code
* Added applet mode detection
* Replaced homebrew icon
* Fixed randomness on applet mode view
* Fixed clkrst initialization
* Switch profiles cleanup
* Cleaned code based on dcvz comments
* Remove unused hooks in Mercury
* Fixed compilation
* Use IMGUI_IMPL_OPENGL_LOADER_CUSTOM
* Fix up StormLib modifications
* Handle touch events at ImGui/SDL level
* Enable opening menu with -
* Load Nintendo Switch font
* Updates to window initiation
* Handle virtual keyboard via SDL
* Print OTR missing message to screen
* Rename makefile for Switch
* Some more additional fixes
* Branch creation plus edit
Changed ItemWidth & made label invisible (else issues)
Added a submit button next to the text field
* Removed set_texture_filter on imgui draw
* Readded nintendo switch font
* Fixed randomizer crash
* Fix issue with strdup windows
* [SWITCH] Update Jenkins file (#9)
* [SWITCH] Update Jenkins file
* [SWITCH] Dockerfile.switch
Can be combined with other Dockerfile
* [SWITCH] Add entrypoint file
* Update Jenkinsfile
* [SWITCH] Dockerfile mtab link
link `/proc/self/mounts /etc/mtab`
Co-authored-by: David Chavez <david@dcvz.io>
* Cleaned code based on PR comments
* Fixed switch compilation
* Cleaned full texture cache instead of doing it per char
* Randomizer only saves when its not a vanilla save
* Disabled input when menubar is opened
* Removed return from SetupFont
* Cleaned code based on comments
* Cleaned up random texts on switch error screen
* Killed
* Removed debug and changed compilation flags
Co-authored-by: KiritoDv <nohomoboi01@gmail.com>
Co-authored-by: Felipe Guaycuru <guaycuru@gmail.com>
Co-authored-by: David Chavez <david@dcvz.io>
Co-authored-by: Jeffrey Crowell <github@crowell.biz>
Co-authored-by: BountyChocolate123456 <101743444+BountyChocolate123456@users.noreply.github.com>
Co-authored-by: sholdee <102821812+sholdee@users.noreply.github.com>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: rozlette <Rozelette@users.noreply.github.com>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>
Co-authored-by: vaguerant <vaguerant@users.noreply.github.com>
Co-authored-by: earthcrafterman <banddstudios@gmail.com>
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
Co-authored-by: qurious-pixel <62252937+qurious-pixel@users.noreply.github.com>
Co-authored-by: Baoulettes <perlouzerie@hotmail.fr>
Co-authored-by: Sirius902 <10891979+Sirius902@users.noreply.github.com>
Co-authored-by: modestposer <modestposer@gmail.com>
Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
Co-authored-by: Stormghetti <56653191+Stormghetti@users.noreply.github.com>
Co-authored-by: Sirius902 <3645979-Sirius902@users.noreply.gitlab.com>
Co-authored-by: MelonSpeedruns <melonspeedruns@outlook.com>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: Dog <5172592+Dog@users.noreply.github.com>
Co-authored-by: Nicholas Estelami <NEstelami@users.noreply.github.com>
Co-authored-by: ChristopherJTrent <ChristopherJTrent@outlook.com>
Co-authored-by: agamache <aaroncgamache@gmail.com>
Co-authored-by: M4xw <m4x@m4xw.net>
2022-07-25 21:11:53 -04:00
# endif
2023-11-05 12:34:39 -05:00
}
DetectOTRVersion ( " oot.otr " , false ) ;
DetectOTRVersion ( " oot-mq.otr " , true ) ;
2022-09-03 00:00:04 -04:00
2022-03-21 21:51:23 -04:00
OTRGlobals : : Instance = new OTRGlobals ( ) ;
2022-07-25 22:33:38 -04:00
CustomMessageManager : : Instance = new CustomMessageManager ( ) ;
2022-08-23 20:11:38 -04:00
ItemTableManager : : Instance = new ItemTableManager ( ) ;
2023-12-17 22:19:30 -05:00
GameInteractor : : Instance = new GameInteractor ( ) ;
2023-06-03 15:27:45 -04:00
SaveManager : : Instance = new SaveManager ( ) ;
SohGui : : SetupGuiElements ( ) ;
2023-02-16 09:49:45 -05:00
AudioCollection : : Instance = new AudioCollection ( ) ;
2023-06-01 21:39:50 -04:00
ActorDB : : Instance = new ActorDB ( ) ;
2023-03-02 03:27:28 -05:00
# ifdef __APPLE__
SpeechSynthesizer : : Instance = new DarwinSpeechSynthesizer ( ) ;
SpeechSynthesizer : : Instance - > Init ( ) ;
# elif defined(_WIN32)
SpeechSynthesizer : : Instance = new SAPISpeechSynthesizer ( ) ;
SpeechSynthesizer : : Instance - > Init ( ) ;
# endif
2023-12-17 14:41:33 -05:00
# ifdef ENABLE_REMOTE_CONTROL
CrowdControl : : Instance = new CrowdControl ( ) ;
GameInteractorSail : : Instance = new GameInteractorSail ( ) ;
# endif
2022-03-21 21:51:23 -04:00
clearMtx = ( uintptr_t ) & gMtxClear ;
OTRMessage_Init ( ) ;
2022-06-01 13:06:32 -04:00
OTRAudio_Init ( ) ;
2022-06-15 15:18:41 -04:00
OTRExtScanner ( ) ;
2022-08-23 20:11:38 -04:00
VanillaItemTable_Init ( ) ;
2023-06-03 15:27:45 -04:00
DebugConsole_Init ( ) ;
2022-09-27 22:41:17 -04:00
2023-02-26 19:46:25 -05:00
InitMods ( ) ;
2023-06-01 21:39:50 -04:00
ActorDB : : AddBuiltInCustomActors ( ) ;
2023-12-16 21:40:09 -05:00
// #region SOH [Randomizer] TODO: Remove these and refactor spoiler file handling for randomizer
CVarClear ( " gRandomizerNewFileDropped " ) ;
CVarClear ( " gRandomizerDroppedFile " ) ;
// #endregion
GameInteractor : : Instance - > RegisterGameHook < GameInteractor : : OnFileDropped > ( SoH_ProcessDroppedFiles ) ;
2023-02-15 14:30:34 -05:00
2022-12-08 23:24:39 -05:00
time_t now = time ( NULL ) ;
tm * tm_now = localtime ( & now ) ;
if ( tm_now - > tm_mon = = 11 & & tm_now - > tm_mday > = 24 & & tm_now - > tm_mday < = 25 ) {
2023-01-17 00:17:49 -05:00
CVarRegisterInteger ( " gLetItSnow " , 1 ) ;
2022-12-08 23:24:39 -05:00
} else {
2023-01-17 00:17:49 -05:00
CVarClear ( " gLetItSnow " ) ;
2022-12-08 23:24:39 -05:00
}
2023-05-20 16:25:29 -04:00
srand ( now ) ;
2023-12-17 14:41:33 -05:00
# ifdef ENABLE_REMOTE_CONTROL
SDLNet_Init ( ) ;
if ( CVarGetInteger ( " gRemote.Enabled " , 0 ) ) {
switch ( CVarGetInteger ( " gRemote.Scheme " , GI_SCHEME_SAIL ) ) {
case GI_SCHEME_SAIL :
GameInteractorSail : : Instance - > Enable ( ) ;
break ;
case GI_SCHEME_CROWD_CONTROL :
CrowdControl : : Instance - > Enable ( ) ;
break ;
}
2023-01-18 10:56:32 -05:00
}
2022-09-27 22:41:17 -04:00
# endif
2023-06-12 18:59:23 -04:00
std : : shared_ptr < LUS : : Config > conf = OTRGlobals : : Instance - > context - > GetConfig ( ) ;
conf - > RegisterConfigVersionUpdater ( std : : make_shared < LUS : : ConfigVersion1Updater > ( ) ) ;
2023-11-05 02:57:59 -05:00
conf - > RegisterConfigVersionUpdater ( std : : make_shared < LUS : : ConfigVersion2Updater > ( ) ) ;
2023-06-12 18:59:23 -04:00
conf - > RunVersionUpdates ( ) ;
2022-03-21 21:51:23 -04:00
}
2023-06-03 15:27:45 -04:00
extern " C " void SaveManager_ThreadPoolWait ( ) {
SaveManager : : Instance - > ThreadPoolWait ( ) ;
}
2022-08-02 20:30:39 -04:00
extern " C " void DeinitOTR ( ) {
2023-06-03 15:27:45 -04:00
SaveManager_ThreadPoolWait ( ) ;
2022-08-02 20:30:39 -04:00
OTRAudio_Exit ( ) ;
2023-12-17 14:41:33 -05:00
# ifdef ENABLE_REMOTE_CONTROL
if ( CVarGetInteger ( " gRemote.Enabled " , 0 ) ) {
switch ( CVarGetInteger ( " gRemote.Scheme " , GI_SCHEME_SAIL ) ) {
case GI_SCHEME_SAIL :
GameInteractorSail : : Instance - > Disable ( ) ;
break ;
case GI_SCHEME_CROWD_CONTROL :
CrowdControl : : Instance - > Disable ( ) ;
break ;
}
}
SDLNet_Quit ( ) ;
2022-11-06 05:00:34 -05:00
# endif
2023-06-03 15:27:45 -04:00
// Destroying gui here because we have shared ptrs to LUS objects which output to SPDLOG which is destroyed before these shared ptrs.
SohGui : : Destroy ( ) ;
OTRGlobals : : Instance - > context = nullptr ;
2022-08-02 20:30:39 -04:00
}
2022-05-11 13:18:24 -04:00
# ifdef _WIN32
2022-03-21 21:51:23 -04:00
extern " C " uint64_t GetFrequency ( ) {
LARGE_INTEGER nFreq ;
QueryPerformanceFrequency ( & nFreq ) ;
return nFreq . QuadPart ;
}
extern " C " uint64_t GetPerfCounter ( ) {
LARGE_INTEGER ticks ;
QueryPerformanceCounter ( & ticks ) ;
return ticks . QuadPart ;
}
2022-05-11 13:18:24 -04:00
# else
extern " C " uint64_t GetFrequency ( ) {
return 1000 ; // sec -> ms
}
extern " C " uint64_t GetPerfCounter ( ) {
struct timespec monotime ;
clock_gettime ( CLOCK_MONOTONIC , & monotime ) ;
uint64_t remainingMs = ( monotime . tv_nsec / 1000000 ) ;
// in milliseconds
return monotime . tv_sec * 1000 + remainingMs ;
}
# endif
2022-03-21 21:51:23 -04:00
2023-05-21 18:35:56 -04:00
extern " C " uint64_t GetUnixTimestamp ( ) {
auto time = std : : chrono : : system_clock : : now ( ) ;
auto since_epoch = time . time_since_epoch ( ) ;
auto millis = std : : chrono : : duration_cast < std : : chrono : : milliseconds > ( since_epoch ) ;
2024-02-01 20:25:57 -05:00
return ( uint64_t ) millis . count ( ) ;
2023-05-21 18:35:56 -04:00
}
2022-03-21 21:51:23 -04:00
// C->C++ Bridge
extern " C " void Graph_ProcessFrame ( void ( * run_one_game_iter ) ( void ) ) {
2023-05-07 20:18:54 -04:00
OTRGlobals : : Instance - > context - > GetWindow ( ) - > MainLoop ( run_one_game_iter ) ;
2022-03-21 21:51:23 -04:00
}
2023-12-04 08:33:14 -05:00
extern bool ToggleAltAssetsAtEndOfFrame ;
2023-04-27 19:20:41 -04:00
2022-04-29 16:17:07 -04:00
extern " C " void Graph_StartFrame ( ) {
2022-08-14 22:57:24 -04:00
# ifndef __WIIU__
2023-05-07 23:01:12 -04:00
using LUS : : KbScancode ;
2023-05-07 20:18:54 -04:00
int32_t dwScancode = OTRGlobals : : Instance - > context - > GetWindow ( ) - > GetLastScancode ( ) ;
OTRGlobals : : Instance - > context - > GetWindow ( ) - > SetLastScancode ( - 1 ) ;
2022-05-12 13:28:24 -04:00
2023-04-27 19:20:41 -04:00
switch ( dwScancode ) {
case KbScancode : : LUS_KB_F5 : {
2023-08-20 14:00:04 -04:00
if ( CVarGetInteger ( " gSaveStatesEnabled " , 0 ) = = 0 ) {
LUS : : Context : : GetInstance ( ) - > GetWindow ( ) - > GetGui ( ) - > GetGameOverlay ( ) - >
TextDrawNotification ( 6.0f , true , " Save states not enabled. Check Cheats Menu. " ) ;
return ;
}
2022-05-12 13:28:24 -04:00
const unsigned int slot = OTRGlobals : : Instance - > gSaveStateMgr - > GetCurrentSlot ( ) ;
const SaveStateReturn stateReturn =
OTRGlobals : : Instance - > gSaveStateMgr - > AddRequest ( { slot , RequestType : : SAVE } ) ;
switch ( stateReturn ) {
case SaveStateReturn : : SUCCESS :
SPDLOG_INFO ( " [SOH] Saved state to slot {} " , slot ) ;
break ;
case SaveStateReturn : : FAIL_WRONG_GAMESTATE :
SPDLOG_ERROR ( " [SOH] Can not save a state outside of \" GamePlay \" " ) ;
break ;
[[unlikely]] default :
break ;
}
break ;
}
2023-04-27 19:20:41 -04:00
case KbScancode : : LUS_KB_F6 : {
2023-08-20 14:00:04 -04:00
if ( CVarGetInteger ( " gSaveStatesEnabled " , 0 ) = = 0 ) {
LUS : : Context : : GetInstance ( ) - > GetWindow ( ) - > GetGui ( ) - > GetGameOverlay ( ) - >
TextDrawNotification ( 6.0f , true , " Save states not enabled. Check Cheats Menu. " ) ;
return ;
}
2022-05-12 13:28:24 -04:00
unsigned int slot = OTRGlobals : : Instance - > gSaveStateMgr - > GetCurrentSlot ( ) ;
slot + + ;
if ( slot > 5 ) {
slot = 0 ;
}
OTRGlobals : : Instance - > gSaveStateMgr - > SetCurrentSlot ( slot ) ;
SPDLOG_INFO ( " Set SaveState slot to {}. " , slot ) ;
break ;
}
2023-04-27 19:20:41 -04:00
case KbScancode : : LUS_KB_F7 : {
2023-08-20 14:00:04 -04:00
if ( CVarGetInteger ( " gSaveStatesEnabled " , 0 ) = = 0 ) {
LUS : : Context : : GetInstance ( ) - > GetWindow ( ) - > GetGui ( ) - > GetGameOverlay ( ) - >
TextDrawNotification ( 6.0f , true , " Save states not enabled. Check Cheats Menu. " ) ;
return ;
}
2022-05-12 13:28:24 -04:00
const unsigned int slot = OTRGlobals : : Instance - > gSaveStateMgr - > GetCurrentSlot ( ) ;
const SaveStateReturn stateReturn =
OTRGlobals : : Instance - > gSaveStateMgr - > AddRequest ( { slot , RequestType : : LOAD } ) ;
switch ( stateReturn ) {
case SaveStateReturn : : SUCCESS :
SPDLOG_INFO ( " [SOH] Loaded state from slot {} " , slot ) ;
break ;
case SaveStateReturn : : FAIL_INVALID_SLOT :
SPDLOG_ERROR ( " [SOH] Invalid State Slot Number {} " , slot ) ;
break ;
case SaveStateReturn : : FAIL_STATE_EMPTY :
SPDLOG_ERROR ( " [SOH] State Slot {} is empty " , slot ) ;
break ;
case SaveStateReturn : : FAIL_WRONG_GAMESTATE :
SPDLOG_ERROR ( " [SOH] Can not load a state outside of \" GamePlay \" " ) ;
break ;
[[unlikely]] default :
break ;
}
break ;
}
2023-05-05 02:38:54 -04:00
# if defined(_WIN32) || defined(__APPLE__)
2023-04-27 19:20:41 -04:00
case KbScancode : : LUS_KB_F9 : {
2023-03-02 03:27:28 -05:00
// Toggle TTS
CVarSetInteger ( " gA11yTTS " , ! CVarGetInteger ( " gA11yTTS " , 0 ) ) ;
2023-04-27 19:20:41 -04:00
break ;
}
2023-05-05 02:38:54 -04:00
# endif
2023-04-27 19:20:41 -04:00
case KbScancode : : LUS_KB_TAB : {
2023-12-04 08:33:14 -05:00
ToggleAltAssetsAtEndOfFrame = true ;
2023-04-27 19:20:41 -04:00
break ;
2023-03-02 03:27:28 -05:00
}
2022-05-12 13:28:24 -04:00
}
2022-08-14 22:57:24 -04:00
# endif
2023-12-16 21:40:09 -05:00
if ( CVarGetInteger ( " gNewFileDropped " , 0 ) ) {
std : : string filePath = SohUtils : : Sanitize ( CVarGetString ( " gDroppedFile " , " " ) ) ;
if ( ! filePath . empty ( ) ) {
GameInteractor : : Instance - > ExecuteHooks < GameInteractor : : OnFileDropped > ( filePath ) ;
}
CVarClear ( " gNewFileDropped " ) ;
CVarClear ( " gDroppedFile " ) ;
}
2023-05-07 20:18:54 -04:00
OTRGlobals : : Instance - > context - > GetWindow ( ) - > StartFrame ( ) ;
2022-08-21 21:08:01 -04:00
}
void RunCommands ( Gfx * Commands , const std : : vector < std : : unordered_map < Mtx * , MtxF > > & mtx_replacements ) {
for ( const auto & m : mtx_replacements ) {
gfx_run ( Commands , m ) ;
gfx_end_frame ( ) ;
}
2022-04-29 16:17:07 -04:00
}
2022-03-21 21:51:23 -04:00
// C->C++ Bridge
extern " C " void Graph_ProcessGfxCommands ( Gfx * commands ) {
2022-04-18 05:37:47 -04:00
{
std : : unique_lock < std : : mutex > Lock ( audio . mutex ) ;
audio . processing = true ;
}
Nintendo switch support (#935)
* Moved gfx effects to the gpu and removed loadtexbyname on some textures
* Readded empty if
* Added nintendo switch support
* Fixed compilation errors and window closing issue on linux
* Fixed kaleido on 64 bit
* Fixed audio on nintendo switch
* Implemented performance mode switcher
* Added suggestions from pr review
* Fixed ftruncate errors
* Fixed compilation errors
* Added missing include rule
* Fixed libstorm path
* Removed ftruncate extern to use a correct posix version
* Merge branch 'develop' from HarbourMasters into znx (#3)
* Add Support for macOS (#441)
* Fixed soh filters
* add more makefile changes
* almost ready
* more updates
* update
* update
* Update Makefiles to handle both platforms
* Allow for overriding the CXX and CC executables
* Restore original structure while supporting custom CXX flags
* Remove some platform specific libs
* Dynamic target name
* Make X11 paths package-agnostic
* Remove changes to `gfx_opengl.cpp`
* Use OpenGL2 on MacOS instead of OpenGL3
* make it actually render something
* render at least the first texture, still need to figure out the second
one
* Let’s use OpenGL 3 again
* maybe this works to get the right texture? link's eyes still look off a bit
* did this work?
* set the platform to macos
* actual numbers are right, but logic is ugly XXX/TODO, i know
* add zlib to ldflags for ZAPDUtils
* A bit of cleanup
* Revert unneeded changes
* Remove GL_CHECK
* Fix issues with z64 branch
* use an std::map instead of a giant array
* three point filter fix (#2)
* Fix mac compilation
* fix audio for 64 bit
* revert audio heap size, keep bigger pools
* Add more Apple specific checks to our modifications
* Add building instructions for macOS
* Remove unecessary step from building instructions
* Add missing SDL2 & GLEW to Linux LDLIBS
* Update BUILDING.md
Co-authored-by: BountyChocolate123456 <101743444+BountyChocolate123456@users.noreply.github.com>
* Update soh/.gitignore to include other arch binaries
Co-authored-by: BountyChocolate123456 <101743444+BountyChocolate123456@users.noreply.github.com>
* Use right platform name for debugging window
Co-authored-by: BountyChocolate123456 <101743444+BountyChocolate123456@users.noreply.github.com>
* Fix stormlib on macos (arm64)
* Simplify some of the ifdef checks
* Revert an older no longer necessary fix
* Remove remaining unecessary deviations
* Update building instructions after StormLib changes
* Feature: Use OpenGL 4.1 (#1)
* Further tweak the BUILDING
* Tidy up
* reword -j message
* Add Jenkins CI Support (#2)
* Fix type issues
* add target <appbundle> and <filledappbundle>
add makefile targets to create an .app
`filledappbundle` creates the target with the .otr included
this should perhaps be moved to Application Support though
* pull gcc's rpath from otool output
* move make target to the end so it's not default
* Add Jenkins and make exe in par with other platforms
* Actually save build artefacts
* Fix artefact path
* Remove x11 mentions and linking (not used)
* Update building instructions for generating app
* use appsupport directory
* Add new app icon
* Update target to match macOS types
* Update more audio types
* fix null deref in Audio_PlayFanfare
* Remove old import from z64
* address final nit with apple ifdefs
Co-authored-by: KiritoDev <36680385+KiritoDv@users.noreply.github.com>
Co-authored-by: Jeffrey Crowell <github@crowell.biz>
Co-authored-by: BountyChocolate123456 <101743444+BountyChocolate123456@users.noreply.github.com>
* Move macOS to parallel stage
* fix linux crash
* Ignore all named saves
Necessary after new save format
* DPad items
* Move UI location arrays from static to global to accomodate customizable UI
* FIX: Increased the maximum actor limit for draw distance
Fix issue #529
* FIX: Remove duplicates of gNewDrops from the enhancements menu
* Get rid of erroneous int casts
* casts jya_cobra's shadowTexture pointer to uintptr_t instead of s32.
* Fix ability to assign equipment you don't own
* Fix title cards for market potion shop and bombchu shop
* Invalidate message item icon texture before drawing
* Add margins for dpad
* Fixed some instances where the original OOT save is erroneously preserved or recreated, leading to another conversion next time you launched the game
* Headphones setting in game should now work.
Resolves #13
* Map Select name fixes
* Change Power to Upgrades
* Rename Soh* files
* Update names
* Add more files
* Add more files
* Add toggles for disabling heart drops and random drops (#507)
* Adds toggles for disabling random drops and fixed heart drops
* Changed the "No Fixed Heart Drops" toggle to the more useful "No Random Heart Drops" toggle
* Adds an explanation that the no heart drops option is similar to Hero Mode
* Moved difficulty options into their own sub-menu
Moved time saver options into their own sub-menu
Moved clutter reducing options into their own sub-menu
* fixed the tag name of mweep speed
* Moved Skip Text to Experimental
* Fix testing masks of DPad
* Fix audio, boot commands, and save staes.
* add menu from https://github.com/PurpleHato/Shipwright/tree/ResetMenu
* implement reset
* Update README.md
* command on mac
* special char doesn't work with default imgui font
* change name based on PR comment
* missed a couple spots
* change sunset in save editor so dampe is out
* Update to latest `docking` imgui (#582)
* Update to latest `docking` imgui
commit: 67410d53f739b6a0df138e2252f0e5136b42062f
* Fix modified import for SDL
* Update imgui_impl_sdl.cpp
* Add Imgui include path for better imports
* Controller Navigation Fix-Up (#544)
* Controller Navigation Fix-Up
* [MISC] Fix typo
* Use Macro for __FILE__ & __LINE__ when possible (#559)
* First batch some overlay
* Almost all overlay
* effect & gamestate
* kaleido stuffs
* more overlay
* more left over from code folder
* remaining hardcoded line and file
* Open & Close _DISP __FILE__ & __LINE__ clean up
* Some if (1) {} remove
* LOG_xxxx __FILE__ , __LINE__ cleaned
* ASSERT macro __FILE__ __LINE__
* mtx without line/file in functions
* " if (1) {} " & "if (0) {}" and tab/white place
* LogUtils as macro
* GameState_, GameAlloc_, SystemArena_ & ZeldaArena_
* Revert "GameState_, GameAlloc_, SystemArena_ & ZeldaArena_"
This reverts commit 0d85caaf7e342648c01a15fe21e93637352dc596.
* Like last commit but as macro
* Fix matrix not using macros
* use function not macro
* DebugArena_* functions
GameAlloc_MallocDebug
BgCheck_PosErrorCheck as macros
removed issues with ; in macro file
* MM Bunny Hood enhancements: no age restrictions & wear across entrances (#560)
* Remove age restriction on MM Bunny Hood
* Handle mask slot changing; init Link wearing mask
* Reset mask state after selling
* Use unordered maps in some hot paths (#566)
* Use unordered maps in some hot paths
* Address PR comments
* Cheat: Infinite Epona Boost (#577)
* Cheat: Infinite Epona Boost
* Edit for readability
* update pulseaudio for 44.1khz audio (#587)
* use pulseaudio defaults
* spaces/tabs
* pulseaudio values tuned for n64 audio at 44.1khz
* update tlength
* remove one hardcoded samplerate
Co-authored-by: briaguya <briaguya@alice>
* Restoration Item Sliders (#595)
* Allows players to set custom restoration values for potions and milk
* Fixed a dumb oversight
* implemented fairy sliders
* use ini window resolution (#410)
* use ini window resolution
* use arguments for directx window size
* default 640x480 not 320x240
* kick off a build
* and revert
* default config 640x480 not 320x240
* add todo
Co-authored-by: briaguya <briaguya@alice>
* 3D Drops & Projectiles update (#548)
* Fix remaining rupee and keys
* fix tabs -> spaces
* more fix about tabs -> spaces
* Better up <-> down mouvement for hearts
* remove useless comment
* Cosmetics menu rework (#589)
* -
* DPad/some margin fix(left side)
* various ImGui stuff and fixes
* disabled kaleido menu (non working)
* fix win being dumb
* same for C btn this time
* Fix windows build
* Beating hearts fix
* Default win size and some placement fix
* Fix Dpad Ammo & C notes, Kaleido, white dog
* some texts fix and tab move
* Add stone of agony, some fixes and build correctly
* precise item place with Dpad
* Gamecube -> GameCube
Co-authored-by: Baoulettes <iMacWin10>
* [CI] Create an Appimage for 64bit builds (#570)
* [CI] Create AppImage file
* [CI] Updated Jenkinsfile
* [MISC] fix indentation
* [MISC] Fix indentation
* [MISC] Fix indentation
* [CI] 7z appimage and readme
* [CI] AppImage icon file (#597)
* [CI] Add patchelf
* [BUILD] Include Hi-Res icon
* Fix portability use of std::clamp (#596)
* Add N64 weird frames and OOB Bombchus cvars (#602)
* Add gN64WeirdFrames and gBombchuOOB cvars
* Rename gBombchuOOB to gBombchusOOB
* Fix pipeline
* [BUILD] Do not strip ZAPD (#598)
* [BUILD] Do not strip ZAPD
* [BUILD] Reuse Icon Asset
* [APPIMAGE] Handle paths with spaces
* [macos] Distribute optimized builds (#599)
* Cosmetics texts fixes (#604)
* branch init + few fixes
* Reset button
* Several texts fixes and default color to GameCube
* space issues
* some more extra space that was not needed.
* space yes last time ...
* Arrows being able to be rainbow some more texts fixes
* more texts fixes
* c-buttons some plurial fix
* Fixes bug in demo effect due to removed display list set.
* King dodongo room crash (#613)
* first attempt
* force camera setting to be at least 0 (dirty!)
* -
* reverted something to just include fix
* Invalidate text box icon before drawing (#607)
* [APPIMAGE] Set lib path for ZAPD (#611)
* New drop runtime fix (#614)
* inital rework
* fixed default rotation for 2D sprites
* fix tab/space issues
* Fix Ganon's Castle title cards (#606)
* Checkered room crash workaround (#615)
* Increase poly and vertex count for dyna actors
* Add TODO
* Only apply fix in Forest Temple
* Enable globally
* Match case of 'Shipwright' in Linux build (#619)
* Fix 0xabababab crash (#617)
* Unconditionally setup the normal skybox
* Only call Skybox_Setup once ever
* Equipment upgrade text fix and any pause slot enhancement fix (#620)
* Fix upgrade name text not rendering
* Use cvar and don't render equip help for empty item slots
* Fix rendering logic
* Fix incorrect item name rendered for one frame
* Reorder comparison
* Remove extra indent
* Remove accidental changes
* ImGui grammer, consistency, and clarity fixes (#625)
* ImGui grammer, consistency, and clarity fixes
Co-Authored-By: Stormghetti <56653191+Stormghetti@users.noreply.github.com>
* Adds more new lines for users on smaller displays
Co-Authored-By: Stormghetti <56653191+Stormghetti@users.noreply.github.com>
Co-authored-by: Stormghetti <56653191+Stormghetti@users.noreply.github.com>
* New drops shadows & rotation fixes (#627)
* fixes
* forgot to add heart pieces in rotation logic
* Dodongo's Cavern blue warp crash fix (#622)
* Doodong's Cavern blue warp crash fix
* >= not >
* Don't waste a line of space
* add support for clang compiler (#592)
* hacks to align strings for clang... wow just wow
* start work to getting built with clang
* fix issues with struct constructors, all builds, doesn't link still
* fix some narrowing issues that clang complains about
* fix compliation of zapd
* fix null deref in VersionInfo
* builds with clang
* make stringbuilding use StringHelper instead of addition
* fix linking
* add CLANG SHIP overlay on clang built versions
* doesn't need to be volatile
* mark unknown strings as extern
* rename some stuff
* can't align extern
* hopefully fix compilation for everythign
* expandtab
* allow setting LD
* Revert "allow setting LD"
This reverts commit 711aba6db2c41bab476bd34e878af6a37a7f5559.
maybe to use lld it should be a LDFLAG?
* -Wno-deprecated-declarations is required for newer versions of clang
on macOS 13 beta sdk, the version of apple clang requires this
* Add jenkins support for clang
* Forward CXX flags to stormlib compilation
* Move GCC only flags to check
* use exports to set multiarch setup
* Fix Jenkins forever
* use make instead of cmake --build
add some flags to build with clang-11 as well
* address review coments
- rework extraction to allow multi thread
- misc readability cleanup
* update makefile to add WARN on linux+clang
Co-authored-by: David Chavez <david@dcvz.io>
* Fix develop
* Fixes grey screen issue + tooltip for 2 handed shield
* Don't close controller after SDL has quit (#642)
* Don't close controller after SDL has quit
* Don't check if controller can rumble if null
* Fixes Barinade's set whenever boss fight is reloaded (#639)
* Reimplements unused Barinade reset function.
* Removes the Jellyfish from Barinade's body on reset.
* add the ability to pull graves during the day (#637)
* change max internal res multiplier to 3x, use float and % instead of int (#638)
* change max internal res multiplier to 3x, use float and % instead of int
* Update libultraship/libultraship/ImGuiImpl.cpp
Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>
* Fixes crash on Biggoron trade failure screen wipe
Resolves #621
* fixes center docking (#652)
* testing out item replacement (#416)
* skip learning song of storms
* don't set flag when getting goron tunic as child
* Initiates prelude check when master sword unloads.
Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again.
* Stops Shadow Temple lore prompts from appearing in rando.
* Skips cutscene of royal tomb explosion in rando.
Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here.
* Improves visual of exploding gravestone.
* Adds some comments explaining the rando differences
* Skip ruto text box in jabu blue warp
For rando
* skip intro cutscene in dodongo's cavern
* load spoiler files on boot, fix spoilerfile existing check when making new saves
* name entry dropped spoiler logic
* make sure to actually init the cvar
* no chime on load
* uncomment
* Skip ganondrof cutscene
Skip to scream part of the death animation, skipping the text boxes etc. For rando
* Update z_boss_ganondrof.c
* skip owl flight cutscenes in rando
* Fixes skipped text so it only applies to shadow temple.
Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors.
* Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case.
* TEST: Text for item
* Adding ganon flavor text
* ADD: AMMO Count
* format ganon text/hint text
* Autoskip the tower cutscene if settings call for tower collapse.
* ganon hint text logic
* Improved prelude after time travel fix
* swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things.
* this is all i did
* not the cleanest code ever but it's working
* ADD: GS Count
* ADD: Wallter (crash for now)
* TWEAK: Wallet check
* FIX: Use DrawItem instread of DrawUpgrade... b-baka!
* Fixes some vanilla bugs introduced by rando code.
* Added cutscene skip for zelda escaping
Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger
* ADD: X Spacing + Placeholders for song
* ADD: default case for items
* TWEAK: Spacing
* FIX: Light Arrow
* ADD: Ammo Option
* use groups instead
* ADD: More spacing logic
* songs and names
* TWEAK: Color on wallet
* colors
* Added flags cutscene before nabooru fight
* ADD: ChromaKey text
* First attempt skip cs after nabooru defeat
* Better implementation for specific rando cutscene skips
* use pulseaudio defaults
* spaces/tabs
* move color push/pop to stop crash
* make the colors work again
* the real bottle fix
* pulseaudio values tuned for n64 audio at 44.1khz
* update tlength
* remove one hardcoded samplerate
* Cleaned up and fixed zelda escape skip
The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of.
* Revert one line to match original
nothing functional
* another hint line that breaks autonewline logic
* don't autospawn epona if we don't have the song/ocarina
* Trying to use iron knuckle death effects
not working yet
* Streamlined OoT cutscene skip for future additions
Also cleaned up if statement in general
* Made if statement more readable
Also added clarity for what cutscene was skipped
* Fixed typo in comment
* Janky nabooru defeat cs skip
* altar text formatting (gonna need help shortening some of the french ones)
* more altar text formatting
* english altar text formatting complete
* make gtg blocking guard check for card not bridge
* FIX: Typo!
* FIX: Uppercases
* FIX: Typo
* TWEAK: Alter + some names
* TWEAK: More caps!
* ADD: Missing string
TWEAK more uppercases and namefixe
s
* Hide nabooru death by covering her in flames
* bandaid fix for death crash issue
* Twinrova defeat cs skip
Skips the animation and manually calls the function to show the "beam" around the sisters
* fix crash
* fix caps to match
* fix great fairy reward mashing/shielding issue
* TWEAK : Typo clé to Clé
* TWEAK: Some Altar hints
TWEAK: Some capitals
* TWEAK: Unmatching text + some cap again
* TWEAK: More tweaks
* fix build
* remove extra json.hpp, add hint
* Update randomizer_item_tracker.cpp
* TWEAK: Double Defense with RedParticles instead of white
* make sure we don't optimize out the check to ensure a spoilerfile exists
* vanilla ganon boss key hint formatting
* TWEAK: FR- better way of the hero text
* fix
* and again
* Initializes dungeonsDone items in gSaveContext to 0.
* Replaces sizeof calculation with a NUM_DUNGEONS constant.
* Fixes Saria's Gift on the LW Bridge from getting killed when holding shield.
* More airtight fix for Saria's Gift on the Bridge.
* Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId.
* Invalidate text box icon before drawing
* Fixes the case where Saria's gift is an Ice Trap.
We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine.
* Initial commit
Might need changing when we change the settings in the future
* Fixes Door of Time opening cutscene after warping with prelude.
* Initial waterfall skip
Very rudimentary way of doing things but it seems to work so :shrug:
* inital rework
* fixed default rotation for 2D sprites
* fix tab/space issues
* 3d drops rando merge fix again
* Allows Impa to appear in the Lullaby check post drawbridge escape.
* Changes Ganon's Trials Count setting to a checkbox
The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed.
* Sets all Ganon's Trials to incomplete in new saves.
Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131
* fix castle guards when oot throw cutscene has already played in rando
* Properly removes the beams when trials are cleared.
* Removes Question Mark from Skip Ganon's Trials UI.
* Adds a todo comment about when to change back to slider.
* make deku seeds check for bullet bag
* Various tweaks
TWEAK: Altar Text
TWEAK: Hint names
TWEAK: Replace more problematic œ to oe
* upgrade ocarina on both child and adult equips
* FIX: Jabu Item
* update equipped hookshot/longshot when obtained as other age
* add hint
* don't give the bgs check without the claim check
* Skips Darunia Cutscene in Fire Temple
* Added a TODO note about not skipping the cutscene.
There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch.
* remove todo
* restore fast ocarina option in imgui that was lost in merge
* Fixes grey screen issue + tooltip for 2 handed shield
* update to use dg instead of g for textures in item tracker
* TWEAK: Default color for cosmetic RAND button was not the corect one
* fix texture crash, remove unused item tracker code
* don't open mask shop until we get zelda's letter
* Update README.md
* Prevents "correct" chime under incorrect conditions.
* Fixes typo in conditional and adds "bonk" sound effect.
"Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time.
* remove modify dpad equips toggle, replace with checks for dpad menu
* remove extra check
* add ability to hold c-up to assign to dpad when dpad menuing is enabled
* disable d-pad navigation on item menu when holding c-up to equip
* dpad+c-up stuff for equipment menu
* ADD: Checbox for songs colors
* TWEAK: RandoColors for normal songs
* kind of quick and dirty but it works
* TWEAK: Clarity of the tooltip
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Dog <5172592+Dog@users.noreply.github.com>
Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com>
Co-authored-by: Baoulettes <perlouzerie@hotmail.fr>
Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
* Cosmetics hotfixes (#640)
* Initial branch creation
* Revert Main Game so it do not conflict later
* should fix window build, made namespace for Cosmetics
* forgot to edit one title
* Ability to add hidden window (usefull for Rainbow)
Fix building issues
* Line break, unused bool remove
* add descriptive todo for death crash bandaid (#655)
Co-authored-by: briaguya <briaguya@alice>
* Removed legacy audio mode and fixed ganon sound bug (#657)
* Free Camera (#337)
* wip free cam
* Almost done, needs collision still
* Added free cam behind cvar
* added WIP collision
* Fixed & implemented "Manual mode" from WW & TP
* Fixed camera not rotating when Link is moving
* fixed initialized camera rotation
* Fixed camera getting stuck + made it smoother
* reduced deadzone
* fixed epona camera height + added WW z-target free camera
* Adjusted player camera height & fixed fov
* Fixed camera roll
* fixed fov when moving the camera while in z-target
* Camera resets to Auto when going through doors or changing maps
* Fixed building
* touch
* more touch work
* Added WIP mouse support to the free cam
* gui stuff
* fixed building
* fixed building error
* ok fixed building for real this time
* oops
* Fix compilation issues
* removed mouse stuff that magically appeared in this branch
* smoothed out stick values & removed remains of mouse support
* re-added manual camera when pressing Z
* reduced minimum Y position of camera
* Addressed dcsv's nitpicks
* part 2
* oops
Co-authored-by: David Chavez <david@dcvz.io>
* Rando: Allows Malon's Item Check to be obtained by pulling out the Ocarina. [FIXED PR] (#672)
* Fixes using the Ocarina to get the check from Malon.
Still some cleanup to do here. For some reason the player can shield before receiving the check. It doesn't set the flag if the player does that so they can still try again, but would prefer a different solution if possible.
* Prevents Shielding from blocking the Item_Give from happening.
* Code Cleanup and comments explaining the new rando flow.
* Removes inventory check when pulling out Ocarina
This allows OI to properly give the check, which is important for Glitched logic later down the line. Talking to Malon still requires the Ocarina in your inventory.
* Prevents non-malon textboxes from triggering the check.
Also adds a comment explaining the condtional for getting the check from talking to Malon since it got pretty long.
* Actually fixes checking for text boxes.
* Relocates a comment for improved clarity.
* Fix Rando Water Temple Softlock (#665)
We use 3DS logic to generate item placement, but didn't have this specific door in Water Temple unlocked from the beginning like 3DS does.
This meant that if people took specific paths through the temple, they could softlock themselves by missing a key.
* Rando: GtG and carpenter prompts skip (#663)
* Skip gtg and carpenter prompt
For rando. Tested and just works.
* Fixed missing break
* Hide debug overlay behind gDebugEnabled (#660)
* Introduce App Directory Path (#572)
* Introduce app directory path concept
* macos: Remove hacky way of using applicaiton directory
* Update the new SaveManager
* Address stack user after return
* Remove unecessary property
* Use std::string for filepath
* Improve clang specific detections
* Use new path system for imgui files
* Improve helper for getting relative paths
* fix hidden wnd (#744)
* Split damage multiplication into its own PR (#656)
* Split damage multiplication into its own PR
* Found a more elegant implementation of the powers char*[]
* Fixes Maps, Compasses, and Boss Keys in Vanilla. (#751)
* .xiF slebaL
* Update Keese labels
* Fixed soundfont issues
* Skip warp song cutscenes in rando (#664)
Does it by skipping to the last part of the cutscene data. Tested on all songs, both adult and child.
* don't spawn blocking mido after we've already shown him the sword/shield (#675)
Co-authored-by: briaguya <briaguya@alice>
* Controller Configuration UI and JSON Config (#760)
* Initial controller hud ui
* Reverted fbdemo changes
* Moved config to json and implemented controller config
* fix build on linux, gitignore new config file
* fix build
* Fix compilation and file directory paths
* Call save on cvar save
* Fixed cvar loading and added deck slots to the config
* Changed control deck port 0 to use a physical device by default
* Added gyro and rumble & fixed loading errors
* Save config on toggle menubar
* fix linux build
* Fixed drift calculation
* Controller config now saves when pressing F1
* Removed ExitGame hook from ImGuiImpl
* Moved mappings to a map
* Added GetKeyName
* untranslate scancodes
* Fixed hud layout on keyboard device
* Fixed keyboard read on hud
* Fixed crash when reloading controllers
* Removed ConfigFile and changed file extension
* Changed Dummy to Disconnected and fixed filters
* Removed function leftover
* Changed ControllerHud to InputEditor
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: David Chavez <david@dcvz.io>
* Enough! My ship sails in the morning.
* Fixed menubar items position (#763)
* Fixed menubar items position
* Reverted tooltip tab position
* Fixes macOS randomizer functionality with App Directory (#761)
* Fixes macOS randomizer functionality with App Directory
* Fix windows build
* Update soh/soh/Enhancements/randomizer/3drando/rando_main.cpp
* Update soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp
* Revert band-aid fix
Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>
* Fix migration cvar deletion path (#765)
* Various controller fixes (#771)
* Fix controller
* Also fix rumble strength being a bool
* Remove ControllerHud.cpp
* Downgrade platform toolset back to previous version
* Fix gyro
* Fix bug that makes binding axes difficult and clear buttons before reading
* Exaggerate gyro display and adjust stick binding threshold
* Initialize drift thresholds
* git subrepo push soh
subrepo:
subdir: "soh"
merged: "75ccbade8"
upstream:
origin: "https://github.com/HarbourMasters/soh.git"
branch: "master"
commit: "75ccbade8"
git-subrepo:
version: "0.4.1"
origin: "???"
commit: "???"
* One more change from PR review
* Fix some paths
* Fix merge conflict messup
* More merge conflict fixes
* And another conflict fix
* And another fix
* Remove reference to removed build files
* Add full path to switch cmake
Co-authored-by: David Chavez <david@dcvz.io>
Co-authored-by: KiritoDev <36680385+KiritoDv@users.noreply.github.com>
Co-authored-by: Jeffrey Crowell <github@crowell.biz>
Co-authored-by: BountyChocolate123456 <101743444+BountyChocolate123456@users.noreply.github.com>
Co-authored-by: sholdee <102821812+sholdee@users.noreply.github.com>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: rozlette <Rozelette@users.noreply.github.com>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>
Co-authored-by: vaguerant <vaguerant@users.noreply.github.com>
Co-authored-by: earthcrafterman <banddstudios@gmail.com>
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
Co-authored-by: qurious-pixel <62252937+qurious-pixel@users.noreply.github.com>
Co-authored-by: Baoulettes <perlouzerie@hotmail.fr>
Co-authored-by: Sirius902 <10891979+Sirius902@users.noreply.github.com>
Co-authored-by: modestposer <modestposer@gmail.com>
Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
Co-authored-by: Stormghetti <56653191+Stormghetti@users.noreply.github.com>
Co-authored-by: Sirius902 <3645979-Sirius902@users.noreply.gitlab.com>
Co-authored-by: MelonSpeedruns <melonspeedruns@outlook.com>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: Dog <5172592+Dog@users.noreply.github.com>
Co-authored-by: Nicholas Estelami <NEstelami@users.noreply.github.com>
Co-authored-by: ChristopherJTrent <ChristopherJTrent@outlook.com>
Co-authored-by: agamache <aaroncgamache@gmail.com>
Co-authored-by: M4xw <m4x@m4xw.net>
* Fixed switch compilation
* Fixed responsive on switch imgui
* Remove config save hook
* Added physical slots into controller name
* Add `ifdef` for switch specific code
* Add `ifdef` for switch specific code
* Added applet mode detection
* Replaced homebrew icon
* Fixed randomness on applet mode view
* Fixed clkrst initialization
* Switch profiles cleanup
* Cleaned code based on dcvz comments
* Remove unused hooks in Mercury
* Fixed compilation
* Use IMGUI_IMPL_OPENGL_LOADER_CUSTOM
* Fix up StormLib modifications
* Handle touch events at ImGui/SDL level
* Enable opening menu with -
* Load Nintendo Switch font
* Updates to window initiation
* Handle virtual keyboard via SDL
* Print OTR missing message to screen
* Rename makefile for Switch
* Some more additional fixes
* Branch creation plus edit
Changed ItemWidth & made label invisible (else issues)
Added a submit button next to the text field
* Removed set_texture_filter on imgui draw
* Readded nintendo switch font
* Fixed randomizer crash
* Fix issue with strdup windows
* [SWITCH] Update Jenkins file (#9)
* [SWITCH] Update Jenkins file
* [SWITCH] Dockerfile.switch
Can be combined with other Dockerfile
* [SWITCH] Add entrypoint file
* Update Jenkinsfile
* [SWITCH] Dockerfile mtab link
link `/proc/self/mounts /etc/mtab`
Co-authored-by: David Chavez <david@dcvz.io>
* Cleaned code based on PR comments
* Fixed switch compilation
* Cleaned full texture cache instead of doing it per char
* Randomizer only saves when its not a vanilla save
* Disabled input when menubar is opened
* Removed return from SetupFont
* Cleaned code based on comments
* Cleaned up random texts on switch error screen
* Killed
* Removed debug and changed compilation flags
Co-authored-by: KiritoDv <nohomoboi01@gmail.com>
Co-authored-by: Felipe Guaycuru <guaycuru@gmail.com>
Co-authored-by: David Chavez <david@dcvz.io>
Co-authored-by: Jeffrey Crowell <github@crowell.biz>
Co-authored-by: BountyChocolate123456 <101743444+BountyChocolate123456@users.noreply.github.com>
Co-authored-by: sholdee <102821812+sholdee@users.noreply.github.com>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: rozlette <Rozelette@users.noreply.github.com>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>
Co-authored-by: vaguerant <vaguerant@users.noreply.github.com>
Co-authored-by: earthcrafterman <banddstudios@gmail.com>
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
Co-authored-by: qurious-pixel <62252937+qurious-pixel@users.noreply.github.com>
Co-authored-by: Baoulettes <perlouzerie@hotmail.fr>
Co-authored-by: Sirius902 <10891979+Sirius902@users.noreply.github.com>
Co-authored-by: modestposer <modestposer@gmail.com>
Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
Co-authored-by: Stormghetti <56653191+Stormghetti@users.noreply.github.com>
Co-authored-by: Sirius902 <3645979-Sirius902@users.noreply.gitlab.com>
Co-authored-by: MelonSpeedruns <melonspeedruns@outlook.com>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: Dog <5172592+Dog@users.noreply.github.com>
Co-authored-by: Nicholas Estelami <NEstelami@users.noreply.github.com>
Co-authored-by: ChristopherJTrent <ChristopherJTrent@outlook.com>
Co-authored-by: agamache <aaroncgamache@gmail.com>
Co-authored-by: M4xw <m4x@m4xw.net>
2022-07-25 21:11:53 -04:00
audio . cv_to_thread . notify_one ( ) ;
2022-05-13 18:43:55 -04:00
std : : vector < std : : unordered_map < Mtx * , MtxF > > mtx_replacements ;
2023-03-01 10:12:55 -05:00
int target_fps = OTRGlobals : : Instance - > GetInterpolationFPS ( ) ;
2022-05-29 12:16:23 -04:00
static int last_fps ;
static int last_update_rate ;
static int time ;
int fps = target_fps ;
int original_fps = 60 / R_UPDATE_RATE ;
if ( target_fps = = 20 | | original_fps > target_fps ) {
fps = original_fps ;
}
if ( last_fps ! = fps | | last_update_rate ! = R_UPDATE_RATE ) {
time = 0 ;
}
// time_base = fps * original_fps (one second)
int next_original_frame = fps ;
while ( time + original_fps < = next_original_frame ) {
time + = original_fps ;
if ( time ! = next_original_frame ) {
mtx_replacements . push_back ( FrameInterpolation_Interpolate ( ( float ) time / next_original_frame ) ) ;
} else {
mtx_replacements . emplace_back ( ) ;
2022-05-13 18:43:55 -04:00
}
}
2022-05-29 12:16:23 -04:00
time - = fps ;
2023-05-07 20:18:54 -04:00
OTRGlobals : : Instance - > context - > GetWindow ( ) - > SetTargetFps ( fps ) ;
2022-05-29 12:16:23 -04:00
2023-01-17 00:17:49 -05:00
int threshold = CVarGetInteger ( " gExtraLatencyThreshold " , 80 ) ;
2023-05-07 20:18:54 -04:00
OTRGlobals : : Instance - > context - > GetWindow ( ) - > SetMaximumFrameLatency ( threshold > 0 & & target_fps > = threshold ? 2 : 1 ) ;
2022-05-29 12:16:23 -04:00
2022-08-21 21:08:01 -04:00
RunCommands ( commands , mtx_replacements ) ;
2022-03-21 21:51:23 -04:00
2022-05-29 12:16:23 -04:00
last_fps = fps ;
last_update_rate = R_UPDATE_RATE ;
2022-04-18 05:37:47 -04:00
{
std : : unique_lock < std : : mutex > Lock ( audio . mutex ) ;
while ( audio . processing ) {
audio . cv_from_thread . wait ( Lock ) ;
}
}
2023-12-04 08:33:14 -05:00
if ( ToggleAltAssetsAtEndOfFrame ) {
ToggleAltAssetsAtEndOfFrame = false ;
// Actually update the CVar now before runing the alt asset update listeners
CVarSetInteger ( " gAltAssets " , ! CVarGetInteger ( " gAltAssets " , 0 ) ) ;
2023-04-27 19:20:41 -04:00
gfx_texture_cache_clear ( ) ;
2023-05-07 23:01:12 -04:00
LUS : : SkeletonPatcher : : UpdateSkeletons ( ) ;
2023-12-04 08:33:14 -05:00
GameInteractor : : Instance - > ExecuteHooks < GameInteractor : : OnAssetAltChange > ( ) ;
2023-04-27 19:20:41 -04:00
}
2022-03-21 21:51:23 -04:00
// OTRTODO: FIGURE OUT END FRAME POINT
2022-08-21 21:08:01 -04:00
/* if (OTRGlobals::Instance->context->lastScancode != -1)
OTRGlobals : : Instance - > context - > lastScancode = - 1 ; */
2022-03-21 21:51:23 -04:00
}
float divisor_num = 0.0f ;
2022-04-18 05:37:47 -04:00
extern " C " void OTRGetPixelDepthPrepare ( float x , float y ) {
2023-05-07 20:18:54 -04:00
OTRGlobals : : Instance - > context - > GetWindow ( ) - > GetPixelDepthPrepare ( x , y ) ;
2022-03-21 21:51:23 -04:00
}
extern " C " uint16_t OTRGetPixelDepth ( float x , float y ) {
2023-05-07 20:18:54 -04:00
return OTRGlobals : : Instance - > context - > GetWindow ( ) - > GetPixelDepth ( x , y ) ;
2022-03-21 21:51:23 -04:00
}
2022-11-20 14:13:54 -05:00
extern " C " uint32_t ResourceMgr_GetNumGameVersions ( ) {
2023-05-07 23:01:12 -04:00
return LUS : : Context : : GetInstance ( ) - > GetResourceManager ( ) - > GetArchive ( ) - > GetGameVersions ( ) . size ( ) ;
2022-11-20 14:13:54 -05:00
}
extern " C " uint32_t ResourceMgr_GetGameVersion ( int index ) {
2023-05-07 23:01:12 -04:00
return LUS : : Context : : GetInstance ( ) - > GetResourceManager ( ) - > GetArchive ( ) - > GetGameVersions ( ) [ index ] ;
2022-03-31 19:42:44 -04:00
}
2023-07-03 10:29:06 -04:00
extern " C " uint32_t ResourceMgr_GetGamePlatform ( int index ) {
uint32_t version = LUS : : Context : : GetInstance ( ) - > GetResourceManager ( ) - > GetArchive ( ) - > GetGameVersions ( ) [ index ] ;
switch ( version ) {
case OOT_NTSC_US_10 :
case OOT_NTSC_US_11 :
case OOT_NTSC_US_12 :
case OOT_PAL_10 :
case OOT_PAL_11 :
return GAME_PLATFORM_N64 ;
case OOT_NTSC_JP_GC :
case OOT_NTSC_US_GC :
case OOT_PAL_GC :
case OOT_NTSC_JP_MQ :
case OOT_NTSC_US_MQ :
case OOT_PAL_MQ :
case OOT_PAL_GC_DBG1 :
case OOT_PAL_GC_DBG2 :
case OOT_PAL_GC_MQ_DBG :
return GAME_PLATFORM_GC ;
}
}
extern " C " uint32_t ResourceMgr_GetGameRegion ( int index ) {
uint32_t version = LUS : : Context : : GetInstance ( ) - > GetResourceManager ( ) - > GetArchive ( ) - > GetGameVersions ( ) [ index ] ;
switch ( version ) {
case OOT_NTSC_US_10 :
case OOT_NTSC_US_11 :
case OOT_NTSC_US_12 :
case OOT_NTSC_JP_GC :
case OOT_NTSC_US_GC :
case OOT_NTSC_JP_MQ :
case OOT_NTSC_US_MQ :
return GAME_REGION_NTSC ;
case OOT_PAL_10 :
case OOT_PAL_11 :
case OOT_PAL_GC :
case OOT_PAL_MQ :
case OOT_PAL_GC_DBG1 :
case OOT_PAL_GC_DBG2 :
case OOT_PAL_GC_MQ_DBG :
return GAME_REGION_PAL ;
}
}
2022-10-20 22:01:54 -04:00
uint32_t IsSceneMasterQuest ( s16 sceneNum ) {
2022-10-16 23:07:35 -04:00
uint32_t value = 0 ;
2023-06-18 18:23:06 -04:00
uint8_t mqMode = CVarGetInteger ( " gBetterDebugWarpScreenMQMode " , WARP_MODE_OVERRIDE_OFF ) ;
if ( mqMode = = WARP_MODE_OVERRIDE_MQ_AS_VANILLA ) {
2023-05-30 14:01:04 -04:00
return 1 ;
2023-06-18 18:23:06 -04:00
} else if ( mqMode = = WARP_MODE_OVERRIDE_VANILLA_AS_MQ ) {
2023-05-30 14:01:04 -04:00
return 0 ;
} else {
if ( OTRGlobals : : Instance - > HasMasterQuest ( ) ) {
if ( ! OTRGlobals : : Instance - > HasOriginal ( ) ) {
value = 1 ;
2023-09-26 10:20:33 -04:00
} else if ( IS_MASTER_QUEST ) {
2023-05-30 14:01:04 -04:00
value = 1 ;
} else {
value = 0 ;
More gap-bridging (#3323)
* Initial StaticData and RandoItem class definitions
* Initial implementation of RandoItem class.
* Rerranges RandoItem Constructor parameters
The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on.
* Switches static data from map to static array.
Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values.
* Defines part of the randomizer item list.
* Adds more item class instances to item_list.cpp
Up through bottles, many more items still to go.
* Adds song items
* Adds Maps and Compasses to the item_list
* Added Key Items to item_list
* Added Key Rings to item_list
* Added Dungeon Rewards to item_list
* Adds generic items and refills to item_list
* Adds shop items, triforce, and hints
Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them.
* Adds in the stages of progressive items
These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.)
* Remove GetItemEntry data from progressive items
* Moves/adds function definitions to item/item_list
* Refactors GetItemEntry data
It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.)
* Adds item class member for if item is progressive
* Removes unneeded stuff from initializer list macro
* Replaces relevant `uint32_t`s w/ `RandomizerGet`s
Also replaces calls to the ItemTable method with StaticData::RetrieveItem
* Switches our runtime code to use the new itemList.
* Changes just enough hint gen code to compile
* Initial Definition of Location Class
* Initial Implementation of Location
* Fixes some names and definitions.
* Extracts ActorID and SceneID enums to separate files.
This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected.
* Replaces the forward definitions with the new imports.
* Adds missing data for RandomizerCheckObjects.
* Definition and first entry of locationTable
* Added Mido's House Locations
* Added locations up through lost woods.
* Adds in Hyrule Field locations.
* Adds Lake Hylia locations
* Adds location name comments
* Adds Gerudo Valley Locations
* Adds Gerudo Fortress locations.
* Adds the Wasteland and Collosus locations
* Adds Market locations
* Adds Hyrule Castle locations.
* Adds Kakariko and Graveyard locations.
* Adds Death Mountain checks.
* Adds Goron City locations
* Adds Death Mountain Crater locations
* Adds Zora's River locations
* Added Zora's Domain Locations.
* Added Zora's Fountain locations
* Adds Lon Lon Ranch locations.
* Adds Deku Tree locations
* Adds Dodongo's Cavern Locations.
* Adds Jabu Jabu's Belly Locations
* Adds Forest Temple Locations
* Adds Fire Temple Locations
* Adds Water Temple Locations
* Added Spirit Temple Locations
* Some of shadow temple locations.
* Adds remaining Shadow Temple locations
* Fixes a leftover merge conflict
* Adds Bottom of the Well locations.
* Adds Ice Cavern locations
* Adds GTG locations.
* Adds Ganon's Castle and Tower locations
* Adds dungeon Gold Skulltula locations.
* Adds Overworld Gold Skulltula locations
* Adds dungeon reward locations
* Adds Heart Container Locations
* Adds Cutscene and Song locations
* Adds Cow locations
* Adds Shop locations.
* Adds hint locations
* Adds function for retrieving the Location data.
* Initial definition of ItemLocation structure for tracking runtime data
* First push on converting code to use new location definitions
* Changes hints to use the new tables
* Further conversion of hints to new definitions.
* Adds new Hint and Location IDs to area tables
* Moves areaTable to use new RandomizerRegion keys
* Removal of 3drando/item_location files.
* Uses new RandomizerRegion keys in entrance.cpp
* Final push for removal of massive keys.hpp enum
* Uses new SceneID Enum Values
* Remove RandomizerCheckObject structs in favor of new location list.
* Fix a few stragglers to successfully build
* Rename of RandoItem to just Item, but in the Rando namespace
* Adds static hints (Light Arrows, Altar text, etc) to the new Hint table.
* More hint related fixes/edits
* small fix for #include path
* Fix various miscellaneous issues related to seed gen and spoiler parsing.
* Handle progressive items correctly.
* Fixes some hint generation logic
* Fix a few GetItemEntry niche bugs.
* Adds missing shop GI Entries
* Formatting fixes
* small formatting fix
* Namespace StaticData under Rando
* Added a note about a potential use-after-free.
I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used.
* Fixes missing location table entries
* Fixes LUS submodule and removes now-unused code
* Resolves weird duplicate definition issue
* Fix missing include
It was missed because not being included wasn't an issue on Windows.
* Fixes error present on Linux builds
* Fixes some issues with excluding locations
* Updates the Resolve Exclusion conflicts function
not sure if actually used, will look into that more later
* Removes some duplicate RGs
* More fixes of duplicate RG values.
* Fix a few duplication issues in the check tracker.
* Fix progressive bombchus.
* Minor typo fix, shouldn't really be affecting anything though
* Should fix some of the remaining check tracker issues.
* oops wrong boolean operator
* Fix skulltulas in the check tracker.
* oops, missing comma
* re-formatting of HintStone locations
* Fixes issue when picking up second Progressive Bullet Bag
* Hide bombchu bowling bombchus
* Fixes missed skullScene in location_list
* Reformats shop items
* Re-formats cow checks
* reformat song locations
* reformat "cutscene" checks
* reformat heart container locaitons
* reformat Boss/Dungeon reward checks
* Hide Triforce Completed if not playing Triforce Hunt
* Fixes incorrect chest param
* reformat GS Tokens locations and cuts down on duplicate data
* reformat Ganons Castle checks
* reformat GTG check locations
* Prevents Gift from Raoru from appearing in the check tracker
* more reformatting (botw, ice cavern, shadow temple)
* Should fix a couple more check tracker checks
* reformat spirit temple checks
* reformat water and fire temple checks
* fix RC_ZR_GS_ABOVE_BRIDGE flag typo
* reformat Forest Temple checks
* Fix RC_LW_TRADE_ODD_POTION in check tracker
* reformat child dungeon locations
* reformat overworld locations
* reformat item entries
* New Item Override system
* use new ItemOverrides and use ItemLocations table for getting items
* Saves/Loads directly from/to new ItemLocation table with overrides for traps
* Removes gSaveContext.itemLocations
* Don't load spoiler file on boot automatically.
Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that:
1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded.
2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present).
3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet).
4. After that, a seed is generated and you are taken back to the file select screen with the new file present.
5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is
already in memory and in the save file (or at least I'll make it so that it is if it isn't already).
6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing
for hints to be in the user's language of choice no matter what language the spoiler file was generated in.
7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there
instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out
custom message syntax for various types of custom hints and whatnot. But that will be probably much later.
* Auto-gen rando seed when making a new rando file.
Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations:
1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed.
2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown.
3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen.
Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet.
* Fix a few typos/bugs
* Partial conversion to new Settings/Option class
* Further conversion to new settings/options classes
* New settings struct (not fully working, need to wire it up to SaveManager)
* Move save files to new settings struct. Also fixes MQ options to match 3drando
* Fixes some spoilerfile related issues
* Cleans up now unused arrays
* Fixes some unhandled entries in parse settings switch case
* Reimplements parsing of settings on file drop to re-generate seeds
* Move merchantPrices into ItemLocation tables.
* Move hints to new struct
* Fixes a few seed gen bugs surrounding hints
* Fix treasure chest game.
* Relocate Entrance Shuffle code into ctx
* Move entrances to new context at runtime
* Remove now unused code from SaveContext and randomizer.cpp/.h
* Fix non-windows builds?
* Moves Dungeon Quests to new context
* Move trials into new context
* Whoops, forgot to construct the Trials in the context.
* Fixes accidental nullptr reference
* Fixes bug with saving MQ dungeons
* Implements plando mode and removes now unused code.
Largely untested, expect some bugfixes.
* prevent a multiple definition bug
* another attempt to fix the gSeedTextures multiple def error
* Fixes some minor hint issues from conflict resolution
* Some additional glue needed for merge
* Fixes another couple of miscellaneous issues/inconsistencies.
* A few french corrections
* Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if ( IS_RANDO ) {
auto dungeon = OTRGlobals : : Instance - > gRandoContext - > GetDungeons ( ) - > GetDungeonFromScene ( sceneNum ) ;
if ( dungeon ! = nullptr & & dungeon - > IsMQ ( ) ) {
value = 1 ;
}
2022-10-16 23:07:35 -04:00
}
}
}
2023-06-01 22:00:45 -04:00
}
2022-10-16 23:07:35 -04:00
return value ;
}
2022-09-29 19:07:48 -04:00
2022-10-20 22:01:54 -04:00
uint32_t IsGameMasterQuest ( ) {
2022-11-06 03:24:34 -05:00
return gPlayState ! = NULL ? IsSceneMasterQuest ( gPlayState - > sceneNum ) : 0 ;
2022-10-20 22:01:54 -04:00
}
2022-10-16 23:07:35 -04:00
extern " C " uint32_t ResourceMgr_GameHasMasterQuest ( ) {
return OTRGlobals : : Instance - > HasMasterQuest ( ) ;
}
2022-09-29 19:07:48 -04:00
2022-10-16 23:07:35 -04:00
extern " C " uint32_t ResourceMgr_GameHasOriginal ( ) {
return OTRGlobals : : Instance - > HasOriginal ( ) ;
}
2022-10-20 22:01:54 -04:00
extern " C " uint32_t ResourceMgr_IsSceneMasterQuest ( s16 sceneNum ) {
return IsSceneMasterQuest ( sceneNum ) ;
}
2022-10-16 23:07:35 -04:00
extern " C " uint32_t ResourceMgr_IsGameMasterQuest ( ) {
return IsGameMasterQuest ( ) ;
2022-09-29 19:07:48 -04:00
}
2023-03-14 02:45:19 -04:00
extern " C " void ResourceMgr_LoadDirectory ( const char * resName ) {
2023-05-07 23:01:12 -04:00
LUS : : Context : : GetInstance ( ) - > GetResourceManager ( ) - > LoadDirectory ( resName ) ;
2022-03-21 21:51:23 -04:00
}
extern " C " void ResourceMgr_DirtyDirectory ( const char * resName ) {
2023-05-07 23:01:12 -04:00
LUS : : Context : : GetInstance ( ) - > GetResourceManager ( ) - > DirtyDirectory ( resName ) ;
2022-03-21 21:51:23 -04:00
}
2023-11-23 09:07:30 -05:00
extern " C " void ResourceMgr_UnloadResource ( const char * resName ) {
std : : string path = resName ;
if ( path . substr ( 0 , 7 ) = = " __OTR__ " ) {
path = path . substr ( 7 ) ;
}
auto res = LUS : : Context : : GetInstance ( ) - > GetResourceManager ( ) - > UnloadResource ( path ) ;
}
2022-06-10 13:37:50 -04:00
// OTRTODO: There is probably a more elegant way to go about this...
2023-04-27 19:20:41 -04:00
// Kenix: This is definitely leaking memory when it's called.
2022-06-10 13:37:50 -04:00
extern " C " char * * ResourceMgr_ListFiles ( const char * searchMask , int * resultSize ) {
2023-05-07 23:01:12 -04:00
auto lst = LUS : : Context : : GetInstance ( ) - > GetResourceManager ( ) - > GetArchive ( ) - > ListFiles ( searchMask ) ;
2022-06-10 13:37:50 -04:00
char * * result = ( char * * ) malloc ( lst - > size ( ) * sizeof ( char * ) ) ;
2022-06-19 03:03:04 -04:00
for ( size_t i = 0 ; i < lst - > size ( ) ; i + + ) {
2022-06-10 13:37:50 -04:00
char * str = ( char * ) malloc ( lst . get ( ) [ 0 ] [ i ] . size ( ) + 1 ) ;
memcpy ( str , lst . get ( ) [ 0 ] [ i ] . data ( ) , lst . get ( ) [ 0 ] [ i ] . size ( ) ) ;
str [ lst . get ( ) [ 0 ] [ i ] . size ( ) ] = ' \0 ' ;
result [ i ] = str ;
}
* resultSize = lst - > size ( ) ;
return result ;
}
2022-03-21 21:51:23 -04:00
2023-04-27 19:20:41 -04:00
extern " C " uint8_t ResourceMgr_FileExists ( const char * filePath ) {
std : : string path = filePath ;
if ( path . substr ( 0 , 7 ) = = " __OTR__ " ) {
path = path . substr ( 7 ) ;
}
return ExtensionCache . contains ( path ) ;
}
2023-11-23 09:07:30 -05:00
extern " C " uint8_t ResourceMgr_FileAltExists ( const char * filePath ) {
std : : string path = filePath ;
if ( path . substr ( 0 , 7 ) = = " __OTR__ " ) {
path = path . substr ( 7 ) ;
}
if ( path . substr ( 0 , 4 ) ! = " alt/ " ) {
path = " alt/ " + path ;
}
return ExtensionCache . contains ( path ) ;
}
// Unloads a resource if an alternate version exists when alt assets are enabled
// The resource is only removed from the internal cache to prevent it from used in the next resource lookup
extern " C " void ResourceMgr_UnloadOriginalWhenAltExists ( const char * resName ) {
if ( CVarGetInteger ( " gAltAssets " , 0 ) & & ResourceMgr_FileAltExists ( ( char * ) resName ) ) {
ResourceMgr_UnloadResource ( ( char * ) resName ) ;
}
}
2022-12-21 01:26:13 -05:00
extern " C " void ResourceMgr_LoadFile ( const char * resName ) {
2023-05-07 23:01:12 -04:00
LUS : : Context : : GetInstance ( ) - > GetResourceManager ( ) - > LoadResource ( resName ) ;
2022-12-21 01:26:13 -05:00
}
2023-06-03 15:27:45 -04:00
std : : shared_ptr < LUS : : IResource > GetResourceByNameHandlingMQ ( const char * path ) {
2022-10-16 23:07:35 -04:00
std : : string Path = path ;
2022-12-21 01:26:13 -05:00
if ( ResourceMgr_IsGameMasterQuest ( ) ) {
2022-10-16 23:07:35 -04:00
size_t pos = 0 ;
if ( ( pos = Path . find ( " /nonmq/ " , 0 ) ) ! = std : : string : : npos ) {
Path . replace ( pos , 7 , " /mq/ " ) ;
}
}
2023-05-07 23:01:12 -04:00
return LUS : : Context : : GetInstance ( ) - > GetResourceManager ( ) - > LoadResource ( Path . c_str ( ) ) ;
2022-10-16 23:07:35 -04:00
}
2023-02-26 20:55:40 -05:00
extern " C " char * GetResourceDataByNameHandlingMQ ( const char * path ) {
auto res = GetResourceByNameHandlingMQ ( path ) ;
if ( res = = nullptr ) {
return nullptr ;
}
2023-06-03 15:27:45 -04:00
return ( char * ) res - > GetRawPointer ( ) ;
2023-02-26 20:55:40 -05:00
}
2022-03-21 21:51:23 -04:00
extern " C " char * ResourceMgr_LoadFileFromDisk ( const char * filePath ) {
FILE * file = fopen ( filePath , " r " ) ;
fseek ( file , 0 , SEEK_END ) ;
int fSize = ftell ( file ) ;
fseek ( file , 0 , SEEK_SET ) ;
char * data = ( char * ) malloc ( fSize ) ;
fread ( data , 1 , fSize , file ) ;
fclose ( file ) ;
return data ;
}
2023-11-23 09:07:30 -05:00
extern " C " uint8_t ResourceMgr_TexIsRaw ( const char * texPath ) {
auto res = std : : static_pointer_cast < LUS : : Texture > ( GetResourceByNameHandlingMQ ( texPath ) ) ;
return res - > Flags & TEX_FLAG_LOAD_AS_RAW ;
}
2023-04-04 03:12:09 -04:00
extern " C " uint8_t ResourceMgr_ResourceIsBackground ( char * texPath ) {
auto res = GetResourceByNameHandlingMQ ( texPath ) ;
2023-06-03 15:27:45 -04:00
return res - > GetInitData ( ) - > Type = = LUS : : ResourceType : : SOH_Background ;
2023-04-04 03:12:09 -04:00
}
2023-04-27 19:20:41 -04:00
extern " C " char * ResourceMgr_LoadJPEG ( char * data , size_t dataSize )
2022-03-21 21:51:23 -04:00
{
static char * finalBuffer = 0 ;
if ( finalBuffer = = 0 )
finalBuffer = ( char * ) malloc ( dataSize ) ;
int w ;
int h ;
int comp ;
unsigned char * pixels = stbi_load_from_memory ( ( const unsigned char * ) data , 320 * 240 * 2 , & w , & h , & comp , STBI_rgb_alpha ) ;
//unsigned char* pixels = stbi_load_from_memory((const unsigned char*)data, 480 * 240 * 2, &w, &h, &comp, STBI_rgb_alpha);
int idx = 0 ;
for ( int y = 0 ; y < h ; y + + )
{
for ( int x = 0 ; x < w ; x + + )
{
uint16_t * bufferTest = ( uint16_t * ) finalBuffer ;
int pixelIdx = ( ( y * w ) + x ) * 4 ;
uint8_t r = pixels [ pixelIdx + 0 ] / 8 ;
uint8_t g = pixels [ pixelIdx + 1 ] / 8 ;
uint8_t b = pixels [ pixelIdx + 2 ] / 8 ;
uint8_t alphaBit = pixels [ pixelIdx + 3 ] ! = 0 ;
uint16_t data = ( r < < 11 ) + ( g < < 6 ) + ( b < < 1 ) + alphaBit ;
finalBuffer [ idx + + ] = ( data & 0xFF00 ) > > 8 ;
finalBuffer [ idx + + ] = ( data & 0x00FF ) ;
}
}
return ( char * ) finalBuffer ;
}
2022-07-31 21:32:40 -04:00
extern " C " uint16_t ResourceMgr_LoadTexWidthByName ( char * texPath ) ;
extern " C " uint16_t ResourceMgr_LoadTexHeightByName ( char * texPath ) ;
2022-04-06 20:42:23 -04:00
extern " C " char * ResourceMgr_LoadTexOrDListByName ( const char * filePath ) {
2023-02-26 20:55:40 -05:00
auto res = GetResourceByNameHandlingMQ ( filePath ) ;
2022-03-21 21:51:23 -04:00
2023-06-03 15:27:45 -04:00
if ( res - > GetInitData ( ) - > Type = = LUS : : ResourceType : : DisplayList )
2023-05-07 23:01:12 -04:00
return ( char * ) & ( ( std : : static_pointer_cast < LUS : : DisplayList > ( res ) ) - > Instructions [ 0 ] ) ;
2023-06-03 15:27:45 -04:00
else if ( res - > GetInitData ( ) - > Type = = LUS : : ResourceType : : Array )
2023-05-07 23:01:12 -04:00
return ( char * ) ( std : : static_pointer_cast < LUS : : Array > ( res ) ) - > Vertices . data ( ) ;
2022-10-16 23:07:35 -04:00
else {
2023-02-26 20:55:40 -05:00
return ( char * ) GetResourceDataByNameHandlingMQ ( filePath ) ;
2022-10-16 23:07:35 -04:00
}
2022-03-21 21:51:23 -04:00
}
2023-04-27 19:20:41 -04:00
extern " C " char * ResourceMgr_LoadIfDListByName ( const char * filePath ) {
auto res = GetResourceByNameHandlingMQ ( filePath ) ;
2023-06-03 15:27:45 -04:00
if ( res - > GetInitData ( ) - > Type = = LUS : : ResourceType : : DisplayList )
2023-05-07 23:01:12 -04:00
return ( char * ) & ( ( std : : static_pointer_cast < LUS : : DisplayList > ( res ) ) - > Instructions [ 0 ] ) ;
2023-04-27 19:20:41 -04:00
return nullptr ;
}
testing out item replacement (#416)
* skip learning song of storms
* don't set flag when getting goron tunic as child
* Initiates prelude check when master sword unloads.
Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again.
* Stops Shadow Temple lore prompts from appearing in rando.
* Skips cutscene of royal tomb explosion in rando.
Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here.
* Improves visual of exploding gravestone.
* Adds some comments explaining the rando differences
* Skip ruto text box in jabu blue warp
For rando
* skip intro cutscene in dodongo's cavern
* load spoiler files on boot, fix spoilerfile existing check when making new saves
* name entry dropped spoiler logic
* make sure to actually init the cvar
* no chime on load
* uncomment
* Skip ganondrof cutscene
Skip to scream part of the death animation, skipping the text boxes etc. For rando
* Update z_boss_ganondrof.c
* skip owl flight cutscenes in rando
* Fixes skipped text so it only applies to shadow temple.
Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors.
* Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case.
* TEST: Text for item
* Adding ganon flavor text
* ADD: AMMO Count
* format ganon text/hint text
* Autoskip the tower cutscene if settings call for tower collapse.
* ganon hint text logic
* Improved prelude after time travel fix
* swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things.
* this is all i did
* not the cleanest code ever but it's working
* ADD: GS Count
* ADD: Wallter (crash for now)
* TWEAK: Wallet check
* FIX: Use DrawItem instread of DrawUpgrade... b-baka!
* Fixes some vanilla bugs introduced by rando code.
* Added cutscene skip for zelda escaping
Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger
* ADD: X Spacing + Placeholders for song
* ADD: default case for items
* TWEAK: Spacing
* FIX: Light Arrow
* ADD: Ammo Option
* use groups instead
* ADD: More spacing logic
* songs and names
* TWEAK: Color on wallet
* colors
* Added flags cutscene before nabooru fight
* ADD: ChromaKey text
* First attempt skip cs after nabooru defeat
* Better implementation for specific rando cutscene skips
* use pulseaudio defaults
* spaces/tabs
* move color push/pop to stop crash
* make the colors work again
* the real bottle fix
* pulseaudio values tuned for n64 audio at 44.1khz
* update tlength
* remove one hardcoded samplerate
* Cleaned up and fixed zelda escape skip
The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of.
* Revert one line to match original
nothing functional
* another hint line that breaks autonewline logic
* don't autospawn epona if we don't have the song/ocarina
* Trying to use iron knuckle death effects
not working yet
* Streamlined OoT cutscene skip for future additions
Also cleaned up if statement in general
* Made if statement more readable
Also added clarity for what cutscene was skipped
* Fixed typo in comment
* Janky nabooru defeat cs skip
* altar text formatting (gonna need help shortening some of the french ones)
* more altar text formatting
* english altar text formatting complete
* make gtg blocking guard check for card not bridge
* FIX: Typo!
* FIX: Uppercases
* FIX: Typo
* TWEAK: Alter + some names
* TWEAK: More caps!
* ADD: Missing string
TWEAK more uppercases and namefixe
s
* Hide nabooru death by covering her in flames
* bandaid fix for death crash issue
* Twinrova defeat cs skip
Skips the animation and manually calls the function to show the "beam" around the sisters
* fix crash
* fix caps to match
* fix great fairy reward mashing/shielding issue
* TWEAK : Typo clé to Clé
* TWEAK: Some Altar hints
TWEAK: Some capitals
* TWEAK: Unmatching text + some cap again
* TWEAK: More tweaks
* fix build
* remove extra json.hpp, add hint
* Update randomizer_item_tracker.cpp
* TWEAK: Double Defense with RedParticles instead of white
* make sure we don't optimize out the check to ensure a spoilerfile exists
* vanilla ganon boss key hint formatting
* TWEAK: FR- better way of the hero text
* fix
* and again
* Initializes dungeonsDone items in gSaveContext to 0.
* Replaces sizeof calculation with a NUM_DUNGEONS constant.
* Fixes Saria's Gift on the LW Bridge from getting killed when holding shield.
* More airtight fix for Saria's Gift on the Bridge.
* Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId.
* Invalidate text box icon before drawing
* Fixes the case where Saria's gift is an Ice Trap.
We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine.
* Initial commit
Might need changing when we change the settings in the future
* Fixes Door of Time opening cutscene after warping with prelude.
* Initial waterfall skip
Very rudimentary way of doing things but it seems to work so :shrug:
* inital rework
* fixed default rotation for 2D sprites
* fix tab/space issues
* 3d drops rando merge fix again
* Allows Impa to appear in the Lullaby check post drawbridge escape.
* Changes Ganon's Trials Count setting to a checkbox
The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed.
* Sets all Ganon's Trials to incomplete in new saves.
Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131
* fix castle guards when oot throw cutscene has already played in rando
* Properly removes the beams when trials are cleared.
* Removes Question Mark from Skip Ganon's Trials UI.
* Adds a todo comment about when to change back to slider.
* make deku seeds check for bullet bag
* Various tweaks
TWEAK: Altar Text
TWEAK: Hint names
TWEAK: Replace more problematic œ to oe
* upgrade ocarina on both child and adult equips
* FIX: Jabu Item
* update equipped hookshot/longshot when obtained as other age
* add hint
* don't give the bgs check without the claim check
* Skips Darunia Cutscene in Fire Temple
* Added a TODO note about not skipping the cutscene.
There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch.
* remove todo
* restore fast ocarina option in imgui that was lost in merge
* Fixes grey screen issue + tooltip for 2 handed shield
* update to use dg instead of g for textures in item tracker
* TWEAK: Default color for cosmetic RAND button was not the corect one
* fix texture crash, remove unused item tracker code
* don't open mask shop until we get zelda's letter
* Update README.md
* Prevents "correct" chime under incorrect conditions.
* Fixes typo in conditional and adds "bonk" sound effect.
"Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time.
* remove modify dpad equips toggle, replace with checks for dpad menu
* remove extra check
* add ability to hold c-up to assign to dpad when dpad menuing is enabled
* disable d-pad navigation on item menu when holding c-up to equip
* dpad+c-up stuff for equipment menu
* ADD: Checbox for songs colors
* TWEAK: RandoColors for normal songs
* kind of quick and dirty but it works
* TWEAK: Clarity of the tooltip
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Dog <5172592+Dog@users.noreply.github.com>
Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com>
Co-authored-by: Baoulettes <perlouzerie@hotmail.fr>
Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
extern " C " Sprite * GetSeedTexture ( uint8_t index ) {
More gap-bridging (#3323)
* Initial StaticData and RandoItem class definitions
* Initial implementation of RandoItem class.
* Rerranges RandoItem Constructor parameters
The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on.
* Switches static data from map to static array.
Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values.
* Defines part of the randomizer item list.
* Adds more item class instances to item_list.cpp
Up through bottles, many more items still to go.
* Adds song items
* Adds Maps and Compasses to the item_list
* Added Key Items to item_list
* Added Key Rings to item_list
* Added Dungeon Rewards to item_list
* Adds generic items and refills to item_list
* Adds shop items, triforce, and hints
Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them.
* Adds in the stages of progressive items
These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.)
* Remove GetItemEntry data from progressive items
* Moves/adds function definitions to item/item_list
* Refactors GetItemEntry data
It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.)
* Adds item class member for if item is progressive
* Removes unneeded stuff from initializer list macro
* Replaces relevant `uint32_t`s w/ `RandomizerGet`s
Also replaces calls to the ItemTable method with StaticData::RetrieveItem
* Switches our runtime code to use the new itemList.
* Changes just enough hint gen code to compile
* Initial Definition of Location Class
* Initial Implementation of Location
* Fixes some names and definitions.
* Extracts ActorID and SceneID enums to separate files.
This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected.
* Replaces the forward definitions with the new imports.
* Adds missing data for RandomizerCheckObjects.
* Definition and first entry of locationTable
* Added Mido's House Locations
* Added locations up through lost woods.
* Adds in Hyrule Field locations.
* Adds Lake Hylia locations
* Adds location name comments
* Adds Gerudo Valley Locations
* Adds Gerudo Fortress locations.
* Adds the Wasteland and Collosus locations
* Adds Market locations
* Adds Hyrule Castle locations.
* Adds Kakariko and Graveyard locations.
* Adds Death Mountain checks.
* Adds Goron City locations
* Adds Death Mountain Crater locations
* Adds Zora's River locations
* Added Zora's Domain Locations.
* Added Zora's Fountain locations
* Adds Lon Lon Ranch locations.
* Adds Deku Tree locations
* Adds Dodongo's Cavern Locations.
* Adds Jabu Jabu's Belly Locations
* Adds Forest Temple Locations
* Adds Fire Temple Locations
* Adds Water Temple Locations
* Added Spirit Temple Locations
* Some of shadow temple locations.
* Adds remaining Shadow Temple locations
* Fixes a leftover merge conflict
* Adds Bottom of the Well locations.
* Adds Ice Cavern locations
* Adds GTG locations.
* Adds Ganon's Castle and Tower locations
* Adds dungeon Gold Skulltula locations.
* Adds Overworld Gold Skulltula locations
* Adds dungeon reward locations
* Adds Heart Container Locations
* Adds Cutscene and Song locations
* Adds Cow locations
* Adds Shop locations.
* Adds hint locations
* Adds function for retrieving the Location data.
* Initial definition of ItemLocation structure for tracking runtime data
* First push on converting code to use new location definitions
* Changes hints to use the new tables
* Further conversion of hints to new definitions.
* Adds new Hint and Location IDs to area tables
* Moves areaTable to use new RandomizerRegion keys
* Removal of 3drando/item_location files.
* Uses new RandomizerRegion keys in entrance.cpp
* Final push for removal of massive keys.hpp enum
* Uses new SceneID Enum Values
* Remove RandomizerCheckObject structs in favor of new location list.
* Fix a few stragglers to successfully build
* Rename of RandoItem to just Item, but in the Rando namespace
* Adds static hints (Light Arrows, Altar text, etc) to the new Hint table.
* More hint related fixes/edits
* small fix for #include path
* Fix various miscellaneous issues related to seed gen and spoiler parsing.
* Handle progressive items correctly.
* Fixes some hint generation logic
* Fix a few GetItemEntry niche bugs.
* Adds missing shop GI Entries
* Formatting fixes
* small formatting fix
* Namespace StaticData under Rando
* Added a note about a potential use-after-free.
I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used.
* Fixes missing location table entries
* Fixes LUS submodule and removes now-unused code
* Resolves weird duplicate definition issue
* Fix missing include
It was missed because not being included wasn't an issue on Windows.
* Fixes error present on Linux builds
* Fixes some issues with excluding locations
* Updates the Resolve Exclusion conflicts function
not sure if actually used, will look into that more later
* Removes some duplicate RGs
* More fixes of duplicate RG values.
* Fix a few duplication issues in the check tracker.
* Fix progressive bombchus.
* Minor typo fix, shouldn't really be affecting anything though
* Should fix some of the remaining check tracker issues.
* oops wrong boolean operator
* Fix skulltulas in the check tracker.
* oops, missing comma
* re-formatting of HintStone locations
* Fixes issue when picking up second Progressive Bullet Bag
* Hide bombchu bowling bombchus
* Fixes missed skullScene in location_list
* Reformats shop items
* Re-formats cow checks
* reformat song locations
* reformat "cutscene" checks
* reformat heart container locaitons
* reformat Boss/Dungeon reward checks
* Hide Triforce Completed if not playing Triforce Hunt
* Fixes incorrect chest param
* reformat GS Tokens locations and cuts down on duplicate data
* reformat Ganons Castle checks
* reformat GTG check locations
* Prevents Gift from Raoru from appearing in the check tracker
* more reformatting (botw, ice cavern, shadow temple)
* Should fix a couple more check tracker checks
* reformat spirit temple checks
* reformat water and fire temple checks
* fix RC_ZR_GS_ABOVE_BRIDGE flag typo
* reformat Forest Temple checks
* Fix RC_LW_TRADE_ODD_POTION in check tracker
* reformat child dungeon locations
* reformat overworld locations
* reformat item entries
* New Item Override system
* use new ItemOverrides and use ItemLocations table for getting items
* Saves/Loads directly from/to new ItemLocation table with overrides for traps
* Removes gSaveContext.itemLocations
* Don't load spoiler file on boot automatically.
Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that:
1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded.
2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present).
3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet).
4. After that, a seed is generated and you are taken back to the file select screen with the new file present.
5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is
already in memory and in the save file (or at least I'll make it so that it is if it isn't already).
6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing
for hints to be in the user's language of choice no matter what language the spoiler file was generated in.
7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there
instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out
custom message syntax for various types of custom hints and whatnot. But that will be probably much later.
* Auto-gen rando seed when making a new rando file.
Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations:
1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed.
2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown.
3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen.
Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet.
* Fix a few typos/bugs
* Partial conversion to new Settings/Option class
* Further conversion to new settings/options classes
* New settings struct (not fully working, need to wire it up to SaveManager)
* Move save files to new settings struct. Also fixes MQ options to match 3drando
* Fixes some spoilerfile related issues
* Cleans up now unused arrays
* Fixes some unhandled entries in parse settings switch case
* Reimplements parsing of settings on file drop to re-generate seeds
* Move merchantPrices into ItemLocation tables.
* Move hints to new struct
* Fixes a few seed gen bugs surrounding hints
* Fix treasure chest game.
* Relocate Entrance Shuffle code into ctx
* Move entrances to new context at runtime
* Remove now unused code from SaveContext and randomizer.cpp/.h
* Fix non-windows builds?
* Moves Dungeon Quests to new context
* Move trials into new context
* Whoops, forgot to construct the Trials in the context.
* Fixes accidental nullptr reference
* Fixes bug with saving MQ dungeons
* Implements plando mode and removes now unused code.
Largely untested, expect some bugfixes.
* prevent a multiple definition bug
* another attempt to fix the gSeedTextures multiple def error
* Fixes some minor hint issues from conflict resolution
* Some additional glue needed for merge
* Fixes another couple of miscellaneous issues/inconsistencies.
* A few french corrections
* Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
return OTRGlobals : : Instance - > gRandoContext - > GetSeedTexture ( index ) ;
}
extern " C " uint8_t GetSeedIconIndex ( uint8_t index ) {
return OTRGlobals : : Instance - > gRandoContext - > hashIconIndexes [ index ] ;
testing out item replacement (#416)
* skip learning song of storms
* don't set flag when getting goron tunic as child
* Initiates prelude check when master sword unloads.
Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again.
* Stops Shadow Temple lore prompts from appearing in rando.
* Skips cutscene of royal tomb explosion in rando.
Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here.
* Improves visual of exploding gravestone.
* Adds some comments explaining the rando differences
* Skip ruto text box in jabu blue warp
For rando
* skip intro cutscene in dodongo's cavern
* load spoiler files on boot, fix spoilerfile existing check when making new saves
* name entry dropped spoiler logic
* make sure to actually init the cvar
* no chime on load
* uncomment
* Skip ganondrof cutscene
Skip to scream part of the death animation, skipping the text boxes etc. For rando
* Update z_boss_ganondrof.c
* skip owl flight cutscenes in rando
* Fixes skipped text so it only applies to shadow temple.
Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors.
* Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case.
* TEST: Text for item
* Adding ganon flavor text
* ADD: AMMO Count
* format ganon text/hint text
* Autoskip the tower cutscene if settings call for tower collapse.
* ganon hint text logic
* Improved prelude after time travel fix
* swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things.
* this is all i did
* not the cleanest code ever but it's working
* ADD: GS Count
* ADD: Wallter (crash for now)
* TWEAK: Wallet check
* FIX: Use DrawItem instread of DrawUpgrade... b-baka!
* Fixes some vanilla bugs introduced by rando code.
* Added cutscene skip for zelda escaping
Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger
* ADD: X Spacing + Placeholders for song
* ADD: default case for items
* TWEAK: Spacing
* FIX: Light Arrow
* ADD: Ammo Option
* use groups instead
* ADD: More spacing logic
* songs and names
* TWEAK: Color on wallet
* colors
* Added flags cutscene before nabooru fight
* ADD: ChromaKey text
* First attempt skip cs after nabooru defeat
* Better implementation for specific rando cutscene skips
* use pulseaudio defaults
* spaces/tabs
* move color push/pop to stop crash
* make the colors work again
* the real bottle fix
* pulseaudio values tuned for n64 audio at 44.1khz
* update tlength
* remove one hardcoded samplerate
* Cleaned up and fixed zelda escape skip
The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of.
* Revert one line to match original
nothing functional
* another hint line that breaks autonewline logic
* don't autospawn epona if we don't have the song/ocarina
* Trying to use iron knuckle death effects
not working yet
* Streamlined OoT cutscene skip for future additions
Also cleaned up if statement in general
* Made if statement more readable
Also added clarity for what cutscene was skipped
* Fixed typo in comment
* Janky nabooru defeat cs skip
* altar text formatting (gonna need help shortening some of the french ones)
* more altar text formatting
* english altar text formatting complete
* make gtg blocking guard check for card not bridge
* FIX: Typo!
* FIX: Uppercases
* FIX: Typo
* TWEAK: Alter + some names
* TWEAK: More caps!
* ADD: Missing string
TWEAK more uppercases and namefixe
s
* Hide nabooru death by covering her in flames
* bandaid fix for death crash issue
* Twinrova defeat cs skip
Skips the animation and manually calls the function to show the "beam" around the sisters
* fix crash
* fix caps to match
* fix great fairy reward mashing/shielding issue
* TWEAK : Typo clé to Clé
* TWEAK: Some Altar hints
TWEAK: Some capitals
* TWEAK: Unmatching text + some cap again
* TWEAK: More tweaks
* fix build
* remove extra json.hpp, add hint
* Update randomizer_item_tracker.cpp
* TWEAK: Double Defense with RedParticles instead of white
* make sure we don't optimize out the check to ensure a spoilerfile exists
* vanilla ganon boss key hint formatting
* TWEAK: FR- better way of the hero text
* fix
* and again
* Initializes dungeonsDone items in gSaveContext to 0.
* Replaces sizeof calculation with a NUM_DUNGEONS constant.
* Fixes Saria's Gift on the LW Bridge from getting killed when holding shield.
* More airtight fix for Saria's Gift on the Bridge.
* Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId.
* Invalidate text box icon before drawing
* Fixes the case where Saria's gift is an Ice Trap.
We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine.
* Initial commit
Might need changing when we change the settings in the future
* Fixes Door of Time opening cutscene after warping with prelude.
* Initial waterfall skip
Very rudimentary way of doing things but it seems to work so :shrug:
* inital rework
* fixed default rotation for 2D sprites
* fix tab/space issues
* 3d drops rando merge fix again
* Allows Impa to appear in the Lullaby check post drawbridge escape.
* Changes Ganon's Trials Count setting to a checkbox
The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed.
* Sets all Ganon's Trials to incomplete in new saves.
Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131
* fix castle guards when oot throw cutscene has already played in rando
* Properly removes the beams when trials are cleared.
* Removes Question Mark from Skip Ganon's Trials UI.
* Adds a todo comment about when to change back to slider.
* make deku seeds check for bullet bag
* Various tweaks
TWEAK: Altar Text
TWEAK: Hint names
TWEAK: Replace more problematic œ to oe
* upgrade ocarina on both child and adult equips
* FIX: Jabu Item
* update equipped hookshot/longshot when obtained as other age
* add hint
* don't give the bgs check without the claim check
* Skips Darunia Cutscene in Fire Temple
* Added a TODO note about not skipping the cutscene.
There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch.
* remove todo
* restore fast ocarina option in imgui that was lost in merge
* Fixes grey screen issue + tooltip for 2 handed shield
* update to use dg instead of g for textures in item tracker
* TWEAK: Default color for cosmetic RAND button was not the corect one
* fix texture crash, remove unused item tracker code
* don't open mask shop until we get zelda's letter
* Update README.md
* Prevents "correct" chime under incorrect conditions.
* Fixes typo in conditional and adds "bonk" sound effect.
"Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time.
* remove modify dpad equips toggle, replace with checks for dpad menu
* remove extra check
* add ability to hold c-up to assign to dpad when dpad menuing is enabled
* disable d-pad navigation on item menu when holding c-up to equip
* dpad+c-up stuff for equipment menu
* ADD: Checbox for songs colors
* TWEAK: RandoColors for normal songs
* kind of quick and dirty but it works
* TWEAK: Clarity of the tooltip
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Dog <5172592+Dog@users.noreply.github.com>
Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com>
Co-authored-by: Baoulettes <perlouzerie@hotmail.fr>
Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
2022-04-06 20:42:23 -04:00
extern " C " char * ResourceMgr_LoadPlayerAnimByName ( const char * animPath ) {
2023-05-07 23:01:12 -04:00
auto anim = std : : static_pointer_cast < LUS : : PlayerAnimation > ( GetResourceByNameHandlingMQ ( animPath ) ) ;
2022-03-21 21:51:23 -04:00
return ( char * ) & anim - > limbRotData [ 0 ] ;
}
2023-04-27 19:20:41 -04:00
extern " C " void ResourceMgr_PushCurrentDirectory ( char * path )
{
gfx_push_current_dir ( path ) ;
}
2022-04-06 20:42:23 -04:00
extern " C " Gfx * ResourceMgr_LoadGfxByName ( const char * path )
2022-03-21 21:51:23 -04:00
{
2023-11-23 09:07:30 -05:00
// When an alt resource exists for the DL, we need to unload the original asset
// to clear the cache so the alt asset will be loaded instead
// OTRTODO: If Alt loading over original cache is fixed, this line can most likely be removed
ResourceMgr_UnloadOriginalWhenAltExists ( path ) ;
2023-05-07 23:01:12 -04:00
auto res = std : : static_pointer_cast < LUS : : DisplayList > ( GetResourceByNameHandlingMQ ( path ) ) ;
2023-01-17 00:17:49 -05:00
return ( Gfx * ) & res - > Instructions [ 0 ] ;
2022-03-21 21:51:23 -04:00
}
2023-11-14 16:37:03 -05:00
extern " C " uint8_t ResourceMgr_FileIsCustomByName ( const char * path ) {
auto res = std : : static_pointer_cast < LUS : : DisplayList > ( GetResourceByNameHandlingMQ ( path ) ) ;
return res - > GetInitData ( ) - > IsCustom ;
}
2022-10-12 17:20:13 -04:00
typedef struct {
int index ;
Gfx instruction ;
} GfxPatch ;
std : : unordered_map < std : : string , std : : unordered_map < std : : string , GfxPatch > > originalGfx ;
// Attention! This is primarily for cosmetics & bug fixes. For things like mods and model replacement you should be using OTRs
// instead (When that is available). Index can be found using the commented out section below.
extern " C " void ResourceMgr_PatchGfxByName ( const char * path , const char * patchName , int index , Gfx instruction ) {
2023-05-07 23:01:12 -04:00
auto res = std : : static_pointer_cast < LUS : : DisplayList > (
LUS : : Context : : GetInstance ( ) - > GetResourceManager ( ) - > LoadResource ( path ) ) ;
2022-10-12 17:20:13 -04:00
// Leaving this here for people attempting to find the correct Dlist index to patch
/*if (strcmp("__OTR__objects/object_gi_longsword/gGiBiggoronSwordDL", path) == 0) {
for ( int i = 0 ; i < res - > instructions . size ( ) ; i + + ) {
Gfx * gfx = ( Gfx * ) & res - > instructions [ i ] ;
// Log all commands
// SPDLOG_INFO("index:{} command:{}", i, gfx->words.w0 >> 24);
// Log only SetPrimColors
if ( gfx - > words . w0 > > 24 = = 250 ) {
SPDLOG_INFO ( " index:{} r:{} g:{} b:{} a:{} " , i , _SHIFTR ( gfx - > words . w1 , 24 , 8 ) , _SHIFTR ( gfx - > words . w1 , 16 , 8 ) , _SHIFTR ( gfx - > words . w1 , 8 , 8 ) , _SHIFTR ( gfx - > words . w1 , 0 , 8 ) ) ;
}
}
} */
2022-12-20 14:19:25 -05:00
// Index refers to individual gfx words, which are half the size on 32-bit
2023-01-17 00:17:49 -05:00
// if (sizeof(uintptr_t) < 8) {
// index /= 2;
// }
2022-12-20 14:19:25 -05:00
2023-11-14 16:37:03 -05:00
// Do not patch custom assets as they most likely do not have the same instructions as authentic assets
if ( res - > GetInitData ( ) - > IsCustom ) {
return ;
}
2023-01-17 00:17:49 -05:00
Gfx * gfx = ( Gfx * ) & res - > Instructions [ index ] ;
2022-10-12 17:20:13 -04:00
if ( ! originalGfx . contains ( path ) | | ! originalGfx [ path ] . contains ( patchName ) ) {
originalGfx [ path ] [ patchName ] = {
index ,
* gfx
} ;
}
* gfx = instruction ;
}
2023-06-12 17:48:26 -04:00
extern " C " void ResourceMgr_PatchGfxCopyCommandByName ( const char * path , const char * patchName , int destinationIndex , int sourceIndex ) {
auto res = std : : static_pointer_cast < LUS : : DisplayList > (
LUS : : Context : : GetInstance ( ) - > GetResourceManager ( ) - > LoadResource ( path ) ) ;
2023-11-14 16:37:03 -05:00
// Do not patch custom assets as they most likely do not have the same instructions as authentic assets
if ( res - > GetInitData ( ) - > IsCustom ) {
return ;
}
2023-06-12 17:48:26 -04:00
Gfx * destinationGfx = ( Gfx * ) & res - > Instructions [ destinationIndex ] ;
Gfx sourceGfx = res - > Instructions [ sourceIndex ] ;
if ( ! originalGfx . contains ( path ) | | ! originalGfx [ path ] . contains ( patchName ) ) {
originalGfx [ path ] [ patchName ] = {
destinationIndex ,
* destinationGfx
} ;
}
* destinationGfx = sourceGfx ;
}
2022-10-12 17:20:13 -04:00
extern " C " void ResourceMgr_UnpatchGfxByName ( const char * path , const char * patchName ) {
if ( originalGfx . contains ( path ) & & originalGfx [ path ] . contains ( patchName ) ) {
2023-05-07 23:01:12 -04:00
auto res = std : : static_pointer_cast < LUS : : DisplayList > (
LUS : : Context : : GetInstance ( ) - > GetResourceManager ( ) - > LoadResource ( path ) ) ;
2022-10-12 17:20:13 -04:00
2023-01-17 00:17:49 -05:00
Gfx * gfx = ( Gfx * ) & res - > Instructions [ originalGfx [ path ] [ patchName ] . index ] ;
2022-10-12 17:20:13 -04:00
* gfx = originalGfx [ path ] [ patchName ] . instruction ;
originalGfx [ path ] . erase ( patchName ) ;
}
2022-05-02 18:26:32 -04:00
}
2022-04-06 20:42:23 -04:00
extern " C " char * ResourceMgr_LoadArrayByName ( const char * path )
2022-03-21 21:51:23 -04:00
{
2023-05-07 23:01:12 -04:00
auto res = std : : static_pointer_cast < LUS : : Array > ( GetResourceByNameHandlingMQ ( path ) ) ;
2022-03-21 21:51:23 -04:00
2023-01-17 00:17:49 -05:00
return ( char * ) res - > Scalars . data ( ) ;
2022-03-21 21:51:23 -04:00
}
2022-04-06 20:42:23 -04:00
extern " C " char * ResourceMgr_LoadArrayByNameAsVec3s ( const char * path ) {
2023-05-07 23:01:12 -04:00
auto res = std : : static_pointer_cast < LUS : : Array > ( GetResourceByNameHandlingMQ ( path ) ) ;
2022-03-21 21:51:23 -04:00
2023-01-17 00:17:49 -05:00
// if (res->CachedGameAsset != nullptr)
// return (char*)res->CachedGameAsset;
// else
// {
Vec3s * data = ( Vec3s * ) malloc ( sizeof ( Vec3s ) * res - > Scalars . size ( ) ) ;
2022-03-21 21:51:23 -04:00
2023-01-17 00:17:49 -05:00
for ( size_t i = 0 ; i < res - > Scalars . size ( ) ; i + = 3 ) {
data [ ( i / 3 ) ] . x = res - > Scalars [ i + 0 ] . s16 ;
data [ ( i / 3 ) ] . y = res - > Scalars [ i + 1 ] . s16 ;
data [ ( i / 3 ) ] . z = res - > Scalars [ i + 2 ] . s16 ;
2022-03-21 21:51:23 -04:00
}
2023-01-17 00:17:49 -05:00
// res->CachedGameAsset = data;
2022-03-21 21:51:23 -04:00
return ( char * ) data ;
2023-01-17 00:17:49 -05:00
// }
2022-03-21 21:51:23 -04:00
}
2023-01-17 00:17:49 -05:00
extern " C " CollisionHeader * ResourceMgr_LoadColByName ( const char * path ) {
2023-06-03 15:27:45 -04:00
return ( CollisionHeader * ) ResourceGetDataByName ( path ) ;
2022-03-21 21:51:23 -04:00
}
2023-01-17 00:17:49 -05:00
extern " C " Vtx * ResourceMgr_LoadVtxByName ( char * path ) {
2023-06-03 15:27:45 -04:00
return ( Vtx * ) ResourceGetDataByName ( path ) ;
2022-03-21 21:51:23 -04:00
}
2023-01-17 00:17:49 -05:00
extern " C " SequenceData ResourceMgr_LoadSeqByName ( const char * path ) {
2023-06-03 15:27:45 -04:00
SequenceData * sequence = ( SequenceData * ) ResourceGetDataByName ( path ) ;
2023-01-17 00:17:49 -05:00
return * sequence ;
2022-06-01 13:06:32 -04:00
}
std : : map < std : : string , SoundFontSample * > cachedCustomSFs ;
2022-06-15 15:33:25 -04:00
extern " C " SoundFontSample * ReadCustomSample ( const char * path ) {
2023-01-17 00:17:49 -05:00
return nullptr ;
/*
2022-06-15 15:38:36 -04:00
if ( ! ExtensionCache . contains ( path ) )
2022-06-15 15:33:25 -04:00
return nullptr ;
2022-06-15 15:38:36 -04:00
ExtensionEntry entry = ExtensionCache [ path ] ;
2022-06-15 15:33:25 -04:00
2023-05-07 23:01:12 -04:00
auto sampleRaw = LUS : : Context : : GetInstance ( ) - > GetResourceManager ( ) - > LoadFile ( entry . path ) ;
2022-11-14 05:22:34 -05:00
uint32_t * strem = ( uint32_t * ) sampleRaw - > Buffer . get ( ) ;
2022-06-01 13:06:32 -04:00
uint8_t * strem2 = ( uint8_t * ) strem ;
2022-06-15 15:18:41 -04:00
SoundFontSample * sampleC = new SoundFontSample ;
2022-06-01 13:06:32 -04:00
2022-06-15 15:33:25 -04:00
if ( entry . ext = = " wav " ) {
2022-06-15 15:18:41 -04:00
drwav_uint32 channels ;
drwav_uint32 sampleRate ;
drwav_uint64 totalPcm ;
2022-06-19 03:03:04 -04:00
drmp3_int16 * pcmData =
2022-11-14 05:22:34 -05:00
drwav_open_memory_and_read_pcm_frames_s16 ( strem2 , sampleRaw - > BufferSize , & channels , & sampleRate , & totalPcm , NULL ) ;
2022-06-15 15:18:41 -04:00
sampleC - > size = totalPcm ;
sampleC - > sampleAddr = ( uint8_t * ) pcmData ;
2022-06-01 13:06:32 -04:00
sampleC - > codec = CODEC_S16 ;
2022-06-15 15:33:25 -04:00
sampleC - > loop = new AdpcmLoop ;
2022-06-01 13:06:32 -04:00
sampleC - > loop - > start = 0 ;
2022-06-15 15:18:41 -04:00
sampleC - > loop - > end = sampleC - > size - 1 ;
2022-06-01 13:06:32 -04:00
sampleC - > loop - > count = 0 ;
2022-06-10 13:37:50 -04:00
sampleC - > sampleRateMagicValue = ' RIFF ' ;
sampleC - > sampleRate = sampleRate ;
2022-06-01 16:11:11 -04:00
2022-06-15 15:33:25 -04:00
cachedCustomSFs [ path ] = sampleC ;
2022-06-01 13:06:32 -04:00
return sampleC ;
2022-06-15 15:18:41 -04:00
} else if ( entry . ext = = " mp3 " ) {
drmp3_config mp3Info ;
drmp3_uint64 totalPcm ;
drmp3_int16 * pcmData =
2022-11-14 05:22:34 -05:00
drmp3_open_memory_and_read_pcm_frames_s16 ( strem2 , sampleRaw - > BufferSize , & mp3Info , & totalPcm , NULL ) ;
2022-06-15 15:18:41 -04:00
sampleC - > size = totalPcm * mp3Info . channels * sizeof ( short ) ;
sampleC - > sampleAddr = ( uint8_t * ) pcmData ;
sampleC - > codec = CODEC_S16 ;
2022-06-15 15:33:25 -04:00
sampleC - > loop = new AdpcmLoop ;
2022-06-15 15:18:41 -04:00
sampleC - > loop - > start = 0 ;
sampleC - > loop - > end = sampleC - > size ;
sampleC - > loop - > count = 0 ;
sampleC - > sampleRateMagicValue = ' RIFF ' ;
sampleC - > sampleRate = mp3Info . sampleRate ;
2022-06-15 15:33:25 -04:00
cachedCustomSFs [ path ] = sampleC ;
2022-06-15 15:18:41 -04:00
return sampleC ;
}
2022-06-15 15:33:25 -04:00
2022-06-15 15:18:41 -04:00
return nullptr ;
2023-01-17 00:17:49 -05:00
*/
2022-06-15 15:18:41 -04:00
}
2023-01-17 00:17:49 -05:00
extern " C " SoundFontSample * ResourceMgr_LoadAudioSample ( const char * path ) {
2023-06-03 15:27:45 -04:00
return ( SoundFontSample * ) ResourceGetDataByName ( path ) ;
2022-06-01 13:06:32 -04:00
}
2022-06-14 00:59:31 -04:00
extern " C " SoundFont * ResourceMgr_LoadAudioSoundFont ( const char * path ) {
2023-06-03 15:27:45 -04:00
return ( SoundFont * ) ResourceGetDataByName ( path ) ;
2022-06-01 13:06:32 -04:00
}
2022-03-21 21:51:23 -04:00
extern " C " int ResourceMgr_OTRSigCheck ( char * imgData )
{
uintptr_t i = ( uintptr_t ) ( imgData ) ;
2022-06-17 00:39:07 -04:00
// if (i == 0xD9000000 || i == 0xE7000000 || (i & 1) == 1)
2022-05-14 19:19:02 -04:00
if ( ( i & 1 ) = = 1 )
2022-03-21 21:51:23 -04:00
return 0 ;
2022-06-17 00:39:07 -04:00
// if ((i & 0xFF000000) != 0xAB000000 && (i & 0xFF000000) != 0xCD000000 && i != 0) {
2022-05-14 19:19:02 -04:00
if ( i ! = 0 ) {
2022-03-21 21:51:23 -04:00
if ( imgData [ 0 ] = = ' _ ' & & imgData [ 1 ] = = ' _ ' & & imgData [ 2 ] = = ' O ' & & imgData [ 3 ] = = ' T ' & & imgData [ 4 ] = = ' R ' & &
imgData [ 5 ] = = ' _ ' & & imgData [ 6 ] = = ' _ ' )
return 1 ;
}
return 0 ;
}
2022-04-06 20:42:23 -04:00
extern " C " AnimationHeaderCommon * ResourceMgr_LoadAnimByName ( const char * path ) {
2023-06-03 15:27:45 -04:00
return ( AnimationHeaderCommon * ) ResourceGetDataByName ( path ) ;
2022-03-21 21:51:23 -04:00
}
2023-05-03 21:54:23 -04:00
extern " C " SkeletonHeader * ResourceMgr_LoadSkeletonByName ( const char * path , SkelAnime * skelAnime ) {
std : : string pathStr = std : : string ( path ) ;
static const std : : string sOtr = " __OTR__ " ;
if ( pathStr . starts_with ( sOtr ) ) {
pathStr = pathStr . substr ( sOtr . length ( ) ) ;
}
bool isAlt = CVarGetInteger ( " gAltAssets " , 0 ) ;
if ( isAlt ) {
2023-06-03 15:27:45 -04:00
pathStr = LUS : : IResource : : gAltAssetPrefix + pathStr ;
2023-05-03 21:54:23 -04:00
}
2023-06-03 15:27:45 -04:00
SkeletonHeader * skelHeader = ( SkeletonHeader * ) ResourceGetDataByName ( pathStr . c_str ( ) ) ;
2023-05-03 21:54:23 -04:00
// If there isn't an alternate model, load the regular one
if ( isAlt & & skelHeader = = NULL ) {
2023-06-03 15:27:45 -04:00
skelHeader = ( SkeletonHeader * ) ResourceGetDataByName ( path ) ;
2023-05-03 21:54:23 -04:00
}
2023-04-27 19:20:41 -04:00
// This function is only called when a skeleton is initialized.
// Therefore we can take this oppurtunity to take note of the Skeleton that is created...
if ( skelAnime ! = nullptr ) {
auto stringPath = std : : string ( path ) ;
2023-05-07 23:01:12 -04:00
LUS : : SkeletonPatcher : : RegisterSkeleton ( stringPath , skelAnime ) ;
2023-04-27 19:20:41 -04:00
}
return skelHeader ;
}
extern " C " void ResourceMgr_UnregisterSkeleton ( SkelAnime * skelAnime ) {
if ( skelAnime ! = nullptr )
2023-05-07 23:01:12 -04:00
LUS : : SkeletonPatcher : : UnregisterSkeleton ( skelAnime ) ;
2023-04-27 19:20:41 -04:00
}
extern " C " void ResourceMgr_ClearSkeletons ( SkelAnime * skelAnime ) {
if ( skelAnime ! = nullptr )
2023-05-07 23:01:12 -04:00
LUS : : SkeletonPatcher : : ClearSkeletons ( ) ;
2022-03-21 21:51:23 -04:00
}
2023-01-17 00:17:49 -05:00
extern " C " s32 * ResourceMgr_LoadCSByName ( const char * path ) {
2023-02-26 20:55:40 -05:00
return ( s32 * ) GetResourceDataByNameHandlingMQ ( path ) ;
2022-03-21 21:51:23 -04:00
}
2023-06-03 15:27:45 -04:00
std : : filesystem : : path GetSaveFile ( std : : shared_ptr < LUS : : Config > Conf ) {
const std : : string fileName = Conf - > GetString ( " Game.SaveName " , LUS : : Context : : GetPathRelativeToAppDirectory ( " oot_save.sav " ) ) ;
2022-06-20 13:54:44 -04:00
std : : filesystem : : path saveFile = std : : filesystem : : absolute ( fileName ) ;
2022-07-13 23:12:11 -04:00
if ( ! exists ( saveFile . parent_path ( ) ) ) {
create_directories ( saveFile . parent_path ( ) ) ;
2022-06-20 13:54:44 -04:00
}
return saveFile ;
}
std : : filesystem : : path GetSaveFile ( ) {
2023-06-03 15:27:45 -04:00
const std : : shared_ptr < LUS : : Config > pConf = OTRGlobals : : Instance - > context - > GetConfig ( ) ;
2022-06-20 13:54:44 -04:00
2022-07-13 23:12:11 -04:00
return GetSaveFile ( pConf ) ;
2022-06-20 13:54:44 -04:00
}
2022-07-13 23:12:11 -04:00
void OTRGlobals : : CheckSaveFile ( size_t sramSize ) const {
2023-06-03 15:27:45 -04:00
const std : : shared_ptr < LUS : : Config > pConf = Instance - > context - > GetConfig ( ) ;
2022-06-20 13:54:44 -04:00
2022-07-13 23:12:11 -04:00
std : : filesystem : : path savePath = GetSaveFile ( pConf ) ;
2022-06-20 13:54:44 -04:00
std : : fstream saveFile ( savePath , std : : fstream : : in | std : : fstream : : out | std : : fstream : : binary ) ;
if ( saveFile . fail ( ) ) {
saveFile . open ( savePath , std : : fstream : : in | std : : fstream : : out | std : : fstream : : binary | std : : fstream : : app ) ;
for ( int i = 0 ; i < sramSize ; + + i ) {
saveFile . write ( " \0 " , 1 ) ;
}
}
saveFile . close ( ) ;
}
extern " C " void Ctx_ReadSaveFile ( uintptr_t addr , void * dramAddr , size_t size ) {
2023-05-03 20:46:26 -04:00
SaveManager : : ReadSaveFile ( GetSaveFile ( ) , addr , dramAddr , size ) ;
2022-06-20 13:54:44 -04:00
}
extern " C " void Ctx_WriteSaveFile ( uintptr_t addr , void * dramAddr , size_t size ) {
2023-05-03 20:46:26 -04:00
SaveManager : : WriteSaveFile ( GetSaveFile ( ) , addr , dramAddr , size ) ;
2022-06-20 13:54:44 -04:00
}
2022-03-21 21:51:23 -04:00
std : : wstring StringToU16 ( const std : : string & s ) {
std : : vector < unsigned long > result ;
size_t i = 0 ;
while ( i < s . size ( ) ) {
unsigned long uni ;
size_t nbytes ;
bool error = false ;
unsigned char c = s [ i + + ] ;
if ( c < 0x80 ) { // ascii
uni = c ;
nbytes = 0 ;
} else if ( c < = 0xBF ) { // assuming kata/hiragana delimiter
nbytes = 0 ;
uni = ' \1 ' ;
} else if ( c < = 0xDF ) {
uni = c & 0x1F ;
nbytes = 1 ;
} else if ( c < = 0xEF ) {
uni = c & 0x0F ;
nbytes = 2 ;
} else if ( c < = 0xF7 ) {
uni = c & 0x07 ;
nbytes = 3 ;
}
for ( size_t j = 0 ; j < nbytes ; + + j ) {
unsigned char c = s [ i + + ] ;
uni < < = 6 ;
uni + = c & 0x3F ;
}
if ( uni ! = ' \1 ' )
result . push_back ( uni ) ;
}
std : : wstring utf16 ;
for ( size_t i = 0 ; i < result . size ( ) ; + + i ) {
unsigned long uni = result [ i ] ;
if ( uni < = 0xFFFF ) {
utf16 + = ( wchar_t ) uni ;
} else {
uni - = 0x10000 ;
utf16 + = ( wchar_t ) ( ( uni > > 10 ) + 0xD800 ) ;
utf16 + = ( wchar_t ) ( ( uni & 0x3FF ) + 0xDC00 ) ;
}
}
return utf16 ;
}
testing out item replacement (#416)
* skip learning song of storms
* don't set flag when getting goron tunic as child
* Initiates prelude check when master sword unloads.
Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again.
* Stops Shadow Temple lore prompts from appearing in rando.
* Skips cutscene of royal tomb explosion in rando.
Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here.
* Improves visual of exploding gravestone.
* Adds some comments explaining the rando differences
* Skip ruto text box in jabu blue warp
For rando
* skip intro cutscene in dodongo's cavern
* load spoiler files on boot, fix spoilerfile existing check when making new saves
* name entry dropped spoiler logic
* make sure to actually init the cvar
* no chime on load
* uncomment
* Skip ganondrof cutscene
Skip to scream part of the death animation, skipping the text boxes etc. For rando
* Update z_boss_ganondrof.c
* skip owl flight cutscenes in rando
* Fixes skipped text so it only applies to shadow temple.
Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors.
* Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case.
* TEST: Text for item
* Adding ganon flavor text
* ADD: AMMO Count
* format ganon text/hint text
* Autoskip the tower cutscene if settings call for tower collapse.
* ganon hint text logic
* Improved prelude after time travel fix
* swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things.
* this is all i did
* not the cleanest code ever but it's working
* ADD: GS Count
* ADD: Wallter (crash for now)
* TWEAK: Wallet check
* FIX: Use DrawItem instread of DrawUpgrade... b-baka!
* Fixes some vanilla bugs introduced by rando code.
* Added cutscene skip for zelda escaping
Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger
* ADD: X Spacing + Placeholders for song
* ADD: default case for items
* TWEAK: Spacing
* FIX: Light Arrow
* ADD: Ammo Option
* use groups instead
* ADD: More spacing logic
* songs and names
* TWEAK: Color on wallet
* colors
* Added flags cutscene before nabooru fight
* ADD: ChromaKey text
* First attempt skip cs after nabooru defeat
* Better implementation for specific rando cutscene skips
* use pulseaudio defaults
* spaces/tabs
* move color push/pop to stop crash
* make the colors work again
* the real bottle fix
* pulseaudio values tuned for n64 audio at 44.1khz
* update tlength
* remove one hardcoded samplerate
* Cleaned up and fixed zelda escape skip
The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of.
* Revert one line to match original
nothing functional
* another hint line that breaks autonewline logic
* don't autospawn epona if we don't have the song/ocarina
* Trying to use iron knuckle death effects
not working yet
* Streamlined OoT cutscene skip for future additions
Also cleaned up if statement in general
* Made if statement more readable
Also added clarity for what cutscene was skipped
* Fixed typo in comment
* Janky nabooru defeat cs skip
* altar text formatting (gonna need help shortening some of the french ones)
* more altar text formatting
* english altar text formatting complete
* make gtg blocking guard check for card not bridge
* FIX: Typo!
* FIX: Uppercases
* FIX: Typo
* TWEAK: Alter + some names
* TWEAK: More caps!
* ADD: Missing string
TWEAK more uppercases and namefixe
s
* Hide nabooru death by covering her in flames
* bandaid fix for death crash issue
* Twinrova defeat cs skip
Skips the animation and manually calls the function to show the "beam" around the sisters
* fix crash
* fix caps to match
* fix great fairy reward mashing/shielding issue
* TWEAK : Typo clé to Clé
* TWEAK: Some Altar hints
TWEAK: Some capitals
* TWEAK: Unmatching text + some cap again
* TWEAK: More tweaks
* fix build
* remove extra json.hpp, add hint
* Update randomizer_item_tracker.cpp
* TWEAK: Double Defense with RedParticles instead of white
* make sure we don't optimize out the check to ensure a spoilerfile exists
* vanilla ganon boss key hint formatting
* TWEAK: FR- better way of the hero text
* fix
* and again
* Initializes dungeonsDone items in gSaveContext to 0.
* Replaces sizeof calculation with a NUM_DUNGEONS constant.
* Fixes Saria's Gift on the LW Bridge from getting killed when holding shield.
* More airtight fix for Saria's Gift on the Bridge.
* Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId.
* Invalidate text box icon before drawing
* Fixes the case where Saria's gift is an Ice Trap.
We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine.
* Initial commit
Might need changing when we change the settings in the future
* Fixes Door of Time opening cutscene after warping with prelude.
* Initial waterfall skip
Very rudimentary way of doing things but it seems to work so :shrug:
* inital rework
* fixed default rotation for 2D sprites
* fix tab/space issues
* 3d drops rando merge fix again
* Allows Impa to appear in the Lullaby check post drawbridge escape.
* Changes Ganon's Trials Count setting to a checkbox
The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed.
* Sets all Ganon's Trials to incomplete in new saves.
Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131
* fix castle guards when oot throw cutscene has already played in rando
* Properly removes the beams when trials are cleared.
* Removes Question Mark from Skip Ganon's Trials UI.
* Adds a todo comment about when to change back to slider.
* make deku seeds check for bullet bag
* Various tweaks
TWEAK: Altar Text
TWEAK: Hint names
TWEAK: Replace more problematic œ to oe
* upgrade ocarina on both child and adult equips
* FIX: Jabu Item
* update equipped hookshot/longshot when obtained as other age
* add hint
* don't give the bgs check without the claim check
* Skips Darunia Cutscene in Fire Temple
* Added a TODO note about not skipping the cutscene.
There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch.
* remove todo
* restore fast ocarina option in imgui that was lost in merge
* Fixes grey screen issue + tooltip for 2 handed shield
* update to use dg instead of g for textures in item tracker
* TWEAK: Default color for cosmetic RAND button was not the corect one
* fix texture crash, remove unused item tracker code
* don't open mask shop until we get zelda's letter
* Update README.md
* Prevents "correct" chime under incorrect conditions.
* Fixes typo in conditional and adds "bonk" sound effect.
"Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time.
* remove modify dpad equips toggle, replace with checks for dpad menu
* remove extra check
* add ability to hold c-up to assign to dpad when dpad menuing is enabled
* disable d-pad navigation on item menu when holding c-up to equip
* dpad+c-up stuff for equipment menu
* ADD: Checbox for songs colors
* TWEAK: RandoColors for normal songs
* kind of quick and dirty but it works
* TWEAK: Clarity of the tooltip
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Dog <5172592+Dog@users.noreply.github.com>
Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com>
Co-authored-by: Baoulettes <perlouzerie@hotmail.fr>
Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
int CopyStringToCharBuffer ( const std : : string & inputStr , char * buffer , const int maxBufferSize ) {
if ( ! inputStr . empty ( ) ) {
// Prevent potential horrible overflow due to implicit conversion of maxBufferSize to an unsigned. Prevents negatives.
memset ( buffer , 0 , std : : max < int > ( 0 , maxBufferSize ) ) ;
// Gaurentee that this value will be greater than 0, regardless of passed variables.
const int copiedCharLen = std : : min < int > ( std : : max < int > ( 0 , maxBufferSize - 1 ) , inputStr . length ( ) ) ;
memcpy ( buffer , inputStr . c_str ( ) , copiedCharLen ) ;
return copiedCharLen ;
}
return 0 ;
}
2022-03-21 21:51:23 -04:00
extern " C " void OTRGfxPrint ( const char * str , void * printer , void ( * printImpl ) ( void * , char ) ) {
const std : : vector < uint32_t > hira1 = {
u ' を ' , u ' ぁ ' , u ' ぃ ' , u ' ぅ ' , u ' ぇ ' , u ' ぉ ' , u ' ゃ ' , u ' ゅ ' , u ' ょ ' , u ' っ ' , u ' - ' , u ' あ ' , u ' い ' ,
u ' う ' , u ' え ' , u ' お ' , u ' か ' , u ' き ' , u ' く ' , u ' け ' , u ' こ ' , u ' さ ' , u ' し ' , u ' す ' , u ' せ ' , u ' そ ' ,
} ;
const std : : vector < uint32_t > hira2 = {
u ' た ' , u ' ち ' , u ' つ ' , u ' て ' , u ' と ' , u ' な ' , u ' に ' , u ' ぬ ' , u ' ね ' , u ' の ' , u ' は ' , u ' ひ ' , u ' ふ ' , u ' へ ' , u ' ほ ' , u ' ま ' ,
u ' み ' , u ' む ' , u ' め ' , u ' も ' , u ' や ' , u ' ゆ ' , u ' よ ' , u ' ら ' , u ' り ' , u ' る ' , u ' れ ' , u ' ろ ' , u ' わ ' , u ' ん ' , u ' ゛ ' , u ' ゜ ' ,
} ;
std : : wstring wstr = StringToU16 ( str ) ;
for ( const auto & c : wstr ) {
unsigned char convt = ' ' ;
if ( c < 0x80 ) {
printImpl ( printer , c ) ;
} else if ( c > = u ' 。 ' & & c < = u ' ゚ ' ) { // katakana
printImpl ( printer , c - 0xFEC0 ) ;
} else {
auto it = std : : find ( hira1 . begin ( ) , hira1 . end ( ) , c ) ;
if ( it ! = hira1 . end ( ) ) { // hiragana block 1
printImpl ( printer , 0x88 + std : : distance ( hira1 . begin ( ) , it ) ) ;
}
auto it2 = std : : find ( hira2 . begin ( ) , hira2 . end ( ) , c ) ;
if ( it2 ! = hira2 . end ( ) ) { // hiragana block 2
printImpl ( printer , 0xe0 + std : : distance ( hira2 . begin ( ) , it2 ) ) ;
}
}
}
}
extern " C " uint32_t OTRGetCurrentWidth ( ) {
2023-06-03 15:27:45 -04:00
return OTRGlobals : : Instance - > context - > GetWindow ( ) - > GetWidth ( ) ;
2022-03-21 21:51:23 -04:00
}
extern " C " uint32_t OTRGetCurrentHeight ( ) {
2023-06-03 15:27:45 -04:00
return OTRGlobals : : Instance - > context - > GetWindow ( ) - > GetHeight ( ) ;
2022-03-21 21:51:23 -04:00
}
2023-05-28 18:40:53 -04:00
Color_RGB8 GetColorForControllerLED ( ) {
auto brightness = CVarGetFloat ( " gLedBrightness " , 1.0f ) / 1.0f ;
Color_RGB8 color = { 0 , 0 , 0 } ;
if ( brightness > 0.0f ) {
LEDColorSource source = static_cast < LEDColorSource > ( CVarGetInteger ( " gLedColorSource " , LED_SOURCE_TUNIC_ORIGINAL ) ) ;
bool criticalOverride = CVarGetInteger ( " gLedCriticalOverride " , 1 ) ;
if ( gPlayState & & ( source = = LED_SOURCE_TUNIC_ORIGINAL | | source = = LED_SOURCE_TUNIC_COSMETICS ) ) {
2023-10-30 11:56:36 -04:00
switch ( CUR_EQUIP_VALUE ( EQUIP_TYPE_TUNIC ) ) {
case EQUIP_VALUE_TUNIC_KOKIRI :
2023-05-28 18:40:53 -04:00
color = source = = LED_SOURCE_TUNIC_COSMETICS
? CVarGetColor24 ( " gCosmetics.Link_KokiriTunic.Value " , kokiriColor )
: kokiriColor ;
break ;
2023-10-30 11:56:36 -04:00
case EQUIP_VALUE_TUNIC_GORON :
2023-05-28 18:40:53 -04:00
color = source = = LED_SOURCE_TUNIC_COSMETICS
? CVarGetColor24 ( " gCosmetics.Link_GoronTunic.Value " , goronColor )
: goronColor ;
break ;
2023-10-30 11:56:36 -04:00
case EQUIP_VALUE_TUNIC_ZORA :
2023-05-28 18:40:53 -04:00
color = source = = LED_SOURCE_TUNIC_COSMETICS
? CVarGetColor24 ( " gCosmetics.Link_ZoraTunic.Value " , zoraColor )
: zoraColor ;
break ;
}
2023-05-04 23:56:57 -04:00
}
2023-10-30 11:55:53 -04:00
if ( gPlayState & & ( source = = LED_SOURCE_NAVI_ORIGINAL | | source = = LED_SOURCE_NAVI_COSMETICS ) ) {
Actor * arrowPointedActor = gPlayState - > actorCtx . targetCtx . arrowPointedActor ;
if ( arrowPointedActor ) {
ActorCategory category = ( ActorCategory ) arrowPointedActor - > category ;
switch ( category ) {
case ACTORCAT_PLAYER :
if ( source = = LED_SOURCE_NAVI_COSMETICS & &
CVarGetInteger ( " gCosmetics.Navi_IdlePrimary.Changed " , 0 ) ) {
color = CVarGetColor24 ( " gCosmetics.Navi_IdlePrimary.Value " , defaultIdleColor . inner ) ;
break ;
}
color = LEDColorDefaultNaviColorList [ category ] . inner ;
break ;
case ACTORCAT_NPC :
if ( source = = LED_SOURCE_NAVI_COSMETICS & &
CVarGetInteger ( " gCosmetics.Navi_NPCPrimary.Changed " , 0 ) ) {
color = CVarGetColor24 ( " gCosmetics.Navi_NPCPrimary.Value " , defaultNPCColor . inner ) ;
break ;
}
color = LEDColorDefaultNaviColorList [ category ] . inner ;
break ;
case ACTORCAT_ENEMY :
case ACTORCAT_BOSS :
if ( source = = LED_SOURCE_NAVI_COSMETICS & &
CVarGetInteger ( " gCosmetics.Navi_EnemyPrimary.Changed " , 0 ) ) {
color = CVarGetColor24 ( " gCosmetics.Navi_EnemyPrimary.Value " , defaultEnemyColor . inner ) ;
break ;
}
color = LEDColorDefaultNaviColorList [ category ] . inner ;
break ;
default :
if ( source = = LED_SOURCE_NAVI_COSMETICS & &
CVarGetInteger ( " gCosmetics.Navi_PropsPrimary.Changed " , 0 ) ) {
color = CVarGetColor24 ( " gCosmetics.Navi_PropsPrimary.Value " , defaultPropsColor . inner ) ;
break ;
}
color = LEDColorDefaultNaviColorList [ category ] . inner ;
}
} else { // No target actor.
if ( source = = LED_SOURCE_NAVI_COSMETICS & & CVarGetInteger ( " gCosmetics.Navi_IdlePrimary.Changed " , 0 ) ) {
color = CVarGetColor24 ( " gCosmetics.Navi_IdlePrimary.Value " , defaultIdleColor . inner ) ;
} else {
color = LEDColorDefaultNaviColorList [ ACTORCAT_PLAYER ] . inner ;
}
}
}
2023-05-28 18:40:53 -04:00
if ( source = = LED_SOURCE_CUSTOM ) {
color = CVarGetColor24 ( " gLedPort1Color " , { 255 , 255 , 255 } ) ;
}
2023-12-16 20:52:07 -05:00
if ( gPlayState & & ( criticalOverride | | source = = LED_SOURCE_HEALTH ) ) {
2023-05-28 18:40:53 -04:00
if ( HealthMeter_IsCritical ( ) ) {
color = { 0xFF , 0 , 0 } ;
2023-12-16 20:52:07 -05:00
} else if ( gSaveContext . healthCapacity ! = 0 & & source = = LED_SOURCE_HEALTH ) {
2023-05-28 18:40:53 -04:00
if ( gSaveContext . health / gSaveContext . healthCapacity < = 0.4f ) {
color = { 0xFF , 0xFF , 0 } ;
} else {
color = { 0 , 0xFF , 0 } ;
}
}
}
color . r = color . r * brightness ;
color . g = color . g * brightness ;
color . b = color . b * brightness ;
}
2023-05-04 23:56:57 -04:00
2023-05-28 18:40:53 -04:00
return color ;
}
extern " C " void OTRControllerCallback ( uint8_t rumble ) {
2023-11-20 08:02:15 -05:00
// We call this every tick, SDL accounts for this use and prevents driver spam
// https://github.com/libsdl-org/SDL/blob/f17058b562c8a1090c0c996b42982721ace90903/src/joystick/SDL_joystick.c#L1114-L1144
LUS : : Context : : GetInstance ( ) - > GetControlDeck ( ) - > GetControllerByPort ( 0 ) - > GetLED ( ) - > SetLEDColor ( GetColorForControllerLED ( ) ) ;
static std : : shared_ptr < SohInputEditorWindow > controllerConfigWindow = nullptr ;
if ( controllerConfigWindow = = nullptr ) {
controllerConfigWindow = std : : dynamic_pointer_cast < SohInputEditorWindow > ( LUS : : Context : : GetInstance ( ) - > GetWindow ( ) - > GetGui ( ) - > GetGuiWindow ( " Input Editor " ) ) ;
} else if ( controllerConfigWindow - > TestingRumble ( ) ) {
return ;
2022-03-21 21:51:23 -04:00
}
2023-05-28 18:40:53 -04:00
2023-11-20 08:02:15 -05:00
if ( rumble ) {
LUS : : Context : : GetInstance ( ) - > GetControlDeck ( ) - > GetControllerByPort ( 0 ) - > GetRumble ( ) - > StartRumble ( ) ;
} else {
LUS : : Context : : GetInstance ( ) - > GetControlDeck ( ) - > GetControllerByPort ( 0 ) - > GetRumble ( ) - > StopRumble ( ) ;
}
2022-03-21 21:51:23 -04:00
}
extern " C " float OTRGetAspectRatio ( ) {
return gfx_current_dimensions . aspect_ratio ;
}
extern " C " float OTRGetDimensionFromLeftEdge ( float v ) {
return ( SCREEN_WIDTH / 2 - SCREEN_HEIGHT / 2 * OTRGetAspectRatio ( ) + ( v ) ) ;
}
extern " C " float OTRGetDimensionFromRightEdge ( float v ) {
return ( SCREEN_WIDTH / 2 + SCREEN_HEIGHT / 2 * OTRGetAspectRatio ( ) - ( SCREEN_WIDTH - v ) ) ;
}
f32 floorf ( f32 x ) ;
f32 ceilf ( f32 x ) ;
extern " C " int16_t OTRGetRectDimensionFromLeftEdge ( float v ) {
return ( ( int ) floorf ( OTRGetDimensionFromLeftEdge ( v ) ) ) ;
}
extern " C " int16_t OTRGetRectDimensionFromRightEdge ( float v ) {
return ( ( int ) ceilf ( OTRGetDimensionFromRightEdge ( v ) ) ) ;
}
extern " C " int AudioPlayer_Buffered ( void ) {
2023-01-21 18:05:05 -05:00
return AudioPlayerBuffered ( ) ;
2022-03-21 21:51:23 -04:00
}
extern " C " int AudioPlayer_GetDesiredBuffered ( void ) {
2023-01-21 18:05:05 -05:00
return AudioPlayerGetDesiredBuffered ( ) ;
2022-03-21 21:51:23 -04:00
}
extern " C " void AudioPlayer_Play ( const uint8_t * buf , uint32_t len ) {
2023-01-21 18:05:05 -05:00
AudioPlayerPlayFrame ( buf , len ) ;
2022-03-21 21:51:23 -04:00
}
2022-04-26 19:50:24 -04:00
2022-12-26 06:37:40 -05:00
extern " C " int Controller_ShouldRumble ( size_t slot ) {
2023-11-20 08:02:15 -05:00
for ( auto [ id , mapping ] : LUS : : Context : : GetInstance ( )
- > GetControlDeck ( )
- > GetControllerByPort ( static_cast < uint8_t > ( slot ) )
- > GetRumble ( )
- > GetAllRumbleMappings ( ) ) {
if ( mapping - > PhysicalDeviceIsConnected ( ) ) {
2022-04-26 19:50:24 -04:00
return 1 ;
}
}
return 0 ;
}
2022-07-06 18:46:01 -04:00
extern " C " void * getN64WeirdFrame ( s32 i ) {
char * weirdFrameBytes = reinterpret_cast < char * > ( n64WeirdFrames ) ;
return & weirdFrameBytes [ i + sizeof ( n64WeirdFrames ) ] ;
}
testing out item replacement (#416)
* skip learning song of storms
* don't set flag when getting goron tunic as child
* Initiates prelude check when master sword unloads.
Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again.
* Stops Shadow Temple lore prompts from appearing in rando.
* Skips cutscene of royal tomb explosion in rando.
Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here.
* Improves visual of exploding gravestone.
* Adds some comments explaining the rando differences
* Skip ruto text box in jabu blue warp
For rando
* skip intro cutscene in dodongo's cavern
* load spoiler files on boot, fix spoilerfile existing check when making new saves
* name entry dropped spoiler logic
* make sure to actually init the cvar
* no chime on load
* uncomment
* Skip ganondrof cutscene
Skip to scream part of the death animation, skipping the text boxes etc. For rando
* Update z_boss_ganondrof.c
* skip owl flight cutscenes in rando
* Fixes skipped text so it only applies to shadow temple.
Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors.
* Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case.
* TEST: Text for item
* Adding ganon flavor text
* ADD: AMMO Count
* format ganon text/hint text
* Autoskip the tower cutscene if settings call for tower collapse.
* ganon hint text logic
* Improved prelude after time travel fix
* swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things.
* this is all i did
* not the cleanest code ever but it's working
* ADD: GS Count
* ADD: Wallter (crash for now)
* TWEAK: Wallet check
* FIX: Use DrawItem instread of DrawUpgrade... b-baka!
* Fixes some vanilla bugs introduced by rando code.
* Added cutscene skip for zelda escaping
Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger
* ADD: X Spacing + Placeholders for song
* ADD: default case for items
* TWEAK: Spacing
* FIX: Light Arrow
* ADD: Ammo Option
* use groups instead
* ADD: More spacing logic
* songs and names
* TWEAK: Color on wallet
* colors
* Added flags cutscene before nabooru fight
* ADD: ChromaKey text
* First attempt skip cs after nabooru defeat
* Better implementation for specific rando cutscene skips
* use pulseaudio defaults
* spaces/tabs
* move color push/pop to stop crash
* make the colors work again
* the real bottle fix
* pulseaudio values tuned for n64 audio at 44.1khz
* update tlength
* remove one hardcoded samplerate
* Cleaned up and fixed zelda escape skip
The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of.
* Revert one line to match original
nothing functional
* another hint line that breaks autonewline logic
* don't autospawn epona if we don't have the song/ocarina
* Trying to use iron knuckle death effects
not working yet
* Streamlined OoT cutscene skip for future additions
Also cleaned up if statement in general
* Made if statement more readable
Also added clarity for what cutscene was skipped
* Fixed typo in comment
* Janky nabooru defeat cs skip
* altar text formatting (gonna need help shortening some of the french ones)
* more altar text formatting
* english altar text formatting complete
* make gtg blocking guard check for card not bridge
* FIX: Typo!
* FIX: Uppercases
* FIX: Typo
* TWEAK: Alter + some names
* TWEAK: More caps!
* ADD: Missing string
TWEAK more uppercases and namefixe
s
* Hide nabooru death by covering her in flames
* bandaid fix for death crash issue
* Twinrova defeat cs skip
Skips the animation and manually calls the function to show the "beam" around the sisters
* fix crash
* fix caps to match
* fix great fairy reward mashing/shielding issue
* TWEAK : Typo clé to Clé
* TWEAK: Some Altar hints
TWEAK: Some capitals
* TWEAK: Unmatching text + some cap again
* TWEAK: More tweaks
* fix build
* remove extra json.hpp, add hint
* Update randomizer_item_tracker.cpp
* TWEAK: Double Defense with RedParticles instead of white
* make sure we don't optimize out the check to ensure a spoilerfile exists
* vanilla ganon boss key hint formatting
* TWEAK: FR- better way of the hero text
* fix
* and again
* Initializes dungeonsDone items in gSaveContext to 0.
* Replaces sizeof calculation with a NUM_DUNGEONS constant.
* Fixes Saria's Gift on the LW Bridge from getting killed when holding shield.
* More airtight fix for Saria's Gift on the Bridge.
* Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId.
* Invalidate text box icon before drawing
* Fixes the case where Saria's gift is an Ice Trap.
We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine.
* Initial commit
Might need changing when we change the settings in the future
* Fixes Door of Time opening cutscene after warping with prelude.
* Initial waterfall skip
Very rudimentary way of doing things but it seems to work so :shrug:
* inital rework
* fixed default rotation for 2D sprites
* fix tab/space issues
* 3d drops rando merge fix again
* Allows Impa to appear in the Lullaby check post drawbridge escape.
* Changes Ganon's Trials Count setting to a checkbox
The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed.
* Sets all Ganon's Trials to incomplete in new saves.
Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131
* fix castle guards when oot throw cutscene has already played in rando
* Properly removes the beams when trials are cleared.
* Removes Question Mark from Skip Ganon's Trials UI.
* Adds a todo comment about when to change back to slider.
* make deku seeds check for bullet bag
* Various tweaks
TWEAK: Altar Text
TWEAK: Hint names
TWEAK: Replace more problematic œ to oe
* upgrade ocarina on both child and adult equips
* FIX: Jabu Item
* update equipped hookshot/longshot when obtained as other age
* add hint
* don't give the bgs check without the claim check
* Skips Darunia Cutscene in Fire Temple
* Added a TODO note about not skipping the cutscene.
There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch.
* remove todo
* restore fast ocarina option in imgui that was lost in merge
* Fixes grey screen issue + tooltip for 2 handed shield
* update to use dg instead of g for textures in item tracker
* TWEAK: Default color for cosmetic RAND button was not the corect one
* fix texture crash, remove unused item tracker code
* don't open mask shop until we get zelda's letter
* Update README.md
* Prevents "correct" chime under incorrect conditions.
* Fixes typo in conditional and adds "bonk" sound effect.
"Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time.
* remove modify dpad equips toggle, replace with checks for dpad menu
* remove extra check
* add ability to hold c-up to assign to dpad when dpad menuing is enabled
* disable d-pad navigation on item menu when holding c-up to equip
* dpad+c-up stuff for equipment menu
* ADD: Checbox for songs colors
* TWEAK: RandoColors for normal songs
* kind of quick and dirty but it works
* TWEAK: Clarity of the tooltip
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Dog <5172592+Dog@users.noreply.github.com>
Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com>
Co-authored-by: Baoulettes <perlouzerie@hotmail.fr>
Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
2022-10-24 14:16:59 -04:00
extern " C " int GetEquipNowMessage ( char * buffer , char * src , const int maxBufferSize ) {
2023-05-17 22:24:24 -04:00
CustomMessage customMessage ( " \x04 \x1A \x08 "
2023-06-01 21:40:58 -04:00
" Would you like to equip it now? "
2023-05-17 22:24:24 -04:00
" \x09 && "
" \x1B %g "
2023-06-01 21:40:58 -04:00
" Yes "
2023-05-17 22:24:24 -04:00
" & "
2023-06-01 21:40:58 -04:00
" No "
2023-05-17 22:24:24 -04:00
" %w \x02 " ,
" \x04 \x1A \x08 "
" M "
" \x9A "
" chtest Du es jetzt ausr \x9E sten? "
" \x09 && "
" \x1B %g "
" Ja! "
" & "
" Nein! "
" %w \x02 " ,
2023-06-01 21:40:58 -04:00
" \x04 \x1A \x08 "
" D \x96 sirez-vous l' \x96 quiper maintenant? "
2023-05-17 22:24:24 -04:00
" \x09 && "
" \x1B %g "
2023-06-01 21:40:58 -04:00
" Oui "
2023-05-17 22:24:24 -04:00
" & "
2023-06-01 21:40:58 -04:00
" Non "
2023-05-17 22:24:24 -04:00
" %w \x02 " ) ;
customMessage . Format ( ) ;
2022-10-24 14:16:59 -04:00
std : : string postfix ;
if ( gSaveContext . language = = LANGUAGE_FRA ) {
2023-05-17 22:24:24 -04:00
postfix = customMessage . GetFrench ( ) ;
2022-10-24 14:16:59 -04:00
} else if ( gSaveContext . language = = LANGUAGE_GER ) {
2023-05-17 22:24:24 -04:00
postfix = customMessage . GetGerman ( ) ;
2022-10-24 14:16:59 -04:00
} else {
2023-05-17 22:24:24 -04:00
postfix = customMessage . GetEnglish ( ) ;
2022-10-24 14:16:59 -04:00
}
std : : string str ;
std : : string FixedBaseStr ( src ) ;
int RemoveControlChar = FixedBaseStr . find_first_of ( " \x02 " ) ;
if ( RemoveControlChar ! = std : : string : : npos ) {
FixedBaseStr = FixedBaseStr . substr ( 0 , RemoveControlChar ) ;
}
str = FixedBaseStr + postfix ;
if ( ! str . empty ( ) ) {
memset ( buffer , 0 , maxBufferSize ) ;
const int copiedCharLen = std : : min < int > ( maxBufferSize - 1 , str . length ( ) ) ;
memcpy ( buffer , str . c_str ( ) , copiedCharLen ) ;
return copiedCharLen ;
}
return 0 ;
}
More gap-bridging (#3323)
* Initial StaticData and RandoItem class definitions
* Initial implementation of RandoItem class.
* Rerranges RandoItem Constructor parameters
The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on.
* Switches static data from map to static array.
Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values.
* Defines part of the randomizer item list.
* Adds more item class instances to item_list.cpp
Up through bottles, many more items still to go.
* Adds song items
* Adds Maps and Compasses to the item_list
* Added Key Items to item_list
* Added Key Rings to item_list
* Added Dungeon Rewards to item_list
* Adds generic items and refills to item_list
* Adds shop items, triforce, and hints
Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them.
* Adds in the stages of progressive items
These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.)
* Remove GetItemEntry data from progressive items
* Moves/adds function definitions to item/item_list
* Refactors GetItemEntry data
It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.)
* Adds item class member for if item is progressive
* Removes unneeded stuff from initializer list macro
* Replaces relevant `uint32_t`s w/ `RandomizerGet`s
Also replaces calls to the ItemTable method with StaticData::RetrieveItem
* Switches our runtime code to use the new itemList.
* Changes just enough hint gen code to compile
* Initial Definition of Location Class
* Initial Implementation of Location
* Fixes some names and definitions.
* Extracts ActorID and SceneID enums to separate files.
This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected.
* Replaces the forward definitions with the new imports.
* Adds missing data for RandomizerCheckObjects.
* Definition and first entry of locationTable
* Added Mido's House Locations
* Added locations up through lost woods.
* Adds in Hyrule Field locations.
* Adds Lake Hylia locations
* Adds location name comments
* Adds Gerudo Valley Locations
* Adds Gerudo Fortress locations.
* Adds the Wasteland and Collosus locations
* Adds Market locations
* Adds Hyrule Castle locations.
* Adds Kakariko and Graveyard locations.
* Adds Death Mountain checks.
* Adds Goron City locations
* Adds Death Mountain Crater locations
* Adds Zora's River locations
* Added Zora's Domain Locations.
* Added Zora's Fountain locations
* Adds Lon Lon Ranch locations.
* Adds Deku Tree locations
* Adds Dodongo's Cavern Locations.
* Adds Jabu Jabu's Belly Locations
* Adds Forest Temple Locations
* Adds Fire Temple Locations
* Adds Water Temple Locations
* Added Spirit Temple Locations
* Some of shadow temple locations.
* Adds remaining Shadow Temple locations
* Fixes a leftover merge conflict
* Adds Bottom of the Well locations.
* Adds Ice Cavern locations
* Adds GTG locations.
* Adds Ganon's Castle and Tower locations
* Adds dungeon Gold Skulltula locations.
* Adds Overworld Gold Skulltula locations
* Adds dungeon reward locations
* Adds Heart Container Locations
* Adds Cutscene and Song locations
* Adds Cow locations
* Adds Shop locations.
* Adds hint locations
* Adds function for retrieving the Location data.
* Initial definition of ItemLocation structure for tracking runtime data
* First push on converting code to use new location definitions
* Changes hints to use the new tables
* Further conversion of hints to new definitions.
* Adds new Hint and Location IDs to area tables
* Moves areaTable to use new RandomizerRegion keys
* Removal of 3drando/item_location files.
* Uses new RandomizerRegion keys in entrance.cpp
* Final push for removal of massive keys.hpp enum
* Uses new SceneID Enum Values
* Remove RandomizerCheckObject structs in favor of new location list.
* Fix a few stragglers to successfully build
* Rename of RandoItem to just Item, but in the Rando namespace
* Adds static hints (Light Arrows, Altar text, etc) to the new Hint table.
* More hint related fixes/edits
* small fix for #include path
* Fix various miscellaneous issues related to seed gen and spoiler parsing.
* Handle progressive items correctly.
* Fixes some hint generation logic
* Fix a few GetItemEntry niche bugs.
* Adds missing shop GI Entries
* Formatting fixes
* small formatting fix
* Namespace StaticData under Rando
* Added a note about a potential use-after-free.
I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used.
* Fixes missing location table entries
* Fixes LUS submodule and removes now-unused code
* Resolves weird duplicate definition issue
* Fix missing include
It was missed because not being included wasn't an issue on Windows.
* Fixes error present on Linux builds
* Fixes some issues with excluding locations
* Updates the Resolve Exclusion conflicts function
not sure if actually used, will look into that more later
* Removes some duplicate RGs
* More fixes of duplicate RG values.
* Fix a few duplication issues in the check tracker.
* Fix progressive bombchus.
* Minor typo fix, shouldn't really be affecting anything though
* Should fix some of the remaining check tracker issues.
* oops wrong boolean operator
* Fix skulltulas in the check tracker.
* oops, missing comma
* re-formatting of HintStone locations
* Fixes issue when picking up second Progressive Bullet Bag
* Hide bombchu bowling bombchus
* Fixes missed skullScene in location_list
* Reformats shop items
* Re-formats cow checks
* reformat song locations
* reformat "cutscene" checks
* reformat heart container locaitons
* reformat Boss/Dungeon reward checks
* Hide Triforce Completed if not playing Triforce Hunt
* Fixes incorrect chest param
* reformat GS Tokens locations and cuts down on duplicate data
* reformat Ganons Castle checks
* reformat GTG check locations
* Prevents Gift from Raoru from appearing in the check tracker
* more reformatting (botw, ice cavern, shadow temple)
* Should fix a couple more check tracker checks
* reformat spirit temple checks
* reformat water and fire temple checks
* fix RC_ZR_GS_ABOVE_BRIDGE flag typo
* reformat Forest Temple checks
* Fix RC_LW_TRADE_ODD_POTION in check tracker
* reformat child dungeon locations
* reformat overworld locations
* reformat item entries
* New Item Override system
* use new ItemOverrides and use ItemLocations table for getting items
* Saves/Loads directly from/to new ItemLocation table with overrides for traps
* Removes gSaveContext.itemLocations
* Don't load spoiler file on boot automatically.
Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that:
1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded.
2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present).
3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet).
4. After that, a seed is generated and you are taken back to the file select screen with the new file present.
5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is
already in memory and in the save file (or at least I'll make it so that it is if it isn't already).
6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing
for hints to be in the user's language of choice no matter what language the spoiler file was generated in.
7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there
instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out
custom message syntax for various types of custom hints and whatnot. But that will be probably much later.
* Auto-gen rando seed when making a new rando file.
Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations:
1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed.
2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown.
3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen.
Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet.
* Fix a few typos/bugs
* Partial conversion to new Settings/Option class
* Further conversion to new settings/options classes
* New settings struct (not fully working, need to wire it up to SaveManager)
* Move save files to new settings struct. Also fixes MQ options to match 3drando
* Fixes some spoilerfile related issues
* Cleans up now unused arrays
* Fixes some unhandled entries in parse settings switch case
* Reimplements parsing of settings on file drop to re-generate seeds
* Move merchantPrices into ItemLocation tables.
* Move hints to new struct
* Fixes a few seed gen bugs surrounding hints
* Fix treasure chest game.
* Relocate Entrance Shuffle code into ctx
* Move entrances to new context at runtime
* Remove now unused code from SaveContext and randomizer.cpp/.h
* Fix non-windows builds?
* Moves Dungeon Quests to new context
* Move trials into new context
* Whoops, forgot to construct the Trials in the context.
* Fixes accidental nullptr reference
* Fixes bug with saving MQ dungeons
* Implements plando mode and removes now unused code.
Largely untested, expect some bugfixes.
* prevent a multiple definition bug
* another attempt to fix the gSeedTextures multiple def error
* Fixes some minor hint issues from conflict resolution
* Some additional glue needed for merge
* Fixes another couple of miscellaneous issues/inconsistencies.
* A few french corrections
* Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
extern " C " void Randomizer_ParseSpoiler ( const char * fileLoc ) {
OTRGlobals : : Instance - > gRandoContext - > ParseSpoiler ( fileLoc , CVarGetInteger ( " gPlandoMode " , 0 ) ) ;
Randomizer v2 (#1065)
* Revert changes to GetItemFromGet
* Fixes Ganon's Boss Key shuffled while regular boss Keys aren't.
* Enum + combo box
* Add obtainability checks correctly
* combobox title rename + no number tracking
* Fix repeatable purchases and bottles rendering incorrectly
* Move shopsanity option in GUI
* Struct instead of ImVec + basic comportment for all case
* Attempt to fix odd build issue
* Cast randoGet for ganons boss key
* Remove redundancy in KD room
* Update logic Cvar names
* Fix Ganons Trials coming from old save files. Fixes #1365
* Fixes crash when entering Ganon's Castle lobby on linux.
* Makes `Item_Give` safe to use with a NULL globalCtx.
This should allow it's use for giving items to Link's Pocket
during rando save initialization.
* Converts Song from Impa to use `Item_Give`
* Adds more options for Link's starting item.
* Removes unneeded `GiveLinkItem` functions.
* and make it build
* bring back new rando dropdown
* gSaveContext access in GameMenuBar.cpp
* Implement Skip Scarecrow's Song
* Reimplement progressive Bombchus
* Rando-next: Deku Nut and Seed ammo gives a blue rupee
Fixes #1390
* Fixes Link starting with BGS
* Persist item tracker notes
* Adjust Hooks include
* Use SohImGui::RequestCvarSaveOnNextTick
* Fix issues from LUS refactor
* Fix for overriding deku scrub messages
* Fix mistake from merge
oops
* Restore checkboxes to enhancements menu
These got lost in the merge
* Update location access logic
Including MQ locations in Spirit and GC now
* Implement rando bombchu drops
* Missing break
* Simplify mudwall collision check
There was no need to have a second collider specifically for Ice Arrow hits
* Update settings.cpp
* Simplify mudwall collision check
* Restore checkboxes in menu
Accidentally lost these during merge
* Clean up bool
* Update logic Cvar name
* Fixed capacity on ammmo tracking
* Fix for beans obtainability
* Hook into file delete and clear notes
* Incorporate magic arrows in rando settings
* Update tooltip
To inform the player that they might have to reload the room if they're enabling this for the first time.
* Update tooltip
* Add line break in tooltip
* Tooltip wording + line break
* tweak on main logic
* All color logic for all types
* Fix: changes to please new LUS
* Ensure itemTrackerNotes vector is not fully empty
* Implement's Tycoon Wallet.
* Refactor DrawItemCount and Use EnhancementCombobox for tracker capacity options
* small tweaks and rename
* always display XX/YY when in ammo/capacity mode
* Move all merchant messages to be generated on file load
* added hovertext for the number display
* Swap german and french translations for shop messages
* Set key colors to be on by default
* Add another flag to skip mask shop
* Fix Sold Out bug
* Fix gerudo keys, add disabled checkbox
* tooltip line break
* Add trials required and merchant prices to save file instead of loading from active spoiler log
* Remove trialsRequired persisting in save manager
* Adds slotIndex to girla (shop item actor) and uses that for IdentifyShopItem.
* Fix issue when merchantPrices is empty
* Fix for a single zeroed merchantPrice entry
* Fix #1417
* Implements items selling out and fixes issues with purchasing some items.
* Fixes order of operations so Rupees will be spent.
* Fixes sold out items not getting overwritten by the randomized info.
* Clarify var names and comments
Also preserve chain platform cutscene in spirit based on Link's position
* Remove !=0 from cvar check
* Clarify var names and comments
* Rename randomizerMerchantPrices to merchantPrices
* Handle shop items in SaveManager
* Fix merge mistake
* Base whats in the bazaar shop on entranceIndex instead of age
* Tidy up chain platform cutscene check
* Fix merge error
Didn't mean to have Zhora changes in here yet
* Use 3drando item table for parsing spoiler names
* Use another nested method instead of one at the top level to fetch the table
* Add missing newline
* Remove log
* Respect custom draw functions
* Fix issues with rendering songs
* Fix localized item names for shopsanity
* Implements a larger array of Sprites for the Icon Hash.
* Uses the hash instead of seed for spoilerfile name and icons.
* Removes some unused functions and variables in `spoiler_log.cpp`
* Prevents leading 0s added to hash from being in file name
* Changes filename format to icon indexes separated by dashes
* Hopefully makes Jenkins happy
* Hopefully makes Jenkins happy
* [Rando] Child Gerudo Fortress 37th Heartpiece randomized
Fixes #1071
* Add descriptions to save editor flags editor, and added randomizer flags (#1386)
* Add descriptions to save editor flags editor, and added randomizer flags
* Hide randomizer flags when not on a randomizer save
* Move flag descriptions to header file
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Fix merge error
* crash on pause menu on linux (only in appimage)
Fixes #1437
* Applies fix to Song from Impa as well.
* Allow buying tunics as child when shopsanity is on
* Fix for custom draw methods overriding sold out sign
* Simplify logic around shopsanity and fix some issues
* Fix dungeon reward stone rotation and add particles
* Fix some issues with ice traps
* Fix adult wallet having its own max capacity
* Fix amount of keys given for BotW
* format
* Use EnGirlAShopItem enum instead of raw hex values
* [#1434] Renders non-warp songs more consistently with warp songs
* A few changes around merchant messages
* Various changes from PR feedback
* Rando: Junk Hint missing french translation
* Typo
* Fix free scrub being at 0 instead of TEXT_SCRUB_RANDOM
* Replace magic numbers in message handler
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Fix BGS softlock for shopsanity
* Support tycoon wallet on tracker
* Revert "Fix BGS softlock for shopsanity"
This reverts commit 5fdb961ea460fb9a035cf0bb6ae77bfeedc1de0f.
* [#1053] Resolves an issue with shop items and bombchu bowling where BGS would display two message boxes
* Implements some necessary plumbing and resolves several Ice Trap Softlocks.
Adds a way for an item entry to tell what type of check it came from (NPC vs Chest vs Freestanding, etc.)
Sets this value from chests and item00 actors.
Relocates pendingIceTraps to save context so it can persist through cutscenes and get stored on save init for Link's Pocket and Song from Impa.
Restructures pendingIceTraps into a counter rather than a true or false, so that we can be frozen multiple times in a row if applicable (atm that should only be at the start of a run if Link's Pocket and Song from Impa were both Ice Traps).
Adds a textbox for Ice Traps and a special case of holding up nothing in the get item process. This fixes all the cases where Ice Traps would softlock due to the actor giving the item expecting a closing textbox. After holding the item above his head Link increments the pendingIceTraps counter by one and sets whatever flag he has pending.
None of the above plumbing applies to Ice Traps from chests, those work exactly the same as before, as do freestanding item00 ice traps (thanks to the additional check for ITEM_FROM_FREESTANDING.
OoT and Ruto's Letter count as NPC's, so they get the FOWL text box and set a pending ice trap rather than immediately freezing, since Link weill be in the water. Link will get frozen the next time he touches land, which in the case of OoT is after the fade to white and right before the Song of Time check.
Fixes all the other softlocks I'm aware of, including Fishing, Bombchu Bowling, Skull Kid, and losing the second Gerudo Archery check.
* fix bgs check in player
* move bgs logic for tokensanity into MOD_NONE check
* set bgs flag before `Item_Give`ing
* move bgs flag into `MOD_NONE` check in girla
* use existing check in `z_player`
* Adds comment explaining the decision to default ITEM_FROM_NPC.
* Rename pendingIceTraps to pendingIceTrapCount
* Adds some RANDOTODO comments about cleaning up a couple things.
* Merge branch 'develop-zhora' into ztornn
* manually restore changes to `z_player.c`
* Fix after some ice trap prepwork from earlier
* Actual fix
* Woops
* More rupee names
* Actually fix it
* Add back comment
* Fix Skip Scarecrow Song
* Fix ruto's letter and LH sun stick rendering
* Also fixes it for treasure chest game
* Tweak: Rando French Wallet
* ADD: French Tycoon
* Hide dungeon items/notes by default
* [#1301] Fix issue with UI not restoring after getting an item from biggoron
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Fix random crash that only affected one person for some reason
Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Sarge-117 <adam_branston@outlook.com>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: lil David <1337lilDavid@gmail.com>
Co-authored-by: Sarge-117 <108380086+Sarge-117@users.noreply.github.com>
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
2022-09-21 00:50:22 -04:00
}
More gap-bridging (#3323)
* Initial StaticData and RandoItem class definitions
* Initial implementation of RandoItem class.
* Rerranges RandoItem Constructor parameters
The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on.
* Switches static data from map to static array.
Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values.
* Defines part of the randomizer item list.
* Adds more item class instances to item_list.cpp
Up through bottles, many more items still to go.
* Adds song items
* Adds Maps and Compasses to the item_list
* Added Key Items to item_list
* Added Key Rings to item_list
* Added Dungeon Rewards to item_list
* Adds generic items and refills to item_list
* Adds shop items, triforce, and hints
Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them.
* Adds in the stages of progressive items
These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.)
* Remove GetItemEntry data from progressive items
* Moves/adds function definitions to item/item_list
* Refactors GetItemEntry data
It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.)
* Adds item class member for if item is progressive
* Removes unneeded stuff from initializer list macro
* Replaces relevant `uint32_t`s w/ `RandomizerGet`s
Also replaces calls to the ItemTable method with StaticData::RetrieveItem
* Switches our runtime code to use the new itemList.
* Changes just enough hint gen code to compile
* Initial Definition of Location Class
* Initial Implementation of Location
* Fixes some names and definitions.
* Extracts ActorID and SceneID enums to separate files.
This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected.
* Replaces the forward definitions with the new imports.
* Adds missing data for RandomizerCheckObjects.
* Definition and first entry of locationTable
* Added Mido's House Locations
* Added locations up through lost woods.
* Adds in Hyrule Field locations.
* Adds Lake Hylia locations
* Adds location name comments
* Adds Gerudo Valley Locations
* Adds Gerudo Fortress locations.
* Adds the Wasteland and Collosus locations
* Adds Market locations
* Adds Hyrule Castle locations.
* Adds Kakariko and Graveyard locations.
* Adds Death Mountain checks.
* Adds Goron City locations
* Adds Death Mountain Crater locations
* Adds Zora's River locations
* Added Zora's Domain Locations.
* Added Zora's Fountain locations
* Adds Lon Lon Ranch locations.
* Adds Deku Tree locations
* Adds Dodongo's Cavern Locations.
* Adds Jabu Jabu's Belly Locations
* Adds Forest Temple Locations
* Adds Fire Temple Locations
* Adds Water Temple Locations
* Added Spirit Temple Locations
* Some of shadow temple locations.
* Adds remaining Shadow Temple locations
* Fixes a leftover merge conflict
* Adds Bottom of the Well locations.
* Adds Ice Cavern locations
* Adds GTG locations.
* Adds Ganon's Castle and Tower locations
* Adds dungeon Gold Skulltula locations.
* Adds Overworld Gold Skulltula locations
* Adds dungeon reward locations
* Adds Heart Container Locations
* Adds Cutscene and Song locations
* Adds Cow locations
* Adds Shop locations.
* Adds hint locations
* Adds function for retrieving the Location data.
* Initial definition of ItemLocation structure for tracking runtime data
* First push on converting code to use new location definitions
* Changes hints to use the new tables
* Further conversion of hints to new definitions.
* Adds new Hint and Location IDs to area tables
* Moves areaTable to use new RandomizerRegion keys
* Removal of 3drando/item_location files.
* Uses new RandomizerRegion keys in entrance.cpp
* Final push for removal of massive keys.hpp enum
* Uses new SceneID Enum Values
* Remove RandomizerCheckObject structs in favor of new location list.
* Fix a few stragglers to successfully build
* Rename of RandoItem to just Item, but in the Rando namespace
* Adds static hints (Light Arrows, Altar text, etc) to the new Hint table.
* More hint related fixes/edits
* small fix for #include path
* Fix various miscellaneous issues related to seed gen and spoiler parsing.
* Handle progressive items correctly.
* Fixes some hint generation logic
* Fix a few GetItemEntry niche bugs.
* Adds missing shop GI Entries
* Formatting fixes
* small formatting fix
* Namespace StaticData under Rando
* Added a note about a potential use-after-free.
I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used.
* Fixes missing location table entries
* Fixes LUS submodule and removes now-unused code
* Resolves weird duplicate definition issue
* Fix missing include
It was missed because not being included wasn't an issue on Windows.
* Fixes error present on Linux builds
* Fixes some issues with excluding locations
* Updates the Resolve Exclusion conflicts function
not sure if actually used, will look into that more later
* Removes some duplicate RGs
* More fixes of duplicate RG values.
* Fix a few duplication issues in the check tracker.
* Fix progressive bombchus.
* Minor typo fix, shouldn't really be affecting anything though
* Should fix some of the remaining check tracker issues.
* oops wrong boolean operator
* Fix skulltulas in the check tracker.
* oops, missing comma
* re-formatting of HintStone locations
* Fixes issue when picking up second Progressive Bullet Bag
* Hide bombchu bowling bombchus
* Fixes missed skullScene in location_list
* Reformats shop items
* Re-formats cow checks
* reformat song locations
* reformat "cutscene" checks
* reformat heart container locaitons
* reformat Boss/Dungeon reward checks
* Hide Triforce Completed if not playing Triforce Hunt
* Fixes incorrect chest param
* reformat GS Tokens locations and cuts down on duplicate data
* reformat Ganons Castle checks
* reformat GTG check locations
* Prevents Gift from Raoru from appearing in the check tracker
* more reformatting (botw, ice cavern, shadow temple)
* Should fix a couple more check tracker checks
* reformat spirit temple checks
* reformat water and fire temple checks
* fix RC_ZR_GS_ABOVE_BRIDGE flag typo
* reformat Forest Temple checks
* Fix RC_LW_TRADE_ODD_POTION in check tracker
* reformat child dungeon locations
* reformat overworld locations
* reformat item entries
* New Item Override system
* use new ItemOverrides and use ItemLocations table for getting items
* Saves/Loads directly from/to new ItemLocation table with overrides for traps
* Removes gSaveContext.itemLocations
* Don't load spoiler file on boot automatically.
Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that:
1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded.
2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present).
3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet).
4. After that, a seed is generated and you are taken back to the file select screen with the new file present.
5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is
already in memory and in the save file (or at least I'll make it so that it is if it isn't already).
6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing
for hints to be in the user's language of choice no matter what language the spoiler file was generated in.
7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there
instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out
custom message syntax for various types of custom hints and whatnot. But that will be probably much later.
* Auto-gen rando seed when making a new rando file.
Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations:
1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed.
2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown.
3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen.
Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet.
* Fix a few typos/bugs
* Partial conversion to new Settings/Option class
* Further conversion to new settings/options classes
* New settings struct (not fully working, need to wire it up to SaveManager)
* Move save files to new settings struct. Also fixes MQ options to match 3drando
* Fixes some spoilerfile related issues
* Cleans up now unused arrays
* Fixes some unhandled entries in parse settings switch case
* Reimplements parsing of settings on file drop to re-generate seeds
* Move merchantPrices into ItemLocation tables.
* Move hints to new struct
* Fixes a few seed gen bugs surrounding hints
* Fix treasure chest game.
* Relocate Entrance Shuffle code into ctx
* Move entrances to new context at runtime
* Remove now unused code from SaveContext and randomizer.cpp/.h
* Fix non-windows builds?
* Moves Dungeon Quests to new context
* Move trials into new context
* Whoops, forgot to construct the Trials in the context.
* Fixes accidental nullptr reference
* Fixes bug with saving MQ dungeons
* Implements plando mode and removes now unused code.
Largely untested, expect some bugfixes.
* prevent a multiple definition bug
* another attempt to fix the gSeedTextures multiple def error
* Fixes some minor hint issues from conflict resolution
* Some additional glue needed for merge
* Fixes another couple of miscellaneous issues/inconsistencies.
* A few french corrections
* Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
extern " C " void Randomizer_LoadHintMessages ( ) {
OTRGlobals : : Instance - > gRandomizer - > LoadHintMessages ( ) ;
Randomizer v2 (#1065)
* Revert changes to GetItemFromGet
* Fixes Ganon's Boss Key shuffled while regular boss Keys aren't.
* Enum + combo box
* Add obtainability checks correctly
* combobox title rename + no number tracking
* Fix repeatable purchases and bottles rendering incorrectly
* Move shopsanity option in GUI
* Struct instead of ImVec + basic comportment for all case
* Attempt to fix odd build issue
* Cast randoGet for ganons boss key
* Remove redundancy in KD room
* Update logic Cvar names
* Fix Ganons Trials coming from old save files. Fixes #1365
* Fixes crash when entering Ganon's Castle lobby on linux.
* Makes `Item_Give` safe to use with a NULL globalCtx.
This should allow it's use for giving items to Link's Pocket
during rando save initialization.
* Converts Song from Impa to use `Item_Give`
* Adds more options for Link's starting item.
* Removes unneeded `GiveLinkItem` functions.
* and make it build
* bring back new rando dropdown
* gSaveContext access in GameMenuBar.cpp
* Implement Skip Scarecrow's Song
* Reimplement progressive Bombchus
* Rando-next: Deku Nut and Seed ammo gives a blue rupee
Fixes #1390
* Fixes Link starting with BGS
* Persist item tracker notes
* Adjust Hooks include
* Use SohImGui::RequestCvarSaveOnNextTick
* Fix issues from LUS refactor
* Fix for overriding deku scrub messages
* Fix mistake from merge
oops
* Restore checkboxes to enhancements menu
These got lost in the merge
* Update location access logic
Including MQ locations in Spirit and GC now
* Implement rando bombchu drops
* Missing break
* Simplify mudwall collision check
There was no need to have a second collider specifically for Ice Arrow hits
* Update settings.cpp
* Simplify mudwall collision check
* Restore checkboxes in menu
Accidentally lost these during merge
* Clean up bool
* Update logic Cvar name
* Fixed capacity on ammmo tracking
* Fix for beans obtainability
* Hook into file delete and clear notes
* Incorporate magic arrows in rando settings
* Update tooltip
To inform the player that they might have to reload the room if they're enabling this for the first time.
* Update tooltip
* Add line break in tooltip
* Tooltip wording + line break
* tweak on main logic
* All color logic for all types
* Fix: changes to please new LUS
* Ensure itemTrackerNotes vector is not fully empty
* Implement's Tycoon Wallet.
* Refactor DrawItemCount and Use EnhancementCombobox for tracker capacity options
* small tweaks and rename
* always display XX/YY when in ammo/capacity mode
* Move all merchant messages to be generated on file load
* added hovertext for the number display
* Swap german and french translations for shop messages
* Set key colors to be on by default
* Add another flag to skip mask shop
* Fix Sold Out bug
* Fix gerudo keys, add disabled checkbox
* tooltip line break
* Add trials required and merchant prices to save file instead of loading from active spoiler log
* Remove trialsRequired persisting in save manager
* Adds slotIndex to girla (shop item actor) and uses that for IdentifyShopItem.
* Fix issue when merchantPrices is empty
* Fix for a single zeroed merchantPrice entry
* Fix #1417
* Implements items selling out and fixes issues with purchasing some items.
* Fixes order of operations so Rupees will be spent.
* Fixes sold out items not getting overwritten by the randomized info.
* Clarify var names and comments
Also preserve chain platform cutscene in spirit based on Link's position
* Remove !=0 from cvar check
* Clarify var names and comments
* Rename randomizerMerchantPrices to merchantPrices
* Handle shop items in SaveManager
* Fix merge mistake
* Base whats in the bazaar shop on entranceIndex instead of age
* Tidy up chain platform cutscene check
* Fix merge error
Didn't mean to have Zhora changes in here yet
* Use 3drando item table for parsing spoiler names
* Use another nested method instead of one at the top level to fetch the table
* Add missing newline
* Remove log
* Respect custom draw functions
* Fix issues with rendering songs
* Fix localized item names for shopsanity
* Implements a larger array of Sprites for the Icon Hash.
* Uses the hash instead of seed for spoilerfile name and icons.
* Removes some unused functions and variables in `spoiler_log.cpp`
* Prevents leading 0s added to hash from being in file name
* Changes filename format to icon indexes separated by dashes
* Hopefully makes Jenkins happy
* Hopefully makes Jenkins happy
* [Rando] Child Gerudo Fortress 37th Heartpiece randomized
Fixes #1071
* Add descriptions to save editor flags editor, and added randomizer flags (#1386)
* Add descriptions to save editor flags editor, and added randomizer flags
* Hide randomizer flags when not on a randomizer save
* Move flag descriptions to header file
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Fix merge error
* crash on pause menu on linux (only in appimage)
Fixes #1437
* Applies fix to Song from Impa as well.
* Allow buying tunics as child when shopsanity is on
* Fix for custom draw methods overriding sold out sign
* Simplify logic around shopsanity and fix some issues
* Fix dungeon reward stone rotation and add particles
* Fix some issues with ice traps
* Fix adult wallet having its own max capacity
* Fix amount of keys given for BotW
* format
* Use EnGirlAShopItem enum instead of raw hex values
* [#1434] Renders non-warp songs more consistently with warp songs
* A few changes around merchant messages
* Various changes from PR feedback
* Rando: Junk Hint missing french translation
* Typo
* Fix free scrub being at 0 instead of TEXT_SCRUB_RANDOM
* Replace magic numbers in message handler
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Fix BGS softlock for shopsanity
* Support tycoon wallet on tracker
* Revert "Fix BGS softlock for shopsanity"
This reverts commit 5fdb961ea460fb9a035cf0bb6ae77bfeedc1de0f.
* [#1053] Resolves an issue with shop items and bombchu bowling where BGS would display two message boxes
* Implements some necessary plumbing and resolves several Ice Trap Softlocks.
Adds a way for an item entry to tell what type of check it came from (NPC vs Chest vs Freestanding, etc.)
Sets this value from chests and item00 actors.
Relocates pendingIceTraps to save context so it can persist through cutscenes and get stored on save init for Link's Pocket and Song from Impa.
Restructures pendingIceTraps into a counter rather than a true or false, so that we can be frozen multiple times in a row if applicable (atm that should only be at the start of a run if Link's Pocket and Song from Impa were both Ice Traps).
Adds a textbox for Ice Traps and a special case of holding up nothing in the get item process. This fixes all the cases where Ice Traps would softlock due to the actor giving the item expecting a closing textbox. After holding the item above his head Link increments the pendingIceTraps counter by one and sets whatever flag he has pending.
None of the above plumbing applies to Ice Traps from chests, those work exactly the same as before, as do freestanding item00 ice traps (thanks to the additional check for ITEM_FROM_FREESTANDING.
OoT and Ruto's Letter count as NPC's, so they get the FOWL text box and set a pending ice trap rather than immediately freezing, since Link weill be in the water. Link will get frozen the next time he touches land, which in the case of OoT is after the fade to white and right before the Song of Time check.
Fixes all the other softlocks I'm aware of, including Fishing, Bombchu Bowling, Skull Kid, and losing the second Gerudo Archery check.
* fix bgs check in player
* move bgs logic for tokensanity into MOD_NONE check
* set bgs flag before `Item_Give`ing
* move bgs flag into `MOD_NONE` check in girla
* use existing check in `z_player`
* Adds comment explaining the decision to default ITEM_FROM_NPC.
* Rename pendingIceTraps to pendingIceTrapCount
* Adds some RANDOTODO comments about cleaning up a couple things.
* Merge branch 'develop-zhora' into ztornn
* manually restore changes to `z_player.c`
* Fix after some ice trap prepwork from earlier
* Actual fix
* Woops
* More rupee names
* Actually fix it
* Add back comment
* Fix Skip Scarecrow Song
* Fix ruto's letter and LH sun stick rendering
* Also fixes it for treasure chest game
* Tweak: Rando French Wallet
* ADD: French Tycoon
* Hide dungeon items/notes by default
* [#1301] Fix issue with UI not restoring after getting an item from biggoron
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Fix random crash that only affected one person for some reason
Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Sarge-117 <adam_branston@outlook.com>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: lil David <1337lilDavid@gmail.com>
Co-authored-by: Sarge-117 <108380086+Sarge-117@users.noreply.github.com>
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
2022-09-21 00:50:22 -04:00
}
More gap-bridging (#3323)
* Initial StaticData and RandoItem class definitions
* Initial implementation of RandoItem class.
* Rerranges RandoItem Constructor parameters
The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on.
* Switches static data from map to static array.
Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values.
* Defines part of the randomizer item list.
* Adds more item class instances to item_list.cpp
Up through bottles, many more items still to go.
* Adds song items
* Adds Maps and Compasses to the item_list
* Added Key Items to item_list
* Added Key Rings to item_list
* Added Dungeon Rewards to item_list
* Adds generic items and refills to item_list
* Adds shop items, triforce, and hints
Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them.
* Adds in the stages of progressive items
These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.)
* Remove GetItemEntry data from progressive items
* Moves/adds function definitions to item/item_list
* Refactors GetItemEntry data
It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.)
* Adds item class member for if item is progressive
* Removes unneeded stuff from initializer list macro
* Replaces relevant `uint32_t`s w/ `RandomizerGet`s
Also replaces calls to the ItemTable method with StaticData::RetrieveItem
* Switches our runtime code to use the new itemList.
* Changes just enough hint gen code to compile
* Initial Definition of Location Class
* Initial Implementation of Location
* Fixes some names and definitions.
* Extracts ActorID and SceneID enums to separate files.
This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected.
* Replaces the forward definitions with the new imports.
* Adds missing data for RandomizerCheckObjects.
* Definition and first entry of locationTable
* Added Mido's House Locations
* Added locations up through lost woods.
* Adds in Hyrule Field locations.
* Adds Lake Hylia locations
* Adds location name comments
* Adds Gerudo Valley Locations
* Adds Gerudo Fortress locations.
* Adds the Wasteland and Collosus locations
* Adds Market locations
* Adds Hyrule Castle locations.
* Adds Kakariko and Graveyard locations.
* Adds Death Mountain checks.
* Adds Goron City locations
* Adds Death Mountain Crater locations
* Adds Zora's River locations
* Added Zora's Domain Locations.
* Added Zora's Fountain locations
* Adds Lon Lon Ranch locations.
* Adds Deku Tree locations
* Adds Dodongo's Cavern Locations.
* Adds Jabu Jabu's Belly Locations
* Adds Forest Temple Locations
* Adds Fire Temple Locations
* Adds Water Temple Locations
* Added Spirit Temple Locations
* Some of shadow temple locations.
* Adds remaining Shadow Temple locations
* Fixes a leftover merge conflict
* Adds Bottom of the Well locations.
* Adds Ice Cavern locations
* Adds GTG locations.
* Adds Ganon's Castle and Tower locations
* Adds dungeon Gold Skulltula locations.
* Adds Overworld Gold Skulltula locations
* Adds dungeon reward locations
* Adds Heart Container Locations
* Adds Cutscene and Song locations
* Adds Cow locations
* Adds Shop locations.
* Adds hint locations
* Adds function for retrieving the Location data.
* Initial definition of ItemLocation structure for tracking runtime data
* First push on converting code to use new location definitions
* Changes hints to use the new tables
* Further conversion of hints to new definitions.
* Adds new Hint and Location IDs to area tables
* Moves areaTable to use new RandomizerRegion keys
* Removal of 3drando/item_location files.
* Uses new RandomizerRegion keys in entrance.cpp
* Final push for removal of massive keys.hpp enum
* Uses new SceneID Enum Values
* Remove RandomizerCheckObject structs in favor of new location list.
* Fix a few stragglers to successfully build
* Rename of RandoItem to just Item, but in the Rando namespace
* Adds static hints (Light Arrows, Altar text, etc) to the new Hint table.
* More hint related fixes/edits
* small fix for #include path
* Fix various miscellaneous issues related to seed gen and spoiler parsing.
* Handle progressive items correctly.
* Fixes some hint generation logic
* Fix a few GetItemEntry niche bugs.
* Adds missing shop GI Entries
* Formatting fixes
* small formatting fix
* Namespace StaticData under Rando
* Added a note about a potential use-after-free.
I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used.
* Fixes missing location table entries
* Fixes LUS submodule and removes now-unused code
* Resolves weird duplicate definition issue
* Fix missing include
It was missed because not being included wasn't an issue on Windows.
* Fixes error present on Linux builds
* Fixes some issues with excluding locations
* Updates the Resolve Exclusion conflicts function
not sure if actually used, will look into that more later
* Removes some duplicate RGs
* More fixes of duplicate RG values.
* Fix a few duplication issues in the check tracker.
* Fix progressive bombchus.
* Minor typo fix, shouldn't really be affecting anything though
* Should fix some of the remaining check tracker issues.
* oops wrong boolean operator
* Fix skulltulas in the check tracker.
* oops, missing comma
* re-formatting of HintStone locations
* Fixes issue when picking up second Progressive Bullet Bag
* Hide bombchu bowling bombchus
* Fixes missed skullScene in location_list
* Reformats shop items
* Re-formats cow checks
* reformat song locations
* reformat "cutscene" checks
* reformat heart container locaitons
* reformat Boss/Dungeon reward checks
* Hide Triforce Completed if not playing Triforce Hunt
* Fixes incorrect chest param
* reformat GS Tokens locations and cuts down on duplicate data
* reformat Ganons Castle checks
* reformat GTG check locations
* Prevents Gift from Raoru from appearing in the check tracker
* more reformatting (botw, ice cavern, shadow temple)
* Should fix a couple more check tracker checks
* reformat spirit temple checks
* reformat water and fire temple checks
* fix RC_ZR_GS_ABOVE_BRIDGE flag typo
* reformat Forest Temple checks
* Fix RC_LW_TRADE_ODD_POTION in check tracker
* reformat child dungeon locations
* reformat overworld locations
* reformat item entries
* New Item Override system
* use new ItemOverrides and use ItemLocations table for getting items
* Saves/Loads directly from/to new ItemLocation table with overrides for traps
* Removes gSaveContext.itemLocations
* Don't load spoiler file on boot automatically.
Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that:
1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded.
2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present).
3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet).
4. After that, a seed is generated and you are taken back to the file select screen with the new file present.
5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is
already in memory and in the save file (or at least I'll make it so that it is if it isn't already).
6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing
for hints to be in the user's language of choice no matter what language the spoiler file was generated in.
7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there
instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out
custom message syntax for various types of custom hints and whatnot. But that will be probably much later.
* Auto-gen rando seed when making a new rando file.
Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations:
1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed.
2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown.
3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen.
Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet.
* Fix a few typos/bugs
* Partial conversion to new Settings/Option class
* Further conversion to new settings/options classes
* New settings struct (not fully working, need to wire it up to SaveManager)
* Move save files to new settings struct. Also fixes MQ options to match 3drando
* Fixes some spoilerfile related issues
* Cleans up now unused arrays
* Fixes some unhandled entries in parse settings switch case
* Reimplements parsing of settings on file drop to re-generate seeds
* Move merchantPrices into ItemLocation tables.
* Move hints to new struct
* Fixes a few seed gen bugs surrounding hints
* Fix treasure chest game.
* Relocate Entrance Shuffle code into ctx
* Move entrances to new context at runtime
* Remove now unused code from SaveContext and randomizer.cpp/.h
* Fix non-windows builds?
* Moves Dungeon Quests to new context
* Move trials into new context
* Whoops, forgot to construct the Trials in the context.
* Fixes accidental nullptr reference
* Fixes bug with saving MQ dungeons
* Implements plando mode and removes now unused code.
Largely untested, expect some bugfixes.
* prevent a multiple definition bug
* another attempt to fix the gSeedTextures multiple def error
* Fixes some minor hint issues from conflict resolution
* Some additional glue needed for merge
* Fixes another couple of miscellaneous issues/inconsistencies.
* A few french corrections
* Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
extern " C " void Randomizer_LoadMerchantMessages ( ) {
OTRGlobals : : Instance - > gRandomizer - > LoadMerchantMessages ( ) ;
testing out item replacement (#416)
* skip learning song of storms
* don't set flag when getting goron tunic as child
* Initiates prelude check when master sword unloads.
Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again.
* Stops Shadow Temple lore prompts from appearing in rando.
* Skips cutscene of royal tomb explosion in rando.
Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here.
* Improves visual of exploding gravestone.
* Adds some comments explaining the rando differences
* Skip ruto text box in jabu blue warp
For rando
* skip intro cutscene in dodongo's cavern
* load spoiler files on boot, fix spoilerfile existing check when making new saves
* name entry dropped spoiler logic
* make sure to actually init the cvar
* no chime on load
* uncomment
* Skip ganondrof cutscene
Skip to scream part of the death animation, skipping the text boxes etc. For rando
* Update z_boss_ganondrof.c
* skip owl flight cutscenes in rando
* Fixes skipped text so it only applies to shadow temple.
Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors.
* Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case.
* TEST: Text for item
* Adding ganon flavor text
* ADD: AMMO Count
* format ganon text/hint text
* Autoskip the tower cutscene if settings call for tower collapse.
* ganon hint text logic
* Improved prelude after time travel fix
* swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things.
* this is all i did
* not the cleanest code ever but it's working
* ADD: GS Count
* ADD: Wallter (crash for now)
* TWEAK: Wallet check
* FIX: Use DrawItem instread of DrawUpgrade... b-baka!
* Fixes some vanilla bugs introduced by rando code.
* Added cutscene skip for zelda escaping
Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger
* ADD: X Spacing + Placeholders for song
* ADD: default case for items
* TWEAK: Spacing
* FIX: Light Arrow
* ADD: Ammo Option
* use groups instead
* ADD: More spacing logic
* songs and names
* TWEAK: Color on wallet
* colors
* Added flags cutscene before nabooru fight
* ADD: ChromaKey text
* First attempt skip cs after nabooru defeat
* Better implementation for specific rando cutscene skips
* use pulseaudio defaults
* spaces/tabs
* move color push/pop to stop crash
* make the colors work again
* the real bottle fix
* pulseaudio values tuned for n64 audio at 44.1khz
* update tlength
* remove one hardcoded samplerate
* Cleaned up and fixed zelda escape skip
The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of.
* Revert one line to match original
nothing functional
* another hint line that breaks autonewline logic
* don't autospawn epona if we don't have the song/ocarina
* Trying to use iron knuckle death effects
not working yet
* Streamlined OoT cutscene skip for future additions
Also cleaned up if statement in general
* Made if statement more readable
Also added clarity for what cutscene was skipped
* Fixed typo in comment
* Janky nabooru defeat cs skip
* altar text formatting (gonna need help shortening some of the french ones)
* more altar text formatting
* english altar text formatting complete
* make gtg blocking guard check for card not bridge
* FIX: Typo!
* FIX: Uppercases
* FIX: Typo
* TWEAK: Alter + some names
* TWEAK: More caps!
* ADD: Missing string
TWEAK more uppercases and namefixe
s
* Hide nabooru death by covering her in flames
* bandaid fix for death crash issue
* Twinrova defeat cs skip
Skips the animation and manually calls the function to show the "beam" around the sisters
* fix crash
* fix caps to match
* fix great fairy reward mashing/shielding issue
* TWEAK : Typo clé to Clé
* TWEAK: Some Altar hints
TWEAK: Some capitals
* TWEAK: Unmatching text + some cap again
* TWEAK: More tweaks
* fix build
* remove extra json.hpp, add hint
* Update randomizer_item_tracker.cpp
* TWEAK: Double Defense with RedParticles instead of white
* make sure we don't optimize out the check to ensure a spoilerfile exists
* vanilla ganon boss key hint formatting
* TWEAK: FR- better way of the hero text
* fix
* and again
* Initializes dungeonsDone items in gSaveContext to 0.
* Replaces sizeof calculation with a NUM_DUNGEONS constant.
* Fixes Saria's Gift on the LW Bridge from getting killed when holding shield.
* More airtight fix for Saria's Gift on the Bridge.
* Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId.
* Invalidate text box icon before drawing
* Fixes the case where Saria's gift is an Ice Trap.
We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine.
* Initial commit
Might need changing when we change the settings in the future
* Fixes Door of Time opening cutscene after warping with prelude.
* Initial waterfall skip
Very rudimentary way of doing things but it seems to work so :shrug:
* inital rework
* fixed default rotation for 2D sprites
* fix tab/space issues
* 3d drops rando merge fix again
* Allows Impa to appear in the Lullaby check post drawbridge escape.
* Changes Ganon's Trials Count setting to a checkbox
The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed.
* Sets all Ganon's Trials to incomplete in new saves.
Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131
* fix castle guards when oot throw cutscene has already played in rando
* Properly removes the beams when trials are cleared.
* Removes Question Mark from Skip Ganon's Trials UI.
* Adds a todo comment about when to change back to slider.
* make deku seeds check for bullet bag
* Various tweaks
TWEAK: Altar Text
TWEAK: Hint names
TWEAK: Replace more problematic œ to oe
* upgrade ocarina on both child and adult equips
* FIX: Jabu Item
* update equipped hookshot/longshot when obtained as other age
* add hint
* don't give the bgs check without the claim check
* Skips Darunia Cutscene in Fire Temple
* Added a TODO note about not skipping the cutscene.
There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch.
* remove todo
* restore fast ocarina option in imgui that was lost in merge
* Fixes grey screen issue + tooltip for 2 handed shield
* update to use dg instead of g for textures in item tracker
* TWEAK: Default color for cosmetic RAND button was not the corect one
* fix texture crash, remove unused item tracker code
* don't open mask shop until we get zelda's letter
* Update README.md
* Prevents "correct" chime under incorrect conditions.
* Fixes typo in conditional and adds "bonk" sound effect.
"Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time.
* remove modify dpad equips toggle, replace with checks for dpad menu
* remove extra check
* add ability to hold c-up to assign to dpad when dpad menuing is enabled
* disable d-pad navigation on item menu when holding c-up to equip
* dpad+c-up stuff for equipment menu
* ADD: Checbox for songs colors
* TWEAK: RandoColors for normal songs
* kind of quick and dirty but it works
* TWEAK: Clarity of the tooltip
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Dog <5172592+Dog@users.noreply.github.com>
Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com>
Co-authored-by: Baoulettes <perlouzerie@hotmail.fr>
Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
Randomizer v2 (#1065)
* Revert changes to GetItemFromGet
* Fixes Ganon's Boss Key shuffled while regular boss Keys aren't.
* Enum + combo box
* Add obtainability checks correctly
* combobox title rename + no number tracking
* Fix repeatable purchases and bottles rendering incorrectly
* Move shopsanity option in GUI
* Struct instead of ImVec + basic comportment for all case
* Attempt to fix odd build issue
* Cast randoGet for ganons boss key
* Remove redundancy in KD room
* Update logic Cvar names
* Fix Ganons Trials coming from old save files. Fixes #1365
* Fixes crash when entering Ganon's Castle lobby on linux.
* Makes `Item_Give` safe to use with a NULL globalCtx.
This should allow it's use for giving items to Link's Pocket
during rando save initialization.
* Converts Song from Impa to use `Item_Give`
* Adds more options for Link's starting item.
* Removes unneeded `GiveLinkItem` functions.
* and make it build
* bring back new rando dropdown
* gSaveContext access in GameMenuBar.cpp
* Implement Skip Scarecrow's Song
* Reimplement progressive Bombchus
* Rando-next: Deku Nut and Seed ammo gives a blue rupee
Fixes #1390
* Fixes Link starting with BGS
* Persist item tracker notes
* Adjust Hooks include
* Use SohImGui::RequestCvarSaveOnNextTick
* Fix issues from LUS refactor
* Fix for overriding deku scrub messages
* Fix mistake from merge
oops
* Restore checkboxes to enhancements menu
These got lost in the merge
* Update location access logic
Including MQ locations in Spirit and GC now
* Implement rando bombchu drops
* Missing break
* Simplify mudwall collision check
There was no need to have a second collider specifically for Ice Arrow hits
* Update settings.cpp
* Simplify mudwall collision check
* Restore checkboxes in menu
Accidentally lost these during merge
* Clean up bool
* Update logic Cvar name
* Fixed capacity on ammmo tracking
* Fix for beans obtainability
* Hook into file delete and clear notes
* Incorporate magic arrows in rando settings
* Update tooltip
To inform the player that they might have to reload the room if they're enabling this for the first time.
* Update tooltip
* Add line break in tooltip
* Tooltip wording + line break
* tweak on main logic
* All color logic for all types
* Fix: changes to please new LUS
* Ensure itemTrackerNotes vector is not fully empty
* Implement's Tycoon Wallet.
* Refactor DrawItemCount and Use EnhancementCombobox for tracker capacity options
* small tweaks and rename
* always display XX/YY when in ammo/capacity mode
* Move all merchant messages to be generated on file load
* added hovertext for the number display
* Swap german and french translations for shop messages
* Set key colors to be on by default
* Add another flag to skip mask shop
* Fix Sold Out bug
* Fix gerudo keys, add disabled checkbox
* tooltip line break
* Add trials required and merchant prices to save file instead of loading from active spoiler log
* Remove trialsRequired persisting in save manager
* Adds slotIndex to girla (shop item actor) and uses that for IdentifyShopItem.
* Fix issue when merchantPrices is empty
* Fix for a single zeroed merchantPrice entry
* Fix #1417
* Implements items selling out and fixes issues with purchasing some items.
* Fixes order of operations so Rupees will be spent.
* Fixes sold out items not getting overwritten by the randomized info.
* Clarify var names and comments
Also preserve chain platform cutscene in spirit based on Link's position
* Remove !=0 from cvar check
* Clarify var names and comments
* Rename randomizerMerchantPrices to merchantPrices
* Handle shop items in SaveManager
* Fix merge mistake
* Base whats in the bazaar shop on entranceIndex instead of age
* Tidy up chain platform cutscene check
* Fix merge error
Didn't mean to have Zhora changes in here yet
* Use 3drando item table for parsing spoiler names
* Use another nested method instead of one at the top level to fetch the table
* Add missing newline
* Remove log
* Respect custom draw functions
* Fix issues with rendering songs
* Fix localized item names for shopsanity
* Implements a larger array of Sprites for the Icon Hash.
* Uses the hash instead of seed for spoilerfile name and icons.
* Removes some unused functions and variables in `spoiler_log.cpp`
* Prevents leading 0s added to hash from being in file name
* Changes filename format to icon indexes separated by dashes
* Hopefully makes Jenkins happy
* Hopefully makes Jenkins happy
* [Rando] Child Gerudo Fortress 37th Heartpiece randomized
Fixes #1071
* Add descriptions to save editor flags editor, and added randomizer flags (#1386)
* Add descriptions to save editor flags editor, and added randomizer flags
* Hide randomizer flags when not on a randomizer save
* Move flag descriptions to header file
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Fix merge error
* crash on pause menu on linux (only in appimage)
Fixes #1437
* Applies fix to Song from Impa as well.
* Allow buying tunics as child when shopsanity is on
* Fix for custom draw methods overriding sold out sign
* Simplify logic around shopsanity and fix some issues
* Fix dungeon reward stone rotation and add particles
* Fix some issues with ice traps
* Fix adult wallet having its own max capacity
* Fix amount of keys given for BotW
* format
* Use EnGirlAShopItem enum instead of raw hex values
* [#1434] Renders non-warp songs more consistently with warp songs
* A few changes around merchant messages
* Various changes from PR feedback
* Rando: Junk Hint missing french translation
* Typo
* Fix free scrub being at 0 instead of TEXT_SCRUB_RANDOM
* Replace magic numbers in message handler
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Fix BGS softlock for shopsanity
* Support tycoon wallet on tracker
* Revert "Fix BGS softlock for shopsanity"
This reverts commit 5fdb961ea460fb9a035cf0bb6ae77bfeedc1de0f.
* [#1053] Resolves an issue with shop items and bombchu bowling where BGS would display two message boxes
* Implements some necessary plumbing and resolves several Ice Trap Softlocks.
Adds a way for an item entry to tell what type of check it came from (NPC vs Chest vs Freestanding, etc.)
Sets this value from chests and item00 actors.
Relocates pendingIceTraps to save context so it can persist through cutscenes and get stored on save init for Link's Pocket and Song from Impa.
Restructures pendingIceTraps into a counter rather than a true or false, so that we can be frozen multiple times in a row if applicable (atm that should only be at the start of a run if Link's Pocket and Song from Impa were both Ice Traps).
Adds a textbox for Ice Traps and a special case of holding up nothing in the get item process. This fixes all the cases where Ice Traps would softlock due to the actor giving the item expecting a closing textbox. After holding the item above his head Link increments the pendingIceTraps counter by one and sets whatever flag he has pending.
None of the above plumbing applies to Ice Traps from chests, those work exactly the same as before, as do freestanding item00 ice traps (thanks to the additional check for ITEM_FROM_FREESTANDING.
OoT and Ruto's Letter count as NPC's, so they get the FOWL text box and set a pending ice trap rather than immediately freezing, since Link weill be in the water. Link will get frozen the next time he touches land, which in the case of OoT is after the fade to white and right before the Song of Time check.
Fixes all the other softlocks I'm aware of, including Fishing, Bombchu Bowling, Skull Kid, and losing the second Gerudo Archery check.
* fix bgs check in player
* move bgs logic for tokensanity into MOD_NONE check
* set bgs flag before `Item_Give`ing
* move bgs flag into `MOD_NONE` check in girla
* use existing check in `z_player`
* Adds comment explaining the decision to default ITEM_FROM_NPC.
* Rename pendingIceTraps to pendingIceTrapCount
* Adds some RANDOTODO comments about cleaning up a couple things.
* Merge branch 'develop-zhora' into ztornn
* manually restore changes to `z_player.c`
* Fix after some ice trap prepwork from earlier
* Actual fix
* Woops
* More rupee names
* Actually fix it
* Add back comment
* Fix Skip Scarecrow Song
* Fix ruto's letter and LH sun stick rendering
* Also fixes it for treasure chest game
* Tweak: Rando French Wallet
* ADD: French Tycoon
* Hide dungeon items/notes by default
* [#1301] Fix issue with UI not restoring after getting an item from biggoron
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Fix random crash that only affected one person for some reason
Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Sarge-117 <adam_branston@outlook.com>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: lil David <1337lilDavid@gmail.com>
Co-authored-by: Sarge-117 <108380086+Sarge-117@users.noreply.github.com>
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
2022-09-21 00:50:22 -04:00
extern " C " bool Randomizer_IsTrialRequired ( RandomizerInf trial ) {
return OTRGlobals : : Instance - > gRandomizer - > IsTrialRequired ( trial ) ;
}
2022-10-22 12:31:20 -04:00
extern " C " u32 SpoilerFileExists ( const char * spoilerFileName ) {
testing out item replacement (#416)
* skip learning song of storms
* don't set flag when getting goron tunic as child
* Initiates prelude check when master sword unloads.
Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again.
* Stops Shadow Temple lore prompts from appearing in rando.
* Skips cutscene of royal tomb explosion in rando.
Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here.
* Improves visual of exploding gravestone.
* Adds some comments explaining the rando differences
* Skip ruto text box in jabu blue warp
For rando
* skip intro cutscene in dodongo's cavern
* load spoiler files on boot, fix spoilerfile existing check when making new saves
* name entry dropped spoiler logic
* make sure to actually init the cvar
* no chime on load
* uncomment
* Skip ganondrof cutscene
Skip to scream part of the death animation, skipping the text boxes etc. For rando
* Update z_boss_ganondrof.c
* skip owl flight cutscenes in rando
* Fixes skipped text so it only applies to shadow temple.
Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors.
* Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case.
* TEST: Text for item
* Adding ganon flavor text
* ADD: AMMO Count
* format ganon text/hint text
* Autoskip the tower cutscene if settings call for tower collapse.
* ganon hint text logic
* Improved prelude after time travel fix
* swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things.
* this is all i did
* not the cleanest code ever but it's working
* ADD: GS Count
* ADD: Wallter (crash for now)
* TWEAK: Wallet check
* FIX: Use DrawItem instread of DrawUpgrade... b-baka!
* Fixes some vanilla bugs introduced by rando code.
* Added cutscene skip for zelda escaping
Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger
* ADD: X Spacing + Placeholders for song
* ADD: default case for items
* TWEAK: Spacing
* FIX: Light Arrow
* ADD: Ammo Option
* use groups instead
* ADD: More spacing logic
* songs and names
* TWEAK: Color on wallet
* colors
* Added flags cutscene before nabooru fight
* ADD: ChromaKey text
* First attempt skip cs after nabooru defeat
* Better implementation for specific rando cutscene skips
* use pulseaudio defaults
* spaces/tabs
* move color push/pop to stop crash
* make the colors work again
* the real bottle fix
* pulseaudio values tuned for n64 audio at 44.1khz
* update tlength
* remove one hardcoded samplerate
* Cleaned up and fixed zelda escape skip
The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of.
* Revert one line to match original
nothing functional
* another hint line that breaks autonewline logic
* don't autospawn epona if we don't have the song/ocarina
* Trying to use iron knuckle death effects
not working yet
* Streamlined OoT cutscene skip for future additions
Also cleaned up if statement in general
* Made if statement more readable
Also added clarity for what cutscene was skipped
* Fixed typo in comment
* Janky nabooru defeat cs skip
* altar text formatting (gonna need help shortening some of the french ones)
* more altar text formatting
* english altar text formatting complete
* make gtg blocking guard check for card not bridge
* FIX: Typo!
* FIX: Uppercases
* FIX: Typo
* TWEAK: Alter + some names
* TWEAK: More caps!
* ADD: Missing string
TWEAK more uppercases and namefixe
s
* Hide nabooru death by covering her in flames
* bandaid fix for death crash issue
* Twinrova defeat cs skip
Skips the animation and manually calls the function to show the "beam" around the sisters
* fix crash
* fix caps to match
* fix great fairy reward mashing/shielding issue
* TWEAK : Typo clé to Clé
* TWEAK: Some Altar hints
TWEAK: Some capitals
* TWEAK: Unmatching text + some cap again
* TWEAK: More tweaks
* fix build
* remove extra json.hpp, add hint
* Update randomizer_item_tracker.cpp
* TWEAK: Double Defense with RedParticles instead of white
* make sure we don't optimize out the check to ensure a spoilerfile exists
* vanilla ganon boss key hint formatting
* TWEAK: FR- better way of the hero text
* fix
* and again
* Initializes dungeonsDone items in gSaveContext to 0.
* Replaces sizeof calculation with a NUM_DUNGEONS constant.
* Fixes Saria's Gift on the LW Bridge from getting killed when holding shield.
* More airtight fix for Saria's Gift on the Bridge.
* Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId.
* Invalidate text box icon before drawing
* Fixes the case where Saria's gift is an Ice Trap.
We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine.
* Initial commit
Might need changing when we change the settings in the future
* Fixes Door of Time opening cutscene after warping with prelude.
* Initial waterfall skip
Very rudimentary way of doing things but it seems to work so :shrug:
* inital rework
* fixed default rotation for 2D sprites
* fix tab/space issues
* 3d drops rando merge fix again
* Allows Impa to appear in the Lullaby check post drawbridge escape.
* Changes Ganon's Trials Count setting to a checkbox
The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed.
* Sets all Ganon's Trials to incomplete in new saves.
Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131
* fix castle guards when oot throw cutscene has already played in rando
* Properly removes the beams when trials are cleared.
* Removes Question Mark from Skip Ganon's Trials UI.
* Adds a todo comment about when to change back to slider.
* make deku seeds check for bullet bag
* Various tweaks
TWEAK: Altar Text
TWEAK: Hint names
TWEAK: Replace more problematic œ to oe
* upgrade ocarina on both child and adult equips
* FIX: Jabu Item
* update equipped hookshot/longshot when obtained as other age
* add hint
* don't give the bgs check without the claim check
* Skips Darunia Cutscene in Fire Temple
* Added a TODO note about not skipping the cutscene.
There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch.
* remove todo
* restore fast ocarina option in imgui that was lost in merge
* Fixes grey screen issue + tooltip for 2 handed shield
* update to use dg instead of g for textures in item tracker
* TWEAK: Default color for cosmetic RAND button was not the corect one
* fix texture crash, remove unused item tracker code
* don't open mask shop until we get zelda's letter
* Update README.md
* Prevents "correct" chime under incorrect conditions.
* Fixes typo in conditional and adds "bonk" sound effect.
"Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time.
* remove modify dpad equips toggle, replace with checks for dpad menu
* remove extra check
* add ability to hold c-up to assign to dpad when dpad menuing is enabled
* disable d-pad navigation on item menu when holding c-up to equip
* dpad+c-up stuff for equipment menu
* ADD: Checbox for songs colors
* TWEAK: RandoColors for normal songs
* kind of quick and dirty but it works
* TWEAK: Clarity of the tooltip
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Dog <5172592+Dog@users.noreply.github.com>
Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com>
Co-authored-by: Baoulettes <perlouzerie@hotmail.fr>
Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
return OTRGlobals : : Instance - > gRandomizer - > SpoilerFileExists ( spoilerFileName ) ;
}
2022-07-18 19:20:07 -04:00
extern " C " u8 Randomizer_GetSettingValue ( RandomizerSettingKey randoSettingKey ) {
More gap-bridging (#3323)
* Initial StaticData and RandoItem class definitions
* Initial implementation of RandoItem class.
* Rerranges RandoItem Constructor parameters
The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on.
* Switches static data from map to static array.
Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values.
* Defines part of the randomizer item list.
* Adds more item class instances to item_list.cpp
Up through bottles, many more items still to go.
* Adds song items
* Adds Maps and Compasses to the item_list
* Added Key Items to item_list
* Added Key Rings to item_list
* Added Dungeon Rewards to item_list
* Adds generic items and refills to item_list
* Adds shop items, triforce, and hints
Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them.
* Adds in the stages of progressive items
These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.)
* Remove GetItemEntry data from progressive items
* Moves/adds function definitions to item/item_list
* Refactors GetItemEntry data
It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.)
* Adds item class member for if item is progressive
* Removes unneeded stuff from initializer list macro
* Replaces relevant `uint32_t`s w/ `RandomizerGet`s
Also replaces calls to the ItemTable method with StaticData::RetrieveItem
* Switches our runtime code to use the new itemList.
* Changes just enough hint gen code to compile
* Initial Definition of Location Class
* Initial Implementation of Location
* Fixes some names and definitions.
* Extracts ActorID and SceneID enums to separate files.
This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected.
* Replaces the forward definitions with the new imports.
* Adds missing data for RandomizerCheckObjects.
* Definition and first entry of locationTable
* Added Mido's House Locations
* Added locations up through lost woods.
* Adds in Hyrule Field locations.
* Adds Lake Hylia locations
* Adds location name comments
* Adds Gerudo Valley Locations
* Adds Gerudo Fortress locations.
* Adds the Wasteland and Collosus locations
* Adds Market locations
* Adds Hyrule Castle locations.
* Adds Kakariko and Graveyard locations.
* Adds Death Mountain checks.
* Adds Goron City locations
* Adds Death Mountain Crater locations
* Adds Zora's River locations
* Added Zora's Domain Locations.
* Added Zora's Fountain locations
* Adds Lon Lon Ranch locations.
* Adds Deku Tree locations
* Adds Dodongo's Cavern Locations.
* Adds Jabu Jabu's Belly Locations
* Adds Forest Temple Locations
* Adds Fire Temple Locations
* Adds Water Temple Locations
* Added Spirit Temple Locations
* Some of shadow temple locations.
* Adds remaining Shadow Temple locations
* Fixes a leftover merge conflict
* Adds Bottom of the Well locations.
* Adds Ice Cavern locations
* Adds GTG locations.
* Adds Ganon's Castle and Tower locations
* Adds dungeon Gold Skulltula locations.
* Adds Overworld Gold Skulltula locations
* Adds dungeon reward locations
* Adds Heart Container Locations
* Adds Cutscene and Song locations
* Adds Cow locations
* Adds Shop locations.
* Adds hint locations
* Adds function for retrieving the Location data.
* Initial definition of ItemLocation structure for tracking runtime data
* First push on converting code to use new location definitions
* Changes hints to use the new tables
* Further conversion of hints to new definitions.
* Adds new Hint and Location IDs to area tables
* Moves areaTable to use new RandomizerRegion keys
* Removal of 3drando/item_location files.
* Uses new RandomizerRegion keys in entrance.cpp
* Final push for removal of massive keys.hpp enum
* Uses new SceneID Enum Values
* Remove RandomizerCheckObject structs in favor of new location list.
* Fix a few stragglers to successfully build
* Rename of RandoItem to just Item, but in the Rando namespace
* Adds static hints (Light Arrows, Altar text, etc) to the new Hint table.
* More hint related fixes/edits
* small fix for #include path
* Fix various miscellaneous issues related to seed gen and spoiler parsing.
* Handle progressive items correctly.
* Fixes some hint generation logic
* Fix a few GetItemEntry niche bugs.
* Adds missing shop GI Entries
* Formatting fixes
* small formatting fix
* Namespace StaticData under Rando
* Added a note about a potential use-after-free.
I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used.
* Fixes missing location table entries
* Fixes LUS submodule and removes now-unused code
* Resolves weird duplicate definition issue
* Fix missing include
It was missed because not being included wasn't an issue on Windows.
* Fixes error present on Linux builds
* Fixes some issues with excluding locations
* Updates the Resolve Exclusion conflicts function
not sure if actually used, will look into that more later
* Removes some duplicate RGs
* More fixes of duplicate RG values.
* Fix a few duplication issues in the check tracker.
* Fix progressive bombchus.
* Minor typo fix, shouldn't really be affecting anything though
* Should fix some of the remaining check tracker issues.
* oops wrong boolean operator
* Fix skulltulas in the check tracker.
* oops, missing comma
* re-formatting of HintStone locations
* Fixes issue when picking up second Progressive Bullet Bag
* Hide bombchu bowling bombchus
* Fixes missed skullScene in location_list
* Reformats shop items
* Re-formats cow checks
* reformat song locations
* reformat "cutscene" checks
* reformat heart container locaitons
* reformat Boss/Dungeon reward checks
* Hide Triforce Completed if not playing Triforce Hunt
* Fixes incorrect chest param
* reformat GS Tokens locations and cuts down on duplicate data
* reformat Ganons Castle checks
* reformat GTG check locations
* Prevents Gift from Raoru from appearing in the check tracker
* more reformatting (botw, ice cavern, shadow temple)
* Should fix a couple more check tracker checks
* reformat spirit temple checks
* reformat water and fire temple checks
* fix RC_ZR_GS_ABOVE_BRIDGE flag typo
* reformat Forest Temple checks
* Fix RC_LW_TRADE_ODD_POTION in check tracker
* reformat child dungeon locations
* reformat overworld locations
* reformat item entries
* New Item Override system
* use new ItemOverrides and use ItemLocations table for getting items
* Saves/Loads directly from/to new ItemLocation table with overrides for traps
* Removes gSaveContext.itemLocations
* Don't load spoiler file on boot automatically.
Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that:
1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded.
2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present).
3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet).
4. After that, a seed is generated and you are taken back to the file select screen with the new file present.
5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is
already in memory and in the save file (or at least I'll make it so that it is if it isn't already).
6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing
for hints to be in the user's language of choice no matter what language the spoiler file was generated in.
7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there
instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out
custom message syntax for various types of custom hints and whatnot. But that will be probably much later.
* Auto-gen rando seed when making a new rando file.
Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations:
1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed.
2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown.
3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen.
Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet.
* Fix a few typos/bugs
* Partial conversion to new Settings/Option class
* Further conversion to new settings/options classes
* New settings struct (not fully working, need to wire it up to SaveManager)
* Move save files to new settings struct. Also fixes MQ options to match 3drando
* Fixes some spoilerfile related issues
* Cleans up now unused arrays
* Fixes some unhandled entries in parse settings switch case
* Reimplements parsing of settings on file drop to re-generate seeds
* Move merchantPrices into ItemLocation tables.
* Move hints to new struct
* Fixes a few seed gen bugs surrounding hints
* Fix treasure chest game.
* Relocate Entrance Shuffle code into ctx
* Move entrances to new context at runtime
* Remove now unused code from SaveContext and randomizer.cpp/.h
* Fix non-windows builds?
* Moves Dungeon Quests to new context
* Move trials into new context
* Whoops, forgot to construct the Trials in the context.
* Fixes accidental nullptr reference
* Fixes bug with saving MQ dungeons
* Implements plando mode and removes now unused code.
Largely untested, expect some bugfixes.
* prevent a multiple definition bug
* another attempt to fix the gSeedTextures multiple def error
* Fixes some minor hint issues from conflict resolution
* Some additional glue needed for merge
* Fixes another couple of miscellaneous issues/inconsistencies.
* A few french corrections
* Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
return OTRGlobals : : Instance - > gRandoContext - > GetOption ( randoSettingKey ) . GetSelectedOptionIndex ( ) ;
testing out item replacement (#416)
* skip learning song of storms
* don't set flag when getting goron tunic as child
* Initiates prelude check when master sword unloads.
Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again.
* Stops Shadow Temple lore prompts from appearing in rando.
* Skips cutscene of royal tomb explosion in rando.
Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here.
* Improves visual of exploding gravestone.
* Adds some comments explaining the rando differences
* Skip ruto text box in jabu blue warp
For rando
* skip intro cutscene in dodongo's cavern
* load spoiler files on boot, fix spoilerfile existing check when making new saves
* name entry dropped spoiler logic
* make sure to actually init the cvar
* no chime on load
* uncomment
* Skip ganondrof cutscene
Skip to scream part of the death animation, skipping the text boxes etc. For rando
* Update z_boss_ganondrof.c
* skip owl flight cutscenes in rando
* Fixes skipped text so it only applies to shadow temple.
Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors.
* Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case.
* TEST: Text for item
* Adding ganon flavor text
* ADD: AMMO Count
* format ganon text/hint text
* Autoskip the tower cutscene if settings call for tower collapse.
* ganon hint text logic
* Improved prelude after time travel fix
* swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things.
* this is all i did
* not the cleanest code ever but it's working
* ADD: GS Count
* ADD: Wallter (crash for now)
* TWEAK: Wallet check
* FIX: Use DrawItem instread of DrawUpgrade... b-baka!
* Fixes some vanilla bugs introduced by rando code.
* Added cutscene skip for zelda escaping
Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger
* ADD: X Spacing + Placeholders for song
* ADD: default case for items
* TWEAK: Spacing
* FIX: Light Arrow
* ADD: Ammo Option
* use groups instead
* ADD: More spacing logic
* songs and names
* TWEAK: Color on wallet
* colors
* Added flags cutscene before nabooru fight
* ADD: ChromaKey text
* First attempt skip cs after nabooru defeat
* Better implementation for specific rando cutscene skips
* use pulseaudio defaults
* spaces/tabs
* move color push/pop to stop crash
* make the colors work again
* the real bottle fix
* pulseaudio values tuned for n64 audio at 44.1khz
* update tlength
* remove one hardcoded samplerate
* Cleaned up and fixed zelda escape skip
The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of.
* Revert one line to match original
nothing functional
* another hint line that breaks autonewline logic
* don't autospawn epona if we don't have the song/ocarina
* Trying to use iron knuckle death effects
not working yet
* Streamlined OoT cutscene skip for future additions
Also cleaned up if statement in general
* Made if statement more readable
Also added clarity for what cutscene was skipped
* Fixed typo in comment
* Janky nabooru defeat cs skip
* altar text formatting (gonna need help shortening some of the french ones)
* more altar text formatting
* english altar text formatting complete
* make gtg blocking guard check for card not bridge
* FIX: Typo!
* FIX: Uppercases
* FIX: Typo
* TWEAK: Alter + some names
* TWEAK: More caps!
* ADD: Missing string
TWEAK more uppercases and namefixe
s
* Hide nabooru death by covering her in flames
* bandaid fix for death crash issue
* Twinrova defeat cs skip
Skips the animation and manually calls the function to show the "beam" around the sisters
* fix crash
* fix caps to match
* fix great fairy reward mashing/shielding issue
* TWEAK : Typo clé to Clé
* TWEAK: Some Altar hints
TWEAK: Some capitals
* TWEAK: Unmatching text + some cap again
* TWEAK: More tweaks
* fix build
* remove extra json.hpp, add hint
* Update randomizer_item_tracker.cpp
* TWEAK: Double Defense with RedParticles instead of white
* make sure we don't optimize out the check to ensure a spoilerfile exists
* vanilla ganon boss key hint formatting
* TWEAK: FR- better way of the hero text
* fix
* and again
* Initializes dungeonsDone items in gSaveContext to 0.
* Replaces sizeof calculation with a NUM_DUNGEONS constant.
* Fixes Saria's Gift on the LW Bridge from getting killed when holding shield.
* More airtight fix for Saria's Gift on the Bridge.
* Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId.
* Invalidate text box icon before drawing
* Fixes the case where Saria's gift is an Ice Trap.
We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine.
* Initial commit
Might need changing when we change the settings in the future
* Fixes Door of Time opening cutscene after warping with prelude.
* Initial waterfall skip
Very rudimentary way of doing things but it seems to work so :shrug:
* inital rework
* fixed default rotation for 2D sprites
* fix tab/space issues
* 3d drops rando merge fix again
* Allows Impa to appear in the Lullaby check post drawbridge escape.
* Changes Ganon's Trials Count setting to a checkbox
The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed.
* Sets all Ganon's Trials to incomplete in new saves.
Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131
* fix castle guards when oot throw cutscene has already played in rando
* Properly removes the beams when trials are cleared.
* Removes Question Mark from Skip Ganon's Trials UI.
* Adds a todo comment about when to change back to slider.
* make deku seeds check for bullet bag
* Various tweaks
TWEAK: Altar Text
TWEAK: Hint names
TWEAK: Replace more problematic œ to oe
* upgrade ocarina on both child and adult equips
* FIX: Jabu Item
* update equipped hookshot/longshot when obtained as other age
* add hint
* don't give the bgs check without the claim check
* Skips Darunia Cutscene in Fire Temple
* Added a TODO note about not skipping the cutscene.
There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch.
* remove todo
* restore fast ocarina option in imgui that was lost in merge
* Fixes grey screen issue + tooltip for 2 handed shield
* update to use dg instead of g for textures in item tracker
* TWEAK: Default color for cosmetic RAND button was not the corect one
* fix texture crash, remove unused item tracker code
* don't open mask shop until we get zelda's letter
* Update README.md
* Prevents "correct" chime under incorrect conditions.
* Fixes typo in conditional and adds "bonk" sound effect.
"Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time.
* remove modify dpad equips toggle, replace with checks for dpad menu
* remove extra check
* add ability to hold c-up to assign to dpad when dpad menuing is enabled
* disable d-pad navigation on item menu when holding c-up to equip
* dpad+c-up stuff for equipment menu
* ADD: Checbox for songs colors
* TWEAK: RandoColors for normal songs
* kind of quick and dirty but it works
* TWEAK: Clarity of the tooltip
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Dog <5172592+Dog@users.noreply.github.com>
Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com>
Co-authored-by: Baoulettes <perlouzerie@hotmail.fr>
Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
Randomizer v2 (#1065)
* Revert changes to GetItemFromGet
* Fixes Ganon's Boss Key shuffled while regular boss Keys aren't.
* Enum + combo box
* Add obtainability checks correctly
* combobox title rename + no number tracking
* Fix repeatable purchases and bottles rendering incorrectly
* Move shopsanity option in GUI
* Struct instead of ImVec + basic comportment for all case
* Attempt to fix odd build issue
* Cast randoGet for ganons boss key
* Remove redundancy in KD room
* Update logic Cvar names
* Fix Ganons Trials coming from old save files. Fixes #1365
* Fixes crash when entering Ganon's Castle lobby on linux.
* Makes `Item_Give` safe to use with a NULL globalCtx.
This should allow it's use for giving items to Link's Pocket
during rando save initialization.
* Converts Song from Impa to use `Item_Give`
* Adds more options for Link's starting item.
* Removes unneeded `GiveLinkItem` functions.
* and make it build
* bring back new rando dropdown
* gSaveContext access in GameMenuBar.cpp
* Implement Skip Scarecrow's Song
* Reimplement progressive Bombchus
* Rando-next: Deku Nut and Seed ammo gives a blue rupee
Fixes #1390
* Fixes Link starting with BGS
* Persist item tracker notes
* Adjust Hooks include
* Use SohImGui::RequestCvarSaveOnNextTick
* Fix issues from LUS refactor
* Fix for overriding deku scrub messages
* Fix mistake from merge
oops
* Restore checkboxes to enhancements menu
These got lost in the merge
* Update location access logic
Including MQ locations in Spirit and GC now
* Implement rando bombchu drops
* Missing break
* Simplify mudwall collision check
There was no need to have a second collider specifically for Ice Arrow hits
* Update settings.cpp
* Simplify mudwall collision check
* Restore checkboxes in menu
Accidentally lost these during merge
* Clean up bool
* Update logic Cvar name
* Fixed capacity on ammmo tracking
* Fix for beans obtainability
* Hook into file delete and clear notes
* Incorporate magic arrows in rando settings
* Update tooltip
To inform the player that they might have to reload the room if they're enabling this for the first time.
* Update tooltip
* Add line break in tooltip
* Tooltip wording + line break
* tweak on main logic
* All color logic for all types
* Fix: changes to please new LUS
* Ensure itemTrackerNotes vector is not fully empty
* Implement's Tycoon Wallet.
* Refactor DrawItemCount and Use EnhancementCombobox for tracker capacity options
* small tweaks and rename
* always display XX/YY when in ammo/capacity mode
* Move all merchant messages to be generated on file load
* added hovertext for the number display
* Swap german and french translations for shop messages
* Set key colors to be on by default
* Add another flag to skip mask shop
* Fix Sold Out bug
* Fix gerudo keys, add disabled checkbox
* tooltip line break
* Add trials required and merchant prices to save file instead of loading from active spoiler log
* Remove trialsRequired persisting in save manager
* Adds slotIndex to girla (shop item actor) and uses that for IdentifyShopItem.
* Fix issue when merchantPrices is empty
* Fix for a single zeroed merchantPrice entry
* Fix #1417
* Implements items selling out and fixes issues with purchasing some items.
* Fixes order of operations so Rupees will be spent.
* Fixes sold out items not getting overwritten by the randomized info.
* Clarify var names and comments
Also preserve chain platform cutscene in spirit based on Link's position
* Remove !=0 from cvar check
* Clarify var names and comments
* Rename randomizerMerchantPrices to merchantPrices
* Handle shop items in SaveManager
* Fix merge mistake
* Base whats in the bazaar shop on entranceIndex instead of age
* Tidy up chain platform cutscene check
* Fix merge error
Didn't mean to have Zhora changes in here yet
* Use 3drando item table for parsing spoiler names
* Use another nested method instead of one at the top level to fetch the table
* Add missing newline
* Remove log
* Respect custom draw functions
* Fix issues with rendering songs
* Fix localized item names for shopsanity
* Implements a larger array of Sprites for the Icon Hash.
* Uses the hash instead of seed for spoilerfile name and icons.
* Removes some unused functions and variables in `spoiler_log.cpp`
* Prevents leading 0s added to hash from being in file name
* Changes filename format to icon indexes separated by dashes
* Hopefully makes Jenkins happy
* Hopefully makes Jenkins happy
* [Rando] Child Gerudo Fortress 37th Heartpiece randomized
Fixes #1071
* Add descriptions to save editor flags editor, and added randomizer flags (#1386)
* Add descriptions to save editor flags editor, and added randomizer flags
* Hide randomizer flags when not on a randomizer save
* Move flag descriptions to header file
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Fix merge error
* crash on pause menu on linux (only in appimage)
Fixes #1437
* Applies fix to Song from Impa as well.
* Allow buying tunics as child when shopsanity is on
* Fix for custom draw methods overriding sold out sign
* Simplify logic around shopsanity and fix some issues
* Fix dungeon reward stone rotation and add particles
* Fix some issues with ice traps
* Fix adult wallet having its own max capacity
* Fix amount of keys given for BotW
* format
* Use EnGirlAShopItem enum instead of raw hex values
* [#1434] Renders non-warp songs more consistently with warp songs
* A few changes around merchant messages
* Various changes from PR feedback
* Rando: Junk Hint missing french translation
* Typo
* Fix free scrub being at 0 instead of TEXT_SCRUB_RANDOM
* Replace magic numbers in message handler
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Fix BGS softlock for shopsanity
* Support tycoon wallet on tracker
* Revert "Fix BGS softlock for shopsanity"
This reverts commit 5fdb961ea460fb9a035cf0bb6ae77bfeedc1de0f.
* [#1053] Resolves an issue with shop items and bombchu bowling where BGS would display two message boxes
* Implements some necessary plumbing and resolves several Ice Trap Softlocks.
Adds a way for an item entry to tell what type of check it came from (NPC vs Chest vs Freestanding, etc.)
Sets this value from chests and item00 actors.
Relocates pendingIceTraps to save context so it can persist through cutscenes and get stored on save init for Link's Pocket and Song from Impa.
Restructures pendingIceTraps into a counter rather than a true or false, so that we can be frozen multiple times in a row if applicable (atm that should only be at the start of a run if Link's Pocket and Song from Impa were both Ice Traps).
Adds a textbox for Ice Traps and a special case of holding up nothing in the get item process. This fixes all the cases where Ice Traps would softlock due to the actor giving the item expecting a closing textbox. After holding the item above his head Link increments the pendingIceTraps counter by one and sets whatever flag he has pending.
None of the above plumbing applies to Ice Traps from chests, those work exactly the same as before, as do freestanding item00 ice traps (thanks to the additional check for ITEM_FROM_FREESTANDING.
OoT and Ruto's Letter count as NPC's, so they get the FOWL text box and set a pending ice trap rather than immediately freezing, since Link weill be in the water. Link will get frozen the next time he touches land, which in the case of OoT is after the fade to white and right before the Song of Time check.
Fixes all the other softlocks I'm aware of, including Fishing, Bombchu Bowling, Skull Kid, and losing the second Gerudo Archery check.
* fix bgs check in player
* move bgs logic for tokensanity into MOD_NONE check
* set bgs flag before `Item_Give`ing
* move bgs flag into `MOD_NONE` check in girla
* use existing check in `z_player`
* Adds comment explaining the decision to default ITEM_FROM_NPC.
* Rename pendingIceTraps to pendingIceTrapCount
* Adds some RANDOTODO comments about cleaning up a couple things.
* Merge branch 'develop-zhora' into ztornn
* manually restore changes to `z_player.c`
* Fix after some ice trap prepwork from earlier
* Actual fix
* Woops
* More rupee names
* Actually fix it
* Add back comment
* Fix Skip Scarecrow Song
* Fix ruto's letter and LH sun stick rendering
* Also fixes it for treasure chest game
* Tweak: Rando French Wallet
* ADD: French Tycoon
* Hide dungeon items/notes by default
* [#1301] Fix issue with UI not restoring after getting an item from biggoron
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Fix random crash that only affected one person for some reason
Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Sarge-117 <adam_branston@outlook.com>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: lil David <1337lilDavid@gmail.com>
Co-authored-by: Sarge-117 <108380086+Sarge-117@users.noreply.github.com>
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
2022-09-21 00:50:22 -04:00
extern " C " RandomizerCheck Randomizer_GetCheckFromActor ( s16 actorId , s16 sceneNum , s16 actorParams ) {
return OTRGlobals : : Instance - > gRandomizer - > GetCheckFromActor ( actorId , sceneNum , actorParams ) ;
testing out item replacement (#416)
* skip learning song of storms
* don't set flag when getting goron tunic as child
* Initiates prelude check when master sword unloads.
Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again.
* Stops Shadow Temple lore prompts from appearing in rando.
* Skips cutscene of royal tomb explosion in rando.
Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here.
* Improves visual of exploding gravestone.
* Adds some comments explaining the rando differences
* Skip ruto text box in jabu blue warp
For rando
* skip intro cutscene in dodongo's cavern
* load spoiler files on boot, fix spoilerfile existing check when making new saves
* name entry dropped spoiler logic
* make sure to actually init the cvar
* no chime on load
* uncomment
* Skip ganondrof cutscene
Skip to scream part of the death animation, skipping the text boxes etc. For rando
* Update z_boss_ganondrof.c
* skip owl flight cutscenes in rando
* Fixes skipped text so it only applies to shadow temple.
Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors.
* Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case.
* TEST: Text for item
* Adding ganon flavor text
* ADD: AMMO Count
* format ganon text/hint text
* Autoskip the tower cutscene if settings call for tower collapse.
* ganon hint text logic
* Improved prelude after time travel fix
* swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things.
* this is all i did
* not the cleanest code ever but it's working
* ADD: GS Count
* ADD: Wallter (crash for now)
* TWEAK: Wallet check
* FIX: Use DrawItem instread of DrawUpgrade... b-baka!
* Fixes some vanilla bugs introduced by rando code.
* Added cutscene skip for zelda escaping
Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger
* ADD: X Spacing + Placeholders for song
* ADD: default case for items
* TWEAK: Spacing
* FIX: Light Arrow
* ADD: Ammo Option
* use groups instead
* ADD: More spacing logic
* songs and names
* TWEAK: Color on wallet
* colors
* Added flags cutscene before nabooru fight
* ADD: ChromaKey text
* First attempt skip cs after nabooru defeat
* Better implementation for specific rando cutscene skips
* use pulseaudio defaults
* spaces/tabs
* move color push/pop to stop crash
* make the colors work again
* the real bottle fix
* pulseaudio values tuned for n64 audio at 44.1khz
* update tlength
* remove one hardcoded samplerate
* Cleaned up and fixed zelda escape skip
The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of.
* Revert one line to match original
nothing functional
* another hint line that breaks autonewline logic
* don't autospawn epona if we don't have the song/ocarina
* Trying to use iron knuckle death effects
not working yet
* Streamlined OoT cutscene skip for future additions
Also cleaned up if statement in general
* Made if statement more readable
Also added clarity for what cutscene was skipped
* Fixed typo in comment
* Janky nabooru defeat cs skip
* altar text formatting (gonna need help shortening some of the french ones)
* more altar text formatting
* english altar text formatting complete
* make gtg blocking guard check for card not bridge
* FIX: Typo!
* FIX: Uppercases
* FIX: Typo
* TWEAK: Alter + some names
* TWEAK: More caps!
* ADD: Missing string
TWEAK more uppercases and namefixe
s
* Hide nabooru death by covering her in flames
* bandaid fix for death crash issue
* Twinrova defeat cs skip
Skips the animation and manually calls the function to show the "beam" around the sisters
* fix crash
* fix caps to match
* fix great fairy reward mashing/shielding issue
* TWEAK : Typo clé to Clé
* TWEAK: Some Altar hints
TWEAK: Some capitals
* TWEAK: Unmatching text + some cap again
* TWEAK: More tweaks
* fix build
* remove extra json.hpp, add hint
* Update randomizer_item_tracker.cpp
* TWEAK: Double Defense with RedParticles instead of white
* make sure we don't optimize out the check to ensure a spoilerfile exists
* vanilla ganon boss key hint formatting
* TWEAK: FR- better way of the hero text
* fix
* and again
* Initializes dungeonsDone items in gSaveContext to 0.
* Replaces sizeof calculation with a NUM_DUNGEONS constant.
* Fixes Saria's Gift on the LW Bridge from getting killed when holding shield.
* More airtight fix for Saria's Gift on the Bridge.
* Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId.
* Invalidate text box icon before drawing
* Fixes the case where Saria's gift is an Ice Trap.
We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine.
* Initial commit
Might need changing when we change the settings in the future
* Fixes Door of Time opening cutscene after warping with prelude.
* Initial waterfall skip
Very rudimentary way of doing things but it seems to work so :shrug:
* inital rework
* fixed default rotation for 2D sprites
* fix tab/space issues
* 3d drops rando merge fix again
* Allows Impa to appear in the Lullaby check post drawbridge escape.
* Changes Ganon's Trials Count setting to a checkbox
The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed.
* Sets all Ganon's Trials to incomplete in new saves.
Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131
* fix castle guards when oot throw cutscene has already played in rando
* Properly removes the beams when trials are cleared.
* Removes Question Mark from Skip Ganon's Trials UI.
* Adds a todo comment about when to change back to slider.
* make deku seeds check for bullet bag
* Various tweaks
TWEAK: Altar Text
TWEAK: Hint names
TWEAK: Replace more problematic œ to oe
* upgrade ocarina on both child and adult equips
* FIX: Jabu Item
* update equipped hookshot/longshot when obtained as other age
* add hint
* don't give the bgs check without the claim check
* Skips Darunia Cutscene in Fire Temple
* Added a TODO note about not skipping the cutscene.
There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch.
* remove todo
* restore fast ocarina option in imgui that was lost in merge
* Fixes grey screen issue + tooltip for 2 handed shield
* update to use dg instead of g for textures in item tracker
* TWEAK: Default color for cosmetic RAND button was not the corect one
* fix texture crash, remove unused item tracker code
* don't open mask shop until we get zelda's letter
* Update README.md
* Prevents "correct" chime under incorrect conditions.
* Fixes typo in conditional and adds "bonk" sound effect.
"Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time.
* remove modify dpad equips toggle, replace with checks for dpad menu
* remove extra check
* add ability to hold c-up to assign to dpad when dpad menuing is enabled
* disable d-pad navigation on item menu when holding c-up to equip
* dpad+c-up stuff for equipment menu
* ADD: Checbox for songs colors
* TWEAK: RandoColors for normal songs
* kind of quick and dirty but it works
* TWEAK: Clarity of the tooltip
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Dog <5172592+Dog@users.noreply.github.com>
Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com>
Co-authored-by: Baoulettes <perlouzerie@hotmail.fr>
Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
Randomizer v2 (#1065)
* Revert changes to GetItemFromGet
* Fixes Ganon's Boss Key shuffled while regular boss Keys aren't.
* Enum + combo box
* Add obtainability checks correctly
* combobox title rename + no number tracking
* Fix repeatable purchases and bottles rendering incorrectly
* Move shopsanity option in GUI
* Struct instead of ImVec + basic comportment for all case
* Attempt to fix odd build issue
* Cast randoGet for ganons boss key
* Remove redundancy in KD room
* Update logic Cvar names
* Fix Ganons Trials coming from old save files. Fixes #1365
* Fixes crash when entering Ganon's Castle lobby on linux.
* Makes `Item_Give` safe to use with a NULL globalCtx.
This should allow it's use for giving items to Link's Pocket
during rando save initialization.
* Converts Song from Impa to use `Item_Give`
* Adds more options for Link's starting item.
* Removes unneeded `GiveLinkItem` functions.
* and make it build
* bring back new rando dropdown
* gSaveContext access in GameMenuBar.cpp
* Implement Skip Scarecrow's Song
* Reimplement progressive Bombchus
* Rando-next: Deku Nut and Seed ammo gives a blue rupee
Fixes #1390
* Fixes Link starting with BGS
* Persist item tracker notes
* Adjust Hooks include
* Use SohImGui::RequestCvarSaveOnNextTick
* Fix issues from LUS refactor
* Fix for overriding deku scrub messages
* Fix mistake from merge
oops
* Restore checkboxes to enhancements menu
These got lost in the merge
* Update location access logic
Including MQ locations in Spirit and GC now
* Implement rando bombchu drops
* Missing break
* Simplify mudwall collision check
There was no need to have a second collider specifically for Ice Arrow hits
* Update settings.cpp
* Simplify mudwall collision check
* Restore checkboxes in menu
Accidentally lost these during merge
* Clean up bool
* Update logic Cvar name
* Fixed capacity on ammmo tracking
* Fix for beans obtainability
* Hook into file delete and clear notes
* Incorporate magic arrows in rando settings
* Update tooltip
To inform the player that they might have to reload the room if they're enabling this for the first time.
* Update tooltip
* Add line break in tooltip
* Tooltip wording + line break
* tweak on main logic
* All color logic for all types
* Fix: changes to please new LUS
* Ensure itemTrackerNotes vector is not fully empty
* Implement's Tycoon Wallet.
* Refactor DrawItemCount and Use EnhancementCombobox for tracker capacity options
* small tweaks and rename
* always display XX/YY when in ammo/capacity mode
* Move all merchant messages to be generated on file load
* added hovertext for the number display
* Swap german and french translations for shop messages
* Set key colors to be on by default
* Add another flag to skip mask shop
* Fix Sold Out bug
* Fix gerudo keys, add disabled checkbox
* tooltip line break
* Add trials required and merchant prices to save file instead of loading from active spoiler log
* Remove trialsRequired persisting in save manager
* Adds slotIndex to girla (shop item actor) and uses that for IdentifyShopItem.
* Fix issue when merchantPrices is empty
* Fix for a single zeroed merchantPrice entry
* Fix #1417
* Implements items selling out and fixes issues with purchasing some items.
* Fixes order of operations so Rupees will be spent.
* Fixes sold out items not getting overwritten by the randomized info.
* Clarify var names and comments
Also preserve chain platform cutscene in spirit based on Link's position
* Remove !=0 from cvar check
* Clarify var names and comments
* Rename randomizerMerchantPrices to merchantPrices
* Handle shop items in SaveManager
* Fix merge mistake
* Base whats in the bazaar shop on entranceIndex instead of age
* Tidy up chain platform cutscene check
* Fix merge error
Didn't mean to have Zhora changes in here yet
* Use 3drando item table for parsing spoiler names
* Use another nested method instead of one at the top level to fetch the table
* Add missing newline
* Remove log
* Respect custom draw functions
* Fix issues with rendering songs
* Fix localized item names for shopsanity
* Implements a larger array of Sprites for the Icon Hash.
* Uses the hash instead of seed for spoilerfile name and icons.
* Removes some unused functions and variables in `spoiler_log.cpp`
* Prevents leading 0s added to hash from being in file name
* Changes filename format to icon indexes separated by dashes
* Hopefully makes Jenkins happy
* Hopefully makes Jenkins happy
* [Rando] Child Gerudo Fortress 37th Heartpiece randomized
Fixes #1071
* Add descriptions to save editor flags editor, and added randomizer flags (#1386)
* Add descriptions to save editor flags editor, and added randomizer flags
* Hide randomizer flags when not on a randomizer save
* Move flag descriptions to header file
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Fix merge error
* crash on pause menu on linux (only in appimage)
Fixes #1437
* Applies fix to Song from Impa as well.
* Allow buying tunics as child when shopsanity is on
* Fix for custom draw methods overriding sold out sign
* Simplify logic around shopsanity and fix some issues
* Fix dungeon reward stone rotation and add particles
* Fix some issues with ice traps
* Fix adult wallet having its own max capacity
* Fix amount of keys given for BotW
* format
* Use EnGirlAShopItem enum instead of raw hex values
* [#1434] Renders non-warp songs more consistently with warp songs
* A few changes around merchant messages
* Various changes from PR feedback
* Rando: Junk Hint missing french translation
* Typo
* Fix free scrub being at 0 instead of TEXT_SCRUB_RANDOM
* Replace magic numbers in message handler
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Fix BGS softlock for shopsanity
* Support tycoon wallet on tracker
* Revert "Fix BGS softlock for shopsanity"
This reverts commit 5fdb961ea460fb9a035cf0bb6ae77bfeedc1de0f.
* [#1053] Resolves an issue with shop items and bombchu bowling where BGS would display two message boxes
* Implements some necessary plumbing and resolves several Ice Trap Softlocks.
Adds a way for an item entry to tell what type of check it came from (NPC vs Chest vs Freestanding, etc.)
Sets this value from chests and item00 actors.
Relocates pendingIceTraps to save context so it can persist through cutscenes and get stored on save init for Link's Pocket and Song from Impa.
Restructures pendingIceTraps into a counter rather than a true or false, so that we can be frozen multiple times in a row if applicable (atm that should only be at the start of a run if Link's Pocket and Song from Impa were both Ice Traps).
Adds a textbox for Ice Traps and a special case of holding up nothing in the get item process. This fixes all the cases where Ice Traps would softlock due to the actor giving the item expecting a closing textbox. After holding the item above his head Link increments the pendingIceTraps counter by one and sets whatever flag he has pending.
None of the above plumbing applies to Ice Traps from chests, those work exactly the same as before, as do freestanding item00 ice traps (thanks to the additional check for ITEM_FROM_FREESTANDING.
OoT and Ruto's Letter count as NPC's, so they get the FOWL text box and set a pending ice trap rather than immediately freezing, since Link weill be in the water. Link will get frozen the next time he touches land, which in the case of OoT is after the fade to white and right before the Song of Time check.
Fixes all the other softlocks I'm aware of, including Fishing, Bombchu Bowling, Skull Kid, and losing the second Gerudo Archery check.
* fix bgs check in player
* move bgs logic for tokensanity into MOD_NONE check
* set bgs flag before `Item_Give`ing
* move bgs flag into `MOD_NONE` check in girla
* use existing check in `z_player`
* Adds comment explaining the decision to default ITEM_FROM_NPC.
* Rename pendingIceTraps to pendingIceTrapCount
* Adds some RANDOTODO comments about cleaning up a couple things.
* Merge branch 'develop-zhora' into ztornn
* manually restore changes to `z_player.c`
* Fix after some ice trap prepwork from earlier
* Actual fix
* Woops
* More rupee names
* Actually fix it
* Add back comment
* Fix Skip Scarecrow Song
* Fix ruto's letter and LH sun stick rendering
* Also fixes it for treasure chest game
* Tweak: Rando French Wallet
* ADD: French Tycoon
* Hide dungeon items/notes by default
* [#1301] Fix issue with UI not restoring after getting an item from biggoron
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Fix random crash that only affected one person for some reason
Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Sarge-117 <adam_branston@outlook.com>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: lil David <1337lilDavid@gmail.com>
Co-authored-by: Sarge-117 <108380086+Sarge-117@users.noreply.github.com>
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
2022-09-21 00:50:22 -04:00
extern " C " ScrubIdentity Randomizer_IdentifyScrub ( s32 sceneNum , s32 actorParams , s32 respawnData ) {
return OTRGlobals : : Instance - > gRandomizer - > IdentifyScrub ( sceneNum , actorParams , respawnData ) ;
}
2024-01-14 13:16:32 -05:00
extern " C " BeehiveIdentity Randomizer_IdentifyBeehive ( s32 sceneNum , s16 xPosition , s32 respawnData ) {
return OTRGlobals : : Instance - > gRandomizer - > IdentifyBeehive ( sceneNum , xPosition , respawnData ) ;
}
Randomizer v2 (#1065)
* Revert changes to GetItemFromGet
* Fixes Ganon's Boss Key shuffled while regular boss Keys aren't.
* Enum + combo box
* Add obtainability checks correctly
* combobox title rename + no number tracking
* Fix repeatable purchases and bottles rendering incorrectly
* Move shopsanity option in GUI
* Struct instead of ImVec + basic comportment for all case
* Attempt to fix odd build issue
* Cast randoGet for ganons boss key
* Remove redundancy in KD room
* Update logic Cvar names
* Fix Ganons Trials coming from old save files. Fixes #1365
* Fixes crash when entering Ganon's Castle lobby on linux.
* Makes `Item_Give` safe to use with a NULL globalCtx.
This should allow it's use for giving items to Link's Pocket
during rando save initialization.
* Converts Song from Impa to use `Item_Give`
* Adds more options for Link's starting item.
* Removes unneeded `GiveLinkItem` functions.
* and make it build
* bring back new rando dropdown
* gSaveContext access in GameMenuBar.cpp
* Implement Skip Scarecrow's Song
* Reimplement progressive Bombchus
* Rando-next: Deku Nut and Seed ammo gives a blue rupee
Fixes #1390
* Fixes Link starting with BGS
* Persist item tracker notes
* Adjust Hooks include
* Use SohImGui::RequestCvarSaveOnNextTick
* Fix issues from LUS refactor
* Fix for overriding deku scrub messages
* Fix mistake from merge
oops
* Restore checkboxes to enhancements menu
These got lost in the merge
* Update location access logic
Including MQ locations in Spirit and GC now
* Implement rando bombchu drops
* Missing break
* Simplify mudwall collision check
There was no need to have a second collider specifically for Ice Arrow hits
* Update settings.cpp
* Simplify mudwall collision check
* Restore checkboxes in menu
Accidentally lost these during merge
* Clean up bool
* Update logic Cvar name
* Fixed capacity on ammmo tracking
* Fix for beans obtainability
* Hook into file delete and clear notes
* Incorporate magic arrows in rando settings
* Update tooltip
To inform the player that they might have to reload the room if they're enabling this for the first time.
* Update tooltip
* Add line break in tooltip
* Tooltip wording + line break
* tweak on main logic
* All color logic for all types
* Fix: changes to please new LUS
* Ensure itemTrackerNotes vector is not fully empty
* Implement's Tycoon Wallet.
* Refactor DrawItemCount and Use EnhancementCombobox for tracker capacity options
* small tweaks and rename
* always display XX/YY when in ammo/capacity mode
* Move all merchant messages to be generated on file load
* added hovertext for the number display
* Swap german and french translations for shop messages
* Set key colors to be on by default
* Add another flag to skip mask shop
* Fix Sold Out bug
* Fix gerudo keys, add disabled checkbox
* tooltip line break
* Add trials required and merchant prices to save file instead of loading from active spoiler log
* Remove trialsRequired persisting in save manager
* Adds slotIndex to girla (shop item actor) and uses that for IdentifyShopItem.
* Fix issue when merchantPrices is empty
* Fix for a single zeroed merchantPrice entry
* Fix #1417
* Implements items selling out and fixes issues with purchasing some items.
* Fixes order of operations so Rupees will be spent.
* Fixes sold out items not getting overwritten by the randomized info.
* Clarify var names and comments
Also preserve chain platform cutscene in spirit based on Link's position
* Remove !=0 from cvar check
* Clarify var names and comments
* Rename randomizerMerchantPrices to merchantPrices
* Handle shop items in SaveManager
* Fix merge mistake
* Base whats in the bazaar shop on entranceIndex instead of age
* Tidy up chain platform cutscene check
* Fix merge error
Didn't mean to have Zhora changes in here yet
* Use 3drando item table for parsing spoiler names
* Use another nested method instead of one at the top level to fetch the table
* Add missing newline
* Remove log
* Respect custom draw functions
* Fix issues with rendering songs
* Fix localized item names for shopsanity
* Implements a larger array of Sprites for the Icon Hash.
* Uses the hash instead of seed for spoilerfile name and icons.
* Removes some unused functions and variables in `spoiler_log.cpp`
* Prevents leading 0s added to hash from being in file name
* Changes filename format to icon indexes separated by dashes
* Hopefully makes Jenkins happy
* Hopefully makes Jenkins happy
* [Rando] Child Gerudo Fortress 37th Heartpiece randomized
Fixes #1071
* Add descriptions to save editor flags editor, and added randomizer flags (#1386)
* Add descriptions to save editor flags editor, and added randomizer flags
* Hide randomizer flags when not on a randomizer save
* Move flag descriptions to header file
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Fix merge error
* crash on pause menu on linux (only in appimage)
Fixes #1437
* Applies fix to Song from Impa as well.
* Allow buying tunics as child when shopsanity is on
* Fix for custom draw methods overriding sold out sign
* Simplify logic around shopsanity and fix some issues
* Fix dungeon reward stone rotation and add particles
* Fix some issues with ice traps
* Fix adult wallet having its own max capacity
* Fix amount of keys given for BotW
* format
* Use EnGirlAShopItem enum instead of raw hex values
* [#1434] Renders non-warp songs more consistently with warp songs
* A few changes around merchant messages
* Various changes from PR feedback
* Rando: Junk Hint missing french translation
* Typo
* Fix free scrub being at 0 instead of TEXT_SCRUB_RANDOM
* Replace magic numbers in message handler
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Fix BGS softlock for shopsanity
* Support tycoon wallet on tracker
* Revert "Fix BGS softlock for shopsanity"
This reverts commit 5fdb961ea460fb9a035cf0bb6ae77bfeedc1de0f.
* [#1053] Resolves an issue with shop items and bombchu bowling where BGS would display two message boxes
* Implements some necessary plumbing and resolves several Ice Trap Softlocks.
Adds a way for an item entry to tell what type of check it came from (NPC vs Chest vs Freestanding, etc.)
Sets this value from chests and item00 actors.
Relocates pendingIceTraps to save context so it can persist through cutscenes and get stored on save init for Link's Pocket and Song from Impa.
Restructures pendingIceTraps into a counter rather than a true or false, so that we can be frozen multiple times in a row if applicable (atm that should only be at the start of a run if Link's Pocket and Song from Impa were both Ice Traps).
Adds a textbox for Ice Traps and a special case of holding up nothing in the get item process. This fixes all the cases where Ice Traps would softlock due to the actor giving the item expecting a closing textbox. After holding the item above his head Link increments the pendingIceTraps counter by one and sets whatever flag he has pending.
None of the above plumbing applies to Ice Traps from chests, those work exactly the same as before, as do freestanding item00 ice traps (thanks to the additional check for ITEM_FROM_FREESTANDING.
OoT and Ruto's Letter count as NPC's, so they get the FOWL text box and set a pending ice trap rather than immediately freezing, since Link weill be in the water. Link will get frozen the next time he touches land, which in the case of OoT is after the fade to white and right before the Song of Time check.
Fixes all the other softlocks I'm aware of, including Fishing, Bombchu Bowling, Skull Kid, and losing the second Gerudo Archery check.
* fix bgs check in player
* move bgs logic for tokensanity into MOD_NONE check
* set bgs flag before `Item_Give`ing
* move bgs flag into `MOD_NONE` check in girla
* use existing check in `z_player`
* Adds comment explaining the decision to default ITEM_FROM_NPC.
* Rename pendingIceTraps to pendingIceTrapCount
* Adds some RANDOTODO comments about cleaning up a couple things.
* Merge branch 'develop-zhora' into ztornn
* manually restore changes to `z_player.c`
* Fix after some ice trap prepwork from earlier
* Actual fix
* Woops
* More rupee names
* Actually fix it
* Add back comment
* Fix Skip Scarecrow Song
* Fix ruto's letter and LH sun stick rendering
* Also fixes it for treasure chest game
* Tweak: Rando French Wallet
* ADD: French Tycoon
* Hide dungeon items/notes by default
* [#1301] Fix issue with UI not restoring after getting an item from biggoron
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Fix random crash that only affected one person for some reason
Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Sarge-117 <adam_branston@outlook.com>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: lil David <1337lilDavid@gmail.com>
Co-authored-by: Sarge-117 <108380086+Sarge-117@users.noreply.github.com>
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
2022-09-21 00:50:22 -04:00
extern " C " ShopItemIdentity Randomizer_IdentifyShopItem ( s32 sceneNum , u8 slotIndex ) {
return OTRGlobals : : Instance - > gRandomizer - > IdentifyShopItem ( sceneNum , slotIndex ) ;
}
2022-10-21 21:43:37 -04:00
extern " C " CowIdentity Randomizer_IdentifyCow ( s32 sceneNum , s32 posX , s32 posZ ) {
return OTRGlobals : : Instance - > gRandomizer - > IdentifyCow ( sceneNum , posX , posZ ) ;
}
2024-01-14 12:02:23 -05:00
extern " C " FishIdentity Randomizer_IdentifyFish ( s32 sceneNum , s32 actorParams ) {
return OTRGlobals : : Instance - > gRandomizer - > IdentifyFish ( sceneNum , actorParams ) ;
}
2022-08-23 20:11:38 -04:00
extern " C " GetItemEntry ItemTable_Retrieve ( int16_t getItemID ) {
2022-09-02 13:19:12 -04:00
GetItemEntry giEntry = ItemTableManager : : Instance - > RetrieveItemEntry ( MOD_NONE , getItemID ) ;
2022-08-23 20:11:38 -04:00
return giEntry ;
}
extern " C " GetItemEntry ItemTable_RetrieveEntry ( s16 tableID , s16 getItemID ) {
2023-12-12 18:51:26 -05:00
if ( tableID = = MOD_RANDOMIZER ) {
return Rando : : StaticData : : RetrieveItem ( static_cast < RandomizerGet > ( getItemID ) ) . GetGIEntry_Copy ( ) ;
}
2022-08-23 20:11:38 -04:00
return ItemTableManager : : Instance - > RetrieveItemEntry ( tableID , getItemID ) ;
testing out item replacement (#416)
* skip learning song of storms
* don't set flag when getting goron tunic as child
* Initiates prelude check when master sword unloads.
Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again.
* Stops Shadow Temple lore prompts from appearing in rando.
* Skips cutscene of royal tomb explosion in rando.
Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here.
* Improves visual of exploding gravestone.
* Adds some comments explaining the rando differences
* Skip ruto text box in jabu blue warp
For rando
* skip intro cutscene in dodongo's cavern
* load spoiler files on boot, fix spoilerfile existing check when making new saves
* name entry dropped spoiler logic
* make sure to actually init the cvar
* no chime on load
* uncomment
* Skip ganondrof cutscene
Skip to scream part of the death animation, skipping the text boxes etc. For rando
* Update z_boss_ganondrof.c
* skip owl flight cutscenes in rando
* Fixes skipped text so it only applies to shadow temple.
Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors.
* Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case.
* TEST: Text for item
* Adding ganon flavor text
* ADD: AMMO Count
* format ganon text/hint text
* Autoskip the tower cutscene if settings call for tower collapse.
* ganon hint text logic
* Improved prelude after time travel fix
* swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things.
* this is all i did
* not the cleanest code ever but it's working
* ADD: GS Count
* ADD: Wallter (crash for now)
* TWEAK: Wallet check
* FIX: Use DrawItem instread of DrawUpgrade... b-baka!
* Fixes some vanilla bugs introduced by rando code.
* Added cutscene skip for zelda escaping
Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger
* ADD: X Spacing + Placeholders for song
* ADD: default case for items
* TWEAK: Spacing
* FIX: Light Arrow
* ADD: Ammo Option
* use groups instead
* ADD: More spacing logic
* songs and names
* TWEAK: Color on wallet
* colors
* Added flags cutscene before nabooru fight
* ADD: ChromaKey text
* First attempt skip cs after nabooru defeat
* Better implementation for specific rando cutscene skips
* use pulseaudio defaults
* spaces/tabs
* move color push/pop to stop crash
* make the colors work again
* the real bottle fix
* pulseaudio values tuned for n64 audio at 44.1khz
* update tlength
* remove one hardcoded samplerate
* Cleaned up and fixed zelda escape skip
The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of.
* Revert one line to match original
nothing functional
* another hint line that breaks autonewline logic
* don't autospawn epona if we don't have the song/ocarina
* Trying to use iron knuckle death effects
not working yet
* Streamlined OoT cutscene skip for future additions
Also cleaned up if statement in general
* Made if statement more readable
Also added clarity for what cutscene was skipped
* Fixed typo in comment
* Janky nabooru defeat cs skip
* altar text formatting (gonna need help shortening some of the french ones)
* more altar text formatting
* english altar text formatting complete
* make gtg blocking guard check for card not bridge
* FIX: Typo!
* FIX: Uppercases
* FIX: Typo
* TWEAK: Alter + some names
* TWEAK: More caps!
* ADD: Missing string
TWEAK more uppercases and namefixe
s
* Hide nabooru death by covering her in flames
* bandaid fix for death crash issue
* Twinrova defeat cs skip
Skips the animation and manually calls the function to show the "beam" around the sisters
* fix crash
* fix caps to match
* fix great fairy reward mashing/shielding issue
* TWEAK : Typo clé to Clé
* TWEAK: Some Altar hints
TWEAK: Some capitals
* TWEAK: Unmatching text + some cap again
* TWEAK: More tweaks
* fix build
* remove extra json.hpp, add hint
* Update randomizer_item_tracker.cpp
* TWEAK: Double Defense with RedParticles instead of white
* make sure we don't optimize out the check to ensure a spoilerfile exists
* vanilla ganon boss key hint formatting
* TWEAK: FR- better way of the hero text
* fix
* and again
* Initializes dungeonsDone items in gSaveContext to 0.
* Replaces sizeof calculation with a NUM_DUNGEONS constant.
* Fixes Saria's Gift on the LW Bridge from getting killed when holding shield.
* More airtight fix for Saria's Gift on the Bridge.
* Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId.
* Invalidate text box icon before drawing
* Fixes the case where Saria's gift is an Ice Trap.
We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine.
* Initial commit
Might need changing when we change the settings in the future
* Fixes Door of Time opening cutscene after warping with prelude.
* Initial waterfall skip
Very rudimentary way of doing things but it seems to work so :shrug:
* inital rework
* fixed default rotation for 2D sprites
* fix tab/space issues
* 3d drops rando merge fix again
* Allows Impa to appear in the Lullaby check post drawbridge escape.
* Changes Ganon's Trials Count setting to a checkbox
The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed.
* Sets all Ganon's Trials to incomplete in new saves.
Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131
* fix castle guards when oot throw cutscene has already played in rando
* Properly removes the beams when trials are cleared.
* Removes Question Mark from Skip Ganon's Trials UI.
* Adds a todo comment about when to change back to slider.
* make deku seeds check for bullet bag
* Various tweaks
TWEAK: Altar Text
TWEAK: Hint names
TWEAK: Replace more problematic œ to oe
* upgrade ocarina on both child and adult equips
* FIX: Jabu Item
* update equipped hookshot/longshot when obtained as other age
* add hint
* don't give the bgs check without the claim check
* Skips Darunia Cutscene in Fire Temple
* Added a TODO note about not skipping the cutscene.
There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch.
* remove todo
* restore fast ocarina option in imgui that was lost in merge
* Fixes grey screen issue + tooltip for 2 handed shield
* update to use dg instead of g for textures in item tracker
* TWEAK: Default color for cosmetic RAND button was not the corect one
* fix texture crash, remove unused item tracker code
* don't open mask shop until we get zelda's letter
* Update README.md
* Prevents "correct" chime under incorrect conditions.
* Fixes typo in conditional and adds "bonk" sound effect.
"Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time.
* remove modify dpad equips toggle, replace with checks for dpad menu
* remove extra check
* add ability to hold c-up to assign to dpad when dpad menuing is enabled
* disable d-pad navigation on item menu when holding c-up to equip
* dpad+c-up stuff for equipment menu
* ADD: Checbox for songs colors
* TWEAK: RandoColors for normal songs
* kind of quick and dirty but it works
* TWEAK: Clarity of the tooltip
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Dog <5172592+Dog@users.noreply.github.com>
Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com>
Co-authored-by: Baoulettes <perlouzerie@hotmail.fr>
Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
Randomizer v2 (#1065)
* Revert changes to GetItemFromGet
* Fixes Ganon's Boss Key shuffled while regular boss Keys aren't.
* Enum + combo box
* Add obtainability checks correctly
* combobox title rename + no number tracking
* Fix repeatable purchases and bottles rendering incorrectly
* Move shopsanity option in GUI
* Struct instead of ImVec + basic comportment for all case
* Attempt to fix odd build issue
* Cast randoGet for ganons boss key
* Remove redundancy in KD room
* Update logic Cvar names
* Fix Ganons Trials coming from old save files. Fixes #1365
* Fixes crash when entering Ganon's Castle lobby on linux.
* Makes `Item_Give` safe to use with a NULL globalCtx.
This should allow it's use for giving items to Link's Pocket
during rando save initialization.
* Converts Song from Impa to use `Item_Give`
* Adds more options for Link's starting item.
* Removes unneeded `GiveLinkItem` functions.
* and make it build
* bring back new rando dropdown
* gSaveContext access in GameMenuBar.cpp
* Implement Skip Scarecrow's Song
* Reimplement progressive Bombchus
* Rando-next: Deku Nut and Seed ammo gives a blue rupee
Fixes #1390
* Fixes Link starting with BGS
* Persist item tracker notes
* Adjust Hooks include
* Use SohImGui::RequestCvarSaveOnNextTick
* Fix issues from LUS refactor
* Fix for overriding deku scrub messages
* Fix mistake from merge
oops
* Restore checkboxes to enhancements menu
These got lost in the merge
* Update location access logic
Including MQ locations in Spirit and GC now
* Implement rando bombchu drops
* Missing break
* Simplify mudwall collision check
There was no need to have a second collider specifically for Ice Arrow hits
* Update settings.cpp
* Simplify mudwall collision check
* Restore checkboxes in menu
Accidentally lost these during merge
* Clean up bool
* Update logic Cvar name
* Fixed capacity on ammmo tracking
* Fix for beans obtainability
* Hook into file delete and clear notes
* Incorporate magic arrows in rando settings
* Update tooltip
To inform the player that they might have to reload the room if they're enabling this for the first time.
* Update tooltip
* Add line break in tooltip
* Tooltip wording + line break
* tweak on main logic
* All color logic for all types
* Fix: changes to please new LUS
* Ensure itemTrackerNotes vector is not fully empty
* Implement's Tycoon Wallet.
* Refactor DrawItemCount and Use EnhancementCombobox for tracker capacity options
* small tweaks and rename
* always display XX/YY when in ammo/capacity mode
* Move all merchant messages to be generated on file load
* added hovertext for the number display
* Swap german and french translations for shop messages
* Set key colors to be on by default
* Add another flag to skip mask shop
* Fix Sold Out bug
* Fix gerudo keys, add disabled checkbox
* tooltip line break
* Add trials required and merchant prices to save file instead of loading from active spoiler log
* Remove trialsRequired persisting in save manager
* Adds slotIndex to girla (shop item actor) and uses that for IdentifyShopItem.
* Fix issue when merchantPrices is empty
* Fix for a single zeroed merchantPrice entry
* Fix #1417
* Implements items selling out and fixes issues with purchasing some items.
* Fixes order of operations so Rupees will be spent.
* Fixes sold out items not getting overwritten by the randomized info.
* Clarify var names and comments
Also preserve chain platform cutscene in spirit based on Link's position
* Remove !=0 from cvar check
* Clarify var names and comments
* Rename randomizerMerchantPrices to merchantPrices
* Handle shop items in SaveManager
* Fix merge mistake
* Base whats in the bazaar shop on entranceIndex instead of age
* Tidy up chain platform cutscene check
* Fix merge error
Didn't mean to have Zhora changes in here yet
* Use 3drando item table for parsing spoiler names
* Use another nested method instead of one at the top level to fetch the table
* Add missing newline
* Remove log
* Respect custom draw functions
* Fix issues with rendering songs
* Fix localized item names for shopsanity
* Implements a larger array of Sprites for the Icon Hash.
* Uses the hash instead of seed for spoilerfile name and icons.
* Removes some unused functions and variables in `spoiler_log.cpp`
* Prevents leading 0s added to hash from being in file name
* Changes filename format to icon indexes separated by dashes
* Hopefully makes Jenkins happy
* Hopefully makes Jenkins happy
* [Rando] Child Gerudo Fortress 37th Heartpiece randomized
Fixes #1071
* Add descriptions to save editor flags editor, and added randomizer flags (#1386)
* Add descriptions to save editor flags editor, and added randomizer flags
* Hide randomizer flags when not on a randomizer save
* Move flag descriptions to header file
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Fix merge error
* crash on pause menu on linux (only in appimage)
Fixes #1437
* Applies fix to Song from Impa as well.
* Allow buying tunics as child when shopsanity is on
* Fix for custom draw methods overriding sold out sign
* Simplify logic around shopsanity and fix some issues
* Fix dungeon reward stone rotation and add particles
* Fix some issues with ice traps
* Fix adult wallet having its own max capacity
* Fix amount of keys given for BotW
* format
* Use EnGirlAShopItem enum instead of raw hex values
* [#1434] Renders non-warp songs more consistently with warp songs
* A few changes around merchant messages
* Various changes from PR feedback
* Rando: Junk Hint missing french translation
* Typo
* Fix free scrub being at 0 instead of TEXT_SCRUB_RANDOM
* Replace magic numbers in message handler
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Fix BGS softlock for shopsanity
* Support tycoon wallet on tracker
* Revert "Fix BGS softlock for shopsanity"
This reverts commit 5fdb961ea460fb9a035cf0bb6ae77bfeedc1de0f.
* [#1053] Resolves an issue with shop items and bombchu bowling where BGS would display two message boxes
* Implements some necessary plumbing and resolves several Ice Trap Softlocks.
Adds a way for an item entry to tell what type of check it came from (NPC vs Chest vs Freestanding, etc.)
Sets this value from chests and item00 actors.
Relocates pendingIceTraps to save context so it can persist through cutscenes and get stored on save init for Link's Pocket and Song from Impa.
Restructures pendingIceTraps into a counter rather than a true or false, so that we can be frozen multiple times in a row if applicable (atm that should only be at the start of a run if Link's Pocket and Song from Impa were both Ice Traps).
Adds a textbox for Ice Traps and a special case of holding up nothing in the get item process. This fixes all the cases where Ice Traps would softlock due to the actor giving the item expecting a closing textbox. After holding the item above his head Link increments the pendingIceTraps counter by one and sets whatever flag he has pending.
None of the above plumbing applies to Ice Traps from chests, those work exactly the same as before, as do freestanding item00 ice traps (thanks to the additional check for ITEM_FROM_FREESTANDING.
OoT and Ruto's Letter count as NPC's, so they get the FOWL text box and set a pending ice trap rather than immediately freezing, since Link weill be in the water. Link will get frozen the next time he touches land, which in the case of OoT is after the fade to white and right before the Song of Time check.
Fixes all the other softlocks I'm aware of, including Fishing, Bombchu Bowling, Skull Kid, and losing the second Gerudo Archery check.
* fix bgs check in player
* move bgs logic for tokensanity into MOD_NONE check
* set bgs flag before `Item_Give`ing
* move bgs flag into `MOD_NONE` check in girla
* use existing check in `z_player`
* Adds comment explaining the decision to default ITEM_FROM_NPC.
* Rename pendingIceTraps to pendingIceTrapCount
* Adds some RANDOTODO comments about cleaning up a couple things.
* Merge branch 'develop-zhora' into ztornn
* manually restore changes to `z_player.c`
* Fix after some ice trap prepwork from earlier
* Actual fix
* Woops
* More rupee names
* Actually fix it
* Add back comment
* Fix Skip Scarecrow Song
* Fix ruto's letter and LH sun stick rendering
* Also fixes it for treasure chest game
* Tweak: Rando French Wallet
* ADD: French Tycoon
* Hide dungeon items/notes by default
* [#1301] Fix issue with UI not restoring after getting an item from biggoron
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Fix random crash that only affected one person for some reason
Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Sarge-117 <adam_branston@outlook.com>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: lil David <1337lilDavid@gmail.com>
Co-authored-by: Sarge-117 <108380086+Sarge-117@users.noreply.github.com>
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
2022-09-21 00:50:22 -04:00
extern " C " GetItemEntry Randomizer_GetItemFromActor ( s16 actorId , s16 sceneNum , s16 actorParams , GetItemID ogId ) {
2022-10-03 19:15:36 -04:00
return OTRGlobals : : Instance - > gRandomizer - > GetItemFromActor ( actorId , sceneNum , actorParams , ogId ) ;
2022-08-23 20:11:38 -04:00
}
2022-10-20 22:33:04 -04:00
extern " C " GetItemEntry Randomizer_GetItemFromActorWithoutObtainabilityCheck ( s16 actorId , s16 sceneNum , s16 actorParams , GetItemID ogId ) {
return OTRGlobals : : Instance - > gRandomizer - > GetItemFromActor ( actorId , sceneNum , actorParams , ogId , false ) ;
}
2022-08-23 20:11:38 -04:00
extern " C " GetItemEntry Randomizer_GetItemFromKnownCheck ( RandomizerCheck randomizerCheck , GetItemID ogId ) {
2022-10-03 19:15:36 -04:00
return OTRGlobals : : Instance - > gRandomizer - > GetItemFromKnownCheck ( randomizerCheck , ogId ) ;
testing out item replacement (#416)
* skip learning song of storms
* don't set flag when getting goron tunic as child
* Initiates prelude check when master sword unloads.
Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again.
* Stops Shadow Temple lore prompts from appearing in rando.
* Skips cutscene of royal tomb explosion in rando.
Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here.
* Improves visual of exploding gravestone.
* Adds some comments explaining the rando differences
* Skip ruto text box in jabu blue warp
For rando
* skip intro cutscene in dodongo's cavern
* load spoiler files on boot, fix spoilerfile existing check when making new saves
* name entry dropped spoiler logic
* make sure to actually init the cvar
* no chime on load
* uncomment
* Skip ganondrof cutscene
Skip to scream part of the death animation, skipping the text boxes etc. For rando
* Update z_boss_ganondrof.c
* skip owl flight cutscenes in rando
* Fixes skipped text so it only applies to shadow temple.
Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors.
* Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case.
* TEST: Text for item
* Adding ganon flavor text
* ADD: AMMO Count
* format ganon text/hint text
* Autoskip the tower cutscene if settings call for tower collapse.
* ganon hint text logic
* Improved prelude after time travel fix
* swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things.
* this is all i did
* not the cleanest code ever but it's working
* ADD: GS Count
* ADD: Wallter (crash for now)
* TWEAK: Wallet check
* FIX: Use DrawItem instread of DrawUpgrade... b-baka!
* Fixes some vanilla bugs introduced by rando code.
* Added cutscene skip for zelda escaping
Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger
* ADD: X Spacing + Placeholders for song
* ADD: default case for items
* TWEAK: Spacing
* FIX: Light Arrow
* ADD: Ammo Option
* use groups instead
* ADD: More spacing logic
* songs and names
* TWEAK: Color on wallet
* colors
* Added flags cutscene before nabooru fight
* ADD: ChromaKey text
* First attempt skip cs after nabooru defeat
* Better implementation for specific rando cutscene skips
* use pulseaudio defaults
* spaces/tabs
* move color push/pop to stop crash
* make the colors work again
* the real bottle fix
* pulseaudio values tuned for n64 audio at 44.1khz
* update tlength
* remove one hardcoded samplerate
* Cleaned up and fixed zelda escape skip
The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of.
* Revert one line to match original
nothing functional
* another hint line that breaks autonewline logic
* don't autospawn epona if we don't have the song/ocarina
* Trying to use iron knuckle death effects
not working yet
* Streamlined OoT cutscene skip for future additions
Also cleaned up if statement in general
* Made if statement more readable
Also added clarity for what cutscene was skipped
* Fixed typo in comment
* Janky nabooru defeat cs skip
* altar text formatting (gonna need help shortening some of the french ones)
* more altar text formatting
* english altar text formatting complete
* make gtg blocking guard check for card not bridge
* FIX: Typo!
* FIX: Uppercases
* FIX: Typo
* TWEAK: Alter + some names
* TWEAK: More caps!
* ADD: Missing string
TWEAK more uppercases and namefixe
s
* Hide nabooru death by covering her in flames
* bandaid fix for death crash issue
* Twinrova defeat cs skip
Skips the animation and manually calls the function to show the "beam" around the sisters
* fix crash
* fix caps to match
* fix great fairy reward mashing/shielding issue
* TWEAK : Typo clé to Clé
* TWEAK: Some Altar hints
TWEAK: Some capitals
* TWEAK: Unmatching text + some cap again
* TWEAK: More tweaks
* fix build
* remove extra json.hpp, add hint
* Update randomizer_item_tracker.cpp
* TWEAK: Double Defense with RedParticles instead of white
* make sure we don't optimize out the check to ensure a spoilerfile exists
* vanilla ganon boss key hint formatting
* TWEAK: FR- better way of the hero text
* fix
* and again
* Initializes dungeonsDone items in gSaveContext to 0.
* Replaces sizeof calculation with a NUM_DUNGEONS constant.
* Fixes Saria's Gift on the LW Bridge from getting killed when holding shield.
* More airtight fix for Saria's Gift on the Bridge.
* Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId.
* Invalidate text box icon before drawing
* Fixes the case where Saria's gift is an Ice Trap.
We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine.
* Initial commit
Might need changing when we change the settings in the future
* Fixes Door of Time opening cutscene after warping with prelude.
* Initial waterfall skip
Very rudimentary way of doing things but it seems to work so :shrug:
* inital rework
* fixed default rotation for 2D sprites
* fix tab/space issues
* 3d drops rando merge fix again
* Allows Impa to appear in the Lullaby check post drawbridge escape.
* Changes Ganon's Trials Count setting to a checkbox
The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed.
* Sets all Ganon's Trials to incomplete in new saves.
Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131
* fix castle guards when oot throw cutscene has already played in rando
* Properly removes the beams when trials are cleared.
* Removes Question Mark from Skip Ganon's Trials UI.
* Adds a todo comment about when to change back to slider.
* make deku seeds check for bullet bag
* Various tweaks
TWEAK: Altar Text
TWEAK: Hint names
TWEAK: Replace more problematic œ to oe
* upgrade ocarina on both child and adult equips
* FIX: Jabu Item
* update equipped hookshot/longshot when obtained as other age
* add hint
* don't give the bgs check without the claim check
* Skips Darunia Cutscene in Fire Temple
* Added a TODO note about not skipping the cutscene.
There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch.
* remove todo
* restore fast ocarina option in imgui that was lost in merge
* Fixes grey screen issue + tooltip for 2 handed shield
* update to use dg instead of g for textures in item tracker
* TWEAK: Default color for cosmetic RAND button was not the corect one
* fix texture crash, remove unused item tracker code
* don't open mask shop until we get zelda's letter
* Update README.md
* Prevents "correct" chime under incorrect conditions.
* Fixes typo in conditional and adds "bonk" sound effect.
"Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time.
* remove modify dpad equips toggle, replace with checks for dpad menu
* remove extra check
* add ability to hold c-up to assign to dpad when dpad menuing is enabled
* disable d-pad navigation on item menu when holding c-up to equip
* dpad+c-up stuff for equipment menu
* ADD: Checbox for songs colors
* TWEAK: RandoColors for normal songs
* kind of quick and dirty but it works
* TWEAK: Clarity of the tooltip
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Dog <5172592+Dog@users.noreply.github.com>
Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com>
Co-authored-by: Baoulettes <perlouzerie@hotmail.fr>
Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
2022-07-13 20:35:42 -04:00
Randomizer v2 (#1065)
* Revert changes to GetItemFromGet
* Fixes Ganon's Boss Key shuffled while regular boss Keys aren't.
* Enum + combo box
* Add obtainability checks correctly
* combobox title rename + no number tracking
* Fix repeatable purchases and bottles rendering incorrectly
* Move shopsanity option in GUI
* Struct instead of ImVec + basic comportment for all case
* Attempt to fix odd build issue
* Cast randoGet for ganons boss key
* Remove redundancy in KD room
* Update logic Cvar names
* Fix Ganons Trials coming from old save files. Fixes #1365
* Fixes crash when entering Ganon's Castle lobby on linux.
* Makes `Item_Give` safe to use with a NULL globalCtx.
This should allow it's use for giving items to Link's Pocket
during rando save initialization.
* Converts Song from Impa to use `Item_Give`
* Adds more options for Link's starting item.
* Removes unneeded `GiveLinkItem` functions.
* and make it build
* bring back new rando dropdown
* gSaveContext access in GameMenuBar.cpp
* Implement Skip Scarecrow's Song
* Reimplement progressive Bombchus
* Rando-next: Deku Nut and Seed ammo gives a blue rupee
Fixes #1390
* Fixes Link starting with BGS
* Persist item tracker notes
* Adjust Hooks include
* Use SohImGui::RequestCvarSaveOnNextTick
* Fix issues from LUS refactor
* Fix for overriding deku scrub messages
* Fix mistake from merge
oops
* Restore checkboxes to enhancements menu
These got lost in the merge
* Update location access logic
Including MQ locations in Spirit and GC now
* Implement rando bombchu drops
* Missing break
* Simplify mudwall collision check
There was no need to have a second collider specifically for Ice Arrow hits
* Update settings.cpp
* Simplify mudwall collision check
* Restore checkboxes in menu
Accidentally lost these during merge
* Clean up bool
* Update logic Cvar name
* Fixed capacity on ammmo tracking
* Fix for beans obtainability
* Hook into file delete and clear notes
* Incorporate magic arrows in rando settings
* Update tooltip
To inform the player that they might have to reload the room if they're enabling this for the first time.
* Update tooltip
* Add line break in tooltip
* Tooltip wording + line break
* tweak on main logic
* All color logic for all types
* Fix: changes to please new LUS
* Ensure itemTrackerNotes vector is not fully empty
* Implement's Tycoon Wallet.
* Refactor DrawItemCount and Use EnhancementCombobox for tracker capacity options
* small tweaks and rename
* always display XX/YY when in ammo/capacity mode
* Move all merchant messages to be generated on file load
* added hovertext for the number display
* Swap german and french translations for shop messages
* Set key colors to be on by default
* Add another flag to skip mask shop
* Fix Sold Out bug
* Fix gerudo keys, add disabled checkbox
* tooltip line break
* Add trials required and merchant prices to save file instead of loading from active spoiler log
* Remove trialsRequired persisting in save manager
* Adds slotIndex to girla (shop item actor) and uses that for IdentifyShopItem.
* Fix issue when merchantPrices is empty
* Fix for a single zeroed merchantPrice entry
* Fix #1417
* Implements items selling out and fixes issues with purchasing some items.
* Fixes order of operations so Rupees will be spent.
* Fixes sold out items not getting overwritten by the randomized info.
* Clarify var names and comments
Also preserve chain platform cutscene in spirit based on Link's position
* Remove !=0 from cvar check
* Clarify var names and comments
* Rename randomizerMerchantPrices to merchantPrices
* Handle shop items in SaveManager
* Fix merge mistake
* Base whats in the bazaar shop on entranceIndex instead of age
* Tidy up chain platform cutscene check
* Fix merge error
Didn't mean to have Zhora changes in here yet
* Use 3drando item table for parsing spoiler names
* Use another nested method instead of one at the top level to fetch the table
* Add missing newline
* Remove log
* Respect custom draw functions
* Fix issues with rendering songs
* Fix localized item names for shopsanity
* Implements a larger array of Sprites for the Icon Hash.
* Uses the hash instead of seed for spoilerfile name and icons.
* Removes some unused functions and variables in `spoiler_log.cpp`
* Prevents leading 0s added to hash from being in file name
* Changes filename format to icon indexes separated by dashes
* Hopefully makes Jenkins happy
* Hopefully makes Jenkins happy
* [Rando] Child Gerudo Fortress 37th Heartpiece randomized
Fixes #1071
* Add descriptions to save editor flags editor, and added randomizer flags (#1386)
* Add descriptions to save editor flags editor, and added randomizer flags
* Hide randomizer flags when not on a randomizer save
* Move flag descriptions to header file
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Fix merge error
* crash on pause menu on linux (only in appimage)
Fixes #1437
* Applies fix to Song from Impa as well.
* Allow buying tunics as child when shopsanity is on
* Fix for custom draw methods overriding sold out sign
* Simplify logic around shopsanity and fix some issues
* Fix dungeon reward stone rotation and add particles
* Fix some issues with ice traps
* Fix adult wallet having its own max capacity
* Fix amount of keys given for BotW
* format
* Use EnGirlAShopItem enum instead of raw hex values
* [#1434] Renders non-warp songs more consistently with warp songs
* A few changes around merchant messages
* Various changes from PR feedback
* Rando: Junk Hint missing french translation
* Typo
* Fix free scrub being at 0 instead of TEXT_SCRUB_RANDOM
* Replace magic numbers in message handler
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Fix BGS softlock for shopsanity
* Support tycoon wallet on tracker
* Revert "Fix BGS softlock for shopsanity"
This reverts commit 5fdb961ea460fb9a035cf0bb6ae77bfeedc1de0f.
* [#1053] Resolves an issue with shop items and bombchu bowling where BGS would display two message boxes
* Implements some necessary plumbing and resolves several Ice Trap Softlocks.
Adds a way for an item entry to tell what type of check it came from (NPC vs Chest vs Freestanding, etc.)
Sets this value from chests and item00 actors.
Relocates pendingIceTraps to save context so it can persist through cutscenes and get stored on save init for Link's Pocket and Song from Impa.
Restructures pendingIceTraps into a counter rather than a true or false, so that we can be frozen multiple times in a row if applicable (atm that should only be at the start of a run if Link's Pocket and Song from Impa were both Ice Traps).
Adds a textbox for Ice Traps and a special case of holding up nothing in the get item process. This fixes all the cases where Ice Traps would softlock due to the actor giving the item expecting a closing textbox. After holding the item above his head Link increments the pendingIceTraps counter by one and sets whatever flag he has pending.
None of the above plumbing applies to Ice Traps from chests, those work exactly the same as before, as do freestanding item00 ice traps (thanks to the additional check for ITEM_FROM_FREESTANDING.
OoT and Ruto's Letter count as NPC's, so they get the FOWL text box and set a pending ice trap rather than immediately freezing, since Link weill be in the water. Link will get frozen the next time he touches land, which in the case of OoT is after the fade to white and right before the Song of Time check.
Fixes all the other softlocks I'm aware of, including Fishing, Bombchu Bowling, Skull Kid, and losing the second Gerudo Archery check.
* fix bgs check in player
* move bgs logic for tokensanity into MOD_NONE check
* set bgs flag before `Item_Give`ing
* move bgs flag into `MOD_NONE` check in girla
* use existing check in `z_player`
* Adds comment explaining the decision to default ITEM_FROM_NPC.
* Rename pendingIceTraps to pendingIceTrapCount
* Adds some RANDOTODO comments about cleaning up a couple things.
* Merge branch 'develop-zhora' into ztornn
* manually restore changes to `z_player.c`
* Fix after some ice trap prepwork from earlier
* Actual fix
* Woops
* More rupee names
* Actually fix it
* Add back comment
* Fix Skip Scarecrow Song
* Fix ruto's letter and LH sun stick rendering
* Also fixes it for treasure chest game
* Tweak: Rando French Wallet
* ADD: French Tycoon
* Hide dungeon items/notes by default
* [#1301] Fix issue with UI not restoring after getting an item from biggoron
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Fix random crash that only affected one person for some reason
Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Sarge-117 <adam_branston@outlook.com>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: lil David <1337lilDavid@gmail.com>
Co-authored-by: Sarge-117 <108380086+Sarge-117@users.noreply.github.com>
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
2022-09-21 00:50:22 -04:00
extern " C " GetItemEntry Randomizer_GetItemFromKnownCheckWithoutObtainabilityCheck ( RandomizerCheck randomizerCheck , GetItemID ogId ) {
2022-10-03 19:15:36 -04:00
return OTRGlobals : : Instance - > gRandomizer - > GetItemFromKnownCheck ( randomizerCheck , ogId , false ) ;
2022-08-02 23:48:51 -04:00
}
2024-01-14 12:02:23 -05:00
extern " C " RandomizerInf Randomizer_GetRandomizerInfFromCheck ( RandomizerCheck randomizerCheck ) {
return OTRGlobals : : Instance - > gRandomizer - > GetRandomizerInfFromCheck ( randomizerCheck ) ;
}
Randomizer v2 (#1065)
* Revert changes to GetItemFromGet
* Fixes Ganon's Boss Key shuffled while regular boss Keys aren't.
* Enum + combo box
* Add obtainability checks correctly
* combobox title rename + no number tracking
* Fix repeatable purchases and bottles rendering incorrectly
* Move shopsanity option in GUI
* Struct instead of ImVec + basic comportment for all case
* Attempt to fix odd build issue
* Cast randoGet for ganons boss key
* Remove redundancy in KD room
* Update logic Cvar names
* Fix Ganons Trials coming from old save files. Fixes #1365
* Fixes crash when entering Ganon's Castle lobby on linux.
* Makes `Item_Give` safe to use with a NULL globalCtx.
This should allow it's use for giving items to Link's Pocket
during rando save initialization.
* Converts Song from Impa to use `Item_Give`
* Adds more options for Link's starting item.
* Removes unneeded `GiveLinkItem` functions.
* and make it build
* bring back new rando dropdown
* gSaveContext access in GameMenuBar.cpp
* Implement Skip Scarecrow's Song
* Reimplement progressive Bombchus
* Rando-next: Deku Nut and Seed ammo gives a blue rupee
Fixes #1390
* Fixes Link starting with BGS
* Persist item tracker notes
* Adjust Hooks include
* Use SohImGui::RequestCvarSaveOnNextTick
* Fix issues from LUS refactor
* Fix for overriding deku scrub messages
* Fix mistake from merge
oops
* Restore checkboxes to enhancements menu
These got lost in the merge
* Update location access logic
Including MQ locations in Spirit and GC now
* Implement rando bombchu drops
* Missing break
* Simplify mudwall collision check
There was no need to have a second collider specifically for Ice Arrow hits
* Update settings.cpp
* Simplify mudwall collision check
* Restore checkboxes in menu
Accidentally lost these during merge
* Clean up bool
* Update logic Cvar name
* Fixed capacity on ammmo tracking
* Fix for beans obtainability
* Hook into file delete and clear notes
* Incorporate magic arrows in rando settings
* Update tooltip
To inform the player that they might have to reload the room if they're enabling this for the first time.
* Update tooltip
* Add line break in tooltip
* Tooltip wording + line break
* tweak on main logic
* All color logic for all types
* Fix: changes to please new LUS
* Ensure itemTrackerNotes vector is not fully empty
* Implement's Tycoon Wallet.
* Refactor DrawItemCount and Use EnhancementCombobox for tracker capacity options
* small tweaks and rename
* always display XX/YY when in ammo/capacity mode
* Move all merchant messages to be generated on file load
* added hovertext for the number display
* Swap german and french translations for shop messages
* Set key colors to be on by default
* Add another flag to skip mask shop
* Fix Sold Out bug
* Fix gerudo keys, add disabled checkbox
* tooltip line break
* Add trials required and merchant prices to save file instead of loading from active spoiler log
* Remove trialsRequired persisting in save manager
* Adds slotIndex to girla (shop item actor) and uses that for IdentifyShopItem.
* Fix issue when merchantPrices is empty
* Fix for a single zeroed merchantPrice entry
* Fix #1417
* Implements items selling out and fixes issues with purchasing some items.
* Fixes order of operations so Rupees will be spent.
* Fixes sold out items not getting overwritten by the randomized info.
* Clarify var names and comments
Also preserve chain platform cutscene in spirit based on Link's position
* Remove !=0 from cvar check
* Clarify var names and comments
* Rename randomizerMerchantPrices to merchantPrices
* Handle shop items in SaveManager
* Fix merge mistake
* Base whats in the bazaar shop on entranceIndex instead of age
* Tidy up chain platform cutscene check
* Fix merge error
Didn't mean to have Zhora changes in here yet
* Use 3drando item table for parsing spoiler names
* Use another nested method instead of one at the top level to fetch the table
* Add missing newline
* Remove log
* Respect custom draw functions
* Fix issues with rendering songs
* Fix localized item names for shopsanity
* Implements a larger array of Sprites for the Icon Hash.
* Uses the hash instead of seed for spoilerfile name and icons.
* Removes some unused functions and variables in `spoiler_log.cpp`
* Prevents leading 0s added to hash from being in file name
* Changes filename format to icon indexes separated by dashes
* Hopefully makes Jenkins happy
* Hopefully makes Jenkins happy
* [Rando] Child Gerudo Fortress 37th Heartpiece randomized
Fixes #1071
* Add descriptions to save editor flags editor, and added randomizer flags (#1386)
* Add descriptions to save editor flags editor, and added randomizer flags
* Hide randomizer flags when not on a randomizer save
* Move flag descriptions to header file
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Fix merge error
* crash on pause menu on linux (only in appimage)
Fixes #1437
* Applies fix to Song from Impa as well.
* Allow buying tunics as child when shopsanity is on
* Fix for custom draw methods overriding sold out sign
* Simplify logic around shopsanity and fix some issues
* Fix dungeon reward stone rotation and add particles
* Fix some issues with ice traps
* Fix adult wallet having its own max capacity
* Fix amount of keys given for BotW
* format
* Use EnGirlAShopItem enum instead of raw hex values
* [#1434] Renders non-warp songs more consistently with warp songs
* A few changes around merchant messages
* Various changes from PR feedback
* Rando: Junk Hint missing french translation
* Typo
* Fix free scrub being at 0 instead of TEXT_SCRUB_RANDOM
* Replace magic numbers in message handler
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Fix BGS softlock for shopsanity
* Support tycoon wallet on tracker
* Revert "Fix BGS softlock for shopsanity"
This reverts commit 5fdb961ea460fb9a035cf0bb6ae77bfeedc1de0f.
* [#1053] Resolves an issue with shop items and bombchu bowling where BGS would display two message boxes
* Implements some necessary plumbing and resolves several Ice Trap Softlocks.
Adds a way for an item entry to tell what type of check it came from (NPC vs Chest vs Freestanding, etc.)
Sets this value from chests and item00 actors.
Relocates pendingIceTraps to save context so it can persist through cutscenes and get stored on save init for Link's Pocket and Song from Impa.
Restructures pendingIceTraps into a counter rather than a true or false, so that we can be frozen multiple times in a row if applicable (atm that should only be at the start of a run if Link's Pocket and Song from Impa were both Ice Traps).
Adds a textbox for Ice Traps and a special case of holding up nothing in the get item process. This fixes all the cases where Ice Traps would softlock due to the actor giving the item expecting a closing textbox. After holding the item above his head Link increments the pendingIceTraps counter by one and sets whatever flag he has pending.
None of the above plumbing applies to Ice Traps from chests, those work exactly the same as before, as do freestanding item00 ice traps (thanks to the additional check for ITEM_FROM_FREESTANDING.
OoT and Ruto's Letter count as NPC's, so they get the FOWL text box and set a pending ice trap rather than immediately freezing, since Link weill be in the water. Link will get frozen the next time he touches land, which in the case of OoT is after the fade to white and right before the Song of Time check.
Fixes all the other softlocks I'm aware of, including Fishing, Bombchu Bowling, Skull Kid, and losing the second Gerudo Archery check.
* fix bgs check in player
* move bgs logic for tokensanity into MOD_NONE check
* set bgs flag before `Item_Give`ing
* move bgs flag into `MOD_NONE` check in girla
* use existing check in `z_player`
* Adds comment explaining the decision to default ITEM_FROM_NPC.
* Rename pendingIceTraps to pendingIceTrapCount
* Adds some RANDOTODO comments about cleaning up a couple things.
* Merge branch 'develop-zhora' into ztornn
* manually restore changes to `z_player.c`
* Fix after some ice trap prepwork from earlier
* Actual fix
* Woops
* More rupee names
* Actually fix it
* Add back comment
* Fix Skip Scarecrow Song
* Fix ruto's letter and LH sun stick rendering
* Also fixes it for treasure chest game
* Tweak: Rando French Wallet
* ADD: French Tycoon
* Hide dungeon items/notes by default
* [#1301] Fix issue with UI not restoring after getting an item from biggoron
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Fix random crash that only affected one person for some reason
Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Sarge-117 <adam_branston@outlook.com>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: lil David <1337lilDavid@gmail.com>
Co-authored-by: Sarge-117 <108380086+Sarge-117@users.noreply.github.com>
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
2022-09-21 00:50:22 -04:00
extern " C " ItemObtainability Randomizer_GetItemObtainabilityFromRandomizerCheck ( RandomizerCheck randomizerCheck ) {
return OTRGlobals : : Instance - > gRandomizer - > GetItemObtainabilityFromRandomizerCheck ( randomizerCheck ) ;
2022-07-31 21:58:13 -04:00
}
2022-08-02 19:17:08 -04:00
More gap-bridging (#3323)
* Initial StaticData and RandoItem class definitions
* Initial implementation of RandoItem class.
* Rerranges RandoItem Constructor parameters
The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on.
* Switches static data from map to static array.
Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values.
* Defines part of the randomizer item list.
* Adds more item class instances to item_list.cpp
Up through bottles, many more items still to go.
* Adds song items
* Adds Maps and Compasses to the item_list
* Added Key Items to item_list
* Added Key Rings to item_list
* Added Dungeon Rewards to item_list
* Adds generic items and refills to item_list
* Adds shop items, triforce, and hints
Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them.
* Adds in the stages of progressive items
These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.)
* Remove GetItemEntry data from progressive items
* Moves/adds function definitions to item/item_list
* Refactors GetItemEntry data
It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.)
* Adds item class member for if item is progressive
* Removes unneeded stuff from initializer list macro
* Replaces relevant `uint32_t`s w/ `RandomizerGet`s
Also replaces calls to the ItemTable method with StaticData::RetrieveItem
* Switches our runtime code to use the new itemList.
* Changes just enough hint gen code to compile
* Initial Definition of Location Class
* Initial Implementation of Location
* Fixes some names and definitions.
* Extracts ActorID and SceneID enums to separate files.
This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected.
* Replaces the forward definitions with the new imports.
* Adds missing data for RandomizerCheckObjects.
* Definition and first entry of locationTable
* Added Mido's House Locations
* Added locations up through lost woods.
* Adds in Hyrule Field locations.
* Adds Lake Hylia locations
* Adds location name comments
* Adds Gerudo Valley Locations
* Adds Gerudo Fortress locations.
* Adds the Wasteland and Collosus locations
* Adds Market locations
* Adds Hyrule Castle locations.
* Adds Kakariko and Graveyard locations.
* Adds Death Mountain checks.
* Adds Goron City locations
* Adds Death Mountain Crater locations
* Adds Zora's River locations
* Added Zora's Domain Locations.
* Added Zora's Fountain locations
* Adds Lon Lon Ranch locations.
* Adds Deku Tree locations
* Adds Dodongo's Cavern Locations.
* Adds Jabu Jabu's Belly Locations
* Adds Forest Temple Locations
* Adds Fire Temple Locations
* Adds Water Temple Locations
* Added Spirit Temple Locations
* Some of shadow temple locations.
* Adds remaining Shadow Temple locations
* Fixes a leftover merge conflict
* Adds Bottom of the Well locations.
* Adds Ice Cavern locations
* Adds GTG locations.
* Adds Ganon's Castle and Tower locations
* Adds dungeon Gold Skulltula locations.
* Adds Overworld Gold Skulltula locations
* Adds dungeon reward locations
* Adds Heart Container Locations
* Adds Cutscene and Song locations
* Adds Cow locations
* Adds Shop locations.
* Adds hint locations
* Adds function for retrieving the Location data.
* Initial definition of ItemLocation structure for tracking runtime data
* First push on converting code to use new location definitions
* Changes hints to use the new tables
* Further conversion of hints to new definitions.
* Adds new Hint and Location IDs to area tables
* Moves areaTable to use new RandomizerRegion keys
* Removal of 3drando/item_location files.
* Uses new RandomizerRegion keys in entrance.cpp
* Final push for removal of massive keys.hpp enum
* Uses new SceneID Enum Values
* Remove RandomizerCheckObject structs in favor of new location list.
* Fix a few stragglers to successfully build
* Rename of RandoItem to just Item, but in the Rando namespace
* Adds static hints (Light Arrows, Altar text, etc) to the new Hint table.
* More hint related fixes/edits
* small fix for #include path
* Fix various miscellaneous issues related to seed gen and spoiler parsing.
* Handle progressive items correctly.
* Fixes some hint generation logic
* Fix a few GetItemEntry niche bugs.
* Adds missing shop GI Entries
* Formatting fixes
* small formatting fix
* Namespace StaticData under Rando
* Added a note about a potential use-after-free.
I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used.
* Fixes missing location table entries
* Fixes LUS submodule and removes now-unused code
* Resolves weird duplicate definition issue
* Fix missing include
It was missed because not being included wasn't an issue on Windows.
* Fixes error present on Linux builds
* Fixes some issues with excluding locations
* Updates the Resolve Exclusion conflicts function
not sure if actually used, will look into that more later
* Removes some duplicate RGs
* More fixes of duplicate RG values.
* Fix a few duplication issues in the check tracker.
* Fix progressive bombchus.
* Minor typo fix, shouldn't really be affecting anything though
* Should fix some of the remaining check tracker issues.
* oops wrong boolean operator
* Fix skulltulas in the check tracker.
* oops, missing comma
* re-formatting of HintStone locations
* Fixes issue when picking up second Progressive Bullet Bag
* Hide bombchu bowling bombchus
* Fixes missed skullScene in location_list
* Reformats shop items
* Re-formats cow checks
* reformat song locations
* reformat "cutscene" checks
* reformat heart container locaitons
* reformat Boss/Dungeon reward checks
* Hide Triforce Completed if not playing Triforce Hunt
* Fixes incorrect chest param
* reformat GS Tokens locations and cuts down on duplicate data
* reformat Ganons Castle checks
* reformat GTG check locations
* Prevents Gift from Raoru from appearing in the check tracker
* more reformatting (botw, ice cavern, shadow temple)
* Should fix a couple more check tracker checks
* reformat spirit temple checks
* reformat water and fire temple checks
* fix RC_ZR_GS_ABOVE_BRIDGE flag typo
* reformat Forest Temple checks
* Fix RC_LW_TRADE_ODD_POTION in check tracker
* reformat child dungeon locations
* reformat overworld locations
* reformat item entries
* New Item Override system
* use new ItemOverrides and use ItemLocations table for getting items
* Saves/Loads directly from/to new ItemLocation table with overrides for traps
* Removes gSaveContext.itemLocations
* Don't load spoiler file on boot automatically.
Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that:
1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded.
2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present).
3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet).
4. After that, a seed is generated and you are taken back to the file select screen with the new file present.
5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is
already in memory and in the save file (or at least I'll make it so that it is if it isn't already).
6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing
for hints to be in the user's language of choice no matter what language the spoiler file was generated in.
7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there
instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out
custom message syntax for various types of custom hints and whatnot. But that will be probably much later.
* Auto-gen rando seed when making a new rando file.
Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations:
1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed.
2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown.
3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen.
Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet.
* Fix a few typos/bugs
* Partial conversion to new Settings/Option class
* Further conversion to new settings/options classes
* New settings struct (not fully working, need to wire it up to SaveManager)
* Move save files to new settings struct. Also fixes MQ options to match 3drando
* Fixes some spoilerfile related issues
* Cleans up now unused arrays
* Fixes some unhandled entries in parse settings switch case
* Reimplements parsing of settings on file drop to re-generate seeds
* Move merchantPrices into ItemLocation tables.
* Move hints to new struct
* Fixes a few seed gen bugs surrounding hints
* Fix treasure chest game.
* Relocate Entrance Shuffle code into ctx
* Move entrances to new context at runtime
* Remove now unused code from SaveContext and randomizer.cpp/.h
* Fix non-windows builds?
* Moves Dungeon Quests to new context
* Move trials into new context
* Whoops, forgot to construct the Trials in the context.
* Fixes accidental nullptr reference
* Fixes bug with saving MQ dungeons
* Implements plando mode and removes now unused code.
Largely untested, expect some bugfixes.
* prevent a multiple definition bug
* another attempt to fix the gSeedTextures multiple def error
* Fixes some minor hint issues from conflict resolution
* Some additional glue needed for merge
* Fixes another couple of miscellaneous issues/inconsistencies.
* A few french corrections
* Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
extern " C " void Randomizer_GenerateSeed ( ) {
std : : string seed = " " ;
if ( OTRGlobals : : Instance - > gRandoContext - > IsSpoilerLoaded ( ) ) {
seed = OTRGlobals : : Instance - > gRandoContext - > GetSettings ( ) - > GetSeedString ( ) ;
}
GenerateRandomizer ( seed ) ;
}
extern " C " uint8_t Randomizer_IsSeedGenerated ( ) {
return OTRGlobals : : Instance - > gRandoContext - > IsSeedGenerated ( ) ? 1 : 0 ;
}
extern " C " void Randomizer_SetSeedGenerated ( bool seedGenerated ) {
OTRGlobals : : Instance - > gRandoContext - > SetSeedGenerated ( seedGenerated ) ;
}
extern " C " uint8_t Randomizer_IsSpoilerLoaded ( ) {
return OTRGlobals : : Instance - > gRandoContext - > IsSpoilerLoaded ( ) ? 1 : 0 ;
}
extern " C " void Randomizer_SetSpoilerLoaded ( bool spoilerLoaded ) {
OTRGlobals : : Instance - > gRandoContext - > SetSpoilerLoaded ( spoilerLoaded ) ;
}
extern " C " uint8_t Randomizer_IsPlandoLoaded ( ) {
return OTRGlobals : : Instance - > gRandoContext - > IsPlandoLoaded ( ) ? 1 : 0 ;
}
extern " C " void Randomizer_SetPlandoLoaded ( bool plandoLoaded ) {
OTRGlobals : : Instance - > gRandoContext - > SetPlandoLoaded ( plandoLoaded ) ;
}
2023-05-17 22:24:24 -04:00
CustomMessage Randomizer_GetCustomGetItemMessage ( Player * player ) {
Randomizer v2 (#1065)
* Revert changes to GetItemFromGet
* Fixes Ganon's Boss Key shuffled while regular boss Keys aren't.
* Enum + combo box
* Add obtainability checks correctly
* combobox title rename + no number tracking
* Fix repeatable purchases and bottles rendering incorrectly
* Move shopsanity option in GUI
* Struct instead of ImVec + basic comportment for all case
* Attempt to fix odd build issue
* Cast randoGet for ganons boss key
* Remove redundancy in KD room
* Update logic Cvar names
* Fix Ganons Trials coming from old save files. Fixes #1365
* Fixes crash when entering Ganon's Castle lobby on linux.
* Makes `Item_Give` safe to use with a NULL globalCtx.
This should allow it's use for giving items to Link's Pocket
during rando save initialization.
* Converts Song from Impa to use `Item_Give`
* Adds more options for Link's starting item.
* Removes unneeded `GiveLinkItem` functions.
* and make it build
* bring back new rando dropdown
* gSaveContext access in GameMenuBar.cpp
* Implement Skip Scarecrow's Song
* Reimplement progressive Bombchus
* Rando-next: Deku Nut and Seed ammo gives a blue rupee
Fixes #1390
* Fixes Link starting with BGS
* Persist item tracker notes
* Adjust Hooks include
* Use SohImGui::RequestCvarSaveOnNextTick
* Fix issues from LUS refactor
* Fix for overriding deku scrub messages
* Fix mistake from merge
oops
* Restore checkboxes to enhancements menu
These got lost in the merge
* Update location access logic
Including MQ locations in Spirit and GC now
* Implement rando bombchu drops
* Missing break
* Simplify mudwall collision check
There was no need to have a second collider specifically for Ice Arrow hits
* Update settings.cpp
* Simplify mudwall collision check
* Restore checkboxes in menu
Accidentally lost these during merge
* Clean up bool
* Update logic Cvar name
* Fixed capacity on ammmo tracking
* Fix for beans obtainability
* Hook into file delete and clear notes
* Incorporate magic arrows in rando settings
* Update tooltip
To inform the player that they might have to reload the room if they're enabling this for the first time.
* Update tooltip
* Add line break in tooltip
* Tooltip wording + line break
* tweak on main logic
* All color logic for all types
* Fix: changes to please new LUS
* Ensure itemTrackerNotes vector is not fully empty
* Implement's Tycoon Wallet.
* Refactor DrawItemCount and Use EnhancementCombobox for tracker capacity options
* small tweaks and rename
* always display XX/YY when in ammo/capacity mode
* Move all merchant messages to be generated on file load
* added hovertext for the number display
* Swap german and french translations for shop messages
* Set key colors to be on by default
* Add another flag to skip mask shop
* Fix Sold Out bug
* Fix gerudo keys, add disabled checkbox
* tooltip line break
* Add trials required and merchant prices to save file instead of loading from active spoiler log
* Remove trialsRequired persisting in save manager
* Adds slotIndex to girla (shop item actor) and uses that for IdentifyShopItem.
* Fix issue when merchantPrices is empty
* Fix for a single zeroed merchantPrice entry
* Fix #1417
* Implements items selling out and fixes issues with purchasing some items.
* Fixes order of operations so Rupees will be spent.
* Fixes sold out items not getting overwritten by the randomized info.
* Clarify var names and comments
Also preserve chain platform cutscene in spirit based on Link's position
* Remove !=0 from cvar check
* Clarify var names and comments
* Rename randomizerMerchantPrices to merchantPrices
* Handle shop items in SaveManager
* Fix merge mistake
* Base whats in the bazaar shop on entranceIndex instead of age
* Tidy up chain platform cutscene check
* Fix merge error
Didn't mean to have Zhora changes in here yet
* Use 3drando item table for parsing spoiler names
* Use another nested method instead of one at the top level to fetch the table
* Add missing newline
* Remove log
* Respect custom draw functions
* Fix issues with rendering songs
* Fix localized item names for shopsanity
* Implements a larger array of Sprites for the Icon Hash.
* Uses the hash instead of seed for spoilerfile name and icons.
* Removes some unused functions and variables in `spoiler_log.cpp`
* Prevents leading 0s added to hash from being in file name
* Changes filename format to icon indexes separated by dashes
* Hopefully makes Jenkins happy
* Hopefully makes Jenkins happy
* [Rando] Child Gerudo Fortress 37th Heartpiece randomized
Fixes #1071
* Add descriptions to save editor flags editor, and added randomizer flags (#1386)
* Add descriptions to save editor flags editor, and added randomizer flags
* Hide randomizer flags when not on a randomizer save
* Move flag descriptions to header file
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Fix merge error
* crash on pause menu on linux (only in appimage)
Fixes #1437
* Applies fix to Song from Impa as well.
* Allow buying tunics as child when shopsanity is on
* Fix for custom draw methods overriding sold out sign
* Simplify logic around shopsanity and fix some issues
* Fix dungeon reward stone rotation and add particles
* Fix some issues with ice traps
* Fix adult wallet having its own max capacity
* Fix amount of keys given for BotW
* format
* Use EnGirlAShopItem enum instead of raw hex values
* [#1434] Renders non-warp songs more consistently with warp songs
* A few changes around merchant messages
* Various changes from PR feedback
* Rando: Junk Hint missing french translation
* Typo
* Fix free scrub being at 0 instead of TEXT_SCRUB_RANDOM
* Replace magic numbers in message handler
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Fix BGS softlock for shopsanity
* Support tycoon wallet on tracker
* Revert "Fix BGS softlock for shopsanity"
This reverts commit 5fdb961ea460fb9a035cf0bb6ae77bfeedc1de0f.
* [#1053] Resolves an issue with shop items and bombchu bowling where BGS would display two message boxes
* Implements some necessary plumbing and resolves several Ice Trap Softlocks.
Adds a way for an item entry to tell what type of check it came from (NPC vs Chest vs Freestanding, etc.)
Sets this value from chests and item00 actors.
Relocates pendingIceTraps to save context so it can persist through cutscenes and get stored on save init for Link's Pocket and Song from Impa.
Restructures pendingIceTraps into a counter rather than a true or false, so that we can be frozen multiple times in a row if applicable (atm that should only be at the start of a run if Link's Pocket and Song from Impa were both Ice Traps).
Adds a textbox for Ice Traps and a special case of holding up nothing in the get item process. This fixes all the cases where Ice Traps would softlock due to the actor giving the item expecting a closing textbox. After holding the item above his head Link increments the pendingIceTraps counter by one and sets whatever flag he has pending.
None of the above plumbing applies to Ice Traps from chests, those work exactly the same as before, as do freestanding item00 ice traps (thanks to the additional check for ITEM_FROM_FREESTANDING.
OoT and Ruto's Letter count as NPC's, so they get the FOWL text box and set a pending ice trap rather than immediately freezing, since Link weill be in the water. Link will get frozen the next time he touches land, which in the case of OoT is after the fade to white and right before the Song of Time check.
Fixes all the other softlocks I'm aware of, including Fishing, Bombchu Bowling, Skull Kid, and losing the second Gerudo Archery check.
* fix bgs check in player
* move bgs logic for tokensanity into MOD_NONE check
* set bgs flag before `Item_Give`ing
* move bgs flag into `MOD_NONE` check in girla
* use existing check in `z_player`
* Adds comment explaining the decision to default ITEM_FROM_NPC.
* Rename pendingIceTraps to pendingIceTrapCount
* Adds some RANDOTODO comments about cleaning up a couple things.
* Merge branch 'develop-zhora' into ztornn
* manually restore changes to `z_player.c`
* Fix after some ice trap prepwork from earlier
* Actual fix
* Woops
* More rupee names
* Actually fix it
* Add back comment
* Fix Skip Scarecrow Song
* Fix ruto's letter and LH sun stick rendering
* Also fixes it for treasure chest game
* Tweak: Rando French Wallet
* ADD: French Tycoon
* Hide dungeon items/notes by default
* [#1301] Fix issue with UI not restoring after getting an item from biggoron
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Fix random crash that only affected one person for some reason
Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Sarge-117 <adam_branston@outlook.com>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: lil David <1337lilDavid@gmail.com>
Co-authored-by: Sarge-117 <108380086+Sarge-117@users.noreply.github.com>
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
2022-09-21 00:50:22 -04:00
s16 giid ;
if ( player - > getItemEntry . objectId ! = OBJECT_INVALID ) {
giid = player - > getItemEntry . getItemId ;
} else {
giid = player - > getItemId ;
}
2023-05-17 22:24:24 -04:00
const CustomMessage getItemText = CustomMessageManager : : Instance - > RetrieveMessage ( Randomizer : : getItemMessageTableID , giid ) ;
2022-07-21 13:05:15 -04:00
return getItemText ;
2022-07-13 20:35:42 -04:00
}
2022-07-17 15:02:08 -04:00
2022-11-06 03:24:34 -05:00
extern " C " int CustomMessage_RetrieveIfExists ( PlayState * play ) {
MessageContext * msgCtx = & play - > msgCtx ;
2022-07-17 15:29:02 -04:00
uint16_t textId = msgCtx - > textId ;
2022-07-17 15:02:08 -04:00
Font * font = & msgCtx - > font ;
2022-07-17 15:11:16 -04:00
char * buffer = font - > msgBuf ;
const int maxBufferSize = sizeof ( font - > msgBuf ) ;
2023-05-17 22:24:24 -04:00
CustomMessage messageEntry ;
2023-01-19 23:45:34 -05:00
s16 actorParams = 0 ;
2023-09-26 10:20:33 -04:00
if ( IS_RANDO ) {
2023-08-06 21:58:01 -04:00
Player * player = GET_PLAYER ( play ) ;
2022-08-01 21:44:28 -04:00
if ( textId = = TEXT_RANDOMIZER_CUSTOM_ITEM ) {
2022-10-01 09:56:25 -04:00
if ( player - > getItemEntry . getItemId = = RG_ICE_TRAP ) {
2022-10-25 21:24:48 -04:00
u16 iceTrapTextId = Random ( 0 , NUM_ICE_TRAP_MESSAGES ) ;
messageEntry = CustomMessageManager : : Instance - > RetrieveMessage ( Randomizer : : IceTrapRandoMessageTableID , iceTrapTextId ) ;
2023-01-17 00:17:49 -05:00
if ( CVarGetInteger ( " gLetItSnow " , 0 ) ) {
2022-12-08 23:24:39 -05:00
messageEntry = CustomMessageManager : : Instance - > RetrieveMessage ( Randomizer : : IceTrapRandoMessageTableID , NUM_ICE_TRAP_MESSAGES + 1 ) ;
}
2023-09-26 09:45:37 -04:00
} else if ( player - > getItemEntry . getItemId = = RG_TRIFORCE_PIECE ) {
messageEntry = Randomizer : : GetTriforcePieceMessage ( ) ;
2022-10-01 09:56:25 -04:00
} else {
messageEntry = Randomizer_GetCustomGetItemMessage ( player ) ;
}
2023-08-06 21:58:01 -04:00
} else if ( textId = = TEXT_ITEM_DUNGEON_MAP | | textId = = TEXT_ITEM_COMPASS ) {
More gap-bridging (#3323)
* Initial StaticData and RandoItem class definitions
* Initial implementation of RandoItem class.
* Rerranges RandoItem Constructor parameters
The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on.
* Switches static data from map to static array.
Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values.
* Defines part of the randomizer item list.
* Adds more item class instances to item_list.cpp
Up through bottles, many more items still to go.
* Adds song items
* Adds Maps and Compasses to the item_list
* Added Key Items to item_list
* Added Key Rings to item_list
* Added Dungeon Rewards to item_list
* Adds generic items and refills to item_list
* Adds shop items, triforce, and hints
Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them.
* Adds in the stages of progressive items
These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.)
* Remove GetItemEntry data from progressive items
* Moves/adds function definitions to item/item_list
* Refactors GetItemEntry data
It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.)
* Adds item class member for if item is progressive
* Removes unneeded stuff from initializer list macro
* Replaces relevant `uint32_t`s w/ `RandomizerGet`s
Also replaces calls to the ItemTable method with StaticData::RetrieveItem
* Switches our runtime code to use the new itemList.
* Changes just enough hint gen code to compile
* Initial Definition of Location Class
* Initial Implementation of Location
* Fixes some names and definitions.
* Extracts ActorID and SceneID enums to separate files.
This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected.
* Replaces the forward definitions with the new imports.
* Adds missing data for RandomizerCheckObjects.
* Definition and first entry of locationTable
* Added Mido's House Locations
* Added locations up through lost woods.
* Adds in Hyrule Field locations.
* Adds Lake Hylia locations
* Adds location name comments
* Adds Gerudo Valley Locations
* Adds Gerudo Fortress locations.
* Adds the Wasteland and Collosus locations
* Adds Market locations
* Adds Hyrule Castle locations.
* Adds Kakariko and Graveyard locations.
* Adds Death Mountain checks.
* Adds Goron City locations
* Adds Death Mountain Crater locations
* Adds Zora's River locations
* Added Zora's Domain Locations.
* Added Zora's Fountain locations
* Adds Lon Lon Ranch locations.
* Adds Deku Tree locations
* Adds Dodongo's Cavern Locations.
* Adds Jabu Jabu's Belly Locations
* Adds Forest Temple Locations
* Adds Fire Temple Locations
* Adds Water Temple Locations
* Added Spirit Temple Locations
* Some of shadow temple locations.
* Adds remaining Shadow Temple locations
* Fixes a leftover merge conflict
* Adds Bottom of the Well locations.
* Adds Ice Cavern locations
* Adds GTG locations.
* Adds Ganon's Castle and Tower locations
* Adds dungeon Gold Skulltula locations.
* Adds Overworld Gold Skulltula locations
* Adds dungeon reward locations
* Adds Heart Container Locations
* Adds Cutscene and Song locations
* Adds Cow locations
* Adds Shop locations.
* Adds hint locations
* Adds function for retrieving the Location data.
* Initial definition of ItemLocation structure for tracking runtime data
* First push on converting code to use new location definitions
* Changes hints to use the new tables
* Further conversion of hints to new definitions.
* Adds new Hint and Location IDs to area tables
* Moves areaTable to use new RandomizerRegion keys
* Removal of 3drando/item_location files.
* Uses new RandomizerRegion keys in entrance.cpp
* Final push for removal of massive keys.hpp enum
* Uses new SceneID Enum Values
* Remove RandomizerCheckObject structs in favor of new location list.
* Fix a few stragglers to successfully build
* Rename of RandoItem to just Item, but in the Rando namespace
* Adds static hints (Light Arrows, Altar text, etc) to the new Hint table.
* More hint related fixes/edits
* small fix for #include path
* Fix various miscellaneous issues related to seed gen and spoiler parsing.
* Handle progressive items correctly.
* Fixes some hint generation logic
* Fix a few GetItemEntry niche bugs.
* Adds missing shop GI Entries
* Formatting fixes
* small formatting fix
* Namespace StaticData under Rando
* Added a note about a potential use-after-free.
I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used.
* Fixes missing location table entries
* Fixes LUS submodule and removes now-unused code
* Resolves weird duplicate definition issue
* Fix missing include
It was missed because not being included wasn't an issue on Windows.
* Fixes error present on Linux builds
* Fixes some issues with excluding locations
* Updates the Resolve Exclusion conflicts function
not sure if actually used, will look into that more later
* Removes some duplicate RGs
* More fixes of duplicate RG values.
* Fix a few duplication issues in the check tracker.
* Fix progressive bombchus.
* Minor typo fix, shouldn't really be affecting anything though
* Should fix some of the remaining check tracker issues.
* oops wrong boolean operator
* Fix skulltulas in the check tracker.
* oops, missing comma
* re-formatting of HintStone locations
* Fixes issue when picking up second Progressive Bullet Bag
* Hide bombchu bowling bombchus
* Fixes missed skullScene in location_list
* Reformats shop items
* Re-formats cow checks
* reformat song locations
* reformat "cutscene" checks
* reformat heart container locaitons
* reformat Boss/Dungeon reward checks
* Hide Triforce Completed if not playing Triforce Hunt
* Fixes incorrect chest param
* reformat GS Tokens locations and cuts down on duplicate data
* reformat Ganons Castle checks
* reformat GTG check locations
* Prevents Gift from Raoru from appearing in the check tracker
* more reformatting (botw, ice cavern, shadow temple)
* Should fix a couple more check tracker checks
* reformat spirit temple checks
* reformat water and fire temple checks
* fix RC_ZR_GS_ABOVE_BRIDGE flag typo
* reformat Forest Temple checks
* Fix RC_LW_TRADE_ODD_POTION in check tracker
* reformat child dungeon locations
* reformat overworld locations
* reformat item entries
* New Item Override system
* use new ItemOverrides and use ItemLocations table for getting items
* Saves/Loads directly from/to new ItemLocation table with overrides for traps
* Removes gSaveContext.itemLocations
* Don't load spoiler file on boot automatically.
Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that:
1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded.
2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present).
3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet).
4. After that, a seed is generated and you are taken back to the file select screen with the new file present.
5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is
already in memory and in the save file (or at least I'll make it so that it is if it isn't already).
6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing
for hints to be in the user's language of choice no matter what language the spoiler file was generated in.
7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there
instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out
custom message syntax for various types of custom hints and whatnot. But that will be probably much later.
* Auto-gen rando seed when making a new rando file.
Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations:
1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed.
2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown.
3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen.
Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet.
* Fix a few typos/bugs
* Partial conversion to new Settings/Option class
* Further conversion to new settings/options classes
* New settings struct (not fully working, need to wire it up to SaveManager)
* Move save files to new settings struct. Also fixes MQ options to match 3drando
* Fixes some spoilerfile related issues
* Cleans up now unused arrays
* Fixes some unhandled entries in parse settings switch case
* Reimplements parsing of settings on file drop to re-generate seeds
* Move merchantPrices into ItemLocation tables.
* Move hints to new struct
* Fixes a few seed gen bugs surrounding hints
* Fix treasure chest game.
* Relocate Entrance Shuffle code into ctx
* Move entrances to new context at runtime
* Remove now unused code from SaveContext and randomizer.cpp/.h
* Fix non-windows builds?
* Moves Dungeon Quests to new context
* Move trials into new context
* Whoops, forgot to construct the Trials in the context.
* Fixes accidental nullptr reference
* Fixes bug with saving MQ dungeons
* Implements plando mode and removes now unused code.
Largely untested, expect some bugfixes.
* prevent a multiple definition bug
* another attempt to fix the gSeedTextures multiple def error
* Fixes some minor hint issues from conflict resolution
* Some additional glue needed for merge
* Fixes another couple of miscellaneous issues/inconsistencies.
* A few french corrections
* Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if ( DUNGEON_ITEMS_CAN_BE_OUTSIDE_DUNGEON ( RSK_SHUFFLE_MAPANDCOMPASS ) ) {
2023-08-06 21:58:01 -04:00
if ( textId = = TEXT_ITEM_DUNGEON_MAP ) {
messageEntry = OTRGlobals : : Instance - > gRandomizer - > GetMapGetItemMessageWithHint ( player - > getItemEntry ) ;
} else {
messageEntry = Randomizer_GetCustomGetItemMessage ( player ) ;
}
}
} else if ( textId = = TEXT_ITEM_KEY_BOSS ) {
if ( player - > getItemEntry . getItemId = = RG_GANONS_CASTLE_BOSS_KEY ) {
if ( DUNGEON_ITEMS_CAN_BE_OUTSIDE_DUNGEON ( RSK_GANONS_BOSS_KEY ) ) {
messageEntry = Randomizer_GetCustomGetItemMessage ( player ) ;
}
} else {
if ( DUNGEON_ITEMS_CAN_BE_OUTSIDE_DUNGEON ( RSK_BOSS_KEYSANITY ) ) {
messageEntry = Randomizer_GetCustomGetItemMessage ( player ) ;
}
}
} else if ( textId = = TEXT_ITEM_KEY_SMALL ) {
if ( player - > getItemEntry . getItemId = = RG_GERUDO_FORTRESS_SMALL_KEY ) {
if ( Randomizer_GetSettingValue ( RSK_GERUDO_KEYS ) ! = RO_GERUDO_KEYS_VANILLA ) {
messageEntry = Randomizer_GetCustomGetItemMessage ( player ) ;
}
} else {
if ( DUNGEON_ITEMS_CAN_BE_OUTSIDE_DUNGEON ( RSK_KEYSANITY ) ) {
messageEntry = Randomizer_GetCustomGetItemMessage ( player ) ;
}
}
2022-12-06 00:35:59 -05:00
} else if ( textId = = TEXT_RANDOMIZER_GOSSIP_STONE_HINTS & & Randomizer_GetSettingValue ( RSK_GOSSIP_STONE_HINTS ) ! = RO_GOSSIP_STONES_NONE & &
( Randomizer_GetSettingValue ( RSK_GOSSIP_STONE_HINTS ) = = RO_GOSSIP_STONES_NEED_NOTHING | |
( Randomizer_GetSettingValue ( RSK_GOSSIP_STONE_HINTS ) = = RO_GOSSIP_STONES_NEED_TRUTH & &
2022-11-06 03:24:34 -05:00
Player_GetMask ( play ) = = PLAYER_MASK_TRUTH ) | |
2022-12-06 00:35:59 -05:00
( Randomizer_GetSettingValue ( RSK_GOSSIP_STONE_HINTS ) = = RO_GOSSIP_STONES_NEED_STONE & & CHECK_QUEST_ITEM ( QUEST_STONE_OF_AGONY ) ) ) ) {
2022-07-21 13:05:15 -04:00
2023-01-19 23:45:34 -05:00
Actor * stone = GET_PLAYER ( play ) - > targetActor ;
actorParams = stone - > params ;
2022-07-21 13:05:15 -04:00
// if we're in a generic grotto
2023-11-19 14:29:56 -05:00
if ( play - > sceneNum = = SCENE_GROTTOS & & actorParams = = 14360 ) {
2022-07-21 13:05:15 -04:00
// look for the chest in the actorlist to determine
// which grotto we're in
int numOfActorLists =
2022-11-06 03:24:34 -05:00
sizeof ( play - > actorCtx . actorLists ) / sizeof ( play - > actorCtx . actorLists [ 0 ] ) ;
2022-07-21 13:05:15 -04:00
for ( int i = 0 ; i < numOfActorLists ; i + + ) {
2022-11-06 03:24:34 -05:00
if ( play - > actorCtx . actorLists [ i ] . length ) {
if ( play - > actorCtx . actorLists [ i ] . head - > id = = 10 ) {
2022-07-21 13:05:15 -04:00
// set the params for the hint check to be negative chest params
2022-11-06 03:24:34 -05:00
actorParams = 0 - play - > actorCtx . actorLists [ i ] . head - > params ;
2022-07-21 13:05:15 -04:00
}
}
2022-07-17 15:02:08 -04:00
}
}
2022-07-21 13:05:15 -04:00
RandomizerCheck hintCheck =
2023-01-19 23:45:34 -05:00
Randomizer_GetCheckFromActor ( stone - > id , play - > sceneNum , actorParams ) ;
2022-07-21 13:05:15 -04:00
2022-10-25 21:24:48 -04:00
messageEntry = CustomMessageManager : : Instance - > RetrieveMessage ( Randomizer : : hintMessageTableID , hintCheck ) ;
2023-02-15 21:00:44 -05:00
} else if ( ( textId = = TEXT_ALTAR_CHILD | | textId = = TEXT_ALTAR_ADULT ) ) {
2022-07-24 19:24:24 -04:00
// rando hints at altar
2022-10-25 21:24:48 -04:00
messageEntry = ( LINK_IS_ADULT )
? CustomMessageManager : : Instance - > RetrieveMessage ( Randomizer : : hintMessageTableID , TEXT_ALTAR_ADULT )
: CustomMessageManager : : Instance - > RetrieveMessage ( Randomizer : : hintMessageTableID , TEXT_ALTAR_CHILD ) ;
2022-07-26 20:11:17 -04:00
} else if ( textId = = TEXT_GANONDORF ) {
2023-10-30 11:56:36 -04:00
if ( ( INV_CONTENT ( ITEM_ARROW_LIGHT ) = = ITEM_ARROW_LIGHT & & CHECK_OWNED_EQUIP ( EQUIP_TYPE_SWORD , EQUIP_INV_SWORD_MASTER ) ) | |
2023-10-21 21:51:37 -04:00
! Randomizer_GetSettingValue ( RSK_LIGHT_ARROWS_HINT ) ) {
2022-10-25 21:24:48 -04:00
messageEntry = CustomMessageManager : : Instance - > RetrieveMessage ( Randomizer : : hintMessageTableID , TEXT_GANONDORF_NOHINT ) ;
2022-07-24 19:43:11 -04:00
} else {
2022-10-25 21:24:48 -04:00
messageEntry = CustomMessageManager : : Instance - > RetrieveMessage ( Randomizer : : hintMessageTableID , TEXT_GANONDORF ) ;
2022-07-24 19:43:11 -04:00
}
2023-09-18 22:02:51 -04:00
} else if ( textId = = TEXT_SHEIK_NEED_HOOK | | textId = = TEXT_SHEIK_HAVE_HOOK ) {
messageEntry = OTRGlobals : : Instance - > gRandomizer - > GetSheikMessage ( gPlayState - > sceneNum , textId ) ;
2022-10-25 21:24:48 -04:00
// textId: TEXT_SCRUB_RANDOM + (randomizerInf - RAND_INF_SCRUBS_PURCHASED_DODONGOS_CAVERN_DEKU_SCRUB_NEAR_BOMB_BAG_LEFT)
2024-01-08 10:25:47 -05:00
} else if ( textId = = TEXT_SCRUB_RANDOM ) {
EnDns * enDns = ( EnDns * ) GET_PLAYER ( play ) - > targetActor ;
messageEntry = OTRGlobals : : Instance - > gRandomizer - > GetMerchantMessage ( enDns - > sohScrubIdentity . randomizerInf , TEXT_SCRUB_RANDOM , Randomizer_GetSettingValue ( RSK_SCRUB_TEXT_HINT ) = = RO_GENERIC_OFF ) ;
2022-10-25 21:24:48 -04:00
// Shop items each have two message entries, second one offset by NUM_SHOP_ITEMS
// textId: TEXT_SHOP_ITEM_RANDOM + (randomizerInf - RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_1)
// textId: TEXT_SHOP_ITEM_RANDOM + ((randomizerInf - RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_1) + NUM_SHOP_ITEMS)
Randomizer v2 (#1065)
* Revert changes to GetItemFromGet
* Fixes Ganon's Boss Key shuffled while regular boss Keys aren't.
* Enum + combo box
* Add obtainability checks correctly
* combobox title rename + no number tracking
* Fix repeatable purchases and bottles rendering incorrectly
* Move shopsanity option in GUI
* Struct instead of ImVec + basic comportment for all case
* Attempt to fix odd build issue
* Cast randoGet for ganons boss key
* Remove redundancy in KD room
* Update logic Cvar names
* Fix Ganons Trials coming from old save files. Fixes #1365
* Fixes crash when entering Ganon's Castle lobby on linux.
* Makes `Item_Give` safe to use with a NULL globalCtx.
This should allow it's use for giving items to Link's Pocket
during rando save initialization.
* Converts Song from Impa to use `Item_Give`
* Adds more options for Link's starting item.
* Removes unneeded `GiveLinkItem` functions.
* and make it build
* bring back new rando dropdown
* gSaveContext access in GameMenuBar.cpp
* Implement Skip Scarecrow's Song
* Reimplement progressive Bombchus
* Rando-next: Deku Nut and Seed ammo gives a blue rupee
Fixes #1390
* Fixes Link starting with BGS
* Persist item tracker notes
* Adjust Hooks include
* Use SohImGui::RequestCvarSaveOnNextTick
* Fix issues from LUS refactor
* Fix for overriding deku scrub messages
* Fix mistake from merge
oops
* Restore checkboxes to enhancements menu
These got lost in the merge
* Update location access logic
Including MQ locations in Spirit and GC now
* Implement rando bombchu drops
* Missing break
* Simplify mudwall collision check
There was no need to have a second collider specifically for Ice Arrow hits
* Update settings.cpp
* Simplify mudwall collision check
* Restore checkboxes in menu
Accidentally lost these during merge
* Clean up bool
* Update logic Cvar name
* Fixed capacity on ammmo tracking
* Fix for beans obtainability
* Hook into file delete and clear notes
* Incorporate magic arrows in rando settings
* Update tooltip
To inform the player that they might have to reload the room if they're enabling this for the first time.
* Update tooltip
* Add line break in tooltip
* Tooltip wording + line break
* tweak on main logic
* All color logic for all types
* Fix: changes to please new LUS
* Ensure itemTrackerNotes vector is not fully empty
* Implement's Tycoon Wallet.
* Refactor DrawItemCount and Use EnhancementCombobox for tracker capacity options
* small tweaks and rename
* always display XX/YY when in ammo/capacity mode
* Move all merchant messages to be generated on file load
* added hovertext for the number display
* Swap german and french translations for shop messages
* Set key colors to be on by default
* Add another flag to skip mask shop
* Fix Sold Out bug
* Fix gerudo keys, add disabled checkbox
* tooltip line break
* Add trials required and merchant prices to save file instead of loading from active spoiler log
* Remove trialsRequired persisting in save manager
* Adds slotIndex to girla (shop item actor) and uses that for IdentifyShopItem.
* Fix issue when merchantPrices is empty
* Fix for a single zeroed merchantPrice entry
* Fix #1417
* Implements items selling out and fixes issues with purchasing some items.
* Fixes order of operations so Rupees will be spent.
* Fixes sold out items not getting overwritten by the randomized info.
* Clarify var names and comments
Also preserve chain platform cutscene in spirit based on Link's position
* Remove !=0 from cvar check
* Clarify var names and comments
* Rename randomizerMerchantPrices to merchantPrices
* Handle shop items in SaveManager
* Fix merge mistake
* Base whats in the bazaar shop on entranceIndex instead of age
* Tidy up chain platform cutscene check
* Fix merge error
Didn't mean to have Zhora changes in here yet
* Use 3drando item table for parsing spoiler names
* Use another nested method instead of one at the top level to fetch the table
* Add missing newline
* Remove log
* Respect custom draw functions
* Fix issues with rendering songs
* Fix localized item names for shopsanity
* Implements a larger array of Sprites for the Icon Hash.
* Uses the hash instead of seed for spoilerfile name and icons.
* Removes some unused functions and variables in `spoiler_log.cpp`
* Prevents leading 0s added to hash from being in file name
* Changes filename format to icon indexes separated by dashes
* Hopefully makes Jenkins happy
* Hopefully makes Jenkins happy
* [Rando] Child Gerudo Fortress 37th Heartpiece randomized
Fixes #1071
* Add descriptions to save editor flags editor, and added randomizer flags (#1386)
* Add descriptions to save editor flags editor, and added randomizer flags
* Hide randomizer flags when not on a randomizer save
* Move flag descriptions to header file
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Fix merge error
* crash on pause menu on linux (only in appimage)
Fixes #1437
* Applies fix to Song from Impa as well.
* Allow buying tunics as child when shopsanity is on
* Fix for custom draw methods overriding sold out sign
* Simplify logic around shopsanity and fix some issues
* Fix dungeon reward stone rotation and add particles
* Fix some issues with ice traps
* Fix adult wallet having its own max capacity
* Fix amount of keys given for BotW
* format
* Use EnGirlAShopItem enum instead of raw hex values
* [#1434] Renders non-warp songs more consistently with warp songs
* A few changes around merchant messages
* Various changes from PR feedback
* Rando: Junk Hint missing french translation
* Typo
* Fix free scrub being at 0 instead of TEXT_SCRUB_RANDOM
* Replace magic numbers in message handler
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Fix BGS softlock for shopsanity
* Support tycoon wallet on tracker
* Revert "Fix BGS softlock for shopsanity"
This reverts commit 5fdb961ea460fb9a035cf0bb6ae77bfeedc1de0f.
* [#1053] Resolves an issue with shop items and bombchu bowling where BGS would display two message boxes
* Implements some necessary plumbing and resolves several Ice Trap Softlocks.
Adds a way for an item entry to tell what type of check it came from (NPC vs Chest vs Freestanding, etc.)
Sets this value from chests and item00 actors.
Relocates pendingIceTraps to save context so it can persist through cutscenes and get stored on save init for Link's Pocket and Song from Impa.
Restructures pendingIceTraps into a counter rather than a true or false, so that we can be frozen multiple times in a row if applicable (atm that should only be at the start of a run if Link's Pocket and Song from Impa were both Ice Traps).
Adds a textbox for Ice Traps and a special case of holding up nothing in the get item process. This fixes all the cases where Ice Traps would softlock due to the actor giving the item expecting a closing textbox. After holding the item above his head Link increments the pendingIceTraps counter by one and sets whatever flag he has pending.
None of the above plumbing applies to Ice Traps from chests, those work exactly the same as before, as do freestanding item00 ice traps (thanks to the additional check for ITEM_FROM_FREESTANDING.
OoT and Ruto's Letter count as NPC's, so they get the FOWL text box and set a pending ice trap rather than immediately freezing, since Link weill be in the water. Link will get frozen the next time he touches land, which in the case of OoT is after the fade to white and right before the Song of Time check.
Fixes all the other softlocks I'm aware of, including Fishing, Bombchu Bowling, Skull Kid, and losing the second Gerudo Archery check.
* fix bgs check in player
* move bgs logic for tokensanity into MOD_NONE check
* set bgs flag before `Item_Give`ing
* move bgs flag into `MOD_NONE` check in girla
* use existing check in `z_player`
* Adds comment explaining the decision to default ITEM_FROM_NPC.
* Rename pendingIceTraps to pendingIceTrapCount
* Adds some RANDOTODO comments about cleaning up a couple things.
* Merge branch 'develop-zhora' into ztornn
* manually restore changes to `z_player.c`
* Fix after some ice trap prepwork from earlier
* Actual fix
* Woops
* More rupee names
* Actually fix it
* Add back comment
* Fix Skip Scarecrow Song
* Fix ruto's letter and LH sun stick rendering
* Also fixes it for treasure chest game
* Tweak: Rando French Wallet
* ADD: French Tycoon
* Hide dungeon items/notes by default
* [#1301] Fix issue with UI not restoring after getting an item from biggoron
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Fix random crash that only affected one person for some reason
Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Sarge-117 <adam_branston@outlook.com>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: lil David <1337lilDavid@gmail.com>
Co-authored-by: Sarge-117 <108380086+Sarge-117@users.noreply.github.com>
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
2022-09-21 00:50:22 -04:00
} else if ( textId > = TEXT_SHOP_ITEM_RANDOM & & textId < = TEXT_SHOP_ITEM_RANDOM + ( NUM_SHOP_ITEMS * 2 ) ) {
2022-10-25 21:24:48 -04:00
if ( textId < TEXT_SHOP_ITEM_RANDOM + NUM_SHOP_ITEMS ) {
RandomizerInf randoInf = ( RandomizerInf ) ( ( textId - TEXT_SHOP_ITEM_RANDOM ) + RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_1 ) ;
messageEntry = OTRGlobals : : Instance - > gRandomizer - > GetMerchantMessage ( randoInf , TEXT_SHOP_ITEM_RANDOM ) ;
} else {
RandomizerInf randoInf = ( RandomizerInf ) ( ( textId - ( TEXT_SHOP_ITEM_RANDOM + NUM_SHOP_ITEMS ) ) + RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_1 ) ;
messageEntry = OTRGlobals : : Instance - > gRandomizer - > GetMerchantMessage ( randoInf , TEXT_SHOP_ITEM_RANDOM_CONFIRM ) ;
}
2023-05-10 09:08:35 -04:00
} else if ( CVarGetInteger ( " gRandomizeRupeeNames " , 1 ) & &
Randomizer v2 (#1065)
* Revert changes to GetItemFromGet
* Fixes Ganon's Boss Key shuffled while regular boss Keys aren't.
* Enum + combo box
* Add obtainability checks correctly
* combobox title rename + no number tracking
* Fix repeatable purchases and bottles rendering incorrectly
* Move shopsanity option in GUI
* Struct instead of ImVec + basic comportment for all case
* Attempt to fix odd build issue
* Cast randoGet for ganons boss key
* Remove redundancy in KD room
* Update logic Cvar names
* Fix Ganons Trials coming from old save files. Fixes #1365
* Fixes crash when entering Ganon's Castle lobby on linux.
* Makes `Item_Give` safe to use with a NULL globalCtx.
This should allow it's use for giving items to Link's Pocket
during rando save initialization.
* Converts Song from Impa to use `Item_Give`
* Adds more options for Link's starting item.
* Removes unneeded `GiveLinkItem` functions.
* and make it build
* bring back new rando dropdown
* gSaveContext access in GameMenuBar.cpp
* Implement Skip Scarecrow's Song
* Reimplement progressive Bombchus
* Rando-next: Deku Nut and Seed ammo gives a blue rupee
Fixes #1390
* Fixes Link starting with BGS
* Persist item tracker notes
* Adjust Hooks include
* Use SohImGui::RequestCvarSaveOnNextTick
* Fix issues from LUS refactor
* Fix for overriding deku scrub messages
* Fix mistake from merge
oops
* Restore checkboxes to enhancements menu
These got lost in the merge
* Update location access logic
Including MQ locations in Spirit and GC now
* Implement rando bombchu drops
* Missing break
* Simplify mudwall collision check
There was no need to have a second collider specifically for Ice Arrow hits
* Update settings.cpp
* Simplify mudwall collision check
* Restore checkboxes in menu
Accidentally lost these during merge
* Clean up bool
* Update logic Cvar name
* Fixed capacity on ammmo tracking
* Fix for beans obtainability
* Hook into file delete and clear notes
* Incorporate magic arrows in rando settings
* Update tooltip
To inform the player that they might have to reload the room if they're enabling this for the first time.
* Update tooltip
* Add line break in tooltip
* Tooltip wording + line break
* tweak on main logic
* All color logic for all types
* Fix: changes to please new LUS
* Ensure itemTrackerNotes vector is not fully empty
* Implement's Tycoon Wallet.
* Refactor DrawItemCount and Use EnhancementCombobox for tracker capacity options
* small tweaks and rename
* always display XX/YY when in ammo/capacity mode
* Move all merchant messages to be generated on file load
* added hovertext for the number display
* Swap german and french translations for shop messages
* Set key colors to be on by default
* Add another flag to skip mask shop
* Fix Sold Out bug
* Fix gerudo keys, add disabled checkbox
* tooltip line break
* Add trials required and merchant prices to save file instead of loading from active spoiler log
* Remove trialsRequired persisting in save manager
* Adds slotIndex to girla (shop item actor) and uses that for IdentifyShopItem.
* Fix issue when merchantPrices is empty
* Fix for a single zeroed merchantPrice entry
* Fix #1417
* Implements items selling out and fixes issues with purchasing some items.
* Fixes order of operations so Rupees will be spent.
* Fixes sold out items not getting overwritten by the randomized info.
* Clarify var names and comments
Also preserve chain platform cutscene in spirit based on Link's position
* Remove !=0 from cvar check
* Clarify var names and comments
* Rename randomizerMerchantPrices to merchantPrices
* Handle shop items in SaveManager
* Fix merge mistake
* Base whats in the bazaar shop on entranceIndex instead of age
* Tidy up chain platform cutscene check
* Fix merge error
Didn't mean to have Zhora changes in here yet
* Use 3drando item table for parsing spoiler names
* Use another nested method instead of one at the top level to fetch the table
* Add missing newline
* Remove log
* Respect custom draw functions
* Fix issues with rendering songs
* Fix localized item names for shopsanity
* Implements a larger array of Sprites for the Icon Hash.
* Uses the hash instead of seed for spoilerfile name and icons.
* Removes some unused functions and variables in `spoiler_log.cpp`
* Prevents leading 0s added to hash from being in file name
* Changes filename format to icon indexes separated by dashes
* Hopefully makes Jenkins happy
* Hopefully makes Jenkins happy
* [Rando] Child Gerudo Fortress 37th Heartpiece randomized
Fixes #1071
* Add descriptions to save editor flags editor, and added randomizer flags (#1386)
* Add descriptions to save editor flags editor, and added randomizer flags
* Hide randomizer flags when not on a randomizer save
* Move flag descriptions to header file
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Fix merge error
* crash on pause menu on linux (only in appimage)
Fixes #1437
* Applies fix to Song from Impa as well.
* Allow buying tunics as child when shopsanity is on
* Fix for custom draw methods overriding sold out sign
* Simplify logic around shopsanity and fix some issues
* Fix dungeon reward stone rotation and add particles
* Fix some issues with ice traps
* Fix adult wallet having its own max capacity
* Fix amount of keys given for BotW
* format
* Use EnGirlAShopItem enum instead of raw hex values
* [#1434] Renders non-warp songs more consistently with warp songs
* A few changes around merchant messages
* Various changes from PR feedback
* Rando: Junk Hint missing french translation
* Typo
* Fix free scrub being at 0 instead of TEXT_SCRUB_RANDOM
* Replace magic numbers in message handler
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Fix BGS softlock for shopsanity
* Support tycoon wallet on tracker
* Revert "Fix BGS softlock for shopsanity"
This reverts commit 5fdb961ea460fb9a035cf0bb6ae77bfeedc1de0f.
* [#1053] Resolves an issue with shop items and bombchu bowling where BGS would display two message boxes
* Implements some necessary plumbing and resolves several Ice Trap Softlocks.
Adds a way for an item entry to tell what type of check it came from (NPC vs Chest vs Freestanding, etc.)
Sets this value from chests and item00 actors.
Relocates pendingIceTraps to save context so it can persist through cutscenes and get stored on save init for Link's Pocket and Song from Impa.
Restructures pendingIceTraps into a counter rather than a true or false, so that we can be frozen multiple times in a row if applicable (atm that should only be at the start of a run if Link's Pocket and Song from Impa were both Ice Traps).
Adds a textbox for Ice Traps and a special case of holding up nothing in the get item process. This fixes all the cases where Ice Traps would softlock due to the actor giving the item expecting a closing textbox. After holding the item above his head Link increments the pendingIceTraps counter by one and sets whatever flag he has pending.
None of the above plumbing applies to Ice Traps from chests, those work exactly the same as before, as do freestanding item00 ice traps (thanks to the additional check for ITEM_FROM_FREESTANDING.
OoT and Ruto's Letter count as NPC's, so they get the FOWL text box and set a pending ice trap rather than immediately freezing, since Link weill be in the water. Link will get frozen the next time he touches land, which in the case of OoT is after the fade to white and right before the Song of Time check.
Fixes all the other softlocks I'm aware of, including Fishing, Bombchu Bowling, Skull Kid, and losing the second Gerudo Archery check.
* fix bgs check in player
* move bgs logic for tokensanity into MOD_NONE check
* set bgs flag before `Item_Give`ing
* move bgs flag into `MOD_NONE` check in girla
* use existing check in `z_player`
* Adds comment explaining the decision to default ITEM_FROM_NPC.
* Rename pendingIceTraps to pendingIceTrapCount
* Adds some RANDOTODO comments about cleaning up a couple things.
* Merge branch 'develop-zhora' into ztornn
* manually restore changes to `z_player.c`
* Fix after some ice trap prepwork from earlier
* Actual fix
* Woops
* More rupee names
* Actually fix it
* Add back comment
* Fix Skip Scarecrow Song
* Fix ruto's letter and LH sun stick rendering
* Also fixes it for treasure chest game
* Tweak: Rando French Wallet
* ADD: French Tycoon
* Hide dungeon items/notes by default
* [#1301] Fix issue with UI not restoring after getting an item from biggoron
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Fix random crash that only affected one person for some reason
Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Sarge-117 <adam_branston@outlook.com>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: lil David <1337lilDavid@gmail.com>
Co-authored-by: Sarge-117 <108380086+Sarge-117@users.noreply.github.com>
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
2022-09-21 00:50:22 -04:00
( textId = = TEXT_BLUE_RUPEE | | textId = = TEXT_RED_RUPEE | | textId = = TEXT_PURPLE_RUPEE | |
textId = = TEXT_HUGE_RUPEE ) ) {
messageEntry = Randomizer : : GetRupeeMessage ( textId ) ;
// In rando, replace Navi's general overworld hints with rando-related gameplay tips
2023-12-09 21:55:59 -05:00
} else if ( CVarGetInteger ( " gRandoRelevantNavi " , 1 ) & & textId > = TEXT_NAVI_DEKU_TREE_SUMMONS & & textId < = TEXT_NAVI_TRY_TO_KEEP_MOVING ) {
2022-10-25 21:24:48 -04:00
u16 naviTextId = Random ( 0 , NUM_NAVI_MESSAGES ) ;
messageEntry = CustomMessageManager : : Instance - > RetrieveMessage ( Randomizer : : NaviRandoMessageTableID , naviTextId ) ;
2023-12-09 21:55:59 -05:00
} else if ( Randomizer_GetSettingValue ( RSK_SHUFFLE_MAGIC_BEANS ) & & textId = = TEXT_BEAN_SALESMAN_BUY_FOR_10 ) {
messageEntry = CustomMessageManager : : Instance - > RetrieveMessage ( Randomizer : : merchantMessageTableID , TEXT_BEAN_SALESMAN_BUY_FOR_10 ) ;
2023-04-20 21:25:11 -04:00
} else if ( Randomizer_GetSettingValue ( RSK_SHUFFLE_MERCHANTS ) ! = RO_SHUFFLE_MERCHANTS_OFF & & ( textId = = TEXT_MEDIGORON | |
( textId = = TEXT_GRANNYS_SHOP & & ! Flags_GetRandomizerInf ( RAND_INF_MERCHANTS_GRANNYS_SHOP ) & &
( Randomizer_GetSettingValue ( RSK_SHUFFLE_ADULT_TRADE ) | | INV_CONTENT ( ITEM_CLAIM_CHECK ) = = ITEM_CLAIM_CHECK ) ) | |
2022-11-08 13:54:51 -05:00
( textId = = TEXT_CARPET_SALESMAN_1 & & ! Flags_GetRandomizerInf ( RAND_INF_MERCHANTS_CARPET_SALESMAN ) ) | |
( textId = = TEXT_CARPET_SALESMAN_2 & & ! Flags_GetRandomizerInf ( RAND_INF_MERCHANTS_CARPET_SALESMAN ) ) ) ) {
2024-01-08 14:41:33 -05:00
messageEntry = CustomMessageManager : : Instance - > RetrieveMessage ( Randomizer : : merchantMessageTableID , textId ) ;
Randomizer v2 (#1065)
* Revert changes to GetItemFromGet
* Fixes Ganon's Boss Key shuffled while regular boss Keys aren't.
* Enum + combo box
* Add obtainability checks correctly
* combobox title rename + no number tracking
* Fix repeatable purchases and bottles rendering incorrectly
* Move shopsanity option in GUI
* Struct instead of ImVec + basic comportment for all case
* Attempt to fix odd build issue
* Cast randoGet for ganons boss key
* Remove redundancy in KD room
* Update logic Cvar names
* Fix Ganons Trials coming from old save files. Fixes #1365
* Fixes crash when entering Ganon's Castle lobby on linux.
* Makes `Item_Give` safe to use with a NULL globalCtx.
This should allow it's use for giving items to Link's Pocket
during rando save initialization.
* Converts Song from Impa to use `Item_Give`
* Adds more options for Link's starting item.
* Removes unneeded `GiveLinkItem` functions.
* and make it build
* bring back new rando dropdown
* gSaveContext access in GameMenuBar.cpp
* Implement Skip Scarecrow's Song
* Reimplement progressive Bombchus
* Rando-next: Deku Nut and Seed ammo gives a blue rupee
Fixes #1390
* Fixes Link starting with BGS
* Persist item tracker notes
* Adjust Hooks include
* Use SohImGui::RequestCvarSaveOnNextTick
* Fix issues from LUS refactor
* Fix for overriding deku scrub messages
* Fix mistake from merge
oops
* Restore checkboxes to enhancements menu
These got lost in the merge
* Update location access logic
Including MQ locations in Spirit and GC now
* Implement rando bombchu drops
* Missing break
* Simplify mudwall collision check
There was no need to have a second collider specifically for Ice Arrow hits
* Update settings.cpp
* Simplify mudwall collision check
* Restore checkboxes in menu
Accidentally lost these during merge
* Clean up bool
* Update logic Cvar name
* Fixed capacity on ammmo tracking
* Fix for beans obtainability
* Hook into file delete and clear notes
* Incorporate magic arrows in rando settings
* Update tooltip
To inform the player that they might have to reload the room if they're enabling this for the first time.
* Update tooltip
* Add line break in tooltip
* Tooltip wording + line break
* tweak on main logic
* All color logic for all types
* Fix: changes to please new LUS
* Ensure itemTrackerNotes vector is not fully empty
* Implement's Tycoon Wallet.
* Refactor DrawItemCount and Use EnhancementCombobox for tracker capacity options
* small tweaks and rename
* always display XX/YY when in ammo/capacity mode
* Move all merchant messages to be generated on file load
* added hovertext for the number display
* Swap german and french translations for shop messages
* Set key colors to be on by default
* Add another flag to skip mask shop
* Fix Sold Out bug
* Fix gerudo keys, add disabled checkbox
* tooltip line break
* Add trials required and merchant prices to save file instead of loading from active spoiler log
* Remove trialsRequired persisting in save manager
* Adds slotIndex to girla (shop item actor) and uses that for IdentifyShopItem.
* Fix issue when merchantPrices is empty
* Fix for a single zeroed merchantPrice entry
* Fix #1417
* Implements items selling out and fixes issues with purchasing some items.
* Fixes order of operations so Rupees will be spent.
* Fixes sold out items not getting overwritten by the randomized info.
* Clarify var names and comments
Also preserve chain platform cutscene in spirit based on Link's position
* Remove !=0 from cvar check
* Clarify var names and comments
* Rename randomizerMerchantPrices to merchantPrices
* Handle shop items in SaveManager
* Fix merge mistake
* Base whats in the bazaar shop on entranceIndex instead of age
* Tidy up chain platform cutscene check
* Fix merge error
Didn't mean to have Zhora changes in here yet
* Use 3drando item table for parsing spoiler names
* Use another nested method instead of one at the top level to fetch the table
* Add missing newline
* Remove log
* Respect custom draw functions
* Fix issues with rendering songs
* Fix localized item names for shopsanity
* Implements a larger array of Sprites for the Icon Hash.
* Uses the hash instead of seed for spoilerfile name and icons.
* Removes some unused functions and variables in `spoiler_log.cpp`
* Prevents leading 0s added to hash from being in file name
* Changes filename format to icon indexes separated by dashes
* Hopefully makes Jenkins happy
* Hopefully makes Jenkins happy
* [Rando] Child Gerudo Fortress 37th Heartpiece randomized
Fixes #1071
* Add descriptions to save editor flags editor, and added randomizer flags (#1386)
* Add descriptions to save editor flags editor, and added randomizer flags
* Hide randomizer flags when not on a randomizer save
* Move flag descriptions to header file
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Fix merge error
* crash on pause menu on linux (only in appimage)
Fixes #1437
* Applies fix to Song from Impa as well.
* Allow buying tunics as child when shopsanity is on
* Fix for custom draw methods overriding sold out sign
* Simplify logic around shopsanity and fix some issues
* Fix dungeon reward stone rotation and add particles
* Fix some issues with ice traps
* Fix adult wallet having its own max capacity
* Fix amount of keys given for BotW
* format
* Use EnGirlAShopItem enum instead of raw hex values
* [#1434] Renders non-warp songs more consistently with warp songs
* A few changes around merchant messages
* Various changes from PR feedback
* Rando: Junk Hint missing french translation
* Typo
* Fix free scrub being at 0 instead of TEXT_SCRUB_RANDOM
* Replace magic numbers in message handler
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Fix BGS softlock for shopsanity
* Support tycoon wallet on tracker
* Revert "Fix BGS softlock for shopsanity"
This reverts commit 5fdb961ea460fb9a035cf0bb6ae77bfeedc1de0f.
* [#1053] Resolves an issue with shop items and bombchu bowling where BGS would display two message boxes
* Implements some necessary plumbing and resolves several Ice Trap Softlocks.
Adds a way for an item entry to tell what type of check it came from (NPC vs Chest vs Freestanding, etc.)
Sets this value from chests and item00 actors.
Relocates pendingIceTraps to save context so it can persist through cutscenes and get stored on save init for Link's Pocket and Song from Impa.
Restructures pendingIceTraps into a counter rather than a true or false, so that we can be frozen multiple times in a row if applicable (atm that should only be at the start of a run if Link's Pocket and Song from Impa were both Ice Traps).
Adds a textbox for Ice Traps and a special case of holding up nothing in the get item process. This fixes all the cases where Ice Traps would softlock due to the actor giving the item expecting a closing textbox. After holding the item above his head Link increments the pendingIceTraps counter by one and sets whatever flag he has pending.
None of the above plumbing applies to Ice Traps from chests, those work exactly the same as before, as do freestanding item00 ice traps (thanks to the additional check for ITEM_FROM_FREESTANDING.
OoT and Ruto's Letter count as NPC's, so they get the FOWL text box and set a pending ice trap rather than immediately freezing, since Link weill be in the water. Link will get frozen the next time he touches land, which in the case of OoT is after the fade to white and right before the Song of Time check.
Fixes all the other softlocks I'm aware of, including Fishing, Bombchu Bowling, Skull Kid, and losing the second Gerudo Archery check.
* fix bgs check in player
* move bgs logic for tokensanity into MOD_NONE check
* set bgs flag before `Item_Give`ing
* move bgs flag into `MOD_NONE` check in girla
* use existing check in `z_player`
* Adds comment explaining the decision to default ITEM_FROM_NPC.
* Rename pendingIceTraps to pendingIceTrapCount
* Adds some RANDOTODO comments about cleaning up a couple things.
* Merge branch 'develop-zhora' into ztornn
* manually restore changes to `z_player.c`
* Fix after some ice trap prepwork from earlier
* Actual fix
* Woops
* More rupee names
* Actually fix it
* Add back comment
* Fix Skip Scarecrow Song
* Fix ruto's letter and LH sun stick rendering
* Also fixes it for treasure chest game
* Tweak: Rando French Wallet
* ADD: French Tycoon
* Hide dungeon items/notes by default
* [#1301] Fix issue with UI not restoring after getting an item from biggoron
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Fix random crash that only affected one person for some reason
Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Sarge-117 <adam_branston@outlook.com>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: lil David <1337lilDavid@gmail.com>
Co-authored-by: Sarge-117 <108380086+Sarge-117@users.noreply.github.com>
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
2022-09-21 00:50:22 -04:00
} else if ( Randomizer_GetSettingValue ( RSK_BOMBCHUS_IN_LOGIC ) & &
( textId = = TEXT_BUY_BOMBCHU_10_DESC | | textId = = TEXT_BUY_BOMBCHU_10_PROMPT ) ) {
messageEntry = CustomMessageManager : : Instance - > RetrieveMessage ( customMessageTableID , textId ) ;
2024-01-10 10:44:11 -05:00
} else if ( textId = = TEXT_SKULLTULA_PEOPLE_IM_CURSED ) {
2023-01-19 23:45:34 -05:00
actorParams = GET_PLAYER ( play ) - > targetActor - > params ;
RandomizerSettingKey rsk = ( RandomizerSettingKey ) ( RSK_KAK_10_SKULLS_HINT + ( actorParams - 1 ) ) ;
if ( Randomizer_GetSettingValue ( rsk ) ) {
2024-01-10 10:44:11 -05:00
messageEntry = OTRGlobals : : Instance - > gRandomizer - > GetCursedSkullMessage ( actorParams ,
OTRGlobals : : Instance - > gRandomizer - > GetCheckFromActor ( ACTOR_EN_SSH , SCENE_HOUSE_OF_SKULLTULA , actorParams ) ) ;
2023-01-19 23:45:34 -05:00
}
} else if ( Randomizer_GetSettingValue ( RSK_DAMPES_DIARY_HINT ) & & textId = = TEXT_DAMPES_DIARY ) {
messageEntry = CustomMessageManager : : Instance - > RetrieveMessage ( Randomizer : : randoMiscHintsTableID , TEXT_DAMPES_DIARY ) ;
2023-09-01 12:46:19 -04:00
} else if ( play - > sceneNum = = SCENE_TREASURE_BOX_SHOP & &
2023-02-28 12:23:22 -05:00
Randomizer_GetSettingValue ( RSK_GREG_HINT ) & &
2023-12-09 21:55:59 -05:00
( textId = = TEXT_CHEST_GAME_PROCEED | | textId = = TEXT_CHEST_GAME_REAL_GAMBLER | | textId = = TEXT_CHEST_GAME_THANKS_A_LOT ) ) {
2023-02-24 20:35:15 -05:00
messageEntry = CustomMessageManager : : Instance - > RetrieveMessage ( Randomizer : : randoMiscHintsTableID , TEXT_CHEST_GAME_PROCEED ) ;
2022-12-06 18:37:50 -05:00
} else if ( Randomizer_GetSettingValue ( RSK_SHUFFLE_WARP_SONGS ) & &
( textId > = TEXT_WARP_MINUET_OF_FOREST & & textId < = TEXT_WARP_PRELUDE_OF_LIGHT ) ) {
2024-01-08 14:41:33 -05:00
messageEntry = CustomMessageManager : : Instance - > RetrieveMessage ( Randomizer : : randoMiscHintsTableID , textId ) ;
2022-12-11 01:00:18 -05:00
} else if ( textId = = TEXT_LAKE_HYLIA_WATER_SWITCH_NAVI | | textId = = TEXT_LAKE_HYLIA_WATER_SWITCH_SIGN ) {
messageEntry = CustomMessageManager : : Instance - > RetrieveMessage ( Randomizer : : hintMessageTableID , textId ) ;
2023-12-16 20:51:44 -05:00
} else if ( textId = = TEXT_SHOOTING_GALLERY_MAN_COME_BACK_WITH_BOW ) {
messageEntry = CustomMessageManager : : Instance - > RetrieveMessage ( Randomizer : : hintMessageTableID , TEXT_SHOOTING_GALLERY_MAN_COME_BACK_WITH_BOW ) ;
2024-01-10 10:44:11 -05:00
} else if ( textId = = TEXT_FIRE_TEMPLE_GORON_OWE_YOU_BIG_TIME | | ( textId > = TEXT_FIRE_TEMPLE_GORON_FALLING_DOORS_SECRET & & textId < = TEXT_FIRE_TEMPLE_GORON_SOUNDS_DIFFERENT_SECRET ) ) {
2023-01-19 23:45:34 -05:00
u16 choice = Random ( 0 , NUM_GORON_MESSAGES ) ;
messageEntry = OTRGlobals : : Instance - > gRandomizer - > GetGoronMessage ( choice ) ;
2023-09-18 22:02:51 -04:00
} else if ( Randomizer_GetSettingValue ( RSK_FROGS_HINT ) & & textId = = TEXT_FROGS_UNDERWATER ) {
2024-01-10 10:44:11 -05:00
messageEntry = OTRGlobals : : Instance - > gRandomizer - > GetMiscHintMessage ( TEXT_FROGS_UNDERWATER , RC_ZR_FROGS_OCARINA_GAME ) ;
2024-01-14 12:02:23 -05:00
} else if ( Randomizer_GetSettingValue ( RSK_FISHING_POLE_HINT ) & & ! Flags_GetRandomizerInf ( RAND_INF_FISHING_POLE_FOUND ) & &
( textId = = TEXT_FISHING_POND_START | | textId = = TEXT_FISHING_POND_START_MET ) ) {
messageEntry = OTRGlobals : : Instance - > gRandomizer - > GetFishingPondOwnerMessage ( textId ) ;
2024-01-10 10:44:11 -05:00
} else if ( Randomizer_GetSettingValue ( RSK_SARIA_HINT ) & &
( gPlayState - > sceneNum = = SCENE_SACRED_FOREST_MEADOW & & textId = = TEXT_SARIA_SFM ) | | ( textId > = TEXT_SARIAS_SONG_FACE_TO_FACE & & textId < = TEXT_SARIAS_SONG_CHANNELING_POWER ) ) {
2023-12-09 21:55:59 -05:00
messageEntry = OTRGlobals : : Instance - > gRandomizer - > GetSariaMessage ( textId ) ;
2024-01-10 10:44:11 -05:00
} else if ( Randomizer_GetSettingValue ( RSK_BIGGORON_HINT ) & & ( textId = = TEXT_BIGGORON_BETTER_AT_SMITHING | | textId = = TEXT_BIGGORON_WAITING_FOR_YOU | | textId = = TEXT_BIGGORON_RETURN_AFTER_A_FEW_DAYS ) ) {
messageEntry = OTRGlobals : : Instance - > gRandomizer - > GetMiscHintMessage ( TEXT_BIGGORON_BETTER_AT_SMITHING , RC_DMT_TRADE_CLAIM_CHECK ) ;
} else if ( Randomizer_GetSettingValue ( RSK_BIG_POES_HINT ) & & ( textId = = TEXT_GHOST_SHOP_EXPLAINATION | | textId = = TEXT_GHOST_SHOP_CARD_HAS_POINTS ) ) {
messageEntry = OTRGlobals : : Instance - > gRandomizer - > GetMiscHintMessage ( TEXT_GHOST_SHOP_CARD_HAS_POINTS , RC_MARKET_10_BIG_POES ) ;
} else if ( Randomizer_GetSettingValue ( RSK_CHICKENS_HINT ) & & ( textId > = TEXT_ANJU_PLEASE_BRING_MY_CUCCOS_BACK & & textId < = TEXT_ANJU_PLEASE_BRING_1_CUCCO ) ) {
messageEntry = OTRGlobals : : Instance - > gRandomizer - > GetMiscHintMessage ( TEXT_ANJU_PLEASE_BRING_MY_CUCCOS_BACK , RC_KAK_ANJU_AS_CHILD ) ;
} else if ( Randomizer_GetSettingValue ( RSK_MALON_HINT ) & & ( textId = = TEXT_MALON_EVERYONE_TURNING_EVIL | | textId = = TEXT_MALON_I_SING_THIS_SONG ) ) {
messageEntry = OTRGlobals : : Instance - > gRandomizer - > GetMiscHintMessage ( TEXT_MALON_EVERYONE_TURNING_EVIL , RC_KF_LINKS_HOUSE_COW ) ;
} else if ( Randomizer_GetSettingValue ( RSK_MALON_HINT ) & & textId = = TEXT_MALON_HOW_IS_EPONA_DOING ) {
messageEntry = OTRGlobals : : Instance - > gRandomizer - > GetMiscHintMessage ( TEXT_MALON_HOW_IS_EPONA_DOING , RC_KF_LINKS_HOUSE_COW ) ;
} else if ( Randomizer_GetSettingValue ( RSK_MALON_HINT ) & & textId = = TEXT_MALON_OBSTICLE_COURSE ) {
messageEntry = OTRGlobals : : Instance - > gRandomizer - > GetMiscHintMessage ( TEXT_MALON_OBSTICLE_COURSE , RC_KF_LINKS_HOUSE_COW ) ;
} else if ( Randomizer_GetSettingValue ( RSK_MALON_HINT ) & & textId = = TEXT_MALON_INGO_MUST_HAVE_BEEN_TEMPTED ) {
messageEntry = OTRGlobals : : Instance - > gRandomizer - > GetMiscHintMessage ( TEXT_MALON_INGO_MUST_HAVE_BEEN_TEMPTED , RC_KF_LINKS_HOUSE_COW ) ;
} else if ( Randomizer_GetSettingValue ( RSK_KAK_100_SKULLS_HINT ) & & textId = = TEXT_SKULLTULA_PEOPLE_MAKE_YOU_VERY_RICH ) {
messageEntry = OTRGlobals : : Instance - > gRandomizer - > GetCursedSkullMessage ( 10 , RC_KAK_100_GOLD_SKULLTULA_REWARD ) ;
} else if ( Randomizer_GetSettingValue ( RSK_HBA_HINT ) & & textId = = TEXT_GF_HBA_SIGN ) {
messageEntry = OTRGlobals : : Instance - > gRandomizer - > GetMiscHintMessage ( TEXT_GF_HBA_SIGN , RC_GF_HBA_1000_POINTS , RC_GF_HBA_1500_POINTS ) ;
} else if ( Randomizer_GetSettingValue ( RSK_HBA_HINT ) & & textId = = TEXT_HBA_NOT_ON_HORSE ) {
messageEntry = OTRGlobals : : Instance - > gRandomizer - > GetMiscHintMessage ( TEXT_HBA_NOT_ON_HORSE , RC_GF_HBA_1000_POINTS , RC_GF_HBA_1500_POINTS ) ;
} else if ( Randomizer_GetSettingValue ( RSK_HBA_HINT ) & & textId = = TEXT_HBA_INITIAL_EXPLAINATION ) {
messageEntry = OTRGlobals : : Instance - > gRandomizer - > GetMiscHintMessage ( TEXT_HBA_INITIAL_EXPLAINATION , RC_GF_HBA_1000_POINTS , RC_GF_HBA_1500_POINTS ) ;
} else if ( Randomizer_GetSettingValue ( RSK_HBA_HINT ) & & textId = = TEXT_HBA_ALREADY_HAVE_1000 ) {
messageEntry = OTRGlobals : : Instance - > gRandomizer - > GetMiscHintMessage ( TEXT_HBA_ALREADY_HAVE_1000 , RC_GF_HBA_1500_POINTS ) ;
2022-07-17 15:02:08 -04:00
}
}
2022-07-26 20:11:17 -04:00
if ( textId = = TEXT_GS_NO_FREEZE | | textId = = TEXT_GS_FREEZE ) {
2023-01-17 00:17:49 -05:00
if ( CVarGetInteger ( " gInjectItemCounts " , 0 ) ! = 0 ) {
Randomizer v2 (#1065)
* Revert changes to GetItemFromGet
* Fixes Ganon's Boss Key shuffled while regular boss Keys aren't.
* Enum + combo box
* Add obtainability checks correctly
* combobox title rename + no number tracking
* Fix repeatable purchases and bottles rendering incorrectly
* Move shopsanity option in GUI
* Struct instead of ImVec + basic comportment for all case
* Attempt to fix odd build issue
* Cast randoGet for ganons boss key
* Remove redundancy in KD room
* Update logic Cvar names
* Fix Ganons Trials coming from old save files. Fixes #1365
* Fixes crash when entering Ganon's Castle lobby on linux.
* Makes `Item_Give` safe to use with a NULL globalCtx.
This should allow it's use for giving items to Link's Pocket
during rando save initialization.
* Converts Song from Impa to use `Item_Give`
* Adds more options for Link's starting item.
* Removes unneeded `GiveLinkItem` functions.
* and make it build
* bring back new rando dropdown
* gSaveContext access in GameMenuBar.cpp
* Implement Skip Scarecrow's Song
* Reimplement progressive Bombchus
* Rando-next: Deku Nut and Seed ammo gives a blue rupee
Fixes #1390
* Fixes Link starting with BGS
* Persist item tracker notes
* Adjust Hooks include
* Use SohImGui::RequestCvarSaveOnNextTick
* Fix issues from LUS refactor
* Fix for overriding deku scrub messages
* Fix mistake from merge
oops
* Restore checkboxes to enhancements menu
These got lost in the merge
* Update location access logic
Including MQ locations in Spirit and GC now
* Implement rando bombchu drops
* Missing break
* Simplify mudwall collision check
There was no need to have a second collider specifically for Ice Arrow hits
* Update settings.cpp
* Simplify mudwall collision check
* Restore checkboxes in menu
Accidentally lost these during merge
* Clean up bool
* Update logic Cvar name
* Fixed capacity on ammmo tracking
* Fix for beans obtainability
* Hook into file delete and clear notes
* Incorporate magic arrows in rando settings
* Update tooltip
To inform the player that they might have to reload the room if they're enabling this for the first time.
* Update tooltip
* Add line break in tooltip
* Tooltip wording + line break
* tweak on main logic
* All color logic for all types
* Fix: changes to please new LUS
* Ensure itemTrackerNotes vector is not fully empty
* Implement's Tycoon Wallet.
* Refactor DrawItemCount and Use EnhancementCombobox for tracker capacity options
* small tweaks and rename
* always display XX/YY when in ammo/capacity mode
* Move all merchant messages to be generated on file load
* added hovertext for the number display
* Swap german and french translations for shop messages
* Set key colors to be on by default
* Add another flag to skip mask shop
* Fix Sold Out bug
* Fix gerudo keys, add disabled checkbox
* tooltip line break
* Add trials required and merchant prices to save file instead of loading from active spoiler log
* Remove trialsRequired persisting in save manager
* Adds slotIndex to girla (shop item actor) and uses that for IdentifyShopItem.
* Fix issue when merchantPrices is empty
* Fix for a single zeroed merchantPrice entry
* Fix #1417
* Implements items selling out and fixes issues with purchasing some items.
* Fixes order of operations so Rupees will be spent.
* Fixes sold out items not getting overwritten by the randomized info.
* Clarify var names and comments
Also preserve chain platform cutscene in spirit based on Link's position
* Remove !=0 from cvar check
* Clarify var names and comments
* Rename randomizerMerchantPrices to merchantPrices
* Handle shop items in SaveManager
* Fix merge mistake
* Base whats in the bazaar shop on entranceIndex instead of age
* Tidy up chain platform cutscene check
* Fix merge error
Didn't mean to have Zhora changes in here yet
* Use 3drando item table for parsing spoiler names
* Use another nested method instead of one at the top level to fetch the table
* Add missing newline
* Remove log
* Respect custom draw functions
* Fix issues with rendering songs
* Fix localized item names for shopsanity
* Implements a larger array of Sprites for the Icon Hash.
* Uses the hash instead of seed for spoilerfile name and icons.
* Removes some unused functions and variables in `spoiler_log.cpp`
* Prevents leading 0s added to hash from being in file name
* Changes filename format to icon indexes separated by dashes
* Hopefully makes Jenkins happy
* Hopefully makes Jenkins happy
* [Rando] Child Gerudo Fortress 37th Heartpiece randomized
Fixes #1071
* Add descriptions to save editor flags editor, and added randomizer flags (#1386)
* Add descriptions to save editor flags editor, and added randomizer flags
* Hide randomizer flags when not on a randomizer save
* Move flag descriptions to header file
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Fix merge error
* crash on pause menu on linux (only in appimage)
Fixes #1437
* Applies fix to Song from Impa as well.
* Allow buying tunics as child when shopsanity is on
* Fix for custom draw methods overriding sold out sign
* Simplify logic around shopsanity and fix some issues
* Fix dungeon reward stone rotation and add particles
* Fix some issues with ice traps
* Fix adult wallet having its own max capacity
* Fix amount of keys given for BotW
* format
* Use EnGirlAShopItem enum instead of raw hex values
* [#1434] Renders non-warp songs more consistently with warp songs
* A few changes around merchant messages
* Various changes from PR feedback
* Rando: Junk Hint missing french translation
* Typo
* Fix free scrub being at 0 instead of TEXT_SCRUB_RANDOM
* Replace magic numbers in message handler
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Fix BGS softlock for shopsanity
* Support tycoon wallet on tracker
* Revert "Fix BGS softlock for shopsanity"
This reverts commit 5fdb961ea460fb9a035cf0bb6ae77bfeedc1de0f.
* [#1053] Resolves an issue with shop items and bombchu bowling where BGS would display two message boxes
* Implements some necessary plumbing and resolves several Ice Trap Softlocks.
Adds a way for an item entry to tell what type of check it came from (NPC vs Chest vs Freestanding, etc.)
Sets this value from chests and item00 actors.
Relocates pendingIceTraps to save context so it can persist through cutscenes and get stored on save init for Link's Pocket and Song from Impa.
Restructures pendingIceTraps into a counter rather than a true or false, so that we can be frozen multiple times in a row if applicable (atm that should only be at the start of a run if Link's Pocket and Song from Impa were both Ice Traps).
Adds a textbox for Ice Traps and a special case of holding up nothing in the get item process. This fixes all the cases where Ice Traps would softlock due to the actor giving the item expecting a closing textbox. After holding the item above his head Link increments the pendingIceTraps counter by one and sets whatever flag he has pending.
None of the above plumbing applies to Ice Traps from chests, those work exactly the same as before, as do freestanding item00 ice traps (thanks to the additional check for ITEM_FROM_FREESTANDING.
OoT and Ruto's Letter count as NPC's, so they get the FOWL text box and set a pending ice trap rather than immediately freezing, since Link weill be in the water. Link will get frozen the next time he touches land, which in the case of OoT is after the fade to white and right before the Song of Time check.
Fixes all the other softlocks I'm aware of, including Fishing, Bombchu Bowling, Skull Kid, and losing the second Gerudo Archery check.
* fix bgs check in player
* move bgs logic for tokensanity into MOD_NONE check
* set bgs flag before `Item_Give`ing
* move bgs flag into `MOD_NONE` check in girla
* use existing check in `z_player`
* Adds comment explaining the decision to default ITEM_FROM_NPC.
* Rename pendingIceTraps to pendingIceTrapCount
* Adds some RANDOTODO comments about cleaning up a couple things.
* Merge branch 'develop-zhora' into ztornn
* manually restore changes to `z_player.c`
* Fix after some ice trap prepwork from earlier
* Actual fix
* Woops
* More rupee names
* Actually fix it
* Add back comment
* Fix Skip Scarecrow Song
* Fix ruto's letter and LH sun stick rendering
* Also fixes it for treasure chest game
* Tweak: Rando French Wallet
* ADD: French Tycoon
* Hide dungeon items/notes by default
* [#1301] Fix issue with UI not restoring after getting an item from biggoron
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Fix random crash that only affected one person for some reason
Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Sarge-117 <adam_branston@outlook.com>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: lil David <1337lilDavid@gmail.com>
Co-authored-by: Sarge-117 <108380086+Sarge-117@users.noreply.github.com>
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
2022-09-21 00:50:22 -04:00
// The freeze text cannot be manually dismissed and must be auto-dismissed.
// This is fine and even wanted when skull tokens are not shuffled, but when
// when they are shuffled we don't want to be able to manually dismiss the box.
// Otherwise if we get a token from a chest or an NPC we get stuck in the ItemGet
// animation until the text box auto-dismisses.
// RANDOTODO: Implement a way to determine if an item came from a skulltula and
// inject the auto-dismiss control code if it did.
2023-01-17 00:17:49 -05:00
if ( CVarGetInteger ( " gSkulltulaFreeze " , 0 ) ! = 0 & &
2023-09-26 10:20:33 -04:00
! ( IS_RANDO & & Randomizer_GetSettingValue ( RSK_SHUFFLE_TOKENS ) ! = RO_TOKENSANITY_OFF ) ) {
2022-07-26 20:11:17 -04:00
textId = TEXT_GS_NO_FREEZE ;
2022-07-17 22:02:22 -04:00
} else {
2022-07-26 20:11:17 -04:00
textId = TEXT_GS_FREEZE ;
2022-07-17 22:02:22 -04:00
}
2023-03-31 22:05:14 -04:00
// In vanilla, GS token count is incremented prior to the text box displaying
// In rando we need to bump the token count by one to show the correct count
2023-09-26 10:20:33 -04:00
s16 gsCount = gSaveContext . inventory . gsTokens + ( IS_RANDO ? 1 : 0 ) ;
2022-08-01 23:16:16 -04:00
messageEntry = CustomMessageManager : : Instance - > RetrieveMessage ( customMessageTableID , textId ) ;
2023-05-17 22:24:24 -04:00
messageEntry . Replace ( " {{gsCount}} " , std : : to_string ( gsCount ) ) ;
2022-07-21 13:05:15 -04:00
}
}
2023-01-17 00:17:49 -05:00
if ( textId = = TEXT_HEART_CONTAINER & & CVarGetInteger ( " gInjectItemCounts " , 0 ) ) {
2022-11-02 14:09:25 -04:00
messageEntry = CustomMessageManager : : Instance - > RetrieveMessage ( customMessageTableID , TEXT_HEART_CONTAINER ) ;
2023-05-17 22:24:24 -04:00
messageEntry . Replace ( " {{heartContainerCount}} " , std : : to_string ( gSaveContext . sohStats . heartContainers + 1 ) ) ;
2022-11-02 14:09:25 -04:00
}
2023-01-17 00:17:49 -05:00
if ( textId = = TEXT_HEART_PIECE & & CVarGetInteger ( " gInjectItemCounts " , 0 ) ) {
2022-11-02 14:09:25 -04:00
messageEntry = CustomMessageManager : : Instance - > RetrieveMessage ( customMessageTableID , TEXT_HEART_PIECE ) ;
2023-05-17 22:24:24 -04:00
messageEntry . Replace ( " {{heartPieceCount}} " , std : : to_string ( gSaveContext . sohStats . heartPieces + 1 ) ) ;
2022-11-02 14:09:25 -04:00
}
2023-09-01 12:46:19 -04:00
if ( textId = = TEXT_MARKET_GUARD_NIGHT & & CVarGetInteger ( " gMarketSneak " , 0 ) & & play - > sceneNum = = SCENE_MARKET_ENTRANCE_NIGHT ) {
2022-12-10 23:28:22 -05:00
messageEntry = CustomMessageManager : : Instance - > RetrieveMessage ( customMessageTableID , TEXT_MARKET_GUARD_NIGHT ) ;
}
2024-02-01 20:36:57 -05:00
if ( textId = = TEXT_FISHERMAN_LEAVE & & CVarGetInteger ( " gQuitFishingAtDoor " , 0 ) ) {
messageEntry = CustomMessageManager : : Instance - > RetrieveMessage ( customMessageTableID , TEXT_FISHERMAN_LEAVE ) ;
}
2023-06-03 15:27:45 -04:00
font - > charTexBuf [ 0 ] = ( messageEntry . GetTextBoxType ( ) < < 4 ) | messageEntry . GetTextBoxPosition ( ) ;
switch ( gSaveContext . language ) {
case LANGUAGE_FRA :
return msgCtx - > msgLength = font - > msgLength =
CopyStringToCharBuffer ( messageEntry . GetFrench ( ) , buffer , maxBufferSize ) ;
case LANGUAGE_GER :
return msgCtx - > msgLength = font - > msgLength =
CopyStringToCharBuffer ( messageEntry . GetGerman ( ) , buffer , maxBufferSize ) ;
case LANGUAGE_ENG :
default :
return msgCtx - > msgLength = font - > msgLength =
CopyStringToCharBuffer ( messageEntry . GetEnglish ( ) , buffer , maxBufferSize ) ;
}
2022-07-17 15:02:08 -04:00
return false ;
}
2022-09-20 20:08:43 -04:00
extern " C " void Overlay_DisplayText ( float duration , const char * text ) {
2023-06-03 15:27:45 -04:00
LUS : : Context : : GetInstance ( ) - > GetWindow ( ) - > GetGui ( ) - > GetGameOverlay ( ) - > TextDrawNotification ( duration , true , text ) ;
2022-09-20 20:08:43 -04:00
}
2022-12-06 23:44:14 -05:00
2023-01-20 21:48:17 -05:00
extern " C " void Overlay_DisplayText_Seconds ( int seconds , const char * text ) {
2023-04-11 18:54:10 -04:00
float duration = seconds * OTRGlobals : : Instance - > GetInterpolationFPS ( ) * 0.05 ;
2023-06-03 15:27:45 -04:00
LUS : : Context : : GetInstance ( ) - > GetWindow ( ) - > GetGui ( ) - > GetGameOverlay ( ) - > TextDrawNotification ( duration , true , text ) ;
2023-01-20 21:48:17 -05:00
}
2022-12-06 23:44:14 -05:00
extern " C " void Entrance_ClearEntranceTrackingData ( void ) {
ClearEntranceTrackingData ( ) ;
}
extern " C " void Entrance_InitEntranceTrackingData ( void ) {
InitEntranceTrackingData ( ) ;
}
extern " C " void EntranceTracker_SetCurrentGrottoID ( s16 entranceIndex ) {
SetCurrentGrottoIDForTracker ( entranceIndex ) ;
}
extern " C " void EntranceTracker_SetLastEntranceOverride ( s16 entranceIndex ) {
SetLastEntranceOverrideForTracker ( entranceIndex ) ;
}
2023-04-27 19:20:41 -04:00
extern " C " void Gfx_RegisterBlendedTexture ( const char * name , u8 * mask , u8 * replacement ) {
gfx_register_blended_texture ( name , mask , replacement ) ;
}
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 11:03:36 -04:00
2024-01-15 10:39:54 -05:00
extern " C " void Gfx_UnregisterBlendedTexture ( const char * name ) {
gfx_unregister_blended_texture ( name ) ;
}
extern " C " void Gfx_TextureCacheDelete ( const uint8_t * texAddr ) {
char * imgName = ( char * ) texAddr ;
if ( texAddr = = nullptr ) {
return ;
}
if ( ResourceMgr_OTRSigCheck ( imgName ) ) {
texAddr = ( const uint8_t * ) GetResourceDataByNameHandlingMQ ( imgName ) ;
}
gfx_texture_cache_delete ( texAddr ) ;
}
2023-12-16 21:40:09 -05:00
void SoH_ProcessDroppedFiles ( std : : string filePath ) {
try {
std : : ifstream configStream ( filePath ) ;
if ( ! configStream ) {
return ;
}
2023-11-28 23:42:37 -05:00
2023-12-16 21:40:09 -05:00
nlohmann : : json configJson ;
configStream > > configJson ;
2023-11-28 23:42:37 -05:00
2023-12-16 21:40:09 -05:00
// #region SOH [Randomizer] TODO: Refactor spoiler file handling for randomizer
if ( configJson . contains ( " version " ) & & configJson . contains ( " finalSeed " ) ) {
CVarSetString ( " gRandomizerDroppedFile " , filePath . c_str ( ) ) ;
CVarSetInteger ( " gRandomizerNewFileDropped " , 1 ) ;
return ;
}
// #endregion
2023-11-28 23:42:37 -05:00
2023-12-16 21:40:09 -05:00
if ( ! configJson . contains ( " CVars " ) ) {
return ;
}
2023-11-28 23:42:37 -05:00
2023-12-16 21:40:09 -05:00
clearCvars ( enhancementsCvars ) ;
clearCvars ( cheatCvars ) ;
clearCvars ( randomizerCvars ) ;
2023-11-28 23:42:37 -05:00
2023-12-16 21:40:09 -05:00
// Flatten everything under CVars into a single array
auto cvars = configJson [ " CVars " ] . flatten ( ) ;
2023-11-28 23:42:37 -05:00
2023-12-16 21:40:09 -05:00
for ( auto & [ key , value ] : cvars . items ( ) ) {
// Replace slashes with dots in key, and remove leading dot
std : : string path = key ;
std : : replace ( path . begin ( ) , path . end ( ) , ' / ' , ' . ' ) ;
if ( path [ 0 ] = = ' . ' ) {
path . erase ( 0 , 1 ) ;
}
if ( value . is_string ( ) ) {
CVarSetString ( path . c_str ( ) , value . get < std : : string > ( ) . c_str ( ) ) ;
} else if ( value . is_number_integer ( ) ) {
CVarSetInteger ( path . c_str ( ) , value . get < int > ( ) ) ;
} else if ( value . is_number_float ( ) ) {
CVarSetFloat ( path . c_str ( ) , value . get < float > ( ) ) ;
}
2023-11-28 23:42:37 -05:00
}
2023-12-16 21:40:09 -05:00
auto gui = LUS : : Context : : GetInstance ( ) - > GetWindow ( ) - > GetGui ( ) ;
gui - > GetGuiWindow ( " Console " ) - > Hide ( ) ;
gui - > GetGuiWindow ( " Actor Viewer " ) - > Hide ( ) ;
gui - > GetGuiWindow ( " Collision Viewer " ) - > Hide ( ) ;
gui - > GetGuiWindow ( " Save Editor " ) - > Hide ( ) ;
gui - > GetGuiWindow ( " Display List Viewer " ) - > Hide ( ) ;
gui - > GetGuiWindow ( " Stats " ) - > Hide ( ) ;
std : : dynamic_pointer_cast < LUS : : ConsoleWindow > ( LUS : : Context : : GetInstance ( ) - > GetWindow ( ) - > GetGui ( ) - > GetGuiWindow ( " Console " ) ) - > ClearBindings ( ) ;
gui - > SaveConsoleVariablesOnNextTick ( ) ;
uint32_t finalHash = boost : : hash_32 < std : : string > { } ( configJson . dump ( ) ) ;
gui - > GetGameOverlay ( ) - > TextDrawNotification ( 30.0f , true , " Configuration Loaded. Hash: %d " , finalHash ) ;
} catch ( std : : exception & e ) {
SPDLOG_ERROR ( " Failed to load config file: {} " , e . what ( ) ) ;
auto gui = LUS : : Context : : GetInstance ( ) - > GetWindow ( ) - > GetGui ( ) ;
gui - > GetGameOverlay ( ) - > TextDrawNotification ( 30.0f , true , " Failed to load config file " ) ;
return ;
} catch ( . . . ) {
SPDLOG_ERROR ( " Failed to load config file " ) ;
auto gui = LUS : : Context : : GetInstance ( ) - > GetWindow ( ) - > GetGui ( ) ;
gui - > GetGameOverlay ( ) - > TextDrawNotification ( 30.0f , true , " Failed to load config file " ) ;
return ;
2023-11-28 23:42:37 -05:00
}
}
// #endregion