summaryrefslogtreecommitdiff
path: root/include/d
diff options
context:
space:
mode:
authorNiklas Bauer <nikbau2000@gmail.com>2025-12-26 22:17:51 +0100
committerGitHub <noreply@github.com>2025-12-26 13:17:51 -0800
commit67b576ad9aec15953fa0d52f33cc88e8a783b46b (patch)
tree2e9e78e8cca507807292d9288a54babfe187cca0 /include/d
parent229527daf71c76965ef0735abca530cee68b7358 (diff)
f_op debug work (#2991)
* f_op debug 1 * f_op debug 2 * f_op debug 3 * f_op debug 4 * f_op debug 5 * f_op_debug fix build * f_op linking * remove goto in fopac_create * fix regressions * fix regressions * pr comments
Diffstat (limited to 'include/d')
-rw-r--r--include/d/actor/d_a_itembase.h1
-rw-r--r--include/d/actor/d_a_obj_carry.h7
-rw-r--r--include/d/actor/d_a_tag_stream.h6
-rw-r--r--include/d/d_com_inf_game.h2
-rw-r--r--include/d/d_event.h8
-rw-r--r--include/d/d_item.h1
-rw-r--r--include/d/d_particle.h3
-rw-r--r--include/d/d_s_play.h6
-rw-r--r--include/d/d_stage.h5
9 files changed, 29 insertions, 10 deletions
diff --git a/include/d/actor/d_a_itembase.h b/include/d/actor/d_a_itembase.h
index ac463a42fa..ccac214e45 100644
--- a/include/d/actor/d_a_itembase.h
+++ b/include/d/actor/d_a_itembase.h
@@ -5,6 +5,7 @@
#include "d/d_cc_d.h"
#include "d/d_a_itembase_static.h"
#include "f_op/f_op_actor_mng.h"
+#include "m_Do/m_Do_ext.h"
struct daItemBase_data {
/* 0x00 */ f32 mGravity;
diff --git a/include/d/actor/d_a_obj_carry.h b/include/d/actor/d_a_obj_carry.h
index aa1db0f645..0581dda831 100644
--- a/include/d/actor/d_a_obj_carry.h
+++ b/include/d/actor/d_a_obj_carry.h
@@ -294,9 +294,10 @@ public:
return mCannon;
}
- static void make_prm(u32* o_params, csXyz* o_paramsEx, u8 param_2, u8 i_itemNo, u8 i_itemBit, u8 i_itemType, u8 param_6) {
- o_paramsEx->x = (i_itemBit << 8) | (i_itemNo & 0xFF);
- o_paramsEx->z = (param_6 << 13) | (param_2 << 1) | i_itemType;
+ static u32* make_prm(u32* o_params, csXyz* o_paramsEx, u8 param_2, u8 i_itemNo, u8 i_itemBit, u8 i_itemType, u8 param_6) {
+ o_paramsEx->x = (i_itemBit << 8) | i_itemNo;
+ o_paramsEx->z = i_itemType | ((param_6 << 13) | (param_2 << 1));
+ return o_params;
}
static void make_prm_bokkuri(u32* o_params, csXyz* o_paramsEx, u8 i_itemNo, u8 i_itemBit, u8 i_itemType, u8 param_5) {
diff --git a/include/d/actor/d_a_tag_stream.h b/include/d/actor/d_a_tag_stream.h
index 6405de3412..6988320281 100644
--- a/include/d/actor/d_a_tag_stream.h
+++ b/include/d/actor/d_a_tag_stream.h
@@ -17,15 +17,15 @@ public:
return mNext;
}
- u8 checkStreamOn() {
+ u8 checkStreamOn() const {
return mStreamOn;
}
- s32 checkCanoeOn() {
+ s32 checkCanoeOn() const {
return mParameters;
}
- u8 getPower() {
+ u8 getPower() const {
return mPower;
}
diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h
index c4e922971e..de93f6d793 100644
--- a/include/d/d_com_inf_game.h
+++ b/include/d/d_com_inf_game.h
@@ -3622,7 +3622,7 @@ inline int dComIfGp_event_order(u16 i_type, u16 i_prio, u16 i_flags, u16 i_hindF
i_targetActor, i_eventID, i_mapToolId);
}
-inline void dComIfGp_event_setGtItm(int i_itemNo) {
+inline void dComIfGp_event_setGtItm(u8 i_itemNo) {
g_dComIfG_gameInfo.play.getEvent()->setGtItm(i_itemNo);
}
diff --git a/include/d/d_event.h b/include/d/d_event.h
index adc09de53d..7b60d37bae 100644
--- a/include/d/d_event.h
+++ b/include/d/d_event.h
@@ -150,7 +150,13 @@ public:
#endif
}
- BOOL isOrderOK() { return mEventStatus == 0 || mEventStatus == 2; }
+ BOOL isOrderOK() {
+#if DEBUG
+ return (mEventStatus == 0 || mEventStatus == 2) && !mDebugStb;
+#else
+ return mEventStatus == 0 || mEventStatus == 2;
+#endif
+ }
fopAc_ac_c* getPt1() { return convPId(mPt1); }
fopAc_ac_c* getPt2() { return convPId(mPt2); }
diff --git a/include/d/d_item.h b/include/d/d_item.h
index e9dee1c010..14425c4d60 100644
--- a/include/d/d_item.h
+++ b/include/d/d_item.h
@@ -6,6 +6,7 @@
class dEnemyItem_c {
public:
static void setItemData(u8* data) { mData = data; }
+ static u8* getItemData() { return mData; }
static u8* mData;
};
diff --git a/include/d/d_particle.h b/include/d/d_particle.h
index ed9bac9b2d..dd90e5735a 100644
--- a/include/d/d_particle.h
+++ b/include/d/d_particle.h
@@ -499,6 +499,9 @@ private:
/* 0x01A */ u8 field_0x1a;
/* 0x01B */ u8 field_0x1b;
/* 0x01C */ dPa_simpleEcallBack field_0x1c[25];
+ #if DEBUG
+ u8 unk_0x210[0x1CC];
+ #endif
/* 0x210 */ level_c field_0x210;
#if DEBUG
u8 mSceneCount;
diff --git a/include/d/d_s_play.h b/include/d/d_s_play.h
index 8c2c03c615..5736f0838c 100644
--- a/include/d/d_s_play.h
+++ b/include/d/d_s_play.h
@@ -68,7 +68,11 @@ public:
bool resetGame();
void offReset();
- static bool isPause() { return pauseTimer == 0; }
+ #if VERSION == VERSION_SHIELD_DEBUG
+ static s8 isPause() { return pauseTimer | nextPauseTimer; }
+ #else
+ static s8 isPause() { return pauseTimer; }
+ #endif
static void setPauseTimer(s8 time) { nextPauseTimer = time; }
static s8 pauseTimer;
diff --git a/include/d/d_stage.h b/include/d/d_stage.h
index 2838afa6a7..d3a2f9c114 100644
--- a/include/d/d_stage.h
+++ b/include/d/d_stage.h
@@ -1133,7 +1133,10 @@ public:
static void setProcID(u32 id) { mProcID = id; }
static u32 getProcID() { return mProcID; }
static void setStatusProcID(int i_roomNo, fpc_ProcID i_id) { mStatus[i_roomNo].mProcID = i_id; }
- static int getStatusProcID(int i_roomNo) { return mStatus[i_roomNo].mProcID; }
+ static int getStatusProcID(int i_roomNo) {
+ JUT_ASSERT(2774, 0 <= i_roomNo && i_roomNo < 64);
+ return mStatus[i_roomNo].mProcID;
+ }
static void setRegionNo(int i_roomNo, u8 i_regionNo) { mStatus[i_roomNo].mRegionNo = i_regionNo; }
u8 checkStatusFlag(int i_roomNo, u8 flag) const {