summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2026-05-04 13:50:55 -0400
committerGitHub <noreply@github.com>2026-05-04 13:50:55 -0400
commitdef3445cc69b874cdde54aaa082d6cceec5d42fc (patch)
tree82f65a62f5391221bb569d191a13697964ab25b1 /src
parent6bc01f1d02376ef07145899cbf6988453f67b10c (diff)
Fix particle_set inlines (#971)
Diffstat (limited to 'src')
-rw-r--r--src/d/actor/d_a_bdk.cpp6
-rw-r--r--src/d/actor/d_a_dr2.cpp1
-rw-r--r--src/d/actor/d_a_ghostship.cpp12
-rw-r--r--src/d/actor/d_a_himo2.cpp2
-rw-r--r--src/d/actor/d_a_npc_os.cpp15
-rw-r--r--src/d/actor/d_a_npc_tc.cpp16
-rw-r--r--src/d/actor/d_a_npc_tc_cut.inc2
-rw-r--r--src/d/d_meter.cpp7
8 files changed, 31 insertions, 30 deletions
diff --git a/src/d/actor/d_a_bdk.cpp b/src/d/actor/d_a_bdk.cpp
index e53cde16..ededc84c 100644
--- a/src/d/actor/d_a_bdk.cpp
+++ b/src/d/actor/d_a_bdk.cpp
@@ -1360,7 +1360,7 @@ void fly_attack(bdk_class* i_this) {
actor->speed.y = 0.0f;
i_this->m2EC[0] = REG0_S(5) + 0x28;
i_this->m2EC[1] = REG0_S(6) + 0x50;
- dComIfGp_getVibration().StartShock(REG0_S(2) + 5, -0x21, cXyz(0.0f, 1.0f, 0.0f));
+ dComIfGp_getVibration().StartShock(DEMO_SELECT(REG6_S(2), REG0_S(2)) + 5, -0x21, cXyz(0.0f, 1.0f, 0.0f));
fopAcM_seStart(actor, JA_SE_CM_DK_CRASH_WALL, 0);
fopAcM_monsSeStart(actor, JA_SE_CV_DK_KABE_DAMAGE, 0);
@@ -1417,8 +1417,8 @@ void fly_attack(bdk_class* i_this) {
if (i_this->mAction == ACTION_FLY_ATTACK && (i_this->mState < 10)) {
i_this->m2584 = 2;
pos_move(i_this);
- i_this->mAcchCir.SetWall(REG0_F(17) + 500.0f, 500.0f);
- i_this->mAcch.SetGroundUpY(REG0_F(18));
+ i_this->mAcchCir.SetWall(DEMO_SELECT(REG6_F(17), REG0_F(17)) + 500.0f, 500.0f);
+ i_this->mAcch.SetGroundUpY(DEMO_SELECT(REG6_F(18), REG0_F(18)));
if (i_this->mAcch.ChkGroundHit() && (i_this->m2619 == 0)) {
for (s32 i = 0; i <= 1; i++) {
foot_eff_pos[i] = i_this->m1174[i];
diff --git a/src/d/actor/d_a_dr2.cpp b/src/d/actor/d_a_dr2.cpp
index 9ebd5dee..4abeef19 100644
--- a/src/d/actor/d_a_dr2.cpp
+++ b/src/d/actor/d_a_dr2.cpp
@@ -224,7 +224,6 @@ void hahen_move(dr2_class* i_this) {
/* 00000884-0000130C .text iwa_move__FP9dr2_class */
void iwa_move(dr2_class* i_this) {
- /* Nonmatching - retail-only regalloc */
fopAc_ac_c* a_this = &i_this->actor;
cXyz sp58;
cXyz sp4C;
diff --git a/src/d/actor/d_a_ghostship.cpp b/src/d/actor/d_a_ghostship.cpp
index abeb2856..9011a07e 100644
--- a/src/d/actor/d_a_ghostship.cpp
+++ b/src/d/actor/d_a_ghostship.cpp
@@ -286,16 +286,12 @@ static BOOL daGhostshipExecute(void* i_this) {
/* 00001048-0000182C .text _execute__13daGhostship_cFv */
bool daGhostship_c::_execute() {
f32 time = dComIfGs_getTime();
- f32 dist = fopAcM_searchActorDistanceXZ(this, dComIfGp_getPlayer(0));
+ fopAc_ac_c* player = dComIfGp_getPlayer(0);
+ // Fakematch, debug map says fopAcM_searchPlayerDistanceXZ was used
+ f32 dist = fopAcM_searchActorDistanceXZ(this, player);
mbCanEnterShip = false;
- if(moonPhase != dKy_moon_type_chk() ||
-#if VERSION == VERSION_DEMO
- (time > 90.0f && time < 330.0f)
-#else
- (time > 90.0f && time < 285.0f)
-#endif
- ) {
+ if(moonPhase != dKy_moon_type_chk() || (time > 90.0f && time < DEMO_SELECT(330.0f, 285.0f))) {
dKy_pship_existense_cut();
mAlpha = 0.0f;
}
diff --git a/src/d/actor/d_a_himo2.cpp b/src/d/actor/d_a_himo2.cpp
index 93a9d27c..a4360bfe 100644
--- a/src/d/actor/d_a_himo2.cpp
+++ b/src/d/actor/d_a_himo2.cpp
@@ -699,7 +699,7 @@ int himo2_bg_check(himo2_class* i_this) {
i_this->m0308 = 30;
cBgS_PolyInfo local_24;
flag = i_this->m2574.GetOnePolyInfo(&local_24);
- JUT_ASSERT(1569, flag == NULL);
+ JUT_ASSERT(DEMO_SELECT(1534, 1569), flag == NULL);
uVar3 = dComIfG_Bgsp()->GetMtrlSndId(local_24);
mDoAud_seStart(JA_SE_LK_SW_HIT_S, &actor->current.pos, uVar3, dComIfGp_getReverb(fopAcM_GetRoomNo(actor)));
iVar4 = dComIfG_Bgsp()->GetAttributeCode(local_24);
diff --git a/src/d/actor/d_a_npc_os.cpp b/src/d/actor/d_a_npc_os.cpp
index db25d2eb..00ff1f26 100644
--- a/src/d/actor/d_a_npc_os.cpp
+++ b/src/d/actor/d_a_npc_os.cpp
@@ -2132,7 +2132,9 @@ BOOL daNpc_Os_c::execute() {
static JGeometry::TVec3<f32> splash_scale(0.6f, 0.6f, 0.6f);
static JGeometry::TVec3<f32> ripple_scale(1.0f, 1.0f, 1.0f);
+#if VERSION > VERSION_DEMO
field_0x784 &= ~0x10;
+#endif
fopAcM_OffStatus(this, fopAcStts_SHOWMAP_e);
checkPlayerRoom();
if(!finishCheck()) {
@@ -2166,7 +2168,14 @@ BOOL daNpc_Os_c::execute() {
mAcchCir[1].SetWallR(40.0f);
}
+#if VERSION == VERSION_DEMO
+ if (mpPedestal == NULL) {
+ mpPedestal = (daPedestal::daPds_c*)searchFromName(l_daiza_name[argument], 0xFF, 1);
+ }
+#else
mpPedestal = (daPedestal::daPds_c*)searchFromName(l_daiza_name[argument], 0xFF, 1);
+#endif
+
if(mpPedestal) {
if(!isFinish()) {
if(finishCheck()) {
@@ -2190,7 +2199,9 @@ BOOL daNpc_Os_c::execute() {
mAcch.CrrPos(*dComIfG_Bgsp());
+#if VERSION > VERSION_DEMO
field_0x784 |= 0x10;
+#endif
if(mAcch.GetGroundH() != -G_CM3D_F_INF) {
tevStr.mRoomNo = dComIfG_Bgsp()->GetRoomId(mAcch.m_gnd);
tevStr.mEnvrIdxOverride = dComIfG_Bgsp()->GetPolyColor(mAcch.m_gnd);
@@ -2254,7 +2265,9 @@ BOOL daNpc_Os_c::execute() {
mAcch.CrrPos(*dComIfG_Bgsp());
+#if VERSION > VERSION_DEMO
field_0x784 |= 0x10;
+#endif
if(chkPlayerAction(&daNpc_Os_c::walkPlayerAction) || chkNpcAction(&daNpc_Os_c::searchNpcAction)) {
if(!mAcch.ChkGroundHit()) {
@@ -2326,6 +2339,7 @@ BOOL daNpc_Os_c::execute() {
}
}
}
+#if VERSION > VERSION_DEMO
else {
mAcch.CrrPos(*dComIfG_Bgsp());
@@ -2335,6 +2349,7 @@ BOOL daNpc_Os_c::execute() {
tevStr.mEnvrIdxOverride = dComIfG_Bgsp()->GetPolyColor(mAcch.m_gnd);
}
}
+#endif
if(!fopAcM_checkCarryNow(this)) {
setCollision();
diff --git a/src/d/actor/d_a_npc_tc.cpp b/src/d/actor/d_a_npc_tc.cpp
index a1e5cf26..bbc1be59 100644
--- a/src/d/actor/d_a_npc_tc.cpp
+++ b/src/d/actor/d_a_npc_tc.cpp
@@ -14,17 +14,6 @@
#include "d/actor/d_a_obj_smplbg.h"
#include "d/d_lib.h"
-
-#if VERSION == VERSION_DEMO
-static f32 lbl_285_data_1C[] = {
- 0.0f,
- 2.125f,
- 0.0f,
- 1.75f,
- 0.0f
-};
-#endif
-
class daNpc_Tc_HIO_c : public mDoHIO_entry_c{
public:
daNpc_Tc_HIO_c();
@@ -590,12 +579,11 @@ void daNpc_Tc_c::setAnm() {
JPABaseEmitter* pEmitter = dComIfGp_particle_set(dPa_name::ID_IT_SN_PF_BIKON00, &particlePos, NULL, &particleScale);
pEmitter->setGlobalParticleScale(0.62f, 0.6f);
- fopAcM_seStart(this, JA_SE_CM_CMN_NOTICE, 0); // regswap for demo likely happens here, daNpc_Tc_c::cutEffectStart also has a regswap with identical code
+ fopAcM_seStart(this, JA_SE_CM_CMN_NOTICE, 0);
}
mSmokeCallBack.end();
}
dLib_bcks_setAnm("Tc", mpMorf, &mBckIdx, &mAnmPrmIdx, &mOldAnmPrmIdx, a_anm_bck_tbl, a_anm_prm_tbl, false);
- /* Nonmatching */
}
/* 00001168-000011C0 .text setTexAnm__10daNpc_Tc_cFv */
@@ -1976,7 +1964,7 @@ actor_process_profile_definition g_profile_NPC_TC = {
/* Leaf SubMtd */ &g_fopAc_Method.base,
/* Priority */ PRIO_NPC_TC,
/* Actor SubMtd */ &l_daNpc_Tc_Method,
- /* Status */ fopAcStts_UNK40000_e,
+ /* Status */ DEMO_SELECT(fopAcStts_UNK4000_e, 0) | fopAcStts_UNK40000_e,
/* Group */ fopAc_ACTOR_e,
/* CullType */ fopAc_CULLBOX_12_e,
};
diff --git a/src/d/actor/d_a_npc_tc_cut.inc b/src/d/actor/d_a_npc_tc_cut.inc
index 3e45725f..92ea749f 100644
--- a/src/d/actor/d_a_npc_tc_cut.inc
+++ b/src/d/actor/d_a_npc_tc_cut.inc
@@ -252,7 +252,6 @@ void daNpc_Tc_c::cutBackJumpProc(int i_staffIdx) {
/* 000063BC-000064C8 .text cutEffectStart__10daNpc_Tc_cFi */
void daNpc_Tc_c::cutEffectStart(int) {
- // regswap for demo daNpc_Tc_c::setAnm also has a regswap with identical code
cXyz pos;
pos.x = current.pos.x;
pos.y = current.pos.y;
@@ -266,7 +265,6 @@ void daNpc_Tc_c::cutEffectStart(int) {
JPABaseEmitter* pEmitter = dComIfGp_particle_set(dPa_name::ID_IT_SN_PF_BIKON00, &pos, NULL, &particleScale);
pEmitter->setGlobalParticleScale(0.62f, 0.6f);
fopAcM_seStart(this, JA_SE_CM_CMN_NOTICE, 0);
- /* Nonmatching */
}
/* 000064C8-000064F4 .text cutEffectProc__10daNpc_Tc_cFi */
diff --git a/src/d/d_meter.cpp b/src/d/d_meter.cpp
index b6336512..15b37a82 100644
--- a/src/d/d_meter.cpp
+++ b/src/d/d_meter.cpp
@@ -2535,7 +2535,12 @@ void dMeter_xyMove(sub_meter_class* i_Meter) {
if (i_Meter->field_0x3021[i] != dComIfGp_getSelectItem(i)) {
dMeter_xyItemChange(i_Meter, i);
bVar2 = false;
- if ((dComIfGp_getSelectItem(i) != dItem_MAGIC_ARROW_e) && (dComIfGp_getSelectItem(i) != dItem_LIGHT_ARROW_e)) {
+#if VERSION == VERSION_DEMO
+ if ((i_Meter->field_0x3021[i] == dItem_MAGIC_ARROW_e) || (i_Meter->field_0x3021[i] == dItem_LIGHT_ARROW_e))
+#else
+ if ((dComIfGp_getSelectItem(i) != dItem_MAGIC_ARROW_e) && (dComIfGp_getSelectItem(i) != dItem_LIGHT_ARROW_e))
+#endif
+ {
i_Meter->field_0x2320[i].pane->hide();
i_Meter->field_0x23c8[i].pane->hide();
i_Meter->field_0x2470[i].pane->hide();