Minigame Access function (dAcPy_c and MinigameManager)

This commit is contained in:
elijah-thomas774
2026-09-20 19:58:47 -04:00
parent a83dcc7f3b
commit 1c18972d2a
8 changed files with 116 additions and 45 deletions
+23 -23
View File
@@ -2496,7 +2496,7 @@ getCurrentBeetleType__7dAcPy_cFv = .text:0x8005C270; // type:function size:0x78
getCurrentBowType__7dAcPy_cFv = .text:0x8005C2F0; // type:function size:0x60
getCurrentMittsType = .text:0x8005C350; // type:function size:0x48
isPouchUsable = .text:0x8005C3A0; // type:function size:0x80
isInBossRushMinigameState = .text:0x8005C420; // type:function size:0x8
checkInBossRush__15MinigameManagerFv = .text:0x8005C420; // type:function size:0x8
isItemRestrictedByBokoBase__7dAcPy_cF7ITEM_ID = .text:0x8005C430; // type:function size:0xB8
isItemRestricted = .text:0x8005C4F0; // type:function size:0xE0
fn_8005C5D0 = .text:0x8005C5D0; // type:function size:0x34
@@ -2656,7 +2656,7 @@ setSwordAnm__19daPlayerModelBase_cFPCc = .text:0x8005E090; // type:function size
initSwordModel__19daPlayerModelBase_cFv = .text:0x8005E100; // type:function size:0x1F0
updateSwordModel__19daPlayerModelBase_cFv = .text:0x8005E2F0; // type:function size:0xA8
getCurrentShieldPouchSlot__19daPlayerModelBase_cFv = .text:0x8005E3A0; // type:function size:0x50
isInBambooCuttingMinigame__7dAcPy_cFv = .text:0x8005E3F0; // type:function size:0x8 scope:weak
checkInBambooCutting__15MinigameManagerFv = .text:0x8005E3F0; // type:function size:0x8 scope:weak
getCurrentlyEquippedShieldId__19daPlayerModelBase_cFv = .text:0x8005E400; // type:function size:0x4C
getShieldType__19daPlayerModelBase_cFl = .text:0x8005E450; // type:function size:0x3C
initShieldModel__19daPlayerModelBase_cFv = .text:0x8005E490; // type:function size:0x2C0
@@ -5841,8 +5841,8 @@ baseItemLytIndexToCurrentVariant__21dLytMeterItemSelect_cCFl = .text:0x800F07D0;
baseItemIdToCurrentVariant__21dLytMeterItemSelect_cCF7ITEM_ID = .text:0x800F08B0; // type:function size:0xD4
getBaseItemLytIndexforInternalId__21dLytMeterItemSelect_cCFl = .text:0x800F0990; // type:function size:0x44
isWheelBlockedByCurrentAction__21dLytMeterItemSelect_cFv = .text:0x800F09E0; // type:function size:0xBC
isInSpiralChargeTutorialMinigame__21dLytMeterItemSelect_cFv = .text:0x800F0AA0; // type:function size:0x8
isInRollercoasterMinigame__21dLytMeterItemSelect_cFv = .text:0x800F0AB0; // type:function size:0x8
checkInSprialChargeTutorial__15MinigameManagerFv = .text:0x800F0AA0; // type:function size:0x8 scope:weak
checkInRollerCoaster__15MinigameManagerFv = .text:0x800F0AB0; // type:function size:0x8 scope:weak
setCurrentItemText__21dLytMeterItemSelect_cF7ITEM_ID = .text:0x800F0AC0; // type:function size:0xA8
getName__21dLytMeterItemSelect_cCFv = .text:0x800F0B70; // type:function size:0x8 scope:weak
getLyt__21dLytMeterItemSelect_cFv = .text:0x800F0B80; // type:function size:0x8 scope:weak
@@ -13136,26 +13136,26 @@ moveLinkToCoordinatesMaybe = .text:0x8023B600; // type:function size:0x438
fn_8023BA40 = .text:0x8023BA40; // type:function size:0xAC
fn_8023BAF0 = .text:0x8023BAF0; // type:function size:0x6C
checkMinigameStateBitset = .text:0x8023BB60; // type:function size:0x13C
checkInsectCaptureGameState = .text:0x8023BCA0; // type:function size:0x4
checkInsectCaptureGameState2 = .text:0x8023BCB0; // type:function size:0x8
checkMinigameStatePumpkinCarry = .text:0x8023BCC0; // type:function size:0x4
checkMinigameStatePumpkinCarry2 = .text:0x8023BCD0; // type:function size:0x8
checkBambooCuttingMinigameState2 = .text:0x8023BCE0; // type:function size:0x4
checkMinigameThrillDigger = .text:0x8023BCF0; // type:function size:0x4
checkMinigameThrillDigger2 = .text:0x8023BD00; // type:function size:0x8
checkFunFunIslandMinigameState = .text:0x8023BD10; // type:function size:0x4
isInMinigameInsectCapture__7dAcPy_cFv = .text:0x8023BCA0; // type:function size:0x4
checkInInsectCapture__15MinigameManagerFv = .text:0x8023BCB0; // type:function size:0x8
isInMinigamePumpkinCarry__7dAcPy_cFv = .text:0x8023BCC0; // type:function size:0x4
checkInPumpkinCarry__15MinigameManagerFv = .text:0x8023BCD0; // type:function size:0x8
isInMinigameBambooCutting__7dAcPy_cFv = .text:0x8023BCE0; // type:function size:0x4
isInMinigameThrillDigger__7dAcPy_cFv = .text:0x8023BCF0; // type:function size:0x4
checkInThrillDigger__15MinigameManagerFv = .text:0x8023BD00; // type:function size:0x8
isInMinigameFunFunIsland__7dAcPy_cFv = .text:0x8023BD10; // type:function size:0x4
checkInFunFunIsland__15MinigameManagerFv = .text:0x8023BD20; // type:function size:0x8
checkMinigameHouseCleaning = .text:0x8023BD30; // type:function size:0x4
checkMinigameHouseCleaning2 = .text:0x8023BD40; // type:function size:0x8
checkTrialTimeAttackMinigameState = .text:0x8023BD50; // type:function size:0x4
checkTrialTimeAttackMinigameState2 = .text:0x8023BD60; // type:function size:0x8
isInBossRushMinigameState2 = .text:0x8023BD70; // type:function size:0x4
checkPumpkinClayShootingMinigameState = .text:0x8023BD80; // type:function size:0x4
checkPumpkinClayShootingMinigameState2 = .text:0x8023BD90; // type:function size:0x8
checkHarpPlayingMinigameState = .text:0x8023BDA0; // type:function size:0x4
checkHarpPlayingMinigameState2 = .text:0x8023BDB0; // type:function size:0x8
checkRollercoasterMinigameState2 = .text:0x8023BDC0; // type:function size:0x4
inSpecialMinigameState = .text:0x8023BDD0; // type:function size:0x4
isInMinigameHouseCleaning__7dAcPy_cFv = .text:0x8023BD30; // type:function size:0x4
checkInHouseCleaning__15MinigameManagerFv = .text:0x8023BD40; // type:function size:0x8
isInMinigameTrialTimeAttack__7dAcPy_cFv = .text:0x8023BD50; // type:function size:0x4
checkInTrialTimeAttack__15MinigameManagerFv = .text:0x8023BD60; // type:function size:0x8
isInMinigameBossRush__7dAcPy_cFv = .text:0x8023BD70; // type:function size:0x4
isInMinigamePumpkinArchery__7dAcPy_cFv = .text:0x8023BD80; // type:function size:0x4
checkInPumpkinArchery__15MinigameManagerFv = .text:0x8023BD90; // type:function size:0x8
isInMinigameHarpPlaying__7dAcPy_cFv = .text:0x8023BDA0; // type:function size:0x4
checkInHarpPlaying__15MinigameManagerFv = .text:0x8023BDB0; // type:function size:0x8
isInMinigameRollerCoaster__7dAcPy_cFv = .text:0x8023BDC0; // type:function size:0x4
isInMinigameSprialChargeTutorial__7dAcPy_cFv = .text:0x8023BDD0; // type:function size:0x4
fn_8023BDE0 = .text:0x8023BDE0; // type:function size:0x144
handlesInputMaybe = .text:0x8023BF30; // type:function size:0x974
fn_8023C8B0 = .text:0x8023C8B0; // type:function size:0x130
+14 -3
View File
@@ -109,6 +109,20 @@ public:
f32 fn_802097C0(); // 1000.0f
f32 fn_802097D0(); // 4000.0f
// Minigame Functions [0x8023BB60 - 0x8023BDD0]
static bool isInMinigameInsectCapture();
static bool isInMinigamePumpkinCarry();
static bool isInMinigameBambooCutting();
static bool isInMinigameThrillDigger();
static bool isInMinigameFunFunIsland();
static bool isInMinigameHouseCleaning();
static bool isInMinigameTrialTimeAttack();
static bool isInMinigameBossRush();
static bool isInMinigamePumpkinArchery();
static bool isInMinigameHarpPlaying();
static bool isInMinigameRollerCoaster();
static bool isInMinigameSprialChargeTutorial();
public:
f32 getField_0x4564() const {
return field_0x4564;
@@ -172,9 +186,6 @@ public:
}
static s32 getCurrentBugNetType();
static bool isInBambooCuttingMinigame() {
return MinigameManager::isInMinigameState(MinigameManager::BAMBOO_CUTTING);
}
static bool isItemRestrictedByBokoBase(ITEM_ID item);
static u32 getCurrentHealthCapacity();
@@ -169,9 +169,6 @@ public:
virtual ~dLytMeterItemSelect_c() {}
static bool isInSpiralChargeTutorialMinigame();
static bool isInRollercoasterMinigame();
// This enum might be used externally too?
enum InternalItem_e {
I_BOMB_BAG,
+32 -2
View File
@@ -31,12 +31,42 @@ public:
static MinigameManager *GetInstance() {
return sInstance;
}
static bool checkInBossRush() {
return isInMinigameState(BOSS_RUSH);
static bool checkInInsectCapture() {
return isInMinigameState(INSECT_CAPTURE);
}
static bool checkInPumpkinCarry() {
return isInMinigameState(PUMPKIN_CARRY);
}
static bool checkInBambooCutting() {
return isInMinigameState(BAMBOO_CUTTING);
}
static bool checkInThrillDigger() {
return isInMinigameState(THRILL_DIGGER);
}
static bool checkInFunFunIsland() {
return isInMinigameState(FUN_FUN_ISLAND);
}
static bool checkInHouseCleaning() {
return isInMinigameState(HOUSE_CLEANING);
}
static bool checkInTrialTimeAttack() {
return isInMinigameState(TRIAL_TIME_ATTACK);
}
static bool checkInBossRush() {
return isInMinigameState(BOSS_RUSH);
}
static bool checkInPumpkinArchery() {
return isInMinigameState(PUMPKIN_ARCHERY);
}
static bool checkInHarpPlaying() {
return isInMinigameState(HARP_PLAYING);
}
static bool checkInRollerCoaster() {
return isInMinigameState(ROLLERCOASTER);
}
static bool checkInSprialChargeTutorial() {
return isInMinigameState(SPIRAL_CHARGE_TUTORIAL);
}
private:
MinigameManager() {}
+38
View File
@@ -6,6 +6,7 @@
#include "d/a/obj/d_a_obj_bomb.h"
#include "f/f_profile.h"
#include "f/f_profile_name.h"
#include "toBeSorted/minigame_mgr.h"
#include <stddef.h>
@@ -113,3 +114,40 @@ void dAcPy_c::ObjectArray::removeBombs() {
}
}
}
bool dAcPy_c::isInMinigameInsectCapture() {
return MinigameManager::GetInstance()->checkInInsectCapture();
}
bool dAcPy_c::isInMinigamePumpkinCarry() {
return MinigameManager::GetInstance()->checkInPumpkinCarry();
}
bool dAcPy_c::isInMinigameBambooCutting() {
return MinigameManager::GetInstance()->checkInBambooCutting();
}
bool dAcPy_c::isInMinigameThrillDigger() {
return MinigameManager::GetInstance()->checkInThrillDigger();
}
bool dAcPy_c::isInMinigameFunFunIsland() {
return MinigameManager::GetInstance()->checkInFunFunIsland();
}
bool dAcPy_c::isInMinigameHouseCleaning() {
return MinigameManager::GetInstance()->checkInHouseCleaning();
}
bool dAcPy_c::isInMinigameTrialTimeAttack() {
return MinigameManager::GetInstance()->checkInTrialTimeAttack();
}
bool dAcPy_c::isInMinigameBossRush() {
return MinigameManager::GetInstance()->checkInBossRush();
}
bool dAcPy_c::isInMinigamePumpkinArchery() {
return MinigameManager::GetInstance()->checkInPumpkinArchery();
}
bool dAcPy_c::isInMinigameHarpPlaying() {
return MinigameManager::GetInstance()->checkInHarpPlaying();
}
bool dAcPy_c::isInMinigameRollerCoaster() {
return MinigameManager::GetInstance()->checkInRollerCoaster();
}
bool dAcPy_c::isInMinigameSprialChargeTutorial() {
return MinigameManager::GetInstance()->checkInSprialChargeTutorial();
}
+3 -2
View File
@@ -999,8 +999,9 @@ void daPlayerModelBase_c::updateSwordModel() {
}
u32 daPlayerModelBase_c::getCurrentShieldPouchSlot() {
// Compiler quirk, inline function not inlined due to GetLink call
if (dScGame_c::currentSpawnInfo.getTrial() == SpawnInfo::TRIAL || dAcPy_c::GetLink()->isInBambooCuttingMinigame()) {
// Compiler quirk, inline function not inlined due to MinigameManager::GetInstance call
if (dScGame_c::currentSpawnInfo.getTrial() == SpawnInfo::TRIAL ||
MinigameManager::GetInstance()->checkInBambooCutting()) {
return POUCH_SLOT_NONE;
}
return FileManager::GetInstance()->getShieldPouchSlot();
+2 -1
View File
@@ -9,6 +9,7 @@
#include "nw4r/math/math_types.h"
#include "sized_string.h"
#include "toBeSorted/event_manager.h"
#include "toBeSorted/minigame_mgr.h"
struct dLytDoButton_HIO_c {
dLytDoButton_HIO_c();
@@ -294,7 +295,7 @@ bool dLytDobutton_c::remove() {
bool dLytDobutton_c::execute() {
bool isInEvent = EventManager::isInEvent();
bool b1 = true;
if (dAcPy_c::GetLink()->isInBambooCuttingMinigame()) {
if (MinigameManager::GetInstance()->checkInBambooCutting()) {
setActionTextStuff(ICON_12, ACT_DO_70, false);
}
if (field_0x490 == 0) {
+4 -11
View File
@@ -2714,23 +2714,16 @@ bool dLytMeterItemSelect_c::isWheelBlockedByCurrentAction() {
if (dAcPy_c::LINK->getRidingActorType() == dAcPy_c::RIDING_LOFTWING ||
dAcPy_c::LINK->checkActionFlags(dAcPy_c::FLG0_SWING_ROPE) || dAcPy_c::LINK->checkCurrentAction(0x9C) ||
dAcPy_c::LINK->getRidingActorType() == dAcPy_c::RIDING_TRUCK_MINECART ||
dAcPy_c::LINK->checkCurrentAction(0x95) || isInSpiralChargeTutorialMinigame() || isInRollercoasterMinigame() ||
dAcPy_c::LINK->checkCurrentAction(0x8C) || dLytMeter_c::GetMain()->isInSwordDrawEvent() ||
checkIsInSkykeepPuzzle() || dLytMeter_c::GetInstance()->getMeterField_0x13770() == 0) {
dAcPy_c::LINK->checkCurrentAction(0x95) || MinigameManager::GetInstance()->checkInSprialChargeTutorial() ||
MinigameManager::GetInstance()->checkInRollerCoaster() || dAcPy_c::LINK->checkCurrentAction(0x8C) ||
dLytMeter_c::GetMain()->isInSwordDrawEvent() || checkIsInSkykeepPuzzle() ||
dLytMeter_c::GetInstance()->getMeterField_0x13770() == 0) {
return true;
}
return false;
}
bool dLytMeterItemSelect_c::isInSpiralChargeTutorialMinigame() {
return MinigameManager::isInMinigameState(MinigameManager::SPIRAL_CHARGE_TUTORIAL);
}
bool dLytMeterItemSelect_c::isInRollercoasterMinigame() {
return MinigameManager::isInMinigameState(MinigameManager::ROLLERCOASTER);
}
void dLytMeterItemSelect_c::setCurrentItemText(ITEM_ID item) {
if (item >= ITEM_NONE && field_0x5754 == 0) {
mText[1].setShouldBeSelect(true);