summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2025-05-24 18:54:46 -0400
committerGitHub <noreply@github.com>2025-05-24 18:54:46 -0400
commit7cd75e8f7b01a45ca8c72facfd5b4a3c1906c0e1 (patch)
treeece493d144cfcb3af860c2af8fa0480491f69706 /include
parent4a29f64e6bf5a06a541161638913f51c51d8a633 (diff)
Demo matches (#767)
Diffstat (limited to 'include')
-rw-r--r--include/SSystem/SComponent/c_m3d_g_aab.h12
-rw-r--r--include/SSystem/SComponent/c_m3d_g_sph.h11
-rw-r--r--include/d/actor/d_a_boss_item.h5
-rw-r--r--include/d/actor/d_a_npc_btsw2.h2
-rw-r--r--include/d/actor/d_a_npc_ji1.h4
-rw-r--r--include/d/actor/d_a_obj_Ygush00.h4
-rw-r--r--include/d/actor/d_a_obj_hfuck1.h17
-rw-r--r--include/d/actor/d_a_obj_hha.h37
-rw-r--r--include/d/d_com_inf_game.h28
-rw-r--r--include/d/d_kankyo.h4
-rw-r--r--include/d/d_particle.h1
-rw-r--r--include/d/d_save.h2
-rw-r--r--include/d/d_stage.h2
-rw-r--r--include/d/d_vibration.h5
-rw-r--r--include/f_op/f_op_actor_mng.h5
15 files changed, 119 insertions, 20 deletions
diff --git a/include/SSystem/SComponent/c_m3d_g_aab.h b/include/SSystem/SComponent/c_m3d_g_aab.h
index f1e89556..b4ece970 100644
--- a/include/SSystem/SComponent/c_m3d_g_aab.h
+++ b/include/SSystem/SComponent/c_m3d_g_aab.h
@@ -53,12 +53,12 @@ public:
VECScale(pOut, pOut, 0.5f);
}
void ClearForMinMax() {
- mMin.z = 1000000000.0f;
- mMin.y = 1000000000.0f;
- mMin.x = 1000000000.0f;
- mMax.z = -1000000000.0f;
- mMax.y = -1000000000.0f;
- mMax.x = -1000000000.0f;
+ mMin.z = G_CM3D_F_INF;
+ mMin.y = G_CM3D_F_INF;
+ mMin.x = G_CM3D_F_INF;
+ mMax.z = -G_CM3D_F_INF;
+ mMax.y = -G_CM3D_F_INF;
+ mMax.x = -G_CM3D_F_INF;
}
void ClearForMinMaxY() {
mMin.y = G_CM3D_F_INF;
diff --git a/include/SSystem/SComponent/c_m3d_g_sph.h b/include/SSystem/SComponent/c_m3d_g_sph.h
index b4a642d6..9a84623d 100644
--- a/include/SSystem/SComponent/c_m3d_g_sph.h
+++ b/include/SSystem/SComponent/c_m3d_g_sph.h
@@ -21,9 +21,14 @@ public:
cM3dGSph() {}
virtual ~cM3dGSph() {}
- void SetC(const cXyz&);
- void SetC(f32, f32, f32) {}
- void SetR(f32);
+#if VERSION == VERSION_DEMO
+ void SetC(const cXyz& p) { mCenter = p; }
+ void SetR(f32 r) { mRadius = r; }
+#else
+ void SetC(const cXyz& p);
+ void SetR(f32 r);
+#endif
+ void SetC(f32, f32, f32) {} // TODO
void Set(const cM3dGSphS & src) {
SetC(src.mCenter);
SetR(src.mRadius);
diff --git a/include/d/actor/d_a_boss_item.h b/include/d/actor/d_a_boss_item.h
index 4df13746..bdf7c31c 100644
--- a/include/d/actor/d_a_boss_item.h
+++ b/include/d/actor/d_a_boss_item.h
@@ -2,9 +2,14 @@
#define D_A_BOSS_ITEM_H
#include "f_op/f_op_actor.h"
+#include "f_op/f_op_actor_mng.h"
class bossitem_class : public fopAc_ac_c {
/* 0x290 */ u8 m290[0x298 - 0x290];
};
+namespace daBossItem_prm {
+ inline int getStage(bossitem_class* actor) { return fopAcM_GetParam(actor) & 0xFF; }
+}
+
#endif /* D_A_BOSS_ITEM_H */
diff --git a/include/d/actor/d_a_npc_btsw2.h b/include/d/actor/d_a_npc_btsw2.h
index 8bccbd7b..54967c8c 100644
--- a/include/d/actor/d_a_npc_btsw2.h
+++ b/include/d/actor/d_a_npc_btsw2.h
@@ -14,7 +14,7 @@ public:
ACTION_ENDING = -1,
};
- void getAttentionBasePos() {}
+ cXyz& getAttentionBasePos() { return mAttPos; }
void setAction(ActionFunc func, void* arg) {
if (mCurrActionFunc != func) {
if (mCurrActionFunc) {
diff --git a/include/d/actor/d_a_npc_ji1.h b/include/d/actor/d_a_npc_ji1.h
index f25b3ee9..bfbe403f 100644
--- a/include/d/actor/d_a_npc_ji1.h
+++ b/include/d/actor/d_a_npc_ji1.h
@@ -177,8 +177,8 @@ public:
/* 0x418 */ mDoExt_btkAnm field_0x418;
/* 0x42C */ f32 field_0x42C;
/* 0x430 */ JPABaseEmitter* field_0x430;
- /* 0x434 */ dBgS_ObjAcch field_0x434;
- /* 0x5F8 */ dBgS_AcchCir field_0x5F8;
+ /* 0x434 */ dBgS_ObjAcch mAcch;
+ /* 0x5F8 */ dBgS_AcchCir mAcchCir;
/* 0x638 */ dCcD_Stts field_0x638;
/* 0x674 */ dCcD_Stts field_0x674;
/* 0x6B0 */ dCcD_Cyl field_0x6B0;
diff --git a/include/d/actor/d_a_obj_Ygush00.h b/include/d/actor/d_a_obj_Ygush00.h
index ee667e37..547ed34a 100644
--- a/include/d/actor/d_a_obj_Ygush00.h
+++ b/include/d/actor/d_a_obj_Ygush00.h
@@ -37,11 +37,15 @@ public:
class daObjYgush00_HIO_c : public JORReflexible {
public:
daObjYgush00_HIO_c();
+ virtual ~daObjYgush00_HIO_c() {}
void genMessage(JORMContext* ctx);
public:
/* 0x04 */ s8 mNo;
+ /* 0x05 */ s8 m05;
+ /* 0x06 */ s8 m06;
+ /* 0x07 */ s8 m07;
};
#endif /* D_A_OBJ_YGUSH00_H */
diff --git a/include/d/actor/d_a_obj_hfuck1.h b/include/d/actor/d_a_obj_hfuck1.h
index 49652a79..2eb988f2 100644
--- a/include/d/actor/d_a_obj_hfuck1.h
+++ b/include/d/actor/d_a_obj_hfuck1.h
@@ -5,6 +5,9 @@
#include "SSystem/SComponent/c_phase.h"
#include "d/d_bg_w.h"
#include "d/d_cc_d.h"
+#if VERSION == VERSION_DEMO
+#include "m_Do/m_Do_hostIO.h"
+#endif
class daObjHfuck1_c : public fopAc_ac_c {
public:
@@ -26,4 +29,18 @@ public:
/* 0x40C */ fopAc_ac_c * mpHookshotActor;
};
+#if VERSION == VERSION_DEMO
+class daObjHfuck1_HIO_c : public JORReflexible {
+public:
+ daObjHfuck1_HIO_c();
+ virtual ~daObjHfuck1_HIO_c() {}
+
+ /* 0x04 */ s8 mNo;
+ f32 field_0x08;
+ f32 field_0x0C;
+ f32 field_0x10;
+ f32 field_0x14;
+};
+#endif
+
#endif /* D_A_OBJ_HFUCK1_H */
diff --git a/include/d/actor/d_a_obj_hha.h b/include/d/actor/d_a_obj_hha.h
index 788bc98b..1ece6786 100644
--- a/include/d/actor/d_a_obj_hha.h
+++ b/include/d/actor/d_a_obj_hha.h
@@ -51,31 +51,56 @@ public:
bool chk_stop() { return mbIsActive == false; }
void delete_s() {
+#if VERSION == VERSION_DEMO
+ if(mpEmitter != NULL){
+ mSplashCb.remove();
+ mpEmitter = NULL;
+ mbIsActive = false;
+ }
+#else
if(mSplashCb.getEmitter() != NULL){
mSplashCb.remove();
mbIsActive = false;
}
+#endif
}
void play_particle() {
+#if VERSION == VERSION_DEMO
+ if(mpEmitter != NULL){
+ mpEmitter->playCreateParticle();
+ mbIsActive = true;
+ }
+#else
JPABaseEmitter* pSplashEmitter = mSplashCb.getEmitter();
if(pSplashEmitter != NULL){
pSplashEmitter->playCreateParticle();
mbIsActive = true;
}
+#endif
}
void stop_particle() {
+#if VERSION == VERSION_DEMO
+ if(mpEmitter != NULL){
+ mpEmitter->stopCreateParticle();
+ mbIsActive = false;
+ }
+#else
JPABaseEmitter* pSplashEmitter = mSplashCb.getEmitter();
if(pSplashEmitter != NULL){
pSplashEmitter->stopCreateParticle();
mbIsActive = false;
}
+#endif
}
void create_s(u16, cXyz*, float, float, csXyz*);
public:
+#if VERSION == VERSION_DEMO
+ /* 0x00 */ JPABaseEmitter* mpEmitter;
+#endif
/* 0x00 */ dPa_followEcallBack mSplashCb;
/* 0x14 */ cXyz mBasePos;
/* 0x20 */ cXyz mPos;
@@ -138,8 +163,10 @@ public:
bool _draw();
public:
+#if VERSION > VERSION_DEMO
static const dCcD_SrcCyl M_cyl_data;
static const dCcD_SrcSph M_sph_data;
+#endif
static const char M_arcname[4];
enum State_t {State_OPEN = 0, State_SWITCHING = 1, State_CLOSED = 2};
@@ -149,20 +176,22 @@ public:
/* 0x2C4 */ dCcD_Stts mCylStts;
/* 0x300 */ dCcD_Cyl mCyl;
/* 0x430 */ bool mHitboxActive;
+#if VERSION > VERSION_DEMO
/* 0x434 */ dCcD_Stts mSphStts;
/* 0x470 */ dCcD_Sph mSph;
+#endif
/* 0x59C */ daObjHhaYgush_c mYgush;
/* 0x6A0 */ daObjHhaPart_c mPartA[2];
/* 0x738 */ daObjHhaSplash_c mSplashA[2];
/* 0x7A0 */ cXyz mPosOffset;
/* 0x7AC */ u32 mSwitchNo;
/* 0x7B0 */ u8 mIsMiddle;
- /* 0x7B2 */ short mPartTimer;
- /* 0x7B4 */ float mWtrScale;
- /* 0x7B8 */ float mWtrScaleMin;
+ /* 0x7B2 */ s16 mPartTimer;
+ /* 0x7B4 */ f32 mWtrScale;
+ /* 0x7B8 */ f32 mWtrScaleMin;
/* 0x7BC */ u16 mWtrTimer;
/* 0X7BE */ u8 mWtrState;
- /* 0x7C0 */ short mEventIdx;
+ /* 0x7C0 */ s16 mEventIdx;
/* 0x7C2 */ u8 mState;
/* 0x7C3 */ bool mWaterSound;
};
diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h
index bc139d1c..d8fba087 100644
--- a/include/d/d_com_inf_game.h
+++ b/include/d/d_com_inf_game.h
@@ -550,12 +550,14 @@ public:
inline void setHeapLockFlag(u8 flag) { mHeapLockFlag = flag; }
inline void offHeapLockFlag() { mHeapLockFlag = 0; }
- // These inlines aren't present in WW JP debug maps, but are present in TP debug.
+#if VERSION > VERSION_DEMO
+ // These inlines aren't present in WW demo debug maps, but are present in TP debug.
inline u8 getNowVibration() { return mNowVibration; }
inline void setNowVibration(u8 vibration) { mNowVibration = vibration; }
+#endif
#if VERSION > VERSION_JPN
- // Inline name is fake (not present in JP debug maps), but was guessed based on the similar
+ // Inline name is fake (not present in demo debug maps), but was guessed based on the similar
// dSv_player_config_c::getPalLanguage() const inline in TP debug.
inline u8 getPalLanguage() { return mPalLanguage; }
inline void setPalLanguage(u8 lang) { mPalLanguage = lang; }
@@ -810,7 +812,9 @@ public:
/* 0x4960 */ u8 mPictureFormat;
/* 0x4961 */ u8 field_0x4961;
/* 0x4962 */ u8 mHeapLockFlag;
+#if VERSION > VERSION_DEMO
/* 0x4963 */ u8 mNowVibration;
+#endif
#if VERSION > VERSION_JPN
/* 0x4964 */ u8 mPalLanguage;
#endif
@@ -1446,10 +1450,12 @@ inline void dComIfGs_setOptVibration(u8 vib) {
g_dComIfG_gameInfo.save.getPlayer().getConfig().setVibration(vib);
}
+#if VERSION > VERSION_DEMO
/* Not present in debug maps, imitates TP version */
inline u8 dComIfGs_checkOptVibration() {
return g_dComIfG_gameInfo.save.getPlayer().getConfig().checkVibration();
}
+#endif
inline BOOL dComIfGs_isTbox(int i_no) {
return g_dComIfG_gameInfo.save.getMemory().getBit().isTbox(i_no);
@@ -1604,6 +1610,14 @@ inline BOOL dComIfGs_isItem(int bitNo, int roomNo) {
return g_dComIfG_gameInfo.save.isItem(bitNo, roomNo);
}
+inline void dComIfGs_onVisitedRoom(int i_no) {
+ g_dComIfG_gameInfo.save.getMemory().getBit().onVisitedRoom(i_no);
+}
+
+inline bool dComIfGs_isVisitedRoom(int i_no) {
+ return g_dComIfG_gameInfo.save.getMemory().getBit().isVisitedRoom(i_no);
+}
+
inline void dComIfGs_clearRoomSwitch(int i_zoneNo) {
g_dComIfG_gameInfo.save.getZone(i_zoneNo).getZoneBit().clearRoomSwitch();
}
@@ -2797,6 +2811,7 @@ inline void dComIfGp_offHeapLockFlag() {
g_dComIfG_gameInfo.play.offHeapLockFlag();
}
+#if VERSION > VERSION_DEMO
// Inline name from TP debug.
inline u8 dComIfGp_getNowVibration() {
return g_dComIfG_gameInfo.play.getNowVibration();
@@ -2806,6 +2821,7 @@ inline u8 dComIfGp_getNowVibration() {
inline void dComIfGp_setNowVibration(u8 vibration) {
g_dComIfG_gameInfo.play.setNowVibration(vibration);
}
+#endif
#if VERSION > VERSION_JPN
// Inline name is official because while it's not present in the JPN debug maps, it is present in
@@ -3589,6 +3605,14 @@ inline int dComIfG_syncStageRes(const char* name) {
return g_dComIfG_gameInfo.mResControl.syncStageRes(name);
}
+#if VERSION == VERSION_DEMO
+// A number of actors used dComIfG_deleteObjectRes in actor delete functions, but these were changed
+// to dComIfG_resDelete for the retail version.
+#define dComIfG_resDeleteDemo(i_phase, i_resName) dComIfG_deleteObjectRes(i_resName)
+#else
+#define dComIfG_resDeleteDemo(i_phase, i_resName) dComIfG_resDelete(i_phase, i_resName);
+#endif
+
inline int dComIfG_deleteObjectRes(const char* res) {
return g_dComIfG_gameInfo.mResControl.deleteObjectRes(res);
}
diff --git a/include/d/d_kankyo.h b/include/d/d_kankyo.h
index f7139dc8..2a235597 100644
--- a/include/d/d_kankyo.h
+++ b/include/d/d_kankyo.h
@@ -277,10 +277,12 @@ public:
/* 0xB88 */ GXColorS10 mBgAddColDif;
/* 0xB90 */ GXColorS10 mBg1AddColAmb;
/* 0xB98 */ GXColorS10 mBg1AddColDif;
+#if VERSION > VERSION_DEMO
/* 0xBA0 */ GXColorS10 mBg2AddColAmb;
/* 0xBA8 */ GXColorS10 mBg2AddColDif;
/* 0xBB0 */ GXColorS10 mBg3AddColAmb;
/* 0xBB8 */ GXColorS10 mBg3AddColDif;
+#endif
/* 0xBC0 */ GXColorS10 mAddColFog;
/* 0xBC8 */ GXColorS10 mVrboxAddColSky0;
/* 0xBD0 */ GXColorS10 mVrboxAddColKasumi;
@@ -356,7 +358,9 @@ public:
extern dScnKy_env_light_c g_env_light;
+#if VERSION > VERSION_DEMO
STATIC_ASSERT(sizeof(dScnKy_env_light_c) == 0xC9C);
+#endif
inline dScnKy_env_light_c& dKy_getEnvlight() {
return g_env_light;
diff --git a/include/d/d_particle.h b/include/d/d_particle.h
index 0e75e5c4..1802b092 100644
--- a/include/d/d_particle.h
+++ b/include/d/d_particle.h
@@ -90,7 +90,6 @@ private:
/* 0x14 */ s8 field_0x14;
/* 0x15 */ u8 mWindOff;
/* 0x16 */ GXColor mColor;
- /* 0x1A */ u8 field_0x1A[0x1C - 0x1A];
/* 0x1C */ dKy_tevstr_c* mTevstr;
}; // Size: 0x20
diff --git a/include/d/d_save.h b/include/d/d_save.h
index 4ce03496..f339618b 100644
--- a/include/d/d_save.h
+++ b/include/d/d_save.h
@@ -459,7 +459,9 @@ STATIC_ASSERT(sizeof(dSv_player_info_c) == 0x5C);
class dSv_player_config_c {
public:
void init();
+#if VERSION > VERSION_DEMO
s32 checkVibration();
+#endif
u8 getRuby() { return mRuby; }
void setRuby(u8 ruby) { mRuby = ruby; }
diff --git a/include/d/d_stage.h b/include/d/d_stage.h
index c40821c5..737a1726 100644
--- a/include/d/d_stage.h
+++ b/include/d/d_stage.h
@@ -895,7 +895,7 @@ public:
static int getZoneNo(int i_roomNo) { return mStatus[i_roomNo].mZoneNo; }
static void setZoneCount(int i_roomNo, int count) { mStatus[i_roomNo].mZoneCount = count; }
- static s8 getStayNo() { return mStayNo; }
+ static int getStayNo() { return mStayNo; }
static s8 getMemoryBlockID(int i_roomNo) { return mStatus[i_roomNo].mMemBlockID; }
static void onStatusDraw(int i_roomNo) { mStatus[i_roomNo].mDraw = true; }
static void setProcID(fpc_ProcID id) { mProcID = id; }
diff --git a/include/d/d_vibration.h b/include/d/d_vibration.h
index 04b06df6..314d916e 100644
--- a/include/d/d_vibration.h
+++ b/include/d/d_vibration.h
@@ -58,8 +58,13 @@ public:
/* 0x80 */ /* vtable */
public:
+#if VERSION == VERSION_DEMO
+ dVibration_c() { setDefault(); }
+ virtual ~dVibration_c() { Kill(); }
+#else
dVibration_c();
virtual ~dVibration_c();
+#endif
int Run();
bool StartShock(int, int, cXyz);
diff --git a/include/f_op/f_op_actor_mng.h b/include/f_op/f_op_actor_mng.h
index 861e60b7..a5ea8eca 100644
--- a/include/f_op/f_op_actor_mng.h
+++ b/include/f_op/f_op_actor_mng.h
@@ -412,10 +412,15 @@ inline BOOL fopAcM_isItemForIb(int itemBitNo, u8 itemNo, s8 roomNo) {
}
inline void dComIfGs_onSaveSwitch(int i_stageNo, int i_no);
+inline void dComIfGs_onVisitedRoom(int i_no);
inline void fopAcM_onItemForIb(int itemBitNo, u8 itemNo, s8 roomNo) {
if (itemNo == dItem_BLUE_JELLY_e) {
+#if VERSION == VERSION_DEMO
+ dComIfGs_onVisitedRoom(itemBitNo);
+#else
// Blue Chu Jelly uses itemBitNo as if it was a switch in stageNo 0xE.
dComIfGs_onSaveSwitch(dSv_save_c::STAGE_BLUE_CHU_JELLY, itemBitNo);
+#endif
} else {
dComIfGs_onItem(itemBitNo, roomNo);
}