Debug+retail matches and clean up some fakematches (#2910)

* Debug matches

* Match daAlink_c::procGrassWhistleWait

* Match JASAramStream::channelProc

* More debug matches

* Match JAUStreamStaticAramMgr_::deleteStreamAram and bitset inlines

* Fix some fakematches

* Fix gameinfo player info not being a struct

* Update bug comments

* Fix procids in alink

* d_a_scene_exit OK
This commit is contained in:
LagoLunatic
2025-12-03 18:09:56 -05:00
committed by GitHub
parent 5716efc4c8
commit f97d334732
43 changed files with 278 additions and 251 deletions
+25 -53
View File
@@ -5172,7 +5172,7 @@ public:
BOOL checkHorseStart(u32, int);
int setStartProcInit();
int create();
s32 setRoomInfo();
int setRoomInfo();
void setShapeAngleOnGround();
void setStepsOffset();
void iceSlipBgCheck();
@@ -6934,9 +6934,9 @@ public:
virtual void setAnimeFrame(f32);
virtual BOOL checkWolfLock(fopAc_ac_c*) const;
virtual bool cancelWolfLock(fopAc_ac_c*);
virtual s32 getAtnActorID() const { return mAtnActorID; }
virtual s32 getItemID() const { return mItemAcKeep.getID(); }
virtual u32 getGrabActorID() const {
virtual fpc_ProcID getAtnActorID() const { return mAtnActorID; }
virtual fpc_ProcID getItemID() const { return mItemAcKeep.getID(); }
virtual fpc_ProcID getGrabActorID() const {
if (mEquipItem == 0x102) {
return mItemAcKeep.getID();
} else {
@@ -7133,7 +7133,7 @@ public:
}
virtual BOOL checkWolfDownAttackPullOut() const { return mProcID == PROC_WOLF_DOWN_AT_LAND; }
virtual BOOL checkBootsOrArmorHeavy() const;
virtual s32 getBottleOpenAppearItem() const;
virtual fpc_ProcID getBottleOpenAppearItem() const;
virtual bool checkItemSwordEquip() const { return mEquipItem == 0x103; }
virtual f32 getSinkShapeOffset() const { return mSinkShapeOffset; }
virtual BOOL checkSinkDead() const { return field_0x2fbd == 0xFF; }
@@ -7231,7 +7231,7 @@ public:
void offModeFlg(u32 flag) { mModeFlg &= ~flag; }
bool swordButton() { return itemButtonCheck(8); }
daPy_actorKeep_c* getThrowBoomerangAcKeep() { return &mThrowBoomerangAcKeep; }
s32 getStartRoomNo() { return fopAcM_GetParam(this) & 0x3F; }
int getStartRoomNo() { return fopAcM_GetParam(this) & 0x3F; }
bool checkFisingRodLure() const { return mEquipItem == 0x105; }
BOOL doTrigger() const { return mItemTrigger & BTN_A; }
bool swordTrigger() { return itemTriggerCheck(BTN_B); }
@@ -7265,7 +7265,7 @@ public:
field_0x2844.clearData();
}
s32 checkPlayerDemoMode() const { return mDemo.getDemoType(); }
int checkPlayerDemoMode() const { return mDemo.getDemoType(); }
BOOL checkSpecialDemoMode() const {
return mDemo.getDemoType() == daPy_demo_c::DEMO_TYPE_SPECIAL_e;
}
@@ -7274,19 +7274,19 @@ public:
u32 getStartEvent() { return fopAcM_GetParam(this) >> 0x18; }
BOOL checkClimbFall() { return checkLadderFall(); }
bool checkMidnaWolfDashAnime() const { return checkNoResetFlg1(FLG1_DASH_MODE); }
bool checkMidnaClingAnime() const { return mMidnaAnm == 1; }
bool checkMidnaLowClingAnime() const { return mMidnaAnm == 2; }
bool checkMidnaLookAroundAnime() const { return mMidnaAnm == 3; }
bool checkMidnaPanicAnime() const { return mMidnaAnm == 5; }
bool checkMidnaWolfDeadAnime() const { return mMidnaAnm == 6; }
bool checkMidnaWolfSwimDeadAnime() const { return mMidnaAnm == 7; }
bool checkMidnaRopeWaitStaggerAnime() const { return mMidnaAnm == 8; }
bool checkMidnaRopeMoveStaggerAnime() const { return mMidnaAnm == 9; }
bool checkMidnaGanonCatchAnm() const { return mMidnaAnm == 10; }
bool checkMidnaGanonThrowLeftAnm() const { return mMidnaAnm == 11; }
bool checkMidnaGanonThrowRightAnm() const { return mMidnaAnm == 12; }
bool checkMidnaDigInAnime() const { return mMidnaAnm == 13; }
BOOL checkMidnaWolfDashAnime() const { return checkNoResetFlg1(FLG1_DASH_MODE); }
BOOL checkMidnaClingAnime() const { return mMidnaAnm == 1; }
BOOL checkMidnaLowClingAnime() const { return mMidnaAnm == 2; }
BOOL checkMidnaLookAroundAnime() const { return mMidnaAnm == 3; }
BOOL checkMidnaPanicAnime() const { return mMidnaAnm == 5; }
BOOL checkMidnaWolfDeadAnime() const { return mMidnaAnm == 6; }
BOOL checkMidnaWolfSwimDeadAnime() const { return mMidnaAnm == 7; }
BOOL checkMidnaRopeWaitStaggerAnime() const { return mMidnaAnm == 8; }
BOOL checkMidnaRopeMoveStaggerAnime() const { return mMidnaAnm == 9; }
BOOL checkMidnaGanonCatchAnm() const { return mMidnaAnm == 10; }
BOOL checkMidnaGanonThrowLeftAnm() const { return mMidnaAnm == 11; }
BOOL checkMidnaGanonThrowRightAnm() const { return mMidnaAnm == 12; }
BOOL checkMidnaDigInAnime() const { return mMidnaAnm == 13; }
void clearMidnaMsgNum() {
mMidnaMsgNum = 0xffff;
@@ -7330,37 +7330,9 @@ public:
MtxP getMagneBootsInvMtx() { return mMagneBootInvMtx; }
s16 getMagneBootsModelShapeAngle() const { return field_0x3118; }
bool checkFishingCastMode() const {
bool var_r5;
bool var_r4 = 1;
bool var_r3 = 0;
if (mProcID == PROC_FISHING_CAST) {
var_r5 = 0;
if (mItemAcKeep.getActor() != NULL &&
mItemAcKeep.getActor()->eventInfo.checkCommandDemoAccrpt() != 0)
{
var_r5 = 1;
}
if (!var_r5) {
var_r3 = 1;
}
}
if (!var_r3) {
bool var_r3_2 = 0;
if (mProcID != PROC_FISHING_CAST && checkNoResetFlg2(FLG2_UNK_20000000)) {
var_r3_2 = 1;
}
if (!var_r3_2) {
var_r4 = 0;
}
}
return var_r4;
BOOL checkFishingCastMode() const {
return (mProcID == PROC_FISHING_CAST && !(mItemAcKeep.getActor() != NULL && mItemAcKeep.getActor()->eventInfo.checkCommandDemoAccrpt())) ||
(mProcID != PROC_FISHING_CAST && checkNoResetFlg2(FLG2_UNK_20000000) != 0);
}
BOOL setCanoeCast() {
@@ -7807,10 +7779,10 @@ public:
/* 0x02864 */ dMsgFlow_c mMsgFlow;
/* 0x028B0 */ fpc_ProcID mShieldArrowIDs[16];
/* 0x028F0 */ fpc_ProcID mMsgClassID;
/* 0x028F4 */ int mAtnActorID;
/* 0x028F4 */ fpc_ProcID mAtnActorID;
/* 0x028F8 */ fpc_ProcID field_0x28f8;
/* 0x028FC */ fpc_ProcID field_0x28fc;
/* 0x02900 */ u32 field_0x2900;
/* 0x02900 */ fpc_ProcID field_0x2900;
/* 0x02904 */ daAlink_footData_c mFootData1[2];
/* 0x02A4C */ daAlink_footData_c mFootData2[2];
/* 0x02B94 */ f32 field_0x2b94;
+1 -1
View File
@@ -71,7 +71,7 @@ private:
/* 0xA30 */ dCcD_Sph mSphere2;
/* 0xB68 */ dCcD_Sph mAtSph;
/* 0xCA0 */ dCcU_AtInfo mAtInfo;
// Seems that the orig developers didn't size mKeys correctly, as ideally it should be len=8, not len=7:
// !@bug Seems that the orig developers didn't size mKeys correctly, as ideally it should be len=8, not len=7:
/* 0xCC4 */ u32 mKeys[7];
/* 0xCE0 */ u8 mHIOInit;
/* 0xCE1 */ u8 field_0xce1[0xCE8 - 0xCE1];
+1 -4
View File
@@ -450,11 +450,8 @@ public:
void calc(BOOL);
void initialize() {
//TODO: Separate decl is fakematch, but using 0 directly in the setall call causes
// weird issues in some functions that call this.
u8 zero = 0;
for (int i = 0; i < 2; i++) {
mAngle[i].setall(zero);
mAngle[i].setall(0);
mPower[i] = 0.0f;
}
mStagger = 0;
+24 -27
View File
@@ -716,9 +716,9 @@ public:
cXyz getRightHandPos() const { return mRightHandPos; }
const cXyz getLeftHandPos() const { return mLeftHandPos; }
const cXyz getItemPos() const { return mItemPos; }
bool getDkCaught() const { return checkNoResetFlg1(FLG1_DK_CAUGHT); }
bool getDkCaught2() const { return checkNoResetFlg0(FLG0_DK_CAUGHT); }
bool getStCaught() const { return checkNoResetFlg1(FLG1_UNK_80000000); }
BOOL getDkCaught() const { return checkNoResetFlg1(FLG1_DK_CAUGHT); }
BOOL getDkCaught2() const { return checkNoResetFlg0(FLG0_DK_CAUGHT); }
BOOL getStCaught() const { return checkNoResetFlg1(FLG1_UNK_80000000); }
/* vt 0X008 */ virtual cXyz* getMidnaAtnPos() const { return NULL; }
/* vt 0X00C */ virtual void setMidnaMsgNum(fopAc_ac_c*, u16) {}
@@ -779,9 +779,9 @@ public:
/* vt 0X0E8 */ virtual void setAnimeFrame(f32) {}
/* vt 0X0EC */ virtual BOOL checkWolfLock(fopAc_ac_c*) const { return FALSE; }
/* vt 0X0F0 */ virtual bool cancelWolfLock(fopAc_ac_c*) { return FALSE; }
/* vt 0X0F4 */ virtual s32 getAtnActorID() const { return fpcM_ERROR_PROCESS_ID_e; }
/* vt 0X0F8 */ virtual s32 getItemID() const { return fpcM_ERROR_PROCESS_ID_e; }
/* vt 0X0FC */ virtual u32 getGrabActorID() const { return fpcM_ERROR_PROCESS_ID_e; }
/* vt 0X0F4 */ virtual fpc_ProcID getAtnActorID() const { return fpcM_ERROR_PROCESS_ID_e; }
/* vt 0X0F8 */ virtual fpc_ProcID getItemID() const { return fpcM_ERROR_PROCESS_ID_e; }
/* vt 0X0FC */ virtual fpc_ProcID getGrabActorID() const { return fpcM_ERROR_PROCESS_ID_e; }
/* vt 0X100 */ virtual BOOL exchangeGrabActor(fopAc_ac_c*) { return FALSE; }
/* vt 0X104 */ virtual BOOL setForceGrab(fopAc_ac_c*, int, int) { return FALSE; }
/* vt 0X108 */ virtual void setForcePutPos(cXyz const&) {}
@@ -879,7 +879,7 @@ public:
/* vt 0X278 */ virtual BOOL checkMetamorphose() const { return FALSE; }
/* vt 0X27C */ virtual BOOL checkWolfDownAttackPullOut() const { return FALSE; }
/* vt 0X280 */ virtual BOOL checkBootsOrArmorHeavy() const { return FALSE; }
/* vt 0X284 */ virtual s32 getBottleOpenAppearItem() const { return fpcM_ERROR_PROCESS_ID_e; }
/* vt 0X284 */ virtual fpc_ProcID getBottleOpenAppearItem() const { return fpcM_ERROR_PROCESS_ID_e; }
/* vt 0X288 */ virtual bool checkItemSwordEquip() const { return FALSE; }
/* vt 0X28C */ virtual f32 getSinkShapeOffset() const { return 0.0f; }
/* vt 0X290 */ virtual BOOL checkSinkDead() const { return FALSE; }
@@ -1170,9 +1170,6 @@ public:
static daMidna_c* getMidnaActor() { return m_midnaActor; }
static void setMidnaActor(fopAc_ac_c* actor) { m_midnaActor = (daMidna_c*)actor; }
// not sure how to define this properly
// static void onWolfEnemyCatch(fopAc_ac_c* i_actorP) { onWolfEnemyBiteAll(i_actorP,8);}
BOOL checkWolfEnemyCatchOwn(fopAc_ac_c* i_actorP) { return checkWolfEnemyBiteAllOwn(i_actorP); }
BOOL checkWolfEnemyHangBiteOwn(const fopAc_ac_c* i_actorP) const { return checkWolfEnemyBiteAllOwn(i_actorP); }
BOOL checkWolfEnemyLeftThrow() const { return checkNoResetFlg2(FLG2_WOLF_ENEMY_LEFT_THROW); }
@@ -1225,23 +1222,23 @@ public:
void setSumouForceTackle() { mSpecialMode = 0x1B; }
void setSumouForceGraspCancel() { mSpecialMode = 0x24; }
BOOL checkSumouPushFront() const { return mSpecialMode == 7; }
BOOL checkSumouPushBack() const { return mSpecialMode == 8; }
BOOL checkSumouTackleSuccess() const { return mSpecialMode == 0xF; }
BOOL checkSumouTackleSuccessPunch() const { return mSpecialMode == 0x10; }
BOOL checkSumouTackleMiss() const { return mSpecialMode == 0x11; }
BOOL checkSumouTackleDraw() const { return mSpecialMode == 0x12; }
BOOL checkSumouPunchSuccess() const { return mSpecialMode == 0x13; }
BOOL checkSumouPunchMiss() const { return mSpecialMode == 0x14; }
BOOL checkSumouPunchDraw() const { return mSpecialMode == 0x15; }
BOOL checkSumouWait() const { return mSpecialMode == 0x16; }
BOOL checkSumouLeftMove() const { return mSpecialMode == 0x17; }
BOOL checkSumouRightMove() const { return mSpecialMode == 0x18; }
BOOL checkSumouSlideLeft() const { return mSpecialMode == 0x19; }
BOOL checkSumouSlideRight() const { return mSpecialMode == 0x1A; }
BOOL checkSumouPunchStagger() const { return mSpecialMode == 0x1F; }
BOOL checkSumouTackleStagger() const { return mSpecialMode == 0x20; }
BOOL checkSumouGraspRelease() const { return mSpecialMode == 0x23; }
bool checkSumouPushFront() const { return mSpecialMode == 7; }
bool checkSumouPushBack() const { return mSpecialMode == 8; }
bool checkSumouTackleSuccess() const { return mSpecialMode == 0xF; }
bool checkSumouTackleSuccessPunch() const { return mSpecialMode == 0x10; }
bool checkSumouTackleMiss() const { return mSpecialMode == 0x11; }
bool checkSumouTackleDraw() const { return mSpecialMode == 0x12; }
bool checkSumouPunchSuccess() const { return mSpecialMode == 0x13; }
bool checkSumouPunchMiss() const { return mSpecialMode == 0x14; }
bool checkSumouPunchDraw() const { return mSpecialMode == 0x15; }
bool checkSumouWait() const { return mSpecialMode == 0x16; }
bool checkSumouLeftMove() const { return mSpecialMode == 0x17; }
bool checkSumouRightMove() const { return mSpecialMode == 0x18; }
bool checkSumouSlideLeft() const { return mSpecialMode == 0x19; }
bool checkSumouSlideRight() const { return mSpecialMode == 0x1A; }
bool checkSumouPunchStagger() const { return mSpecialMode == 0x1F; }
bool checkSumouTackleStagger() const { return mSpecialMode == 0x20; }
bool checkSumouGraspRelease() const { return mSpecialMode == 0x23; }
void onHeavyState() { onNoResetFlg0(FLG0_UNK_40000000); }
void onHeavyStateMidnaPanic() {
+1 -1
View File
@@ -19,7 +19,7 @@ public:
inline int create();
u8 getArg1() { return (fopAcM_GetParam(this) >> 8) & 0xFF; }
u8 getArg0() { return fopAcM_GetParam(this); }
u8 getArg0() { return fopAcM_GetParam(this) & 0xFF; }
u8 getSwNo() { return fopAcM_GetParam(this) >> 0x18; }
u16 getOffEventBit() { return home.angle.z & 0xFFF; }
u16 getOnEventBit() { return home.angle.x & 0xFFF; }
+12 -10
View File
@@ -290,7 +290,7 @@ public:
dVibration_c& getVibration() { return mVibration; }
camera_class* getCamera(int idx) { return mCameraInfo[idx].mCamera; }
void* getPlayerPtr(int ptrIdx) { return mPlayerPtr[ptrIdx]; }
fopAc_ac_c* getPlayer(int idx) { return (fopAc_ac_c*)mPlayer[idx * 2]; }
fopAc_ac_c* getPlayer(int idx) { return mPlayerInfo[idx].mpPlayer; }
dPa_control_c* getParticle() { return mParticle; }
dEvent_manager_c& getEvtManager() { return mEvtManager; }
dAttention_c* getAttention() { return &mAttention; }
@@ -653,16 +653,16 @@ public:
void* getItemTable() { return mItemTable; }
void setPlayerPtr(int i, fopAc_ac_c* ptr) { mPlayerPtr[i] = ptr; }
void setPlayer(int i, fopAc_ac_c* player) { mPlayer[i] = (daAlink_c*)player; }
void setPlayerInfo(int i, fopAc_ac_c* ptr, int camIdx) {
mPlayer[i] = (daAlink_c*)ptr;
mPlayerCameraID[camIdx] = 0;
void setPlayer(int i, fopAc_ac_c* player) { mPlayerInfo[i].mpPlayer = player; }
void setPlayerInfo(int i, fopAc_ac_c* player, int cam) {
mPlayerInfo[i].mpPlayer = player;
mPlayerInfo[i].mCameraID = cam;
}
void setPlayerStatus(int param_0, int i, u32 flag) { mPlayerStatus[param_0][i] |= flag; }
void clearPlayerStatus(int param_0, int i, u32 flag) { mPlayerStatus[param_0][i] &= ~flag; }
u32 checkPlayerStatus(int param_0, int i, u32 flag) { return mPlayerStatus[param_0][i] & flag; }
int getPlayerCameraID(int i) { return mPlayerCameraID[i * 8]; }
int getPlayerCameraID(int i) { return mPlayerInfo[i].mCameraID; }
int getCameraPlayer1ID(int i) { return mCameraInfo[i].field_0x5; }
int getCameraPlayer2ID(int i) { return mCameraInfo[i].field_0x6; }
int getCameraWinID(int i) { return mCameraInfo[i].field_0x4; }
@@ -814,8 +814,10 @@ public:
/* 0x04E0E */ u16 mStatus;
/* 0x04E10 */ dDlst_window_c mWindow[1];
/* 0x04E3C */ dComIfG_camera_info_class mCameraInfo[1];
/* 0x04E74 */ daAlink_c* mPlayer[1];
/* 0x04E78 */ s8 mPlayerCameraID[1];
/* 0x04E74 */ struct {
/* 0x0 */ fopAc_ac_c* mpPlayer;
/* 0x4 */ s8 mCameraID;
} mPlayerInfo[1];
/* 0x04E7C */ fopAc_ac_c* mPlayerPtr[2]; // 0: Player, 1: Horse ; type may be wrong
/* 0x04E84 */ dComIfG_item_info_class mItemInfo;
/* 0x04FB0 */ dComIfG_MesgCamInfo_c mMesgCamInfo;
@@ -3990,8 +3992,8 @@ inline u32 dComIfGp_particle_set(u32 param_0, u16 param_1, const cXyz* i_pos,
inline u32 dComIfGp_particle_set(u32 param_0, u16 param_1, const cXyz* i_pos,
const dKy_tevstr_c* param_3) {
return dComIfGp_particle_set(param_0, param_1, i_pos, param_3, 0, 0, 0xFF, 0, 0xFFFFFFFF, 0,
0, 0);
return dComIfGp_particle_set(param_0, param_1, i_pos, param_3, NULL, NULL, 0xFF, NULL, -1, NULL,
NULL, NULL);
}
inline JPABaseEmitter* dComIfGp_particle_set(u16 i_resID, const cXyz* i_pos,