summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYunataSavior <58997725+YunataSavior@users.noreply.github.com>2025-11-05 19:48:31 -0800
committerGitHub <noreply@github.com>2025-11-05 19:48:31 -0800
commit653ff8979c397fe071dbfaf8fe8dd8207cc985b6 (patch)
tree70b8d5f8b6896fc2a6d3289522f8058303bf9c55
parentc428403198aa5ea218b45803a28aff7fc83b35cd (diff)
Misc obj linkage (#2773)
-rwxr-xr-xconfigure.py14
-rw-r--r--include/d/actor/d_a_e_yd.h16
-rw-r--r--include/d/actor/d_a_obj_flag3.h6
-rw-r--r--include/d/actor/d_a_obj_lv6ChangeGate.h12
-rw-r--r--include/d/actor/d_a_obj_master_sword.h2
-rw-r--r--include/d/actor/d_a_obj_waterPillar.h11
-rw-r--r--include/d/actor/d_a_passer_mng.h15
-rw-r--r--src/d/actor/d_a_e_yd.cpp16
-rw-r--r--src/d/actor/d_a_obj_flag3.cpp54
-rw-r--r--src/d/actor/d_a_obj_lv6ChangeGate.cpp12
-rw-r--r--src/d/actor/d_a_obj_master_sword.cpp60
-rw-r--r--src/d/actor/d_a_obj_swhang.cpp14
-rw-r--r--src/d/actor/d_a_obj_waterPillar.cpp18
13 files changed, 116 insertions, 134 deletions
diff --git a/configure.py b/configure.py
index 685e25ccab..1589e196b0 100755
--- a/configure.py
+++ b/configure.py
@@ -1804,7 +1804,7 @@ config.libs = [
ActorRel(NonMatching, "d_a_e_ws"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_ww"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_yc"),
- ActorRel(NonMatching, "d_a_e_yd"),
+ ActorRel(MatchingFor("GZ2E01"), "d_a_e_yd"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_yd_leaf"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_yg"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_yh"),
@@ -2007,7 +2007,7 @@ config.libs = [
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_firepillar2"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_flag"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_flag2"),
- ActorRel(Equivalent, "d_a_obj_flag3"), # weak function order
+ ActorRel(MatchingFor("GZ2E01"), "d_a_obj_flag3"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_food"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_fw"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_gadget"),
@@ -2100,7 +2100,7 @@ config.libs = [
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_lv5SwIce"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_lv5ychndlr"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_lv5yiblltray"),
- ActorRel(Equivalent, "d_a_obj_lv6ChangeGate"), # weak func order
+ ActorRel(MatchingFor("GZ2E01"), "d_a_obj_lv6ChangeGate"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_lv6FurikoTrap"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_lv6Lblock"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_lv6SwGate"),
@@ -2117,14 +2117,14 @@ config.libs = [
ActorRel(NonMatching, "d_a_obj_lv7PropellerY"),
ActorRel(Equivalent, "d_a_obj_lv7bridge"), # small regalloc
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_lv8KekkaiTrap"),
- ActorRel(NonMatching, "d_a_obj_lv8Lift"),
- ActorRel(NonMatching, "d_a_obj_lv8OptiLift"),
+ ActorRel(MatchingFor("GZ2E01"), "d_a_obj_lv8Lift"),
+ ActorRel(MatchingFor("GZ2E01"), "d_a_obj_lv8OptiLift"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_lv8UdFloor"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_lv9SwShutter"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_magLift"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_magLiftRot"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_maki"),
- ActorRel(Equivalent, "d_a_obj_master_sword"), # weak function and vtable order (dBgS_AcchCir/dBgS_ObjAcch)
+ ActorRel(MatchingFor("GZ2E01"), "d_a_obj_master_sword"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_mato"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_mhole"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_mie"),
@@ -2236,7 +2236,7 @@ config.libs = [
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_warp_kbrg"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_warp_obrg"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_waterGate"),
- ActorRel(Equivalent, "d_a_obj_waterPillar"), # weak func order
+ ActorRel(MatchingFor("GZ2E01"), "d_a_obj_waterPillar"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_waterfall"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_wchain"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_wdStick"),
diff --git a/include/d/actor/d_a_e_yd.h b/include/d/actor/d_a_e_yd.h
index f12d3dc3bb..188e435ba5 100644
--- a/include/d/actor/d_a_e_yd.h
+++ b/include/d/actor/d_a_e_yd.h
@@ -78,21 +78,5 @@ public:
STATIC_ASSERT(sizeof(e_yd_class) == 0x126c);
-class daE_YD_HIO_c {
-public:
- daE_YD_HIO_c();
- virtual ~daE_YD_HIO_c() {}
-
- /* 0x4 */ s8 field_0x4;
- /* 0x8 */ f32 field_0x8;
- /* 0xC */ f32 field_0xc;
- /* 0x10 */ f32 field_0x10;
- /* 0x14 */ s16 field_0x14;
- /* 0x16 */ s16 field_0x16;
- /* 0x18 */ u8 field_0x18;
-};
-
-STATIC_ASSERT(sizeof(daE_YD_HIO_c) == 0x1c);
-
#endif /* D_A_E_YD_H */
diff --git a/include/d/actor/d_a_obj_flag3.h b/include/d/actor/d_a_obj_flag3.h
index f3e70d3d0f..0cace182d5 100644
--- a/include/d/actor/d_a_obj_flag3.h
+++ b/include/d/actor/d_a_obj_flag3.h
@@ -16,10 +16,10 @@ class FlagCloth2_c : public J3DPacket {
public:
/* 80BEEDE4 */ void execute();
/* 80BEEF74 */ inline void calcFlagNormal(cXyz*, int);
- static void initCcSphere(fopAc_ac_c*);
+ inline static void initCcSphere(fopAc_ac_c*);
/* 80BEF278 */ inline cXyz calcFlagFactor(cXyz*, cXyz*, cXyz*, int);
/* 80BEF790 */ virtual ~FlagCloth2_c();
- /* 80BEFD08 */ void initFlagPos(cXyz*, fopAc_ac_c*);
+ /* 80BEFD08 */ inline void initFlagPos(cXyz*, fopAc_ac_c*);
/* 80BF00A0 */ virtual void draw();
/* 80BF0434 */ cXyz getTargetPos() { return mPositions[4]; }
@@ -89,7 +89,7 @@ public:
/* 80BEED3C */ int execute();
/* 80BEF700 */ ~daObjFlag3_c();
/* 80BEF95C */ int create();
- /* 80BEFBC4 */ void create_init();
+ /* 80BEFBC4 */ inline void create_init();
inline int draw();
inline void initBaseMtx();
diff --git a/include/d/actor/d_a_obj_lv6ChangeGate.h b/include/d/actor/d_a_obj_lv6ChangeGate.h
index f9a2986cc9..ee1d081fbc 100644
--- a/include/d/actor/d_a_obj_lv6ChangeGate.h
+++ b/include/d/actor/d_a_obj_lv6ChangeGate.h
@@ -62,17 +62,5 @@ public:
STATIC_ASSERT(sizeof(daLv6ChangeGate_c) == 0x14dc);
-class daLv6ChangeGate_HIO_c : public fOpAcm_HIO_entry_c {
-public:
- /* 80C70C4C */ daLv6ChangeGate_HIO_c();
- /* 80C71EE8 */ virtual ~daLv6ChangeGate_HIO_c() {}
-
- void genMessage(JORMContext*);
-
- /* 0x4 */ f32 speed;
- /* 0x8 */ f32 move_amount;
- /* 0xC */ u8 unk_0xc;
-};
-
#endif /* D_A_OBJ_LV6CHANGEGATE_H */
diff --git a/include/d/actor/d_a_obj_master_sword.h b/include/d/actor/d_a_obj_master_sword.h
index 75eeb0eeea..a8c54f4939 100644
--- a/include/d/actor/d_a_obj_master_sword.h
+++ b/include/d/actor/d_a_obj_master_sword.h
@@ -31,7 +31,7 @@ public:
/* 80C90C50 */ static int createHeapCallBack(fopAc_ac_c* i_this);
/* 80C90C70 */ int CreateHeap();
/* 80C90DB8 */ int create();
- /* 80C90F6C */ void create_init();
+ /* 80C90F6C */ inline void create_init();
/* 80C91448 */ ~daObjMasterSword_c();
/* 80C91714 */ int draw();
diff --git a/include/d/actor/d_a_obj_waterPillar.h b/include/d/actor/d_a_obj_waterPillar.h
index a76449beb3..52849dbc57 100644
--- a/include/d/actor/d_a_obj_waterPillar.h
+++ b/include/d/actor/d_a_obj_waterPillar.h
@@ -17,8 +17,8 @@
class daWtPillar_c : public fopAc_ac_c, public request_of_phase_process_class, public dEvLib_callback_c {
public:
- daWtPillar_c();
- ~daWtPillar_c();
+ daWtPillar_c() : dEvLib_callback_c(this) {}
+ ~daWtPillar_c() {}
/* 80D2C7B0 */ void setBaseMtx();
/* 80D2C838 */ static int createHeapCallBack(fopAc_ac_c*);
@@ -84,10 +84,9 @@ private:
/* 0x7DC */ dCcD_Stts mStts;
/* 0x818 */ dCcD_Cps mCapsuleCollider;
/* 0x95C */ dCcD_Cyl mCylinderCollider;
- /* 0xA98 */ u8 pad0[0x3C];
- /* 0xAD4 */ f32 mScaleX; // Modified but never read; unused?
- /* 0xAD8 */ u8 pad1[0x4];
- /* 0xADC */ f32 mScaleZ; // Modified but never read; unused?
+ /* 0xA98 */ u8 pad0[0x30];
+ /* 0xAC8 */ cXyz field_0xAC8; // unused.
+ /* 0xAD4 */ cXyz mScale; // Modified but never read; unused?
/* 0xAE0 */ f32 mCurrentHeight;
/* 0xAE4 */ cM3dGCpsS mCapsuleSource;
/* 0xB00 */ u8 mAction;
diff --git a/include/d/actor/d_a_passer_mng.h b/include/d/actor/d_a_passer_mng.h
index 38b59ef857..706fd41de4 100644
--- a/include/d/actor/d_a_passer_mng.h
+++ b/include/d/actor/d_a_passer_mng.h
@@ -32,17 +32,11 @@ public:
u8 getGroupNo() { return (shape_angle.x >> 8) & 0xff; }
int getTimeHour() {
- if (dKy_darkworld_check()) {
- return dKy_getDarktime_hour();
- }
- return dKy_getdaytime_hour();
+ return (dKy_darkworld_check()) ? dKy_getDarktime_hour() : dKy_getdaytime_hour();
}
int getTimeMinute() {
- if (dKy_darkworld_check()) {
- return dKy_getDarktime_minute();
- }
- return dKy_getdaytime_minute();
+ return (dKy_darkworld_check()) ? dKy_getDarktime_minute() : dKy_getdaytime_minute();
}
int getTime() {
@@ -50,10 +44,7 @@ public:
}
int getDayOfWeek() {
- if (dKy_darkworld_check()) {
- return dKy_getDarktime_week();
- }
- return dKy_get_dayofweek();
+ return (dKy_darkworld_check()) ? dKy_getDarktime_week() : dKy_get_dayofweek();
}
int getChildNum() {
diff --git a/src/d/actor/d_a_e_yd.cpp b/src/d/actor/d_a_e_yd.cpp
index 93ce6a1f28..3486cdab30 100644
--- a/src/d/actor/d_a_e_yd.cpp
+++ b/src/d/actor/d_a_e_yd.cpp
@@ -12,6 +12,22 @@
#include "d/d_cc_uty.h"
#include "f_op/f_op_actor_enemy.h"
+class daE_YD_HIO_c {
+public:
+ daE_YD_HIO_c();
+ virtual ~daE_YD_HIO_c() {}
+
+ /* 0x4 */ s8 field_0x4;
+ /* 0x8 */ f32 field_0x8;
+ /* 0xC */ f32 field_0xc;
+ /* 0x10 */ f32 field_0x10;
+ /* 0x14 */ s16 field_0x14;
+ /* 0x16 */ s16 field_0x16;
+ /* 0x18 */ u8 field_0x18;
+};
+
+STATIC_ASSERT(sizeof(daE_YD_HIO_c) == 0x1c);
+
/* 807F2C2C-807F2C78 0000EC 004C+00 1/1 0/0 0/0 .text __ct__12daE_YD_HIO_cFv */
daE_YD_HIO_c::daE_YD_HIO_c() {
field_0x4 = -1;
diff --git a/src/d/actor/d_a_obj_flag3.cpp b/src/d/actor/d_a_obj_flag3.cpp
index 053fa45478..97b09f1bb3 100644
--- a/src/d/actor/d_a_obj_flag3.cpp
+++ b/src/d/actor/d_a_obj_flag3.cpp
@@ -48,7 +48,9 @@ public:
/* 0x8 */ daObjFlag3_Attr_c mAttr;
};
+#if DEBUG
daObjFlag3_Hio_c M_hio;
+#endif
/* 80BF0458-80BF046C 000000 0014+00 3/3 0/0 0/0 .rodata M_attr__12daObjFlag3_c */
daObjFlag3_Attr_c const daObjFlag3_c::M_attr = {
@@ -442,32 +444,7 @@ static int daObjFlag3_Create(fopAc_ac_c* i_this) {
return static_cast<daObjFlag3_c*>(i_this)->create();
}
-/* 80BEF95C-80BEFBC4 000F5C 0268+00 1/1 0/0 0/0 .text create__12daObjFlag3_cFv */
-int daObjFlag3_c::create() {
- fopAcM_ct(this, daObjFlag3_c);
- s8 flagNum = (u8)shape_angle.x;
- if (flagNum <= -1 || flagNum > 99) {
- mFlagValid = false;
- } else {
- mFlagValid = true;
- sprintf(mFlagName, "FlagObj%02d", flagNum);
- int rv = dComIfG_resLoad(&mFlagPhase, mFlagName);
- if (rv != cPhs_COMPLEATE_e) {
- return rv;
- }
- }
- int rv = dComIfG_resLoad(&mArcPhase, daSetBgObj_c::getArcName(this));
- if (rv == cPhs_COMPLEATE_e) {
- if (fopAcM_entrySolidHeap(this, createSolidHeap, 0x4000) == 0) {
- return cPhs_ERROR_e;
- } else {
- create_init();
- }
- }
- return rv;
-}
-
-inline void daObjFlag3_c::initBaseMtx() {
+void daObjFlag3_c::initBaseMtx() {
mDoMtx_stack_c::transS(current.pos);
mModel->setBaseTRMtx(mDoMtx_stack_c::get());
fopAcM_SetMtx(this, mModel->getBaseTRMtx());
@@ -526,6 +503,31 @@ void FlagCloth2_c::initFlagPos(cXyz* param_0, fopAc_ac_c* param_1) {
initTexCoord();
}
+/* 80BEF95C-80BEFBC4 000F5C 0268+00 1/1 0/0 0/0 .text create__12daObjFlag3_cFv */
+int daObjFlag3_c::create() {
+ fopAcM_ct(this, daObjFlag3_c);
+ s8 flagNum = (u8)shape_angle.x;
+ if (flagNum <= -1 || flagNum > 99) {
+ mFlagValid = false;
+ } else {
+ mFlagValid = true;
+ sprintf(mFlagName, "FlagObj%02d", flagNum);
+ int rv = dComIfG_resLoad(&mFlagPhase, mFlagName);
+ if (rv != cPhs_COMPLEATE_e) {
+ return rv;
+ }
+ }
+ int rv = dComIfG_resLoad(&mArcPhase, daSetBgObj_c::getArcName(this));
+ if (rv == cPhs_COMPLEATE_e) {
+ if (fopAcM_entrySolidHeap(this, createSolidHeap, 0x4000) == 0) {
+ return cPhs_ERROR_e;
+ } else {
+ create_init();
+ }
+ }
+ return rv;
+}
+
/* 80BF058C-80BF05AC -00001 0020+00 1/0 0/0 0/0 .data l_daObjFlag3_Method */
static actor_method_class l_daObjFlag3_Method = {
(process_method_func)daObjFlag3_Create,
diff --git a/src/d/actor/d_a_obj_lv6ChangeGate.cpp b/src/d/actor/d_a_obj_lv6ChangeGate.cpp
index 1476f65495..a8a32c086d 100644
--- a/src/d/actor/d_a_obj_lv6ChangeGate.cpp
+++ b/src/d/actor/d_a_obj_lv6ChangeGate.cpp
@@ -8,6 +8,18 @@
#include "d/actor/d_a_obj_lv6ChangeGate.h"
#include "d/d_s_play.h"
+class daLv6ChangeGate_HIO_c : public fOpAcm_HIO_entry_c {
+public:
+ /* 80C70C4C */ daLv6ChangeGate_HIO_c();
+ /* 80C71EE8 */ virtual ~daLv6ChangeGate_HIO_c() {}
+
+ void genMessage(JORMContext*);
+
+ /* 0x4 */ f32 speed;
+ /* 0x8 */ f32 move_amount;
+ /* 0xC */ u8 unk_0xc;
+};
+
/* 80C70C4C-80C70C94 0000EC 0048+00 1/1 0/0 0/0 .text __ct__21daLv6ChangeGate_HIO_cFv */
daLv6ChangeGate_HIO_c::daLv6ChangeGate_HIO_c() {
speed = 10.0f;
diff --git a/src/d/actor/d_a_obj_master_sword.cpp b/src/d/actor/d_a_obj_master_sword.cpp
index 35bf65b0a2..4fb9f50264 100644
--- a/src/d/actor/d_a_obj_master_sword.cpp
+++ b/src/d/actor/d_a_obj_master_sword.cpp
@@ -93,36 +93,6 @@ actionFunc daObjMasterSword_c::ActionTable[] = {
&daObjMasterSword_c::initWait, &daObjMasterSword_c::executeWait,
};
-/* 80C90DB8-80C90F6C 000338 01B4+00 1/1 0/0 0/0 .text create__18daObjMasterSword_cFv */
-int daObjMasterSword_c::create() {
- fopAcM_ct(this, daObjMasterSword_c);
-
- if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[getFlagNo()])) {
- return cPhs_ERROR_e;
- }
-
- int phase = dComIfG_resLoad(&mPhase, l_arcName);
- if (phase == cPhs_COMPLEATE_e) {
- if (!fopAcM_entrySolidHeap(this, daObjMasterSword_c::createHeapCallBack, 0x1830)) {
- return cPhs_ERROR_e;
- }
-
- create_init();
- }
-
- return phase;
-}
-
-void daObjMasterSword_c::callInit() {
- (this->**mActionFunc)();
-}
-
-void daObjMasterSword_c::setAction(daObjMasterSword_c::Mode_e i_mode) {
- mMode = i_mode;
- mActionFunc = &ActionTable[2 * mMode];
- callInit();
-}
-
void daObjMasterSword_c::initCollision() {
static dCcD_SrcCyl ccCylSrc = {
{
@@ -143,6 +113,16 @@ void daObjMasterSword_c::initCollision() {
mCyl.SetStts(&mCcStts);
}
+void daObjMasterSword_c::callInit() {
+ (this->**mActionFunc)();
+}
+
+void daObjMasterSword_c::setAction(daObjMasterSword_c::Mode_e i_mode) {
+ mMode = i_mode;
+ mActionFunc = &ActionTable[2 * mMode];
+ callInit();
+}
+
/* 80C90F6C-80C9120C 0004EC 02A0+00 1/1 0/0 0/0 .text create_init__18daObjMasterSword_cFv */
void daObjMasterSword_c::create_init() {
fopAcM_setCullSizeBox2(this, mpModel->getModelData());
@@ -170,6 +150,26 @@ void daObjMasterSword_c::create_init() {
setAction(MODE_0_e);
}
+/* 80C90DB8-80C90F6C 000338 01B4+00 1/1 0/0 0/0 .text create__18daObjMasterSword_cFv */
+int daObjMasterSword_c::create() {
+ fopAcM_ct(this, daObjMasterSword_c);
+
+ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[getFlagNo()])) {
+ return cPhs_ERROR_e;
+ }
+
+ int phase = dComIfG_resLoad(&mPhase, l_arcName);
+ if (phase == cPhs_COMPLEATE_e) {
+ if (!fopAcM_entrySolidHeap(this, daObjMasterSword_c::createHeapCallBack, 0x1830)) {
+ return cPhs_ERROR_e;
+ }
+
+ create_init();
+ }
+
+ return phase;
+}
+
/* 80C91420-80C91448 0009A0 0028+00 1/0 0/0 0/0 .text daObjMasterSword_Delete__FP18daObjMasterSword_c */
static int daObjMasterSword_Delete(daObjMasterSword_c* i_this) {
i_this->~daObjMasterSword_c();
diff --git a/src/d/actor/d_a_obj_swhang.cpp b/src/d/actor/d_a_obj_swhang.cpp
index d243500f4a..0ec57e76d1 100644
--- a/src/d/actor/d_a_obj_swhang.cpp
+++ b/src/d/actor/d_a_obj_swhang.cpp
@@ -10,6 +10,7 @@
#include "d/actor/d_a_player.h"
#include "d/d_bg_w.h"
#include "d/d_com_inf_game.h"
+#include "d/d_s_play.h"
// NONMATCHING - dEvLib_callback_c issues
@@ -41,7 +42,8 @@ static u32 const l_heap_size[5] = {
/* 80CFB938-80CFB9D8 000078 00A0+00 1/1 0/0 0/0 .text nodeCallBack__FP8J3DJointi */
static int nodeCallBack(J3DJoint* pJoint, int param_2) {
if (param_2 == 0) {
- int jntNo = pJoint->getJntNo();
+ J3DJoint* my_joint = pJoint;
+ int jntNo = my_joint->getJntNo();
J3DModel* model = j3dSys.getModel();
daObjSwHang_c* i_this = (daObjSwHang_c*)model->getUserArea();
cMtx_copy(model->getAnmMtx(jntNo), mDoMtx_stack_c::get());
@@ -65,8 +67,9 @@ void daObjSwHang_c::initBaseMtx() {
/* 80CFBA60-80CFBAC8 0001A0 0068+00 2/2 0/0 0/0 .text setBaseMtx__13daObjSwHang_cFv */
void daObjSwHang_c::setBaseMtx() {
+ f32 hang_length = mHangLength + KREG_F(10);
mDoMtx_stack_c::transS(current.pos.x,
- current.pos.y - mHangLength,
+ current.pos.y - hang_length,
current.pos.z);
mDoMtx_stack_c::YrotM(shape_angle.y);
MTXCopy(mDoMtx_stack_c::get(), mBgMtx);
@@ -110,7 +113,6 @@ static dCcD_SrcSph l_sph_src = {
};
/* 80CFD37C-80CFD3BC 0000C4 0040+00 0/1 0/0 0/0 .data l_sph_src2 */
-#pragma force_active on
static dCcD_SrcSph l_sph_src2 = {
{
{0x0, {{0x0, 0x0, 0x0}, {0x4000, 0x11}, 0x18}}, // mObj
@@ -134,7 +136,7 @@ int daObjSwHang_c::Create() {
}
initBaseMtx();
if (mpBgW != NULL) {
- dComIfG_Bgsp().Regist(mpBgW, this);
+ bool unused_r25 = dComIfG_Bgsp().Regist(mpBgW, this);
mpBgW->Move();
}
fopAcM_SetMtx(this, mpModel->getBaseTRMtx());
@@ -499,7 +501,7 @@ int daObjSwHang_c::Draw() {
/* 80CFCD98-80CFCE0C 0014D8 0074+00 1/0 0/0 0/0 .text Delete__13daObjSwHang_cFv */
int daObjSwHang_c::Delete() {
if (mpBgW != NULL && mpBgW->ChkUsed()) {
- dComIfG_Bgsp().Release(mpBgW);
+ bool unused_r29 = dComIfG_Bgsp().Release(mpBgW);
}
dComIfG_resDelete(&mPhase, l_arcName[mType]);
return 1;
@@ -525,7 +527,7 @@ static int daObjSwHang_MoveBGExecute(daObjSwHang_c* i_this) {
/* 80CFCF60-80CFCF8C 0016A0 002C+00 1/0 0/0 0/0 .text daObjSwHang_MoveBGDraw__FP13daObjSwHang_c */
static int daObjSwHang_MoveBGDraw(daObjSwHang_c* i_this) {
- return i_this->Draw();
+ return i_this->MoveBGDraw();
}
static void dummy() {
diff --git a/src/d/actor/d_a_obj_waterPillar.cpp b/src/d/actor/d_a_obj_waterPillar.cpp
index 03fe292b9a..8e931a02f7 100644
--- a/src/d/actor/d_a_obj_waterPillar.cpp
+++ b/src/d/actor/d_a_obj_waterPillar.cpp
@@ -11,7 +11,7 @@
struct daWtPillar_HIO_c : public mDoHIO_entry_c {
/* 80D2C6CC */ daWtPillar_HIO_c();
- /* 80D2DF34 */ virtual ~daWtPillar_HIO_c();
+ /* 80D2DF34 */ virtual ~daWtPillar_HIO_c() {}
void genMessage(JORMContext*);
@@ -228,8 +228,8 @@ int daWtPillar_c::execute() {
effectSet();
effectSet2();
- mScaleX = scale.x;
- mScaleZ = scale.z;
+ mScale.x = scale.x;
+ mScale.z = scale.z;
cXyz currentHeightVector(0.0f, 1.0f, 0.0f);
currentHeightVector.y *= mCurrentHeight;
@@ -606,18 +606,6 @@ int daWtPillar_Create(fopAc_ac_c* i_this) {
return static_cast<daWtPillar_c*>(i_this)->create();
}
-daWtPillar_HIO_c::~daWtPillar_HIO_c() {
-}
-
-/* 80D2E054-80D2E21C 001A74 01C8+00 1/1 0/0 0/0 .text __ct__12daWtPillar_cFv */
-daWtPillar_c::daWtPillar_c() : dEvLib_callback_c(this) {
- // Empty
- // Having this in the header file results in inlining...
-}
-
-daWtPillar_c::~daWtPillar_c() {
-}
-
/* 80D2EA14-80D2EA34 -00001 0020+00 1/0 0/0 0/0 .data l_daWtPillar_Method */
actor_method_class l_daWtPillar_Method = {
(process_method_func)daWtPillar_Create,