summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2025-12-03 18:09:56 -0500
committerGitHub <noreply@github.com>2025-12-03 15:09:56 -0800
commitf97d334732201e5a8e1250318925c90d0c715225 (patch)
treedffb749eaa0db03a031d854c319dc7e8f6d8e7b5 /include
parent5716efc4c86f5e7e03263f0ed426c5e9ae834cd3 (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/JSystem/J2DGraph/J2DMatBlock.h6
-rw-r--r--include/JSystem/JAudio2/JASAramStream.h4
-rw-r--r--include/JSystem/JAudio2/JASHeapCtrl.h2
-rw-r--r--include/JSystem/JAudio2/JAUStreamAramMgr.h3
-rw-r--r--include/JSystem/JGeometry.h18
-rw-r--r--include/JSystem/JKernel/JKRAram.h2
-rw-r--r--include/JSystem/JSupport/JSupport.h4
-rw-r--r--include/SSystem/SComponent/c_sxyz.h3
-rw-r--r--include/d/actor/d_a_alink.h78
-rw-r--r--include/d/actor/d_a_e_fb.h2
-rw-r--r--include/d/actor/d_a_npc.h5
-rw-r--r--include/d/actor/d_a_player.h51
-rw-r--r--include/d/actor/d_a_scene_exit.h2
-rw-r--r--include/d/d_com_inf_game.h22
-rw-r--r--include/f_op/f_op_actor.h10
-rw-r--r--include/m_Do/m_Do_mtx.h8
16 files changed, 96 insertions, 124 deletions
diff --git a/include/JSystem/J2DGraph/J2DMatBlock.h b/include/JSystem/J2DGraph/J2DMatBlock.h
index 4a3fec0c35..c13fa2f332 100644
--- a/include/JSystem/J2DGraph/J2DMatBlock.h
+++ b/include/JSystem/J2DGraph/J2DMatBlock.h
@@ -2,6 +2,7 @@
#define J2DMATBLOCK_H
#include "JSystem/J2DGraph/J2DTevs.h"
+#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/JUtility/TColor.h"
class JUTFont;
@@ -117,6 +118,7 @@ public:
}
virtual J2DTevOrder* getTevOrder(u32 index) { return &mTevOrder[index]; }
virtual void setTevColor(u32 index, J2DGXColorS10 color) {
+ J3D_PANIC(250, index < 4, "Error : range over.");
mTevColor[index] = color;
}
virtual J2DGXColorS10* getTevColor(u32 index) { return &mTevColor[index]; }
@@ -212,6 +214,7 @@ public:
}
virtual J2DTevOrder* getTevOrder(u32 index) { return &mTevOrder[index]; }
virtual void setTevColor(u32 index, J2DGXColorS10 color) {
+ J3D_PANIC(360, index < 4, "Error : range over.");
mTevColor[index] = color;
}
virtual J2DGXColorS10* getTevColor(u32 index) { return &mTevColor[index]; }
@@ -309,6 +312,7 @@ public:
}
virtual J2DTevOrder* getTevOrder(u32 index) { return &mTevOrder[index]; }
virtual void setTevColor(u32 index, J2DGXColorS10 color) {
+ J3D_PANIC(468, index < 4, "Error : range over.");
mTevColor[index] = color;
}
virtual J2DGXColorS10* getTevColor(u32 index) { return &mTevColor[index]; }
@@ -406,6 +410,7 @@ public:
}
virtual J2DTevOrder* getTevOrder(u32 index) { return &mTevOrder[index]; }
virtual void setTevColor(u32 index, J2DGXColorS10 color) {
+ J3D_PANIC(579, index < 4, "Error : range over.");
mTevColor[index] = color;
}
virtual J2DGXColorS10* getTevColor(u32 index) { return &mTevColor[index]; }
@@ -504,6 +509,7 @@ public:
}
virtual J2DTevOrder* getTevOrder(u32 index) { return &mTevOrder[index]; }
virtual void setTevColor(u32 index, J2DGXColorS10 color) {
+ J3D_PANIC(691, index < 4, "Error : range over.");
mTevColor[index] = color;
}
virtual J2DGXColorS10* getTevColor(u32 index) { return &mTevColor[index]; }
diff --git a/include/JSystem/JAudio2/JASAramStream.h b/include/JSystem/JAudio2/JASAramStream.h
index c1268941e4..c503e6b29e 100644
--- a/include/JSystem/JAudio2/JASAramStream.h
+++ b/include/JSystem/JAudio2/JASAramStream.h
@@ -11,8 +11,6 @@ namespace JASDsp {
class TChannel;
}
-#define CHANNEL_MAX 6
-
/**
* @ingroup jsystem-jaudio
*
@@ -130,6 +128,8 @@ public:
static u32 getBlockSize() { return sBlockSize; }
+ static const int CHANNEL_MAX = 6;
+
/* 0x000 */ OSMessageQueue field_0x000;
/* 0x020 */ OSMessageQueue field_0x020;
/* 0x040 */ void* field_0x040[16];
diff --git a/include/JSystem/JAudio2/JASHeapCtrl.h b/include/JSystem/JAudio2/JASHeapCtrl.h
index 72cacd14d2..f7eda37587 100644
--- a/include/JSystem/JAudio2/JASHeapCtrl.h
+++ b/include/JSystem/JAudio2/JASHeapCtrl.h
@@ -29,7 +29,7 @@ public:
void* getBase() { return mBase; }
bool isAllocated() { return mBase; }
- u32 getSize() { return mSize; }
+ u32 getSize() const { return mSize; }
/* 0x00 */ JSUTree<JASHeap> mTree;
/* 0x1C */ OSMutex mMutex;
diff --git a/include/JSystem/JAudio2/JAUStreamAramMgr.h b/include/JSystem/JAudio2/JAUStreamAramMgr.h
index 44835b8e03..da44e02e6f 100644
--- a/include/JSystem/JAudio2/JAUStreamAramMgr.h
+++ b/include/JSystem/JAudio2/JAUStreamAramMgr.h
@@ -59,7 +59,6 @@ public:
}
return NULL;
}
- // NONMATCHING regalloc
virtual bool deleteStreamAram(u32 param_0) {
for (u32 i = 0; i < field_0x4c; i++) {
if (!this->field_0x4.test(i)) {
@@ -80,7 +79,7 @@ public:
if (!heap) {
heap = JASKernel::getAramHeap();
}
- if (numReserve < 1) {
+ if (numReserve <= 0) {
numReserve = 1;
}
JUT_ASSERT(83, numReserve <= MAX_CHUNKS);
diff --git a/include/JSystem/JGeometry.h b/include/JSystem/JGeometry.h
index 9e9662c4f3..6bec114c5a 100644
--- a/include/JSystem/JGeometry.h
+++ b/include/JSystem/JGeometry.h
@@ -268,19 +268,15 @@ struct TVec3<f32> : public Vec {
return inv_norm * sq;
}
- void normalize(const TVec3<f32>& other) {
+ f32 normalize(const TVec3<f32>& other) {
f32 sq = other.squared();
if (sq <= TUtil<f32>::epsilon()) {
zero();
- return;
- }
- f32 norm;
- if (sq <= 0.0f) {
- norm = sq;
- } else {
- norm = fsqrt_step(sq);
+ return 0.0f;
}
+ f32 norm = TUtil<f32>::inv_sqrt(sq);
scale(norm, other);
+ return norm * sq;
}
f32 length() const {
@@ -411,12 +407,12 @@ struct TVec2 {
TVec2(T v) { set(v); }
template <typename U>
- TVec2(U x, U y) { set(x, y); }
+ TVec2(const U x, const U y) { set(x, y); }
void set(T v) { y = x = v; }
template <typename U>
- void set(U x, U y) {
+ void set(const U x, const U y) {
this->x = x;
this->y = y;
}
@@ -518,7 +514,7 @@ struct TBox2 : public TBox<TVec2<T> > {
}
}
- void set(const TBox2& other) { set(other.i, other.f); }
+ void set(const TBox<TVec2<T> >& other) { set(other.i, other.f); }
void set(const TVec2<f32>& i, const TVec2<f32>& f) { this->i.set(i), this->f.set(f); }
void set(f32 x0, f32 y0, f32 x1, f32 y1) { this->i.set(x0, y0); this->f.set(x1, y1); }
};
diff --git a/include/JSystem/JKernel/JKRAram.h b/include/JSystem/JKernel/JKRAram.h
index 2d992749ce..70347904ae 100644
--- a/include/JSystem/JKernel/JKRAram.h
+++ b/include/JSystem/JKernel/JKRAram.h
@@ -85,7 +85,7 @@ inline u8* JKRAramToMainRam(u32 p1, u8* p2, u32 p3, JKRExpandSwitch p4, u32 p5,
return JKRAram::aramToMainRam(p1, p2, p3, p4, p5, p6, p7, p8);
}
-inline JKRAramBlock *JKRMainRamToAram(u8 *buf, u32 bufSize, u32 alignedSize, JKRExpandSwitch expandSwitch, u32 fileSize, JKRHeap *heap, int id, u32 *pSize) {
+inline JKRAramBlock* JKRMainRamToAram(u8 *buf, u32 bufSize, u32 alignedSize, JKRExpandSwitch expandSwitch, u32 fileSize, JKRHeap *heap, int id, u32 *pSize) {
return JKRAram::mainRamToAram(buf, bufSize, alignedSize, expandSwitch, fileSize, heap, id, pSize);
}
diff --git a/include/JSystem/JSupport/JSupport.h b/include/JSystem/JSupport/JSupport.h
index b3bb337951..8a652dd722 100644
--- a/include/JSystem/JSupport/JSupport.h
+++ b/include/JSystem/JSupport/JSupport.h
@@ -41,6 +41,10 @@ inline u8 JSUHiByte(u16 in) {
return in >> 8;
}
+inline u16 JSUHiHalf(u32 in) {
+ return (in >> 16);
+}
+
inline u16 JSULoHalf(u32 param_0) {return param_0; }
#endif
diff --git a/include/SSystem/SComponent/c_sxyz.h b/include/SSystem/SComponent/c_sxyz.h
index 90811586ce..8b835807f3 100644
--- a/include/SSystem/SComponent/c_sxyz.h
+++ b/include/SSystem/SComponent/c_sxyz.h
@@ -11,8 +11,7 @@ class csXyz : public SVec {
public:
static const csXyz Zero;
~csXyz() {}
- /* inline */ csXyz() {}
- /* inline */ csXyz(const csXyz& other) : SVec(other){};
+ csXyz() {}
csXyz(s16, s16, s16);
csXyz operator+(csXyz&);
void operator+=(csXyz&);
diff --git a/include/d/actor/d_a_alink.h b/include/d/actor/d_a_alink.h
index 2bd37b5d86..064f8587d3 100644
--- a/include/d/actor/d_a_alink.h
+++ b/include/d/actor/d_a_alink.h
@@ -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;
diff --git a/include/d/actor/d_a_e_fb.h b/include/d/actor/d_a_e_fb.h
index 6289c62a29..7388ff15f2 100644
--- a/include/d/actor/d_a_e_fb.h
+++ b/include/d/actor/d_a_e_fb.h
@@ -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];
diff --git a/include/d/actor/d_a_npc.h b/include/d/actor/d_a_npc.h
index 55c01e6bb1..08fee130bc 100644
--- a/include/d/actor/d_a_npc.h
+++ b/include/d/actor/d_a_npc.h
@@ -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;
diff --git a/include/d/actor/d_a_player.h b/include/d/actor/d_a_player.h
index 40149cc052..2203d7af0d 100644
--- a/include/d/actor/d_a_player.h
+++ b/include/d/actor/d_a_player.h
@@ -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() {
diff --git a/include/d/actor/d_a_scene_exit.h b/include/d/actor/d_a_scene_exit.h
index 23b7de6fab..033228f2ff 100644
--- a/include/d/actor/d_a_scene_exit.h
+++ b/include/d/actor/d_a_scene_exit.h
@@ -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; }
diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h
index 3461e2ba0d..befe038a36 100644
--- a/include/d/d_com_inf_game.h
+++ b/include/d/d_com_inf_game.h
@@ -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,
diff --git a/include/f_op/f_op_actor.h b/include/f_op/f_op_actor.h
index 2a145bf496..8122b42fb7 100644
--- a/include/f_op/f_op_actor.h
+++ b/include/f_op/f_op_actor.h
@@ -169,8 +169,8 @@ public:
BOOL checkCommandCatch() { return mCommand == dEvtCmd_INCATCH_e; }
BOOL checkCommandDoor() { return mCommand == dEvtCmd_INDOOR_e; }
BOOL checkCommandDemoAccrpt() { return mCommand == dEvtCmd_INDEMO_e; }
- bool checkCommandTalk() { return mCommand == dEvtCmd_INTALK_e; }
- bool checkCommandItem() { return mCommand == dEvtCmd_INGETITEM_e; }
+ BOOL checkCommandTalk() { return mCommand == dEvtCmd_INTALK_e; }
+ BOOL checkCommandItem() { return mCommand == dEvtCmd_INGETITEM_e; }
void setCommand(u16 command) { mCommand = command; }
void setMapToolId(u8 id) { mMapToolId = id; }
@@ -309,14 +309,14 @@ public:
void setBallModelEffect(dKy_tevstr_c*);
void drawBallModel(dKy_tevstr_c*);
- bool checkWolfNoLock() const { return mFlags & fopEn_flag_WolfNoLock; }
+ BOOL checkWolfNoLock() const { return mFlags & fopEn_flag_WolfNoLock; }
BOOL checkHeadLockFlg() const { return mFlags & fopEn_flag_HeadLock; }
BOOL checkWolfBiteDamage() const { return mFlags & fopEn_flag_WolfBiteDamage; }
BOOL checkWolfDownPullFlg() const { return mFlags & fopEn_flag_WolfDownPull; }
- bool checkDownFlg() { return mFlags & fopEn_flag_Down; }
+ BOOL checkDownFlg() { return mFlags & fopEn_flag_Down; }
BOOL checkCutDownHitFlg() const { return mFlags & fopEn_flag_CutDownHit; }
BOOL checkWolfDownStartFlg() const { return mFlags & fopEn_flag_WolfDownStart; }
- bool checkDeadFlg() const { return mFlags & fopEn_flag_Dead; }
+ BOOL checkDeadFlg() const { return mFlags & fopEn_flag_Dead; }
BOOL checkThrowMode(u8 param_1) const { return mThrowMode & param_1; }
u32* getMidnaBindID(int i_idx) { return mMidnaBindID + i_idx; }
diff --git a/include/m_Do/m_Do_mtx.h b/include/m_Do/m_Do_mtx.h
index 5f749ed073..18022e4b1a 100644
--- a/include/m_Do/m_Do_mtx.h
+++ b/include/m_Do/m_Do_mtx.h
@@ -250,7 +250,7 @@ public:
* @param a The source Vec
* @param b The output Vec
*/
- static void multVec(const Vec* a, Vec* b) { MTXMultVec(now, a, b); }
+ static void multVec(const Vec* a, Vec* b) { PSMTXMultVec(now, a, b); }
/**
* Multiplies a given Vec `a` by the `now` Matrix's "Scale-and-Rotate" component and places the result into Vec `b`
@@ -268,7 +268,7 @@ public:
* @param count The size of the array
*/
static void multVecArray(const Vec* src, Vec* dst, u32 count) {
- MTXMultVecArray(now, src, dst, count);
+ PSMTXMultVecArray(now, src, dst, count);
}
static void XYZrotS(s16 x, s16 y, s16 z) { mDoMtx_XYZrotS(now, x, y, z); }
@@ -327,7 +327,7 @@ public:
*/
static void ZrotM(s16 z) { mDoMtx_ZrotM(now, z); }
- static void inverse() { MTXInverse(now, now); }
+ static void inverse() { PSMTXInverse(now, now); }
static void inverseTranspose() { mDoMtx_inverseTranspose(now, now); }
@@ -350,7 +350,7 @@ public:
}
static void identity() {
- MTXIdentity(now);
+ PSMTXIdentity(now);
}
static Mtx now;