diff --git a/CMakeLists.txt b/CMakeLists.txt index 7aa873c62..2771ee8c9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -199,6 +199,11 @@ find_package(Python3 COMPONENTS Interpreter) add_custom_target( ExtractAssets COMMAND ${CMAKE_COMMAND} -E rm -f oot.otr oot-mq.otr soh.otr + + # copy LUS default shaders into assets/custom + COMMAND ${CMAKE_COMMAND} -E rm -r -f ${CMAKE_CURRENT_SOURCE_DIR}/soh/assets/custom/shaders/ + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/libultraship/src/graphic/Fast3D/shaders/ ${CMAKE_CURRENT_SOURCE_DIR}/soh/assets/custom/shaders/ + COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py -z "$" --non-interactive --xml-root ../soh/assets/xml --custom-otr-file soh.otr "--custom-assets-path" ${CMAKE_CURRENT_SOURCE_DIR}/soh/assets/custom --port-ver "${CMAKE_PROJECT_VERSION}" COMMAND ${CMAKE_COMMAND} -DSYSTEM_NAME=${CMAKE_SYSTEM_NAME} -DTARGET_DIR="$" -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DBINARY_DIR=${CMAKE_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/copy-existing-otrs.cmake WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter @@ -220,6 +225,11 @@ add_custom_target( add_custom_target( GenerateSohOtr COMMAND ${CMAKE_COMMAND} -E rm -f soh.otr + + # copy LUS default shaders into assets/custom + COMMAND ${CMAKE_COMMAND} -E rm -r -f ${CMAKE_CURRENT_SOURCE_DIR}/soh/assets/custom/shaders/ + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/libultraship/src/graphic/Fast3D/shaders/ ${CMAKE_CURRENT_SOURCE_DIR}/soh/assets/custom/shaders/ + COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py -z "$" --norom --custom-otr-file soh.otr "--custom-assets-path" ${CMAKE_CURRENT_SOURCE_DIR}/soh/assets/custom --port-ver "${CMAKE_PROJECT_VERSION}" COMMAND ${CMAKE_COMMAND} -DSYSTEM_NAME=${CMAKE_SYSTEM_NAME} -DTARGET_DIR="$" -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DBINARY_DIR=${CMAKE_BINARY_DIR} -DONLYSOHOTR=On -P ${CMAKE_CURRENT_SOURCE_DIR}/copy-existing-otrs.cmake WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter @@ -231,7 +241,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux") find_package(ImageMagick COMPONENTS convert) if (ImageMagick_FOUND) execute_process ( - COMMAND ${ImageMagick_convert_EXECUTABLE} soh/macosx/sohIcon.png -resize 512x512 ${CMAKE_BINARY_DIR}/sohIcon.png + COMMAND ${ImageMagick_convert_EXECUTABLE} ${CMAKE_SOURCE_DIR}/soh/macosx/sohIcon.png -resize 512x512 ${CMAKE_BINARY_DIR}/sohIcon.png OUTPUT_VARIABLE outVar ) endif() @@ -240,16 +250,16 @@ endif() if(CMAKE_SYSTEM_NAME MATCHES "Darwin") add_custom_target(CreateOSXIcons COMMAND mkdir -p ${CMAKE_BINARY_DIR}/macosx/soh.iconset - COMMAND sips -z 16 16 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_16x16.png - COMMAND sips -z 32 32 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_16x16@2x.png - COMMAND sips -z 32 32 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_32x32.png - COMMAND sips -z 64 64 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_32x32@2x.png - COMMAND sips -z 128 128 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_128x128.png - COMMAND sips -z 256 256 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_128x128@2x.png - COMMAND sips -z 256 256 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_256x256.png - COMMAND sips -z 512 512 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_256x256@2x.png - COMMAND sips -z 512 512 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_512x512.png - COMMAND cp soh/macosx/sohIcon.png ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_512x512@2x.png + COMMAND sips -z 16 16 ${CMAKE_SOURCE_DIR}/soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_16x16.png + COMMAND sips -z 32 32 ${CMAKE_SOURCE_DIR}/soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_16x16@2x.png + COMMAND sips -z 32 32 ${CMAKE_SOURCE_DIR}/soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_32x32.png + COMMAND sips -z 64 64 ${CMAKE_SOURCE_DIR}/soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_32x32@2x.png + COMMAND sips -z 128 128 ${CMAKE_SOURCE_DIR}/soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_128x128.png + COMMAND sips -z 256 256 ${CMAKE_SOURCE_DIR}/soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_128x128@2x.png + COMMAND sips -z 256 256 ${CMAKE_SOURCE_DIR}/soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_256x256.png + COMMAND sips -z 512 512 ${CMAKE_SOURCE_DIR}/soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_256x256@2x.png + COMMAND sips -z 512 512 ${CMAKE_SOURCE_DIR}/soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_512x512.png + COMMAND cp ${CMAKE_SOURCE_DIR}/soh/macosx/sohIcon.png ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_512x512@2x.png COMMAND iconutil -c icns -o ${CMAKE_BINARY_DIR}/macosx/soh.icns ${CMAKE_BINARY_DIR}/macosx/soh.iconset WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMENT "Creating OSX icons ..." diff --git a/libultraship b/libultraship index 02bb77ef2..7e40f9de1 160000 --- a/libultraship +++ b/libultraship @@ -1 +1 @@ -Subproject commit 02bb77ef253e2de0969fd2cb36ad2e870677d18d +Subproject commit 7e40f9de1b1ca5fda9a129676c235bbf0cec4582 diff --git a/soh/assets/.gitignore b/soh/assets/.gitignore index d75078bf1..7a844a727 100644 --- a/soh/assets/.gitignore +++ b/soh/assets/.gitignore @@ -5,3 +5,4 @@ *.vtx.inc *.dlist.inc !*.png +custom/shaders diff --git a/soh/assets/objects/gameplay_keep/gameplay_keep.h b/soh/assets/objects/gameplay_keep/gameplay_keep.h index 6377e165d..638125397 100644 --- a/soh/assets/objects/gameplay_keep/gameplay_keep.h +++ b/soh/assets/objects/gameplay_keep/gameplay_keep.h @@ -21,6 +21,9 @@ static const ALIGN_ASSET(2) char gHilite1Tex[] = dgHilite1Tex; #define dgHilite2Tex "__OTR__objects/gameplay_keep/gHilite2Tex" static const ALIGN_ASSET(2) char gHilite2Tex[] = dgHilite2Tex; +#define dgHilite2Tex_Overflow "__OTR__objects/gameplay_keep/gHilite2Tex_Overflow" +static const ALIGN_ASSET(2) char gHilite2Tex_Overflow[] = dgHilite2Tex_Overflow; + #define dgHylianShieldDesignTex "__OTR__objects/gameplay_keep/gHylianShieldDesignTex" static const ALIGN_ASSET(2) char gHylianShieldDesignTex[] = dgHylianShieldDesignTex; diff --git a/soh/assets/xml/GC_MQ_D/objects/gameplay_keep.xml b/soh/assets/xml/GC_MQ_D/objects/gameplay_keep.xml index 992525114..4a071ef98 100644 --- a/soh/assets/xml/GC_MQ_D/objects/gameplay_keep.xml +++ b/soh/assets/xml/GC_MQ_D/objects/gameplay_keep.xml @@ -7,6 +7,8 @@ + + diff --git a/soh/assets/xml/GC_MQ_PAL_F/objects/gameplay_keep.xml b/soh/assets/xml/GC_MQ_PAL_F/objects/gameplay_keep.xml index 5ffc52f65..882422884 100644 --- a/soh/assets/xml/GC_MQ_PAL_F/objects/gameplay_keep.xml +++ b/soh/assets/xml/GC_MQ_PAL_F/objects/gameplay_keep.xml @@ -7,6 +7,8 @@ + + diff --git a/soh/assets/xml/GC_NMQ_D/objects/gameplay_keep.xml b/soh/assets/xml/GC_NMQ_D/objects/gameplay_keep.xml index 5ffc52f65..905f5d272 100644 --- a/soh/assets/xml/GC_NMQ_D/objects/gameplay_keep.xml +++ b/soh/assets/xml/GC_NMQ_D/objects/gameplay_keep.xml @@ -7,6 +7,8 @@ + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/gameplay_keep.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/gameplay_keep.xml index 5ffc52f65..882422884 100644 --- a/soh/assets/xml/GC_NMQ_PAL_F/objects/gameplay_keep.xml +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/gameplay_keep.xml @@ -7,6 +7,8 @@ + + diff --git a/soh/assets/xml/N64_PAL_10/objects/gameplay_keep.xml b/soh/assets/xml/N64_PAL_10/objects/gameplay_keep.xml index 5ffc52f65..882422884 100644 --- a/soh/assets/xml/N64_PAL_10/objects/gameplay_keep.xml +++ b/soh/assets/xml/N64_PAL_10/objects/gameplay_keep.xml @@ -7,6 +7,8 @@ + + diff --git a/soh/assets/xml/N64_PAL_11/objects/gameplay_keep.xml b/soh/assets/xml/N64_PAL_11/objects/gameplay_keep.xml index 5ffc52f65..882422884 100644 --- a/soh/assets/xml/N64_PAL_11/objects/gameplay_keep.xml +++ b/soh/assets/xml/N64_PAL_11/objects/gameplay_keep.xml @@ -7,6 +7,8 @@ + + diff --git a/soh/include/macros.h b/soh/include/macros.h index 302e3755d..325fb91b6 100644 --- a/soh/include/macros.h +++ b/soh/include/macros.h @@ -8,6 +8,10 @@ // #define __attribute__(x) // #endif +// this was removed from the LUS rcp.h in https://github.com/Kenix3/libultraship/pull/833/ +// it is still used in graph.c and fault.c +#define HW_REG(reg, type) *(volatile type*)((reg) | 0xA0000000) + // SoH [Port] Always use the AVOID_UB version (we don't set AVOID_UB while building yet) /* #ifndef AVOID_UB diff --git a/soh/soh/ActorDB.cpp b/soh/soh/ActorDB.cpp index 880b2dab9..8b7c43ee6 100644 --- a/soh/soh/ActorDB.cpp +++ b/soh/soh/ActorDB.cpp @@ -462,7 +462,7 @@ static constexpr std::pair actorDescriptionData[] = { { ACTOR_EN_ZL4, "Zelda (Child)" }, { ACTOR_EN_MM2, "Running Man (Adult Era)" }, { ACTOR_BG_JYA_BLOCK, "Silver Block (Child Era)" }, - { ACTOR_OBJ_WARP2BLOCK, "Navi Infospot (Green, Time Block)" } + { ACTOR_OBJ_WARP2BLOCK, "Navi Infospot (Green, Time Block)" }, }; static std::unordered_map actorDescriptions = std::unordered_map(std::begin(actorDescriptionData), std::end(actorDescriptionData)); diff --git a/soh/soh/Enhancements/AssignableTunicsAndBoots.cpp b/soh/soh/Enhancements/AssignableTunicsAndBoots.cpp index 3a52312c9..3b4b11686 100644 --- a/soh/soh/Enhancements/AssignableTunicsAndBoots.cpp +++ b/soh/soh/Enhancements/AssignableTunicsAndBoots.cpp @@ -87,6 +87,28 @@ void RegisterAssignableTunicsBoots() { } }); + // don't throw items when the pressed button is a tunic or boots + COND_VB_SHOULD(VB_THROW_OR_PUT_DOWN_HELD_ITEM, CVAR_TUNICBOOTS_VALUE != CVAR_TUNICBOOTS_DEFAULT, { + // if the vanilla condition doesn't want us to throw/put down the item, early return + if (!*should) { + return; + } + + Input* input = va_arg(args, Input*); + + s32 item = ITEM_NONE; + for (s32 i = 0; i < ARRAY_COUNT(sItemButtons); i++) { + if (CHECK_BTN_ALL(input->press.button, sItemButtons[i])) { + item = Player_GetItemOnButton(gPlayState, i); + break; + } + } + + if (item >= ITEM_TUNIC_KOKIRI && item <= ITEM_BOOTS_HOVER) { + *should = false; + } + }); + // do something when the player presses a button to use the tunics/boots COND_VB_SHOULD(VB_EXECUTE_PLAYER_ACTION_FUNC, CVAR_TUNICBOOTS_VALUE != CVAR_TUNICBOOTS_DEFAULT, { // if the vanilla condition doesn't want us to run the actionFunc, don't do any of this diff --git a/soh/soh/Enhancements/Presets/PresetEntries.cpp b/soh/soh/Enhancements/Presets/PresetEntries.cpp new file mode 100644 index 000000000..3b2167a2e --- /dev/null +++ b/soh/soh/Enhancements/Presets/PresetEntries.cpp @@ -0,0 +1,679 @@ +#include "Presets.h" +#include +#include "soh/cvar_prefixes.h" +#include "soh/Enhancements/enhancementTypes.h" + +#define PRESET_ENTRY_S32(cvar, value) { cvar, PRESET_ENTRY_TYPE_S32, value } +#define PRESET_ENTRY_FLOAT(cvar, value) { cvar, PRESET_ENTRY_TYPE_FLOAT, value } +#define PRESET_ENTRY_STRING(cvar, value) { cvar, PRESET_ENTRY_TYPE_STRING, value } +#define PRESET_ENTRY_CPP_STRING(cvar, value) { cvar, PRESET_ENTRY_TYPE_CPP_STRING, value } + +// TODO: Ideally everything in this file will come from one/many JSON files + +// Enhancement presets +const std::vector vanillaPlusPresetEntries = { + // Quality of Life + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("Autosave"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.GoldSkulltula"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.HeartPiece"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.HeartContainer"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("BetterOwl"), 1), + + // Skips & Speed-ups + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkipText"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TextSpeed"), 5), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterRupeeAccumulator"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkipSaveConfirmation"), 1), + + // Graphics + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DisableLOD"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("RememberMapToggleState"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("VisualAgony"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DynamicWalletIcon"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TimeFlowFileSelect"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("WidescreenActorCulling"), 1), + + // Items + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DpadEquips"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("AssignableTunicsAndBoots"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DpadNoDropOcarinaInput"), 1), + + // Fixes + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("GravediggingTourFix"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixFloorSwitches"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixZoraHintDialogue"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixVineFall"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("EnemySpawnsOverWaterboxes"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixSawSoftlock"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DekuNutUpgradeFix"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixGrokenGiantsKnife"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixMenuLR"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixDungeonMinimapIcon"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TwoHandedIdle"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NaviTextFix"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("GerudoWarriorClothingFix"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixTexturesOOB"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixEyesOpenWhileSleeping"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixHammerHand"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SceneSpecificDirtPathFix"), ZFIGHT_FIX_CONSISTENT_VANISH), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SilverRupeeJingleExtend"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixDaruniaDanceSpeed"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("CreditsFix"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("RedGanonBlood"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("PulsateBossIcon"), 1), + + // Difficulty + // NONE + + // Minigames + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("CustomizeFrogsOcarinaGame"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FrogsModifyFailTime"), 2), + + // Extra Modes + // NONE + + // Cheats + // NONE +}; + +const std::vector enhancedPresetEntries = { + // Quality of Life + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("Autosave"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("PauseWarp"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NoInputForCredits"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.GoldSkulltula"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.HeartPiece"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.HeartContainer"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DisableCritWiggle"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("BetterOwl"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("QuitFishingAtDoor"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InstantPutaway"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TimeSavers.SleepingWaterfall"), 1), + + // Skips & Speed-ups + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkipText"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TextSpeed"), 5), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SlowTextSpeed"), 5), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterHeavyBlockLift"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkipSwimDeepEndAnim"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("ClimbSpeed"), 3), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterBlockPush"), 5), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("CrawlSpeed"), 2), + PRESET_ENTRY_FLOAT(CVAR_ENHANCEMENT("MweepSpeed"), 5.0f), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InstantScarecrow"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterRupeeAccumulator"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkulltulaFreeze"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkipSaveConfirmation"), 1), + + // Graphics + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DisableLOD"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NewDrops"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("PauseMenuAnimatedLink"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("ShowDoorLocksOnBothSides"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("ToTMedallionsColors"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("RememberMapToggleState"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("VisualAgony"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DynamicWalletIcon"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("BetterAmmoRendering"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TimeFlowFileSelect"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("WidescreenActorCulling"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("ExtendedCullingExcludeGlitchActors"), 1), + + // Items + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DpadEquips"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("AssignableTunicsAndBoots"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DpadNoDropOcarinaInput"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastOcarinaPlayback"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MMBunnyHood"), BUNNY_HOOD_FAST), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("PersistentMasks"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NutsExplodeBombs"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DisableFirstPersonChus"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("BetterBombchuShopping"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SeparateArrows"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkipArrowAnimation"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastBoomerang"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("BetterFarore"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastFarores"), 1), + + // Fixes + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("GravediggingTourFix"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixFloorSwitches"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixZoraHintDialogue"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixVineFall"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("EnemySpawnsOverWaterboxes"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixSawSoftlock"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DekuNutUpgradeFix"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixGrokenGiantsKnife"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixMenuLR"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixDungeonMinimapIcon"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TwoHandedIdle"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NaviTextFix"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("GerudoWarriorClothingFix"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixTexturesOOB"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixEyesOpenWhileSleeping"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixHammerHand"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SceneSpecificDirtPathFix"), ZFIGHT_FIX_CONSISTENT_VANISH), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SilverRupeeJingleExtend"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixDaruniaDanceSpeed"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("CreditsFix"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("RedGanonBlood"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("PulsateBossIcon"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("HoverFishing"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("N64WeirdFrames"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("BombchusOOB"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("QuickPutaway"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("QuickBongoKill"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("RestoreRBAValues"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("EarlyEyeballFrog"), 1), + + // Difficulty + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("EnableBombchuDrops"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DampeWin"), 1), + + // Minigames + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("CustomizeFrogsOcarinaGame"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FrogsModifyFailTime"), 2), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("CustomizeOcarinaGame"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("OcarinaGame.StartingNotes"), 5), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("CustomizeFishing"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("GuaranteeFishingBite"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FishNeverEscape"), 1), + + // Extra Modes + // NONE + + // Cheats + // NONE +}; + +const std::vector randomizerPresetEntries = { + // Quality of Life + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("Autosave"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DayGravePull"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DampeAllNight"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MarketSneak"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("PauseWarp"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NoInputForCredits"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("IncludeHeldInputsBufferWindow"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.GoldSkulltula"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.HeartPiece"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.HeartContainer"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DisableCritWiggle"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("BetterOwl"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("QuitFishingAtDoor"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InstantPutaway"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TimeSavers.SleepingWaterfall"), 1), + + // Skips & Speed-ups + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Intro"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Entrances"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.LearnSong"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.BossIntro"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.QuickBossDeaths"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.OnePoint"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TimeSavers.SkipOwlInteractions"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TimeSavers.DisableTitleCard"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastDrops"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TimeSavers.SkipForcedDialog"), FORCED_DIALOG_SKIP_ALL), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkipText"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TextSpeed"), 5), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SlowTextSpeed"), 5), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterHeavyBlockLift"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastChests"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkipSwimDeepEndAnim"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("ClimbSpeed"), 3), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterBlockPush"), 5), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("CrawlSpeed"), 2), + PRESET_ENTRY_FLOAT(CVAR_ENHANCEMENT("MweepSpeed"), 5.0f), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TimeSavers.SkipChildStealth"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TimeSavers.SkipTowerEscape"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InstantScarecrow"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterRupeeAccumulator"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkipSaveConfirmation"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("ForgeTime"), 0), + + // Graphics + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DisableLOD"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NewDrops"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("PauseMenuAnimatedLink"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("ShowDoorLocksOnBothSides"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("ToTMedallionsColors"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("RememberMapToggleState"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("VisualAgony"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DynamicWalletIcon"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FileSelectMoreInfo"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("BetterAmmoRendering"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TimeFlowFileSelect"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("WidescreenActorCulling"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("ExtendedCullingExcludeGlitchActors"), 1), + + // Items + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DpadEquips"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("AssignableTunicsAndBoots"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("EquipmentCanBeRemoved"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("ToggleStrength"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SwordToggle"), SWORD_TOGGLE_CHILD), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DpadNoDropOcarinaInput"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastOcarinaPlayback"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MMBunnyHood"), BUNNY_HOOD_FAST), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("AdultMasks"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("PersistentMasks"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MaskSelect"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NutsExplodeBombs"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DisableFirstPersonChus"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("BetterBombchuShopping"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SeparateArrows"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkipArrowAnimation"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastBoomerang"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("BetterFarore"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastFarores"), 1), + + // Fixes + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("GravediggingTourFix"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixFloorSwitches"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixZoraHintDialogue"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixVineFall"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("EnemySpawnsOverWaterboxes"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixSawSoftlock"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DekuNutUpgradeFix"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixGrokenGiantsKnife"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixMenuLR"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixDungeonMinimapIcon"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TwoHandedIdle"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NaviTextFix"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("GerudoWarriorClothingFix"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixTexturesOOB"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixHammerHand"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SceneSpecificDirtPathFix"), ZFIGHT_FIX_CONSISTENT_VANISH), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SilverRupeeJingleExtend"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixDaruniaDanceSpeed"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("CreditsFix"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("RedGanonBlood"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("PulsateBossIcon"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("HoverFishing"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("N64WeirdFrames"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("BombchusOOB"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("QuickPutaway"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("QuickBongoKill"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("RestoreRBAValues"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("EarlyEyeballFrog"), 1), + + // Difficulty + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("GoronPot"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DampeWin"), 1), + + // Minigames + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("CustomizeFrogsOcarinaGame"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FrogsModifyFailTime"), 2), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("CustomizeOcarinaGame"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("OcarinaGame.StartingNotes"), 5), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("CustomizeFishing"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("GuaranteeFishingBite"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FishNeverEscape"), 1), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MinimumFishWeightChild"), 3), + PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MinimumFishWeightAdult"), 6), + + // Extra Modes + // NONE + + // Cheats + PRESET_ENTRY_S32(CVAR_CHEAT("EasyFrameAdvance"), 1), +}; + +// Randomizer presets +const std::vector randomizerBeginnerPresetEntries = { + // World tab + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ClosedForest"), RO_CLOSED_FOREST_OFF), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("KakarikoGate"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("DoorOfTime"), 2), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ZorasFountain"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("RainbowBridge"), RO_BRIDGE_GREG), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GanonTrial"), RO_GANONS_TRIALS_SKIP), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("FortressCarpenters"), 1), + + // Items tab + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("IncludeTycoonWallet"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleOcarinas"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingMapsCompasses"), RO_DUNGEON_ITEM_LOC_STARTWITH), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("Keysanity"), RO_DUNGEON_ITEM_LOC_OWN_DUNGEON), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BossKeysanity"), RO_DUNGEON_ITEM_LOC_OWN_DUNGEON), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_LACS_REWARDS), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("LacsRewardCount"), 6), + + // Gamplay tab + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("CuccosToReturn"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BigPoeTargetCount"), 0), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipChildZelda"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipEponaRace"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("CompleteMaskQuest"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipScarecrowsSong"), 1), + + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SheikLAHint"), 0), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("DampeHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GregHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SariaHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("FrogsHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BiggoronHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("MalonHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("HBAHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("MerchantText"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("10GSHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("20GSHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("30GSHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("40GSHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("50GSHint"), 1), + + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("FullWallets"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("EnableBombchuDrops"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BlueFireArrows"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SunlightArrows"), 1), + + // Locations tab + PRESET_ENTRY_STRING(CVAR_RANDOMIZER_SETTING("ExcludedLocations"), "147,148,233,323,"), + + // Tricks/Glitches tab + // NONE + + // Starting inventory tab + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingKokiriSword"), RO_STARTING_OCARINA_FAIRY), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingOcarina"), RO_STARTING_OCARINA_FAIRY), +}; + +const std::vector randomizerStandardPresetEntries = { + // World tab + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ClosedForest"), RO_CLOSED_FOREST_OFF), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("KakarikoGate"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("DoorOfTime"), 2), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ZorasFountain"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("RainbowBridge"), RO_BRIDGE_GREG), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GanonTrial"), RO_GANONS_TRIALS_SKIP), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("FortressCarpenters"), 1), + + // Items tab + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleSongs"), RO_SONG_SHUFFLE_ANYWHERE), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleTokens"), RO_TOKENSANITY_ALL), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleKokiriSword"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("IncludeTycoonWallet"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleOcarinas"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleGerudoToken"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("Shopsanity"), RO_SHOPSANITY_SPECIFIC_COUNT), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShopsanityCount"), 4), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShopsanityPrices"), RO_PRICE_BALANCED), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleScrubs"), RO_SCRUBS_ALL), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ScrubsPrices"), RO_PRICE_FIXED), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ScrubsFixedPrice"), 2), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleMerchants"), RO_SHUFFLE_MERCHANTS_BEANS_ONLY), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingMapsCompasses"), RO_DUNGEON_ITEM_LOC_STARTWITH), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("Keysanity"), RO_DUNGEON_ITEM_LOC_ANYWHERE), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BossKeysanity"), RO_DUNGEON_ITEM_LOC_OWN_DUNGEON), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_LACS_REWARDS), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("LacsRewardCount"), 7), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleKeyRings"), RO_KEYRINGS_COUNT), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsRandomCount"), 8), + + // Gamplay tab + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("CuccosToReturn"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BigPoeTargetCount"), 0), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipChildZelda"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipEponaRace"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("CompleteMaskQuest"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipScarecrowsSong"), 1), + + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SheikLAHint"), 0), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("DampeHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GregHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SariaHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("FrogsHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BiggoronHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("MalonHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("HBAHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("MerchantText"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("10GSHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("20GSHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("30GSHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("40GSHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("50GSHint"), 1), + + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("FullWallets"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BombchuBag"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("EnableBombchuDrops"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BlueFireArrows"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SunlightArrows"), 1), + + // Locations tab + // NONE + + // Tricks/Glitches tab + // NONE + + // Starting inventory tab + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingOcarina"), RO_STARTING_OCARINA_FAIRY), +}; + +const std::vector randomizerAdvancedPresetEntries = { + // World tab + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ClosedForest"), RO_CLOSED_FOREST_OFF), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("KakarikoGate"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("DoorOfTime"), 2), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("RainbowBridge"), RO_BRIDGE_GREG), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingAge"), RO_AGE_RANDOM), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GanonTrial"), RO_GANONS_TRIALS_SKIP), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("FortressCarpenters"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleDungeonsEntrances"), RO_DUNGEON_ENTRANCE_SHUFFLE_ON_PLUS_GANON), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleBossEntrances"), RO_BOSS_ROOM_ENTRANCE_SHUFFLE_FULL), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleOverworldSpawns"), 1), + + // Items tab + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleSongs"), RO_SONG_SHUFFLE_ANYWHERE), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleTokens"), RO_TOKENSANITY_ALL), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleKokiriSword"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleMasterSword"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("IncludeTycoonWallet"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleOcarinas"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleSwim"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleGerudoToken"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleDekuNutBag"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleDekuStickBag"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("Shopsanity"), RO_SHOPSANITY_SPECIFIC_COUNT), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShopsanityCount"), 7), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShopsanityPrices"), RO_PRICE_BALANCED), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleScrubs"), RO_SCRUBS_ALL), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ScrubsPrices"), RO_PRICE_FIXED), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ScrubsFixedPrice"), 2), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleCows"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleMerchants"), RO_SHUFFLE_MERCHANTS_ALL), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleFrogSongRupees"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleAdultTrade"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingMapsCompasses"), RO_DUNGEON_ITEM_LOC_STARTWITH), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("Keysanity"), RO_DUNGEON_ITEM_LOC_ANYWHERE), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GerudoKeys"), RO_GERUDO_KEYS_ANYWHERE), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BossKeysanity"), RO_DUNGEON_ITEM_LOC_ANYWHERE), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_LACS_REWARDS), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("LacsRewardCount"), 8), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleKeyRings"), RO_KEYRINGS_COUNT), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsRandomCount"), 4), + + // Gamplay tab + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("CuccosToReturn"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BigPoeTargetCount"), 0), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipChildZelda"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipEponaRace"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("CompleteMaskQuest"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipScarecrowsSong"), 1), + + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SheikLAHint"), 0), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("DampeHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GregHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SariaHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("FrogsHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("MalonHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("HBAHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("MerchantText"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("40GSHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("50GSHint"), 1), + + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("FullWallets"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BombchuBag"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("EnableBombchuDrops"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BlueFireArrows"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SunlightArrows"), 1), + + // Locations tab + // NONE + + // Tricks/Glitches tab + // NONE + + // Starting inventory tab + // NONE +}; + +const std::vector hellModePresetEntries = { + // World tab + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ClosedForest"), RO_CLOSED_FOREST_OFF), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("KakarikoGate"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("DoorOfTime"), 2), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("LockOverworldDoors"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("RainbowBridge"), RO_BRIDGE_GREG), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingAge"), RO_AGE_RANDOM), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleDungeonsEntrances"), RO_DUNGEON_ENTRANCE_SHUFFLE_ON_PLUS_GANON), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleBossEntrances"), RO_BOSS_ROOM_ENTRANCE_SHUFFLE_FULL), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleOverworldEntrances"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleInteriorsEntrances"), RO_INTERIOR_ENTRANCE_SHUFFLE_ALL), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleGrottosEntrances"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleOwlDrops"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleWarpSongs"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleOverworldSpawns"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("MixedEntrances"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("MixDungeons"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("MixBosses"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("MixOverworld"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("MixInteriors"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("MixGrottos"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("DecoupleEntrances"), 1), + + // Items tab + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleSongs"), RO_SONG_SHUFFLE_ANYWHERE), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleTokens"), RO_TOKENSANITY_ALL), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleKokiriSword"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleMasterSword"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleChildWallet"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("IncludeTycoonWallet"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleOcarinas"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleOcarinaButtons"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleSwim"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleWeirdEgg"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleGerudoToken"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleFishingPole"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleDekuNutBag"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleDekuStickBag"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleFreestanding"), RO_SHUFFLE_FREESTANDING_ALL), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("Shopsanity"), RO_SHOPSANITY_SPECIFIC_COUNT), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShopsanityCount"), 7), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShopsanityPrices"), RO_PRICE_BALANCED), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("Fishsanity"), RO_FISHSANITY_BOTH), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("FishsanityPondCount"), 17), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("FishsanityAgeSplit"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleScrubs"), RO_SCRUBS_ALL), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ScrubsPrices"), RO_PRICE_BALANCED), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleBeehives"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleCows"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShufflePots"), RO_SHUFFLE_POTS_ALL), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleMerchants"), RO_SHUFFLE_MERCHANTS_ALL), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleFrogSongRupees"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleAdultTrade"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("Shuffle100GSReward"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleBossSouls"), 2), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleFairies"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingMapsCompasses"), RO_DUNGEON_ITEM_LOC_ANYWHERE), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("Keysanity"), RO_DUNGEON_ITEM_LOC_ANYWHERE), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GerudoKeys"), RO_GERUDO_KEYS_ANYWHERE), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BossKeysanity"), RO_DUNGEON_ITEM_LOC_ANYWHERE), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_LACS_REWARDS), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("LacsRewardCount"), 10), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("LacsRewardOptions"), RO_LACS_GREG_REWARD), + + // Gamplay tab + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("CuccosToReturn"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BigPoeTargetCount"), 0), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipEponaRace"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BombchuBag"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("EnableBombchuDrops"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BlueFireArrows"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SunlightArrows"), 1), + + // Locations tab + // NONE + + // Tricks/Glitches tab + // NONE + + // Starting inventory tab + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingHearts"), 0), +}; + +const std::map presetTypes = { + { PRESET_TYPE_ENHANCEMENTS, + { { CVAR_PREFIX_ENHANCEMENT, CVAR_PREFIX_CHEAT }, + { + { ENHANCEMENT_PRESET_DEFAULT, + { + "Default", + "Reset all options to their default values.", + {}, + } }, + { ENHANCEMENT_PRESET_VANILLA_PLUS, + { + "Vanilla Plus", + "Adds some quality of life features, but don't alter gameplay and aims to " + "preserve the authentic experience. Recommended for a first playthrough of OoT.", + vanillaPlusPresetEntries, + } }, + { ENHANCEMENT_PRESET_ENHANCED, + { "Enhanced", + "The \"Vanilla Plus\" preset, but with more quality of life enhancements that might alter gameplay " + "slightly. Recommended for returning players going through the vanilla game again.", + enhancedPresetEntries } }, + { ENHANCEMENT_PRESET_RANDOMIZER, + { "Randomizer", + "A baseline set of enhancements for playing randomizer. Includes many quality of life options and " + "options to speed up gameplay.", + randomizerPresetEntries } }, + } } }, + { PRESET_TYPE_RANDOMIZER, + { { CVAR_PREFIX_RANDOMIZER_SETTING, CVAR_PREFIX_RANDOMIZER_ENHANCEMENT }, + { + { RANDOMIZER_PRESET_DEFAULT, + { + "Default", + "Reset all options to their default values.", + {}, + } }, + { RANDOMIZER_PRESET_BEGINNER, + { + "Beginner", + "A simpler set of options and shuffled items meant for players new to the randomizer. ", + randomizerBeginnerPresetEntries, + } }, + { RANDOMIZER_PRESET_STANDARD, + { + "Standard", + "A set of options meant as a baseline for both newer and experienced randomizer players.", + randomizerStandardPresetEntries, + } }, + { RANDOMIZER_PRESET_ADVANCED, + { + "Advanced", + "Includes many more shuffled items and introduces some entrance shuffle options. Meant for advanced " + "randomizer players.", + randomizerAdvancedPresetEntries, + } }, + { RANDOMIZER_PRESET_HELL_MODE, + { "Hell Mode", + "Every location randomized, all entrance settings enabled, but still using glitchless logic. Expect " + "pain.", + hellModePresetEntries } }, + } } } +}; diff --git a/soh/soh/Enhancements/presets.cpp b/soh/soh/Enhancements/Presets/Presets.cpp similarity index 95% rename from soh/soh/Enhancements/presets.cpp rename to soh/soh/Enhancements/Presets/Presets.cpp index c8760caca..8d08869f5 100644 --- a/soh/soh/Enhancements/presets.cpp +++ b/soh/soh/Enhancements/Presets/Presets.cpp @@ -1,4 +1,4 @@ -#include "presets.h" +#include "Presets.h" #include #include #include @@ -75,9 +75,6 @@ void DrawPresetSelector(PresetType presetTypeId) { } CVarSetInteger(presetTypeCvar.c_str(), selectedPresetId); Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame(); - if (presetTypeId == PRESET_TYPE_RANDOMIZER){ - Rando::Settings::GetInstance()->ReloadOptions(); - } } UIWidgets::PopStyleButton(); } diff --git a/soh/soh/Enhancements/Presets/Presets.h b/soh/soh/Enhancements/Presets/Presets.h new file mode 100644 index 000000000..898bc9cc9 --- /dev/null +++ b/soh/soh/Enhancements/Presets/Presets.h @@ -0,0 +1,58 @@ +#pragma once + +#include +#include +#include +#include "soh/OTRGlobals.h" + +enum PresetEntryType { + PRESET_ENTRY_TYPE_S32, + PRESET_ENTRY_TYPE_FLOAT, + PRESET_ENTRY_TYPE_STRING, + PRESET_ENTRY_TYPE_CPP_STRING, +}; + +enum PresetType { + PRESET_TYPE_ENHANCEMENTS, + PRESET_TYPE_RANDOMIZER, +}; + +enum EnhancementPreset { + ENHANCEMENT_PRESET_DEFAULT, + ENHANCEMENT_PRESET_VANILLA_PLUS, + ENHANCEMENT_PRESET_ENHANCED, + ENHANCEMENT_PRESET_RANDOMIZER, +}; + +enum RandomizerPreset { + RANDOMIZER_PRESET_DEFAULT, + RANDOMIZER_PRESET_BEGINNER, + RANDOMIZER_PRESET_STANDARD, + RANDOMIZER_PRESET_ADVANCED, + RANDOMIZER_PRESET_HELL_MODE, +}; + +typedef struct PresetEntry { + const char* cvar; + PresetEntryType type; + std::variant value; +} PresetEntry; + +std::string FormatLocations(std::vector locs); + +void DrawPresetSelector(PresetType presetType); +void clearCvars(std::vector cvarsToClear); +void applyPreset(std::vector entries); + +typedef struct PresetDefinition { + const char* label; + const char* description; + std::vector entries; +} PresetDefinition; + +typedef struct PresetTypeDefinition { + std::vector blocksToClear; + std::map presets; +} PresetTypeDefinition; + +extern const std::map presetTypes; diff --git a/soh/soh/Enhancements/TimeDisplay/TimeDisplay.h b/soh/soh/Enhancements/TimeDisplay/TimeDisplay.h index 671577631..41cda077f 100644 --- a/soh/soh/Enhancements/TimeDisplay/TimeDisplay.h +++ b/soh/soh/Enhancements/TimeDisplay/TimeDisplay.h @@ -17,7 +17,7 @@ typedef enum TimerDisplay { DISPLAY_IN_GAME_TIMER, DISPLAY_TIME_OF_DAY, DISPLAY_CONDITIONAL_TIMER, - DISPLAY_NAVI_TIMER + DISPLAY_NAVI_TIMER, } TimerDisplay; typedef enum NaviTimerValues { @@ -34,4 +34,4 @@ typedef struct { const char* timeEnable; } TimeObject; -extern const std::vector timeDisplayList; \ No newline at end of file +extern const std::vector timeDisplayList; diff --git a/soh/soh/Enhancements/audio/AudioCollection.cpp b/soh/soh/Enhancements/audio/AudioCollection.cpp index 28e8d3d99..13b793b90 100644 --- a/soh/soh/Enhancements/audio/AudioCollection.cpp +++ b/soh/soh/Enhancements/audio/AudioCollection.cpp @@ -14,6 +14,7 @@ { sequenceId, { sequenceId, label, sfxKey, category, canBeReplaced, canBeUsedAsReplacement } } AudioCollection::AudioCollection() { + // clang-format off // (originalSequenceId, label, sfxKey, category, canBeReplaced, canBeUsedAsReplacement), sequenceMap = { @@ -328,7 +329,7 @@ AudioCollection::AudioCollection() { //SEQUENCE_MAP_ENTRY(NA_SE_VO_DUMMY_0x88_YOBI, "NA_SE_VO_DUMMY_0x88_YOBI", "NA_SE_VO_DUMMY_0x88_YOBI", SEQ_VOICE, true, false), // .. //SEQUENCE_MAP_ENTRY(NA_SE_VO_DUMMY_0x89_YOBI, "NA_SE_VO_DUMMY_0x89_YOBI", "NA_SE_VO_DUMMY_0x89_YOBI", SEQ_VOICE, true, false), // .. }; - + // clang-format on } std::string AudioCollection::GetCvarKey(std::string sfxKey) { diff --git a/soh/soh/Enhancements/audio/AudioEditor.cpp b/soh/soh/Enhancements/audio/AudioEditor.cpp index caa40c66f..2e94e924a 100644 --- a/soh/soh/Enhancements/audio/AudioEditor.cpp +++ b/soh/soh/Enhancements/audio/AudioEditor.cpp @@ -618,7 +618,7 @@ void AudioEditor::DrawElement() { {SEQ_SFX, true }, {SEQ_VOICE, true }, {SEQ_INSTRUMENT, true}, - {SEQ_BGM_CUSTOM, true} + {SEQ_BGM_CUSTOM, true}, }; // make temporary sets because removing from the set we're iterating through crashes ImGui @@ -772,7 +772,7 @@ void AudioEditor::DrawElement() { UIWidgets::PopStyleTabs(); } -std::vector allTypes = { SEQ_BGM_WORLD, SEQ_BGM_EVENT, SEQ_BGM_BATTLE, SEQ_OCARINA, SEQ_FANFARE, SEQ_INSTRUMENT, SEQ_SFX, SEQ_VOICE }; +std::vector allTypes = { SEQ_BGM_WORLD, SEQ_BGM_EVENT, SEQ_BGM_BATTLE, SEQ_OCARINA, SEQ_FANFARE, SEQ_INSTRUMENT, SEQ_SFX, SEQ_VOICE, }; void AudioEditor_RandomizeAll() { for (auto type : allTypes) { diff --git a/soh/soh/Enhancements/boss-rush/BossRush.cpp b/soh/soh/Enhancements/boss-rush/BossRush.cpp index aabe5d67a..6f218fcb3 100644 --- a/soh/soh/Enhancements/boss-rush/BossRush.cpp +++ b/soh/soh/Enhancements/boss-rush/BossRush.cpp @@ -1,4 +1,4 @@ -#include "BossRush.h" +#include "BossRush.h" #include "soh/OTRGlobals.h" #include "soh/Enhancements/game-interactor/GameInteractor.h" #include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h" @@ -34,7 +34,7 @@ BossRushSetting BossRushOptions[BR_OPTIONS_MAX] = { { "All", "Alle", "Tous" }, { "Child", "Kind", "Enfant" }, { "Adult", "Erwachsener", "Adulte" }, - { "Ganondorf & Ganon", "Ganondorf & Ganon", "Ganondorf & Ganon" } + { "Ganondorf & Ganon", "Ganondorf & Ganon", "Ganondorf & Ganon" }, } }, { @@ -45,7 +45,7 @@ BossRushSetting BossRushOptions[BR_OPTIONS_MAX] = { { "20", "20", "20" }, { "3", "3", "3" }, { "5", "5", "5" }, - { "7", "7", "7" } + { "7", "7", "7" }, } }, { @@ -53,7 +53,7 @@ BossRushSetting BossRushOptions[BR_OPTIONS_MAX] = { { { "Limited", "Limitiert", "Limitées" }, { "Full", "Voll", "Pleines" }, - { "Maxed", "Maximum", "Maximum" } + { "Maxed", "Maximum", "Maximum" }, } }, { @@ -61,28 +61,28 @@ BossRushSetting BossRushOptions[BR_OPTIONS_MAX] = { { { "Before Ganondorf", "Vor Ganondorf", "Avant Ganondorf" }, { "Every Boss", "Bei jedem Boss", "Tous les Boss" }, - { "Never", "Niemals", "Jamais" } + { "Never", "Niemals", "Jamais" }, } }, { { "HYPER BOSSES:", "HYPER-BOSSE:", "HYPER BOSS:" }, { { "No", "Nein", "Non" }, - { "Yes", "Ja", "Oui" } + { "Yes", "Ja", "Oui" }, } }, { { "MAGIC:", "MAGIE:", "MAGIE:" }, { { "Single", "Einzel", "Simple" }, - { "Double", "Doppel", "Double" } + { "Double", "Doppel", "Double" }, } }, { { "BIG. SWORD:", "BIG.-SCHWERT:", "EPÉE DE BIG.:" }, { { "No", "Nein", "Non" }, - { "Yes", "Ja", "Oui" } + { "Yes", "Ja", "Oui" }, } }, { @@ -93,35 +93,35 @@ BossRushSetting BossRushOptions[BR_OPTIONS_MAX] = { { "Fairy", "Fee", "Fée" }, { "Red Potion", "Rotes Elixier", "Potion Rouge" }, { "Green Potion", "Grünes Elixier", "Potion Verte" }, - { "Blue Potion", "Blaues Elixier", "Potion Bleue" } + { "Blue Potion", "Blaues Elixier", "Potion Bleue" }, } }, { { "LONGSHOT:", "ENTERHAKEN:", "SUPER GRAPPIN:" }, { { "No", "Nein", "Non" }, - { "Yes", "Ja", "Oui" } + { "Yes", "Ja", "Oui" }, } }, { { "HOVER BOOTS:", "GLEITSTIEFEL:", "BOTTES DES AIRS:" }, { { "No", "Nein", "Non" }, - { "Yes", "Ja", "Oui" } + { "Yes", "Ja", "Oui" }, } }, { { "BUNNY HOOD:", "HASENOHREN:", "MASQUE DU LAPIN:" }, { { "No", "Nein", "Non" }, - { "Yes", "Ja", "Oui" } + { "Yes", "Ja", "Oui" }, } }, { { "TIMER:", "TIMER:", "TIMER:" }, { { "Yes", "Ja", "Oui" }, - { "No", "Nein", "Non" } + { "No", "Nein", "Non" }, } } }; @@ -507,7 +507,7 @@ void BossRush_InitSave() { static void* sSavePromptNoChoiceTexs[] = { (void*)gPauseNoENGTex, (void*)gPauseNoGERTex, - (void*)gPauseNoFRATex + (void*)gPauseNoFRATex, }; void BossRush_OnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_list originalArgs) { diff --git a/soh/soh/Enhancements/boss-rush/BossRushTypes.h b/soh/soh/Enhancements/boss-rush/BossRushTypes.h index cf4d3aaba..973f1599f 100644 --- a/soh/soh/Enhancements/boss-rush/BossRushTypes.h +++ b/soh/soh/Enhancements/boss-rush/BossRushTypes.h @@ -37,28 +37,28 @@ typedef enum { typedef enum { BR_CHOICE_AMMO_LIMITED, BR_CHOICE_AMMO_FULL, - BR_CHOICE_AMMO_MAXED + BR_CHOICE_AMMO_MAXED, } BossRushAmmoChoices; typedef enum { BR_CHOICE_HEAL_GANONDORF, BR_CHOICE_HEAL_EVERYBOSS, - BR_CHOICE_HEAL_NEVER + BR_CHOICE_HEAL_NEVER, } BossRushHealChoices; typedef enum { BR_CHOICE_HYPERBOSSES_NO, - BR_CHOICE_HYPERBOSSES_YES + BR_CHOICE_HYPERBOSSES_YES, } BossRushHyperBossesChoices; typedef enum { BR_CHOICE_MAGIC_SINGLE, - BR_CHOICE_MAGIC_DOUBLE + BR_CHOICE_MAGIC_DOUBLE, } BossRushMagicChoices; typedef enum { BR_CHOICE_BGS_NO, - BR_CHOICE_BGS_YES + BR_CHOICE_BGS_YES, } BossRushBgsChoices; typedef enum { @@ -72,20 +72,20 @@ typedef enum { typedef enum { BR_CHOICE_LONGSHOT_NO, - BR_CHOICE_LONGSHOT_YES + BR_CHOICE_LONGSHOT_YES, } BossRushLongshotChoices; typedef enum { BR_CHOICE_HOVERBOOTS_NO, - BR_CHOICE_HOVERBOOTS_YES + BR_CHOICE_HOVERBOOTS_YES, } BossRushHoverBootsChoices; typedef enum { BR_CHOICE_BUNNYHOOD_NO, - BR_CHOICE_BUNNYHOOD_YES + BR_CHOICE_BUNNYHOOD_YES, } BossRushBunnyHoodChoices; typedef enum { BR_CHOICE_TIMER_YES, - BR_CHOICE_TIMER_NO + BR_CHOICE_TIMER_NO, } BossRushTimerChoices; diff --git a/soh/soh/Enhancements/controls/Mouse.cpp b/soh/soh/Enhancements/controls/Mouse.cpp new file mode 100644 index 000000000..ae3842a1a --- /dev/null +++ b/soh/soh/Enhancements/controls/Mouse.cpp @@ -0,0 +1,153 @@ +#include "Mouse.h" +#include "soh/OTRGlobals.h" +#include "z64player.h" +#include "global.h" +#include +#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h" +#include "soh/ShipInit.hpp" + +static Ship::Coords mouseCoord = {}; +static Ship::Coords mouseCoordRel = {}; + +#define CVAR_ENABLE_MOUSE_NAME CVAR_SETTING("EnableMouse") +#define CVAR_ENABLE_MOUSE_DEFAULT 0 +#define CVAR_ENABLE_MOUSE_VALUE CVarGetInteger(CVAR_ENABLE_MOUSE_NAME, CVAR_ENABLE_MOUSE_DEFAULT) +#define MOUSE_ENABLED (CVAR_ENABLE_MOUSE_VALUE && GetWindow()->IsMouseCaptured()) + +std::shared_ptr GetWindow() { + return OTRGlobals::Instance->context->GetWindow(); +} + +extern "C" { +void Mouse_UpdatePos() { + mouseCoord = GetWindow()->GetMousePos(); +} + +void Mouse_UpdatePosRel() { + mouseCoordRel = GetWindow()->GetMouseDelta(); +} + +void Mouse_UpdateAll() { + Mouse_UpdatePos(); + Mouse_UpdatePosRel(); +} + +void Mouse_HandleThirdPerson(f32* newCamX, f32* newCamY) { + if (MOUSE_ENABLED) { + *newCamX -= mouseCoordRel.x * 40.0f; + *newCamY += mouseCoordRel.y * 40.0f; + } +} + +void Mouse_HandleFirstPerson(Player* player) { + f32 xAxisMulti = CVarGetFloat(CVAR_SETTING("FirstPersonCameraSensitivity.X"), 1.0f); + f32 yAxisMulti = CVarGetFloat(CVAR_SETTING("FirstPersonCameraSensitivity.Y"), 1.0f); + s8 invertXAxisMulti = ((CVarGetInteger(CVAR_SETTING("Controls.InvertAimingXAxis"), 0) + && !CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0)) + || (!CVarGetInteger(CVAR_SETTING("Controls.InvertAimingXAxis"), 0) + && CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0))) ? -1 : 1; + s8 invertYAxisMulti = CVarGetInteger(CVAR_SETTING("Controls.InvertAimingYAxis"), 1) ? 1 : -1; + if (MOUSE_ENABLED) { + player->actor.focus.rot.y -= mouseCoordRel.x * 6.0f * xAxisMulti * invertXAxisMulti; + player->actor.focus.rot.x += mouseCoordRel.y * 6.0f * yAxisMulti * invertYAxisMulti; + } +} + +void Mouse_RecenterCursor() { + u32 width = GetWindow()->GetWidth(); + u32 height = GetWindow()->GetHeight(); + if (MOUSE_ENABLED) { + GetWindow()->SetMousePos({(s32) (width/2), (s32) (height/2)}); + } +} + +void Mouse_HandleShield(f32* sp50, f32* sp54) { + if (MOUSE_ENABLED) { + s32 width = GetWindow()->GetWidth(); + s32 height = GetWindow()->GetHeight(); + f32 xBound = 7200 / ((f32)width / 2); + f32 yBound = 6000 / ((f32)height / 2); + *sp50 += (mouseCoord.x - (width / 2)) * xBound * (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? 1 : -1); + *sp54 += (mouseCoord.y - (height / 2)) * yBound; + *sp50 = CLAMP(*sp50, -7200, 7200); + *sp54 = CLAMP(*sp54, -6000, 6000); + } +} + +static s8 iterMouse = 0; +static f32 mouseQuickspinX[5] = {}; +static f32 mouseQuickspinY[5] = {}; +static u8 quickspinCount = 0; + +void Mouse_UpdateQuickspinCount() { + if (MOUSE_ENABLED) { + quickspinCount = (quickspinCount + 1) % 5; + mouseQuickspinX[quickspinCount] = mouseCoord.x; + mouseQuickspinY[quickspinCount] = mouseCoord.y; + } else { + quickspinCount = 0; + } +} + +bool Mouse_HandleQuickspin(bool* should, s8* iter2, s8* sp3C) { + s8 temp1; + s8 temp2; + s32 i; + if (!MOUSE_ENABLED) { + return *should = false; + } + + for (i = 0; i < 4; i++, iter2++) { + // Calculating angles as per z_lib.c:func_80077D10() + f32 relY = mouseQuickspinY[i + 1] - mouseQuickspinY[i]; + f32 relX = mouseQuickspinX[i + 1] - mouseQuickspinX[i]; + s16 aTan = Math_Atan2S(relY, -relX); + iterMouse = (u16)(aTan + 0x2000) >> 9; // See z_player.c:Player_ProcessControlStick() + if ((*iter2 = iterMouse) < 0) { + return *should = false; + } + *iter2 *= 2; + } + temp1 = sp3C[0] - sp3C[1]; + if (ABS(temp1) < 10) { + return *should = false; + } + iter2 = &sp3C[1]; + for (i = 1; i < 3; i++, iter2++) { + temp2 = *iter2 - *(iter2 + 1); + if ((ABS(temp2) < 10) || (temp2 * temp1 < 0)) { + return *should = false; + } + } + + return *should = true; +} + +// Hook handlers + +void Mouse_RegisterRecenterCursorOnShield() { + COND_HOOK(OnPlayerHoldUpShield, true, Mouse_RecenterCursor); +} + +void Mouse_RegisterHandleFirstPerson() { + COND_HOOK(OnPlayerFirstPersonControl, true, Mouse_HandleFirstPerson); +} + +void Mouse_RegisterHandleShield() { + COND_HOOK(OnPlayerShieldControl, true, Mouse_HandleShield); +} + +void Mouse_RegisterUpdateQuickspinCount() { + COND_HOOK(OnPlayerProcessStick, true, Mouse_UpdateQuickspinCount); +} + +void Mouse_RegisterHandleQuickspin() { + REGISTER_VB_SHOULD(VB_SHOULD_QUICKSPIN, { Mouse_HandleQuickspin(should, va_arg(args, s8*), va_arg(args, s8*)); } ); +} + +static RegisterShipInitFunc initFunc_shieldRecenter(Mouse_RegisterRecenterCursorOnShield, { CVAR_ENABLE_MOUSE_NAME }); +static RegisterShipInitFunc initFunc_firstPerson(Mouse_RegisterHandleFirstPerson, { CVAR_ENABLE_MOUSE_NAME }); +static RegisterShipInitFunc initFunc_quickspinCount(Mouse_RegisterUpdateQuickspinCount, { CVAR_ENABLE_MOUSE_NAME }); +static RegisterShipInitFunc initFunc_quickspin(Mouse_RegisterHandleQuickspin, { CVAR_ENABLE_MOUSE_NAME }); +static RegisterShipInitFunc initFunc_shieldMove(Mouse_RegisterHandleShield, { CVAR_ENABLE_MOUSE_NAME }); +} //extern "C" diff --git a/soh/soh/Enhancements/controls/Mouse.h b/soh/soh/Enhancements/controls/Mouse.h new file mode 100644 index 000000000..38d84e078 --- /dev/null +++ b/soh/soh/Enhancements/controls/Mouse.h @@ -0,0 +1,25 @@ +#ifndef MOUSE_H +#define MOUSE_H + +#pragma once + +#include + +struct Player; + +#ifdef __cplusplus +extern "C" { +#endif +void Mouse_UpdateAll(); +void Mouse_RecenterCursor(); +void Mouse_HandleThirdPerson(f32* newCamX, f32* newCamY); +void Mouse_HandleFirstPerson(struct Player* player); +void Mouse_HandleShield(f32* sp50, f32* sp54); +bool Mouse_HandleQuickspin(bool* should, s8* iter2, s8* sp3C); +void Mouse_UpdateQuickspinCount(); +#ifdef __cplusplus +}; //extern "C" +#endif + +//MOUSE_H +#endif diff --git a/soh/soh/Enhancements/controls/SohInputEditorWindow.cpp b/soh/soh/Enhancements/controls/SohInputEditorWindow.cpp index 7dbc74a75..dcef762cf 100644 --- a/soh/soh/Enhancements/controls/SohInputEditorWindow.cpp +++ b/soh/soh/Enhancements/controls/SohInputEditorWindow.cpp @@ -172,8 +172,8 @@ void SohInputEditorWindow::DrawAnalogPreview(const char* label, ImVec2 stick, fl #define BUTTON_COLOR_KEYBOARD_BEIGE ImVec4(0.651f, 0.482f, 0.357f, 0.5f) #define BUTTON_COLOR_KEYBOARD_BEIGE_HOVERED ImVec4(0.651f, 0.482f, 0.357f, 1.0f) -#define BUTTON_COLOR_MOUSE_BEIGE ImVec4(0.5f, 0.5f, 0.5f, 0.5f) -#define BUTTON_COLOR_MOUSE_BEIGE_HOVERED ImVec4(0.5f, 0.5f, 0.5f, 1.0f) +#define BUTTON_COLOR_MOUSE_GRAY ImVec4(0.5f, 0.5f, 0.5f, 0.5f) +#define BUTTON_COLOR_MOUSE_GRAY_HOVERED ImVec4(0.5f, 0.5f, 0.5f, 1.0f) #define BUTTON_COLOR_GAMEPAD_BLUE ImVec4(0.0f, 0.255f, 0.976f, 0.5f) #define BUTTON_COLOR_GAMEPAD_BLUE_HOVERED ImVec4(0.0f, 0.255f, 0.976f, 1.0f) @@ -198,8 +198,8 @@ void SohInputEditorWindow::GetButtonColorsForDeviceType(Ship::PhysicalDeviceType buttonHoveredColor = BUTTON_COLOR_KEYBOARD_BEIGE_HOVERED; break; case Ship::PhysicalDeviceType::Mouse: - buttonColor = BUTTON_COLOR_MOUSE_BEIGE; - buttonHoveredColor = BUTTON_COLOR_MOUSE_BEIGE_HOVERED; + buttonColor = BUTTON_COLOR_MOUSE_GRAY; + buttonHoveredColor = BUTTON_COLOR_MOUSE_GRAY_HOVERED; break; case Ship::PhysicalDeviceType::SDLGamepad: buttonColor = BUTTON_COLOR_GAMEPAD_BLUE; @@ -265,6 +265,7 @@ void SohInputEditorWindow::DrawButtonLineEditMappingButton(uint8_t port, N64Butt icon = ICON_FA_GAMEPAD; break; case MAPPING_TYPE_KEYBOARD: + case MAPPING_TYPE_MOUSE: icon = ICON_FA_KEYBOARD_O; break; case MAPPING_TYPE_UNKNOWN: @@ -1343,6 +1344,9 @@ void SohInputEditorWindow::DrawOcarinaControlPanel() { void SohInputEditorWindow::DrawCameraControlPanel() { ImVec2 cursor = ImGui::GetCursorPos(); ImGui::SetCursorPos(ImVec2(cursor.x + 5, cursor.y + 5)); + CVarCheckbox("Enable Mouse Controls", CVAR_SETTING("EnableMouse"), CheckboxOptions().Color(THEME_COLOR) + .Tooltip("Allows for using the mouse to control the camera (must enable Free Look), " + "aim with the shield, and perform quickspin attacks (quickly rotate the mouse then press B)")); Ship::GuiWindow::BeginGroupPanel("Aiming/First-Person Camera", ImGui::GetContentRegionAvail()); CVarCheckbox("Right Stick Aiming", CVAR_SETTING("Controls.RightStickAim"), CheckboxOptions().Color(THEME_COLOR) .Tooltip("Allows for aiming with the right stick in:\n-First-Person/C-Up view\n-Weapon Aiming")); diff --git a/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp b/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp index ddd36fa56..f4a41f587 100644 --- a/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp +++ b/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp @@ -119,6 +119,7 @@ Color_RGBA8 ColorRGBA8(uint8_t r, uint8_t g, uint8_t b, uint8_t a) { supportsAlpha, supportsRainbow, advancedOption \ } } +// clang-format off /* So, you would like to add a new cosmetic option? BUCKLE UP @@ -439,6 +440,7 @@ static std::map cosmeticOptions = { COSMETIC_OPTION("NPC.MetalTrap", "Metal Trap", COSMETICS_GROUP_NPC, ColorRGBA8(255, 255, 255, 255), false, true, true), COSMETIC_OPTION("NPC.IronKnuckles", "Iron Knuckles", COSMETICS_GROUP_NPC, ColorRGBA8(245, 255, 205, 255), false, true, false), }; +// clang-format on static const char* MarginCvarList[] { CVAR_COSMETIC("HUD.Hearts"), @@ -461,7 +463,7 @@ static const char* MarginCvarList[] { CVAR_COSMETIC("HUD.ArcheryScore"), CVAR_COSMETIC("HUD.TitleCard.Map"), CVAR_COSMETIC("HUD.TitleCard.Boss"), - CVAR_COSMETIC("HUD.IGT") + CVAR_COSMETIC("HUD.IGT"), }; static const char* MarginCvarNonAnchor[] { @@ -469,7 +471,7 @@ static const char* MarginCvarNonAnchor[] { CVAR_COSMETIC("HUD.Timers"), CVAR_COSMETIC("HUD.ArcheryScore"), CVAR_COSMETIC("HUD.TitleCard.Map"), - CVAR_COSMETIC("HUD.TitleCard.Boss") + CVAR_COSMETIC("HUD.TitleCard.Boss"), }; void SetMarginAll(const char* ButtonName, bool SetActivated, const char* tooltip) { diff --git a/soh/soh/Enhancements/cosmetics/CosmeticsEditor.h b/soh/soh/Enhancements/cosmetics/CosmeticsEditor.h index 9c3dd76ba..a0a836ce3 100644 --- a/soh/soh/Enhancements/cosmetics/CosmeticsEditor.h +++ b/soh/soh/Enhancements/cosmetics/CosmeticsEditor.h @@ -25,7 +25,7 @@ typedef enum { COSMETICS_GROUP_NAVI, COSMETICS_GROUP_IVAN, COSMETICS_GROUP_MESSAGE, - COSMETICS_GROUP_MAX + COSMETICS_GROUP_MAX, } CosmeticGroup; #ifdef __cplusplus diff --git a/soh/soh/Enhancements/cosmetics/authenticGfxPatches.cpp b/soh/soh/Enhancements/cosmetics/authenticGfxPatches.cpp index 75f6bd35d..0738ff6da 100644 --- a/soh/soh/Enhancements/cosmetics/authenticGfxPatches.cpp +++ b/soh/soh/Enhancements/cosmetics/authenticGfxPatches.cpp @@ -18,7 +18,7 @@ typedef struct { int startInstruction; } DListPatchInfo; -static DListPatchInfo freezardEffectDListPatchInfos[] = { +static DListPatchInfo freezardBodyDListPatchInfos[] = { { gFreezardIntactDL, 5 }, { gFreezardTopRightHornChippedDL, 5 }, { gFreezardHeadChippedDL, 5 }, @@ -65,78 +65,156 @@ static DListPatchInfo ironKnuckleDListPatchInfos[] = { { object_ik_DL_01D638, 110 }, }; +static DListPatchInfo arrowTipDListPatchInfos[] = { + { gArrowNearDL, 46 }, + { gArrowFarDL, 5 }, +}; + +void PatchArrowTipTexture() { + // Custom texture for Arrow tips that accounts for overflow texture reading + Gfx arrowTipTextureWithOverflowFixGfx = + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, gHilite2Tex_Overflow); + + // Gfx instructions to fix authentic vanilla bug where the Arrow tips texture is read as the wrong size + Gfx arrowTipTextureWithSizeFixGfx[] = { + gsDPLoadTextureBlock(gHilite2Tex, G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 16, 0, G_TX_MIRROR | G_TX_WRAP, + G_TX_MIRROR | G_TX_WRAP, 5, 5, 1, 1), + }; + + bool fixTexturesOOB = CVarGetInteger(CVAR_ENHANCEMENT("FixTexturesOOB"), 0); + + for (const auto& patchInfo : arrowTipDListPatchInfos) { + const char* dlist = patchInfo.dlist; + int start = patchInfo.startInstruction; + + // Patch using custom overflowed texture + if (!fixTexturesOOB) { + // Unpatch the other texture fix + for (size_t i = 4; i < 8; i++) { + int instruction = start + i; + std::string unpatchName = "arrowTipTextureWithSizeFix_" + std::to_string(instruction); + ResourceMgr_UnpatchGfxByName(dlist, unpatchName.c_str()); + } + + std::string patchName = "arrowTipTextureWithOverflowFix_" + std::to_string(start); + std::string patchName2 = "arrowTipTextureWithOverflowFix_" + std::to_string(start + 1); + ResourceMgr_PatchGfxByName(dlist, patchName.c_str(), start, arrowTipTextureWithOverflowFixGfx); + ResourceMgr_PatchGfxByName(dlist, patchName2.c_str(), start + 1, gsSPNoOp()); + } else { // Patch texture to use correct image size/fmt + // Unpatch the other texture fix + std::string unpatchName = "arrowTipTextureWithOverflowFix_" + std::to_string(start); + std::string unpatchName2 = "arrowTipTextureWithOverflowFix_" + std::to_string(start + 1); + ResourceMgr_UnpatchGfxByName(dlist, unpatchName.c_str()); + ResourceMgr_UnpatchGfxByName(dlist, unpatchName2.c_str()); + + for (size_t i = 4; i < 8; i++) { + int instruction = start + i; + std::string patchName = "arrowTipTextureWithSizeFix_" + std::to_string(instruction); + + if (i == 0) { + ResourceMgr_PatchGfxByName(dlist, patchName.c_str(), instruction, gsSPNoOp()); + } else { + ResourceMgr_PatchGfxByName(dlist, patchName.c_str(), instruction, + arrowTipTextureWithSizeFixGfx[i - 1]); + } + } + } + } +} + void PatchDekuStickTextureOverflow() { // Custom texture for holding Deku Stick that accounts for overflow texture reading - Gfx gDekuStickOverflowTexFix = gsDPSetTextureImage(G_IM_FMT_I, G_IM_SIZ_8b, 1, gDekuStickOverflowTex); + Gfx dekuSticTexkWithOverflowFixGfx = gsDPSetTextureImage(G_IM_FMT_I, G_IM_SIZ_8b, 1, gDekuStickOverflowTex); // Gfx instructions to fix authentic vanilla bug where the Deku Stick texture is read as the wrong size - Gfx gDekuStickTexFix[] = { + Gfx dekuStickTexWithSizeFixGfx[] = { gsDPLoadTextureBlock(gDekuStickTex, G_IM_FMT_I, G_IM_SIZ_8b, 8, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, - G_TX_NOMIRROR | G_TX_WRAP, 4, 4, G_TX_NOLOD, G_TX_NOLOD) + G_TX_NOMIRROR | G_TX_WRAP, 4, 4, G_TX_NOLOD, G_TX_NOLOD), }; const char* dlist = gLinkChildLinkDekuStickDL; int start = 5; + // Patch using custom overflowed texture if (!CVarGetInteger(CVAR_ENHANCEMENT("FixTexturesOOB"), 0)) { // Unpatch the other texture fix - for (size_t i = 0; i < 7; i++) { - int instruction = start + (i == 0 ? 0 : i + 1); - std::string unpatchName = "DekuStickFix" + std::to_string(instruction); + for (size_t i = 0; i < 8; i++) { + int instruction = start + i; + std::string unpatchName = "dekuStickWithSizeFix_" + std::to_string(instruction); ResourceMgr_UnpatchGfxByName(dlist, unpatchName.c_str()); } - std::string patchName = "DekuStickOverflow" + std::to_string(start); - ResourceMgr_PatchGfxByName(dlist, patchName.c_str(), start, gDekuStickOverflowTexFix); - } else { + std::string patchName = "dekuStickWithOverflowFix_" + std::to_string(start); + std::string patchName2 = "dekuStickWithOverflowFix_" + std::to_string(start + 1); + ResourceMgr_PatchGfxByName(dlist, patchName.c_str(), start, dekuSticTexkWithOverflowFixGfx); + ResourceMgr_PatchGfxByName(dlist, patchName2.c_str(), start + 1, gsSPNoOp()); + } else { // Patch texture to use correct image size/fmt // Unpatch the other texture fix - std::string unpatchName = "DekuStickOverflow" + std::to_string(start); + std::string unpatchName = "dekuStickWithOverflowFix_" + std::to_string(start); + std::string unpatchName2 = "dekuStickWithOverflowFix_" + std::to_string(start + 1); ResourceMgr_UnpatchGfxByName(dlist, unpatchName.c_str()); - - for (size_t i = 0; i < 7; i++) { - int instruction = start + (i == 0 ? 0 : i + 1); - std::string patchName = "DekuStickFix" + std::to_string(instruction); - ResourceMgr_PatchGfxByName(dlist, patchName.c_str(), instruction, gDekuStickTexFix[i]); + ResourceMgr_UnpatchGfxByName(dlist, unpatchName2.c_str()); + + for (size_t i = 0; i < 8; i++) { + int instruction = start + i; + std::string patchName = "dekuStickWithSizeFix_" + std::to_string(instruction); + + if (i == 0) { + ResourceMgr_PatchGfxByName(dlist, patchName.c_str(), instruction, gsSPNoOp()); + } else { + ResourceMgr_PatchGfxByName(dlist, patchName.c_str(), instruction, dekuStickTexWithSizeFixGfx[i - 1]); + } } } } void PatchFreezardTextureOverflow() { // Custom texture for Freezard effect that accounts for overflow texture reading - Gfx gEffUnknown12OverflowTextFix = gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_16b, 1, gEffUnknown12OverflowTex); + Gfx freezardBodyTextureWithOverflowFixGfx = + gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_16b, 1, gEffUnknown12OverflowTex); // Gfx instructions to fix authentic vanilla bug where the Freezard effect texture is read as the wrong format - Gfx gEffUnknown12TexFix[] = { - gsDPLoadTextureBlock(gEffUnknown12Tex, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0, G_TX_NOMIRROR | - G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD) + Gfx freezardBodyTextureWithFormatFixGfx[] = { + gsDPLoadTextureBlock(gEffUnknown12Tex, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP, + G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD), }; - for (const auto& patchInfo : freezardEffectDListPatchInfos) { + bool fixTexturesOOB = CVarGetInteger(CVAR_ENHANCEMENT("FixTexturesOOB"), 0); + + for (const auto& patchInfo : freezardBodyDListPatchInfos) { const char* dlist = patchInfo.dlist; int start = patchInfo.startInstruction; - char patchNameBuf[24]; - // Patch using custom overflowed texture - if (!CVarGetInteger(CVAR_ENHANCEMENT("FixTexturesOOB"), 0)) { + if (!fixTexturesOOB) { // Unpatch the other texture fix - for (size_t i = 0; i < 7; i++) { - int instruction = start + (i == 0 ? 0 : i + 1); - std::string unpatchName = "gEffUnknown12Fix" + std::to_string(instruction); + for (size_t i = 0; i < 8; i++) { + int instruction = start + i; + std::string unpatchName = "freezardBodyTextureWithFormatFix_" + std::to_string(instruction); ResourceMgr_UnpatchGfxByName(dlist, unpatchName.c_str()); } - std::string patchName = "gEffUnknown12Overflow" + std::to_string(start); - ResourceMgr_PatchGfxByName(dlist, patchName.c_str(), start, gEffUnknown12OverflowTextFix); - } else { // Patch texture to use correct image size + std::string patchName = "freezardBodyTextureWithOverflowFix_" + std::to_string(start); + std::string patchName2 = "freezardBodyTextureWithOverflowFix_" + std::to_string(start + 1); + ResourceMgr_PatchGfxByName(dlist, patchName.c_str(), start, freezardBodyTextureWithOverflowFixGfx); + ResourceMgr_PatchGfxByName(dlist, patchName2.c_str(), start + 1, gsSPNoOp()); + } else { // Patch texture to use correct image size/fmt // Unpatch the other texture fix - std::string unpatchName = "gEffUnknown12Overflow" + std::to_string(start); + std::string unpatchName = "freezardBodyTextureWithOverflowFix_" + std::to_string(start); + std::string unpatchName2 = "freezardBodyTextureWithOverflowFix_" + std::to_string(start + 1); ResourceMgr_UnpatchGfxByName(dlist, unpatchName.c_str()); + ResourceMgr_UnpatchGfxByName(dlist, unpatchName2.c_str()); - for (size_t i = 0; i < 7; i++) { - int instruction = start + (i == 0 ? 0 : i + 1); - std::string patchName = "gEffUnknown12Fix" + std::to_string(instruction); - ResourceMgr_PatchGfxByName(dlist, patchName.c_str(), instruction, gEffUnknown12TexFix[i]); + for (size_t i = 0; i < 8; i++) { + int instruction = start + i; + std::string patchName = "freezardBodyTextureWithFormatFix_" + std::to_string(instruction); + + if (i == 0) { + ResourceMgr_PatchGfxByName(dlist, patchName.c_str(), instruction, gsSPNoOp()); + } else { + ResourceMgr_PatchGfxByName(dlist, patchName.c_str(), instruction, + freezardBodyTextureWithFormatFixGfx[i - 1]); + } } } } @@ -144,48 +222,58 @@ void PatchFreezardTextureOverflow() { void PatchIronKnuckleTextureOverflow() { // Custom texture for Iron Knuckle that accounts for overflow texture reading - Gfx gIronKnuckleMetalOverflowTexFix = gsDPSetTextureImage(G_IM_FMT_I, G_IM_SIZ_8b, 1, gIronKnuckleMetalOverflowTex); + Gfx ironKnuckleFireTexWithOverflowFixGfx = + gsDPSetTextureImage(G_IM_FMT_I, G_IM_SIZ_8b, 1, gIronKnuckleMetalOverflowTex); // Gfx instructions to fix authentic vanilla bug where the Iron Knuckle texture is read as the wrong format - Gfx gIronKnuckleMetalTexFix[] = { - gsDPLoadTextureBlock(gIronKnuckleMetalTex, G_IM_FMT_I, G_IM_SIZ_4b, 32, 64, 0, G_TX_MIRROR | G_TX_WRAP, - G_TX_MIRROR | G_TX_WRAP, 5, 6, G_TX_NOLOD, G_TX_NOLOD) + Gfx ironKnuckleFireTexWithFormatFixGfx[] = { + gsDPLoadTextureBlock_4b(gIronKnuckleMetalTex, G_IM_FMT_I, 32, 64, 0, G_TX_MIRROR | G_TX_WRAP, + G_TX_MIRROR | G_TX_WRAP, 5, 6, G_TX_NOLOD, G_TX_NOLOD), }; + bool fixTexturesOOB = CVarGetInteger(CVAR_ENHANCEMENT("FixTexturesOOB"), 0); + for (const auto& patchInfo : ironKnuckleDListPatchInfos) { const char* dlist = patchInfo.dlist; int start = patchInfo.startInstruction; - // OTRTODO: Patching to use the correct size format for Iron Knuckle causes a tile size failure - // Until this is solved, Iron Knuckle will be hardcoded to always display with the "authentic" texture fix - // Patch using custom overflowed texture - // if (!CVarGetInteger(CVAR_ENHANCEMENT("FixTexturesOOB"), 0)) { + if (!fixTexturesOOB) { // Unpatch the other texture fix - for (size_t i = 0; i < 7; i++) { - int instruction = start + (i == 0 ? 0 : i + 1); - std::string unpatchName = "MetalTexFix" + std::to_string(instruction); + for (size_t i = 0; i < 8; i++) { + int instruction = start + i; + std::string unpatchName = "ironKnuckleFireTexWithSizeFix_" + std::to_string(instruction); ResourceMgr_UnpatchGfxByName(dlist, unpatchName.c_str()); } - std::string patchName = "MetalTexOverflow" + std::to_string(start); - ResourceMgr_PatchGfxByName(dlist, patchName.c_str(), start, gIronKnuckleMetalOverflowTexFix); - // } else { // Patch texture to use correct image size - // // Unpatch the other texture fix - // std::string unpatchName = "MetalTexOverflow" + std::to_string(start); - // ResourceMgr_UnpatchGfxByName(dlist, unpatchName.c_str()); + std::string patchName = "ironKnuckleFireTexWithOverflowFix_" + std::to_string(start); + std::string patchName2 = "ironKnuckleFireTexWithOverflowFix_" + std::to_string(start + 1); + ResourceMgr_PatchGfxByName(dlist, patchName.c_str(), start, ironKnuckleFireTexWithOverflowFixGfx); + ResourceMgr_PatchGfxByName(dlist, patchName2.c_str(), start + 1, ironKnuckleFireTexWithOverflowFixGfx); + } else { // Patch texture to use correct image size/fmt + // Unpatch the other texture fix + std::string unpatchName = "ironKnuckleFireTexWithOverflowFix_" + std::to_string(start); + std::string unpatchName2 = "ironKnuckleFireTexWithOverflowFix_" + std::to_string(start + 1); + ResourceMgr_UnpatchGfxByName(dlist, unpatchName.c_str()); + ResourceMgr_UnpatchGfxByName(dlist, unpatchName2.c_str()); - // // Patch texture to use correct image size - // for (size_t i = 0; i < 7; i++) { - // int instruction = start + (i == 0 ? 0 : i + 1); - // std::string patchName = "MetalTexFix" + std::to_string(instruction); - // ResourceMgr_PatchGfxByName(dlist, patchName.c_str(), instruction, gIronKnuckleMetalTexFix[i]); - // } - // } + for (size_t i = 0; i < 8; i++) { + int instruction = start + i; + std::string patchName = "ironKnuckleFireTexWithSizeFix_" + std::to_string(instruction); + + if (i == 0) { + ResourceMgr_PatchGfxByName(dlist, patchName.c_str(), instruction, gsSPNoOp()); + } else { + ResourceMgr_PatchGfxByName(dlist, patchName.c_str(), instruction, + ironKnuckleFireTexWithFormatFixGfx[i - 1]); + } + } + } } } void ApplyAuthenticGfxPatches() { + PatchArrowTipTexture(); PatchDekuStickTextureOverflow(); PatchFreezardTextureOverflow(); PatchIronKnuckleTextureOverflow(); diff --git a/soh/soh/Enhancements/cosmetics/cosmeticsTypes.h b/soh/soh/Enhancements/cosmetics/cosmeticsTypes.h index 7fc454117..0b7eed3e8 100644 --- a/soh/soh/Enhancements/cosmetics/cosmeticsTypes.h +++ b/soh/soh/Enhancements/cosmetics/cosmeticsTypes.h @@ -1,6 +1,6 @@ typedef enum { COLORSCHEME_N64, - COLORSCHEME_GAMECUBE + COLORSCHEME_GAMECUBE, } DefaultColorScheme; typedef enum { @@ -15,5 +15,5 @@ typedef enum { ANCHOR_RIGHT, ANCHOR_NONE, HIDDEN, - ANCHOR_TO_LIFE_METER + ANCHOR_TO_LIFE_METER, } PosType; diff --git a/soh/soh/Enhancements/custom-message/CustomMessageManager.cpp b/soh/soh/Enhancements/custom-message/CustomMessageManager.cpp index 4d4d27b3f..a199c8a00 100644 --- a/soh/soh/Enhancements/custom-message/CustomMessageManager.cpp +++ b/soh/soh/Enhancements/custom-message/CustomMessageManager.cpp @@ -18,11 +18,11 @@ static const std::unordered_map textBoxSpecialCharacters = { }; static const std::unordered_map percentColors = { { "w", QM_WHITE }, { "r", QM_RED }, { "g", QM_GREEN }, { "b", QM_BLUE }, { "c", QM_LBLUE }, { "p", QM_PINK }, - { "y", QM_YELLOW }, { "B", QM_BLACK } }; + { "y", QM_YELLOW }, { "B", QM_BLACK }, }; static const std::unordered_map colorToPercent = { { QM_WHITE, "%w" }, { QM_RED, "%r"}, { QM_GREEN, "%g" }, { QM_BLUE, "%b" }, { QM_LBLUE, "%c"}, { QM_PINK, "%p" }, - { QM_YELLOW, "%y" }, { QM_BLACK, "%B" } }; + { QM_YELLOW, "%y" }, { QM_BLACK, "%B" }, }; static const std::unordered_map altarIcons = { { "0", ITEM_KOKIRI_EMERALD }, @@ -44,7 +44,7 @@ static const std::unordered_map altarIcons = { { "m", ITEM_DUNGEON_MAP }, { "C", ITEM_COMPASS }, { "s", ITEM_SKULL_TOKEN }, - { "g", ITEM_MASK_GORON } + { "g", ITEM_MASK_GORON }, }; static std::map pixelWidthTable = { @@ -72,7 +72,7 @@ static std::map pixelWidthTable = { { "í", 5 }, { "î", 5 }, { "ï", 5 }, { "ð", 7 }, { "ñ", 7 }, { "ò", 7 }, { "ó", 7 }, { "ô", 7 }, { "õ", 7 }, { "ö", 7 }, { "÷", 11 }, { "ø", 9 }, { "ù", 7 }, { "ú", 7 }, { "û", 7 }, { "ü", 7 }, { "ý", 8 }, { "þ", 8 }, { "ÿ", 8 }, { "Œ", 11 }, { "œ", 11 }, { "„", 5 }, { "”", 5 }, { "€", 10 }, - { "Ÿ", 10 }, { "~", 8 } + { "Ÿ", 10 }, { "~", 8 }, }; CustomMessage::CustomMessage(std::string english_, std::string german_, std::string french_, TextBoxType type_, @@ -114,6 +114,44 @@ CustomMessage::CustomMessage(Text text, TextBoxType type_,TextBoxPosition positi messages[LANGUAGE_FRA] = text.GetFrench(); } +typedef struct { + u16 textId; + u8 typePos; + const char* segment; + u32 msgSize; +} MessageTableEntry; + +extern "C" MessageTableEntry* sNesMessageEntryTablePtr; +extern "C" MessageTableEntry* sGerMessageEntryTablePtr; +extern "C" MessageTableEntry* sFraMessageEntryTablePtr; + +CustomMessage CustomMessage::LoadVanillaMessageTableEntry(uint16_t textId) { + const char* foundSeg; + const char* nextSeg; + MessageTableEntry* msgEntry = sNesMessageEntryTablePtr; + u16 bufferId = textId; + CustomMessage msg; + if (gSaveContext.language == LANGUAGE_GER) { + msgEntry = sGerMessageEntryTablePtr; + } else if (gSaveContext.language == LANGUAGE_FRA) { + msgEntry = sFraMessageEntryTablePtr; + } + while (msgEntry->textId != 0xFFFF) { + if (msgEntry->textId == bufferId) { + TextBoxPosition position = static_cast(msgEntry->typePos & 0xF); + TextBoxType type = static_cast(msgEntry->typePos >> 4); + // uint8_t icon = msgEntry->segment[1]; + std::string message = std::string(msgEntry->segment , msgEntry->msgSize); + msg = CustomMessage(message, type, position); + // msg.Format(static_cast(icon)); + return msg; + } + msgEntry++; + } + return CustomMessage(); +} + + const std::string CustomMessage::GetEnglish(MessageFormat format) const { return GetForLanguage(LANGUAGE_ENG, format); } diff --git a/soh/soh/Enhancements/custom-message/CustomMessageManager.h b/soh/soh/Enhancements/custom-message/CustomMessageManager.h index e8a969064..0720d8ac4 100644 --- a/soh/soh/Enhancements/custom-message/CustomMessageManager.h +++ b/soh/soh/Enhancements/custom-message/CustomMessageManager.h @@ -47,6 +47,8 @@ class CustomMessage { CustomMessage(std::string english_, std::vector colors_, std::vector capital_ = {}, TextBoxType type_ = TEXTBOX_TYPE_BLACK, TextBoxPosition position_ = TEXTBOX_POS_BOTTOM); CustomMessage(Text text, TextBoxType type_ = TEXTBOX_TYPE_BLACK, TextBoxPosition position_ = TEXTBOX_POS_BOTTOM); + static CustomMessage LoadVanillaMessageTableEntry(uint16_t textId); + static std::string MESSAGE_END() ; static std::string ITEM_OBTAINED(uint8_t x) ; static std::string NEWLINE() ; diff --git a/soh/soh/Enhancements/debugger/MessageViewer.cpp b/soh/soh/Enhancements/debugger/MessageViewer.cpp index aabe9ad61..ebdb22971 100644 --- a/soh/soh/Enhancements/debugger/MessageViewer.cpp +++ b/soh/soh/Enhancements/debugger/MessageViewer.cpp @@ -181,7 +181,7 @@ static const char* msgStaticTbl[] = gFadingMessageBackgroundTex, gMessageContinueTriangleTex, gMessageEndSquareTex, - gMessageArrowTex + gMessageArrowTex, }; void MessageDebug_StartTextBox(const char* tableId, uint16_t textId, uint8_t language) { diff --git a/soh/soh/Enhancements/debugger/actorViewer.cpp b/soh/soh/Enhancements/debugger/actorViewer.cpp index 767ff2723..5d5b7a0d2 100644 --- a/soh/soh/Enhancements/debugger/actorViewer.cpp +++ b/soh/soh/Enhancements/debugger/actorViewer.cpp @@ -42,7 +42,7 @@ typedef enum { LIST, TARGET, HELD, - INTERACT + INTERACT, } RetrievalMethod; std::array acMapping = { @@ -230,7 +230,7 @@ static std::vector noParamsActors = { ACTOR_UNSET_15D, ACTOR_UNSET_161, ACTOR_UNSET_180, - ACTOR_UNSET_1AA + ACTOR_UNSET_1AA, }; static std::unordered_map> actorSpecificData; @@ -402,7 +402,7 @@ void CreateActorSpecificData() { "Zora Tunic", "Goron Tunic", "Bombs (Special)", - "Bombchus" + "Bombchus", }; int selectedItem = params & 0xFF; @@ -439,7 +439,7 @@ void CreateActorSpecificData() { "Zora Tunic", "Goron Tunic", "Bombs (Special)", - "Bombchus" + "Bombchus", }; int selectedItem = params & 0xFF; @@ -519,7 +519,7 @@ void CreateActorSpecificData() { "Bombs (5) (35 Rupees)", "Red Potion (40 Rupees)", "Red Potion (50 Rupees)", - "Randomizer Item" + "Randomizer Item", }; int selectedItem = params; if (ImGui::Combo("Type", &selectedItem, items, IM_ARRAYSIZE(items))) { @@ -537,7 +537,7 @@ void CreateActorSpecificData() { "Spawned Falling (2)", //"INVALID", "Ceiling Spot Spawner", - "On Floor" + "On Floor", }; int selectedItem = params > 3 ? params - 1 : params; if (ImGui::Combo("Type", &selectedItem, items, IM_ARRAYSIZE(items))) { @@ -568,7 +568,7 @@ void CreateActorSpecificData() { "Magic Fire", "Magic Wind", "Magic Dark", - "Bullet Bag" + "Bullet Bag", }; int selectedItem = params; if (ImGui::Combo("Type", &selectedItem, items, IM_ARRAYSIZE(items))) { @@ -587,7 +587,7 @@ void CreateActorSpecificData() { "Spawner", "Revive Death", "Heal", - "Heal Big" + "Heal Big", }; int selectedItem = params; if (ImGui::Combo("Type", &selectedItem, items, IM_ARRAYSIZE(items))) { @@ -601,7 +601,7 @@ void CreateActorSpecificData() { static const char* items[] = { "Cutscene", //0 "Normal", //1 - "Laser" //100 + "Laser", //100 }; int selectedItem = params == 100 ? 2 : params; if (ImGui::Combo("Type", &selectedItem, items, IM_ARRAYSIZE(items))) { @@ -647,7 +647,7 @@ void CreateActorSpecificData() { "UNK 7", "Orange", "Green", - "Red" + "Red", }; int selectedItem = params + 2; if (ImGui::Combo("Type", &selectedItem, items, IM_ARRAYSIZE(items))) { @@ -716,7 +716,7 @@ void CreateActorSpecificData() { "Switch Flag Fall Small", "9", "10", - "Switch Flag Big" + "Switch Flag Big", }; int type = (params >> 12) & 0xF; diff --git a/soh/soh/Enhancements/debugger/debugSaveEditor.h b/soh/soh/Enhancements/debugger/debugSaveEditor.h index 554a90b2a..b99931a6e 100644 --- a/soh/soh/Enhancements/debugger/debugSaveEditor.h +++ b/soh/soh/Enhancements/debugger/debugSaveEditor.h @@ -1659,7 +1659,7 @@ const std::vector state1 = { "In Item Cutscene", "In Cutscene", "30", //Unknown - "Floor collision disabled" + "Floor collision disabled", }; const std::vector state2 = { @@ -1694,7 +1694,7 @@ const std::vector state2 = { "Idling", "Disabled draw func", "Sword Lunge", - "Void out" + "Void out", }; const std::vector state3 = { @@ -1705,7 +1705,7 @@ const std::vector state3 = { "Check Floor Water Collision", "Force Pull Ocarina", "Restore Nayru's Love", - "Travelling to Hook Target" + "Travelling to Hook Target", }; class SaveEditorWindow : public Ship::GuiWindow { diff --git a/soh/soh/Enhancements/debugger/valueViewer.cpp b/soh/soh/Enhancements/debugger/valueViewer.cpp index 23ce4e26c..c0ac04739 100644 --- a/soh/soh/Enhancements/debugger/valueViewer.cpp +++ b/soh/soh/Enhancements/debugger/valueViewer.cpp @@ -22,6 +22,7 @@ s32 GfxPrint_Printf(GfxPrint* printer, const char* fmt, ...); ImVec4 WHITE = ImVec4(1.0f, 1.0f, 1.0f, 1.0f); +// clang-format off std::vector valueTable = { { "Time", "gSaveContext.dayTime", "TIME:", TYPE_U16, false, []() -> void* { return &gSaveContext.dayTime; }, WHITE }, { "Age", "gSaveContext.linkAge", "AGE:", TYPE_S32, false, []() -> void* { return &gSaveContext.linkAge; }, WHITE }, @@ -71,6 +72,7 @@ std::vector valueTable = { "Deku Tree Warp Timer" u16 0x801F83A2 */ }; +// clang-format on extern "C" void ValueViewer_Draw(GfxPrint* printer) { for (int i = 0; i < valueTable.size(); i++) { diff --git a/soh/soh/Enhancements/enhancementTypes.h b/soh/soh/Enhancements/enhancementTypes.h index 14228054b..a7745192a 100644 --- a/soh/soh/Enhancements/enhancementTypes.h +++ b/soh/soh/Enhancements/enhancementTypes.h @@ -11,14 +11,14 @@ typedef enum { CSMC_DISABLED, CSMC_BOTH, CSMC_TEXTURE, - CSMC_SIZE + CSMC_SIZE, } ChestStyleMatchesContentsType; typedef enum { SGIA_DISABLED, SGIA_JUNK, SGIA_ALL, - SGIA_SIZE + SGIA_SIZE, } SkipGetItemAnimationType; typedef enum { @@ -30,8 +30,8 @@ typedef enum { typedef enum { BUNNY_HOOD_VANILLA, + BUNNY_HOOD_FAST, BUNNY_HOOD_FAST_AND_JUMP, - BUNNY_HOOD_FAST } BunnyHoodMode; typedef enum { @@ -55,7 +55,7 @@ typedef enum { typedef enum { BOOTSEQUENCE_DEFAULT, BOOTSEQUENCE_AUTHENTIC, - BOOTSEQUENCE_FILESELECT + BOOTSEQUENCE_FILESELECT, } BootSequenceType; typedef enum { diff --git a/soh/soh/Enhancements/game-interactor/GameInteractor_HookTable.h b/soh/soh/Enhancements/game-interactor/GameInteractor_HookTable.h index 3bd2ef36e..59d511941 100644 --- a/soh/soh/Enhancements/game-interactor/GameInteractor_HookTable.h +++ b/soh/soh/Enhancements/game-interactor/GameInteractor_HookTable.h @@ -33,6 +33,10 @@ DEFINE_HOOK(OnTimestamp, (u8 item)); DEFINE_HOOK(OnPlayerBonk, ()); DEFINE_HOOK(OnPlayerHealthChange, (int16_t amount)); DEFINE_HOOK(OnPlayerBottleUpdate, (int16_t contents)); +DEFINE_HOOK(OnPlayerHoldUpShield, ()); +DEFINE_HOOK(OnPlayerFirstPersonControl, (Player* player)); +DEFINE_HOOK(OnPlayerProcessStick, ()); +DEFINE_HOOK(OnPlayerShieldControl, (float_t* sp50, float_t* sp54)); DEFINE_HOOK(OnPlayDestroy, ()); DEFINE_HOOK(OnPlayDrawEnd, ()); DEFINE_HOOK(OnVanillaBehavior, (GIVanillaBehavior flag, bool* result, va_list originalArgs)); diff --git a/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.cpp b/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.cpp index 9c861062b..40c47e9a9 100644 --- a/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.cpp +++ b/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.cpp @@ -142,6 +142,22 @@ void GameInteractor_ExecuteOnPlayerBottleUpdate(int16_t contents) { GameInteractor::Instance->ExecuteHooks(contents); } +void GameInteractor_ExecuteOnPlayerHoldUpShield() { + GameInteractor::Instance->ExecuteHooks(); +} + +void GameInteractor_ExecuteOnPlayerFirstPersonControl(Player* player) { + GameInteractor::Instance->ExecuteHooks(player); +} + +void GameInteractor_ExecuteOnPlayerShieldControl(float_t* sp50, float_t* sp54) { + GameInteractor::Instance->ExecuteHooks(sp50, sp54); +} + +void GameInteractor_ExecuteOnPlayerProcessStick() { + GameInteractor::Instance->ExecuteHooks(); +} + void GameInteractor_ExecuteOnPlayDestroy() { GameInteractor::Instance->ExecuteHooks(); } diff --git a/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.h b/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.h index d20864012..10ab3a877 100644 --- a/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.h +++ b/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.h @@ -35,6 +35,10 @@ void GameInteractor_ExecuteOnTimestamp (u8 item); void GameInteractor_ExecuteOnPlayerBonk(); void GameInteractor_ExecuteOnPlayerHealthChange(int16_t amount); void GameInteractor_ExecuteOnPlayerBottleUpdate(int16_t contents); +void GameInteractor_ExecuteOnPlayerHoldUpShield(); +void GameInteractor_ExecuteOnPlayerFirstPersonControl(Player* player); +void GameInteractor_ExecuteOnPlayerShieldControl(float_t* sp50, float_t* sp54); +void GameInteractor_ExecuteOnPlayerProcessStick(); void GameInteractor_ExecuteOnShopSlotChangeHooks(uint8_t cursorIndex, int16_t price); void GameInteractor_ExecuteOnPlayDestroy(); void GameInteractor_ExecuteOnPlayDrawEnd(); diff --git a/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h b/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h index d6154347c..8aace9a90 100644 --- a/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h +++ b/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h @@ -1679,6 +1679,15 @@ typedef enum { // - `*VBFishingData` VB_SHOULD_SET_FISHING_RECORD, + // #### `result` + // ```c + // false + // ``` + // #### `args` + // - `*s8 iter2` + // - `s8 sp3C[4]` + VB_SHOULD_QUICKSPIN, + // #### `result` // ```c // (interactedActor->id == ACTOR_BG_TOKI_SWD) && LINK_IS_ADULT @@ -1794,6 +1803,15 @@ typedef enum { // - `*ShotSun` VB_SPAWN_SONG_FAIRY, + // #### `result` + // ```c + // (this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) && (this->heldActor != NULL) && + // CHECK_BTN_ANY(sControlInput->press.button, buttonsToCheck) + // ``` + // #### `args` + // - `*Input` + VB_THROW_OR_PUT_DOWN_HELD_ITEM, + // #### `result` // ```c // true diff --git a/soh/soh/Enhancements/gameplaystats.cpp b/soh/soh/Enhancements/gameplaystats.cpp index 937e81ede..51144dd20 100644 --- a/soh/soh/Enhancements/gameplaystats.cpp +++ b/soh/soh/Enhancements/gameplaystats.cpp @@ -709,6 +709,7 @@ void SetupDisplayNames() { // To add a timestamp for an item or event, add it to this list and ensure // it has a corresponding entry in the enum (see gameplaystats.h) + // clang-format off strcpy(itemTimestampDisplayName[ITEM_BOW], "Fairy Bow: "); strcpy(itemTimestampDisplayName[ITEM_ARROW_FIRE], "Fire Arrows: "); strcpy(itemTimestampDisplayName[ITEM_DINS_FIRE], "Din's Fire: "); @@ -799,6 +800,7 @@ void SetupDisplayNames() { strcpy(itemTimestampDisplayName[TIMESTAMP_BOSSRUSH_FINISH], "Boss Rush Finished: "); strcpy(itemTimestampDisplayName[TIMESTAMP_FOUND_GREG], "Greg Found: "); strcpy(itemTimestampDisplayName[TIMESTAMP_TRIFORCE_COMPLETED], "Triforce Completed: "); + // clang-format on } void SetupDisplayColors() { diff --git a/soh/soh/Enhancements/mods.cpp b/soh/soh/Enhancements/mods.cpp index 38de50575..b208d2598 100644 --- a/soh/soh/Enhancements/mods.cpp +++ b/soh/soh/Enhancements/mods.cpp @@ -715,7 +715,8 @@ void RegisterEnemyDefeatCounts() { break; case ACTOR_EN_TP: - if (actor->params == TAILPASARAN_HEAD) { // Only count the head, otherwise each body segment will increment + // Only count the head, otherwise each body segment will increment + if (actor->params == TAILPASARAN_HEAD) { gSaveContext.ship.stats.count[COUNT_ENEMIES_DEFEATED_TAILPASARAN]++; } break; @@ -833,8 +834,8 @@ void RegisterRandomizedEnemySizes() { randomNumber = rand() % 200; // Between 100% and 300% size. randomScale = 1.0f + (randomNumber / 100); - // Small actor } else { + // Small actor randomNumber = rand() % 90; // Between 10% and 100% size. randomScale = 0.1f + (randomNumber / 100); diff --git a/soh/soh/Enhancements/presets.h b/soh/soh/Enhancements/presets.h deleted file mode 100644 index a7bca4e66..000000000 --- a/soh/soh/Enhancements/presets.h +++ /dev/null @@ -1,907 +0,0 @@ -#pragma once - -#include -#include -#include -#include -#include -#include "soh/Enhancements/randomizer/randomizerTypes.h" -#include "soh/Enhancements/enhancementTypes.h" -#include "soh/OTRGlobals.h" -#include "soh/cvar_prefixes.h" - -enum PresetEntryType { - PRESET_ENTRY_TYPE_S32, - PRESET_ENTRY_TYPE_FLOAT, - PRESET_ENTRY_TYPE_STRING, - PRESET_ENTRY_TYPE_CPP_STRING, -}; - -enum PresetType { - PRESET_TYPE_ENHANCEMENTS, - PRESET_TYPE_RANDOMIZER, -}; - -enum EnhancementPreset { - ENHANCEMENT_PRESET_DEFAULT, - ENHANCEMENT_PRESET_VANILLA_PLUS, - ENHANCEMENT_PRESET_ENHANCED, - ENHANCEMENT_PRESET_RANDOMIZER, -}; - -enum RandomizerPreset { - RANDOMIZER_PRESET_DEFAULT, - RANDOMIZER_PRESET_SPOCK_RACE, - RANDOMIZER_PRESET_SPOCK_RACE_NO_LOGIC, - RANDOMIZER_PRESET_S6, - RANDOMIZER_PRESET_HELL_MODE, - RANDOMIZER_PRESET_BENCHMARK, -}; - -typedef struct PresetEntry { - const char* cvar; - PresetEntryType type; - std::variant value; -} PresetEntry; - -std::string FormatLocations(std::vector locs); - -#define PRESET_ENTRY_S32(cvar, value) \ - { cvar, PRESET_ENTRY_TYPE_S32, value } -#define PRESET_ENTRY_FLOAT(cvar, value) \ - { cvar, PRESET_ENTRY_TYPE_FLOAT, value } -#define PRESET_ENTRY_STRING(cvar, value) \ - { cvar, PRESET_ENTRY_TYPE_STRING, value } -#define PRESET_ENTRY_CPP_STRING(cvar, value) \ - { cvar, PRESET_ENTRY_TYPE_CPP_STRING, value } - -void DrawPresetSelector(PresetType presetType); -void clearCvars(std::vector cvarsToClear); -void applyPreset(std::vector entries); - -// TODO: Ideally everything below this point will come from one/many JSON files - -const std::vector vanillaPlusPresetEntries = { - // D-pad Support in text and file select - PRESET_ENTRY_S32(CVAR_SETTING("DpadInText"), 1), - // Play Ocarina with D-pad - PRESET_ENTRY_S32(CVAR_SETTING("OcarinaControl.Dpad"), 1), - // Play Ocarina with Right Stick - PRESET_ENTRY_S32(CVAR_SETTING("OcarinaControl.RStick"), 1), - // D-pad as Equip Items - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DpadEquips"), 1), - // Prevent Dropped Ocarina Inputs - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DpadNoDropOcarinaInput"), 1), - - // Text Speed (1 to 5) - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TextSpeed"), 5), - // Slow Text Speed (1 to 5) - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SlowTextSpeed"), 5), - // Skip Text - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkipText"), 1), - // King Zora Speed (1 to 5) - PRESET_ENTRY_FLOAT(CVAR_ENHANCEMENT("MweepSpeed"), 2.0f), - // Faster Block Push (+0 to +5) - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterBlockPush"), 5), - // Better Owl - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("BetterOwl"), 1), - - // Assignable Tunics and Boots - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("AssignableTunicsAndBoots"), 1), - // Enable passage of time on file select - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TimeFlowFileSelect"), 1), - // Inject Item Counts in messages - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.GoldSkulltula"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.HeartPiece"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.HeartContainer"), 1), - - // Dynamic Wallet Icon - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DynamicWalletIcon"), 1), - // Always show dungeon entrances - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("AlwaysShowDungeonMinimapIcon"), 1), - - // Fix L&R Pause menu - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixMenuLR"), 1), - // Fix Dungeon entrances - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixDungeonMinimapIcon"), 1), - // Fix Two Handed idle animations - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TwoHandedIdle"), 1), - // Fix the Gravedigging Tour Glitch - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("GravediggingTourFix"), 1), - // Fix Deku Nut upgrade - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DekuNutUpgradeFix"), 1), - // Fix Navi text HUD position - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NaviTextFix"), 1), - // Extend Silver Rupee Jingle - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SilverRupeeJingleExtend"), 1), - // Fix some Floor Switches - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixFloorSwitches"), 1), - - // Red Ganon blood - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("RedGanonBlood"), 1), - // Fish while hovering - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("HoverFishing"), 1), - // N64 Weird Frames - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("N64WeirdFrames"), 1), - // Bombchus out of bounds - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("BombchusOOB"), 1), - // Quick Putaway - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("QuickPutaway"), 1), - // Skip save confirmation - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkipSaveConfirmation"), 1), -}; - -const std::vector enhancedPresetEntries = { - // D-pad Support in text and file select - PRESET_ENTRY_S32(CVAR_SETTING("DpadInText"), 1), - // Play Ocarina with D-pad - PRESET_ENTRY_S32(CVAR_SETTING("OcarinaControl.Dpad"), 1), - // Play Ocarina with Right Stick - PRESET_ENTRY_S32(CVAR_SETTING("OcarinaControl.RStick"), 1), - // D-pad as Equip Items - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DpadEquips"), 1), - // Prevent Dropped Ocarina Inputs - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DpadNoDropOcarinaInput"), 1), - - // Text Speed (1 to 5) - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TextSpeed"), 5), - // Slow Text Speed (1 to 5) - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SlowTextSpeed"), 5), - // Skip Text - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkipText"), 1), - // King Zora Speed (1 to 5) - PRESET_ENTRY_FLOAT(CVAR_ENHANCEMENT("MweepSpeed"), 5.0f), - // Faster Block Push (+0 to +5) - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterBlockPush"), 5), - // Better Owl - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("BetterOwl"), 1), - - // Assignable Tunics and Boots - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("AssignableTunicsAndBoots"), 1), - // Enable passage of time on file select - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TimeFlowFileSelect"), 1), - // Inject Item Counts in messages - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.GoldSkulltula"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.HeartPiece"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.HeartContainer"), 1), - - // Dynamic Wallet Icon - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DynamicWalletIcon"), 1), - // Always show dungeon entrances - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("AlwaysShowDungeonMinimapIcon"), 1), - - // Fix L&R Pause menu - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixMenuLR"), 1), - // Fix Dungeon entrances - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixDungeonMinimapIcon"), 1), - // Fix Two Handed idle animations - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TwoHandedIdle"), 1), - // Fix the Gravedigging Tour Glitch - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("GravediggingTourFix"), 1), - // Fix Deku Nut upgrade - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DekuNutUpgradeFix"), 1), - // Fix Navi text HUD position - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NaviTextFix"), 1), - // Extend Silver Rupee Jingle - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SilverRupeeJingleExtend"), 1), - // Fix enemies not spawning on ground over water - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("EnemySpawnsOverWaterboxes"), 1), - // Fix some Floor Switches - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixFloorSwitches"), 1), - - // Red Ganon blood - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("RedGanonBlood"), 1), - // Fish while hovering - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("HoverFishing"), 1), - // N64 Weird Frames - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("N64WeirdFrames"), 1), - // Bombchus out of bounds - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("BombchusOOB"), 1), - // Quick Putaway - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("QuickPutaway"), 1), - // Skip save confirmation - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkipSaveConfirmation"), 1), - // Biggoron Forge Time (0 to 3) - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("ForgeTime"), 0), - // Vine/Ladder Climb speed (+0 to +12) - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("ClimbSpeed"), 3), - // Faster Heavy Block Lift - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterHeavyBlockLift"), 1), - // No Forced Navi - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NoForcedNavi"), 1), - // No Skulltula Freeze - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkulltulaFreeze"), 1), - // MM Bunny Hood - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MMBunnyHood"), BUNNY_HOOD_FAST_AND_JUMP), - // Adult Bunny Hood - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("AdultMasks"), 1), - // Fast Chests - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastChests"), 1), - // Fast Drops - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastDrops"), 1), - // Fast Ocarina Playback - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastOcarinaPlayback"), 1), - // Instant Putaway - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InstantPutaway"), 1), - // Instant Boomerang Recall - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastBoomerang"), 1), - // Nuts Explode Bombs - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NutsExplodeBombs"), 1), - // Ask to Equip New Items - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("AskToEquip"), 1), - // Mask Select in Inventory - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MaskSelect"), 1), - // Always Win Goron Pot - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("GoronPot"), 1), - // Always Win Dampe Digging - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DampeWin"), 1), - // Skip Magic Arrow Equip Animation - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkipArrowAnimation"), 1), - - // Equip arrows on multiple slots - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SeparateArrows"), 1), - - // Disable Navi Call Audio - PRESET_ENTRY_S32(CVAR_AUDIO("DisableNaviCallAudio"), 1), - - // Equipment Toggle - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("EquipmentCanBeRemoved"), 1), - // Link's Cow in Both Time Periods - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("CowOfTime"), 1), - - // Enable 3D Dropped items/projectiles - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NewDrops"), 1), - - // Fix Anubis fireballs - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("AnubisFix"), 1), - - // Autosave - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("Autosave"), 1), - - // Bombchu shop doesn't sell out, and 10 bombchus cost 99 instead of 100 - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("BetterBombchuShopping"), 1), -}; - -const std::vector randomizerPresetEntries = { - // D-pad Support in text and file select - PRESET_ENTRY_S32(CVAR_SETTING("DpadInText"), 1), - // Play Ocarina with D-pad - PRESET_ENTRY_S32(CVAR_SETTING("OcarinaControl.Dpad"), 1), - // Play Ocarina with Right Stick - PRESET_ENTRY_S32(CVAR_SETTING("OcarinaControl.RStick"), 1), - // D-pad as Equip Items - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DpadEquips"), 1), - // Prevent Dropped Ocarina Inputs - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DpadNoDropOcarinaInput"), 1), - - // Text Speed (1 to 5) - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TextSpeed"), 5), - // Slow Text Speed (1 to 5) - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SlowTextSpeed"), 5), - // Skip Text - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkipText"), 1), - // King Zora Speed (1 to 5) - PRESET_ENTRY_FLOAT(CVAR_ENHANCEMENT("MweepSpeed"), 5.0f), - // Faster Block Push (+0 to +5) - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterBlockPush"), 5), - // Better Owl - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("BetterOwl"), 1), - - // Assignable Tunics and Boots - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("AssignableTunicsAndBoots"), 1), - // Enable passage of time on file select - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TimeFlowFileSelect"), 1), - // Inject Item Counts in messages - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.GoldSkulltula"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.HeartPiece"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.HeartContainer"), 1), - - // Dynamic Wallet Icon - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DynamicWalletIcon"), 1), - // Always show dungeon entrances - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("AlwaysShowDungeonMinimapIcon"), 1), - - // Fix L&R Pause menu - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixMenuLR"), 1), - // Fix Dungeon entrances - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixDungeonMinimapIcon"), 1), - // Fix Two Handed idle animations - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TwoHandedIdle"), 1), - // Fix the Gravedigging Tour Glitch - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("GravediggingTourFix"), 1), - // Fix Deku Nut upgrade - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DekuNutUpgradeFix"), 1), - // Fix Navi text HUD position - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NaviTextFix"), 1), - // Extend Silver Rupee Jingle - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SilverRupeeJingleExtend"), 1), - // Fix some Floor Switches - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FixFloorSwitches"), 1), - - // Red Ganon blood - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("RedGanonBlood"), 1), - // Fish while hovering - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("HoverFishing"), 1), - // N64 Weird Frames - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("N64WeirdFrames"), 1), - // Bombchus out of bounds - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("BombchusOOB"), 1), - // Quick Putaway - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("QuickPutaway"), 1), - // Skip save confirmation - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkipSaveConfirmation"), 1), - // Biggoron Forge Time (0 to 3) - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("ForgeTime"), 0), - // Vine/Ladder Climb speed (+0 to +12) - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("ClimbSpeed"), 3), - // Faster Heavy Block Lift - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterHeavyBlockLift"), 1), - // No Forced Navi - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NoForcedNavi"), 1), - // No Skulltula Freeze - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkulltulaFreeze"), 1), - // MM Bunny Hood - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MMBunnyHood"), BUNNY_HOOD_FAST_AND_JUMP), - // Adult Bunny Hood - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("AdultMasks"), 1), - // Fast Chests - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastChests"), 1), - // Fast Drops - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastDrops"), 1), - // Fast Ocarina Playback - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastOcarinaPlayback"), 1), - // Instant Putaway - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InstantPutaway"), 1), - // Instant Boomerang Recall - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastBoomerang"), 1), - // Nuts Explode Bombs - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NutsExplodeBombs"), 1), - // Ask to Equip New Items - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("AskToEquip"), 1), - // Mask Select in Inventory - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MaskSelect"), 1), - // Always Win Goron Pot - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("GoronPot"), 1), - // Always Win Dampe Digging - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DampeWin"), 1), - // Skip Magic Arrow Equip Animation - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkipArrowAnimation"), 1), - // Exit Market at Night - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MarketSneak"), 1), - - // Equip arrows on multiple slots - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SeparateArrows"), 1), - - // Disable Navi Call Audio - PRESET_ENTRY_S32(CVAR_AUDIO("DisableNaviCallAudio"), 1), - - // Equipment Toggle - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("EquipmentCanBeRemoved"), 1), - // Link's Cow in Both Time Periods - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("CowOfTime"), 1), - - // Enable 3D Dropped items/projectiles - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NewDrops"), 1), - - // Fix Anubis fireballs - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("AnubisFix"), 1), - - // Autosave - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("Autosave"), 1), - - // Customize Fishing Behaviour - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("CustomizeFishing"), 1), - // Guarantee Bite - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("GuaranteeFishingBite"), 1), - // Fish Never Escape - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FishNeverEscape"), 1), - // Child Minimum Weight (6 to 10) - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MinimumFishWeightChild"), 3), - // Adult Minimum Weight (8 to 13) - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MinimumFishWeightAdult"), 6), - - // Customize Lost Woods Ocarina Game Behavior - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("CustomizeOcarinaGame"), 1), - // Start With Five Notes - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("OcarinaGame.StartingNotes"), 5), - // Round One Notes - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("OcarinaGame.RoundOneNotes"), 5), - - // Visual Stone of Agony - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("VisualAgony"), 1), - // Pull grave during the day - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DayGravePull"), 1), - // Pull out Ocarina to Summon Scarecrow - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InstantScarecrow"), 1), - // Chest size & texture matches contents - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("ChestSizeAndTextureMatchContents"), CSMC_BOTH), - - // Color Temple of Time's Medallions - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("ToTMedallionsColors"), 1), - - // Frames to wait - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MinFrameCount"), 200), - - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NoInputForCredits"), 1), - - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastFarores"), 1), -}; - -const std::vector spockRacePresetEntries = { - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("LogicRules"), 0), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TextSpeed"), 5), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SlowTextSpeed"), 5), - PRESET_ENTRY_FLOAT(CVAR_ENHANCEMENT("MweepSpeed"), 5.0f), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("ClimbSpeed"), 4), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterBlockPush"), 5), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterHeavyBlockLift"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NoForcedNavi"), 1), - PRESET_ENTRY_S32(CVAR_AUDIO("DisableNaviCallAudio"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastChests"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastDrops"), 1), - PRESET_ENTRY_S32(CVAR_SETTING("DpadInText"), 1), - PRESET_ENTRY_S32(CVAR_SETTING("OcarinaControl.Dpad"), 1), - PRESET_ENTRY_S32(CVAR_SETTING("OcarinaControl.RStick"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DpadEquips"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastOcarinaPlayback"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InstantScarecrow"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MarketSneak"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InstantPutaway"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastBoomerang"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("AdultMasks"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MMBunnyHood"), BUNNY_HOOD_FAST), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SeparateArrows"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("AssignableTunicsAndBoots"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("EquipmentCanBeRemoved"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DayGravePull"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NewDrops"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("CreditsFix"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkipText"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkulltulaFreeze"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("PauseAnyCursor"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastFarores"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NoInputForCredits"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MaskSelect"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.GoldSkulltula"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.HeartPiece"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.HeartContainer"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("CustomizeFishing"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FishNeverEscape"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InstantFishing"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("GuaranteeFishingBite"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MinimumFishWeightAdult"), 6), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MinimumFishWeightChild"), 3), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("GoronPot"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("ForgeTime"), 0), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DampeAllNight"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("10GSHint"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("20GSHint"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("30GSHint"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("40GSHint"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("50GSHint"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("AllLocationsReachable"), 0), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BlueFireArrows"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BombchuBag"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("CompleteMaskQuest"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("CuccosToReturn"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("DampeHint"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("DoorOfTime"), RO_DOOROFTIME_OPEN), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("EnableBombchuDrops"), 1), - PRESET_ENTRY_CPP_STRING(CVAR_RANDOMIZER_SETTING("ExcludedLocations"), FormatLocations( - { RC_MARKET_10_BIG_POES, RC_KAK_40_GOLD_SKULLTULA_REWARD, RC_KAK_50_GOLD_SKULLTULA_REWARD, RC_ZR_FROGS_OCARINA_GAME })), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ClosedForest"), RO_CLOSED_FOREST_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("FullWallets"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GanonTrial"), RO_GANONS_TRIALS_SKIP), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("FortressCarpenters"), RO_GF_CARPENTERS_FAST), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GregHint"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GsExpectSunsSong"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("KakarikoGate"), RO_KAK_GATE_OPEN), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("LacsRewardCount"), 5), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("RainbowBridge"), RO_BRIDGE_GREG), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ScrubText"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("IncludeTycoonWallet"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("Shopsanity"), RO_SHOPSANITY_RANDOM), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShopsanityPrices"), RO_PRICE_BALANCED), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_LACS_REWARDS), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleKeyRings"), RO_KEYRINGS_COUNT), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleKokiriSword"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleOcarinas"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleScrubs"), RO_SCRUBS_ALL), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ScrubsPrice"), RO_PRICE_FIXED), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ScrubsFixedPrice"), 10), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipChildStealth"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipChildZelda"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipEponaRace"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipScarecrowsSong"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipTowerEscape"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingConsumables"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingMapsCompasses"), RO_DUNGEON_ITEM_LOC_STARTWITH), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingOcarina"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SunlightArrows"), 1), -}; - -const std::vector spockRaceNoLogicPresetEntries = { - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("AdultMasks"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MinimumFishWeightAdult"), 6), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("AssignableTunicsAndBoots"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MinimumFishWeightChild"), 3), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("ClimbSpeed"), 4), - PRESET_ENTRY_S32(CVAR_COSMETIC("Goron.NeckLength"), 1000), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("CreditsFix"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("CustomizeFishing"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DampeAllNight"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DayGravePull"), 1), - PRESET_ENTRY_S32(CVAR_AUDIO("DisableNaviCallAudio"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DpadNoDropOcarinaInput"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("EquipmentCanBeRemoved"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastBoomerang"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastChests"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastDrops"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastFarores"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastOcarinaPlayback"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterBlockPush"), 5), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterHeavyBlockLift"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FishNeverEscape"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("ForgeTime"), 0), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("GoronPot"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("GuaranteeFishingBite"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.GoldSkulltula"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.HeartPiece"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.HeartContainer"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InstantFishing"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InstantPutaway"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MMBunnyHood"), BUNNY_HOOD_FAST), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MarketSneak"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MaskSelect"), 1), - PRESET_ENTRY_FLOAT(CVAR_ENHANCEMENT("MweepSpeed"), 5.0f), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NoForcedNavi"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NoInputForCredits"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("PauseAnyCursor"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("10GSHint"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("20GSHint"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("30GSHint"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("40GSHint"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("50GSHint"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("AllLocationsReachable"), 0), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BlueFireArrows"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BombchuBag"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BossKeysanity"), RO_DUNGEON_ITEM_LOC_ANYWHERE), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("CompleteMaskQuest"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("CuccosToReturn"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("DampeHint"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("DoorOfTime"), RO_DOOROFTIME_OPEN), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("EnableBombchuDrops"), 1), - PRESET_ENTRY_CPP_STRING(CVAR_RANDOMIZER_SETTING("ExcludedLocations"), FormatLocations( - { RC_MARKET_10_BIG_POES, RC_KAK_40_GOLD_SKULLTULA_REWARD, RC_KAK_50_GOLD_SKULLTULA_REWARD, RC_ZR_FROGS_OCARINA_GAME })), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ClosedForest"), RO_CLOSED_FOREST_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("FullWallets"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GanonTrial"), RO_GANONS_TRIALS_SKIP), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("FortressCarpenters"), RO_GF_CARPENTERS_FAST), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GerudoKeys"), RO_GERUDO_KEYS_ANYWHERE), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GregHint"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GsExpectSunsSong"), 0), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("KakarikoGate"), RO_KAK_GATE_OPEN), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("Keysanity"), RO_DUNGEON_ITEM_LOC_ANYWHERE), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("LacsRewardCount"), 5), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_NO_LOGIC), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("RainbowBridge"), RO_BRIDGE_GREG), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ScrubText"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("IncludeTycoonWallet"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("Shopsanity"), RO_SHOPSANITY_RANDOM), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShopsanityPrices"), RO_PRICE_BALANCED), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleAdultTrade"), 0), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleMerchants"), RO_SHUFFLE_MERCHANTS_BEANS_ONLY), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleMerchantPrices"), RO_PRICE_VANILLA), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_LACS_REWARDS), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleGerudoToken"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleKeyRings"), RO_KEYRINGS_COUNT), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleKokiriSword"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleOcarinas"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleScrubs"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleSongs"), RO_SONG_SHUFFLE_ANYWHERE), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleTokens"), RO_TOKENSANITY_ALL), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipChildStealth"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipChildZelda"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipEponaRace"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipScarecrowsSong"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipTowerEscape"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingConsumables"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingMapsCompasses"), RO_DUNGEON_ITEM_LOC_STARTWITH), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingOcarina"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SunlightArrows"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SeparateArrows"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InstantScarecrow"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkulltulaFreeze"), 1), -}; - -const std::vector s6PresetEntries = { - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("ChestSizeAndTextureMatchContents"), CSMC_BOTH), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastChests"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MMBunnyHood"), BUNNY_HOOD_FAST), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("AdultMasks"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BigPoeTargetCount"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("CuccosToReturn"), 4), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("DoorOfTime"), RO_DOOROFTIME_OPEN), - PRESET_ENTRY_CPP_STRING(CVAR_RANDOMIZER_SETTING("ExcludedLocations"), FormatLocations({ RC_DEKU_THEATER_MASK_OF_TRUTH })), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ClosedForest"), RO_CLOSED_FOREST_DEKU_ONLY), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GanonTrial"), RO_GANONS_TRIALS_SKIP), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("FortressCarpenters"), RO_GF_CARPENTERS_FAST), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("IceTraps"), RO_ICE_TRAPS_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("KakarikoGate"), RO_KAK_GATE_OPEN), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("MedallionCount"), 6), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("MQDungeons"), RO_MQ_DUNGEONS_NONE), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("RainbowBridge"), RO_BRIDGE_MEDALLIONS), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleAdultTrade"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleDungeonReward"), RO_DUNGEON_REWARDS_END_OF_DUNGEON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_STARTWITH), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleKokiriSword"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleOverworldSpawns"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipChildStealth"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipChildZelda"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipEponaRace"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipTowerEscape"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SleepingWaterfall"), RO_WATERFALL_CLOSED), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingAge"), RO_AGE_RANDOM), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingConsumables"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingDekuShield"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingMapsCompasses"), RO_DUNGEON_ITEM_LOC_STARTWITH), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingOcarina"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ZorasFountain"), RO_ZF_CLOSED), -}; - -const std::vector hellModePresetEntries = { - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("ChestSizeAndTextureMatchContents"), CSMC_BOTH), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastChests"), 1), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MMBunnyHood"), BUNNY_HOOD_FAST), - PRESET_ENTRY_S32(CVAR_ENHANCEMENT("AdultMasks"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BigPoeTargetCount"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BlueFireArrows"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BossKeysanity"), RO_DUNGEON_ITEM_LOC_ANYWHERE), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("CompleteMaskQuest"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("CuccosToReturn"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("DoorOfTime"), RO_DOOROFTIME_OPEN), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("EnableBombchuDrops"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ClosedForest"), RO_CLOSED_FOREST_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GanonTrial"), RO_GANONS_TRIALS_SET_NUMBER), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GanonTrialCount"), 6), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GerudoKeys"), RO_GERUDO_KEYS_ANYWHERE), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GsExpectSunsSong"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("IceTraps"), RO_ICE_TRAPS_ONSLAUGHT), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ItemPool"), RO_ITEM_POOL_MINIMAL), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("KakarikoGate"), RO_KAK_GATE_OPEN), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("Keysanity"), RO_DUNGEON_ITEM_LOC_ANYWHERE), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("LinksPocket"), RO_LINKS_POCKET_NOTHING), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("MQDungeons"), RO_MQ_DUNGEONS_RANDOM_NUMBER), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("RainbowBridge"), RO_BRIDGE_DUNGEON_REWARDS), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("IncludeTycoonWallet"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("Shopsanity"), RO_SHOPSANITY_SPECIFIC_COUNT), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShopsanityCount"), RO_SHOPSANITY_COUNT_FOUR_ITEMS), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShopsanityPrices"), RO_PRICE_RANGE), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShopsanityPriceRange1"), 0), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShopsanityPriceRange2"), 999), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleAdultTrade"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleMerchants"), RO_SHUFFLE_MERCHANTS_BEANS_ONLY), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleMerchantPrices"), RO_PRICE_VANILLA), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleCows"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleDungeonReward"), RO_DUNGEON_REWARDS_ANYWHERE), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleFrogSongRupees"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_LACS_DUNGEONS), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleGerudoToken"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleKeyRings"), RO_KEYRINGS_RANDOM), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleKokiriSword"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleMasterSword"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleOcarinas"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleScrubs"), RO_SCRUBS_ALL), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ScrubsPrice"), RO_PRICE_CHEAP_BALANCED), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleSongs"), RO_SONG_SHUFFLE_ANYWHERE), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleTokens"), RO_TOKENSANITY_ALL), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleWeirdEgg"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipChildStealth"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipEponaRace"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipScarecrowsSong"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipTowerEscape"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SleepingWaterfall"), RO_WATERFALL_OPEN), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingAge"), RO_AGE_RANDOM), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingMapsCompasses"), RO_DUNGEON_ITEM_LOC_ANYWHERE), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SunlightArrows"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ZorasFountain"), RO_ZF_OPEN), -}; - -const std::vector BenchmarkPresetEntries = { - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ClosedForest"), RO_CLOSED_FOREST_DEKU_ONLY), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("KakarikoGate"), RO_KAK_GATE_OPEN), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("DoorOfTime"), RO_DOOROFTIME_SONGONLY), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SleepingWaterfall"), RO_WATERFALL_CLOSED), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ZorasFountain"), RO_ZF_CLOSED), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("FortressCarpenters"), RO_GF_CARPENTERS_NORMAL), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("RainbowBridge"), RO_BRIDGE_DUNGEON_REWARDS), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("RewardCount"), 5), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BridgeRewardOptions"), RO_BRIDGE_GREG_REWARD), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GanonTrial"), RO_GANONS_TRIALS_SET_NUMBER), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GanonTrialCount"), 6), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingAge"), RO_AGE_RANDOM), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleDungeonsEntrances"), RO_DUNGEON_ENTRANCE_SHUFFLE_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleBossEntrances"), RO_BOSS_ROOM_ENTRANCE_SHUFFLE_FULL), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleOverworldEntrances"), RO_GENERIC_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleInteriorsEntrances"), RO_INTERIOR_ENTRANCE_SHUFFLE_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleGrottosEntrances"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleWarpSongs"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleOverworldSpawns"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("MixedEntrances"), RO_GENERIC_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("DecoupleEntrances"), RO_GENERIC_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BombchusInLogic"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("EnableBombchuDrops"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("TriforceHunt"), RO_GENERIC_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("MQDungeons"), RO_MQ_DUNGEONS_RANDOM_NUMBER), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("MQDungeonsSelection"), RO_GENERIC_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleDungeonReward"), RO_DUNGEON_REWARDS_END_OF_DUNGEON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("LinksPocket"), RO_LINKS_POCKET_DUNGEON_REWARD), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleSongs"), RO_SONG_SHUFFLE_ANYWHERE), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("Shopsanity"), RO_SHOPSANITY_SPECIFIC_COUNT), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShopsanityCount"), RO_SHOPSANITY_COUNT_FOUR_ITEMS), - //RANDOTODO add refactored price/scrub/merchant settings - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleTokens"), RO_TOKENSANITY_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleBeehives"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleCows"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleKokiriSword"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleMasterSword"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleChildWallet"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleOcarinas"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleOcarinaButtons"), RO_GENERIC_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleSwim"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleGerudoToken"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleFrogSongRupees"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleAdultTrade"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("Shuffle100GSReward"), RO_GENERIC_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleBossSouls"), RO_BOSS_SOULS_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleDekuStickBag"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleDekuNutBag"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("Fishsanity"), RO_FISHSANITY_BOTH), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("FishsanityAgeSplit"), RO_GENERIC_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingMapsCompasses"), RO_DUNGEON_ITEM_LOC_OWN_DUNGEON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GerudoKeys"), RO_GERUDO_KEYS_ANYWHERE), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BossKeysanity"), RO_DUNGEON_ITEM_LOC_OWN_DUNGEON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_LACS_MEDALLIONS), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("LacsMedallionCount"), 6), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleKeyRings"), RO_KEYRINGS_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipChildZelda"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipEponaRace"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipScarecrowsSong"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BigPoeTargetCount"), 1), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("CuccosToReturn"), 4), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("CompleteMaskQuest"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GossipStoneHints"), RO_GOSSIP_STONES_NEED_NOTHING), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("HintClarity"), RO_HINT_CLARITY_CLEAR), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("HintDistribution"), RO_HINT_DIST_STRONG), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("AltarHint"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GanondorfHint"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SheikLAHint"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("DampeHint"), RO_GENERIC_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GregHint"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SariaHint"), RO_GENERIC_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("FrogsHint"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("OoTHint"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BiggoronHint"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BigPoesHint"), RO_GENERIC_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ChickensHint"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("MalonHint"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("HBAHint"), RO_GENERIC_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("WarpSongText"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ScrubText"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("10GSHint"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("20GSHint"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("30GSHint"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("40GSHint"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("50GSHint"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("MaskShopHint"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BlueFireArrows"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SunlightArrows"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("InfiniteUpgrades"), RO_INF_UPGRADES_PROGRESSIVE), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkeletonKey"), RO_GENERIC_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ItemPool"), RO_ITEM_POOL_BALANCED), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("IceTraps"), RO_ICE_TRAPS_NORMAL), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingOcarina"), RO_STARTING_OCARINA_FAIRY), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingDekuShield"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingKokiriSword"), RO_GENERIC_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingMasterSword"), RO_GENERIC_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingConsumables"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("FullWallets"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingZeldasLullaby"), RO_GENERIC_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingEponasSong"), RO_GENERIC_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingSariasSong"), RO_GENERIC_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingSunsSong"), RO_GENERIC_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingSongOfTime"), RO_GENERIC_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingSongOfStorms"), RO_GENERIC_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingMinuetOfForest"), RO_GENERIC_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingBoleroOfFire"), RO_GENERIC_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingSerenadeOfWater"), RO_GENERIC_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingRequiemOfSpirit"), RO_GENERIC_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingNocturneOfShadow"), RO_GENERIC_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingPreludeOfLight"), RO_GENERIC_OFF), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingSkulltulaToken"), 0), - PRESET_ENTRY_S32("gRandomizeStartingHearts", 2), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("AllLocationsReachable"), RO_GENERIC_ON), - PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GsExpectSunsSong"), RO_GENERIC_ON), -}; - -typedef struct PresetDefinition { - const char* label; - const char* description; - std::vector entries; -} PresetDefinition; - -typedef struct PresetTypeDefinition { - std::vector blocksToClear; - std::map presets; -} PresetTypeDefinition; - -const std::map presetTypes = { - { PRESET_TYPE_ENHANCEMENTS, { { CVAR_PREFIX_ENHANCEMENT, CVAR_PREFIX_CHEAT }, { - { ENHANCEMENT_PRESET_DEFAULT, { - "Default", - "Reset all options to their default values.", - {}, - } }, - { ENHANCEMENT_PRESET_VANILLA_PLUS, { - "Vanilla Plus", - "Adds Quality of Life features that enhance your experience, but don't alter gameplay. Recommended for a first playthrough of OoT.", - vanillaPlusPresetEntries, - } }, - { ENHANCEMENT_PRESET_ENHANCED, { - "Enhanced", - "The \"Vanilla Plus\" preset, but with more quality of life enhancements that might alter gameplay slightly. Recommended for returning players.", - enhancedPresetEntries - } }, - { ENHANCEMENT_PRESET_RANDOMIZER, { - "Randomizer", - "The \"Enhanced\" preset, plus any other enhancements that are recommended for playing Randomizer.", - randomizerPresetEntries - } }, - } } }, - { PRESET_TYPE_RANDOMIZER, { { CVAR_PREFIX_RANDOMIZER_SETTING, CVAR_PREFIX_RANDOMIZER_ENHANCEMENT }, { - { RANDOMIZER_PRESET_DEFAULT, { - "Default", - "Reset all options to their default values.", - {}, - } }, - { RANDOMIZER_PRESET_SPOCK_RACE, { - "Spock Race", - "Race preset used for the official Ship of Harkinian race on June 3rd 2023. The following settings are notable:\n" \ - "- Rainbow Bridge is set to Greg\n" \ - "- Ganon's Boss Key is 5 dungeon rewards\n" \ - "- Shopsanity and Scrubsanity enabled\n" \ - "- All locations reachable is off\n", \ - spockRacePresetEntries, - } }, - { RANDOMIZER_PRESET_SPOCK_RACE_NO_LOGIC, { - "Spock Race - No Logic", - "No Logic Race preset used for official Ship of Harkinian No Logic races. The following settings are " - "notable:\n" - "- Rainbow Bridge is set to Greg\n" - "- Ganon's Boss Key is 5 dungeon rewards\n" - "- Shopsanity and Scrubsanity enabled\n" - "- All locations reachable is off\n", - spockRaceNoLogicPresetEntries, - } }, - { RANDOMIZER_PRESET_S6, { - "S6 Tournament (Adapted)", - "Matches OOTR S6 tournament settings as close as we can get with the options available in SoH. The following differences are notable:\n" \ - "- Both child and adult overworld spawns are randomized\n" \ - "- Dungeon rewards are shuffled at the end of dungeons, rather than at the end of their own dungeon\n" \ - "- Full adult trade sequence is shuffled instead of the selected 4\n" \ - "- Hint distribution no \"tournament\" mode, falling back to balanced", - s6PresetEntries, - } }, - { RANDOMIZER_PRESET_HELL_MODE, { - "Hell Mode", - "All settings maxed but still using glitchless logic. Expect pain.", - hellModePresetEntries - } }, - { RANDOMIZER_PRESET_BENCHMARK, { - "Benchmark", - "Used for benchmarking the logic.", - BenchmarkPresetEntries - } }, - } } } -}; diff --git a/soh/soh/Enhancements/randomizer/3drando/hint_list.cpp b/soh/soh/Enhancements/randomizer/3drando/hint_list.cpp index e16f22d03..ff9e28d9a 100644 --- a/soh/soh/Enhancements/randomizer/3drando/hint_list.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/hint_list.cpp @@ -22,6 +22,7 @@ using namespace std::literals::string_literals; namespace Rando { void StaticData::HintTable_Init() { + // clang-format off /*-------------------------- | GENERAL TEXT | ---------------------------*/ @@ -46,12 +47,13 @@ void StaticData::HintTable_Init() { "Man erzählt sich, daß #[[2]]# #[[1]]# horte.", /*french*/ "Selon moi, #[[2]]# recèle #[[1]]#.", {QM_RED, QM_GREEN})); // /*spanish*/ "Según dicen, #[[2]]# acapara #[[1]]#." + // clang-format on HintTable_Init_Item(); HintTable_Init_Exclude_Overworld(); HintTable_Init_Exclude_Dungeon(); - + // clang-format off /*-------------------------- | SOMETIMES HINT TEXT | ---------------------------*/ @@ -2413,5 +2415,6 @@ void StaticData::HintTable_Init() { /*german*/ "&Man kann darauf die Worte&%r\"Master Quest\"%w entziffern...", /*french*/ "&Étrange... les mots %r\"Master&Quest\"%w sont gravés dessus.")); + // clang-format on } } diff --git a/soh/soh/Enhancements/randomizer/3drando/hint_list/hint_list_exclude_dungeon.cpp b/soh/soh/Enhancements/randomizer/3drando/hint_list/hint_list_exclude_dungeon.cpp index ed447fe30..152239f5b 100644 --- a/soh/soh/Enhancements/randomizer/3drando/hint_list/hint_list_exclude_dungeon.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/hint_list/hint_list_exclude_dungeon.cpp @@ -4,10 +4,12 @@ namespace Rando { void StaticData::HintTable_Init_Exclude_Dungeon() { - /*-------------------------- - | DEKU TREE | - ---------------------------*/ - hintTextTable[RHT_DEKU_TREE_MAP_CHEST] = HintText(CustomMessage("They say that in the #center of the Deku Tree# lies #[[1]]#.", + // clang-format off + + /*-------------------------- + | DEKU TREE | + ---------------------------*/ + hintTextTable[RHT_DEKU_TREE_MAP_CHEST] = HintText(CustomMessage("They say that in the #center of the Deku Tree# lies #[[1]]#.", /*german*/ "Man erzählt sich, daß im #Zentrum des Deku-Baums# #[[1]]# läge.", /*french*/ "Selon moi, #le centre de l'Arbre Mojo# recèle #[[1]]#.", {QM_RED, QM_GREEN})); // /*spanish*/ Según dicen, al #centro del Gran Árbol Deku# yace #[[1]]#. @@ -2173,5 +2175,6 @@ hintTextTable[RHT_SHADOW_TEMPLE_MAP_CHEST] = HintText(CustomMessage("They say th /*german*/ "", /*french*/ "Selon moi, un #coeur dans le Château de Ganon# cache #[[1]]#.", {QM_RED, QM_GREEN})); + // clang-format on } } diff --git a/soh/soh/Enhancements/randomizer/3drando/hint_list/hint_list_exclude_overworld.cpp b/soh/soh/Enhancements/randomizer/3drando/hint_list/hint_list_exclude_overworld.cpp index a6c6b99f3..efbb24d10 100644 --- a/soh/soh/Enhancements/randomizer/3drando/hint_list/hint_list_exclude_overworld.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/hint_list/hint_list_exclude_overworld.cpp @@ -4,6 +4,7 @@ namespace Rando { void StaticData::HintTable_Init_Exclude_Overworld() { + // clang-format off hintTextTable[RHT_KF_KOKIRI_SWORD_CHEST] = HintText(CustomMessage("They say that the #hidden treasure of the Kokiri# is #[[1]]#.", /*german*/ "Man erzählt sich, daß der #versteckte Schatz der Kokiri# #[[1]]# sei.", @@ -1954,5 +1955,6 @@ void StaticData::HintTable_Init_Exclude_Overworld() { hintTextTable[RHT_GRAVEYARD_ROYAL_FAMILYS_TOMB_SUN_FAIRY] = HintText(CustomMessage("They say that #calling the sun in a royal tomb# reveals #[[1]]#.", { QM_RED, QM_GREEN })); + // clang-format on } } diff --git a/soh/soh/Enhancements/randomizer/3drando/hint_list/hint_list_item.cpp b/soh/soh/Enhancements/randomizer/3drando/hint_list/hint_list_item.cpp index ce7b87326..738977b24 100644 --- a/soh/soh/Enhancements/randomizer/3drando/hint_list/hint_list_item.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/hint_list/hint_list_item.cpp @@ -5,7 +5,8 @@ namespace Rando { void StaticData::HintTable_Init_Item() { - + // clang-format off + hintTextTable[RHT_KOKIRI_SWORD] = HintText(CustomMessage("the Kokiri Sword", /*german*/"das Kokiri-Schwert", /*french*/"l'Épée Kokiri"), // /*spanish*/la Espada Kokiri { @@ -2983,5 +2984,6 @@ void StaticData::HintTable_Init_Item() { hintTextTable[RHT_MYSTERIOUS_ITEM_CAPITAL] = HintText(CustomMessage("Mysterious Item", /*german*/"Mysteriöser Gegenstand", /*french*/"Objet Mystérieux")); // /*spanish*/Algo Misterioso + // clang-format on } } diff --git a/soh/soh/Enhancements/randomizer/3drando/item_pool.cpp b/soh/soh/Enhancements/randomizer/3drando/item_pool.cpp index 1456c1041..cd777015d 100644 --- a/soh/soh/Enhancements/randomizer/3drando/item_pool.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/item_pool.cpp @@ -149,7 +149,7 @@ const std::array easyItems = { RG_PIECE_OF_HEART, }; const std::array normalItems = { - RG_PIECE_OF_HEART, //35 pieces of heart + // 35 pieces of heart RG_PIECE_OF_HEART, RG_PIECE_OF_HEART, RG_PIECE_OF_HEART, @@ -184,7 +184,9 @@ const std::array normalItems = { RG_PIECE_OF_HEART, RG_PIECE_OF_HEART, RG_PIECE_OF_HEART, - RG_HEART_CONTAINER, //8 heart containers + RG_PIECE_OF_HEART, + // 8 heart containers + RG_HEART_CONTAINER, RG_HEART_CONTAINER, RG_HEART_CONTAINER, RG_HEART_CONTAINER, diff --git a/soh/soh/Enhancements/randomizer/Plandomizer.h b/soh/soh/Enhancements/randomizer/Plandomizer.h index 1b7996ce4..0305beb0e 100644 --- a/soh/soh/Enhancements/randomizer/Plandomizer.h +++ b/soh/soh/Enhancements/randomizer/Plandomizer.h @@ -41,7 +41,7 @@ typedef struct { typedef enum PlandoTabs { TAB_HINTS, - TAB_LOCATIONS + TAB_LOCATIONS, } PlandoTabs; typedef enum PlandoHints { @@ -49,4 +49,4 @@ typedef enum PlandoHints { HINT_ALL, } PlandoHints; -#endif \ No newline at end of file +#endif diff --git a/soh/soh/Enhancements/randomizer/ShuffleCows.cpp b/soh/soh/Enhancements/randomizer/ShuffleCows.cpp index 5fc86f76d..ff4680a17 100644 --- a/soh/soh/Enhancements/randomizer/ShuffleCows.cpp +++ b/soh/soh/Enhancements/randomizer/ShuffleCows.cpp @@ -59,6 +59,7 @@ void RegisterShuffleCows() { static RegisterShipInitFunc initFunc(RegisterShuffleCows, { "IS_RANDO" }); void Rando::StaticData::RegisterCowLocations() { + // clang-format-off locationTable[RC_KF_LINKS_HOUSE_COW] = Location::Base(RC_KF_LINKS_HOUSE_COW, RCQUEST_BOTH, RCTYPE_COW, ACTOR_EN_COW, SCENE_LINKS_HOUSE, 0x00, "Links House Cow", RHT_KF_LINKS_HOUSE_COW, RG_MILK, SpoilerCollectionCheck::RandomizerInf(RAND_INF_COWS_MILKED_KF_LINKS_HOUSE_COW)); locationTable[RC_HF_COW_GROTTO_COW] = Location::Base(RC_HF_COW_GROTTO_COW, RCQUEST_BOTH, RCTYPE_COW, RCAREA_HYRULE_FIELD, ACTOR_EN_COW, SCENE_GROTTOS, TWO_ACTOR_PARAMS(3485, -291), "Cow Grotto Cow", RHT_HF_COW_GROTTO_COW, RG_MILK, SpoilerCollectionCheck::RandomizerInf(RAND_INF_COWS_MILKED_HF_COW_GROTTO_COW)); locationTable[RC_LLR_STABLES_LEFT_COW] = Location::Base(RC_LLR_STABLES_LEFT_COW, RCQUEST_BOTH, RCTYPE_COW, ACTOR_EN_COW, SCENE_STABLE, TWO_ACTOR_PARAMS(-122, -254), "Stables Left Cow", RHT_LLR_STABLES_LEFT_COW, RG_MILK, SpoilerCollectionCheck::RandomizerInf(RAND_INF_COWS_MILKED_LLR_STABLES_LEFT_COW)); @@ -69,6 +70,8 @@ void Rando::StaticData::RegisterCowLocations() { locationTable[RC_DMT_COW_GROTTO_COW] = Location::Base(RC_DMT_COW_GROTTO_COW, RCQUEST_BOTH, RCTYPE_COW, RCAREA_DEATH_MOUNTAIN_TRAIL, ACTOR_EN_COW, SCENE_GROTTOS, TWO_ACTOR_PARAMS(2444, -471), "Cow Grotto Cow", RHT_DMT_COW_GROTTO_COW, RG_MILK, SpoilerCollectionCheck::RandomizerInf(RAND_INF_COWS_MILKED_DMT_COW_GROTTO_COW)); locationTable[RC_GV_COW] = Location::Base(RC_GV_COW, RCQUEST_BOTH, RCTYPE_COW, ACTOR_EN_COW, SCENE_GERUDO_VALLEY, 0x00, "Cow", RHT_GV_COW, RG_MILK, SpoilerCollectionCheck::RandomizerInf(RAND_INF_COWS_MILKED_GV_COW)); locationTable[RC_JABU_JABUS_BELLY_MQ_COW] = Location::Base(RC_JABU_JABUS_BELLY_MQ_COW, RCQUEST_MQ, RCTYPE_COW, ACTOR_EN_COW, SCENE_JABU_JABU, 0x00, "MQ Cow", RHT_JABU_JABUS_BELLY_MQ_COW, RG_MILK, SpoilerCollectionCheck::RandomizerInf(RAND_INF_COWS_MILKED_JABU_JABUS_BELLY_MQ_COW)); + + // clang-format-on } -static RegisterShipInitFunc registerFunc(Rando::StaticData::RegisterCowLocations); \ No newline at end of file +static RegisterShipInitFunc registerFunc(Rando::StaticData::RegisterCowLocations); diff --git a/soh/soh/Enhancements/randomizer/ShuffleFairies.cpp b/soh/soh/Enhancements/randomizer/ShuffleFairies.cpp index 441591aa0..c9e53e315 100644 --- a/soh/soh/Enhancements/randomizer/ShuffleFairies.cpp +++ b/soh/soh/Enhancements/randomizer/ShuffleFairies.cpp @@ -185,6 +185,7 @@ void ShuffleFairies_UnregisterHooks() { } void Rando::StaticData::RegisterFairyLocations() { + // clang-format off locationTable[RC_SFM_FAIRY_GROTTO_FAIRY_1] = Location::Fairy(RC_SFM_FAIRY_GROTTO_FAIRY_1, RCQUEST_BOTH, RCAREA_SACRED_FOREST_MEADOW, SCENE_FAIRYS_FOUNTAIN, 0x1800, "Grotto Fairy 1", RHT_SFM_FAIRY_GROTTO_FAIRY, SpoilerCollectionCheck::RandomizerInf(RAND_INF_SFM_FAIRY_GROTTO_FAIRY_1)); locationTable[RC_SFM_FAIRY_GROTTO_FAIRY_2] = Location::Fairy(RC_SFM_FAIRY_GROTTO_FAIRY_2, RCQUEST_BOTH, RCAREA_SACRED_FOREST_MEADOW, SCENE_FAIRYS_FOUNTAIN, 0x1801, "Grotto Fairy 2", RHT_SFM_FAIRY_GROTTO_FAIRY, SpoilerCollectionCheck::RandomizerInf(RAND_INF_SFM_FAIRY_GROTTO_FAIRY_2)); locationTable[RC_SFM_FAIRY_GROTTO_FAIRY_3] = Location::Fairy(RC_SFM_FAIRY_GROTTO_FAIRY_3, RCQUEST_BOTH, RCAREA_SACRED_FOREST_MEADOW, SCENE_FAIRYS_FOUNTAIN, 0x1802, "Grotto Fairy 3", RHT_SFM_FAIRY_GROTTO_FAIRY, SpoilerCollectionCheck::RandomizerInf(RAND_INF_SFM_FAIRY_GROTTO_FAIRY_3)); @@ -404,6 +405,8 @@ void Rando::StaticData::RegisterFairyLocations() { locationTable[RC_SHADOW_TEMPLE_MQ_WIND_HINT_SUN_FAIRY] = Location::Fairy(RC_SHADOW_TEMPLE_MQ_WIND_HINT_SUN_FAIRY, RCQUEST_MQ, RCAREA_SHADOW_TEMPLE, SCENE_SHADOW_TEMPLE, TWO_ACTOR_PARAMS(0x1000, -127), "MQ Wind Hint Sun's Song Fairy", RHT_SHADOW_TEMPLE_WIND_HINT_SUN_FAIRY, SpoilerCollectionCheck::RandomizerInf(RAND_INF_SHADOW_TEMPLE_MQ_WIND_HINT_SUN_FAIRY)); locationTable[RC_BOTTOM_OF_THE_WELL_MQ_CELL_SUN_FAIRY] = Location::Fairy(RC_BOTTOM_OF_THE_WELL_MQ_CELL_SUN_FAIRY, RCQUEST_MQ, RCAREA_BOTTOM_OF_THE_WELL, SCENE_BOTTOM_OF_THE_WELL, TWO_ACTOR_PARAMS(0x1000, -437), "MQ East Cell Sun's Song Fairy", RHT_BOTTOM_OF_THE_WELL_MQ_CELL_SUN_FAIRY, SpoilerCollectionCheck::RandomizerInf(RAND_INF_BOTTOM_OF_THE_WELL_MQ_CELL_SUN_FAIRY)); locationTable[RC_BOTTOM_OF_THE_WELL_MQ_BASEMENT_SUN_FAIRY] = Location::Fairy(RC_BOTTOM_OF_THE_WELL_MQ_BASEMENT_SUN_FAIRY, RCQUEST_MQ, RCAREA_BOTTOM_OF_THE_WELL, SCENE_BOTTOM_OF_THE_WELL, TWO_ACTOR_PARAMS(0x1000, -1458), "MQ Basement Sun's Song Fairy", RHT_BOTTOM_OF_THE_WELL_MQ_BASEMENT_SUN_FAIRY, SpoilerCollectionCheck::RandomizerInf(RAND_INF_BOTTOM_OF_THE_WELL_MQ_BASEMENT_SUN_FAIRY)); + + // clang-format on } static RegisterShipInitFunc initFunc(Rando::StaticData::RegisterFairyLocations); diff --git a/soh/soh/Enhancements/randomizer/ShuffleFreestanding.cpp b/soh/soh/Enhancements/randomizer/ShuffleFreestanding.cpp index c35cab107..858e9f3e2 100644 --- a/soh/soh/Enhancements/randomizer/ShuffleFreestanding.cpp +++ b/soh/soh/Enhancements/randomizer/ShuffleFreestanding.cpp @@ -45,6 +45,7 @@ void ShuffleFreestanding_OnVanillaBehaviorHandler(GIVanillaBehavior id, bool* sh } void Rando::StaticData::RegisterFreestandingLocations() { + // clang-format off locationTable[RC_KF_BOULDER_RUPEE_2] = Location::Collectable(RC_KF_BOULDER_RUPEE_2, RCQUEST_BOTH, RCTYPE_FREESTANDING, ACTOR_EN_ITEM00, SCENE_KOKIRI_FOREST, TWO_ACTOR_PARAMS(-712, 1857), "Boulder Maze Second Rupee", RHT_KOKIRI_FOREST_RUPEE, RG_BLUE_RUPEE, SpoilerCollectionCheck::RandomizerInf(RAND_INF_KF_BOULDER_RUPEE_2)); locationTable[RC_KF_BOULDER_RUPEE_1] = Location::Collectable(RC_KF_BOULDER_RUPEE_1, RCQUEST_BOTH, RCTYPE_FREESTANDING, ACTOR_EN_ITEM00, SCENE_KOKIRI_FOREST, TWO_ACTOR_PARAMS(-1009, 1556), "Boulder Maze First Rupee", RHT_KOKIRI_FOREST_RUPEE, RG_BLUE_RUPEE, SpoilerCollectionCheck::RandomizerInf(RAND_INF_KF_BOULDER_RUPEE_1)); locationTable[RC_KF_BRIDGE_RUPEE] = Location::Collectable(RC_KF_BRIDGE_RUPEE, RCQUEST_BOTH, RCTYPE_FREESTANDING, ACTOR_EN_ITEM00, SCENE_KOKIRI_FOREST, TWO_ACTOR_PARAMS(2, -45), "Bridge Rupee", RHT_KOKIRI_FOREST_RUPEE, RG_BLUE_RUPEE, SpoilerCollectionCheck::RandomizerInf(RAND_INF_KF_BRIDGE_RUPEE)); @@ -275,6 +276,8 @@ void Rando::StaticData::RegisterFreestandingLocations() { locationTable[RC_GANONS_CASTLE_MQ_WATER_TRIAL_HEART] = Location::Collectable(RC_GANONS_CASTLE_MQ_WATER_TRIAL_HEART, RCQUEST_MQ, RCTYPE_FREESTANDING, ACTOR_EN_ITEM00, SCENE_INSIDE_GANONS_CASTLE, TWO_ACTOR_PARAMS(1743, -528), "MQ Water Trial Heart", RHT_GANONS_CASTLE_HEART, RG_RECOVERY_HEART, SpoilerCollectionCheck::RandomizerInf(RAND_INF_GANONS_CASTLE_MQ_WATER_TRIAL_HEART)); locationTable[RC_GANONS_CASTLE_MQ_LIGHT_TRIAL_RIGHT_HEART] = Location::Collectable(RC_GANONS_CASTLE_MQ_LIGHT_TRIAL_RIGHT_HEART, RCQUEST_MQ, RCTYPE_FREESTANDING, ACTOR_EN_ITEM00, SCENE_INSIDE_GANONS_CASTLE, TWO_ACTOR_PARAMS(-2506, -1096), "MQ Light Trial Right Heart", RHT_GANONS_CASTLE_HEART, RG_RECOVERY_HEART, SpoilerCollectionCheck::RandomizerInf(RAND_INF_GANONS_CASTLE_MQ_LIGHT_TRIAL_RIGHT_HEART)); locationTable[RC_GANONS_CASTLE_MQ_LIGHT_TRIAL_LEFT_HEART] = Location::Collectable(RC_GANONS_CASTLE_MQ_LIGHT_TRIAL_LEFT_HEART, RCQUEST_MQ, RCTYPE_FREESTANDING, ACTOR_EN_ITEM00, SCENE_INSIDE_GANONS_CASTLE, TWO_ACTOR_PARAMS(-2655, -549), "MQ Light Trial Left Heart", RHT_GANONS_CASTLE_HEART, RG_RECOVERY_HEART, SpoilerCollectionCheck::RandomizerInf(RAND_INF_GANONS_CASTLE_MQ_LIGHT_TRIAL_LEFT_HEART)); + + // clang-format on } -static RegisterShipInitFunc initFunc(Rando::StaticData::RegisterFreestandingLocations); \ No newline at end of file +static RegisterShipInitFunc initFunc(Rando::StaticData::RegisterFreestandingLocations); diff --git a/soh/soh/Enhancements/randomizer/ShufflePots.cpp b/soh/soh/Enhancements/randomizer/ShufflePots.cpp index cbc96cd1d..41b586455 100644 --- a/soh/soh/Enhancements/randomizer/ShufflePots.cpp +++ b/soh/soh/Enhancements/randomizer/ShufflePots.cpp @@ -95,6 +95,7 @@ void ShufflePots_OnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va } void Rando::StaticData::RegisterPotLocations() { + // clang-format off // Overworld Pots // Randomizer Check Randomizer Check Quest Area Scene ID Params Short Name Hint Text Key Vanilla Spoiler Collection Check locationTable[RC_KF_LINKS_HOUSE_POT] = Location::Pot(RC_KF_LINKS_HOUSE_POT, RCQUEST_BOTH, RCAREA_KOKIRI_FOREST, SCENE_LINKS_HOUSE, TWO_ACTOR_PARAMS(-118, 51), "Links House Pot", RHT_POT_KOKIRI_FOREST, RG_RECOVERY_HEART, SpoilerCollectionCheck::RandomizerInf(RAND_INF_KF_LINKS_HOUSE_POT)); @@ -643,6 +644,8 @@ void Rando::StaticData::RegisterPotLocations() { locationTable[RC_GERUDO_TRAINING_GROUND_MQ_LOBBY_LEFT_POT_2] = Location::Pot(RC_GERUDO_TRAINING_GROUND_MQ_LOBBY_LEFT_POT_2, RCQUEST_MQ, RCAREA_GERUDO_TRAINING_GROUND, SCENE_GERUDO_TRAINING_GROUND, TWO_ACTOR_PARAMS(-324, -177), "MQ Lobby Left Pot 2", RHT_POT_GERUDO_TRAINING_GROUND, RG_RECOVERY_HEART, SpoilerCollectionCheck::RandomizerInf(RAND_INF_GERUDO_TRAINING_GROUND_MQ_LOBBY_LEFT_POT_2)); locationTable[RC_GERUDO_TRAINING_GROUND_MQ_LOBBY_RIGHT_POT_1] = Location::Pot(RC_GERUDO_TRAINING_GROUND_MQ_LOBBY_RIGHT_POT_1, RCQUEST_MQ, RCAREA_GERUDO_TRAINING_GROUND, SCENE_GERUDO_TRAINING_GROUND, TWO_ACTOR_PARAMS(199, -79), "MQ Lobby Right Pot 1", RHT_POT_GERUDO_TRAINING_GROUND, RG_RECOVERY_HEART, SpoilerCollectionCheck::RandomizerInf(RAND_INF_GERUDO_TRAINING_GROUND_MQ_LOBBY_RIGHT_POT_1)); locationTable[RC_GERUDO_TRAINING_GROUND_MQ_LOBBY_RIGHT_POT_2] = Location::Pot(RC_GERUDO_TRAINING_GROUND_MQ_LOBBY_RIGHT_POT_2, RCQUEST_MQ, RCAREA_GERUDO_TRAINING_GROUND, SCENE_GERUDO_TRAINING_GROUND, TWO_ACTOR_PARAMS(197, -179), "MQ Lobby Right Pot 2", RHT_POT_GERUDO_TRAINING_GROUND, RG_BLUE_RUPEE, SpoilerCollectionCheck::RandomizerInf(RAND_INF_GERUDO_TRAINING_GROUND_MQ_LOBBY_RIGHT_POT_2)); + + // clang-format on } -static RegisterShipInitFunc initFunc(Rando::StaticData::RegisterPotLocations); \ No newline at end of file +static RegisterShipInitFunc initFunc(Rando::StaticData::RegisterPotLocations); diff --git a/soh/soh/Enhancements/randomizer/entrance.cpp b/soh/soh/Enhancements/randomizer/entrance.cpp index 81afbf33c..74eaaa50e 100644 --- a/soh/soh/Enhancements/randomizer/entrance.cpp +++ b/soh/soh/Enhancements/randomizer/entrance.cpp @@ -856,6 +856,7 @@ int EntranceShuffler::ShuffleAllEntrances() { mCurNumRandomizedEntrances = 0; std::vector entranceShuffleTable = { + // clang-format off // Type Parent Region Connected Region Index { { EntranceType::Dungeon, RR_KF_OUTSIDE_DEKU_TREE, RR_DEKU_TREE_ENTRYWAY, ENTR_DEKU_TREE_ENTRANCE }, { EntranceType::Dungeon, RR_DEKU_TREE_ENTRYWAY, RR_KF_OUTSIDE_DEKU_TREE, ENTR_KOKIRI_FOREST_OUTSIDE_DEKU_TREE } }, @@ -1161,6 +1162,7 @@ int EntranceShuffler::ShuffleAllEntrances() { NO_RETURN_ENTRANCE }, { { EntranceType::BlueWarp, RR_SHADOW_TEMPLE_BOSS_ROOM, RR_GRAVEYARD_WARP_PAD_REGION, ENTR_GRAVEYARD_SHADOW_TEMPLE_BLUE_WARP }, NO_RETURN_ENTRANCE }, + // clang-format on }; std::map priorityEntranceTable = { diff --git a/soh/soh/Enhancements/randomizer/fishsanity.cpp b/soh/soh/Enhancements/randomizer/fishsanity.cpp index 9da52ddc2..e2a013906 100644 --- a/soh/soh/Enhancements/randomizer/fishsanity.cpp +++ b/soh/soh/Enhancements/randomizer/fishsanity.cpp @@ -580,6 +580,7 @@ extern "C" { } void Rando::StaticData::RegisterFishLocations() { + // clang-format off // Fishing Pond locationTable[RC_LH_CHILD_FISH_1] = Location::Fish(RC_LH_CHILD_FISH_1, RCQUEST_BOTH, ACTOR_FISHING, SCENE_FISHING_POND, 100, RAND_INF_CHILD_FISH_1, "Child Pond Fish 1", RHT_LH_POND_FISH, RG_NONE); locationTable[RC_LH_CHILD_FISH_2] = Location::Fish(RC_LH_CHILD_FISH_2, RCQUEST_BOTH, ACTOR_FISHING, SCENE_FISHING_POND, 101, RAND_INF_CHILD_FISH_2, "Child Pond Fish 2", RHT_LH_POND_FISH, RG_NONE); @@ -630,6 +631,7 @@ void Rando::StaticData::RegisterFishLocations() { locationTable[RC_ZD_FISH_3] = Location::Fish(RC_ZD_FISH_3, RCQUEST_BOTH, ACTOR_EN_FISH, SCENE_ZORAS_DOMAIN, -1 ^ 2, RAND_INF_ZD_FISH_3, "Fish 3", RHT_ZD_FISH, RG_FISH); locationTable[RC_ZD_FISH_4] = Location::Fish(RC_ZD_FISH_4, RCQUEST_BOTH, ACTOR_EN_FISH, SCENE_ZORAS_DOMAIN, -1 ^ 3, RAND_INF_ZD_FISH_4, "Fish 4", RHT_ZD_FISH, RG_FISH); locationTable[RC_ZD_FISH_5] = Location::Fish(RC_ZD_FISH_5, RCQUEST_BOTH, ACTOR_EN_FISH, SCENE_ZORAS_DOMAIN, -1 ^ 4, RAND_INF_ZD_FISH_5, "Fish 5", RHT_ZD_FISH, RG_FISH); + // clang-format on } static RegisterShipInitFunc initFunc(Rando::StaticData::RegisterFishLocations); diff --git a/soh/soh/Enhancements/randomizer/fishsanity.h b/soh/soh/Enhancements/randomizer/fishsanity.h index 91d021157..642443136 100644 --- a/soh/soh/Enhancements/randomizer/fishsanity.h +++ b/soh/soh/Enhancements/randomizer/fishsanity.h @@ -14,7 +14,7 @@ typedef struct { typedef enum { FSO_SOURCE_RANDO, - FSO_SOURCE_CVARS + FSO_SOURCE_CVARS, } FishsanityOptionsSource; typedef enum { diff --git a/soh/soh/Enhancements/randomizer/hook_handlers.cpp b/soh/soh/Enhancements/randomizer/hook_handlers.cpp index 71ba78d60..3b7e9c81a 100644 --- a/soh/soh/Enhancements/randomizer/hook_handlers.cpp +++ b/soh/soh/Enhancements/randomizer/hook_handlers.cpp @@ -236,6 +236,7 @@ void RandomizerOnFlagSetHandler(int16_t flagType, int16_t flag) { RandomizerCheck rc = GetRandomizerCheckFromFlag(flagType, flag); if (rc == RC_UNKNOWN_CHECK) return; + if (flagType == FLAG_GS_TOKEN && Rando::Context::GetInstance()->GetOption(RSK_SHUFFLE_TOKENS).Is(RO_TOKENSANITY_OFF)) return; auto loc = Rando::Context::GetInstance()->GetItemLocation(rc); if (loc == nullptr || loc->HasObtained() || loc->GetPlacedRandomizerGet() == RG_NONE) return; @@ -300,12 +301,12 @@ void RandomizerOnPlayerUpdateForRCQueueHandler() { // Always show ItemGet animation outside of randomizer to keep behaviour consistent in vanilla IS_RANDO && ( - CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("TimeSavers.SkipGetItemAnimation"), SGIA_DISABLED) == SGIA_ALL || + CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("TimeSavers.SkipGetItemAnimation"), SGIA_JUNK) == SGIA_ALL || ( - CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("TimeSavers.SkipGetItemAnimation"), SGIA_DISABLED) == SGIA_JUNK && + CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("TimeSavers.SkipGetItemAnimation"), SGIA_JUNK) == SGIA_JUNK && ( //crude fix to ensure map hints are readable. Ideally replace with better hint tracking. - !(getItemEntry.getItemId >= RG_DEKU_TREE_MAP && getItemEntry.getItemId <= RG_ICE_CAVERN_MAP) && ( + !(getItemEntry.getItemId >= RG_DEKU_TREE_MAP && getItemEntry.getItemId <= RG_ICE_CAVERN_MAP && getItemEntry.modIndex == MOD_RANDOMIZER) && ( getItemEntry.getItemCategory == ITEM_CATEGORY_JUNK || getItemEntry.getItemCategory == ITEM_CATEGORY_SKULLTULA_TOKEN || getItemEntry.getItemCategory == ITEM_CATEGORY_LESSER @@ -767,7 +768,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l } case VB_PLAY_SLOW_CHEST_CS: { // We force fast chests if SkipGetItemAnimation is enabled because the camera in the CS looks pretty wonky otherwise - if (CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("TimeSavers.SkipGetItemAnimation"), SGIA_DISABLED)) { + if (CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("TimeSavers.SkipGetItemAnimation"), SGIA_JUNK)) { *should = false; } break; @@ -1610,7 +1611,6 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l case VB_GIVE_ITEM_FROM_LAB_DIVE: case VB_GIVE_ITEM_FROM_SKULL_KID_SARIAS_SONG: case VB_GIVE_ITEM_FROM_MAN_ON_ROOF: - case VB_GIVE_ITEM_SKULL_TOKEN: case VB_GIVE_ITEM_FROM_BLUE_WARP: case VB_GIVE_ITEM_FAIRY_OCARINA: case VB_GIVE_ITEM_WEIRD_EGG: @@ -1626,6 +1626,9 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l case VB_GIVE_ITEM_SHADOW_MEDALLION: *should = false; break; + case VB_GIVE_ITEM_SKULL_TOKEN: + *should = (Rando::Context::GetInstance()->GetOption(RSK_SHUFFLE_TOKENS).Is(RO_TOKENSANITY_OFF)); + break; default: break; } @@ -2044,15 +2047,15 @@ void RandomizerOnActorInitHandler(void* actorRef) { return; } - if ( - // If child is in the adult shooting gallery or adult in the child shooting gallery, then despawn the shooting gallery man - actor->id == ACTOR_EN_SYATEKI_MAN && - RAND_GET_OPTION(RSK_SHUFFLE_INTERIOR_ENTRANCES) && - ( - (LINK_IS_CHILD && Entrance_SceneAndSpawnAre(SCENE_SHOOTING_GALLERY, 0x00)) || //Kakariko Village -> Adult Shooting Gallery, index 003B in the entrance table - (LINK_IS_ADULT && Entrance_SceneAndSpawnAre(SCENE_SHOOTING_GALLERY, 0x01)) //Market -> Child Shooting Gallery, index 016D in the entrance table - ) - ) { + // If child is in the adult shooting gallery or adult in the child shooting gallery, then despawn the shooting + // gallery man + if (actor->id == ACTOR_EN_SYATEKI_MAN && RAND_GET_OPTION(RSK_SHUFFLE_INTERIOR_ENTRANCES) && + ((LINK_IS_CHILD && + // Kakariko Village -> Adult Shooting Gallery, index 003B in the entrance table + Entrance_SceneAndSpawnAre(SCENE_SHOOTING_GALLERY, 0x00)) || + (LINK_IS_ADULT && + // Market -> Child Shooting Gallery, index 016D in the entrance table + Entrance_SceneAndSpawnAre(SCENE_SHOOTING_GALLERY, 0x01)))) { Actor_Kill(actor); return; } diff --git a/soh/soh/Enhancements/randomizer/item_list.cpp b/soh/soh/Enhancements/randomizer/item_list.cpp index 2f48ddb69..5e5ccc67b 100644 --- a/soh/soh/Enhancements/randomizer/item_list.cpp +++ b/soh/soh/Enhancements/randomizer/item_list.cpp @@ -10,6 +10,8 @@ std::array Rando::StaticData::itemTable; std::unordered_map Rando::StaticData::itemNameToEnum; void Rando::StaticData::InitItemTable() { + + // clang-format off itemTable[RG_NONE] = Item(RG_NONE, ITEMTYPE_EVENT, GI_RUPEE_GREEN, false, LOGIC_NONE, RHT_NONE, ITEM_NONE, 0, 0, 0, 0, 0, ITEM_CATEGORY_JUNK, MOD_NONE); // Randomizer Get Randomizer Get Type Get Item ID Adv. Logic Value Hint Text Key Item ID Object ID Draw ID Text ID field Chest Animation Item Category Mod Index itemTable[RG_KOKIRI_SWORD] = Item(RG_KOKIRI_SWORD, ITEMTYPE_EQUIP, GI_SWORD_KOKIRI, true, LOGIC_KOKIRI_SWORD, RHT_KOKIRI_SWORD, ITEM_SWORD_KOKIRI, OBJECT_GI_SWORD_1, GID_SWORD_KOKIRI, 0xA4, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_NONE); @@ -398,6 +400,8 @@ void Rando::StaticData::InitItemTable() { itemTable[RG_MAGIC_DOUBLE] = Item(RG_MAGIC_DOUBLE, ITEMTYPE_ITEM, 0x8A, true, LOGIC_PROGRESSIVE_MAGIC, RHT_MAGIC_DOUBLE, RG_MAGIC_DOUBLE, OBJECT_GI_MAGICPOT, GID_MAGIC_LARGE, 0xE8, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_LESSER, MOD_RANDOMIZER); itemTable[RG_TRIFORCE_PIECE] = Item(RG_TRIFORCE_PIECE, ITEMTYPE_ITEM, 0xDF, true, LOGIC_TRIFORCE_PIECES, RHT_TRIFORCE_PIECE, RG_TRIFORCE_PIECE, OBJECT_GI_BOMB_2, GID_TRIFORCE_PIECE, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_RANDOMIZER); + // clang-format on + // Init itemNameToEnum for (auto& item : itemTable) { std::vector strings = item.GetName().GetAllMessages(); diff --git a/soh/soh/Enhancements/randomizer/location_access.cpp b/soh/soh/Enhancements/randomizer/location_access.cpp index a45e27cd0..f6b55868b 100644 --- a/soh/soh/Enhancements/randomizer/location_access.cpp +++ b/soh/soh/Enhancements/randomizer/location_access.cpp @@ -261,6 +261,7 @@ void RegionTable_Init() { //locations which appear in both MQ and Vanilla dungeons don't get set in both areas. areaTable.fill(Region("Invalid Region", "Invalid Region", {}, NO_DAY_NIGHT_CYCLE, {}, {}, {})); + // clang-format off areaTable[RR_ROOT] = Region("Root", "", {RA_LINKS_POCKET}, NO_DAY_NIGHT_CYCLE, { //Events EventAccess(&logic->KakarikoVillageGateOpen, []{return ctx->GetOption(RSK_KAK_GATE).Is(RO_KAK_GATE_OPEN);}), @@ -326,6 +327,8 @@ void RegionTable_Init() { Entrance(RR_TEMPLE_OF_TIME, []{return true;}), }); + // clang-format on + // Overworld RegionTable_Init_KokiriForest(); RegionTable_Init_LostWoods(); @@ -571,4 +574,4 @@ Rando::Entrance* GetEntrance(const std::string name) { } return nullptr; -} \ No newline at end of file +} diff --git a/soh/soh/Enhancements/randomizer/location_access/dungeons/bottom_of_the_well.cpp b/soh/soh/Enhancements/randomizer/location_access/dungeons/bottom_of_the_well.cpp index 171542ea3..2a913f4a9 100644 --- a/soh/soh/Enhancements/randomizer/location_access/dungeons/bottom_of_the_well.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/dungeons/bottom_of_the_well.cpp @@ -5,6 +5,7 @@ using namespace Rando; void RegionTable_Init_BottomOfTheWell() { + // clang-format off // Vanilla/MQ Decider areaTable[RR_BOTTOM_OF_THE_WELL_ENTRYWAY] = Region("Bottom of the Well Entryway", "Bottom of the Well", {RA_BOTTOM_OF_THE_WELL}, NO_DAY_NIGHT_CYCLE, {}, {}, { //Exits @@ -293,4 +294,5 @@ void RegionTable_Init_BottomOfTheWell() { }); #pragma endregion -} \ No newline at end of file + // clang-format on +} diff --git a/soh/soh/Enhancements/randomizer/location_access/dungeons/deku_tree.cpp b/soh/soh/Enhancements/randomizer/location_access/dungeons/deku_tree.cpp index 4740a7541..21a7151da 100644 --- a/soh/soh/Enhancements/randomizer/location_access/dungeons/deku_tree.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/dungeons/deku_tree.cpp @@ -5,6 +5,7 @@ using namespace Rando; void RegionTable_Init_DekuTree() { + // clang-format off // Vanilla/MQ Decider areaTable[RR_DEKU_TREE_ENTRYWAY] = Region("Deku Tree Entryway", "Deku Tree", {RA_DEKU_TREE}, NO_DAY_NIGHT_CYCLE, {}, {}, { //Exits @@ -216,7 +217,7 @@ void RegionTable_Init_DekuTree() { LOCATION(RC_DEKU_TREE_MQ_COMPASS_CHEST, true), }, { //Exits - Entrance(RR_DEKU_TREE_MQ_EYE_TARGET_ROOM, []{return true;}), + Entrance(RR_DEKU_TREE_MQ_EYE_TARGET_ROOM, []{return logic->CanUse(RG_FAIRY_SLINGSHOT) || logic->CanUse(RG_HOVER_BOOTS);}), Entrance(RR_DEKU_TREE_MQ_PAST_BOULDER_VINES, []{return Here(RR_DEKU_TREE_MQ_COMPASS_ROOM, []{return logic->CanUse(RG_BOMBCHU_5) || (logic->CanUse(RG_BOMB_BAG) && (logic->CanUse(RG_SONG_OF_TIME) || logic->IsAdult || logic->CanUse(RG_HOVER_BOOTS))) || (logic->CanUse(RG_MEGATON_HAMMER) && (logic->CanUse(RG_SONG_OF_TIME) || ctx->GetTrickOption(RT_DEKU_MQ_COMPASS_GS)));});}), }); @@ -360,4 +361,6 @@ void RegionTable_Init_DekuTree() { Entrance(RR_DEKU_TREE_BOSS_ENTRYWAY, []{return true;}), Entrance(RR_KF_OUTSIDE_DEKU_TREE, []{return logic->DekuTreeClear;}, false), }); -} \ No newline at end of file + + // clang-format on +} diff --git a/soh/soh/Enhancements/randomizer/location_access/dungeons/dodongos_cavern.cpp b/soh/soh/Enhancements/randomizer/location_access/dungeons/dodongos_cavern.cpp index 4ae2e1e70..738368117 100644 --- a/soh/soh/Enhancements/randomizer/location_access/dungeons/dodongos_cavern.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/dungeons/dodongos_cavern.cpp @@ -5,6 +5,7 @@ using namespace Rando; void RegionTable_Init_DodongosCavern() { + // clang-format off // Vanilla/MQ Decider areaTable[RR_DODONGOS_CAVERN_ENTRYWAY] = Region("Dodongos Cavern Entryway", "Dodongos Cavern", {RA_DODONGOS_CAVERN}, NO_DAY_NIGHT_CYCLE, {}, {}, { //Exits @@ -541,4 +542,6 @@ void RegionTable_Init_DodongosCavern() { Entrance(RR_DODONGOS_CAVERN_BOSS_ENTRYWAY, []{return true;}), Entrance(RR_DEATH_MOUNTAIN_TRAIL, []{return logic->DodongosCavernClear;}, false), }); -} \ No newline at end of file + + // clang-format on +} diff --git a/soh/soh/Enhancements/randomizer/location_access/dungeons/fire_temple.cpp b/soh/soh/Enhancements/randomizer/location_access/dungeons/fire_temple.cpp index a17cfc598..1af91e7be 100644 --- a/soh/soh/Enhancements/randomizer/location_access/dungeons/fire_temple.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/dungeons/fire_temple.cpp @@ -5,6 +5,7 @@ using namespace Rando; void RegionTable_Init_FireTemple() { + // clang-format off // Vanilla/MQ Decider areaTable[RR_FIRE_TEMPLE_ENTRYWAY] = Region("Fire Temple Entryway", "Fire Temple", {RA_FIRE_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {}, { //Exits @@ -715,4 +716,6 @@ void RegionTable_Init_FireTemple() { Entrance(RR_FIRE_TEMPLE_BOSS_ENTRYWAY, []{return false;}), Entrance(RR_DMC_CENTRAL_LOCAL, []{return logic->FireTempleClear;}, false), }); -} \ No newline at end of file + + // clang-format on +} diff --git a/soh/soh/Enhancements/randomizer/location_access/dungeons/forest_temple.cpp b/soh/soh/Enhancements/randomizer/location_access/dungeons/forest_temple.cpp index 04efd4994..3e595c735 100644 --- a/soh/soh/Enhancements/randomizer/location_access/dungeons/forest_temple.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/dungeons/forest_temple.cpp @@ -5,6 +5,7 @@ using namespace Rando; void RegionTable_Init_ForestTemple() { + // clang-format off // Vanilla/MQ Decider areaTable[RR_FOREST_TEMPLE_ENTRYWAY] = Region("Forest Temple Entryway", "Forest Temple", {RA_FOREST_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {}, { //Exits @@ -610,4 +611,6 @@ void RegionTable_Init_ForestTemple() { Entrance(RR_FOREST_TEMPLE_BOSS_ENTRYWAY, []{return false;}), Entrance(RR_SACRED_FOREST_MEADOW, []{return logic->ForestTempleClear;}, false), }); -} \ No newline at end of file + + // clang-format on +} diff --git a/soh/soh/Enhancements/randomizer/location_access/dungeons/ganons_castle.cpp b/soh/soh/Enhancements/randomizer/location_access/dungeons/ganons_castle.cpp index c1a846564..ded6c8279 100644 --- a/soh/soh/Enhancements/randomizer/location_access/dungeons/ganons_castle.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/dungeons/ganons_castle.cpp @@ -6,6 +6,7 @@ using namespace Rando; void RegionTable_Init_GanonsCastle() { + // clang-format off // Vanilla/MQ Decider areaTable[RR_GANONS_CASTLE_ENTRYWAY] = Region("Ganon's Castle Entryway", "Ganon's Castle", {RA_GANONS_CASTLE}, NO_DAY_NIGHT_CYCLE, {}, {}, { //Exits @@ -511,4 +512,5 @@ void RegionTable_Init_GanonsCastle() { }, {}); #pragma endregion -} \ No newline at end of file + // clang-format on +} diff --git a/soh/soh/Enhancements/randomizer/location_access/dungeons/gerudo_training_ground.cpp b/soh/soh/Enhancements/randomizer/location_access/dungeons/gerudo_training_ground.cpp index 0c45d755c..f95b32239 100644 --- a/soh/soh/Enhancements/randomizer/location_access/dungeons/gerudo_training_ground.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/dungeons/gerudo_training_ground.cpp @@ -5,6 +5,7 @@ using namespace Rando; void RegionTable_Init_GerudoTrainingGround() { + // clang-format off // Vanilla/MQ Decider areaTable[RR_GERUDO_TRAINING_GROUND_ENTRYWAY] = Region("Gerudo Training Ground Entryway", "Gerudo Training Ground", {RA_GERUDO_TRAINING_GROUND}, NO_DAY_NIGHT_CYCLE, {}, {}, { //Exits @@ -321,4 +322,5 @@ void RegionTable_Init_GerudoTrainingGround() { }); #pragma endregion -} \ No newline at end of file + // clang-format on +} diff --git a/soh/soh/Enhancements/randomizer/location_access/dungeons/ice_cavern.cpp b/soh/soh/Enhancements/randomizer/location_access/dungeons/ice_cavern.cpp index 879ac1dce..ff2bf9594 100644 --- a/soh/soh/Enhancements/randomizer/location_access/dungeons/ice_cavern.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/dungeons/ice_cavern.cpp @@ -5,6 +5,7 @@ using namespace Rando; void RegionTable_Init_IceCavern() { + // clang-format off // Vanilla/MQ Decider areaTable[RR_ICE_CAVERN_ENTRYWAY] = Region("Ice Cavern Entryway", "Ice Cavern", {RA_ICE_CAVERN}, NO_DAY_NIGHT_CYCLE, {}, {}, { //Exits @@ -144,4 +145,5 @@ void RegionTable_Init_IceCavern() { }, {}); #pragma endregion -} \ No newline at end of file + // clang-format on +} diff --git a/soh/soh/Enhancements/randomizer/location_access/dungeons/jabujabus_belly.cpp b/soh/soh/Enhancements/randomizer/location_access/dungeons/jabujabus_belly.cpp index 7bfb98a87..8e3c8a8d4 100644 --- a/soh/soh/Enhancements/randomizer/location_access/dungeons/jabujabus_belly.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/dungeons/jabujabus_belly.cpp @@ -5,6 +5,7 @@ using namespace Rando; void RegionTable_Init_JabuJabusBelly() { + // clang-format off // Vanilla/MQ Decider areaTable[RR_JABU_JABUS_BELLY_ENTRYWAY] = Region("Jabu Jabus Belly Entryway", "Jabu Jabus Belly", {RA_JABU_JABUS_BELLY}, NO_DAY_NIGHT_CYCLE, {}, {}, { //Exits @@ -356,4 +357,6 @@ void RegionTable_Init_JabuJabusBelly() { Entrance(RR_JABU_JABUS_BELLY_BOSS_ENTRYWAY, []{return false;}), Entrance(RR_ZORAS_FOUNTAIN, []{return logic->JabuJabusBellyClear;}, false), }); -} \ No newline at end of file + + // clang-format on +} diff --git a/soh/soh/Enhancements/randomizer/location_access/dungeons/shadow_temple.cpp b/soh/soh/Enhancements/randomizer/location_access/dungeons/shadow_temple.cpp index 8cf70fc3f..1ed814adb 100644 --- a/soh/soh/Enhancements/randomizer/location_access/dungeons/shadow_temple.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/dungeons/shadow_temple.cpp @@ -5,6 +5,7 @@ using namespace Rando; void RegionTable_Init_ShadowTemple() { + // clang-format off // Vanilla/MQ Decider areaTable[RR_SHADOW_TEMPLE_ENTRYWAY] = Region("Shadow Temple Entryway", "Shadow Temple", {RA_SHADOW_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {}, { //Exits @@ -409,4 +410,6 @@ void RegionTable_Init_ShadowTemple() { Entrance(RR_SHADOW_TEMPLE_BOSS_ENTRYWAY, []{return false;}), Entrance(RR_GRAVEYARD_WARP_PAD_REGION, []{return logic->ShadowTempleClear;}, false), }); -} \ No newline at end of file + + // clang-format on +} diff --git a/soh/soh/Enhancements/randomizer/location_access/dungeons/spirit_temple.cpp b/soh/soh/Enhancements/randomizer/location_access/dungeons/spirit_temple.cpp index e3d00ccf3..7982f9ae5 100644 --- a/soh/soh/Enhancements/randomizer/location_access/dungeons/spirit_temple.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/dungeons/spirit_temple.cpp @@ -5,6 +5,7 @@ using namespace Rando; void RegionTable_Init_SpiritTemple() { + // clang-format off // Vanilla/MQ Decider areaTable[RR_SPIRIT_TEMPLE_ENTRYWAY] = Region("Spirit Temple Entryway", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {}, { //Exits @@ -554,4 +555,6 @@ void RegionTable_Init_SpiritTemple() { Entrance(RR_SPIRIT_TEMPLE_BOSS_ENTRYWAY, []{return false;}), Entrance(RR_DESERT_COLOSSUS, []{return logic->SpiritTempleClear;}, false), }); -} \ No newline at end of file + + // clang-format on +} diff --git a/soh/soh/Enhancements/randomizer/location_access/dungeons/water_temple.cpp b/soh/soh/Enhancements/randomizer/location_access/dungeons/water_temple.cpp index 4d2fbb9bf..ddf72fba0 100644 --- a/soh/soh/Enhancements/randomizer/location_access/dungeons/water_temple.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/dungeons/water_temple.cpp @@ -5,6 +5,7 @@ using namespace Rando; void RegionTable_Init_WaterTemple() { + // clang-format off // Vanilla/MQ Decider areaTable[RR_WATER_TEMPLE_ENTRYWAY] = Region("Water Temple Entryway", "Water Temple", {RA_WATER_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {}, { //Exits @@ -735,4 +736,6 @@ void RegionTable_Init_WaterTemple() { Entrance(RR_WATER_TEMPLE_BOSS_ENTRYWAY, []{return false;}), Entrance(RR_LAKE_HYLIA, []{return logic->WaterTempleClear;}, false), }); -} \ No newline at end of file + + // clang-format on +} diff --git a/soh/soh/Enhancements/randomizer/location_access/gerudo_fortress.cpp b/soh/soh/Enhancements/randomizer/location_access/gerudo_fortress.cpp index 6af0551e0..2dcdf71bb 100644 --- a/soh/soh/Enhancements/randomizer/location_access/gerudo_fortress.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/gerudo_fortress.cpp @@ -9,6 +9,7 @@ using namespace Rando; */ void RegionTable_Init_GerudoFortress() { + // clang-format off areaTable[RR_GERUDO_FORTRESS] = Region("Gerudo Fortress", "Gerudo Fortress", {RA_GERUDO_FORTRESS}, NO_DAY_NIGHT_CYCLE, { //Events EventAccess(&logic->CarpenterRescue, []{return logic->CanFinishGerudoFortress();}), @@ -78,4 +79,6 @@ void RegionTable_Init_GerudoFortress() { //Exits Entrance(RR_GERUDO_FORTRESS, []{return true;}), }); -} \ No newline at end of file + + // clang-format on +} diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/castle_grounds.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/castle_grounds.cpp index b4b77056b..33022e270 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/castle_grounds.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/castle_grounds.cpp @@ -4,6 +4,7 @@ using namespace Rando; void RegionTable_Init_CastleGrounds() { + // clang-format off //With multi-area support {RA_CASTLE_GROUNDS} is not strictly required anymore, as any interior here could inherit both //{RA_HYRULE_CASTLE} and {RA_OUTSIDE_GANONS_CASTLE}, but a setting to merge the latter 2 into the former may be preferred areaTable[RR_CASTLE_GROUNDS] = Region("Castle Grounds", "Castle Grounds", {RA_CASTLE_GROUNDS}, NO_DAY_NIGHT_CYCLE, {}, {}, { @@ -21,7 +22,7 @@ void RegionTable_Init_CastleGrounds() { }, { //Locations LOCATION(RC_HC_MALON_EGG, true), - LOCATION(RC_HC_GS_TREE, logic->IsChild && logic->CanAttack()), + LOCATION(RC_HC_GS_TREE, logic->IsChild && logic->CanKillEnemy(RE_GOLD_SKULLTULA, ED_CLOSE)), LOCATION(RC_HC_MALON_GOSSIP_STONE_FAIRY, logic->CallGossipFairy()), LOCATION(RC_HC_MALON_GOSSIP_STONE_FAIRY_BIG, logic->CanUse(RG_SONG_OF_STORMS)), LOCATION(RC_HC_ROCK_WALL_GOSSIP_STONE_FAIRY, logic->CallGossipFairy()), @@ -114,4 +115,6 @@ void RegionTable_Init_CastleGrounds() { Entrance(RR_GANONS_CASTLE_GROUNDS, []{return logic->BuiltRainbowBridge;}), Entrance(RR_GANONS_CASTLE_ENTRYWAY, []{return logic->IsAdult;}), }); -} \ No newline at end of file + + // clang-format on +} diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/death_mountain_crater.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/death_mountain_crater.cpp index 6ba8bfc6e..48863c695 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/death_mountain_crater.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/death_mountain_crater.cpp @@ -4,6 +4,7 @@ using namespace Rando; void RegionTable_Init_DeathMountainCrater() { + // clang-format off areaTable[RR_DMC_UPPER_NEARBY] = Region("DMC Upper Nearby", "Death Mountain Crater", {RA_DEATH_MOUNTAIN_CRATER}, NO_DAY_NIGHT_CYCLE, {}, {}, { //Exits Entrance(RR_DMC_UPPER_LOCAL, []{return logic->FireTimer() >= 48;}), @@ -142,4 +143,6 @@ void RegionTable_Init_DeathMountainCrater() { //Exits Entrance(RR_DMC_CENTRAL_LOCAL, []{return logic->FireTimer() >= 48 && logic->CanUse(RG_DISTANT_SCARECROW);}), }); -} \ No newline at end of file + + // clang-format on +} diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/death_mountain_trail.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/death_mountain_trail.cpp index bd0362598..750fbf140 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/death_mountain_trail.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/death_mountain_trail.cpp @@ -4,6 +4,7 @@ using namespace Rando; void RegionTable_Init_DeathMountainTrail() { + // clang-format off areaTable[RR_DEATH_MOUNTAIN_TRAIL] = Region("Death Mountain", "Death Mountain", {RA_DEATH_MOUNTAIN_TRAIL}, DAY_NIGHT_CYCLE, { //Events EventAccess(&logic->BeanPlantFairy, []{return logic->IsChild && logic->CanUse(RG_MAGIC_BEAN) && logic->CanUse(RG_SONG_OF_STORMS) && (logic->HasExplosives() || logic->HasItem(RG_GORONS_BRACELET));}), @@ -98,4 +99,6 @@ void RegionTable_Init_DeathMountainTrail() { //Exits Entrance(RR_DEATH_MOUNTAIN_SUMMIT, []{return true;}), }); -} \ No newline at end of file + + // clang-format on +} diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/desert_colossus.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/desert_colossus.cpp index 0ef2bbdfc..ac0869036 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/desert_colossus.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/desert_colossus.cpp @@ -4,6 +4,7 @@ using namespace Rando; void RegionTable_Init_DesertColossus() { + // clang-format off areaTable[RR_DESERT_COLOSSUS] = Region("Desert Colossus", "Desert Colossus", {RA_DESERT_COLOSSUS}, DAY_NIGHT_CYCLE, { //Events EventAccess(&logic->FairyPond, []{return logic->FairyPond || logic->CanUse(RG_SONG_OF_STORMS);}), @@ -74,4 +75,6 @@ void RegionTable_Init_DesertColossus() { //Exits Entrance(RR_DESERT_COLOSSUS, []{return true;}), }); -} \ No newline at end of file + + // clang-format on +} diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/gerudo_valley.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/gerudo_valley.cpp index 189d96521..9141f4dcd 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/gerudo_valley.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/gerudo_valley.cpp @@ -4,6 +4,7 @@ using namespace Rando; void RegionTable_Init_GerudoValley() { + // clang-format off areaTable[RR_GERUDO_VALLEY] = Region("Gerudo Valley", "Gerudo Valley", {RA_GERUDO_VALLEY}, DAY_NIGHT_CYCLE, { //Events EventAccess(&logic->BugRock, []{return logic->BugRock || logic->IsChild;}), @@ -108,4 +109,6 @@ void RegionTable_Init_GerudoValley() { //Exits Entrance(RR_GV_FORTRESS_SIDE, []{return true;}), }); -} \ No newline at end of file + + // clang-format on +} diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/goron_city.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/goron_city.cpp index 722402ae9..b39a389d2 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/goron_city.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/goron_city.cpp @@ -4,6 +4,7 @@ using namespace Rando; void RegionTable_Init_GoronCity() { + // clang-format off areaTable[RR_GORON_CITY] = Region("Goron City", "Goron City", {RA_GORON_CITY}, NO_DAY_NIGHT_CYCLE, { //Events EventAccess(&logic->GossipStoneFairy, []{return logic->CallGossipFairyExceptSuns();}), @@ -108,4 +109,6 @@ void RegionTable_Init_GoronCity() { //Exits Entrance(RR_GC_GROTTO_PLATFORM, []{return true;}), }); -} \ No newline at end of file + + // clang-format on +} diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/graveyard.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/graveyard.cpp index 28d272711..6a3fb41f5 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/graveyard.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/graveyard.cpp @@ -4,6 +4,7 @@ using namespace Rando; void RegionTable_Init_Graveyard() { + // clang-format off areaTable[RR_THE_GRAVEYARD] = Region("The Graveyard", "The Graveyard", {RA_THE_GRAVEYARD}, NO_DAY_NIGHT_CYCLE, { //Events EventAccess(&logic->ButterflyFairy, []{return logic->ButterflyFairy || (logic->CanUse(RG_STICKS) && logic->AtDay);}), @@ -120,4 +121,6 @@ void RegionTable_Init_Graveyard() { Entrance(RR_THE_GRAVEYARD, []{return true;}), Entrance(RR_SHADOW_TEMPLE_ENTRYWAY, []{return logic->CanUse(RG_DINS_FIRE) || (ctx->GetTrickOption(RT_GY_SHADOW_FIRE_ARROWS) && logic->IsAdult && logic->CanUse(RG_FIRE_ARROWS));}), }); + + // clang-format on } diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/haunted_wasteland.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/haunted_wasteland.cpp index abedcc571..437f93a64 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/haunted_wasteland.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/haunted_wasteland.cpp @@ -4,6 +4,7 @@ using namespace Rando; void RegionTable_Init_HauntedWasteland() { + // clang-format off areaTable[RR_WASTELAND_NEAR_FORTRESS] = Region("Wasteland Near Fortress", "Haunted Wasteland", {RA_HAUNTED_WASTELAND}, NO_DAY_NIGHT_CYCLE, {}, {}, { //Exits Entrance(RR_GF_OUTSIDE_GATE, []{return true;}), @@ -35,4 +36,6 @@ void RegionTable_Init_HauntedWasteland() { Entrance(RR_DESERT_COLOSSUS, []{return true;}), Entrance(RR_HAUNTED_WASTELAND, []{return ctx->GetTrickOption(RT_HW_REVERSE) || false;}), }); -} \ No newline at end of file + + // clang-format on +} diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/hyrule_field.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/hyrule_field.cpp index d73c09162..f6c9d1c40 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/hyrule_field.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/hyrule_field.cpp @@ -4,6 +4,7 @@ using namespace Rando; void RegionTable_Init_HyruleField() { + // clang-format off areaTable[RR_HYRULE_FIELD] = Region("Hyrule Field", "Hyrule Field", {RA_HYRULE_FIELD}, DAY_NIGHT_CYCLE, { //Events EventAccess(&logic->BigPoeKill, []{return logic->CanUse(RG_FAIRY_BOW) && logic->CanUse(RG_EPONA) && logic->HasBottle();}), @@ -140,4 +141,6 @@ void RegionTable_Init_HyruleField() { //Exits Entrance(RR_HYRULE_FIELD, []{return true;}), }); -} \ No newline at end of file + + // clang-format on +} diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/kakariko.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/kakariko.cpp index 139d867de..c5bfb1df0 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/kakariko.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/kakariko.cpp @@ -4,6 +4,7 @@ using namespace Rando; void RegionTable_Init_Kakariko() { + // clang-format off areaTable[RR_KAKARIKO_VILLAGE] = Region("Kakariko Village", "Kakariko Village", {RA_KAKARIKO_VILLAGE}, NO_DAY_NIGHT_CYCLE, { //Events EventAccess(&logic->BugRock, []{return true;}), @@ -239,4 +240,6 @@ void RegionTable_Init_Kakariko() { Entrance(RR_KAKARIKO_VILLAGE, []{return logic->IsAdult || logic->HasItem(RG_BRONZE_SCALE) || logic->DrainWell;}), Entrance(RR_BOTTOM_OF_THE_WELL_ENTRYWAY, []{return logic->IsChild || (logic->DrainWell && ctx->GetOption(RSK_SHUFFLE_DUNGEON_ENTRANCES).IsNot(RO_DUNGEON_ENTRANCE_SHUFFLE_OFF));}), }); + + // clang-format on } diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/kokiri_forest.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/kokiri_forest.cpp index fd7c340de..cdd43b042 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/kokiri_forest.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/kokiri_forest.cpp @@ -4,6 +4,7 @@ using namespace Rando; void RegionTable_Init_KokiriForest() { + // clang-format off areaTable[RR_KOKIRI_FOREST] = Region("Kokiri Forest", "Kokiri Forest", {RA_KOKIRI_FOREST}, NO_DAY_NIGHT_CYCLE, { //Events EventAccess(&logic->BeanPlantFairy, []{return logic->IsChild && logic->CanUse(RG_MAGIC_BEAN) && logic->CanUse(RG_SONG_OF_STORMS);}), @@ -149,4 +150,6 @@ void RegionTable_Init_KokiriForest() { //Exits Entrance(RR_KOKIRI_FOREST, []{return true;}) }); -} \ No newline at end of file + + // clang-format on +} diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/lake_hylia.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/lake_hylia.cpp index 447d039d2..d4b950d78 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/lake_hylia.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/lake_hylia.cpp @@ -4,6 +4,7 @@ using namespace Rando; void RegionTable_Init_LakeHylia() { + // clang-format off areaTable[RR_LAKE_HYLIA] = Region("Lake Hylia", "Lake Hylia", {RA_LAKE_HYLIA}, DAY_NIGHT_CYCLE, { //Events EventAccess(&logic->GossipStoneFairy, []{return logic->CallGossipFairy();}), @@ -128,4 +129,6 @@ void RegionTable_Init_LakeHylia() { //Exits Entrance(RR_LAKE_HYLIA, []{return true;}), }); + + // clang-format on } diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/lon_lon_ranch.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/lon_lon_ranch.cpp index 283150415..00ce5a3ee 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/lon_lon_ranch.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/lon_lon_ranch.cpp @@ -4,6 +4,7 @@ using namespace Rando; void RegionTable_Init_LonLonRanch() { + // clang-format off areaTable[RR_LON_LON_RANCH] = Region("Lon Lon Ranch", "Lon Lon Ranch", {RA_LON_LON_RANCH}, NO_DAY_NIGHT_CYCLE, { //Events EventAccess(&logic->FreedEpona, []{return logic->FreedEpona || ((logic->HasItem(RG_CHILD_WALLET) || ctx->GetOption(RSK_SKIP_EPONA_RACE)) && logic->CanUse(RG_EPONAS_SONG) && logic->IsAdult && logic->AtDay);}), @@ -71,4 +72,6 @@ void RegionTable_Init_LonLonRanch() { //Exits Entrance(RR_LON_LON_RANCH, []{return true;}), }); + + // clang-format on } diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/lost_woods.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/lost_woods.cpp index 17aaff639..fb146ec54 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/lost_woods.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/lost_woods.cpp @@ -4,6 +4,7 @@ using namespace Rando; void RegionTable_Init_LostWoods() { + // clang-format off areaTable[RR_LW_FOREST_EXIT] = Region("LW Forest Exit", "Lost Woods", {RA_THE_LOST_WOODS}, NO_DAY_NIGHT_CYCLE, {}, {}, { //Exits Entrance(RR_KOKIRI_FOREST, []{return true;}) @@ -128,4 +129,6 @@ void RegionTable_Init_LostWoods() { Entrance(RR_HYRULE_FIELD, []{return true;}), Entrance(RR_THE_LOST_WOODS, []{return logic->CanUse(RG_LONGSHOT);}), }); -} \ No newline at end of file + + // clang-format on +} diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/market.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/market.cpp index fd066b760..160ebd38f 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/market.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/market.cpp @@ -4,6 +4,7 @@ using namespace Rando; void RegionTable_Init_Market() { + // clang-format off areaTable[RR_MARKET_ENTRANCE] = Region("Market Entrance", "Market Entrance", {RA_THE_MARKET}, NO_DAY_NIGHT_CYCLE, {}, {}, { //Exits Entrance(RR_HYRULE_FIELD, []{return logic->IsAdult || logic->AtDay;}), @@ -214,4 +215,6 @@ void RegionTable_Init_Market() { //Exits Entrance(RR_MARKET_BACK_ALLEY, []{return true;}), }); + + // clang-format on } diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/sacred_forest_meadow.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/sacred_forest_meadow.cpp index ecc0577e2..9df62afd7 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/sacred_forest_meadow.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/sacred_forest_meadow.cpp @@ -4,10 +4,11 @@ using namespace Rando; void RegionTable_Init_SacredForestMeadow() { + // clang-format off areaTable[RR_SFM_ENTRYWAY] = Region("SFM Entryway", "Sacred Forest Meadow", {RA_SACRED_FOREST_MEADOW}, NO_DAY_NIGHT_CYCLE, {}, {}, { //Exits Entrance(RR_LW_BEYOND_MIDO, []{return true;}), - Entrance(RR_SACRED_FOREST_MEADOW, []{return logic->CanJumpslash() || logic->CanUse(RG_FAIRY_SLINGSHOT) || logic->CanUse(RG_FAIRY_BOW) || logic->CanUse(RG_DINS_FIRE);}), + Entrance(RR_SACRED_FOREST_MEADOW, []{return logic->IsAdult || logic->CanKillEnemy(RE_WOLFOS);}), Entrance(RR_SFM_WOLFOS_GROTTO, []{return logic->CanOpenBombGrotto();}), }); @@ -71,4 +72,6 @@ void RegionTable_Init_SacredForestMeadow() { //Exits Entrance(RR_SACRED_FOREST_MEADOW, []{return true;}), }); -} \ No newline at end of file + + // clang-format on +} diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/temple_of_time.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/temple_of_time.cpp index 06865772d..be2d8e33f 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/temple_of_time.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/temple_of_time.cpp @@ -4,6 +4,7 @@ using namespace Rando; void RegionTable_Init_TempleOfTime() { + // clang-format off areaTable[RR_TOT_ENTRANCE] = Region("ToT Entrance", "ToT Entrance", {RA_THE_MARKET}, NO_DAY_NIGHT_CYCLE, { //Events EventAccess(&logic->GossipStoneFairy, []{return logic->CallGossipFairyExceptSuns();}), @@ -51,4 +52,6 @@ void RegionTable_Init_TempleOfTime() { //Exits Entrance(RR_TEMPLE_OF_TIME, []{return true;}), }); -} \ No newline at end of file + + // clang-format on +} diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/zoras_domain.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/zoras_domain.cpp index 0bf91e43a..07922bc8f 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/zoras_domain.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/zoras_domain.cpp @@ -4,6 +4,7 @@ using namespace Rando; void RegionTable_Init_ZorasDomain() { + // clang-format off areaTable[RR_ZORAS_DOMAIN] = Region("Zoras Domain", "Zoras Domain", {RA_ZORAS_DOMAIN}, NO_DAY_NIGHT_CYCLE, { //Events EventAccess(&logic->GossipStoneFairy, []{return logic->CallGossipFairyExceptSuns();}), @@ -90,4 +91,6 @@ void RegionTable_Init_ZorasDomain() { //Exits Entrance(RR_ZORAS_DOMAIN_ISLAND, []{return true;}), }); -} \ No newline at end of file + + // clang-format on +} diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/zoras_fountain.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/zoras_fountain.cpp index ccdca0eca..a03070454 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/zoras_fountain.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/zoras_fountain.cpp @@ -4,6 +4,7 @@ using namespace Rando; void RegionTable_Init_ZorasFountain() { + // clang-format off areaTable[RR_ZORAS_FOUNTAIN] = Region("Zoras Fountain", "Zoras Fountain", {RA_ZORAS_FOUNTAIN}, NO_DAY_NIGHT_CYCLE, { //Events EventAccess(&logic->GossipStoneFairy, []{return logic->CallGossipFairyExceptSuns();}), @@ -61,4 +62,6 @@ void RegionTable_Init_ZorasFountain() { //Exits Entrance(RR_ZORAS_FOUNTAIN, []{return true;}), }); -} \ No newline at end of file + + // clang-format on +} diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/zora_river.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/zoras_river.cpp similarity index 98% rename from soh/soh/Enhancements/randomizer/location_access/overworld/zora_river.cpp rename to soh/soh/Enhancements/randomizer/location_access/overworld/zoras_river.cpp index 16ac1b271..3a252edb0 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/zora_river.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/zoras_river.cpp @@ -4,9 +4,10 @@ using namespace Rando; void RegionTable_Init_ZoraRiver() { + // clang-format off areaTable[RR_ZR_FRONT] = Region("ZR Front", "Zora River", {RA_ZORAS_RIVER}, DAY_NIGHT_CYCLE, {}, { //Locations - LOCATION(RC_ZR_GS_TREE, logic->IsChild && logic->CanAttack()), + LOCATION(RC_ZR_GS_TREE, logic->IsChild && logic->CanKillEnemy(RE_GOLD_SKULLTULA, ED_CLOSE)), }, { //Exits Entrance(RR_ZORAS_RIVER, []{return logic->IsAdult || logic->BlastOrSmash();}), @@ -104,4 +105,6 @@ void RegionTable_Init_ZoraRiver() { //Exits Entrance(RR_ZORAS_RIVER, []{return true;}), }); -} \ No newline at end of file + + // clang-format on +} diff --git a/soh/soh/Enhancements/randomizer/option.cpp b/soh/soh/Enhancements/randomizer/option.cpp index 64ca107c5..84fc4c28b 100644 --- a/soh/soh/Enhancements/randomizer/option.cpp +++ b/soh/soh/Enhancements/randomizer/option.cpp @@ -62,8 +62,8 @@ const std::string& Option::GetDescription() const { return description; } -uint8_t Option::GetMenuOptionIndex() const { - return menuSelection; +uint8_t Option::GetOptionIndex() const { + return CVarGetInteger(cvarName.c_str(), defaultOption); } const std::string& Option::GetOptionText(size_t index) const { @@ -74,18 +74,6 @@ const std::string& Option::GetCVarName() const { return cvarName; } -void Option::SaveCVar() const { - if (!cvarName.empty()) { - CVarSetInteger(cvarName.c_str(), GetMenuOptionIndex()); - } -} - -void Option::SetFromCVar() { - if (!cvarName.empty()) { - SetMenuIndex(CVarGetInteger(cvarName.c_str(), defaultOption)); - } -} - void Option::SetDelayedOption() { delayedSelection = contextSelection; } @@ -94,13 +82,6 @@ void Option::RestoreDelayedOption() { contextSelection = delayedSelection; } -void Option::SetMenuIndex(size_t idx) { - menuSelection = idx; - if (menuSelection > options.size() - 1) { - menuSelection = options.size() - 1; - } -} - void Option::SetContextIndex(size_t idx) { // TODO: Set to Context's OptionValue array. contextSelection = idx; @@ -122,8 +103,8 @@ bool Option::IsHidden() const { } void Option::ChangeOptions(std::vector opts) { - if (menuSelection >= opts.size()) { - menuSelection = opts.size() - 1; + if (GetOptionIndex() >= opts.size()) { + CVarSetInteger(cvarName.c_str(), opts.size() - 1); } options = std::move(opts); } @@ -202,10 +183,9 @@ Option::Option(size_t key_, std::string name_, std::vector options_ : key(key_), name(std::move(name_)), options(std::move(options_)), category(category_), cvarName(std::move(cvarName_)), description(std::move(description_)), widgetType(widgetType_), defaultOption(defaultOption_), defaultHidden(defaultHidden_), imFlags(imFlags_) { - menuSelection = contextSelection = defaultOption; + contextSelection = defaultOption; hidden = defaultHidden; PopulateTextToNum(); - SetFromCVar(); } bool Option::RenderCheckbox() { @@ -245,10 +225,9 @@ bool Option::RenderCombobox() { bool Option::RenderSlider() { bool changed = false; - int val = GetMenuOptionIndex(); + int val = CVarGetInteger(cvarName.c_str(), defaultOption); if (val > options.size() - 1) { val = options.size() - 1; - CVarSetInteger(cvarName.c_str(), val); changed = true; } UIWidgets::IntSliderOptions widgetOptions = UIWidgets::IntSliderOptions().Color(THEME_COLOR).Min(0).Max(options.size() - 1).Tooltip(description.c_str()).Format(options[val].c_str()).DefaultValue(defaultOption); @@ -266,7 +245,6 @@ bool Option::RenderSlider() { } if (changed) { CVarSetInteger(cvarName.c_str(), val); - SetFromCVar(); Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame(); } return changed; diff --git a/soh/soh/Enhancements/randomizer/option.h b/soh/soh/Enhancements/randomizer/option.h index 518487219..3b1ae8521 100644 --- a/soh/soh/Enhancements/randomizer/option.h +++ b/soh/soh/Enhancements/randomizer/option.h @@ -225,19 +225,7 @@ class Option { * * @return uint8_t */ - uint8_t GetMenuOptionIndex() const; - - /** - * @brief Sets the CVar corresponding to the property `cvarName` equal to the value - * of the property `selectedValue`. - */ - void SaveCVar() const; - - /** - * @brief Sets the value of property `selectedValue` equal to the CVar corresponding - * to the property `cvarName`. - */ - void SetFromCVar(); + uint8_t GetOptionIndex() const; /** * @brief Set the delayedOption to the currently selected index so it can be restored later. @@ -249,13 +237,6 @@ class Option { */ void RestoreDelayedOption(); - /** - * @brief Set the menu index for this Option. Also calls `SetVariable()`. - * - * @param idx the index to set as the selected index. - */ - void SetMenuIndex(size_t idx); - /** * @brief Set the rando context index for this Option. Also calls `SetVariable()`. * @@ -344,7 +325,6 @@ protected: void PopulateTextToNum(); std::string name; std::vector options; - uint8_t menuSelection = 0; uint8_t contextSelection = 0; uint8_t delayedSelection = 0; bool hidden = false; diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index 0b6a56159..97bcf563b 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -17,7 +17,7 @@ #include #include "../custom-message/CustomMessageTypes.h" #include "../item-tables/ItemTableManager.h" -#include "../presets.h" +#include "../Presets/Presets.h" #include "../../../src/overlays/actors/ovl_En_GirlA/z_en_girla.h" #include #include "randomizer_check_objects.h" @@ -100,7 +100,7 @@ static const char* englishRupeeNames[175] = { "Studs", "Super Sea Snails", "Talent", "Teef", "Telecrystals", "Tiberium", "TokKul", "Toys", "Turnips", "Upvotes", "V-Bucks", "Vespene Gas", "Watts", "Widgets", "Woolongs", - "World Dollars", "Wumpa Fruit", "Yen", "Zenny", "Zorkmids" + "World Dollars", "Wumpa Fruit", "Yen", "Zenny", "Zorkmids", }; static const char* germanRupeeNames[65] = { @@ -205,7 +205,7 @@ std::unordered_map getItemIdToItemId = { { GI_PRESCRIPTION, ITEM_PRESCRIPTION }, { GI_FROG, ITEM_FROG }, { GI_EYEDROPS, ITEM_EYEDROPS }, - { GI_CLAIM_CHECK, ITEM_CLAIM_CHECK } + { GI_CLAIM_CHECK, ITEM_CLAIM_CHECK }, }; #pragma optimize("", off) @@ -400,12 +400,12 @@ void Randomizer::LoadMerchantMessages() { } std::map trialFlagToTrialKey = { - { EVENTCHKINF_COMPLETED_LIGHT_TRIAL, TK_LIGHT_TRIAL, }, - { EVENTCHKINF_COMPLETED_FOREST_TRIAL, TK_FOREST_TRIAL, }, - { EVENTCHKINF_COMPLETED_FIRE_TRIAL, TK_FIRE_TRIAL, }, - { EVENTCHKINF_COMPLETED_WATER_TRIAL, TK_WATER_TRIAL, }, - { EVENTCHKINF_COMPLETED_SPIRIT_TRIAL, TK_SPIRIT_TRIAL, }, - { EVENTCHKINF_COMPLETED_SHADOW_TRIAL, TK_SHADOW_TRIAL, } + { EVENTCHKINF_COMPLETED_LIGHT_TRIAL, TK_LIGHT_TRIAL }, + { EVENTCHKINF_COMPLETED_FOREST_TRIAL, TK_FOREST_TRIAL }, + { EVENTCHKINF_COMPLETED_FIRE_TRIAL, TK_FIRE_TRIAL }, + { EVENTCHKINF_COMPLETED_WATER_TRIAL, TK_WATER_TRIAL }, + { EVENTCHKINF_COMPLETED_SPIRIT_TRIAL, TK_SPIRIT_TRIAL }, + { EVENTCHKINF_COMPLETED_SHADOW_TRIAL, TK_SHADOW_TRIAL }, }; bool Randomizer::IsTrialRequired(s32 trialFlag) { @@ -1871,7 +1871,6 @@ void GenerateRandomizerImgui(std::string seed = "") { CVarSave(); auto ctx = Rando::Context::GetInstance(); //RANDOTODO proper UI for selecting if a spoiler loaded should be used for settings - Rando::Settings::GetInstance()->SetAllFromCVar(); Rando::Settings::GetInstance()->SetAllToContext(); // todo: this efficently when we build out cvar array support @@ -1925,11 +1924,10 @@ bool GenerateRandomizer(std::string seed /*= ""*/) { static const std::unordered_map randomizerPresetList = { { RANDOMIZER_PRESET_DEFAULT, "Default" }, - { RANDOMIZER_PRESET_SPOCK_RACE, "Spock Race" }, - { RANDOMIZER_PRESET_SPOCK_RACE_NO_LOGIC, "Spock Race (No Logic)" }, - { RANDOMIZER_PRESET_S6, "S6" }, - { RANDOMIZER_PRESET_HELL_MODE, "Hell Mode" }, - { RANDOMIZER_PRESET_BENCHMARK, "Benchmark" } + { RANDOMIZER_PRESET_BEGINNER, "Beginner" }, + { RANDOMIZER_PRESET_STANDARD, "Standard" }, + { RANDOMIZER_PRESET_ADVANCED, "Advanced" }, + { RANDOMIZER_PRESET_HELL_MODE, "Hell Mode" } }; static int32_t randomizerPresetSelected = RANDOMIZER_PRESET_DEFAULT; @@ -1939,6 +1937,8 @@ void RandomizerSettingsWindow::DrawElement() { generated = 0; randoThread.join(); } + static bool locationsTabOpen = false; + static bool tricksTabOpen = false; bool disableEditingRandoSettings = CVarGetInteger(CVAR_GENERAL("RandoGenerating"), 0) || CVarGetInteger(CVAR_GENERAL("OnFileSelectNameEntry"), 0); ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0) || disableEditingRandoSettings); const PresetTypeDefinition presetTypeDef = presetTypes.at(PRESET_TYPE_RANDOMIZER); @@ -1972,6 +1972,10 @@ void RandomizerSettingsWindow::DrawElement() { } CVarSetInteger(presetTypeCvar.c_str(), randomizerPresetSelected); Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame(); + mSettings->UpdateOptionProperties(); + // force excluded location list and trick list update if tab is open. + locationsTabOpen = false; + tricksTabOpen = false; } UIWidgets::Spacer(0); @@ -2061,7 +2065,6 @@ void RandomizerSettingsWindow::DrawElement() { ImGui::EndDisabled(); ImGui::BeginDisabled(CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA); - static bool locationsTabOpen = false; if (ImGui::BeginTabItem("Locations")) { ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, cellPadding); if (!locationsTabOpen) { @@ -2190,7 +2193,6 @@ void RandomizerSettingsWindow::DrawElement() { } ImGui::EndDisabled(); - static bool tricksTabOpen = false; if (ImGui::BeginTabItem("Tricks/Glitches")) { if (!tricksTabOpen) { tricksTabOpen = true; @@ -2270,7 +2272,7 @@ void RandomizerSettingsWindow::DrawElement() { {RA_BOTTOM_OF_THE_WELL, true}, {RA_ICE_CAVERN, true}, {RA_GERUDO_TRAINING_GROUND, true}, - {RA_GANONS_CASTLE, true} + {RA_GANONS_CASTLE, true}, }; static std::unordered_map areaTreeEnabled { {RA_NONE, true}, @@ -2305,7 +2307,7 @@ void RandomizerSettingsWindow::DrawElement() { {RA_BOTTOM_OF_THE_WELL, true}, {RA_ICE_CAVERN, true}, {RA_GERUDO_TRAINING_GROUND, true}, - {RA_GANONS_CASTLE, true} + {RA_GANONS_CASTLE, true}, }; static std::map showTag { diff --git a/soh/soh/Enhancements/randomizer/randomizerTypes.h b/soh/soh/Enhancements/randomizer/randomizerTypes.h index d3e619cdd..6df24f7b8 100644 --- a/soh/soh/Enhancements/randomizer/randomizerTypes.h +++ b/soh/soh/Enhancements/randomizer/randomizerTypes.h @@ -13,11 +13,11 @@ // which doesn't exist yet. typedef enum { MOD_NONE, - MOD_RANDOMIZER + MOD_RANDOMIZER, } ModIndex; typedef enum { TABLE_VANILLA = MOD_NONE, - TABLE_RANDOMIZER = MOD_RANDOMIZER + TABLE_RANDOMIZER = MOD_RANDOMIZER, } TableIndex; typedef struct { @@ -5692,12 +5692,12 @@ typedef struct FishIdentity { typedef enum { TRACKER_WINDOW_FLOATING, - TRACKER_WINDOW_WINDOW + TRACKER_WINDOW_WINDOW, } TrackerWindowType; typedef enum { TRACKER_DISPLAY_ALWAYS, - TRACKER_DISPLAY_COMBO_BUTTON + TRACKER_DISPLAY_COMBO_BUTTON, } TrackerDisplayType; typedef enum { @@ -5800,7 +5800,7 @@ typedef enum { WL_MID, WL_HIGH, WL_LOW_OR_MID, - WL_HIGH_OR_MID + WL_HIGH_OR_MID, } RandoWaterLevel; #define ENTRANCE_GROTTO_LOAD_START 0x0700 diff --git a/soh/soh/Enhancements/randomizer/randomizer_entrance.c b/soh/soh/Enhancements/randomizer/randomizer_entrance.c index 26592b0ce..96c916824 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_entrance.c +++ b/soh/soh/Enhancements/randomizer/randomizer_entrance.c @@ -59,6 +59,7 @@ typedef struct { } DungeonEntranceInfo; static DungeonEntranceInfo dungeons[] = { + // clang-format off //entryway exit, boss, reverse, bluewarp, dungeon scene, boss scene { ENTR_DEKU_TREE_ENTRANCE, ENTR_KOKIRI_FOREST_OUTSIDE_DEKU_TREE, ENTR_DEKU_TREE_BOSS_ENTRANCE, ENTR_DEKU_TREE_BOSS_DOOR, ENTR_KOKIRI_FOREST_DEKU_TREE_BLUE_WARP, SCENE_DEKU_TREE, SCENE_DEKU_TREE_BOSS }, { ENTR_DODONGOS_CAVERN_ENTRANCE, ENTR_DEATH_MOUNTAIN_TRAIL_OUTSIDE_DODONGOS_CAVERN, ENTR_DODONGOS_CAVERN_BOSS_ENTRANCE, ENTR_DODONGOS_CAVERN_BOSS_DOOR, ENTR_DEATH_MOUNTAIN_TRAIL_DODONGO_BLUE_WARP, SCENE_DODONGOS_CAVERN, SCENE_DODONGOS_CAVERN_BOSS }, @@ -68,6 +69,8 @@ static DungeonEntranceInfo dungeons[] = { { ENTR_WATER_TEMPLE_ENTRANCE, ENTR_LAKE_HYLIA_OUTSIDE_TEMPLE, ENTR_WATER_TEMPLE_BOSS_ENTRANCE, ENTR_WATER_TEMPLE_BOSS_DOOR, ENTR_LAKE_HYLIA_WATER_TEMPLE_BLUE_WARP, SCENE_WATER_TEMPLE, SCENE_WATER_TEMPLE_BOSS }, { ENTR_SPIRIT_TEMPLE_ENTRANCE, ENTR_DESERT_COLOSSUS_OUTSIDE_TEMPLE, ENTR_SPIRIT_TEMPLE_BOSS_ENTRANCE, ENTR_SPIRIT_TEMPLE_BOSS_DOOR, ENTR_DESERT_COLOSSUS_SPIRIT_TEMPLE_BLUE_WARP, SCENE_SPIRIT_TEMPLE, SCENE_SPIRIT_TEMPLE_BOSS }, { ENTR_SHADOW_TEMPLE_ENTRANCE, ENTR_GRAVEYARD_OUTSIDE_TEMPLE, ENTR_SHADOW_TEMPLE_BOSS_ENTRANCE, ENTR_SHADOW_TEMPLE_BOSS_DOOR, ENTR_GRAVEYARD_SHADOW_TEMPLE_BLUE_WARP, SCENE_SHADOW_TEMPLE, SCENE_SHADOW_TEMPLE_BOSS }, + + // clang-format on }; static s8 hasCopiedEntranceTable = 0; diff --git a/soh/soh/Enhancements/randomizer/randomizer_entrance_tracker.cpp b/soh/soh/Enhancements/randomizer/randomizer_entrance_tracker.cpp index fab17acf1..57ff467f4 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_entrance_tracker.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer_entrance_tracker.cpp @@ -74,6 +74,7 @@ static std::string groupTypeNames[] = { // Entrance data for the tracker taken from the 3ds rando entrance tracker, and supplemented with scene/spawn info and meta search tags // ENTR_HYRULE_FIELD_10 and ENTR_POTION_SHOP_KAKARIKO_1 have been repurposed for entrance randomizer const EntranceData entranceData[] = { + // clang-format off //index, reverse, scenes (and spawns), source name, destination name, source group, destination group, type, metaTag, oneExit { ENTR_LINKS_HOUSE_CHILD_SPAWN, -1, SINGLE_SCENE_INFO(SCENE_LINKS_HOUSE), "Child Spawn", "Link's House", ENTRANCE_GROUP_ONE_WAY, ENTRANCE_GROUP_ONE_WAY, ENTRANCE_TYPE_ONE_WAY}, { ENTR_HYRULE_FIELD_10, -1, SINGLE_SCENE_INFO(SCENE_TEMPLE_OF_TIME), "Adult Spawn", "Temple of Time", ENTRANCE_GROUP_ONE_WAY, ENTRANCE_GROUP_ONE_WAY, ENTRANCE_TYPE_ONE_WAY}, @@ -380,6 +381,8 @@ const EntranceData entranceData[] = { { ENTR_INSIDE_GANONS_CASTLE_ENTRANCE, ENTR_CASTLE_GROUNDS_RAINBOW_BRIDGE_EXIT, SINGLE_SCENE_INFO(SCENE_OUTSIDE_GANONS_CASTLE), "OGC Rainbow Bridge Exit", "Inside Ganon's Castle Entrance", ENTRANCE_GROUP_HYRULE_CASTLE, ENTRANCE_GROUP_HYRULE_CASTLE, ENTRANCE_TYPE_DUNGEON, "outside ganon's castle,gc", 1}, { ENTR_POTION_SHOP_KAKARIKO_1, ENTR_GREAT_FAIRYS_FOUNTAIN_MAGIC_OGC_DD, {{ SCENE_GREAT_FAIRYS_FOUNTAIN_MAGIC, 0x02 }}, "OGC Great Fairy Fountain", "OGC Behind Pillar", ENTRANCE_GROUP_HYRULE_CASTLE, ENTRANCE_GROUP_HYRULE_CASTLE, ENTRANCE_TYPE_INTERIOR, "outside ganon's castle"}, { ENTR_CASTLE_GROUNDS_RAINBOW_BRIDGE_EXIT, ENTR_INSIDE_GANONS_CASTLE_ENTRANCE, SINGLE_SCENE_INFO(SCENE_INSIDE_GANONS_CASTLE), "Inside Ganon's Castle Entrance", "OGC Rainbow Bridge Exit", ENTRANCE_GROUP_HYRULE_CASTLE, ENTRANCE_GROUP_HYRULE_CASTLE, ENTRANCE_TYPE_DUNGEON, "outside ganon's castle,gc"} + + // clang-format on }; // Check if Link is in the area and return that scene/entrance for tracking diff --git a/soh/soh/Enhancements/randomizer/randomizer_grotto.c b/soh/soh/Enhancements/randomizer/randomizer_grotto.c index 50cb093c8..eef1c3171 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_grotto.c +++ b/soh/soh/Enhancements/randomizer/randomizer_grotto.c @@ -12,6 +12,7 @@ extern PlayState* gPlayState; // Information necessary for entering each grotto static const GrottoLoadInfo grottoLoadTable[NUM_GROTTOS] = { + // clang-format off {.entranceIndex = ENTR_GROTTOS_10, .content = 0xFD, .scene = SCENE_DESERT_COLOSSUS}, // Desert Colossus -> Colossus Grotto {.entranceIndex = ENTR_GROTTOS_4, .content = 0xEF, .scene = SCENE_LAKE_HYLIA}, // Lake Hylia -> LH Grotto {.entranceIndex = ENTR_GROTTOS_10, .content = 0xEB, .scene = SCENE_ZORAS_RIVER}, // Zora River -> ZR Storms Grotto @@ -45,10 +46,13 @@ static const GrottoLoadInfo grottoLoadTable[NUM_GROTTOS] = { {.entranceIndex = ENTR_GROTTOS_10, .content = 0xF0, .scene = SCENE_GERUDO_VALLEY}, // GV Fortress Side -> GV Storms Grotto {.entranceIndex = ENTR_GROTTOS_6, .content = 0xF2, .scene = SCENE_GERUDO_VALLEY}, // GV Grotto Ledge -> GV Octorok Grotto {.entranceIndex = ENTR_GROTTOS_12, .content = 0xF3, .scene = SCENE_LOST_WOODS}, // LW Beyond Mido -> Deku Theater + + // clang-format on }; // Information necessary for setting up returning from a grotto static const GrottoReturnInfo grottoReturnTable[NUM_GROTTOS] = { + // clang-format off {.entranceIndex = ENTR_DESERT_COLOSSUS_EAST_EXIT, .room = 0x00, .angle = 0xA71C, .pos = {.x = 62.5078f, .y = -32.0f, .z = -1296.2f}}, // Colossus Grotto -> Desert Colossus {.entranceIndex = ENTR_LAKE_HYLIA_NORTH_EXIT, .room = 0x00, .angle = 0x0000, .pos = {.x = -3039.34f, .y = -1033.0f, .z = 6080.74f}}, // LH Grotto -> Lake Hylia {.entranceIndex = ENTR_ZORAS_RIVER_WEST_EXIT, .room = 0x00, .angle = 0x0000, .pos = {.x = -1630.05f, .y = 100.0f, .z = -132.104f}}, // ZR Storms Grotto -> Zora River @@ -82,6 +86,8 @@ static const GrottoReturnInfo grottoReturnTable[NUM_GROTTOS] = { {.entranceIndex = ENTR_GERUDO_VALLEY_WEST_EXIT, .room = 0x00, .angle = 0x9555, .pos = {.x = -1326.34f, .y = 15.0f, .z = -983.994f}}, // GV Storms Grotto -> GV Fortress Side {.entranceIndex = ENTR_GERUDO_VALLEY_EAST_EXIT, .room = 0x00, .angle = 0x8000, .pos = {.x = 291.513f, .y = -555.0f, .z = 1478.39f}}, // GV Octorok Grotto -> GV Grotto Ledge {.entranceIndex = ENTR_LOST_WOODS_NORTH_EXIT, .room = 0x06, .angle = 0x4000, .pos = {.x = 109.281f, .y = -20.0f, .z = -1601.42f}}, // Deku Theater -> LW Beyond Mido + + // clang-format on }; static s16 grottoExitList[NUM_GROTTOS] = {0}; diff --git a/soh/soh/Enhancements/randomizer/settings.cpp b/soh/soh/Enhancements/randomizer/settings.cpp index a2bf3660d..f001a7cb7 100644 --- a/soh/soh/Enhancements/randomizer/settings.cpp +++ b/soh/soh/Enhancements/randomizer/settings.cpp @@ -1147,12 +1147,6 @@ const OptionGroup& Settings::GetOptionGroup(const RandomizerSettingGroupKey key) return mOptionGroups[key]; } -void Settings::SetAllFromCVar() { - for (auto& option : mOptions) { - option.SetFromCVar(); - } -} - void Settings::UpdateOptionProperties() { // Default to hiding bridge opts and the extra sliders. mOptions[RSK_RAINBOW_BRIDGE].AddFlag(IMFLAG_SEPARATOR_BOTTOM); @@ -1274,7 +1268,8 @@ void Settings::UpdateOptionProperties() { mOptions[RSK_GANONS_TRIALS].Enable(); mOptions[RSK_TRIAL_COUNT].Enable(); // Only show the trial count slider if Trials is set to Set Number - if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("GanonTrial"), RO_GANONS_TRIALS_SKIP) == RO_GANONS_TRIALS_SET_NUMBER) { + if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("GanonTrial"), RO_GANONS_TRIALS_SET_NUMBER) == + RO_GANONS_TRIALS_SET_NUMBER) { mOptions[RSK_GANONS_TRIALS].RemoveFlag(IMFLAG_SEPARATOR_BOTTOM); mOptions[RSK_TRIAL_COUNT].Unhide(); } else { @@ -2222,11 +2217,6 @@ void Settings::ParseJson(nlohmann::json spoilerFileJson) { } } -void Settings::ReloadOptions() { - for (int i = 0; i < RSK_MAX; i++) { - mOptions[i].SetFromCVar(); - } -} void Settings::AssignContext(std::shared_ptr ctx) { mContext = ctx; } @@ -2237,13 +2227,13 @@ void Settings::ClearContext() { void Settings::SetAllToContext() { for (int i = 0; i < RSK_MAX; i++) { - mContext->GetOption(static_cast(i)).Set(mOptions[i].GetMenuOptionIndex()); + mContext->GetOption(static_cast(i)).Set(mOptions[i].GetOptionIndex()); } for (int i = 0; i < RT_MAX; i++) { - mContext->GetTrickOption(static_cast(i)).Set(mTrickOptions[i].GetMenuOptionIndex()); + mContext->GetTrickOption(static_cast(i)).Set(mTrickOptions[i].GetOptionIndex()); } for (int i = 0; i < RC_MAX; i++) { - mContext->GetItemLocation(i)->SetExcludedOption(StaticData::GetLocation(static_cast(i))->GetExcludedOption()->GetMenuOptionIndex()); + mContext->GetItemLocation(i)->SetExcludedOption(StaticData::GetLocation(static_cast(i))->GetExcludedOption()->GetOptionIndex()); } } diff --git a/soh/soh/Enhancements/randomizer/settings.h b/soh/soh/Enhancements/randomizer/settings.h index 6810b6832..271774c40 100644 --- a/soh/soh/Enhancements/randomizer/settings.h +++ b/soh/soh/Enhancements/randomizer/settings.h @@ -88,12 +88,6 @@ class Settings { */ const OptionGroup& GetOptionGroup(RandomizerSettingGroupKey key); - /** - * @brief sets the `selectedOption` of all Options to the value of the CVar - * corresponding to their `cvarName`s. - */ - void SetAllFromCVar(); - /** * @brief Updates various properties of options based on the value of other options. * Used to update visibility, whether or not interaction is disabled, and what the @@ -113,7 +107,6 @@ class Settings { */ void ParseJson(nlohmann::json spoilerFileJson); std::map> mTricksByArea = {}; - void ReloadOptions(); /** * @brief Assigns a Rando::Context instance to this settings instance diff --git a/soh/soh/Enhancements/randomizer/static_data.cpp b/soh/soh/Enhancements/randomizer/static_data.cpp index 077fb489f..0adab2e77 100644 --- a/soh/soh/Enhancements/randomizer/static_data.cpp +++ b/soh/soh/Enhancements/randomizer/static_data.cpp @@ -187,6 +187,7 @@ std::unordered_map StaticData::trialData = { }; std::unordered_map StaticData::staticHintInfoMap = { + // clang-format off // RH_GANONDORF_HINT is special cased due to being different based on master sword shuffle // Altar hints are special cased due to special hint marking rules // warp song hints are special cased due to entrances not being done properly yet @@ -211,6 +212,8 @@ std::unordered_map StaticData::staticHintInfoMap {RH_KAK_50_SKULLS_HINT, StaticHintInfo(HINT_TYPE_ITEM, {RHT_SKULLS_HINT}, RSK_KAK_50_SKULLS_HINT, true, {RC_KAK_50_GOLD_SKULLTULA_REWARD}, {}, {}, false, 50)}, {RH_KAK_100_SKULLS_HINT, StaticHintInfo(HINT_TYPE_ITEM, {RHT_SKULLS_HINT}, RSK_KAK_100_SKULLS_HINT, true, {RC_KAK_100_GOLD_SKULLTULA_REWARD}, {}, {}, false, 100)}, {RH_MASK_SHOP_HINT, StaticHintInfo(HINT_TYPE_ITEM, {RHT_MASK_SHOP_HINT}, RSK_MASK_SHOP_HINT, true, {RC_DEKU_THEATER_SKULL_MASK, RC_DEKU_THEATER_MASK_OF_TRUTH}, {}, {RC_MASK_SHOP_HINT})} + + // clang-format on }; std::unordered_map StaticData::PopulateTranslationMap(std::unordered_map input){ @@ -220,7 +223,8 @@ std::unordered_map StaticData::PopulateTranslationMap(std for (std::string string: strings){ if (output.contains(string)){ if (output[string] != key && string != ""){ - SPDLOG_DEBUG("\tREPEATED STRING IN " + message.GetEnglish(MF_CLEAN) + "\n\n"); //RANDOTODO should this cause an error of some kind? + //RANDOTODO should this cause an error of some kind? + SPDLOG_DEBUG("\tREPEATED STRING IN " + message.GetEnglish(MF_CLEAN) + "\n\n"); } } else { output[string] = key; diff --git a/soh/soh/Enhancements/timesaver_hook_handlers.cpp b/soh/soh/Enhancements/timesaver_hook_handlers.cpp index 1db34b4f6..8e4e74fb4 100644 --- a/soh/soh/Enhancements/timesaver_hook_handlers.cpp +++ b/soh/soh/Enhancements/timesaver_hook_handlers.cpp @@ -880,23 +880,12 @@ void TimeSaverOnActorInitHandler(void* actorRef) { return; } - bool shouldKeepOpen; - switch (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SleepingWaterfall"), 0)) { - case 1: - shouldKeepOpen = Flags_GetEventChkInf(EVENTCHKINF_OPENED_ZORAS_DOMAIN); - break; - case 2: - if (IS_RANDO && RAND_GET_OPTION(RSK_SLEEPING_WATERFALL) == RO_WATERFALL_OPEN) { - shouldKeepOpen = true; - } else { - shouldKeepOpen = CHECK_QUEST_ITEM(QUEST_SONG_LULLABY) && - (INV_CONTENT(ITEM_OCARINA_TIME) == ITEM_OCARINA_TIME || - INV_CONTENT(ITEM_OCARINA_FAIRY) == ITEM_OCARINA_FAIRY); - } - break; - default: - shouldKeepOpen = false; - break; + bool shouldKeepOpen = RAND_GET_OPTION(RSK_SLEEPING_WATERFALL) && IS_RANDO; + if (!shouldKeepOpen) { + int enhancement = CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SleepingWaterfall"), 0); + shouldKeepOpen = (enhancement == 2 && ((CHECK_QUEST_ITEM(QUEST_SONG_LULLABY) && + (INV_CONTENT(ITEM_OCARINA_TIME) != ITEM_NONE)))) + || (enhancement == 1 && Flags_GetEventChkInf(EVENTCHKINF_OPENED_ZORAS_DOMAIN)); } if (!shouldKeepOpen) { diff --git a/soh/soh/Enhancements/timesplits/TimeSplits.cpp b/soh/soh/Enhancements/timesplits/TimeSplits.cpp index 046536f45..9523a8feb 100644 --- a/soh/soh/Enhancements/timesplits/TimeSplits.cpp +++ b/soh/soh/Enhancements/timesplits/TimeSplits.cpp @@ -63,6 +63,7 @@ std::vector splitList; std::vector emptyList; std::vector splitObjectList = { + // clang-format off { SPLIT_TYPE_ITEM, ITEM_STICK, "Deku Stick", "ITEM_STICK", COLOR_WHITE }, { SPLIT_TYPE_ITEM, ITEM_NUT, "Deku Nut", "ITEM_NUT", COLOR_WHITE }, { SPLIT_TYPE_ITEM, ITEM_BOMB, "Bomb", "ITEM_BOMB", COLOR_WHITE }, @@ -205,9 +206,12 @@ std::vector splitObjectList = { { SPLIT_TYPE_MISC, SCENE_ZORAS_RIVER, "Lost Woods Escape", "SPECIAL_SPLIT_ENTRANCE", COLOR_WHITE }, { SPLIT_TYPE_MISC, SCENE_LOST_WOODS, "Forest Escape", "SPECIAL_SPLIT_ENTRANCE", COLOR_WHITE }, { SPLIT_TYPE_MISC, SCENE_KAKARIKO_VILLAGE, "Watchtower Death", "SPECIAL_SPLIT_ENTRANCE", COLOR_WHITE }, + + // clang-format on }; std::map> popupList = { + // clang-format off { ITEM_STICK, { ITEM_STICK, ITEM_STICK_UPGRADE_20, ITEM_STICK_UPGRADE_30 } }, { ITEM_NUT, { ITEM_NUT, ITEM_NUT_UPGRADE_30, ITEM_NUT_UPGRADE_40 } }, { ITEM_BOMB, { ITEM_BOMB_BAG_20, ITEM_BOMB_BAG_30, ITEM_BOMB_BAG_40 } }, @@ -229,6 +233,8 @@ std::map> popupList = { { ITEM_WALLET_ADULT, { ITEM_WALLET_ADULT, ITEM_WALLET_GIANT } }, { ITEM_SINGLE_MAGIC, { ITEM_SINGLE_MAGIC, ITEM_DOUBLE_MAGIC } }, { ITEM_SKULL_TOKEN, { } } + + // clang-format on }; std::string removeSpecialCharacters(const std::string& str) { diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index f0c41c3cf..9b605a599 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -1,4 +1,4 @@ -#include "OTRGlobals.h" +#include "OTRGlobals.h" #include "OTRAudio.h" #include #include @@ -43,7 +43,7 @@ #include "window/gui/resource/Font.h" #include #include "Enhancements/custom-message/CustomMessageManager.h" -#include "Enhancements/presets.h" +#include "Enhancements/Presets/Presets.h" #include "util.h" #include @@ -578,6 +578,7 @@ extern "C" void OTRAudio_Exit() { extern "C" void VanillaItemTable_Init() { static GetItemEntry getItemTable[] = { + // clang-format off 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_MAJOR, MOD_NONE, GI_BOMBCHUS_10), @@ -704,6 +705,7 @@ extern "C" void VanillaItemTable_Init() { GET_ITEM_NONE, GET_ITEM_NONE, GET_ITEM_NONE // GI_MAX - if you need to add to this table insert it before this entry. + // clang-format on }; ItemTableManager::Instance->AddItemTable(MOD_NONE); for (uint8_t i = 0; i < ARRAY_COUNT(getItemTable); i++) { @@ -840,7 +842,7 @@ std::unordered_map ItemIDtoGetItemIDMap { { ITEM_TUNIC_ZORA, GI_TUNIC_ZORA }, { ITEM_WALLET_ADULT, GI_WALLET_ADULT }, { ITEM_WALLET_GIANT, GI_WALLET_GIANT }, - { ITEM_WEIRD_EGG, GI_WEIRD_EGG } + { ITEM_WEIRD_EGG, GI_WEIRD_EGG }, }; extern "C" GetItemID RetrieveGetItemIDFromItemID(ItemID itemID) { @@ -908,7 +910,7 @@ OTRVersion ReadPortVersionFromOTR(std::string otrPath) { // Use a temporary archive instance to load the otr and read the version file auto archive = std::make_shared(otrPath); if (archive->Open()) { - auto t = archive->LoadFile("portVersion", std::make_shared()); + auto t = archive->LoadFile("portVersion"); if (t != nullptr && t->IsLoaded) { auto stream = std::make_shared(t->Buffer->data(), t->Buffer->size()); auto reader = std::make_shared(stream); @@ -1522,7 +1524,7 @@ std::map cachedCustomSFs; extern "C" SoundFontSample* ReadCustomSample(const char* path) { return nullptr; -/* + /* if (!ExtensionCache.contains(path)) return nullptr; @@ -1575,7 +1577,7 @@ extern "C" SoundFontSample* ReadCustomSample(const char* path) { } return nullptr; -*/ + */ } ImFont* OTRGlobals::CreateFontWithSize(float size, std::string fontPath) { @@ -2069,7 +2071,7 @@ extern "C" bool Randomizer_IsCheckShuffled(RandomizerCheck rc) { } extern "C" GetItemEntry GetItemMystery() { - return { ITEM_NONE_FE, 0, 0, 0, 0, 0, 0, ITEM_NONE_FE, 0, false, ITEM_FROM_NPC, ITEM_CATEGORY_JUNK, NULL, MOD_RANDOMIZER, (CustomDrawFunc)Randomizer_DrawMysteryItem }; + return GET_ITEM_MYSTERY; } extern "C" uint8_t Randomizer_IsSeedGenerated() { @@ -2378,7 +2380,7 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) { if (CVarGetInteger(CVAR_ENHANCEMENT("InjectItemCounts.GoldSkulltula"), 0) != 0) { // 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. + // when they are shuffled we 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 @@ -2394,7 +2396,11 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) { s16 gsCount = gSaveContext.inventory.gsTokens + (IS_RANDO ? 1 : 0); messageEntry = CustomMessageManager::Instance->RetrieveMessage(customMessageTableID, textId, MF_FORMATTED); messageEntry.Replace("[[gsCount]]", std::to_string(gsCount)); - } + } else if (CVarGetInteger(CVAR_ENHANCEMENT("SkulltulaFreeze"), 0) != 0 && (!IS_RANDO || Randomizer_GetSettingValue(RSK_SHUFFLE_TOKENS) == RO_TOKENSANITY_OFF)) { + messageEntry = CustomMessage::LoadVanillaMessageTableEntry(TEXT_GS_FREEZE); + messageEntry.Replace(CustomMessage::MESSAGE_END(), "\x0E\x3C"); + messageEntry += CustomMessage::MESSAGE_END(); + } } else if ((IS_RANDO || CVarGetInteger(CVAR_ENHANCEMENT("BetterBombchuShopping"), 0)) && (textId == TEXT_BUY_BOMBCHUS_10_DESC || textId == TEXT_BUY_BOMBCHUS_10_PROMPT)) { messageEntry = CustomMessageManager::Instance->RetrieveMessage(customMessageTableID, textId, MF_FORMATTED); @@ -2513,7 +2519,6 @@ void SoH_ProcessDroppedFiles(std::string filePath) { } Rando::Settings::GetInstance()->UpdateOptionProperties(); - Rando::Settings::GetInstance()->SetAllFromCVar(); auto gui = Ship::Context::GetInstance()->GetWindow()->GetGui(); gui->GetGuiWindow("Console")->Hide(); diff --git a/soh/soh/SohGui/ImGuiUtils.cpp b/soh/soh/SohGui/ImGuiUtils.cpp index ebedf6b59..435e953f7 100644 --- a/soh/soh/SohGui/ImGuiUtils.cpp +++ b/soh/soh/SohGui/ImGuiUtils.cpp @@ -125,7 +125,7 @@ std::map itemMapping = { ITEM_MAP_ENTRY(ITEM_DUNGEON_MAP), ITEM_MAP_ENTRY(ITEM_KEY_SMALL), ITEM_MAP_ENTRY(ITEM_MAGIC_SMALL), - ITEM_MAP_ENTRY(ITEM_MAGIC_LARGE) + ITEM_MAP_ENTRY(ITEM_MAGIC_LARGE), }; std::map gregMapping = { diff --git a/soh/soh/SohGui/Menu.cpp b/soh/soh/SohGui/Menu.cpp index 955b048d6..63fdca5a9 100644 --- a/soh/soh/SohGui/Menu.cpp +++ b/soh/soh/SohGui/Menu.cpp @@ -727,7 +727,7 @@ void Menu::DrawElement() { std::string sectionIndex = CVarGetString(sidebarCvar, ""); if (!sidebar->contains(sectionIndex)) { - sectionIndex = sidebar->begin()->first; + sectionIndex = menuEntries.at(headerIndex).sidebarOrder.at(0); } float sectionCenterX = pos.x + (sidebarWidth / 2); float topY = pos.y; diff --git a/soh/soh/SohGui/SohGui.cpp b/soh/soh/SohGui/SohGui.cpp index 56da5eba0..213efcfd4 100644 --- a/soh/soh/SohGui/SohGui.cpp +++ b/soh/soh/SohGui/SohGui.cpp @@ -25,7 +25,7 @@ #include "include/z64audio.h" #include "soh/SaveManager.h" #include "soh/OTRGlobals.h" -#include "soh/Enhancements/presets.h" +#include "soh/Enhancements/Presets/Presets.h" #include "soh/resource/type/Skeleton.h" #include "libultraship/libultraship.h" @@ -113,6 +113,7 @@ namespace SohGui { gui->GetGameOverlay()->TextDrawNotification(30.0f, true, "Press - to access enhancements menu"); #else gui->GetGameOverlay()->TextDrawNotification(30.0f, true, "Press F1 to access enhancements menu"); + gui->GetGameOverlay()->TextDrawNotification(30.0f, true, "Press F2 to enable the mouse cursor"); #endif }*/ @@ -124,10 +125,10 @@ namespace SohGui { SPDLOG_ERROR("Could not find stats window"); } - mConsoleWindow = std::make_shared(CVAR_WINDOW("Console"), "Console##SoH", ImVec2(820, 630)); + mConsoleWindow = std::make_shared(CVAR_WINDOW("SohConsole"), "Console##SoH", ImVec2(820, 630)); gui->AddGuiWindow(mConsoleWindow); - mGfxDebuggerWindow = std::make_shared(CVAR_WINDOW("GfxDebugger"), "GfxDebugger##SoH", ImVec2(820, 630)); + mGfxDebuggerWindow = std::make_shared(CVAR_WINDOW("SohGfxDebugger"), "GfxDebugger##SoH", ImVec2(820, 630)); gui->AddGuiWindow(mGfxDebuggerWindow); mInputEditorWindow = gui->GetGuiWindow("Controller Configuration"); diff --git a/soh/soh/SohGui/SohMenu.h b/soh/soh/SohGui/SohMenu.h index dacb98936..bb4fc7b0f 100644 --- a/soh/soh/SohGui/SohMenu.h +++ b/soh/soh/SohGui/SohMenu.h @@ -7,7 +7,7 @@ #include "graphic/Fast3D/gfx_rendering_api.h" #include "soh/cvar_prefixes.h" #include "soh/Enhancements/enhancementTypes.h" -#include "soh/Enhancements/presets.h" +#include "soh/Enhancements/Presets/Presets.h" extern "C" { #include "z64.h" @@ -196,18 +196,6 @@ static const std::unordered_map enhancementPresetList = { { ENHANCEMENT_PRESET_RANDOMIZER, "Randomizer" } }; -static const char* itemCountMessageCVars[3] = { - CVAR_ENHANCEMENT("InjectItemCounts.GoldSkulltula"), - CVAR_ENHANCEMENT("InjectItemCounts.HeartPiece"), - CVAR_ENHANCEMENT("InjectItemCounts.HeartContainer"), -}; - -static const char* itemCountMessageOptions[ARRAY_COUNT(itemCountMessageCVars)] = { - "Gold Skulltula Tokens", - "Pieces of Heart", - "Heart Containers", -}; - class SohMenu : public Ship::Menu { public: SohMenu(const std::string& consoleVariable, const std::string& name); diff --git a/soh/soh/SohGui/SohMenuBar.cpp b/soh/soh/SohGui/SohMenuBar.cpp index ed63fea7b..170ef349a 100644 --- a/soh/soh/SohGui/SohMenuBar.cpp +++ b/soh/soh/SohGui/SohMenuBar.cpp @@ -14,7 +14,7 @@ #include "functions.h" #include "variables.h" #include "soh/Enhancements/game-interactor/GameInteractor.h" -#include "soh/Enhancements/presets.h" +#include "soh/Enhancements/Presets/Presets.h" #include "soh/Enhancements/mods.h" #include "soh/Notification/Notification.h" #include "soh/Enhancements/cosmetics/authenticGfxPatches.h" @@ -84,8 +84,6 @@ namespace SohGui { std::unordered_map availableWindowBackendsMap; Ship::WindowBackend configWindowBackend; -extern std::shared_ptr mGfxDebuggerWindow; - void DrawSettingsMenu() { } diff --git a/soh/soh/SohGui/SohMenuDevTools.cpp b/soh/soh/SohGui/SohMenuDevTools.cpp index 53d866a8e..c8b3e96b7 100644 --- a/soh/soh/SohGui/SohMenuDevTools.cpp +++ b/soh/soh/SohGui/SohMenuDevTools.cpp @@ -42,7 +42,7 @@ void SohMenu::AddMenuDevTools() { AddWidget(path, "Better Debug Warp Screen", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_DEVELOPER_TOOLS("BetterDebugWarpScreen")) .Options(CheckboxOptions().Tooltip( - "Optimized debug warp screen, with the added ability to chose entrances and time of day")); + "Optimized debug warp screen, with the added ability to chose entrances and time of day").DefaultValue(true)); AddWidget(path, "Debug Warp Screen Translation", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation")) .Options(CheckboxOptions() @@ -98,7 +98,7 @@ void SohMenu::AddMenuDevTools() { path.sidebarName = "Console"; AddSidebarEntry("Dev Tools", path.sidebarName, 1); AddWidget(path, "Popout Console", WIDGET_WINDOW_BUTTON) - .CVar(CVAR_WINDOW("Console")) + .CVar(CVAR_WINDOW("SohConsole")) .WindowName("Console##SoH") .Options(WindowButtonOptions().Tooltip("Enables the separate Console Window.")); @@ -162,7 +162,7 @@ void SohMenu::AddMenuDevTools() { path.sidebarName = "Gfx Debugger"; AddSidebarEntry("Dev Tools", path.sidebarName, 1); AddWidget(path, "Popout Gfx Debugger", WIDGET_WINDOW_BUTTON) - .CVar(CVAR_WINDOW("GfxDebugger")) + .CVar(CVAR_WINDOW("SohGfxDebugger")) .WindowName("GfxDebugger##SoH") .Options(WindowButtonOptions().Tooltip("Enables the separate Gfx Debugger Window.")); } diff --git a/soh/soh/SohGui/SohMenuEnhancements.cpp b/soh/soh/SohGui/SohMenuEnhancements.cpp index ad12c92aa..3ad6b4064 100644 --- a/soh/soh/SohGui/SohMenuEnhancements.cpp +++ b/soh/soh/SohGui/SohMenuEnhancements.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include static std::string comboboxTooltip = ""; @@ -191,26 +191,9 @@ void SohMenu::AddMenuEnhancements() { .Tooltip("Buffers your inputs to be executed a specified amount of frames later.")); AddWidget(path, "Item Count Messages", WIDGET_SEPARATOR_TEXT); - int numOptions = ARRAY_COUNT(itemCountMessageCVars); - bool allItemCountsChecked = false; - AddWidget(path, "All", WIDGET_CHECKBOX) - .ValuePointer(&allItemCountsChecked) - .PreFunc([](WidgetInfo& info) { - int numOptions = ARRAY_COUNT(itemCountMessageCVars); - *std::get(info.valuePointer) = std::all_of(itemCountMessageCVars, itemCountMessageCVars + numOptions, - [](const char* cvar) { return CVarGetInteger(cvar, 0); }); - }) - .Callback([](WidgetInfo& info) { - int32_t newValue = *std::get(info.valuePointer) ? 1 : 0; - int numOptions = ARRAY_COUNT(itemCountMessageCVars); - std::for_each(itemCountMessageCVars, itemCountMessageCVars + numOptions, - [newValue](const char* cvar) { CVarSetInteger(cvar, newValue); }); - - Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame(); - }); - for (int i = 0; i < numOptions; i++) { - AddWidget(path, itemCountMessageOptions[i], WIDGET_CVAR_CHECKBOX).CVar(itemCountMessageCVars[i]); - } + AddWidget(path, "Gold Skulltula Tokens", WIDGET_CVAR_CHECKBOX).CVar(CVAR_ENHANCEMENT("InjectItemCounts.GoldSkulltula")); + AddWidget(path, "Pieces of Heart", WIDGET_CVAR_CHECKBOX).CVar(CVAR_ENHANCEMENT("InjectItemCounts.HeartPiece")); + AddWidget(path, "Heart Containers", WIDGET_CVAR_CHECKBOX).CVar(CVAR_ENHANCEMENT("InjectItemCounts.HeartContainer")); path.column = SECTION_COLUMN_3; AddWidget(path, "Misc", WIDGET_SEPARATOR_TEXT); @@ -266,35 +249,35 @@ void SohMenu::AddMenuEnhancements() { path.column = SECTION_COLUMN_1; AddWidget(path, "Cutscenes", WIDGET_SEPARATOR_TEXT); - bool allSkipsChecked = false; - AddWidget(path, "Skip All", WIDGET_CHECKBOX) - .ValuePointer(&allSkipsChecked) - .PreFunc([](WidgetInfo& info) { - *std::get(info.valuePointer) = - CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Intro"), IS_RANDO) && - CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Entrances"), IS_RANDO) && - CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO) && - CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.LearnSong"), IS_RANDO) && - CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.BossIntro"), IS_RANDO) && - CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.QuickBossDeaths"), IS_RANDO) && - CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.OnePoint"), IS_RANDO) && - CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipOwlInteractions"), IS_RANDO) && - CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO) && - CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.DisableTitleCard"), IS_RANDO); - }) + AddWidget(path, "All##Skips", WIDGET_BUTTON) + .Options(ButtonOptions().Size(Sizes::Inline)) .Callback([](WidgetInfo& info) { - int32_t newValue = *std::get(info.valuePointer) ? 1 : 0; + CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Intro"), true); + CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Entrances"), true); + CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), true); + CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.LearnSong"), true); + CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.BossIntro"), true); + CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.QuickBossDeaths"), true); + CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.OnePoint"), true); + CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipOwlInteractions"), true); + CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), true); + CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.DisableTitleCard"), true); - CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Intro"), newValue); - CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Entrances"), newValue); - CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), newValue); - CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.LearnSong"), newValue); - CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.BossIntro"), newValue); - CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.QuickBossDeaths"), newValue); - CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.OnePoint"), newValue); - CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipOwlInteractions"), newValue); - CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), newValue); - CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.DisableTitleCard"), newValue); + Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame(); + }); + AddWidget(path, "None##Skips", WIDGET_BUTTON).SameLine(true) + .Options(ButtonOptions().Size(Sizes::Inline)) + .Callback([](WidgetInfo& info) { + CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Intro"), false); + CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Entrances"), false); + CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), false); + CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.LearnSong"), false); + CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.BossIntro"), false); + CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.QuickBossDeaths"), false); + CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.OnePoint"), false); + CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipOwlInteractions"), false); + CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), false); + CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.DisableTitleCard"), false); Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame(); }); @@ -900,16 +883,16 @@ void SohMenu::AddMenuEnhancements() { AddWidget(path, "Fix Camera Drift", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_ENHANCEMENT("FixCameraDrift")) .Options(CheckboxOptions().Tooltip( - "Fixes camera slightly drifting to the left when standing still due to a math error.")); + "Fixes camera slightly drifting to the left when standing still due to a math error. May impact certain glitches.")); AddWidget(path, "Fix Camera Swing", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_ENHANCEMENT("FixCameraSwing")) .Options(CheckboxOptions().Tooltip( "Fixes camera getting stuck on collision when standing still. Also fixes slight shift " - "back in camera when Link stops moving.")); + "back in camera when Link stops moving. May impact certain glitches.")); AddWidget(path, "Fix Hanging Ledge Swing Rate", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_ENHANCEMENT("FixHangingLedgeSwingRate")) .Options(CheckboxOptions().Tooltip( - "Fixes camera swing rate when the player falls off a ledge and the camera swings around.")); + "Fixes camera swing rate when the player falls off a ledge and the camera swings around. May impact certain glitches.")); path.column = SECTION_COLUMN_2; AddWidget(path, "Graphical Fixes", WIDGET_SEPARATOR_TEXT); @@ -921,7 +904,7 @@ void SohMenu::AddMenuEnhancements() { .Options(CheckboxOptions().Tooltip( "Removes the Dungeon Entrance icon on the top-left corner of the screen when no dungeon is present on the " "current map.")); - AddWidget(path, "Fix Two-Handled Idle Animations", WIDGET_CVAR_CHECKBOX) + AddWidget(path, "Fix Two-Handed Idle Animations", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_ENHANCEMENT("TwoHandedIdle")) .Options(CheckboxOptions().Tooltip( "Re-Enables the two-handed idle animation, a seemingly finished animation that was disabled on accident " @@ -992,7 +975,7 @@ void SohMenu::AddMenuEnhancements() { .Options(CheckboxOptions().Tooltip( "Restore pre-release behavior where defeating a Gold Skulltula will play a cutscene showing it die.")); AddWidget(path, "Pulsate Boss Icon", WIDGET_CVAR_CHECKBOX) - .CVar(CVAR_ENHANCEMENT("Pulsate Boss Icon")) + .CVar(CVAR_ENHANCEMENT("PulsateBossIcon")) .Options(CheckboxOptions().Tooltip( "Restores an unfinished feature to pulsate the boss room icon when you are in the boss room.")); @@ -1377,6 +1360,11 @@ void SohMenu::AddMenuEnhancements() { .PreFunc(fishingDisabledFunc) .Options( CheckboxOptions().Tooltip("The Pond Owner will not ask to confirm if you want to keep a smaller Fish.")); + AddWidget(path, "All Fish are Hyrule Loaches", WIDGET_CVAR_CHECKBOX) + .CVar(CVAR_ENHANCEMENT("AllHyruleLoaches")) + .PreFunc(fishingDisabledFunc) + .Options(CheckboxOptions().Tooltip("Every fish in the Fishing Pond will always be a Hyrule Loach.\n\n" + "NOTE: This requires reloading the area.")); AddWidget(path, "Child Minimum Weight: %d lbs.", WIDGET_CVAR_SLIDER_INT) .CVar(CVAR_ENHANCEMENT("MinimumFishWeightChild")) .PreFunc(fishingDisabledFunc) @@ -1387,11 +1375,6 @@ void SohMenu::AddMenuEnhancements() { .PreFunc(fishingDisabledFunc) .Options(IntSliderOptions().Min(6).Max(13).DefaultValue(13).Format("%d lbs.").Tooltip( "The minimum weight for the unique fishing reward as an Adult.")); - AddWidget(path, "All Fish are Hyrule Loaches", WIDGET_CVAR_SLIDER_INT) - .CVar(CVAR_ENHANCEMENT("AllHyruleLoaches")) - .PreFunc(fishingDisabledFunc) - .Options(IntSliderOptions().Tooltip("Every fish in the Fishing Pond will always be a Hyrule Loach.\n\n" - "NOTE: This requires reloading the area.")); // Extra Modes path.sidebarName = "Extra Modes"; diff --git a/soh/soh/SohGui/SohMenuSettings.cpp b/soh/soh/SohGui/SohMenuSettings.cpp index 20ce9ff50..eaa739afc 100644 --- a/soh/soh/SohGui/SohMenuSettings.cpp +++ b/soh/soh/SohGui/SohMenuSettings.cpp @@ -113,7 +113,7 @@ void SohMenu::AddMenuSettings() { AddWidget(path, "Boot", WIDGET_SEPARATOR_TEXT); AddWidget(path, "Boot Sequence", WIDGET_CVAR_COMBOBOX) - .CVar(CVAR_ENHANCEMENT("BootSequence")) + .CVar(CVAR_SETTING("BootSequence")) .Options(ComboboxOptions() .DefaultIndex(BOOTSEQUENCE_DEFAULT) .LabelPosition(LabelPositions::Far) diff --git a/soh/soh/SohGui/UIWidgets.hpp b/soh/soh/SohGui/UIWidgets.hpp index 325795023..46efce63a 100644 --- a/soh/soh/SohGui/UIWidgets.hpp +++ b/soh/soh/SohGui/UIWidgets.hpp @@ -534,9 +534,9 @@ namespace UIWidgets { PushStyleCombobox(options.color); const char* longest; - int length = 0; + size_t length = 0; for (auto& [index, string] : comboMap) { - int len = strlen(string); + size_t len = strlen(string); if (len > length) { longest = string; length = len; @@ -781,9 +781,9 @@ namespace UIWidgets { PushStyleCombobox(options.color); const char* longest; - int length = 0; + size_t length = 0; for (size_t i = 0; i < N; i++) { - int len = strlen(comboArray[i]); + size_t len = strlen(comboArray[i]); if (len > length) { longest = comboArray[i]; length = len; diff --git a/soh/soh/frame_interpolation.cpp b/soh/soh/frame_interpolation.cpp index c42f0e89f..4d8f63486 100644 --- a/soh/soh/frame_interpolation.cpp +++ b/soh/soh/frame_interpolation.cpp @@ -605,6 +605,7 @@ static bool invert_matrix(const float m[16], float invOut[16]) { float inv[16], det; int i; + // clang-format off inv[0] = m[5] * m[10] * m[15] - m[5] * m[11] * m[14] - m[9] * m[6] * m[15] + @@ -716,6 +717,7 @@ static bool invert_matrix(const float m[16], float invOut[16]) { m[4] * m[2] * m[9] + m[8] * m[1] * m[6] - m[8] * m[2] * m[5]; + // clang-format on det = m[0] * inv[0] + m[1] * inv[4] + m[2] * inv[8] + m[3] * inv[12]; diff --git a/soh/soh/resource/importer/AnimationFactory.cpp b/soh/soh/resource/importer/AnimationFactory.cpp index 13aa71c86..45b582035 100644 --- a/soh/soh/resource/importer/AnimationFactory.cpp +++ b/soh/soh/resource/importer/AnimationFactory.cpp @@ -3,12 +3,12 @@ #include "spdlog/spdlog.h" namespace SOH { -std::shared_ptr ResourceFactoryBinaryAnimationV0::ReadResource(std::shared_ptr file) { - if (!FileHasValidFormatAndReader(file)) { +std::shared_ptr ResourceFactoryBinaryAnimationV0::ReadResource(std::shared_ptr file, std::shared_ptr initData) { + if (!FileHasValidFormatAndReader(file, initData)) { return nullptr; } - auto animation = std::make_shared(file->InitData); + auto animation = std::make_shared(initData); auto reader = std::get>(file->Reader); AnimationType animType = (AnimationType)reader->ReadUInt32(); diff --git a/soh/soh/resource/importer/AnimationFactory.h b/soh/soh/resource/importer/AnimationFactory.h index ae27832b6..b77374602 100644 --- a/soh/soh/resource/importer/AnimationFactory.h +++ b/soh/soh/resource/importer/AnimationFactory.h @@ -6,6 +6,6 @@ namespace SOH { class ResourceFactoryBinaryAnimationV0 : public Ship::ResourceFactoryBinary { public: - std::shared_ptr ReadResource(std::shared_ptr file) override; + std::shared_ptr ReadResource(std::shared_ptr file, std::shared_ptr initData) override; }; } // namespace SOH diff --git a/soh/soh/resource/importer/ArrayFactory.cpp b/soh/soh/resource/importer/ArrayFactory.cpp index 39be7c093..50e208a48 100644 --- a/soh/soh/resource/importer/ArrayFactory.cpp +++ b/soh/soh/resource/importer/ArrayFactory.cpp @@ -4,12 +4,12 @@ #include "graphic/Fast3D/lus_gbi.h" namespace SOH { -std::shared_ptr ResourceFactoryBinaryArrayV0::ReadResource(std::shared_ptr file) { - if (!FileHasValidFormatAndReader(file)) { +std::shared_ptr ResourceFactoryBinaryArrayV0::ReadResource(std::shared_ptr file, std::shared_ptr initData) { + if (!FileHasValidFormatAndReader(file, initData)) { return nullptr; } - auto array = std::make_shared(file->InitData); + auto array = std::make_shared(initData); auto reader = std::get>(file->Reader); array->ArrayType = (ArrayResourceType)reader->ReadUInt32(); diff --git a/soh/soh/resource/importer/ArrayFactory.h b/soh/soh/resource/importer/ArrayFactory.h index b9f5ca75b..4497591c4 100644 --- a/soh/soh/resource/importer/ArrayFactory.h +++ b/soh/soh/resource/importer/ArrayFactory.h @@ -6,6 +6,6 @@ namespace SOH { class ResourceFactoryBinaryArrayV0 : public Ship::ResourceFactoryBinary { public: - std::shared_ptr ReadResource(std::shared_ptr file) override; + std::shared_ptr ReadResource(std::shared_ptr file, std::shared_ptr initData) override; }; } // namespace LUS diff --git a/soh/soh/resource/importer/AudioSampleFactory.cpp b/soh/soh/resource/importer/AudioSampleFactory.cpp index 0ec3f5260..8ef0b9657 100644 --- a/soh/soh/resource/importer/AudioSampleFactory.cpp +++ b/soh/soh/resource/importer/AudioSampleFactory.cpp @@ -3,12 +3,12 @@ #include "spdlog/spdlog.h" namespace SOH { -std::shared_ptr ResourceFactoryBinaryAudioSampleV2::ReadResource(std::shared_ptr file) { - if (!FileHasValidFormatAndReader(file)) { +std::shared_ptr ResourceFactoryBinaryAudioSampleV2::ReadResource(std::shared_ptr file, std::shared_ptr initData) { + if (!FileHasValidFormatAndReader(file, initData)) { return nullptr; } - auto audioSample = std::make_shared(file->InitData); + auto audioSample = std::make_shared(initData); auto reader = std::get>(file->Reader); audioSample->sample.codec = reader->ReadUByte(); diff --git a/soh/soh/resource/importer/AudioSampleFactory.h b/soh/soh/resource/importer/AudioSampleFactory.h index 372e8a310..5a1a9da3a 100644 --- a/soh/soh/resource/importer/AudioSampleFactory.h +++ b/soh/soh/resource/importer/AudioSampleFactory.h @@ -6,6 +6,6 @@ namespace SOH { class ResourceFactoryBinaryAudioSampleV2 : public Ship::ResourceFactoryBinary { public: - std::shared_ptr ReadResource(std::shared_ptr file) override; + std::shared_ptr ReadResource(std::shared_ptr file, std::shared_ptr initData) override; }; } // namespace SOH diff --git a/soh/soh/resource/importer/AudioSequenceFactory.cpp b/soh/soh/resource/importer/AudioSequenceFactory.cpp index 35da7f798..a10ae7eee 100644 --- a/soh/soh/resource/importer/AudioSequenceFactory.cpp +++ b/soh/soh/resource/importer/AudioSequenceFactory.cpp @@ -3,12 +3,12 @@ #include "spdlog/spdlog.h" namespace SOH { -std::shared_ptr ResourceFactoryBinaryAudioSequenceV2::ReadResource(std::shared_ptr file) { - if (!FileHasValidFormatAndReader(file)) { +std::shared_ptr ResourceFactoryBinaryAudioSequenceV2::ReadResource(std::shared_ptr file, std::shared_ptr initData) { + if (!FileHasValidFormatAndReader(file, initData)) { return nullptr; } - auto audioSequence = std::make_shared(file->InitData); + auto audioSequence = std::make_shared(initData); auto reader = std::get>(file->Reader); audioSequence->sequence.seqDataSize = reader->ReadInt32(); diff --git a/soh/soh/resource/importer/AudioSequenceFactory.h b/soh/soh/resource/importer/AudioSequenceFactory.h index 35fd1ebef..71b1f713d 100644 --- a/soh/soh/resource/importer/AudioSequenceFactory.h +++ b/soh/soh/resource/importer/AudioSequenceFactory.h @@ -6,6 +6,6 @@ namespace SOH { class ResourceFactoryBinaryAudioSequenceV2 : public Ship::ResourceFactoryBinary { public: - std::shared_ptr ReadResource(std::shared_ptr file) override; + std::shared_ptr ReadResource(std::shared_ptr file, std::shared_ptr initData) override; }; } // namespace SOH diff --git a/soh/soh/resource/importer/AudioSoundFontFactory.cpp b/soh/soh/resource/importer/AudioSoundFontFactory.cpp index 534a7914c..e5c637574 100644 --- a/soh/soh/resource/importer/AudioSoundFontFactory.cpp +++ b/soh/soh/resource/importer/AudioSoundFontFactory.cpp @@ -4,12 +4,12 @@ #include "libultraship/libultraship.h" namespace SOH { -std::shared_ptr ResourceFactoryBinaryAudioSoundFontV2::ReadResource(std::shared_ptr file) { - if (!FileHasValidFormatAndReader(file)) { +std::shared_ptr ResourceFactoryBinaryAudioSoundFontV2::ReadResource(std::shared_ptr file, std::shared_ptr initData) { + if (!FileHasValidFormatAndReader(file, initData)) { return nullptr; } - auto audioSoundFont = std::make_shared(file->InitData); + auto audioSoundFont = std::make_shared(initData); auto reader = std::get>(file->Reader); audioSoundFont->soundFont.fntIndex = reader->ReadInt32(); diff --git a/soh/soh/resource/importer/AudioSoundFontFactory.h b/soh/soh/resource/importer/AudioSoundFontFactory.h index a80b8fe97..5db75aa66 100644 --- a/soh/soh/resource/importer/AudioSoundFontFactory.h +++ b/soh/soh/resource/importer/AudioSoundFontFactory.h @@ -6,6 +6,6 @@ namespace SOH { class ResourceFactoryBinaryAudioSoundFontV2 : public Ship::ResourceFactoryBinary { public: - std::shared_ptr ReadResource(std::shared_ptr file) override; + std::shared_ptr ReadResource(std::shared_ptr file, std::shared_ptr initData) override; }; } // namespace SOH diff --git a/soh/soh/resource/importer/BackgroundFactory.cpp b/soh/soh/resource/importer/BackgroundFactory.cpp index 6be484698..e8902827f 100644 --- a/soh/soh/resource/importer/BackgroundFactory.cpp +++ b/soh/soh/resource/importer/BackgroundFactory.cpp @@ -3,12 +3,12 @@ #include "spdlog/spdlog.h" namespace SOH { -std::shared_ptr ResourceFactoryBinaryBackgroundV0::ReadResource(std::shared_ptr file) { - if (!FileHasValidFormatAndReader(file)) { +std::shared_ptr ResourceFactoryBinaryBackgroundV0::ReadResource(std::shared_ptr file, std::shared_ptr initData) { + if (!FileHasValidFormatAndReader(file, initData)) { return nullptr; } - auto background = std::make_shared(file->InitData); + auto background = std::make_shared(initData); auto reader = std::get>(file->Reader); uint32_t dataSize = reader->ReadUInt32(); diff --git a/soh/soh/resource/importer/BackgroundFactory.h b/soh/soh/resource/importer/BackgroundFactory.h index e74e897e9..587f750a1 100644 --- a/soh/soh/resource/importer/BackgroundFactory.h +++ b/soh/soh/resource/importer/BackgroundFactory.h @@ -6,6 +6,6 @@ namespace SOH { class ResourceFactoryBinaryBackgroundV0 : public Ship::ResourceFactoryBinary { public: - std::shared_ptr ReadResource(std::shared_ptr file) override; + std::shared_ptr ReadResource(std::shared_ptr file, std::shared_ptr initData) override; }; } // namespace SOH diff --git a/soh/soh/resource/importer/CollisionHeaderFactory.cpp b/soh/soh/resource/importer/CollisionHeaderFactory.cpp index 4636d80c7..0c615fa87 100644 --- a/soh/soh/resource/importer/CollisionHeaderFactory.cpp +++ b/soh/soh/resource/importer/CollisionHeaderFactory.cpp @@ -3,12 +3,12 @@ #include "spdlog/spdlog.h" namespace SOH { -std::shared_ptr ResourceFactoryBinaryCollisionHeaderV0::ReadResource(std::shared_ptr file) { - if (!FileHasValidFormatAndReader(file)) { +std::shared_ptr ResourceFactoryBinaryCollisionHeaderV0::ReadResource(std::shared_ptr file, std::shared_ptr initData) { + if (!FileHasValidFormatAndReader(file, initData)) { return nullptr; } - auto collisionHeader = std::make_shared(file->InitData); + auto collisionHeader = std::make_shared(initData); auto reader = std::get>(file->Reader); collisionHeader->collisionHeaderData.minBounds.x = reader->ReadInt16(); @@ -123,12 +123,12 @@ std::shared_ptr ResourceFactoryBinaryCollisionHeaderV0::ReadRes return collisionHeader; } -std::shared_ptr ResourceFactoryXMLCollisionHeaderV0::ReadResource(std::shared_ptr file) { - if (!FileHasValidFormatAndReader(file)) { +std::shared_ptr ResourceFactoryXMLCollisionHeaderV0::ReadResource(std::shared_ptr file, std::shared_ptr initData) { + if (!FileHasValidFormatAndReader(file, initData)) { return nullptr; } - auto collisionHeader = std::make_shared(file->InitData); + auto collisionHeader = std::make_shared(initData); auto reader = std::get>(file->Reader)->FirstChildElement(); auto child = reader->FirstChildElement(); diff --git a/soh/soh/resource/importer/CollisionHeaderFactory.h b/soh/soh/resource/importer/CollisionHeaderFactory.h index dd438f9c3..66702f33d 100644 --- a/soh/soh/resource/importer/CollisionHeaderFactory.h +++ b/soh/soh/resource/importer/CollisionHeaderFactory.h @@ -7,11 +7,11 @@ namespace SOH { class ResourceFactoryBinaryCollisionHeaderV0 : public Ship::ResourceFactoryBinary { public: - std::shared_ptr ReadResource(std::shared_ptr file) override; + std::shared_ptr ReadResource(std::shared_ptr file, std::shared_ptr initData) override; }; class ResourceFactoryXMLCollisionHeaderV0 : public Ship::ResourceFactoryXML { public: - std::shared_ptr ReadResource(std::shared_ptr file) override; + std::shared_ptr ReadResource(std::shared_ptr file, std::shared_ptr initData) override; }; } // namespace SOH diff --git a/soh/soh/resource/importer/CutsceneFactory.cpp b/soh/soh/resource/importer/CutsceneFactory.cpp index 49e44680c..63a5695e9 100644 --- a/soh/soh/resource/importer/CutsceneFactory.cpp +++ b/soh/soh/resource/importer/CutsceneFactory.cpp @@ -58,12 +58,12 @@ static inline uint32_t read_CMD_HH(std::shared_ptr reader) { } namespace SOH { -std::shared_ptr ResourceFactoryBinaryCutsceneV0::ReadResource(std::shared_ptr file) { - if (!FileHasValidFormatAndReader(file)) { +std::shared_ptr ResourceFactoryBinaryCutsceneV0::ReadResource(std::shared_ptr file, std::shared_ptr initData) { + if (!FileHasValidFormatAndReader(file, initData)) { return nullptr; } - auto cutscene = std::make_shared(file->InitData); + auto cutscene = std::make_shared(initData); auto reader = std::get>(file->Reader); uint32_t numEntries = reader->ReadUInt32(); diff --git a/soh/soh/resource/importer/CutsceneFactory.h b/soh/soh/resource/importer/CutsceneFactory.h index 8afe98bb8..9eb5e1415 100644 --- a/soh/soh/resource/importer/CutsceneFactory.h +++ b/soh/soh/resource/importer/CutsceneFactory.h @@ -6,6 +6,6 @@ namespace SOH { class ResourceFactoryBinaryCutsceneV0 : public Ship::ResourceFactoryBinary { public: - std::shared_ptr ReadResource(std::shared_ptr file) override; + std::shared_ptr ReadResource(std::shared_ptr file, std::shared_ptr initData) override; }; } // namespace SOH diff --git a/soh/soh/resource/importer/PathFactory.cpp b/soh/soh/resource/importer/PathFactory.cpp index f0f92be02..19c374c64 100644 --- a/soh/soh/resource/importer/PathFactory.cpp +++ b/soh/soh/resource/importer/PathFactory.cpp @@ -4,12 +4,12 @@ #include "spdlog/spdlog.h" namespace SOH { -std::shared_ptr ResourceFactoryBinaryPathV0::ReadResource(std::shared_ptr file) { - if (!FileHasValidFormatAndReader(file)) { +std::shared_ptr ResourceFactoryBinaryPathV0::ReadResource(std::shared_ptr file, std::shared_ptr initData) { + if (!FileHasValidFormatAndReader(file, initData)) { return nullptr; } - auto path = std::make_shared(file->InitData); + auto path = std::make_shared(initData); auto reader = std::get>(file->Reader); path->numPaths = reader->ReadUInt32(); @@ -43,12 +43,12 @@ std::shared_ptr ResourceFactoryBinaryPathV0::ReadResource(std:: return path; } -std::shared_ptr ResourceFactoryXMLPathV0::ReadResource(std::shared_ptr file) { - if (!FileHasValidFormatAndReader(file)) { +std::shared_ptr ResourceFactoryXMLPathV0::ReadResource(std::shared_ptr file, std::shared_ptr initData) { + if (!FileHasValidFormatAndReader(file, initData)) { return nullptr; } - auto path = std::make_shared(file->InitData); + auto path = std::make_shared(initData); auto reader = std::get>(file->Reader); auto pathElement = reader->RootElement(); diff --git a/soh/soh/resource/importer/PathFactory.h b/soh/soh/resource/importer/PathFactory.h index 9dd73b110..2cba7d219 100644 --- a/soh/soh/resource/importer/PathFactory.h +++ b/soh/soh/resource/importer/PathFactory.h @@ -7,11 +7,11 @@ namespace SOH { class ResourceFactoryBinaryPathV0 : public Ship::ResourceFactoryBinary { public: - std::shared_ptr ReadResource(std::shared_ptr file) override; + std::shared_ptr ReadResource(std::shared_ptr file, std::shared_ptr initData) override; }; class ResourceFactoryXMLPathV0 : public Ship::ResourceFactoryXML { public: - std::shared_ptr ReadResource(std::shared_ptr file) override; + std::shared_ptr ReadResource(std::shared_ptr file, std::shared_ptr initData) override; }; } // namespace SOH diff --git a/soh/soh/resource/importer/PlayerAnimationFactory.cpp b/soh/soh/resource/importer/PlayerAnimationFactory.cpp index 59610da46..76857b351 100644 --- a/soh/soh/resource/importer/PlayerAnimationFactory.cpp +++ b/soh/soh/resource/importer/PlayerAnimationFactory.cpp @@ -3,12 +3,12 @@ #include "spdlog/spdlog.h" namespace SOH { -std::shared_ptr ResourceFactoryBinaryPlayerAnimationV0::ReadResource(std::shared_ptr file) { - if (!FileHasValidFormatAndReader(file)) { +std::shared_ptr ResourceFactoryBinaryPlayerAnimationV0::ReadResource(std::shared_ptr file, std::shared_ptr initData) { + if (!FileHasValidFormatAndReader(file, initData)) { return nullptr; } - auto playerAnimation = std::make_shared(file->InitData); + auto playerAnimation = std::make_shared(initData); auto reader = std::get>(file->Reader); uint32_t numEntries = reader->ReadUInt32(); diff --git a/soh/soh/resource/importer/PlayerAnimationFactory.h b/soh/soh/resource/importer/PlayerAnimationFactory.h index 3ee8b1d3a..d7efb5035 100644 --- a/soh/soh/resource/importer/PlayerAnimationFactory.h +++ b/soh/soh/resource/importer/PlayerAnimationFactory.h @@ -6,6 +6,6 @@ namespace SOH { class ResourceFactoryBinaryPlayerAnimationV0 : public Ship::ResourceFactoryBinary { public: - std::shared_ptr ReadResource(std::shared_ptr file) override; + std::shared_ptr ReadResource(std::shared_ptr file, std::shared_ptr initData) override; }; } // namespace SOH diff --git a/soh/soh/resource/importer/SceneFactory.cpp b/soh/soh/resource/importer/SceneFactory.cpp index 1bcf92e1c..b8cecf5b5 100644 --- a/soh/soh/resource/importer/SceneFactory.cpp +++ b/soh/soh/resource/importer/SceneFactory.cpp @@ -93,12 +93,12 @@ std::shared_ptr ResourceFactoryBinarySceneV0::ParseSceneCommand(s return result; } -std::shared_ptr ResourceFactoryBinarySceneV0::ReadResource(std::shared_ptr file) { - if (!FileHasValidFormatAndReader(file)) { +std::shared_ptr ResourceFactoryBinarySceneV0::ReadResource(std::shared_ptr file, std::shared_ptr initData) { + if (!FileHasValidFormatAndReader(file, initData)) { return nullptr; } - auto scene = std::make_shared(file->InitData); + auto scene = std::make_shared(initData); auto reader = std::get>(file->Reader); ParseSceneCommands(scene, reader); @@ -216,12 +216,12 @@ std::shared_ptr ResourceFactoryXMLSceneV0::ParseSceneCommand(std: return result; } -std::shared_ptr ResourceFactoryXMLSceneV0::ReadResource(std::shared_ptr file) { - if (!FileHasValidFormatAndReader(file)) { +std::shared_ptr ResourceFactoryXMLSceneV0::ReadResource(std::shared_ptr file, std::shared_ptr initData) { + if (!FileHasValidFormatAndReader(file, initData)) { return nullptr; } - auto scene = std::make_shared(file->InitData); + auto scene = std::make_shared(initData); auto reader = std::get>(file->Reader); ParseSceneCommands(scene, reader); diff --git a/soh/soh/resource/importer/SceneFactory.h b/soh/soh/resource/importer/SceneFactory.h index 115c3f3f5..52a4c42c9 100644 --- a/soh/soh/resource/importer/SceneFactory.h +++ b/soh/soh/resource/importer/SceneFactory.h @@ -12,7 +12,7 @@ class ResourceFactoryBinarySceneV0 : public Ship::ResourceFactoryBinary { public: ResourceFactoryBinarySceneV0(); - std::shared_ptr ReadResource(std::shared_ptr file) override; + std::shared_ptr ReadResource(std::shared_ptr file, std::shared_ptr initData) override; void ParseSceneCommands(std::shared_ptr scene, std::shared_ptr reader); // Doing something very similar to what we do on the ResourceLoader. @@ -28,7 +28,7 @@ class ResourceFactoryXMLSceneV0 : public Ship::ResourceFactoryXML { public: ResourceFactoryXMLSceneV0(); - std::shared_ptr ReadResource(std::shared_ptr file) override; + std::shared_ptr ReadResource(std::shared_ptr file, std::shared_ptr initData) override; void ParseSceneCommands(std::shared_ptr scene, std::shared_ptr reader); // Doing something very similar to what we do on the ResourceLoader. diff --git a/soh/soh/resource/importer/SkeletonFactory.cpp b/soh/soh/resource/importer/SkeletonFactory.cpp index d4cb965bf..e9545b978 100644 --- a/soh/soh/resource/importer/SkeletonFactory.cpp +++ b/soh/soh/resource/importer/SkeletonFactory.cpp @@ -4,12 +4,12 @@ #include namespace SOH { -std::shared_ptr ResourceFactoryBinarySkeletonV0::ReadResource(std::shared_ptr file) { - if (!FileHasValidFormatAndReader(file)) { +std::shared_ptr ResourceFactoryBinarySkeletonV0::ReadResource(std::shared_ptr file, std::shared_ptr initData) { + if (!FileHasValidFormatAndReader(file, initData)) { return nullptr; } - auto skeleton = std::make_shared(file->InitData); + auto skeleton = std::make_shared(initData); auto reader = std::get>(file->Reader); skeleton->type = (SkeletonType)reader->ReadInt8(); @@ -62,12 +62,12 @@ std::shared_ptr ResourceFactoryBinarySkeletonV0::ReadResource(s return skeleton; } -std::shared_ptr ResourceFactoryXMLSkeletonV0::ReadResource(std::shared_ptr file) { - if (!FileHasValidFormatAndReader(file)) { +std::shared_ptr ResourceFactoryXMLSkeletonV0::ReadResource(std::shared_ptr file, std::shared_ptr initData) { + if (!FileHasValidFormatAndReader(file, initData)) { return nullptr; } - auto skel = std::make_shared(file->InitData); + auto skel = std::make_shared(initData); auto reader = std::get>(file->Reader)->FirstChildElement(); auto child = reader->FirstChildElement(); diff --git a/soh/soh/resource/importer/SkeletonFactory.h b/soh/soh/resource/importer/SkeletonFactory.h index 24f92720a..33c1ea12b 100644 --- a/soh/soh/resource/importer/SkeletonFactory.h +++ b/soh/soh/resource/importer/SkeletonFactory.h @@ -7,11 +7,11 @@ namespace SOH { class ResourceFactoryBinarySkeletonV0 : public Ship::ResourceFactoryBinary { public: - std::shared_ptr ReadResource(std::shared_ptr file) override; + std::shared_ptr ReadResource(std::shared_ptr file, std::shared_ptr initData) override; }; class ResourceFactoryXMLSkeletonV0 : public Ship::ResourceFactoryXML { public: - std::shared_ptr ReadResource(std::shared_ptr file) override; + std::shared_ptr ReadResource(std::shared_ptr file, std::shared_ptr initData) override; }; } // namespace SOH diff --git a/soh/soh/resource/importer/SkeletonLimbFactory.cpp b/soh/soh/resource/importer/SkeletonLimbFactory.cpp index 3f780e6d4..4efdd66dc 100644 --- a/soh/soh/resource/importer/SkeletonLimbFactory.cpp +++ b/soh/soh/resource/importer/SkeletonLimbFactory.cpp @@ -4,12 +4,12 @@ #include "libultraship/libultraship.h" namespace SOH { -std::shared_ptr ResourceFactoryBinarySkeletonLimbV0::ReadResource(std::shared_ptr file) { - if (!FileHasValidFormatAndReader(file)) { +std::shared_ptr ResourceFactoryBinarySkeletonLimbV0::ReadResource(std::shared_ptr file, std::shared_ptr initData) { + if (!FileHasValidFormatAndReader(file, initData)) { return nullptr; } - auto skeletonLimb = std::make_shared(file->InitData); + auto skeletonLimb = std::make_shared(initData); auto reader = std::get>(file->Reader); skeletonLimb->limbType = (LimbType)reader->ReadInt8(); @@ -184,12 +184,12 @@ std::shared_ptr ResourceFactoryBinarySkeletonLimbV0::ReadResour return skeletonLimb; } -std::shared_ptr ResourceFactoryXMLSkeletonLimbV0::ReadResource(std::shared_ptr file) { - if (!FileHasValidFormatAndReader(file)) { +std::shared_ptr ResourceFactoryXMLSkeletonLimbV0::ReadResource(std::shared_ptr file, std::shared_ptr initData) { + if (!FileHasValidFormatAndReader(file, initData)) { return nullptr; } - auto skelLimb = std::make_shared(file->InitData); + auto skelLimb = std::make_shared(initData); auto reader = std::get>(file->Reader)->FirstChildElement(); std::string limbType = reader->Attribute("Type"); diff --git a/soh/soh/resource/importer/SkeletonLimbFactory.h b/soh/soh/resource/importer/SkeletonLimbFactory.h index 222cefa2c..cb5b9da22 100644 --- a/soh/soh/resource/importer/SkeletonLimbFactory.h +++ b/soh/soh/resource/importer/SkeletonLimbFactory.h @@ -7,11 +7,11 @@ namespace SOH { class ResourceFactoryBinarySkeletonLimbV0 : public Ship::ResourceFactoryBinary { public: - std::shared_ptr ReadResource(std::shared_ptr file) override; + std::shared_ptr ReadResource(std::shared_ptr file, std::shared_ptr initData) override; }; class ResourceFactoryXMLSkeletonLimbV0 : public Ship::ResourceFactoryXML { public: - std::shared_ptr ReadResource(std::shared_ptr file) override; + std::shared_ptr ReadResource(std::shared_ptr file, std::shared_ptr initData) override; }; } // namespace SOH diff --git a/soh/soh/resource/importer/TextFactory.cpp b/soh/soh/resource/importer/TextFactory.cpp index 1da1d50db..9796285c6 100644 --- a/soh/soh/resource/importer/TextFactory.cpp +++ b/soh/soh/resource/importer/TextFactory.cpp @@ -3,12 +3,12 @@ #include "spdlog/spdlog.h" namespace SOH { -std::shared_ptr ResourceFactoryBinaryTextV0::ReadResource(std::shared_ptr file) { - if (!FileHasValidFormatAndReader(file)) { +std::shared_ptr ResourceFactoryBinaryTextV0::ReadResource(std::shared_ptr file, std::shared_ptr initData) { + if (!FileHasValidFormatAndReader(file, initData)) { return nullptr; } - auto text = std::make_shared(file->InitData); + auto text = std::make_shared(initData); auto reader = std::get>(file->Reader); uint32_t msgCount = reader->ReadUInt32(); @@ -27,12 +27,12 @@ std::shared_ptr ResourceFactoryBinaryTextV0::ReadResource(std:: return text; } -std::shared_ptr ResourceFactoryXMLTextV0::ReadResource(std::shared_ptr file) { - if (!FileHasValidFormatAndReader(file)) { +std::shared_ptr ResourceFactoryXMLTextV0::ReadResource(std::shared_ptr file, std::shared_ptr initData) { + if (!FileHasValidFormatAndReader(file, initData)) { return nullptr; } - auto txt = std::make_shared(file->InitData); + auto txt = std::make_shared(initData); auto child = std::get>(file->Reader)->FirstChildElement()->FirstChildElement(); while (child != nullptr) { diff --git a/soh/soh/resource/importer/TextFactory.h b/soh/soh/resource/importer/TextFactory.h index 55a569366..2f55743b9 100644 --- a/soh/soh/resource/importer/TextFactory.h +++ b/soh/soh/resource/importer/TextFactory.h @@ -7,11 +7,11 @@ namespace SOH { class ResourceFactoryBinaryTextV0 : public Ship::ResourceFactoryBinary { public: - std::shared_ptr ReadResource(std::shared_ptr file) override; + std::shared_ptr ReadResource(std::shared_ptr file, std::shared_ptr initData) override; }; class ResourceFactoryXMLTextV0 : public Ship::ResourceFactoryXML { public: - std::shared_ptr ReadResource(std::shared_ptr file) override; + std::shared_ptr ReadResource(std::shared_ptr file, std::shared_ptr initData) override; }; } // namespace SOH diff --git a/soh/src/code/padmgr.c b/soh/src/code/padmgr.c index a8bf778af..13a82162f 100644 --- a/soh/src/code/padmgr.c +++ b/soh/src/code/padmgr.c @@ -3,6 +3,7 @@ #include #include "soh/Enhancements/game-interactor/GameInteractor.h" +#include "soh/Enhancements/controls/Mouse.h" #include "soh/OTRGlobals.h" #include "soh/ResourceManagerHelpers.h" @@ -317,6 +318,8 @@ void PadMgr_HandleRetraceMsg(PadMgr* padMgr) { osRecvMesg(queue, NULL, OS_MESG_BLOCK); osContGetReadData(padMgr->pads); + Mouse_UpdateAll(); + for (i = 0; i < __osMaxControllers; i++) { padMgr->padStatus[i].status = Controller_ShouldRumble(i); } diff --git a/soh/src/code/z_camera.c b/soh/src/code/z_camera.c index 7167daceb..7b95c70af 100644 --- a/soh/src/code/z_camera.c +++ b/soh/src/code/z_camera.c @@ -7,6 +7,7 @@ #include "overlays/actors/ovl_En_Horse/z_en_horse.h" #include "soh/frame_interpolation.h" +#include "soh/Enhancements/controls/Mouse.h" s16 Camera_ChangeSettingFlags(Camera* camera, s16 setting, s16 flags); s32 Camera_ChangeModeFlags(Camera* camera, s16 mode, u8 flags); @@ -1422,6 +1423,8 @@ s32 SetCameraManual(Camera* camera) { f32 newCamX = -D_8015BD7C->state.input[0].cur.right_stick_x * 10.0f; f32 newCamY = D_8015BD7C->state.input[0].cur.right_stick_y * 10.0f; + Mouse_HandleThirdPerson(&newCamX, &newCamY); + if ((fabsf(newCamX) >= 15.0f || fabsf(newCamY) >= 15.0f) && camera->play->manualCamera == false) { camera->play->manualCamera = true; @@ -1485,8 +1488,17 @@ s32 Camera_Free(Camera* camera) { camera->animState = 0; - f32 newCamX = -D_8015BD7C->state.input[0].cur.right_stick_x * 10.0f * (CVarGetFloat(CVAR_SETTING("FreeLook.CameraSensitivity.X"), 1.0f)); - f32 newCamY = D_8015BD7C->state.input[0].cur.right_stick_y * 10.0f * (CVarGetFloat(CVAR_SETTING("FreeLook.CameraSensitivity.Y"), 1.0f)); + f32 newCamX = -D_8015BD7C->state.input[0].cur.right_stick_x * 10.0f; + f32 newCamY = +D_8015BD7C->state.input[0].cur.right_stick_y * 10.0f; + + /* Disable mouse movement when holding down the shield */ + if (!(camera->player->stateFlags1 & 0x400000)) { + Mouse_HandleThirdPerson(&newCamX, &newCamY); + } + + newCamX *= (CVarGetFloat(CVAR_SETTING("FreeLook.CameraSensitivity.X"), 1.0f)); + newCamY *= (CVarGetFloat(CVAR_SETTING("FreeLook.CameraSensitivity.Y"), 1.0f)); + bool invertXAxis = (CVarGetInteger(CVAR_SETTING("FreeLook.InvertXAxis"), 0) && !CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0)) || (!CVarGetInteger(CVAR_SETTING("FreeLook.InvertXAxis"), 0) && CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0)); camera->play->camX += newCamX * (invertXAxis ? -1 : 1); diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index 1d9c89212..312a74215 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -2082,6 +2082,8 @@ void Player_ProcessControlStick(PlayState* play, Player* this) { direction = (u16)((s16)(sControlStickWorldYaw - this->actor.shape.rot.y) + 0x2000) >> 14; } + GameInteractor_ExecuteOnPlayerProcessStick(); + this->controlStickSpinAngles[this->controlStickDataIndex] = spinAngle; this->controlStickDirections[this->controlStickDataIndex] = direction; } @@ -4281,6 +4283,10 @@ s32 Player_CanSpinAttack(Player* this) { iter = &this->controlStickSpinAngles[0]; iter2 = &sp3C[0]; + if (GameInteractor_Should(VB_SHOULD_QUICKSPIN, false, iter2, sp3C)) { + return true; + } + for (i = 0; i < 4; i++, iter++, iter2++) { if ((*iter2 = *iter) < 0) { return false; @@ -6432,6 +6438,8 @@ s32 Player_ActionHandler_11(Player* this, PlayState* play) { Player_DetachHeldActor(play, this); if (Player_SetupAction(play, this, Player_Action_80843188, 0)) { + GameInteractor_ExecuteOnPlayerHoldUpShield(); + this->stateFlags1 |= PLAYER_STATE1_SHIELDING; if (!Player_IsChildWithHylianShield(this)) { @@ -7436,8 +7444,10 @@ s32 Player_ActionHandler_9(Player* this, PlayState* play) { if (CVarGetInteger(CVAR_ENHANCEMENT("DpadEquips"), 0) != 0) { buttonsToCheck |= BTN_DUP | BTN_DDOWN | BTN_DLEFT | BTN_DRIGHT; } - if ((this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) && (this->heldActor != NULL) && - CHECK_BTN_ANY(sControlInput->press.button, buttonsToCheck)) { + if (GameInteractor_Should(VB_THROW_OR_PUT_DOWN_HELD_ITEM, ( + (this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) && (this->heldActor != NULL) && + CHECK_BTN_ANY(sControlInput->press.button, buttonsToCheck) + ), sControlInput)) { if (!func_80835644(play, this, this->heldActor)) { if (!func_8083EAF0(this, this->heldActor)) { Player_SetupAction(play, this, Player_Action_808464B0, 1); @@ -9258,6 +9268,7 @@ void Player_Action_80843188(Player* this, PlayState* play) { sp54 = sControlInput->rel.stick_y * 100 * (CVarGetInteger(CVAR_SETTING("Controls.InvertShieldAimingYAxis"), 1) ? 1 : -1); sp50 = sControlInput->rel.stick_x * (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? 120 : -120) * (CVarGetInteger(CVAR_SETTING("Controls.InvertShieldAimingXAxis"), 0) ? -1 : 1); sp4E = this->actor.shape.rot.y - Camera_GetInputDirYaw(GET_ACTIVE_CAM(play)); + GameInteractor_ExecuteOnPlayerShieldControl(&sp50, &sp54); sp40 = Math_CosS(sp4E); sp4C = (Math_SinS(sp4E) * sp50) + (sp54 * sp40); @@ -12656,6 +12667,8 @@ s16 func_8084ABD8(PlayState* play, Player* this, s32 arg2, s16 arg3) { f32 xAxisMulti = CVarGetFloat(CVAR_SETTING("FirstPersonCameraSensitivity.X"), 1.0f); f32 yAxisMulti = CVarGetFloat(CVAR_SETTING("FirstPersonCameraSensitivity.Y"), 1.0f); + GameInteractor_ExecuteOnPlayerFirstPersonControl(this); + if (!func_8002DD78(this) && !func_808334B4(this) && (arg2 == 0)) { // First person without weapon // Y Axis if (!CVarGetInteger(CVAR_SETTING("MoveInFirstPerson"), 0)) { diff --git a/soh/src/overlays/gamestates/ovl_select/z_select.c b/soh/src/overlays/gamestates/ovl_select/z_select.c index f1899d27c..532829cbd 100644 --- a/soh/src/overlays/gamestates/ovl_select/z_select.c +++ b/soh/src/overlays/gamestates/ovl_select/z_select.c @@ -1535,7 +1535,7 @@ void Select_Draw(SelectContext* this) { void Select_Main(GameState* thisx) { SelectContext* this = (SelectContext*)thisx; - if (this->isBetterWarp != CVarGetInteger(CVAR_DEVELOPER_TOOLS("BetterDebugWarpScreen"), 0)) { + if (this->isBetterWarp != CVarGetInteger(CVAR_DEVELOPER_TOOLS("BetterDebugWarpScreen"), 1)) { Select_SwitchBetterWarpMode(this, !this->isBetterWarp); } @@ -1641,5 +1641,5 @@ void Select_Init(GameState* thisx) { CVarClear(CVAR_GENERAL("BetterDebugWarpScreenMQMode")); CVarClear(CVAR_GENERAL("BetterDebugWarpScreenMQModeScene")); - Select_SwitchBetterWarpMode(this, CVarGetInteger(CVAR_DEVELOPER_TOOLS("BetterDebugWarpScreen"), 0)); + Select_SwitchBetterWarpMode(this, CVarGetInteger(CVAR_DEVELOPER_TOOLS("BetterDebugWarpScreen"), 1)); }