From 30d193235442a456cf2f72845a53450530532e61 Mon Sep 17 00:00:00 2001 From: Malkierian Date: Mon, 30 Jun 2025 09:37:02 -0700 Subject: [PATCH] Re-add new preset items to new preset files. --- soh/assets/custom/presets/Main Enhanced.json | 3 ++ .../custom/presets/Main Randomizer.json | 1 + .../Enhancements/randomizer/ShufflePots.cpp | 40 +++++++++---------- 3 files changed, 24 insertions(+), 20 deletions(-) diff --git a/soh/assets/custom/presets/Main Enhanced.json b/soh/assets/custom/presets/Main Enhanced.json index 026a78de7..0f31227fb 100644 --- a/soh/assets/custom/presets/Main Enhanced.json +++ b/soh/assets/custom/presets/Main Enhanced.json @@ -44,6 +44,9 @@ "SkipText": 1, "TextSpeed": 5, "TimeFlowFileSelect": 1, + "TimeSavers": { + "SkipJabuJabuFish": 1 + }, "TwoHandedIdle": 1, "VisualAgony": 1, "WidescreenActorCulling": 1 diff --git a/soh/assets/custom/presets/Main Randomizer.json b/soh/assets/custom/presets/Main Randomizer.json index 59c24e982..a4962a5ef 100644 --- a/soh/assets/custom/presets/Main Randomizer.json +++ b/soh/assets/custom/presets/Main Randomizer.json @@ -116,6 +116,7 @@ "Story": 1 }, "SkipForcedDialog": 3, + "SkipJabuJabuFish": 1, "SkipMiscInteractions": 1, "SkipOwlInteractions": 1, "SkipTowerEscape": 1, diff --git a/soh/soh/Enhancements/randomizer/ShufflePots.cpp b/soh/soh/Enhancements/randomizer/ShufflePots.cpp index 4df32a553..5d89bdcfd 100644 --- a/soh/soh/Enhancements/randomizer/ShufflePots.cpp +++ b/soh/soh/Enhancements/randomizer/ShufflePots.cpp @@ -7,7 +7,7 @@ extern "C" { #include "variables.h" #include "overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.h" #include "overlays/actors/ovl_Door_Shutter/z_door_shutter.h" - extern PlayState* gPlayState; +extern PlayState* gPlayState; } extern void EnItem00_DrawRandomizedItem(EnItem00* enItem00, PlayState* play); @@ -19,7 +19,7 @@ extern "C" void ObjTsubo_RandomizerDraw(Actor* thisx, PlayState* play) { Gfx_SetupDL_25Opa(play->state.gfxCtx); Matrix_Scale(potSize, potSize, potSize, MTXMODE_APPLY); gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__), - G_MTX_MODELVIEW | G_MTX_LOAD); + G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gRandoPotDL); CLOSE_DISPS(play->state.gfxCtx); @@ -68,37 +68,37 @@ void RegisterShufflePots() { ObjTsubo* potActor = static_cast(actorRef); auto potIdentity = OTRGlobals::Instance->gRandomizer->IdentifyPot(gPlayState->sceneNum, (s16)actor->world.pos.x, - (s16)actor->world.pos.z); + (s16)actor->world.pos.z); ObjectExtension::GetInstance().Set(actor, std::move(potIdentity)); - }); + }); // Draw custom model for pot to indicate it holding a randomized item. COND_VB_SHOULD(VB_POT_SETUP_DRAW, shouldRegister, { ObjTsubo* potActor = va_arg(args, ObjTsubo*); - if (ObjTsubo_RandomizerHoldsItem(potActor, gPlayState)) { - potActor->actor.draw = (ActorFunc)ObjTsubo_RandomizerDraw; - *should = false; - } - }); + if (ObjTsubo_RandomizerHoldsItem(potActor, gPlayState)) { + potActor->actor.draw = (ActorFunc)ObjTsubo_RandomizerDraw; + *should = false; + } + }); // Do not spawn vanilla item from pot, instead spawn the ranomized item. COND_VB_SHOULD(VB_POT_DROP_ITEM, shouldRegister, { ObjTsubo* potActor = va_arg(args, ObjTsubo*); - if (ObjTsubo_RandomizerHoldsItem(potActor, gPlayState)) { - ObjTsubo_RandomizerSpawnCollectible(potActor, gPlayState); - *should = false; - } - }); + if (ObjTsubo_RandomizerHoldsItem(potActor, gPlayState)) { + ObjTsubo_RandomizerSpawnCollectible(potActor, gPlayState); + *should = false; + } + }); // Unlock early Ganon's Boss Key doors to allow access to the pots there when pots are shuffled in dungeon COND_VB_SHOULD(VB_LOCK_BOSS_DOOR, shouldRegister, { DoorShutter* doorActor = va_arg(args, DoorShutter*); - uint8_t shufflePotSetting = RAND_GET_OPTION(RSK_SHUFFLE_POTS); - if (gPlayState->sceneNum == SCENE_GANONS_TOWER && doorActor->dyna.actor.world.pos.y == 800 && - (shufflePotSetting == RO_SHUFFLE_POTS_DUNGEONS || shufflePotSetting == RO_SHUFFLE_POTS_ALL)) { - *should = false; - } - }); + uint8_t shufflePotSetting = RAND_GET_OPTION(RSK_SHUFFLE_POTS); + if (gPlayState->sceneNum == SCENE_GANONS_TOWER && doorActor->dyna.actor.world.pos.y == 800 && + (shufflePotSetting == RO_SHUFFLE_POTS_DUNGEONS || shufflePotSetting == RO_SHUFFLE_POTS_ALL)) { + *should = false; + } + }); } void Rando::StaticData::RegisterPotLocations() {