Hookify Goron Pot (#6208)
This commit is contained in:
11
soh/soh/Enhancements/Difficulty/AlwaysWinGoronPot.cpp
Normal file
11
soh/soh/Enhancements/Difficulty/AlwaysWinGoronPot.cpp
Normal 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 });
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user