From c28a604c6dbe7c345b8031128d0556438e380b8d Mon Sep 17 00:00:00 2001 From: aMannus Date: Wed, 28 Aug 2024 11:50:43 +0200 Subject: [PATCH] Cleanup and fixes --- soh/soh/Enhancements/debugger/debugSaveEditor.h | 6 ------ soh/soh/Enhancements/randomizer/ShufflePots.cpp | 11 ++--------- soh/soh/Enhancements/randomizer/ShufflePots.h | 3 --- .../Enhancements/randomizer/randomizer_inf.h | 6 ------ soh/soh/Enhancements/randomizer/settings.cpp | 17 ++++++++++++++--- .../overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c | 2 -- 6 files changed, 16 insertions(+), 29 deletions(-) diff --git a/soh/soh/Enhancements/debugger/debugSaveEditor.h b/soh/soh/Enhancements/debugger/debugSaveEditor.h index 694a0bb46..7beef2f01 100644 --- a/soh/soh/Enhancements/debugger/debugSaveEditor.h +++ b/soh/soh/Enhancements/debugger/debugSaveEditor.h @@ -349,12 +349,6 @@ const std::vector flagTables = { { 0x30, "Entered the Market" }, } }, { "Randomizer Inf Flags", RANDOMIZER_INF, RAND_INF_MAX / 16, { - { RAND_INF_DUNGEONS_DONE_DEKU_TREE, "DUNGEONS_DONE_DEKU_TREE" }, - { RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN, "DUNGEONS_DONE_DODONGOS_CAVERN" }, - { RAND_INF_DUNGEONS_DONE_JABU_JABUS_BELLY, "DUNGEONS_DONE_JABU_JABUS_BELLY" }, - { RAND_INF_DUNGEONS_DONE_FOREST_TEMPLE, "DUNGEONS_DONE_FOREST_TEMPLE" }, - { RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE, "DUNGEONS_DONE_FIRE_TEMPLE" }, - { RAND_INF_DUNGEONS_DONE_WATER_TEMPLE, "DUNGEONS_DONE_WATER_TEMPLE" }, { RAND_INF_DUNGEONS_DONE_SPIRIT_TEMPLE, "DUNGEONS_DONE_SPIRIT_TEMPLE" }, { RAND_INF_DUNGEONS_DONE_SHADOW_TEMPLE, "DUNGEONS_DONE_SHADOW_TEMPLE" }, diff --git a/soh/soh/Enhancements/randomizer/ShufflePots.cpp b/soh/soh/Enhancements/randomizer/ShufflePots.cpp index 65e27fef6..dfe626ac3 100644 --- a/soh/soh/Enhancements/randomizer/ShufflePots.cpp +++ b/soh/soh/Enhancements/randomizer/ShufflePots.cpp @@ -5,8 +5,9 @@ #include "soh/OTRGlobals.h" extern "C" { -#include "overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.h" +#include "z64.h" #include "variables.h" +#include "overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.h" u8 Randomizer_GetSettingValue(RandomizerSettingKey randoSettingKey); GetItemEntry Randomizer_GetItemFromKnownCheck(RandomizerCheck randomizerCheck, GetItemID ogId); @@ -45,14 +46,6 @@ uint8_t ObjTsubo_RandomizerHoldsItem(ObjTsubo* potActor, PlayState* play) { } } -uint8_t ObjTsubo_RandomizerSkipItemCutscene(ObjTsubo* potActor) { - /*return - potActor->actor.params == ITEM00_SMALL_KEY && giEntry.modIndex == MOD_NONE && - ((giEntry.itemId >= ITEM_RUPEE_GREEN && giEntry.itemId <= ITEM_RUPEE_RED) || giEntry.itemId == ITEM_HEART || - (giEntry.itemId >= ITEM_NUTS_5 && giEntry.itemId <= ITEM_SEEDS_30) || giEntry.itemId == ITEM_MAGIC_SMALL || - giEntry.itemId == ITEM_MAGIC_LARGE);*/ -} - void ObjTsubo_RandomizerSpawnCollectible(ObjTsubo* potActor) { EnItem00* item00 = (EnItem00*)Item_DropCollectible2(gPlayState, &potActor->actor.world.pos, ITEM00_SOH_GIVE_ITEM_ENTRY); diff --git a/soh/soh/Enhancements/randomizer/ShufflePots.h b/soh/soh/Enhancements/randomizer/ShufflePots.h index f2b1aa23c..2379a8b49 100644 --- a/soh/soh/Enhancements/randomizer/ShufflePots.h +++ b/soh/soh/Enhancements/randomizer/ShufflePots.h @@ -1,12 +1,9 @@ #ifndef SHUFFLEPOTS_H #define SHUFFLEPOTS_H -#include "z64.h" - #ifdef __cplusplus extern "C" { #endif -void ObjTsubo_RandomizerDraw(Actor* potActor, PlayState* play); void RegisterShufflePots(); #ifdef __cplusplus }; diff --git a/soh/soh/Enhancements/randomizer/randomizer_inf.h b/soh/soh/Enhancements/randomizer/randomizer_inf.h index 34378e10c..39fe2c307 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_inf.h +++ b/soh/soh/Enhancements/randomizer/randomizer_inf.h @@ -1,12 +1,6 @@ #pragma once typedef enum { - RAND_INF_DUNGEONS_DONE_DEKU_TREE, - RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN, - RAND_INF_DUNGEONS_DONE_JABU_JABUS_BELLY, - RAND_INF_DUNGEONS_DONE_FOREST_TEMPLE, - RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE, - RAND_INF_DUNGEONS_DONE_WATER_TEMPLE, RAND_INF_DUNGEONS_DONE_SPIRIT_TEMPLE, RAND_INF_DUNGEONS_DONE_SHADOW_TEMPLE, diff --git a/soh/soh/Enhancements/randomizer/settings.cpp b/soh/soh/Enhancements/randomizer/settings.cpp index add50a697..9792fda60 100644 --- a/soh/soh/Enhancements/randomizer/settings.cpp +++ b/soh/soh/Enhancements/randomizer/settings.cpp @@ -667,7 +667,6 @@ void Settings::CreateOptions() { &mOptions[RSK_SHUFFLE_SWIM], &mOptions[RSK_SHUFFLE_WEIRD_EGG], &mOptions[RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD], - &mOptions[RSK_SHUFFLE_POTS], &mOptions[RSK_SHUFFLE_FISHING_POLE], &mOptions[RSK_SHUFFLE_DEKU_STICK_BAG], &mOptions[RSK_SHUFFLE_DEKU_NUT_BAG], @@ -680,6 +679,7 @@ void Settings::CreateOptions() { &mOptions[RSK_FISHSANITY_POND_COUNT], &mOptions[RSK_FISHSANITY_AGE_SPLIT], &mOptions[RSK_SHUFFLE_SCRUBS], + &mOptions[RSK_SHUFFLE_POTS], &mOptions[RSK_SHUFFLE_BEEHIVES], &mOptions[RSK_SHUFFLE_COWS], &mOptions[RSK_SHUFFLE_MAGIC_BEANS], @@ -886,6 +886,7 @@ void Settings::CreateOptions() { &mOptions[RSK_SHUFFLE_FISHING_POLE], &mOptions[RSK_SHUFFLE_TOKENS], &mOptions[RSK_SHUFFLE_SCRUBS], + &mOptions[RSK_SHUFFLE_POTS], &mOptions[RSK_SHUFFLE_BEEHIVES], &mOptions[RSK_SHUFFLE_COWS], &mOptions[RSK_SHUFFLE_KOKIRI_SWORD], @@ -894,7 +895,6 @@ void Settings::CreateOptions() { &mOptions[RSK_SHUFFLE_SWIM], &mOptions[RSK_SHUFFLE_WEIRD_EGG], &mOptions[RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD], - &mOptions[RSK_SHUFFLE_POTS], &mOptions[RSK_SHUFFLE_MAGIC_BEANS], &mOptions[RSK_SHUFFLE_MERCHANTS], &mOptions[RSK_SHUFFLE_FROG_SONG_RUPEES], @@ -1077,6 +1077,7 @@ void Settings::CreateOptions() { &mOptions[RSK_FISHSANITY_POND_COUNT], &mOptions[RSK_FISHSANITY_AGE_SPLIT], &mOptions[RSK_SHUFFLE_SCRUBS], + &mOptions[RSK_SHUFFLE_POTS], &mOptions[RSK_SHUFFLE_BEEHIVES], &mOptions[RSK_SHUFFLE_COWS], &mOptions[RSK_SHUFFLE_MAGIC_BEANS], @@ -2353,7 +2354,6 @@ void Settings::ParseJson(nlohmann::json spoilerFileJson) { case RSK_FISHSANITY_AGE_SPLIT: case RSK_FISHING_POLE_HINT: case RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD: - case RSK_SHUFFLE_POTS: case RSK_SHUFFLE_BEEHIVES: case RSK_SHUFFLE_COWS: case RSK_SHUFFLE_ADULT_TRADE: @@ -2682,6 +2682,17 @@ void Settings::ParseJson(nlohmann::json spoilerFileJson) { mOptions[index].SetSelectedIndex(RO_TOKENSANITY_ALL); } break; + case RSK_SHUFFLE_POTS: + if (it.value() == "Off") { + mOptions[index].SetSelectedIndex(RO_SHUFFLE_POTS_OFF); + } else if (it.value() == "Dungeons") { + mOptions[index].SetSelectedIndex(RO_SHUFFLE_POTS_DUNGEONS); + } else if (it.value() == "Overworld") { + mOptions[index].SetSelectedIndex(RO_SHUFFLE_POTS_OVERWORLD); + } else if (it.value() == "All Pots") { + mOptions[index].SetSelectedIndex(RO_SHUFFLE_POTS_ALL); + } + break; case RSK_LINKS_POCKET: if (it.value() == "Dungeon Reward") { mOptions[index].SetSelectedIndex(RO_LINKS_POCKET_DUNGEON_REWARD); diff --git a/soh/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c b/soh/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c index c0f6a8237..d2e9102e7 100644 --- a/soh/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c +++ b/soh/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c @@ -346,7 +346,5 @@ void ObjTsubo_Update(Actor* thisx, PlayState* play) { } void ObjTsubo_Draw(Actor* thisx, PlayState* play) { - ObjTsubo* this = (ObjTsubo*)thisx; - Gfx_DrawDListOpa(play, D_80BA1B84[(thisx->params >> 8) & 1]); }