Process IDs cleanup

* Use fpcM_ERROR_PROCESS_ID_e enum instead of literal -1/0xFFFFFFFF everywhere
* Disambiguate variable names by using itemNo/msgNo instead of itemID/msgID
This commit is contained in:
LagoLunatic
2023-11-22 16:25:28 -05:00
parent 906c8a8314
commit 469f243030
28 changed files with 132 additions and 129 deletions
@@ -3,6 +3,7 @@
#include "dolphin/types.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "f_pc/f_pc_manager.h"
#include "global.h"
class cBgW;
@@ -21,7 +22,7 @@ public:
mPolyIndex = -1;
mBgIndex = 0x100;
mpBgW = NULL;
mActorId = -1;
mActorId = fpcM_ERROR_PROCESS_ID_e;
}
void SetPolyInfo(const cBgS_PolyInfo& other) {
*this = other;
+1 -1
View File
@@ -266,7 +266,7 @@ namespace daObjMovebox {
/* 0x64E */ bool mbPrmXInitialized;
/* 0x64F */ bool m64F;
/* 0x650 */ EffSmokeCB mSmokeCbs[2];
/* 0x6B8 */ u32 mChildProcId;
/* 0x6B8 */ u32 mChildPID;
/* 0x6BC */ int m6BC;
static const char* const M_arcname[13];
+2 -2
View File
@@ -6,8 +6,8 @@
struct daObjTpost_c__letter_data {
/* 0x00 */ bool field_0x00;
/* 0x04 */ u32 mMsgId;
/* 0x08 */ u8 mItemId;
/* 0x04 */ u32 mMsgNo;
/* 0x08 */ u8 mItemNo;
/* 0x0A */ u16 mEventReg;
};
+2 -1
View File
@@ -10,6 +10,7 @@
#include "d/d_bg_s_chk.h"
#include "d/d_bg_w.h"
#include "global.h"
#include "f_pc/f_pc_manager.h"
class cBgS_LinChk;
class cBgS_GndChk;
@@ -86,7 +87,7 @@ public:
mpLine0 = i_line;
pm_pos = i_pos;
field_0x058 = param_2;
SetActorPid(-1);
SetActorPid(fpcM_ERROR_PROCESS_ID_e);
field_0x3c = param_3->y;
field_0x40 = param_3->z;
}
+2 -1
View File
@@ -4,6 +4,7 @@
#include "SSystem/SComponent/c_bg_s_poly_info.h"
#include "SSystem/SComponent/c_xyz.h"
#include "d/d_bg_s_chk.h"
#include "f_pc/f_pc_manager.h"
class dBgS_RoofChk : public cBgS_PolyInfo, public cBgS_Chk, public dBgS_Chk {
public:
@@ -13,7 +14,7 @@ public:
m_pos.x = 0.0f;
m_pos.y = 0.0f;
m_pos.z = 0.0f;
SetActorPid(-1);
SetActorPid(fpcM_ERROR_PROCESS_ID_e);
field_0x44 = NULL;
}
void Init();
+2 -1
View File
@@ -7,6 +7,7 @@
*/
#include "SSystem/SComponent/c_cc_d.h"
#include "f_pc/f_pc_manager.h"
enum dCcD_hitSe {};
@@ -138,7 +139,7 @@ public:
public:
dCcD_GAtTgCoCommonBase() { ct(); }
void ClrActorInfo() {
mApid = -1;
mApid = fpcM_ERROR_PROCESS_ID_e;
mAc = NULL;
}
void ct();
+4 -4
View File
@@ -225,7 +225,7 @@ enum dNpc_MessageStatus_e {
class fopNpc_npc_c : public fopAc_ac_c {
public:
fopNpc_npc_c() {
mCurrMsgBsPcId = -1;
mCurrMsgBsPcId = fpcM_ERROR_PROCESS_ID_e;
mpCurrMsg = 0;
}
/* 0x290 */ dNpc_JntCtrl_c mJntCtrl;
@@ -235,9 +235,9 @@ public:
/* 0x4F8 */ dBgS_AcchCir mAcchCir;
/* 0x538 */ dCcD_Stts mStts;
/* 0x574 */ dCcD_Cyl mCyl;
/* 0x6A4 */ u32 mCurrMsgID;
/* 0x6A8 */ u32 mEndMsgID;
/* 0x6AC */ s32 mCurrMsgBsPcId;
/* 0x6A4 */ u32 mCurrMsgNo;
/* 0x6A8 */ u32 mEndMsgNo;
/* 0x6AC */ u32 mCurrMsgBsPcId;
/* 0x6B0 */ msg_class* mpCurrMsg;
/* 0x6B4 */ u8 pad_0x6B4[0x6C0 - 0x6B4];
+1 -1
View File
@@ -65,7 +65,7 @@ void fopMsgM_setMessageID(unsigned int);
void fopMsgM_destroyExpHeap(JKRExpHeap*);
f32 fopMsgM_valueIncrease(int param_0, int param_1, u8 param_2);
s32 fopMsgM_setStageLayer(void*);
int fopMsgM_messageSet(u32 i_msgIdx, fopAc_ac_c* i_actorP);
int fopMsgM_messageSet(u32 i_msgNo, fopAc_ac_c* i_actorP);
int fopMsgM_messageSet(u32 param_0, cXyz*);
int fopMsgM_messageSet(u32 param_0);
int fopMsgM_messageSetDemo(u32 param_0);