Hookify Goron Pot (#6208)

This commit is contained in:
Jordan Longstaff
2026-01-29 09:36:46 -05:00
committed by GitHub
parent 8176e57144
commit 23606325e6
3 changed files with 21 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/ShipInit.hpp"
#define CVAR_WIN_GORON_POT_NAME CVAR_ENHANCEMENT("GoronPot")
#define CVAR_WIN_GORON_POT_VALUE CVarGetInteger(CVAR_WIN_GORON_POT_NAME, 0)
static void RegisterWinGoronPot() {
COND_VB_SHOULD(VB_WIN_GORON_POT, CVAR_WIN_GORON_POT_VALUE, { *should = true; });
}
static RegisterShipInitFunc initFunc(RegisterWinGoronPot, { CVAR_WIN_GORON_POT_NAME });

View File

@@ -2354,6 +2354,14 @@ typedef enum {
// - `*EnMk`
VB_USE_EYEDROP_DIALOGUE,
// #### `result`
// ```c
// (shapeRotY < -0x2E93) || (shapeRotY >= 0x7C19)
// ```
// #### `args`
// - None
VB_WIN_GORON_POT,
// #### `result`
// ```c
// true

View File

@@ -1,6 +1,7 @@
#include "z_bg_spot18_basket.h"
#include "objects/object_spot18_obj/object_spot18_obj.h"
#include "vt.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
@@ -296,7 +297,7 @@ void func_808B7F74(BgSpot18Basket* this) {
shapeRotY = this->dyna.actor.shape.rot.y;
this->actionFunc = func_808B7FC0;
if ((shapeRotY < -0x2E93) || (shapeRotY >= 0x7C19) || CVarGetInteger(CVAR_ENHANCEMENT("GoronPot"), 0)) {
if (GameInteractor_Should(VB_WIN_GORON_POT, (shapeRotY < -0x2E93) || (shapeRotY >= 0x7C19))) {
this->unk_218 = 2;
} else if (shapeRotY < 0x26C2) {
this->unk_218 = 1;