Shipwright/soh
Angelo Bulfone 89ca2149b9
Refactor Fishsanity (#4268)
* Move Fishsanity hooks out of mods.cpp

* Assign fish check flags.

* Clean up location_list for fish

* Prevent fishing from giving double items.

* Remove no-longer-used mPendingFish

* Override draw function for fishing

This allows the draw functions in the source
overlay to match the decomp.

* Override draw function for EnFish

* Overwrite grotto fish params based on respawn data

This allows the randomizer to identify them
automatically without any special logic.

The catch (pun not intended) is that grotto fish don't respawn,
and they were previously identified for such by a params value of 1,
so the logic to take care of that needed to be duplicated.
Thankfully it wasn't very much.

* Add a VB for catching actors in bottles.

* Clean up remaining code after conversion to VB

This breaks fast FastDrops for bottle pickups, though
readding it shouldn't be too hard with the VB hook.

* Remove fishsanityParams from Fishing

It was previously used to track exactly which fish would be
released after a catch, but since both candidate fish
would've been caught, they both wouldn't give checks
anyways.

* Update soh/soh/Enhancements/randomizer/hook_handlers.cpp

Co-authored-by: Pepe20129 <72659707+Pepe20129@users.noreply.github.com>

* Re-add FastDrops for bottle pickups.

While this does diverge from the vanilla decomp, I'm uncertain of
the order that hooks are run, so I put it back into z_player.c
just to be safe. A future commit can do a more proper implementation
using VB hooks.

* Move initialisation of fishsanity hooks into hook_handlers

* Change location constructor to take RandomizerInf instead of uint8_t

This shouldn't have an effect as-is, but other changes can add
additional randomizer flags that can end up pushing fishsanity check
flags out of the range of a uint8_t, causing the cast to overflow
and not be stored correctly. With this change, it could still overflow
when writing to the flag field of Location, but said field is unused
and the parameter is really only for setting the flag for the
SpoilerCollectionCheck.

* Render uncaught overworld fish as randomized item

* Fix windows build by zeroing unused field

* Fix scene parameter type

This resolves a build error on Mac and Windows, but Linux
instead buries it in the sea of warnings, meaning I can't
see it until it fails CI.

---------

Co-authored-by: Pepe20129 <72659707+Pepe20129@users.noreply.github.com>
2024-10-02 09:37:15 -07:00
..
assets Merge remote-tracking branch 'origin/develop' into develop->develop-rando 2024-08-14 11:38:56 -04:00
CMake sccache for windows builds (#3385) 2024-02-01 23:11:31 -06:00
include Check Tracker Re-update (#4322) 2024-09-17 11:32:52 -07:00
macosx Merge remote-tracking branch 'origin/develop' into merge-macready-805 2024-02-28 23:49:06 -05:00
platform Wii U support (#1097) 2022-08-14 22:57:24 -04:00
soh Refactor Fishsanity (#4268) 2024-10-02 09:37:15 -07:00
src Refactor Fishsanity (#4268) 2024-10-02 09:37:15 -07:00
.clang-format git subrepo clone https://github.com/HarbourMasters/soh.git 2022-03-22 02:51:23 +01:00
.clang-tidy git subrepo clone https://github.com/HarbourMasters/soh.git 2022-03-22 02:51:23 +01:00
.gitattributes git subrepo clone https://github.com/HarbourMasters/soh.git 2022-03-22 02:51:23 +01:00
.gitignore Add Support for macOS (#441) 2022-06-22 14:59:21 -04:00
.gitrepo git subrepo push soh 2022-07-14 20:47:48 -04:00
CMakeLists.txt Framebuffer clear and bump LUS (#4187) 2024-05-27 18:33:02 -04:00
fixbaserom.py git subrepo clone https://github.com/HarbourMasters/soh.git 2022-03-22 02:51:23 +01:00
format.sh git subrepo clone https://github.com/HarbourMasters/soh.git 2022-03-22 02:51:23 +01:00
icon.jpg Nintendo switch support (#935) 2022-07-25 21:11:53 -04:00
properties.h.in clean up cmake configure files (#4002) 2024-04-20 11:03:41 -04:00
resource.h git subrepo clone https://github.com/HarbourMasters/soh.git 2022-03-22 02:51:23 +01:00
Resource.rc Use UTF-8 for MSVC and enable visual styles for Windows (#2888) 2023-05-17 22:21:26 -04:00
SHIPOFHARKINIAN.ico git subrepo clone https://github.com/HarbourMasters/soh.git 2022-03-22 02:51:23 +01:00
SHIPOFHARKINIAN.manifest Use manifest for windows DPI awareness (#3270) (#4256) 2024-08-05 19:31:20 -04:00