Commit Graph

761 Commits

Author SHA1 Message Date
Christopher Leggett fe6705cc4d
Merge pull request #2906 from HarbourMasters/develop-spock
Spock -> develop
2023-05-23 09:18:15 -04:00
Rozelette f005bd3b7f
add skeleton unregistration to actors that manage their own skeletons (#2908) 2023-05-22 09:20:06 -04:00
Garrett Cox 5de1240391
Cleanup gameplay stats code/UI and support RTA timing (#2862) 2023-05-21 18:35:56 -04:00
Malkierian cf711d9164
Initialize `gSlotAgeReqs[SLOT_TRADE_CHILD]` and `gItemAgeReqs[ITEM_MASK_BUNNY]` on load initialization according to `gMMBunnyHood` and `gTimelessEquipment` to prevent bunny hood from being unequipped from adult equips on first load. (#2904)
Move the code to change those values based on the child trade slot item to the selecting mask loop to not be setting them every frame just because you're in the inventory.
2023-05-21 12:13:38 -04:00
Malkierian 0b47a19c2c
Mask Sale Fix (#2900) 2023-05-20 12:05:47 -04:00
Christopher Leggett 4d02d89e03
Fixes buying songs crash on Switch (#2899) 2023-05-20 09:24:02 -04:00
aMannus 6d4761f349
Fix several enemy ID's for Hyper Rush (#2871) 2023-05-10 20:44:40 -04:00
Garrett Cox 2ea72f835a
Cleanup cvars that are set on boot (#2863) 2023-05-10 09:08:35 -04:00
briaguya 72358eb4d7
fix for day/night textures (#2853)
* hacky fix for deku tree entrance

* lonlon windows

* only hack in one place instead of everywhere

* dehack deku

* goron city entrance

* gerudo cell, zd entrance

* kak windows

* fix pot house

* back to the hacks

* back back

* space

* globals

* just hack it together to fix em all

---------

Co-authored-by: briaguya <briaguya@alice>
2023-05-09 23:33:27 -04:00
Kenix3 91bd693ff6
Bump LUS version (#2849)
* Bump LUS version

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

* Bump LUS

* More LUS bump

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

---------

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
2023-05-07 20:18:54 -04:00
Malkierian 778f548b01
Move Game Saving to Separate Thread (#2820)
* Refactor `Vec2f`, `Vec3f`, `Vec3s` in `z64math` to avoid reserved identifiers.

* Include `z64save` in SaveManager, which requires encapsulating `#include gameplaystats.h` and `InitStatTracker` in the cpp to fix compile issues.

Adds SaveContext reference parameters to SaveFunc and existing implementations in preparation for threaded saves.

* Threaded saves fully implemented.

Platform-specific save code removed.

Thread safety added. Will wait for thread pool tasks to finish before resetting or closing.

* Converted gSaveContext copy for save threads to the heap with `new`, deleted at the end of the threaded function to prevent possible issues with the stack.

* Turns out leaving the call to `ThreadPoolWait` in a `GameInteractor::OnExitGame` hook seems to be just fine.

* Removed unnecessary references to `SaveManager::ThreadPoolWait()`, game hooks are the only places it's called now.

* Re-added WiiU/Switch performance save code.

* Added call to `SaveManager::ThreadPoolWait` in `Sram_InitSave` to prevent trying to load a newly "created" save before the save file was actually written.

---------

Co-authored-by: Christopher Leggett <chris@leggett.dev>
2023-05-05 17:20:34 -04:00
Kenix3 f9cfcde627
Lus updates (#2835)
* Changes for LUS renames in ResourceManager and Archive.

* Moves WriteSaveFile and ReadSaveFile to SaveManager.

* Removes ImGui namespace.

* Bump LUS

* Updates gitignore for intellij projects.

* Controller usage is now up to date with newest LUS.

* Adapters for removal of Controller.WriteToSource from LUS.

* Uses correct capitalization on Controller.GetProfile()

* Bump LUS

---------

Co-authored-by: Christopher Leggett <chris@leggett.dev>
2023-05-04 23:56:57 -04:00
briaguya c02dcb598a
fix: properly load textures for debug text (#2775)
Co-authored-by: briaguya <briaguya@alice>
2023-05-03 22:23:50 -04:00
Adam Bird f81b042843
Tweak: Reset trade item cycling when pausing or changing pages (#2808)
* reset trade select when unpausing

* move trade select reset to kaleido init and handle when changing pages
2023-05-03 21:45:41 -04:00
Adam Bird 2845a29e28
more mq only texture lookup fixes (#2803) 2023-05-03 21:35:08 -04:00
Adam Bird f9a696e9bd
add back missing early break/return for bottle filling (#2817) 2023-05-03 21:26:03 -04:00
Adam Bird c3c97f207f
Fix: add header to align soh.otr file assets and fix asset crash for Mac (#2819)
* add header for aligned assets for soh files

* remove debug statements

* update more string asset usage to aligned vars
2023-05-03 20:58:41 -04:00
Adam Bird dac90bb9eb
fix mq dungeons crashing by not using mq textures (#2764) 2023-04-27 23:30:14 -04:00
briaguya 4166dbf907
spockalicious (#2751)
* Rough mockup of LUS XML loading

* Updated code for merge

* Loading from FS support and custom DList WIP implementation

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

* WIP Skeleton support

* Almost done

* Rebase fixes

* Submodule updates

* HD Texture Support

* Fixes

* bump lus

* fix exporter build, header update

* soh builds

* setMesh image path cleanup

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

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

* Update OTRExporter/OTRExporter/Main.cpp

* Update ZAPDTR/ZAPD/ZResource.h

* Update soh/src/code/z_skelanime.c

* Update OTRExporter/OTRExporter/Main.cpp

* Fixed jpeg backgrounds and decreased icon buffer size

* Bump lus

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

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

* fix non-windows build

* fix build

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

* add hd checkbox

* Various fixes for custom model support (#23)

* Some fixes

* Updated LUS Version

* Fixed issue with Link Skirt on pause menu

* Added CVar for custom link model changes

* Fixed headers

* Additional header fixes

* Tweaks

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

* Unload game assets on scene transition.

* Bump LUS

* Unloads all HD assets on scene transition.

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

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

---------

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

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

* fix: actually load hd debug font

* toggle debug text correctly

---------

Co-authored-by: briaguya <briaguya>

* Yes. (#28)

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

* HD Skeleton Swapping and Language Fixes (#32)

* Yes.

* HD Skeleton Swapping and Language Fixes

* Test

* Fixed issues with ganon cape (#34)

* Fixed Bongo Bongo Crash (#35)

* Added HD Assets Toggle (#37)

* Ivan the Fairy - Coop Mode (#36)

* wip

* hookshotable ivan

* added hookshot item

* new items & changes & fixes & restored navi

* farore, din and nayru's spells are done

* fixed slingshot & bow

* added more items supported

* done with all main items

* bug fixes & ready

* added imgui button

* wip

* hookshotable ivan

* added hookshot item

* new items & changes & fixes & restored navi

* farore, din and nayru's spells are done

* fixed slingshot & bow

* added more items supported

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

* bump lus (#2692)

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

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

* fix death mountain cloud in rando (#2691)

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

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

* Disable Warning Text

* Moved to Reduced Clutter

* done with all main items

* bug fixes & ready

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

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

* remove rando save init from sram

* move rando savefile init logic and set more flags

* document flags for rando save creation

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

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

* added imgui button

* addressed kenix's comments

* fixed useless null

* added rupee dash mode in extra modes

* changed menu position

---------

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

* LUS Scancodes (#42)

* Added HD Assets Toggle

* Switched out SDL for LUS scancodes

* Ivan tweaks (#45)

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

* Adjust magic timer

* clean up imgui

* model fixes/improvements (#50)

* replace `gUseCustomLinkModel` with custom resource check

* handle adult/child

* bump lus

* fix model switching with tab

* use lus main

* fix carpet man (#52)

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

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

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

* Use libultra features for CPU-modified textures

* Comment

* bump lus on ghost (#58)

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

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

* Changes hd -> alt for texture replacement.

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

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

---------

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

* Fixes kaleido dungeon maps (#67)

* skeleton stuff (#69)

* comment out wii u build (#70)

* bump lus (#71)

* Rework readme (#72)

* Update README.md

* docs

* put custom music docs somewhere

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* dark/light title image

* lus

* Update README.md

* Fixed vanilla minimap (#73)

* Fixed vanilla minimap

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

---------

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

* Skeleton fix fixed (#75)

* WIP skelton patcher fix

* Fixes skeleton reference change.

* Adds const back to name in ResourceMgr_LoadSkeletonByName

---------

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

* Fixes z_message_otr memory leak.

* Update soh/soh/z_message_OTR.cpp

* Update soh/src/code/game.c

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

* bump lus (#79)

* comment out RegisterBlendedTexture in king d (#80)

---------

Co-authored-by: Nicholas Estelami <NEstelami@users.noreply.github.com>
Co-authored-by: David Chavez <david@dcvz.io>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>
Co-authored-by: KiritoDv <kiritodev01@gmail.com>
Co-authored-by: briaguya <briaguya>
Co-authored-by: Ralphie Morell <stratomaster64@gmail.com>
Co-authored-by: MelonSpeedruns <melonspeedruns@outlook.com>
Co-authored-by: Adam Bird <Archez@users.noreply.github.com>
Co-authored-by: inspectredc <78732756+inspectredc@users.noreply.github.com>
Co-authored-by: Patrick12115 <115201185+Patrick12115@users.noreply.github.com>
Co-authored-by: Rozelette <Rozelette@users.noreply.github.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: Lywx <36680385+KiritoDv@users.noreply.github.com>
2023-04-27 19:20:41 -04:00
Adam Bird 000a5d28f3
Add version info and other details to windows exe properties (#2743)
* add version info and other details to windows exe properties

* configure properties file directly to src dir

* move version name in properties and change to Title Case
2023-04-25 10:36:35 -04:00
louist103 aea46e7cb2
Implement built in Extractor for Windows (#2730)
* wip

* const

* split zapd into two targets

* Workingish.

* fix working dir and copy xmls on build (#2)

* dont change current working dir with dialog prompts

* copy asset xmls to target dir

* make zpadlib public

* Messagebox.

* Check for WIN32

* threading

* Cleanups to the exporter and main.

* Multi extraction.

* Fix byteswap header includes.

* Fix another byteswap include.

* fix again.

* stddef size_t

* Add other targets for ZAPDLib

* Non windows.

* IDYES IDNO

* Linux fixes

* hopefully remove switch and wiiu from building extractor

* Please?

* validate roms and add another valid rom

* ifdef out extract.h for switch and wiiu

* Maybe update lux

* Remove ZAPDlib from switch and WiiU

* more rules

* Update soh/soh/Extractor/Extract.cpp

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

* Update ZAPDTR/ZAPD/ExecutableMain.cpp

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

* Update ZAPDTR/ZAPD/CMakeLists.txt

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

* Update ZAPDTR/ZAPD/GameConfig.cpp

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

* Update ZAPDTR/ZAPD/Globals.cpp

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

* Update ZAPDTR/ZAPD/Main.cpp

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

* Update soh/CMakeLists.txt

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

* Update soh/soh/Extractor/Extract.cpp

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

* Update soh/soh/Extractor/Extract.cpp

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

* Update soh/soh/Extractor/Extract.cpp

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

* the last fix

* Add context to a comment

---------

Co-authored-by: Adam Bird <archez39@me.com>
Co-authored-by: Adam Bird <Archez@users.noreply.github.com>
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
2023-04-25 00:01:17 -04:00
briaguya 5324dfae67
clean up build info on logo screen (#2736) 2023-04-23 19:13:51 -04:00
RaelCappra 25ceca0fbf
Enhancement: Aiming reticle for the bow/slingshot (#2715)
* Bow reticle enhancement

* Menu bar checkbox

* fix

* simplify bow/slingshot reticle logic

* Comment on RETICLE_MAX

* Tooltip clarity update

---------

Co-authored-by: briaguya <briaguya@alice>
2023-04-22 21:59:34 -04:00
Adam Bird 42ff9742ed
Tweak: Unique GetItemEntry for Progressive Bombchus with particle effects (#2732)
* give progressive bombchus its own getitementry to allow custom draw effects

* fix timestamp item check
2023-04-21 19:01:19 -04:00
aMannus 37c0345529
ImGui Cleanup - Move Experimental entries, clean up presets (#2725)
* ImGui cleanup

* Fix Wii U

* Fix Wii U build 2: Electric Boogaloo

* Review comments

* Review Comments 2: Electric Boogaloo
2023-04-21 16:05:38 -04:00
inspectredc c146ca4aa5
Fix: SoT Time Travel B-Button Behaviour (#2720)
* time travel allows fishing rod + fixes vanilla ToT age change behaviour

* oops removed too much
2023-04-20 21:53:56 -04:00
Adam Bird 8f0f8c7644
Rando: Add Granny's Potion Shop to Merchant Shuffle (#2723)
* add granny shuffle to 3ds code

* add granny shuffle to soh randomizer

* make granny hand out merchant check

* have medigoron set pending sale mod

* capitalize granny shop item
2023-04-20 21:25:11 -04:00
Adam Bird 1b63f4ca1a
Tweak: Shopsanity Heart Pieces and Containers now refill Link's health (#2724)
Heart Pieces and Heart Containers normally refill Links health when the text box with their respective textID is closed.
However, with shops and shopsanity, after receiving the heart piece, the textbox isn't actually closed. The shop keeper keeps it open to prompt the player if they want to continue shopping. This prevents the health refill logic from running.

This PR adds a check for these items in the BuyEvent for randomizer items and manually refills Links health.
2023-04-20 21:00:00 -04:00
PurpleHato 6562823b72
Readability - Magic Numbers (#2707) 2023-04-18 00:55:02 -04:00
Adam Bird 4aee3b6cc9
fix lake hylia sun granting multiple fire arrows in vanilla (#2708) 2023-04-18 00:53:38 -04:00
Adam Bird 19d8d38082
Fix: Update GetItem value for freestanding items and shopsanity plentiful (#2718)
* fix freestanding items not changing getItem value on the fly

* fix getItem models in shops for plentiful items
2023-04-18 00:41:08 -04:00
Adam Bird 40b6dae261 Fix: Kak GS placement on construction site (#2695) 2023-04-11 18:56:57 -04:00
Adam Bird 059df8187e
chore: move rando savefile setup and document flags (#2697)
* remove rando save init from sram

* move rando savefile init logic and set more flags

* document flags for rando save creation
2023-04-11 18:27:51 -04:00
Patrick12115 fe71cdfbb6
[Reduced Clutter] Disable Hot/Underwater Warning Text (#2684)
* Disable Warning Text

* Moved to Reduced Clutter
2023-04-11 08:18:03 -04:00
Adam Bird d56899dd0b
fix death mountain cloud in rando (#2691) 2023-04-11 08:14:21 -04:00
briaguya 330da0b5ec
khan -> dev 2023-04-07 17:06:58 -04:00
inspectredc 1fa31410c2
Switch age fix (#2676)
* specific scenarios for switch age button, non rando

* Working fix for vanilla swordless change age

* Fix now works for randomiser

* Fixed room load on change age transition

* Removed potentially unnecessary function call

Need to investigate this more, maybe wait for more room documentation.

* Suggested Edits

Moves setting cvar back into mods.cpp and makes clear the condition expected for the no sword flag
2023-04-07 17:05:12 -04:00
RaelCappra 0f6147f41d
Link voice pitch v0 (#2430)
* Link voice pitch v0

* Using a new variable instead

* Move voice pitch slider to Options tab

* fallback to original behavior if freqMultiplier is set to 1

* Move reset button to Options tab with its slider

* Fix voice pitch slider width in Options tab

* [Review] Always use freqMultiplier
2023-04-07 15:54:26 -04:00
Adam Bird b10e489cc6
fix cobra statue shadow and small doc updates (#2666) 2023-04-07 11:22:42 -04:00
Adam Bird ad60ad7c2b
Fix: Goron Link's text in randomizer and have Big rolling goron continue rolling (#2670)
* fix link the gorons text ids in rando

* document goron link flags

* check for fire temple clear instead of medallion for link goron

* stop goron link from shivering after opening doors and have big rolling goron resume rolling after giving check

* remove unneeded rando check

* add comments
2023-04-07 11:21:28 -04:00
briaguya 44906598e4
fix: properly display static background scenes (#2669) 2023-04-04 03:12:09 -04:00
Ralphie Morell ff1d8a9e9d
Enhancement: Room/Scene Timers (#2478)
* Groundwork on scene/room timers; naming changes

* added to save manager; reworked storing timestamps

* actually saved stuff to savemanager;
accounted for null playstate

* finally fixed the fucking timers

* Added scene mapping

* Added CVar for room/scene level; fixed some displays

* reworked logic

* increase name spec for scene timestamps

* Actually save item timestamps when loading v3 save

* Cleanup

* fix merge artifact

* apply suggestions
2023-04-03 00:06:55 -04:00
briaguya 0f40472c1a
khan -> dev 2023-04-02 21:37:00 -04:00
Patrick12115 2af952b180
[Time Saver Enhancement] Nighttime GS Always Spawn (#2611)
* Nighttime GS Always Spawn

* add hook onSceneSpawnActors

* implement onSceneSpawnActors hook to spawn GS in various day scenes

* handle the kak tree skull during the day

* Update mods.cpp

* Add the &

* Fixes

* Update soh/soh/Enhancements/mods.cpp

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

---------

Co-authored-by: Adam Bird <archez39@me.com>
Co-authored-by: Adam Bird <Archez@users.noreply.github.com>
2023-04-02 21:11:08 -04:00
Adam Bird 62bd4b0ba7
remove rando allowing grave pulling during day (#2660) 2023-04-02 14:18:21 -04:00
PurpleHato 77cc91d0de
ADD: Time Saver --> Time Travel with the Song of Time (#2575)
* ADD: Time Saver --> Time Travel with the Song of Time

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

* TWEAK: one liner for the gPlayState check

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

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

* TWEAK: one liner for the gPlayState check

* Timetravel stuff

* tweazk oopsies

* Fixes timeline

* tweak frog dist

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

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

* TWEAK: one liner for the gPlayState check

* Timetravel stuff

* tweazk oopsies

* Fixes timeline

* tweak frog dist

* oppsie²

* del dupe

* del dupe

* tweak tooltip

---------

Co-authored-by: aMannus <4244591+aMannus@users.noreply.github.com>
Co-authored-by: David Chavez <david@dcvz.io>
2023-04-02 12:34:02 -04:00
Patrick12115 fb8dacbc69
[Cheat] No ReDead/Gibdo freeze (#2643)
* No freeze

* Simplified

* removed random spaces

* Removed unnecessary parenthesis
2023-04-02 05:13:34 -04:00
Malkierian 04d0cd8532
Adds `OnTransitionEnd` hook to `GameInteractor`, called at the end of a transition after all mid-transition setup is called. (#2635)
Transitions final autosave location to `OnTransitionEnd`.

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

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

Minor variable name clarification in ItemTableManager.

Modifies AutoSave to account for item ID overlap from `MOD_RANDOMIZER` table (all items in the randomizer table is considered major for AutoSave purposes except ice traps).
2023-04-02 04:47:23 -04:00
Patrick12115 b099b5649b
[Time Saver Enhancement] Dampe Appears All Night (#2618)
* Dampe Appears All Night

* Take out time check
2023-04-02 04:19:58 -04:00
aMannus ca23d87a3a
Hyper Bosses (act and move twice as fast) (#2555)
* Hyper bosses

* Actor* to void* + cast to fix build

* Cleaner implementation

* Fix enemies taking double damage

* Fix smaller dodongo's being sped up

* Additional fix and code cleanup

* Proper fix for double damage

* Extern variable -> GI state
2023-04-02 04:00:21 -04:00