Shipwright/soh
Malkierian aeb85c81aa
Item SaveContext Logic (#4237)
* Port initial framework up to latest dev-rando. Includes about 15 items using the SCL structure for tracking.

* Most other item variables ported to SaveContext in UpdateHelpers.

* Removed individual Context retrievals in favor of single local variable in Logic to reference.

* start of some diagnostics.
caught some reverse logic with ApplyItemEffect.

* more diagnostics

* Resolve major logic issue with SetInventory flow in ApplyItemEffect.
Other small logic issues in ApplyItemEffect.

* Added a bit of logging.
Add Double Defense to item effects.

* revert hint gen bypass

* item_list *actually* divorced from logicVar pointers.
Several missed options for ApplyItemEffect, HasItem, and UpdateHelpers added in.
Changed HasItem to a switch block for more performance.
Seeds generate within 10-20 seconds in release mode. Further optimization is assumed possible.

* Some formatting

* Bit more formatting.

* Couple review changes.

* Incorporate progressive upgrades and skeleton key into SCL.
Bit of cleanup.

* Change `inLogic` to static array.

* Fix bug in `BottleCount()` preventing Jabu Jabu from ever being in logic.

* Fix bomb bag HasItem check.

* Fix Gerudo Fortress and Ganon's Castle SmallKeys checks.

* Change all logic use of `bool remove` to be `bool state` and work on the affirmative assumption.

* Forgot the `Set(x)` uses in `Logic::Reset()`.

* Fix fishing pole effect application.

* fishing pole tweak

* Add `RG_BOMB_BAG`, `RG_NUTS` and `RG_STICKS` to `HasItem()`.
Fix silver and gold gauntlet checks in `HasItem()`.
Change Nuts and Sticks helpers to use non-progressive RGs in `UpdateHelpers()`.

* Change mSaveContext to simple pointer.
Set `mSaveContext` to `&gSaveContext` when loading a save file.
Modify `Item::GetGIEntry()` to use rando context's SaveContext pointer instead of the gSaveContext macros.
Utilize `Item::GetGIEntry()` to get real RG of infinite upgrades and set rando infs accordingly, skipping upgrade level incrementing (which was causing overflow of wallets for some reason).

* Rename all remaining references of LogicVar to variants of LogicVal.

* Change final references to song LogicVars to CanUse calls, and remove them.

* Separate equip and rand inf flag maps.
Add Zelda's Letter and Weird Egg rand infs to map.
Consolidate `HasItem` rand inf  lookups using rand inf map and equips using equip flag map.
Maps are static, so can be referenced with `Context::` instead of ctx pointer.
2024-08-01 21:24:24 -07:00
..
assets Merge branch 'develop' of github.com:Malkierian/Shipwright into dev-to-rando-5-6 2024-05-06 18:37:56 -07:00
CMake sccache for windows builds (#3385) 2024-02-01 23:11:31 -06:00
include Item SaveContext Logic (#4237) 2024-08-01 21:24:24 -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 Item SaveContext Logic (#4237) 2024-08-01 21:24:24 -07:00
src Fix Zora's Sapphire crash (#4254) 2024-07-29 18:48:49 -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 Fixed macos/ios errors (#4138) 2024-05-08 19:30:22 -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) 2024-02-15 19:17:03 -06:00