Code cleanup to fix warnings in Dusklight (#3167)

Mostly bool/int mixing
This commit is contained in:
Pieter-Jan Briers
2026-06-20 03:26:56 +02:00
committed by GitHub
parent fc1515fe61
commit 8d43c80c42
34 changed files with 99 additions and 100 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ public:
~daArrow_c();
void setBombArrowExplode() { field_0x950 = 0; }
bool checkBombArrow() const { return mArrowType == true; }
bool checkBombArrow() const { return mArrowType == ARROW_TYPE_BOMB; }
u32 getHitAcID() { return mHitAcID; }
BOOL checkWait() { return fopAcM_GetParam(this) == 0; }
+1 -1
View File
@@ -159,7 +159,7 @@ private:
/* 0x6C4 */ cXyz* mTagPosP;
/* 0x6C8 */ u8 mTagNo;
/* 0x6C9 */ u8 field_0x6c9;
/* 0x6CA */ u8 mFlyType;
/* 0x6CA */ bool mFlyType;
/* 0x6CB */ u8 field_0x6cb;
/* 0x6CC */ u8 field_0x6cc;
/* 0x6CD */ u8 field_0x6cd;
+1 -1
View File
@@ -387,7 +387,7 @@ public:
BOOL checkDemoPortalWarpWait() const { return mDemoMode == 11; }
static BOOL checkMidnaRealBody() {
return dKy_darkworld_check() == true || dComIfGs_isTransformLV(3);
return dKy_darkworld_check() == TRUE || dComIfGs_isTransformLV(3);
}
static bool checkMidnaTired() {
+3 -3
View File
@@ -107,9 +107,9 @@ public:
u8 getArg0(int i_idx) { return mPathInfo->m_points[i_idx].mArg0; }
Vec getPntPos(int i_idx) { return mPathInfo->m_points[i_idx].m_position; }
BOOL chkClose() { return dPath_ChkClose(mPathInfo); }
BOOL chkReverse() { return mIsReversed == true; }
void onReverse() { mIsReversed = true; }
void offReverse() { mIsReversed = false; }
BOOL chkReverse() { return mIsReversed == TRUE; }
void onReverse() { mIsReversed = TRUE; }
void offReverse() { mIsReversed = FALSE; }
dPath* getPathInfo() { return mPathInfo; }
void setRange(f32 i_range) { mRange = i_range; }
int getNumPnts() { return mPathInfo->m_num; }
+3 -3
View File
@@ -123,10 +123,10 @@ public:
u8 getArg0() { return fopAcM_GetParamBit(this, 8, 8); }
u8 getColor() { return fopAcM_GetParamBit(this, 0x10, 8); }
void onGetFlag() { mGetFlag = true; }
void offGetFlag() { mGetFlag = false; }
void onGetFlag() { mGetFlag = TRUE; }
void offGetFlag() { mGetFlag = FALSE; }
void saveGetFlag() { field_0x951 = mGetFlag; }
bool is_getted() { return mGetFlag == true; }
bool is_getted() { return mGetFlag == TRUE; }
void reset() {
current.pos = home.pos;
+1 -1
View File
@@ -60,7 +60,7 @@ public:
u8 getMdlType() { return field_0x73e & 0xF; }
bool checkRollAttack() { return mIsRollAttack == true; }
bool checkRollAttack() { return mIsRollAttack == TRUE; }
void setShake(int i_shake) { mShake = i_shake; }
void setAction(u8 i_action) { mAction = i_action; }
+3 -3
View File
@@ -111,9 +111,9 @@ public:
void informBlast();
u8 getMarkNo() { return fopAcM_GetParam(this) & 0xff; }
void initBlastFlag() { mBlastFlag = false; }
void onBlastFlag() { mBlastFlag = true; }
bool is_blasted() { return mBlastFlag == true; }
void initBlastFlag() { mBlastFlag = FALSE; }
void onBlastFlag() { mBlastFlag = TRUE; }
bool is_blasted() { return mBlastFlag == TRUE; }
bool is_branch_pat() { return mType == 0 || mType == 2; }
int get_MarkType() {
+3 -3
View File
@@ -42,13 +42,13 @@ public:
BOOL chkClimbDownLadderStatus() {
f32 var_f31 = fopAcM_searchPlayerDistanceY(this);
BOOL rt = false;
BOOL rt = FALSE;
if (fopAcM_searchPlayerDistanceXZ(this) < scale.x && 0.0f <= var_f31 && var_f31 < scale.y) {
rt = dComIfGp_checkItemGet(dItemNo_KANTERA_e, 1) && dComIfGs_getOil() != 0;
field_0x5f8 = rt == true ? 0 : 1;
field_0x5f8 = rt == TRUE ? 0 : 1;
} else {
rt = true;
rt = TRUE;
}
return rt;