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
+2 -2
View File
@@ -4,7 +4,7 @@
//
#include "SSystem/SComponent/c_bg_s_chk.h"
#include "dolphin/types.h"
#include "f_pc/f_pc_manager.h"
/* 80247304-8024734C .text __dt__8cBgS_ChkFv */
cBgS_Chk::~cBgS_Chk() {
@@ -12,7 +12,7 @@ cBgS_Chk::~cBgS_Chk() {
/* 8024734C-8024738C .text ChkSameActorPid__8cBgS_ChkCFUi */
bool cBgS_Chk::ChkSameActorPid(unsigned int pid) const {
if (mActorPid == -1 || pid == UINT32_MAX || unk_0x0C == 0) {
if (mActorPid == fpcM_ERROR_PROCESS_ID_e || pid == UINT32_MAX || unk_0x0C == 0) {
return 0;
} else {
return (mActorPid == pid) ? 1 : 0;
+2 -2
View File
@@ -4,11 +4,11 @@
//
#include "SSystem/SComponent/c_bg_s_gnd_chk.h"
#include "dolphin/types.h"
#include "f_pc/f_pc_manager.h"
/* 8024738C-80247418 .text __ct__11cBgS_GndChkFv */
cBgS_GndChk::cBgS_GndChk() {
m_pos = cXyz::Zero;
SetActorPid(0xFFFFFFFF);
SetActorPid(fpcM_ERROR_PROCESS_ID_e);
mFlag = 3;
}
+2 -2
View File
@@ -4,7 +4,7 @@
//
#include "SSystem/SComponent/c_bg_s_lin_chk.h"
#include "dolphin/types.h"
#include "f_pc/f_pc_manager.h"
/* 80247418-80247480 .text ct__11cBgS_LinChkFv */
void cBgS_LinChk::ct() {
@@ -12,7 +12,7 @@ void cBgS_LinChk::ct() {
mLin.mStart = zero;
mLin.mEnd = zero;
field_0x40 = zero;
SetActorPid(-1);
SetActorPid(fpcM_ERROR_PROCESS_ID_e);
mFlag = 0;
mFrontFlag = 1;
mBackFlag = 0;
+2 -1
View File
@@ -5,6 +5,7 @@
#include "SSystem/SComponent/c_cc_d.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "f_pc/f_pc_manager.h"
#include "dolphin/types.h"
#define CHECK_FLOAT_CLASS(line, x) JUT_ASSERT(line, !(((sizeof(x) == sizeof(float)) ? __fpclassifyf((float)(x)) : __fpclassifyd((double)(x)) ) == 1));
@@ -77,7 +78,7 @@ void cCcD_Stts::Ct() {
m_cc_move.y = 0.0f;
m_cc_move.z = 0.0f;
mActor = NULL;
mApid = -1;
mApid = fpcM_ERROR_PROCESS_ID_e;
mWeight = 0;
field_0x15 = 0;
mDmg = 0;