summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Roncace <me@caseif.net>2025-12-22 18:41:19 -0500
committerGitHub <noreply@github.com>2025-12-22 15:41:19 -0800
commit9767e76ba049ce20ac0d2236758f050bcd36d90f (patch)
tree30519a089779dd789f5564adef5afb27a163a190 /src
parent8fece471c6d5203aa09d5c280584096adc1b8539 (diff)
GCN data 100% matching (#2987)
* Update GZ2J01 symbols from linked DOL * GCN data 100% matching * Run dtk apply
Diffstat (limited to 'src')
-rw-r--r--src/JSystem/J3DGraphBase/J3DMatBlock.cpp2
-rw-r--r--src/JSystem/JAudio2/JASDrumSet.cpp14
-rw-r--r--src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/alloc.c1
-rw-r--r--src/d/actor/d_a_alink_crawl.inc12
-rw-r--r--src/d/actor/d_a_b_bq.cpp84
-rw-r--r--src/d/actor/d_a_b_tn.cpp8
-rw-r--r--src/d/actor/d_a_door_knob00.cpp76
-rw-r--r--src/d/actor/d_a_door_push.cpp4
-rw-r--r--src/d/actor/d_a_e_dd.cpp22
-rw-r--r--src/d/actor/d_a_e_dk.cpp3
-rw-r--r--src/d/actor/d_a_e_oct_bg.cpp105
-rw-r--r--src/d/actor/d_a_e_sg.cpp8
-rw-r--r--src/d/actor/d_a_e_tk.cpp24
-rw-r--r--src/d/actor/d_a_e_tk2.cpp24
-rw-r--r--src/d/actor/d_a_e_tk_ball.cpp2
-rw-r--r--src/d/actor/d_a_e_yd.cpp8
-rw-r--r--src/d/actor/d_a_e_yk.cpp12
-rw-r--r--src/d/actor/d_a_hitobj.cpp26
-rw-r--r--src/d/actor/d_a_hozelda.cpp2
-rw-r--r--src/d/actor/d_a_midna.cpp2
-rw-r--r--src/d/actor/d_a_npc_du.cpp2
-rw-r--r--src/d/actor/d_a_npc_lf.cpp20
-rw-r--r--src/d/actor/d_a_npc_tk.cpp8
-rw-r--r--src/d/actor/d_a_npc_tr.cpp8
-rw-r--r--src/d/actor/d_a_obj_Y_taihou.cpp15
-rw-r--r--src/d/actor/d_a_obj_barDesk.cpp2
-rw-r--r--src/d/actor/d_a_obj_boumato.cpp20
-rw-r--r--src/d/actor/d_a_obj_cb.cpp8
-rw-r--r--src/d/actor/d_a_obj_cblock.cpp4
-rw-r--r--src/d/actor/d_a_obj_crope.cpp14
-rw-r--r--src/d/actor/d_a_obj_dmelevator.cpp10
-rw-r--r--src/d/actor/d_a_obj_fan.cpp28
-rw-r--r--src/d/actor/d_a_obj_ladder.cpp81
-rw-r--r--src/d/actor/d_a_obj_lbox.cpp32
-rw-r--r--src/d/actor/d_a_obj_myogan.cpp8
-rw-r--r--src/d/actor/d_a_obj_nan.cpp8
-rw-r--r--src/d/actor/d_a_obj_octhashi.cpp28
-rw-r--r--src/d/actor/d_a_obj_riverrock.cpp8
-rw-r--r--src/d/actor/d_a_obj_rock.cpp24
-rw-r--r--src/d/actor/d_a_obj_so.cpp10
-rw-r--r--src/d/actor/d_a_obj_ten.cpp8
-rw-r--r--src/d/actor/d_a_obj_web0.cpp8
-rw-r--r--src/d/actor/d_a_obj_web1.cpp8
-rw-r--r--src/d/actor/d_a_obj_wflag.cpp6
-rw-r--r--src/d/actor/d_a_obj_ystone.cpp24
-rw-r--r--src/d/actor/d_a_tag_kago_fall.cpp2
-rw-r--r--src/d/actor/d_a_tag_statue_evt.cpp52
-rw-r--r--src/d/d_msg_scrn_staff.cpp8
48 files changed, 441 insertions, 452 deletions
diff --git a/src/JSystem/J3DGraphBase/J3DMatBlock.cpp b/src/JSystem/J3DGraphBase/J3DMatBlock.cpp
index 6aa780fdfe..6256c376af 100644
--- a/src/JSystem/J3DGraphBase/J3DMatBlock.cpp
+++ b/src/JSystem/J3DGraphBase/J3DMatBlock.cpp
@@ -295,8 +295,6 @@ static u32 SizeOfLoadAmbColors = 13;
static u32 SizeOfLoadColorChans = 21;
-static u8 sdata_padding[4] = {};
-
static u32 SizeOfJ3DColorBlockLightOffLoad = SizeOfLoadMatColors + SizeOfLoadColorChans;
void J3DColorBlockLightOff::load() {
diff --git a/src/JSystem/JAudio2/JASDrumSet.cpp b/src/JSystem/JAudio2/JASDrumSet.cpp
index 9f9ec63059..1aca5e0cf8 100644
--- a/src/JSystem/JAudio2/JASDrumSet.cpp
+++ b/src/JSystem/JAudio2/JASDrumSet.cpp
@@ -21,13 +21,11 @@ void JASDrumSet::newPercArray(u8 param_0, JKRHeap* param_1) {
}
}
-static JASOscillator::Data osc;
-
-static JASOscillator::Data* oscp;
-
-static s8 data_80451274[4];
-
bool JASDrumSet::getParam(int param_0, int param_1, JASInstParam* param_2) const {
+ static JASOscillator::Data osc;
+ static JASOscillator::Data* oscp;
+ static s8 data_80451274;
+
if (field_0x4 == NULL) {
return false;
}
@@ -54,9 +52,9 @@ bool JASDrumSet::getParam(int param_0, int param_1, JASInstParam* param_2) const
osc.mScale = 1.0f;
osc._14 = 0.0f;
- if (data_80451274[0] == 0) {
+ if (data_80451274 == 0) {
oscp = &osc;
- data_80451274[0] = 1;
+ data_80451274 = 1;
}
param_2->field_0x14 = &oscp;
diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/alloc.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/alloc.c
index 7c34f725b3..3ed7a41667 100644
--- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/alloc.c
+++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/alloc.c
@@ -83,7 +83,6 @@ typedef struct mem_pool_obj {
} mem_pool_obj;
mem_pool_obj __malloc_pool;
-static int initialized = 0;
static SubBlock* SubBlock_merge_prev(SubBlock*, SubBlock**);
static void SubBlock_merge_next(SubBlock*, SubBlock**);
diff --git a/src/d/actor/d_a_alink_crawl.inc b/src/d/actor/d_a_alink_crawl.inc
index dc7d4b5f8f..f456c70b67 100644
--- a/src/d/actor/d_a_alink_crawl.inc
+++ b/src/d/actor/d_a_alink_crawl.inc
@@ -24,8 +24,8 @@ f32 daAlink_c::getCrawlMoveSpeed() {
}
void daAlink_c::setCrawlMoveDirectionArrow() {
- static const u8 data_80452F38[1] = {1};
- static const u8 data_80452F39[1] = {4};
+ static const u8 data_80452F38 = 1;
+ static const u8 data_80452F39 = 4;
u8 direction = 0;
camera_class* camera = (camera_class*)dComIfGp_getCamera(field_0x317c);
@@ -33,17 +33,17 @@ void daAlink_c::setCrawlMoveDirectionArrow() {
if (field_0x3198 & 4) {
if (!bvar) {
- direction = *data_80452F38;
+ direction |= data_80452F38;
} else {
- direction = *data_80452F39;
+ direction |= data_80452F39;
}
}
if (field_0x3198 & 8) {
if (!bvar) {
- direction |= *data_80452F39;
+ direction |= data_80452F39;
} else {
- direction |= *data_80452F38;
+ direction |= data_80452F38;
}
}
diff --git a/src/d/actor/d_a_b_bq.cpp b/src/d/actor/d_a_b_bq.cpp
index 50ec729841..45927b3f49 100644
--- a/src/d/actor/d_a_b_bq.cpp
+++ b/src/d/actor/d_a_b_bq.cpp
@@ -1444,11 +1444,11 @@ static void demo_camera(b_bq_class* i_this) {
i_this->mDemoCamEyeTarget.set(240.0f, 274.0f, 2075.0f);
i_this->field_0x1288.x =
- fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x);
+ std::fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x);
i_this->field_0x1288.y =
- fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y);
+ std::fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y);
i_this->field_0x1288.z =
- fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z);
+ std::fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z);
}
spFC.set(0.0f, 0.0f, 1700.0f);
@@ -1478,16 +1478,16 @@ static void demo_camera(b_bq_class* i_this) {
i_this->mDemoCamCenterTarget.set(76.0f, 204.0f, 1782.0f);
i_this->mDemoCamEyeTarget.set(-41.0f, 261.0f, 2095.0f);
- i_this->field_0x127c.x = fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x);
- i_this->field_0x127c.y = fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y);
- i_this->field_0x127c.z = fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z);
+ i_this->field_0x127c.x = std::fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x);
+ i_this->field_0x127c.y = std::fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y);
+ i_this->field_0x127c.z = std::fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z);
i_this->field_0x1288.x =
- fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x);
+ std::fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x);
i_this->field_0x1288.y =
- fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y);
+ std::fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y);
i_this->field_0x1288.z =
- fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z);
+ std::fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z);
i_this->field_0x129c = 0.0f;
i_this->mDemoMode = 12;
@@ -1584,16 +1584,16 @@ static void demo_camera(b_bq_class* i_this) {
i_this->mDemoCamCenterTarget.set(0.0f, 278.0f, 1252.0f);
i_this->mDemoCamEyeTarget.set(0.0f, 86.0f, 2167.0f);
- i_this->field_0x127c.x = fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x);
- i_this->field_0x127c.y = fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y);
- i_this->field_0x127c.z = fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z);
+ i_this->field_0x127c.x = std::fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x);
+ i_this->field_0x127c.y = std::fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y);
+ i_this->field_0x127c.z = std::fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z);
i_this->field_0x1288.x =
- fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x);
+ std::fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x);
i_this->field_0x1288.y =
- fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y);
+ std::fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y);
i_this->field_0x1288.z =
- fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z);
+ std::fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z);
i_this->field_0x129c = 0.0f;
i_this->mDemoMode = 14;
@@ -1741,16 +1741,16 @@ static void demo_camera(b_bq_class* i_this) {
i_this->mDemoCamCenterTarget.set(-2243.0f, 1340.0f, 977.0f);
i_this->mDemoCamEyeTarget.set(-1226.0f, 980.0f, 1350.0f);
- i_this->field_0x127c.x = fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x);
- i_this->field_0x127c.y = fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y);
- i_this->field_0x127c.z = fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z);
+ i_this->field_0x127c.x = std::fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x);
+ i_this->field_0x127c.y = std::fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y);
+ i_this->field_0x127c.z = std::fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z);
i_this->field_0x1288.x =
- fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x);
+ std::fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x);
i_this->field_0x1288.y =
- fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y);
+ std::fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y);
i_this->field_0x1288.z =
- fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z);
+ std::fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z);
i_this->field_0x129c = 0.0f;
i_this->mDemoMode = 34;
@@ -1814,9 +1814,9 @@ static void demo_camera(b_bq_class* i_this) {
i_this->mDemoCamEye.set(95.0f, 50.0f, 2800.0f);
i_this->mDemoCamEyeTarget.set(72.0f, 52.0f, 2153.0f);
- i_this->field_0x127c.x = fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x);
- i_this->field_0x127c.y = fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y);
- i_this->field_0x127c.z = fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z);
+ i_this->field_0x127c.x = std::fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x);
+ i_this->field_0x127c.y = std::fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y);
+ i_this->field_0x127c.z = std::fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z);
i_this->field_0x1288.set(0.0f, 0.0f, 0.0f);
i_this->field_0x129c = 0.0f;
@@ -1973,18 +1973,18 @@ static void demo_camera(b_bq_class* i_this) {
i_this->mDemoCamEyeTarget.set(1214.0f, 350.0f, 2696.0f);
i_this->field_0x127c.x =
- fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x);
+ std::fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x);
i_this->field_0x127c.y =
- fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y);
+ std::fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y);
i_this->field_0x127c.z =
- fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z);
+ std::fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z);
i_this->field_0x1288.x =
- fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x);
+ std::fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x);
i_this->field_0x1288.y =
- fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y);
+ std::fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y);
i_this->field_0x1288.z =
- fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z);
+ std::fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z);
i_this->field_0x129c = 0.0f;
} else if (i_this->mDemoModeTimer < 140) {
@@ -1993,18 +1993,18 @@ static void demo_camera(b_bq_class* i_this) {
i_this->mDemoCamEyeTarget.set(23.0f, 108.0f, 2155.0f);
i_this->field_0x127c.x =
- fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x);
+ std::fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x);
i_this->field_0x127c.y =
- fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y);
+ std::fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y);
i_this->field_0x127c.z =
- fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z);
+ std::fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z);
i_this->field_0x1288.x =
- fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x);
+ std::fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x);
i_this->field_0x1288.y =
- fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y);
+ std::fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y);
i_this->field_0x1288.z =
- fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z);
+ std::fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z);
}
cam_3d_morf(i_this, 0.1f);
@@ -2042,18 +2042,18 @@ static void demo_camera(b_bq_class* i_this) {
i_this->mDemoCamEyeTarget.set(953.0f, 997.0f, -36.0f);
i_this->field_0x127c.x =
- fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x);
+ std::fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x);
i_this->field_0x127c.y =
- fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y);
+ std::fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y);
i_this->field_0x127c.z =
- fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z);
+ std::fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z);
i_this->field_0x1288.x =
- fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x);
+ std::fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x);
i_this->field_0x1288.y =
- fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y);
+ std::fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y);
i_this->field_0x1288.z =
- fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z);
+ std::fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z);
cXyz pos(0.0f, 0.0f, 0.0f);
for (int i = 0; i < 5; i++) {
diff --git a/src/d/actor/d_a_b_tn.cpp b/src/d/actor/d_a_b_tn.cpp
index b3e1e19328..a6dcbf5e42 100644
--- a/src/d/actor/d_a_b_tn.cpp
+++ b/src/d/actor/d_a_b_tn.cpp
@@ -1553,7 +1553,7 @@ bool daB_TN_c::checkMoveAngle() {
}
void daB_TN_c::setAttackBlurEffect(int i_data) {
- static u16 blur_effect_id_5997[4] = {
+ static u16 blur_effect_id[4] = {
0x87DA,
0x87DB,
0x87DC,
@@ -1562,7 +1562,7 @@ void daB_TN_c::setAttackBlurEffect(int i_data) {
if (i_data != 0) {
for (int i = 0; i < 4; i++) {
- mParticleKeys[i] = dComIfGp_particle_set(mParticleKeys[i], blur_effect_id_5997[i],
+ mParticleKeys[i] = dComIfGp_particle_set(mParticleKeys[i], blur_effect_id[i],
&current.pos, &tevStr);
JPABaseEmitter* mBaseEmitter = dComIfGp_particle_getEmitter(mParticleKeys[i]);
@@ -1574,7 +1574,7 @@ void daB_TN_c::setAttackBlurEffect(int i_data) {
}
void daB_TN_c::setArmorBreakEffect(int i_idx) {
- static u16 blur_effect_id_6035[3] = {0x87DE, 0x87DF, 0x87E0};
+ static u16 blur_effect_id[3] = {0x87DE, 0x87DF, 0x87E0};
cXyz sp24(l_HIO.mScale, l_HIO.mScale, l_HIO.mScale);
cXyz sp30;
@@ -1582,7 +1582,7 @@ void daB_TN_c::setArmorBreakEffect(int i_idx) {
mDoMtx_stack_c::multVecZero(&sp30);
for (int i = 0; i < 3; i++) {
- dComIfGp_particle_set(blur_effect_id_6035[i], &sp30, &tevStr, &shape_angle, &sp24);
+ dComIfGp_particle_set(blur_effect_id[i], &sp30, &tevStr, &shape_angle, &sp24);
}
}
diff --git a/src/d/actor/d_a_door_knob00.cpp b/src/d/actor/d_a_door_knob00.cpp
index 74ddce445c..0803abd9c7 100644
--- a/src/d/actor/d_a_door_knob00.cpp
+++ b/src/d/actor/d_a_door_knob00.cpp
@@ -51,9 +51,9 @@ char* daKnob20_c::getDummyBmd() {
static char* l_bmd_base_name = "door-knob_";
-static char l_bmdName[32];
-
char* daKnob20_c::getBmd() {
+ static char l_bmdName[32];
+
sprintf(l_bmdName, "%s%02d.bmd", l_bmd_base_name, knob_param_c::getDoorModel(this));
return l_bmdName;
}
@@ -192,17 +192,17 @@ void daKnob20_c::setActionFromFlow() {
}
}
-static char* ev_name_table[7] = {
- "DEFAULT_KNOB_DOOR_F_OPEN",
- "DEFAULT_KNOB_DOOR_B_OPEN",
- "DEFAULT_KNOB_TALK",
- "DEFAULT_KNOB_TALK_B",
- "DEFAULT_KNOB_TALK_F_OPEN",
- "DEFAULT_KNOB_TALK_B_OPEN",
- "DEFAULT_KNOB_TALK",
-};
-
void daKnob20_c::setEventId() {
+ static char* ev_name_table[7] = {
+ "DEFAULT_KNOB_DOOR_F_OPEN",
+ "DEFAULT_KNOB_DOOR_B_OPEN",
+ "DEFAULT_KNOB_TALK",
+ "DEFAULT_KNOB_TALK_B",
+ "DEFAULT_KNOB_TALK_F_OPEN",
+ "DEFAULT_KNOB_TALK_B_OPEN",
+ "DEFAULT_KNOB_TALK",
+ };
+
for (int i = 0; i < 7; i++) {
field_0x5b2[i] = 0xff;
field_0x5a4[i] =
@@ -294,26 +294,26 @@ int daKnob20_c::frontCheck() {
return 1;
}
-static char* action_table[16] = {
- "WAIT",
- "SETSTART",
- "SETANGLE",
- "ADJUSTMENT",
- "OPEN_PUSH",
- "OPEN_PULL",
- "OPEN_PUSH2",
- "OPEN_PULL2",
- "OPEN_PUSH_STOP",
- "OPEN_PULL_STOP",
- "TALK",
- "TALK_END",
- "SETSTART_PUSH",
- "SETSTART_PULL",
- "DEMO_OPEN",
- "DEMO_CLOSE",
-};
-
int daKnob20_c::getDemoAction() {
+ static char* action_table[16] = {
+ "WAIT",
+ "SETSTART",
+ "SETANGLE",
+ "ADJUSTMENT",
+ "OPEN_PUSH",
+ "OPEN_PULL",
+ "OPEN_PUSH2",
+ "OPEN_PULL2",
+ "OPEN_PUSH_STOP",
+ "OPEN_PULL_STOP",
+ "TALK",
+ "TALK_END",
+ "SETSTART_PUSH",
+ "SETSTART_PULL",
+ "DEMO_OPEN",
+ "DEMO_CLOSE",
+ };
+
return dComIfGp_evmng_getMyActIdx(field_0x5bc, action_table, 16, 0, 0);
}
@@ -461,14 +461,14 @@ int daKnob20_c::adjustmentProc() {
return 0;
}
-static char* bck_table[4] = {
- "FDoorA.bck",
- "FDoorB.bck",
- "FDoorA.bck",
- "FDoorB.bck",
-};
-
int daKnob20_c::openInit(int param_1) {
+ static char* bck_table[4] = {
+ "FDoorA.bck",
+ "FDoorB.bck",
+ "FDoorA.bck",
+ "FDoorB.bck",
+ };
+
J3DAnmTransform* anm =
(J3DAnmTransform*)dComIfG_getObjectRes(getAlwaysArcName(), bck_table[param_1]);
JUT_ASSERT(937, anm != NULL);
diff --git a/src/d/actor/d_a_door_push.cpp b/src/d/actor/d_a_door_push.cpp
index 4d348b0db4..82634f0585 100644
--- a/src/d/actor/d_a_door_push.cpp
+++ b/src/d/actor/d_a_door_push.cpp
@@ -228,9 +228,9 @@ void daDoorPush_c::actionEvent() {
demoProc();
}
-static char* action_table[3] = {"WAIT", "OPEN", "SCENE_CHG"};
-
int daDoorPush_c::demoProc() {
+ static char* action_table[3] = {"WAIT", "OPEN", "SCENE_CHG"};
+
daPy_py_c* player = daPy_getPlayerActorClass();
field_0x644 = dComIfGp_evmng_getMyStaffId("pdoor", NULL, 0);
diff --git a/src/d/actor/d_a_e_dd.cpp b/src/d/actor/d_a_e_dd.cpp
index 3cbb299229..556a1cd70e 100644
--- a/src/d/actor/d_a_e_dd.cpp
+++ b/src/d/actor/d_a_e_dd.cpp
@@ -1340,11 +1340,11 @@ static void anm_se_set(e_dd_class* i_this) {
if ((i_this->mAnm == BCK_DD_FIRE_A && i_this->mpModelMorf->getFrame() >= 44.0f) || i_this->mAnm == BCK_DD_FIRE_B) {
for (int i = 0; i < 4; i++) {
- static u16 fire_eff_name_0[4] = {
+ static u16 fire_eff_name[4] = {
0x846C, 0x846D, 0x846E, 0x846F,
};
- i_this->field_0xe68[i] = dComIfGp_particle_set(i_this->field_0xe68[i], fire_eff_name_0[i], &a_this->current.pos, NULL, NULL);
+ i_this->field_0xe68[i] = dComIfGp_particle_set(i_this->field_0xe68[i], fire_eff_name[i], &a_this->current.pos, NULL, NULL);
JPABaseEmitter* fire_emitter = dComIfGp_particle_getEmitter(i_this->field_0xe68[i]);
if (fire_emitter != NULL) {
fire_emitter->setGlobalSRTMatrix(i_this->mpModelMorf->getModel()->getAnmMtx(JNT_NECK));
@@ -1362,11 +1362,11 @@ static void anm_se_set(e_dd_class* i_this) {
if (i_this->mAnm == BCK_DD_FIRE_A) {
for (int i = 0; i < 2; i++) {
- static u16 fire_eff_name_1[2] = {
+ static u16 fire_eff_name[2] = {
0x8471, 0x8472,
};
- i_this->field_0xe7c[i] = dComIfGp_particle_set(i_this->field_0xe7c[i], fire_eff_name_1[i], &a_this->current.pos, NULL, NULL);
+ i_this->field_0xe7c[i] = dComIfGp_particle_set(i_this->field_0xe7c[i], fire_eff_name[i], &a_this->current.pos, NULL, NULL);
JPABaseEmitter* emitter_4 = dComIfGp_particle_getEmitter(i_this->field_0xe7c[i]);
if (emitter_4 != NULL) {
emitter_4->setGlobalSRTMatrix(i_this->mpModelMorf->getModel()->getAnmMtx(i + 10));
@@ -1620,15 +1620,15 @@ static int useHeapInit(fopAc_ac_c* a_this) {
return 1;
}
-static int kabe_initial_pos_set(e_dd_class* i_this) {
- static s16 ya[5] = {
- -0x4000, 0x4000, 0x0000, -0x8000, 0x0000,
- };
+static s16 ya[5] = {
+ -0x4000, 0x4000, 0x0000, -0x8000, 0x0000,
+};
- static s16 xa[5] = {
- -0x4000, -0x4000, -0x4000, -0x4000, -0x8000,
- };
+static s16 xa[5] = {
+ -0x4000, -0x4000, -0x4000, -0x4000, -0x8000,
+};
+static int kabe_initial_pos_set(e_dd_class* i_this) {
fopAc_ac_c* a_this = &i_this->actor;
dBgS_LinChk lin_chk;
cXyz sp98, start, end;
diff --git a/src/d/actor/d_a_e_dk.cpp b/src/d/actor/d_a_e_dk.cpp
index 9a36c2d66f..e27eb54b09 100644
--- a/src/d/actor/d_a_e_dk.cpp
+++ b/src/d/actor/d_a_e_dk.cpp
@@ -43,7 +43,7 @@ enum E_DK_RES_FILE_ID {
/* 0x1B */ BTK_DK_WAIT,
};
-
+namespace {
static dCcD_SrcSph cc_dk_src = {
{ // mObjInf
{ 0x0, { { 0, 0, { 0 } }, { (s32)0xd8fbbddf, { 3 } }, { { 0x75 } } } }, // mObj
@@ -73,6 +73,7 @@ static dCcD_SrcSph cc_dk_core_src = {
},
{ { { 0.0f, 0.0f, 0.0f }, 40.0f, } } // mSphAttr
};
+}
daE_DK_HIO_c::daE_DK_HIO_c() {
field_0x4 = -1;
diff --git a/src/d/actor/d_a_e_oct_bg.cpp b/src/d/actor/d_a_e_oct_bg.cpp
index d7af586cf9..6b549a19f6 100644
--- a/src/d/actor/d_a_e_oct_bg.cpp
+++ b/src/d/actor/d_a_e_oct_bg.cpp
@@ -175,41 +175,42 @@ static int daE_OctBg_Delete(daE_OctBg_c* i_this) {
/* 8073A14C 0024+01 data_8073A14C l_HIO */
/* 8073A171 0001+00 data_8073A171 None */
/* 8073A172 0002+00 data_8073A172 None */
-static daE_OctBg_HIO_c struct_8073A14C;
-static u8 struct_8073A14C_field_0x23;
-static u8 struct_8073A14C_field_0x24;
-static u8 struct_8073A14C_field_0x25;
-static u8 struct_8073A14C_field_0x26;
+static daE_OctBg_HIO_c l_HIO;
+
+u8 unk_bss_78;
+u8 unk_bss_79;
+u8 unk_bss_7A;
+u8 unk_bss_7B;
void daE_OctBg_c::cc_set() {
cXyz cStack_1c;
cXyz cStack_28;
J3DModel* model = field_0x5b4->getModel();
mDoMtx_stack_c::copy(model->getAnmMtx(0));
- cStack_1c.set(0.0f, struct_8073A14C.field_0x18 * 25.0f, 0.0f);
+ cStack_1c.set(0.0f, l_HIO.field_0x18 * 25.0f, 0.0f);
mDoMtx_stack_c::multVec(&cStack_1c, &eyePos);
attention_info.position = eyePos;
- attention_info.position.y += struct_8073A14C.field_0x18 * 25.0f;
+ attention_info.position.y += l_HIO.field_0x18 * 25.0f;
mDoMtx_stack_c::copy(model->getAnmMtx(0));
- cStack_1c.set(0.0f, struct_8073A14C.field_0x18 * 25.0f, 0.0f);
+ cStack_1c.set(0.0f, l_HIO.field_0x18 * 25.0f, 0.0f);
mDoMtx_stack_c::multVec(&cStack_1c, &cStack_28);
field_0x8c0.SetC(cStack_28);
- field_0x8c0.SetR(struct_8073A14C.field_0x18 * 35.0f);
+ field_0x8c0.SetR(l_HIO.field_0x18 * 35.0f);
dComIfG_Ccsp()->Set(&field_0x8c0);
mDoMtx_stack_c::copy(model->getAnmMtx(0));
- cStack_1c.set(0.0f, struct_8073A14C.field_0x18 * 25.0f, struct_8073A14C.field_0x18 * 20.0f);
+ cStack_1c.set(0.0f, l_HIO.field_0x18 * 25.0f, l_HIO.field_0x18 * 20.0f);
mDoMtx_stack_c::multVec(&cStack_1c, &cStack_28);
field_0x9f8.SetC(cStack_28);
- field_0x9f8.SetR(struct_8073A14C.field_0x18 * 20.0f);
+ field_0x9f8.SetR(l_HIO.field_0x18 * 20.0f);
dComIfG_Ccsp()->Set(&field_0x9f8);
}
void daE_OctBg_c::mtx_set() {
mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z);
- mDoMtx_stack_c::transM(0.0f, struct_8073A14C.field_0x18 * 25.0f, 0.0f);
+ mDoMtx_stack_c::transM(0.0f, l_HIO.field_0x18 * 25.0f, 0.0f);
mDoMtx_stack_c::ZXYrotM(shape_angle.x, shape_angle.y, shape_angle.z);
- mDoMtx_stack_c::transM(0.0f, struct_8073A14C.field_0x18 * -25.0f, 0.0f);
- mDoMtx_stack_c::scaleM(struct_8073A14C.field_0x18, struct_8073A14C.field_0x18, struct_8073A14C.field_0x18);
+ mDoMtx_stack_c::transM(0.0f, l_HIO.field_0x18 * -25.0f, 0.0f);
+ mDoMtx_stack_c::scaleM(l_HIO.field_0x18, l_HIO.field_0x18, l_HIO.field_0x18);
J3DModel* model = field_0x5b4->getModel();
model->setBaseTRMtx(mDoMtx_stack_c::get());
for (u16 i = 1; i < model->getModelData()->getJointNum(); i++) {
@@ -226,9 +227,9 @@ bool daE_OctBg_c::checkNormalAttack() {
if (dComIfGp_event_runCheck() != 0) {
return false;
}
- if (struct_8073A14C_field_0x25 < struct_8073A14C.field_0x20 &&
- home.pos.absXZ(player->current.pos) < struct_8073A14C.field_0x08 &&
- player->current.pos.y < struct_8073A14C.field_0x0c &&
+ if (unk_bss_7A < l_HIO.field_0x20 &&
+ home.pos.absXZ(player->current.pos) < l_HIO.field_0x08 &&
+ player->current.pos.y < l_HIO.field_0x0c &&
!fopAcM_otherBgCheck(this, player))
{
s16 targetAngle = cLib_targetAngleY(&current.pos, &player->current.pos);
@@ -242,12 +243,12 @@ bool daE_OctBg_c::checkNormalAttack() {
bool daE_OctBg_c::checkChase() {
if (field_0xbac == 0) {
return false;
- }
+ }
fopAc_ac_c* actor;
if (fopAcM_SearchByID(fopAcM_GetLinkId(this), &actor) == 0 || actor == NULL) {
field_0xbac = 0;
- struct_8073A14C_field_0x24--;
+ unk_bss_79--;
return false;
}
return true;
@@ -290,7 +291,7 @@ void daE_OctBg_c::swim() {
if (field_0xb70 == 0) {
field_0xb8c = 0;
field_0xb82 = 0xc00;
- if (current.pos.absXZ(home.pos) < (struct_8073A14C.field_0x08 - 100.0f)) {
+ if (current.pos.absXZ(home.pos) < (l_HIO.field_0x08 - 100.0f)) {
field_0xb96 = current.angle.y - 0x8000 + cM_rndFX(16384.0f);
} else {
field_0xb96 = cLib_targetAngleY(&current.pos, &home.pos) + cM_rndFX(8192.0f);
@@ -307,7 +308,7 @@ void daE_OctBg_c::swim() {
if (checkNormalAttack()) {
setAction(&daE_OctBg_c::normal_attack);
} else {
- if (field_0x660.y > (home.pos.y + struct_8073A14C.field_0x0c) - 100.0f) {
+ if (field_0x660.y > (home.pos.y + l_HIO.field_0x0c) - 100.0f) {
field_0x660.y = current.pos.y - cM_rndF(2000.0f);
}
cXyz cStack_58(current.pos);
@@ -325,14 +326,14 @@ void daE_OctBg_c::swim() {
field_0xb8c = field_0xb96 - current.angle.y;
cLib_addCalcAngleS(&field_0xb80, 0x1000, 0x20, 0x400, 0x80);
field_0xb7c += field_0xb80;
- if (struct_8073A14C_field_0x26 != 0 &&
- struct_8073A14C_field_0x24 < struct_8073A14C_field_0x23 >> 1)
+ if (unk_bss_7B != 0 &&
+ unk_bss_79 < unk_bss_78 >> 1)
{
field_0xbac = 1;
- struct_8073A14C_field_0x24++;
+ unk_bss_79++;
setAction(&daE_OctBg_c::chase_core);
- if (struct_8073A14C_field_0x24 >= struct_8073A14C_field_0x23 >> 1) {
- struct_8073A14C_field_0x26 = 0;
+ if (unk_bss_79 >= unk_bss_78 >> 1) {
+ unk_bss_7B = 0;
}
} else if (field_0xbac != 0 && !dComIfGp_event_runCheck()) {
setAction(&daE_OctBg_c::chase_core);
@@ -354,16 +355,16 @@ bool daE_OctBg_c::checkCoreFishAttack() {
fopAc_ac_c* actor;
if (fopAcM_SearchByID(fopAcM_GetLinkId(this), &actor) == 0 || actor == NULL) {
return false;
- }
+ }
if (fopAcM_CheckStatus(actor, 0x100000) == 0) {
return false;
- }
+ }
return true;
}
void daE_OctBg_c::chase_core() {
if (field_0xb70 == 0) {
- setChasePos(field_0x660, cM_rndF(struct_8073A14C.field_0x10));
+ setChasePos(field_0x660, cM_rndF(l_HIO.field_0x10));
field_0xbaf = cM_rndFX(20.0f) + 100.0f;
field_0xb70++;
} else if (field_0xb70 != -1) {
@@ -372,9 +373,9 @@ void daE_OctBg_c::chase_core() {
if (fopAcM_SearchByID(fopAcM_GetLinkId(this), &local_6c) == 0 || local_6c == NULL) {
setAction(&daE_OctBg_c::swim);
} else {
- if (local_6c->current.pos.y < home.pos.y + struct_8073A14C.field_0x14) {
+ if (local_6c->current.pos.y < home.pos.y + l_HIO.field_0x14) {
acStack_2c = local_6c->current.pos + field_0x660;
- acStack_2c.y = (home.pos.y + struct_8073A14C.field_0x14) + cM_rndF(200.0f);
+ acStack_2c.y = (home.pos.y + l_HIO.field_0x14) + cM_rndF(200.0f);
} else {
acStack_2c = local_6c->current.pos + field_0x660;
}
@@ -383,7 +384,7 @@ void daE_OctBg_c::chase_core() {
if (abs(current.angle.y - field_0xb96) > 0x4000) {
cLib_chaseAngleS(&current.angle.y, field_0xb96, 0x400);
cLib_chaseAngleS(&current.angle.x, -cLib_targetAngleX(&current.pos, &acStack_2c), 0x400);
- if (current.pos.abs(acStack_2c) < struct_8073A14C.field_0x10 - 100.0f) {
+ if (current.pos.abs(acStack_2c) < l_HIO.field_0x10 - 100.0f) {
cLib_chaseF(&speedF, cM_scos(current.angle.x) * 8.0f, 0.2f);
cLib_chaseF(&speed.y, cM_ssin(current.angle.x) * -8.0f, 0.2f);
cLib_addCalcAngleS(&field_0xb80, 0xc00, 0x20, 0x400, 0x80);
@@ -393,7 +394,7 @@ void daE_OctBg_c::chase_core() {
cLib_chaseAngleS(&current.angle.x, -cLib_targetAngleX(&current.pos, &acStack_2c),
0x200);
;
- if (current.pos.abs(acStack_2c) > struct_8073A14C.field_0x10 - 100.0f) {
+ if (current.pos.abs(acStack_2c) > l_HIO.field_0x10 - 100.0f) {
cLib_chaseF(&speedF, 18.0f * cM_scos(current.angle.x), 0.4f);
cLib_chaseF(&speed.y, (-18.0f * cM_ssin(current.angle.x)), 0.4f);
cLib_addCalcAngleS(&field_0xb80, 0x2400, 0x20, 0x400, 0x80);
@@ -405,7 +406,7 @@ void daE_OctBg_c::chase_core() {
} else if (dComIfGp_event_runCheck()) {
setAction(&daE_OctBg_c::swim);
} else if (field_0xbaf == 0) {
- setChasePos(field_0x660, cM_rndF(struct_8073A14C.field_0x10));
+ setChasePos(field_0x660, cM_rndF(l_HIO.field_0x10));
field_0xbaf = cM_rndFX(20.0f) + 100.0f;
}
}
@@ -416,12 +417,12 @@ void daE_OctBg_c::normal_attack() {
daPy_py_c* player = daPy_getPlayerActorClass();
if (field_0xb70 == 0) {
field_0xb74 = true;
- struct_8073A14C_field_0x25++;
+ unk_bss_7A++;
field_0xbae = cM_rndFX(20.0f) + 60.0f;
field_0xb70++;
} else if (field_0xb70 == -1) {
field_0xb74 = false;
- struct_8073A14C_field_0x25--;
+ unk_bss_7A--;
} else if (field_0xb70 == 1) {
cXyz acStack_34;
acStack_34 = player->current.pos;
@@ -462,7 +463,7 @@ void daE_OctBg_c::normal_attack() {
field_0xb8c = fopAcM_searchPlayerAngleY(this) - current.angle.y;
cLib_addCalcAngleS(&field_0xb80, 0x2400, 0x20, 0x400, 0x80);
field_0xb7c = field_0xb7c + field_0xb80;
- if (home.pos.absXZ(player->current.pos) >= struct_8073A14C.field_0x08 && player->current.pos.y >= struct_8073A14C.field_0x0c) {
+ if (home.pos.absXZ(player->current.pos) >= l_HIO.field_0x08 && player->current.pos.y >= l_HIO.field_0x0c) {
setAction(&daE_OctBg_c::swim);
} else {
if (dComIfGp_event_runCheck() || field_0xbae == 0) {
@@ -781,10 +782,10 @@ int daE_OctBg_c::CreateHeap() {
field_0x5b8 = new mDoExt_brkAnm();
if (field_0x5b8 == NULL) {
return 0;
- }
+ }
if (!field_0x5b8->init(model->getModelData(), (J3DAnmTevRegKey*)dComIfG_getObjectRes("E_bg", 13), 1, 0, 1.0f, 0, -1)) {
return 0;
- }
+ }
return 1;
}
@@ -796,12 +797,12 @@ int daE_OctBg_c::create() {
OS_REPORT("///////////// E_OctBg ////////////////\n");
if (fopAcM_entrySolidHeap(this, useHeapInit, 0x10e0) == 0) {
return cPhs_ERROR_e;
- }
+ }
OS_REPORT("//////////// E_OctBg SET OK //////////\n");
if (struct_8073A13D == 0) {
struct_8073A13D = 1;
field_0xbb3 = 1;
- struct_8073A14C.field_0x04 = -1;
+ l_HIO.field_0x04 = -1;
}
attention_info.flags = fopAc_AttnFlag_BATTLE_e;
onWolfNoLock();
@@ -810,8 +811,8 @@ int daE_OctBg_c::create() {
fopAcM_SetMax(this, 50.0f, 50.0f, 50.0f);
field_0x6ac.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1,
&field_0x66c, fopAcM_GetSpeed_p(this), NULL, NULL);
- field_0x66c.SetWall(struct_8073A14C.field_0x18 * 10.0f,
- struct_8073A14C.field_0x18 * 20.0f);
+ field_0x66c.SetWall(l_HIO.field_0x18 * 10.0f,
+ l_HIO.field_0x18 * 20.0f);
health = 10;
field_0x560 = 10;
field_0x884.Init(100, 0, this);
@@ -827,13 +828,13 @@ int daE_OctBg_c::create() {
attention_info.distances[fopAc_attn_BATTLE_e] = 4;
field_0xb74 = false;
field_0xbac = fopAcM_GetID(this) & 1;
- struct_8073A14C_field_0x23++;
+ unk_bss_78++;
if (field_0xbac != 0) {
- struct_8073A14C_field_0x24++;
+ unk_bss_79++;
}
setAction(&daE_OctBg_c::born_swim);
daE_OctBg_Execute(this);
-
+
}
return rv;
}
@@ -868,15 +869,15 @@ static int daE_OctBg_Draw(daE_OctBg_c* i_this) {
}
static int daE_OctBg_IsDelete(daE_OctBg_c* i_this) {
- struct_8073A14C_field_0x23--;
+ unk_bss_78--;
if (i_this->getChaseFlag() != 0) {
- struct_8073A14C_field_0x24--;
- if (struct_8073A14C_field_0x24 < struct_8073A14C_field_0x23 >> 2) {
- struct_8073A14C_field_0x26 = 1;
+ unk_bss_79--;
+ if (unk_bss_79 < unk_bss_78 >> 2) {
+ unk_bss_7B = 1;
}
- }
+ }
if (i_this->checkNormalAttk()) {
- struct_8073A14C_field_0x25--;
+ unk_bss_7A--;
}
return 1;
}
diff --git a/src/d/actor/d_a_e_sg.cpp b/src/d/actor/d_a_e_sg.cpp
index 01df06d016..71de575d63 100644
--- a/src/d/actor/d_a_e_sg.cpp
+++ b/src/d/actor/d_a_e_sg.cpp
@@ -104,7 +104,7 @@ static int daE_SG_Draw(e_sg_class* i_this) {
return 1;
}
-static bool hio_init;
+static bool hio_set;
static daE_SG_HIO_c l_HIO;
@@ -1105,7 +1105,7 @@ static int daE_SG_Delete(e_sg_class* i_this) {
dComIfG_resDelete(&i_this->mPhaseReq, "E_sg");
if (i_this->mHioInit) {
- hio_init = false;
+ hio_set = false;
}
if (i_this->heap != NULL) {
@@ -1170,9 +1170,9 @@ static int daE_SG_Create(fopAc_ac_c* i_this) {
return cPhs_ERROR_e;
}
- if (hio_init == false) {
+ if (hio_set == false) {
a_this->mHioInit = true;
- hio_init = true;
+ hio_set = true;
l_HIO.mUnk0 = -1;
}
diff --git a/src/d/actor/d_a_e_tk.cpp b/src/d/actor/d_a_e_tk.cpp
index 06263e632d..6b8c949127 100644
--- a/src/d/actor/d_a_e_tk.cpp
+++ b/src/d/actor/d_a_e_tk.cpp
@@ -673,19 +673,19 @@ static int useHeapInit(fopAc_ac_c* a_this) {
return 1;
}
-static dCcD_SrcSph cc_sph_src = {
- {
- {0x0, {{0x0, 0x0, 0xd}, {0xd8fbfdff, 0x3}, 0x75}}, // mObj
- {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
- {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
- {0x0}, // mGObjCo
- }, // mObjInf
- {
- {{0.0f, 0.0f, 0.0f}, 40.0f} // mSph
- } // mSphAttr
-};
-
static int daE_TK_Create(fopAc_ac_c* i_this) {
+ static dCcD_SrcSph cc_sph_src = {
+ {
+ {0x0, {{0x0, 0x0, 0xd}, {0xd8fbfdff, 0x3}, 0x75}}, // mObj
+ {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
+ {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
+ {0x0}, // mGObjCo
+ }, // mObjInf
+ {
+ {{0.0f, 0.0f, 0.0f}, 40.0f} // mSph
+ } // mSphAttr
+ };
+
fopAcM_ct(i_this, e_tk_class);
e_tk_class* const a_this = static_cast<e_tk_class*>(i_this);
diff --git a/src/d/actor/d_a_e_tk2.cpp b/src/d/actor/d_a_e_tk2.cpp
index ef82742b36..3a8ad757b0 100644
--- a/src/d/actor/d_a_e_tk2.cpp
+++ b/src/d/actor/d_a_e_tk2.cpp
@@ -486,19 +486,19 @@ static int useHeapInit(fopAc_ac_c* a_this) {
return 1;
}
-static dCcD_SrcSph cc_sph_src = {
- {
- {0x0, {{0x0, 0x0, 0xd}, {0xd8fbfdff, 0x3}, 0x75}}, // mObj
- {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
- {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
- {0x0}, // mGObjCo
- }, // mObjInf
- {
- {{0.0f, 0.0f, 0.0f}, 40.0f} // mSph
- } // mSphAttr
-};
-
static int daE_TK2_Create(fopAc_ac_c* i_this) {
+ static dCcD_SrcSph cc_sph_src = {
+ {
+ {0x0, {{0x0, 0x0, 0xd}, {0xd8fbfdff, 0x3}, 0x75}}, // mObj
+ {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
+ {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
+ {0x0}, // mGObjCo
+ }, // mObjInf
+ {
+ {{0.0f, 0.0f, 0.0f}, 40.0f} // mSph
+ } // mSphAttr
+ };
+
fopAcM_ct(i_this, e_tk2_class);
e_tk2_class* a_this = static_cast<e_tk2_class*>(i_this);
diff --git a/src/d/actor/d_a_e_tk_ball.cpp b/src/d/actor/d_a_e_tk_ball.cpp
index 804c86c977..2942bc4556 100644
--- a/src/d/actor/d_a_e_tk_ball.cpp
+++ b/src/d/actor/d_a_e_tk_ball.cpp
@@ -227,7 +227,7 @@ static void e_tk_ball_drop(e_tk_ball_class* i_this) {
static void action(e_tk_ball_class* i_this) {
fopAc_ac_c* actor = i_this;
- static u16 e_id[4] = {0x819D, 0x819E, 0x819A, 0x0000};
+ static u16 e_id[3] = {0x819D, 0x819E, 0x819A};
s8 is_moving = true;
switch (i_this->mAction) {
diff --git a/src/d/actor/d_a_e_yd.cpp b/src/d/actor/d_a_e_yd.cpp
index 6bf2590e6a..042af178ab 100644
--- a/src/d/actor/d_a_e_yd.cpp
+++ b/src/d/actor/d_a_e_yd.cpp
@@ -189,7 +189,7 @@ static void damage_check(e_yd_class* i_this) {
}
}
-static u8 data_807F7D68;
+static u8 hio_set;
static daE_YD_HIO_c l_HIO;
@@ -1300,7 +1300,7 @@ static int daE_YD_IsDelete(e_yd_class* i_this) {
static int daE_YD_Delete(e_yd_class* i_this) {
dComIfG_resDelete(&i_this->field_0x5ac, "E_yd");
if (i_this->field_0x1268 != 0) {
- data_807F7D68 = 0;
+ hio_set = 0;
}
if (i_this->actor.heap != NULL) {
i_this->mpMorf->stopZelAnime();
@@ -1423,9 +1423,9 @@ static int daE_YD_Create(fopAc_ac_c* i_this) {
OS_REPORT("//////////////E_YD SET 2 !!\n");
- if (data_807F7D68 == 0) {
+ if (hio_set == 0) {
((e_yd_class*)i_this)->field_0x1268 = 1;
- data_807F7D68 = 1;
+ hio_set = 1;
l_HIO.field_0x4 = -1;
}
diff --git a/src/d/actor/d_a_e_yk.cpp b/src/d/actor/d_a_e_yk.cpp
index 77cd789eb5..78a92833f0 100644
--- a/src/d/actor/d_a_e_yk.cpp
+++ b/src/d/actor/d_a_e_yk.cpp
@@ -53,7 +53,7 @@ daE_YK_HIO_c::daE_YK_HIO_c() {
mChargeSpeed = 40.0f;
}
-static u8 data_80807EF8;
+static u8 hio_set;
static daE_YK_HIO_c l_HIO;
@@ -327,8 +327,6 @@ static void damage_check(e_yk_class* i_this) {
}
}
-static u8 check_index[255];
-
/**
* @brief Checks visibility and accessibility of path points for Shadow Keese navigation
*
@@ -349,6 +347,8 @@ static u8 check_index[255];
* and maintain valid flight paths.
*/
static int path_check(e_yk_class* i_this) {
+ static u8 check_index[255];
+
if (i_this->mpPath) {
dBgS_LinChk lin_chk;
@@ -1388,7 +1388,7 @@ static int daE_YK_Delete(e_yk_class* i_this) {
dComIfG_resDelete(&i_this->mPhase,"E_YK");
if (i_this->mIsFirstSpawn != 0) {
- data_80807EF8 = 0;
+ hio_set = 0;
}
if (i_this->heap) {
@@ -1499,9 +1499,9 @@ static int daE_YK_Create(fopAc_ac_c* i_this) {
}
}
- if (data_80807EF8 == 0) {
+ if (hio_set == 0) {
yk->mIsFirstSpawn = 1;
- data_80807EF8 = 1;
+ hio_set = 1;
l_HIO.field_0x04 = -1;
}
diff --git a/src/d/actor/d_a_hitobj.cpp b/src/d/actor/d_a_hitobj.cpp
index ef4f89a986..9333b1617f 100644
--- a/src/d/actor/d_a_hitobj.cpp
+++ b/src/d/actor/d_a_hitobj.cpp
@@ -33,22 +33,22 @@ static int daHitobj_Delete(hitobj_class* i_this) {
return 1;
}
-static dCcD_SrcSph cc_sph_src = {
- {
- {0, {{0, 0, 0x13}, {0, 3}, 0}},
- {dCcD_SE_NONE, 0, 0, 0, {0}},
- {dCcD_SE_NONE, 0, 0, 0, {0}},
- {0},
- },
- {
+static int daHitobj_Create(fopAc_ac_c* i_this) {
+ static dCcD_SrcSph cc_sph_src = {
{
- {0.0f, 0.0f, 0.0f},
- 100.0f,
+ {0, {{0, 0, 0x13}, {0, 3}, 0}},
+ {dCcD_SE_NONE, 0, 0, 0, {0}},
+ {dCcD_SE_NONE, 0, 0, 0, {0}},
+ {0},
},
- }
-};
+ {
+ {
+ {0.0f, 0.0f, 0.0f},
+ 100.0f,
+ },
+ }
+ };
-static int daHitobj_Create(fopAc_ac_c* i_this) {
hitobj_class* hitobj = (hitobj_class*)i_this;
fopAcM_ct(i_this, hitobj_class);
diff --git a/src/d/actor/d_a_hozelda.cpp b/src/d/actor/d_a_hozelda.cpp
index 654007dd94..238aadc051 100644
--- a/src/d/actor/d_a_hozelda.cpp
+++ b/src/d/actor/d_a_hozelda.cpp
@@ -40,10 +40,8 @@ const daHoZelda_hio_c1 daHoZelda_hio_c0::m = {
4000.0f,
};
-#if VERSION != VERSION_GCN_PAL
u8 daHoZelda_matAnm_c::mEyeMoveFlg;
u8 daHoZelda_matAnm_c::mMorfFrame;
-#endif
void daHoZelda_matAnm_c::init() {
field_0xf4 = 0.0f;
diff --git a/src/d/actor/d_a_midna.cpp b/src/d/actor/d_a_midna.cpp
index b1850215f5..4bb6ee25ed 100644
--- a/src/d/actor/d_a_midna.cpp
+++ b/src/d/actor/d_a_midna.cpp
@@ -125,10 +125,8 @@ daMidna_hio_c1 const daMidna_hio_c0::m = {
25.0f,
};
-#if VERSION != VERSION_GCN_PAL
bool daMidna_matAnm_c::sEyeMoveFlg;
u8 daMidna_matAnm_c::sMorfFrame;
-#endif
void daMidna_matAnm_c::init() {
mOldTransX = 0.0f;
diff --git a/src/d/actor/d_a_npc_du.cpp b/src/d/actor/d_a_npc_du.cpp
index 043b1aa540..9f353db664 100644
--- a/src/d/actor/d_a_npc_du.cpp
+++ b/src/d/actor/d_a_npc_du.cpp
@@ -504,8 +504,6 @@ static BOOL message(npc_du_class* i_this) {
static bool hio_set;
-static u8 lit_3757[12];
-
static daNpc_Du_HIO_c l_HIO;
static int daNpc_Du_Execute(npc_du_class* i_this) {
diff --git a/src/d/actor/d_a_npc_lf.cpp b/src/d/actor/d_a_npc_lf.cpp
index 128ab10a68..c8517c3ff6 100644
--- a/src/d/actor/d_a_npc_lf.cpp
+++ b/src/d/actor/d_a_npc_lf.cpp
@@ -11,12 +11,6 @@
#include "d/actor/d_a_npc_lf.h"
#include "f_op/f_op_camera_mng.h"
-static f32 wp[3] = {
- 0.5f,
- 1.0f,
- 2.5f
-};
-
daNPC_LF_HIO_c::daNPC_LF_HIO_c() {
field_0x04 = -1;
field_0x08 = 1.0f;
@@ -70,7 +64,7 @@ static int daNPC_LF_Draw(npc_lf_class* i_this) {
return 1;
}
-static u8 data_80A6AA90;
+static u8 hio_set;
static daNPC_LF_HIO_c l_HIO;
@@ -155,6 +149,12 @@ static void npc_lf_move(fopAc_ac_c* param_0, lf_s* pFish) {
}
static void action(fopAc_ac_c* param_0, lf_s* pFish) {
+ static f32 wp[3] = {
+ 0.5f,
+ 1.0f,
+ 2.5f
+ };
+
cXyz pos;
pFish->field_0x18++;
@@ -231,7 +231,7 @@ static int daNPC_LF_Delete(npc_lf_class* i_this) {
dComIfG_resDelete(&i_this->mPhase, "NPC_LF");
if (i_this->field_0x1fc0 != 0) {
- data_80A6AA90 = 0;
+ hio_set = 0;
}
return 1;
@@ -293,9 +293,9 @@ static cPhs__Step daNPC_LF_Create(fopAc_ac_c* i_this) {
return cPhs_ERROR_e;
}
- if (data_80A6AA90 == 0) {
+ if (hio_set == 0) {
a_this->field_0x1fc0 = 1;
- data_80A6AA90 = 1;
+ hio_set = 1;
l_HIO.field_0x04 = -1;
}
diff --git a/src/d/actor/d_a_npc_tk.cpp b/src/d/actor/d_a_npc_tk.cpp
index 804b37fbfe..d0c8e12edc 100644
--- a/src/d/actor/d_a_npc_tk.cpp
+++ b/src/d/actor/d_a_npc_tk.cpp
@@ -247,7 +247,7 @@ static s16 m_near_angle;
static fopAc_ac_c* m_near_actor;
-static u8 g_isHioChildInitted;
+static u8 hio_set;
static daNPC_TK_HIO_c l_HIO;
@@ -3089,7 +3089,7 @@ static int daNPC_TK_IsDelete(daNPC_TK_c* i_this) {
int daNPC_TK_c::_delete() {
dComIfG_resDelete(&mPhase, "Npc_tk");
if (field_0xb40) {
- g_isHioChildInitted = 0;
+ hio_set = 0;
}
if (heap != NULL) {
@@ -3218,9 +3218,9 @@ int daNPC_TK_c::create() {
return cPhs_ERROR_e;
}
- if (g_isHioChildInitted == 0) {
+ if (hio_set == 0) {
field_0xb40 = 1;
- g_isHioChildInitted = 1;
+ hio_set = 1;
l_HIO.field_0x4 = mDoHIO_CREATE_CHILD("鷹", &l_HIO); // hawk
}
diff --git a/src/d/actor/d_a_npc_tr.cpp b/src/d/actor/d_a_npc_tr.cpp
index 3ee829e5a4..e41ece6b77 100644
--- a/src/d/actor/d_a_npc_tr.cpp
+++ b/src/d/actor/d_a_npc_tr.cpp
@@ -55,7 +55,7 @@ static f32 dummyLiterals() {
return dummy;
}
-static u8 data_80B26678;
+static u8 hio_set;
static daNPC_TR_HIO_c l_HIO;
@@ -194,7 +194,7 @@ static int daNPC_TR_Delete(npc_tr_class* npc_tr) {
dComIfG_resDelete(&npc_tr->mPhaseReq, "NPC_TR");
if (npc_tr->field_0x600) {
- data_80B26678 = 0;
+ hio_set = 0;
}
return 1;
@@ -231,9 +231,9 @@ static int daNPC_TR_Create(fopAc_ac_c* i_this) {
return cPhs_ERROR_e;
}
- if (!data_80B26678) {
+ if (!hio_set) {
npc_tr->field_0x600 = 1;
- data_80B26678 = 1;
+ hio_set = 1;
l_HIO.field_0x4 = -1;
}
diff --git a/src/d/actor/d_a_obj_Y_taihou.cpp b/src/d/actor/d_a_obj_Y_taihou.cpp
index 36b93c75ca..5a9e8dcdba 100644
--- a/src/d/actor/d_a_obj_Y_taihou.cpp
+++ b/src/d/actor/d_a_obj_Y_taihou.cpp
@@ -142,19 +142,18 @@ static dCcD_SrcCyl l_cc_cyl_src = {
} // mCyl
};
-static u16 l_offsetAngle[4] = {
- 0x0, 0xC000, 0x8000, 0x4000,
-};
-
void daObjYtaihou_c::setNextAngle() {
+ static u16 l_offsetAngle[4] = {
+ 0x0, 0xC000, 0x8000, 0x4000,
+ };
+
current.angle.z = home.angle.y + l_offsetAngle[field_0x775];
}
-static f32 l_wheelMinR;
-
-static u8 lbl_396_bss_4C;
-
void daObjYtaihou_c::setMtx() {
+ static f32 l_wheelMinR;
+ static u8 lbl_396_bss_4C;
+
home.angle.z += (s16) ((s16)(shape_angle.y - old.angle.y) * 0.8f);
if ((s8)lbl_396_bss_4C == 0) {
l_wheelMinR = cM_scos(0xccc) * 60.0f;
diff --git a/src/d/actor/d_a_obj_barDesk.cpp b/src/d/actor/d_a_obj_barDesk.cpp
index 332de76033..71ed8871ba 100644
--- a/src/d/actor/d_a_obj_barDesk.cpp
+++ b/src/d/actor/d_a_obj_barDesk.cpp
@@ -12,8 +12,6 @@
static daBarDesk_HIO_c l_HIO;
-static u8 data_80BA9D2C[4];
-
dCcD_SrcGObjInf const daBarDesk_c::mCcDObjInfo = {
{0, {{0, 0, 0}, {0xD8FAFDBF, 0x11}, {0}}},
{1, 0, 0, 0, 0},
diff --git a/src/d/actor/d_a_obj_boumato.cpp b/src/d/actor/d_a_obj_boumato.cpp
index 9bf33d30e8..90c0e7d7fd 100644
--- a/src/d/actor/d_a_obj_boumato.cpp
+++ b/src/d/actor/d_a_obj_boumato.cpp
@@ -37,16 +37,6 @@ static dCcD_SrcCyl l_ccDCyl = {
static char* l_resName = "H_BouMato";
-static Vec jntCoOffset[2] = {
- {0.0f, 0.0f, 0.0f},
- {0.0f, 300.0f, 0.0f},
-};
-
-// /* 80BBC58C-80BBC598 -00001 000C+00 1/1 0/0 0/0 .data jntCoData$4045 */
-static dJntColData_c jntCoData = {
- 1, 1, 0, 4.0f, jntCoOffset,
-};
-
daObj_BouMato_c::~daObj_BouMato_c() {
OS_REPORT("|%06d:%x|daObj_BouMato_c -> デストラクト\n", g_Counter.mCounter0, this);
dComIfG_resDelete(&mPhase, getResName());
@@ -89,6 +79,16 @@ int daObj_BouMato_c::create() {
}
int daObj_BouMato_c::CreateHeap() {
+ static Vec jntCoOffset[2] = {
+ {0.0f, 0.0f, 0.0f},
+ {0.0f, 300.0f, 0.0f},
+ };
+
+ // /* 80BBC58C-80BBC598 -00001 000C+00 1/1 0/0 0/0 .data jntCoData$4045 */
+ static dJntColData_c jntCoData = {
+ 1, 1, 0, 4.0f, jntCoOffset,
+ };
+
J3DModelData* mdlData_p = (J3DModelData*)dComIfG_getObjectRes(getResName(), 4);
JUT_ASSERT(374, NULL != mdlData_p);
mModel = mDoExt_J3DModel__create(mdlData_p, 0x80000, 0x11000084);
diff --git a/src/d/actor/d_a_obj_cb.cpp b/src/d/actor/d_a_obj_cb.cpp
index a766ce284e..23b862399d 100644
--- a/src/d/actor/d_a_obj_cb.cpp
+++ b/src/d/actor/d_a_obj_cb.cpp
@@ -148,13 +148,13 @@ static int daObj_Cb_IsDelete(obj_cb_class* param_0) {
return 1;
}
-static u8 data_80BC58F8;
+static u8 hio_set;
static int daObj_Cb_Delete(obj_cb_class* i_this) {
fopAcM_GetID(i_this);
dComIfG_resDelete(&i_this->mPhase, "Obj_cb");
if (i_this->field_0x978 != 0) {
- data_80BC58F8 = 0;
+ hio_set = 0;
}
if (i_this->mBgW != NULL) {
dComIfG_Bgsp().Release(i_this->mBgW);
@@ -211,9 +211,9 @@ static int daObj_Cb_Create(fopAc_ac_c* actor) {
return cPhs_ERROR_e;
}
}
- if (data_80BC58F8 == 0) {
+ if (hio_set == 0) {
i_this->field_0x978 = 1;
- data_80BC58F8 = 1;
+ hio_set = 1;
l_HIO.field_0x4 = -1;
}
fopAcM_SetMtx(i_this, i_this->mModel->getBaseTRMtx());
diff --git a/src/d/actor/d_a_obj_cblock.cpp b/src/d/actor/d_a_obj_cblock.cpp
index a27a36bb3c..1575a759ff 100644
--- a/src/d/actor/d_a_obj_cblock.cpp
+++ b/src/d/actor/d_a_obj_cblock.cpp
@@ -44,10 +44,6 @@ static cXyz l_chainOffset(0.0f, 105.0f, 30.0f);
static cXyz l_smokeSetOffset(0.0f, 0.0f, -200.0f);
-#if !DEBUG
-static s32 unused_bss_70 = 0;
-#endif
-
static cull_box const l_cull_box = {
{-250.0f, 0.0f, -450.0f},
{250.0f, 250.0f, 400.0f},
diff --git a/src/d/actor/d_a_obj_crope.cpp b/src/d/actor/d_a_obj_crope.cpp
index b452393052..87679188a3 100644
--- a/src/d/actor/d_a_obj_crope.cpp
+++ b/src/d/actor/d_a_obj_crope.cpp
@@ -36,13 +36,6 @@ static dCcD_SrcSph l_sphSrc = {
} // mSphAttr
};
-static GXColor color = {
- 0x00,
- 0x00,
- 0x00,
- 0xFF,
-};
-
int daObjCrope_c::create() {
fopAcM_ct(this, daObjCrope_c);
int rv = dComIfG_resLoad(&mPhase, l_arcName);
@@ -360,6 +353,13 @@ static int daObjCrope_Execute(daObjCrope_c* i_this) {
}
int daObjCrope_c::draw() {
+ static GXColor color = {
+ 0x00,
+ 0x00,
+ 0x00,
+ 0xFF,
+ };
+
g_env_light.settingTevStruct(0, &current.pos, &tevStr);
mLineMat.update(100, 5.0f, color, 0, &tevStr);
dComIfGd_set3DlineMat(&mLineMat);
diff --git a/src/d/actor/d_a_obj_dmelevator.cpp b/src/d/actor/d_a_obj_dmelevator.cpp
index ae8794603c..58b7ec352f 100644
--- a/src/d/actor/d_a_obj_dmelevator.cpp
+++ b/src/d/actor/d_a_obj_dmelevator.cpp
@@ -22,7 +22,7 @@ static void rideCallBack(dBgW* param_0, fopAc_ac_c* param_1, fopAc_ac_c* param_2
daPy_py_c* pdVar1 = daPy_getPlayerActorClass();
if (fopAcM_CheckStatus(param_2, 0x400) != 0 && fopAcM_GetName(param_2) == 0xfd) {
- static cXyz l_push_check_pos0[4] = {
+ static cXyz l_push_check_pos[4] = {
cXyz(-50.0f, 0.0f, -50.0f),
cXyz(50.0f, 0.0f, -50.0f),
cXyz(50.0f, 0.0f, 50.0f),
@@ -33,10 +33,10 @@ static void rideCallBack(dBgW* param_0, fopAc_ac_c* param_1, fopAc_ac_c* param_2
mDoMtx_stack_c::YrotS(-param_1->current.angle.y);
mDoMtx_stack_c::multVec(&local_2c, &local_2c);
- if (l_push_check_pos0[0].x <= local_2c.x) {
- if (l_push_check_pos0[2].x >= local_2c.x) {
- if (l_push_check_pos0[0].z <= local_2c.z) {
- if (l_push_check_pos0[2].z >= local_2c.z) {
+ if (l_push_check_pos[0].x <= local_2c.x) {
+ if (l_push_check_pos[2].x >= local_2c.x) {
+ if (l_push_check_pos[0].z <= local_2c.z) {
+ if (l_push_check_pos[2].z >= local_2c.z) {
if ((pdVar1->checkEquipHeavyBoots())) {
pthis->field_0x632 = 1;
pthis->field_0x634 = 1;
diff --git a/src/d/actor/d_a_obj_fan.cpp b/src/d/actor/d_a_obj_fan.cpp
index 4bd7128eae..61aa595b8c 100644
--- a/src/d/actor/d_a_obj_fan.cpp
+++ b/src/d/actor/d_a_obj_fan.cpp
@@ -255,21 +255,21 @@ void daObjFan_c::action() {
}
}
-static Vec l_offset_posM[4] = {
- {-150.0f, 150.0f, 0.0f},
- {-150.0f, -150.0f, 0.0f},
- {150.0f, 150.0f, 0.0f},
- {150.0f, -150.0f, 0.0f},
-};
-
-static Vec l_offset_posL[4] = {
- {-300.0f, 300.0f, 0.0f},
- {-300.0f, -300.0f, 0.0f},
- {300.0f, 300.0f, 0.0f},
- {300.0f, -300.0f, 0.0f},
-};
-
void daObjFan_c::setCollision() {
+ static Vec l_offset_posM[4] = {
+ {-150.0f, 150.0f, 0.0f},
+ {-150.0f, -150.0f, 0.0f},
+ {150.0f, 150.0f, 0.0f},
+ {150.0f, -150.0f, 0.0f},
+ };
+
+ static Vec l_offset_posL[4] = {
+ {-300.0f, 300.0f, 0.0f},
+ {-300.0f, -300.0f, 0.0f},
+ {300.0f, 300.0f, 0.0f},
+ {300.0f, -300.0f, 0.0f},
+ };
+
if (field_0xad4 == 0) {
return;
}
diff --git a/src/d/actor/d_a_obj_ladder.cpp b/src/d/actor/d_a_obj_ladder.cpp
index fe8aa0ceb7..884e4ac59b 100644
--- a/src/d/actor/d_a_obj_ladder.cpp
+++ b/src/d/actor/d_a_obj_ladder.cpp
@@ -13,6 +13,8 @@
#include "d/d_bg_w.h"
#include "f_op/f_op_actor_mng.h"
+namespace daObjLadder {
+namespace {
struct Attr {
/* 0x00 */ f32 field_0x00;
/* 0x04 */ f32 field_0x04;
@@ -40,7 +42,7 @@ inline static const Attr& attr() {
return L_attr;
}
-char const daObjLadder::Act_c::M_arcname[5] = "Mhsg";
+char const Act_c::M_arcname[5] = "Mhsg";
struct AttrType {
/* 0x0 */ s16 field_0x0;
@@ -57,18 +59,18 @@ static AttrType L_attr_type[6] = {
{ 0x06, 0x0E, 300.0f},
};
-static inline const AttrType& attr_type(daObjLadder::Act_c::Type_e type) {
+static inline const AttrType& attr_type(Act_c::Type_e type) {
return L_attr_type[type];
}
-int daObjLadder::Act_c::CreateHeap() {
+int Act_c::CreateHeap() {
J3DModelData* model_data = (J3DModelData*)dComIfG_getObjectRes(M_arcname, attr_type(mType).field_0x0);
JUT_ASSERT(382, model_data != NULL);
mModel = mDoExt_J3DModel__create(model_data, 0x80000, 0x11000084);
return mModel != NULL;
}
-int daObjLadder::Act_c::Create() {
+int Act_c::Create() {
fopAcM_SetMtx(this, mModel->getBaseTRMtx());
init_mtx();
fopAcM_setCullSizeBox(this, -55.0f, -1.0f, -10.0f, 55.0f, attr_type(mType).field_0x4 + 41.0f,
@@ -96,7 +98,7 @@ int daObjLadder::Act_c::Create() {
return 1;
}
-int daObjLadder::Act_c::Mthd_Create() {
+int Act_c::Mthd_Create() {
fopAcM_ct(this, Act_c);
int phase_state = dComIfG_resLoad(&mPhase, M_arcname);
if (phase_state == cPhs_COMPLEATE_e) {
@@ -108,39 +110,39 @@ int daObjLadder::Act_c::Mthd_Create() {
return phase_state;
}
-int daObjLadder::Act_c::Delete() {
+int Act_c::Delete() {
return 1;
}
-int daObjLadder::Act_c::Mthd_Delete() {
+int Act_c::Mthd_Delete() {
int rv = MoveBGDelete();
dComIfG_resDelete(&mPhase, M_arcname);
return rv;
}
-void daObjLadder::Act_c::demo_end_reset() {
+void Act_c::demo_end_reset() {
if (mInDemo && dComIfGp_evmng_endCheck(mEventIdx)) {
dComIfGp_event_reset();
mInDemo = false;
}
}
-void daObjLadder::Act_c::mode_wait_init() {
+void Act_c::mode_wait_init() {
mMode = MODE_WAIT;
}
-void daObjLadder::Act_c::mode_wait() {
+void Act_c::mode_wait() {
if (fopAcM_isSwitch(this, prm_get_swSave())) {
mode_demoreq_init();
}
}
-void daObjLadder::Act_c::mode_demoreq_init() {
+void Act_c::mode_demoreq_init() {
mMode = MODE_DEMOREQ;
mInDemo = false;
}
-void daObjLadder::Act_c::mode_demoreq() {
+void Act_c::mode_demoreq() {
bool isDemo = false;
if (dComIfGp_evmng_existence(mEventIdx)) {
if (eventInfo.checkCommandDemoAccrpt()) {
@@ -158,14 +160,14 @@ void daObjLadder::Act_c::mode_demoreq() {
}
}
-void daObjLadder::Act_c::mode_vib_init() {
+void Act_c::mode_vib_init() {
mVibrationTimer = attr().vibrationTimer;
field_0x610 = 0;
field_0x612 = 0;
mMode = MODE_VIB;
}
-void daObjLadder::Act_c::mode_vib() {
+void Act_c::mode_vib() {
field_0x610 += attr().field_0x16;
field_0x612 += attr().field_0x18;
field_0x614 = cM_scos(field_0x610) * attr().field_0x1c;
@@ -175,14 +177,14 @@ void daObjLadder::Act_c::mode_vib() {
}
}
-void daObjLadder::Act_c::mode_drop_init() {
+void Act_c::mode_drop_init() {
gravity = -5.0f;
speed.set(cXyz::Zero);
field_0x5b6 = attr().field_0x10;
mMode = MODE_DROP;
}
-void daObjLadder::Act_c::mode_drop() {
+void Act_c::mode_drop() {
daObj::posMoveF_stream(this, NULL, &cXyz::Zero, attr().field_0x04, attr().field_0x08);
if (current.pos.y < mHeight) {
if (field_0x5b6 == attr().field_0x10) {
@@ -214,16 +216,16 @@ void daObjLadder::Act_c::mode_drop() {
}
}
-void daObjLadder::Act_c::mode_fell_init() {
+void Act_c::mode_fell_init() {
mMode = MODE_FELL;
}
-void daObjLadder::Act_c::mode_fell() {
+void Act_c::mode_fell() {
}
-Mtx daObjLadder::Act_c::M_tmp_mtx;
+Mtx Act_c::M_tmp_mtx;
-void daObjLadder::Act_c::set_mtx() {
+void Act_c::set_mtx() {
mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z);
mDoMtx_stack_c::ZXYrotM(shape_angle.x, shape_angle.y, shape_angle.z);
cMtx_copy(mDoMtx_stack_c::get(), M_tmp_mtx);
@@ -231,16 +233,16 @@ void daObjLadder::Act_c::set_mtx() {
mModel->setBaseTRMtx(mDoMtx_stack_c::get());
}
-void daObjLadder::Act_c::init_mtx() {
+void Act_c::init_mtx() {
mModel->setBaseScale(scale);
set_mtx();
}
-int daObjLadder::Act_c::Execute(f32 (**param_1)[3][4]) {
- static const daObjLadder::Act_c::modeProc mode_proc[5] = {
- &daObjLadder::Act_c::mode_wait, &daObjLadder::Act_c::mode_demoreq,
- &daObjLadder::Act_c::mode_vib, &daObjLadder::Act_c::mode_drop,
- &daObjLadder::Act_c::mode_fell,
+int Act_c::Execute(f32 (**param_1)[3][4]) {
+ static const Act_c::modeProc mode_proc[5] = {
+ &Act_c::mode_wait, &Act_c::mode_demoreq,
+ &Act_c::mode_vib, &Act_c::mode_drop,
+ &Act_c::mode_fell,
};
demo_end_reset();
@@ -251,7 +253,7 @@ int daObjLadder::Act_c::Execute(f32 (**param_1)[3][4]) {
return 1;
}
-int daObjLadder::Act_c::Draw() {
+int Act_c::Draw() {
g_env_light.settingTevStruct(0x10, &current.pos, &tevStr);
g_env_light.setLightTevColorType_MAJI(mModel, &tevStr);
dComIfGd_setListBG();
@@ -261,24 +263,24 @@ int daObjLadder::Act_c::Draw() {
return 1;
}
-static int Mthd_Create(daObjLadder::Act_c* i_this) {
- return i_this->Mthd_Create();
+static int Mthd_Create(void* i_this) {
+ return ((Act_c*)i_this)->Mthd_Create();
}
-static int Mthd_Delete(daObjLadder::Act_c* i_this) {
- return i_this->Mthd_Delete();
+static int Mthd_Delete(void* i_this) {
+ return ((Act_c*)i_this)->Mthd_Delete();
}
-static int Mthd_Execute(daObjLadder::Act_c* i_this) {
- return i_this->MoveBGExecute();
+static int Mthd_Execute(void* i_this) {
+ return ((Act_c*)i_this)->MoveBGExecute();
}
-static int Mthd_Draw(daObjLadder::Act_c* i_this) {
- return i_this->MoveBGDraw();
+static int Mthd_Draw(void* i_this) {
+ return ((Act_c*)i_this)->MoveBGDraw();
}
-static int Mthd_IsDelete(daObjLadder::Act_c* i_this) {
- return i_this->MoveBGIsDelete();
+static int Mthd_IsDelete(void* i_this) {
+ return ((Act_c*)i_this)->MoveBGIsDelete();
}
static actor_method_class Mthd_Table = {
@@ -289,6 +291,9 @@ static actor_method_class Mthd_Table = {
(process_method_func)Mthd_Draw,
};
+}
+}
+
extern actor_process_profile_definition g_profile_Obj_Ladder = {
fpcLy_CURRENT_e, // mLayerID
3, // mListID
@@ -300,7 +305,7 @@ extern actor_process_profile_definition g_profile_Obj_Ladder = {
0, // mParameters
&g_fopAc_Method.base, // sub_method
23, // mPriority
- &Mthd_Table, // sub_method
+ &daObjLadder::Mthd_Table, // sub_method
0x00040100, // mStatus
fopAc_ACTOR_e, // mActorType
fopAc_CULLBOX_CUSTOM_e, // cullType
diff --git a/src/d/actor/d_a_obj_lbox.cpp b/src/d/actor/d_a_obj_lbox.cpp
index 005ffa3cae..8f23621e2c 100644
--- a/src/d/actor/d_a_obj_lbox.cpp
+++ b/src/d/actor/d_a_obj_lbox.cpp
@@ -11,19 +11,7 @@
#include "f_op/f_op_actor_mng.h"
#include "m_Do/m_Do_hostIO.h"
-static dCcD_SrcSph cc_sph_src = {
- {
- {0x0, {{0x0, 0x0, 0x0}, {0xd8fbfdff, 0x3}, 0x0}}, // mObj
- {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
- {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
- {0x0}, // mGObjCo
- }, // mObjInf
- {
- {{0.0f, 0.0f, 0.0f}, 40.0f} // mSph
- } // mSphAttr
-};
-
-static u8 data_80C540E8;
+static u8 hio_set;
static daObj_Lbox_HIO_c l_HIO;
@@ -116,7 +104,7 @@ static int daObj_Lbox_Delete(obj_lbox_class* i_this) {
fopAcM_GetID(i_this);
dComIfG_resDelete(&i_this->mPhaseReq, "Obj_lbox");
if (i_this->field_0xa8c != 0) {
- data_80C540E8 = 0;
+ hio_set = 0;
}
dComIfG_Bgsp().Release(i_this->mpBgW);
return 1;
@@ -147,6 +135,18 @@ static int useHeapInit(fopAc_ac_c* i_this) {
}
static cPhs__Step daObj_Lbox_Create(fopAc_ac_c* i_this) {
+ static dCcD_SrcSph cc_sph_src = {
+ {
+ {0x0, {{0x0, 0x0, 0x0}, {0xd8fbfdff, 0x3}, 0x0}}, // mObj
+ {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
+ {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
+ {0x0}, // mGObjCo
+ }, // mObjInf
+ {
+ {{0.0f, 0.0f, 0.0f}, 40.0f} // mSph
+ } // mSphAttr
+ };
+
obj_lbox_class* a_this = static_cast<obj_lbox_class*>(i_this);
fopAcM_ct(a_this, obj_lbox_class);
cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&a_this->mPhaseReq, "Obj_lbox");
@@ -165,9 +165,9 @@ static cPhs__Step daObj_Lbox_Create(fopAc_ac_c* i_this) {
return cPhs_ERROR_e;
}
- if (data_80C540E8 == 0) {
+ if (hio_set == 0) {
a_this->field_0xa8c = 1;
- data_80C540E8 = 1;
+ hio_set = 1;
l_HIO.field_0x4 = -1;
}
diff --git a/src/d/actor/d_a_obj_myogan.cpp b/src/d/actor/d_a_obj_myogan.cpp
index 38f2ac8963..346bb1e648 100644
--- a/src/d/actor/d_a_obj_myogan.cpp
+++ b/src/d/actor/d_a_obj_myogan.cpp
@@ -28,7 +28,7 @@ static int daObj_Myogan_Draw(obj_myogan_class* i_this) {
return 1;
}
-static bool initialized;
+static bool hio_set;
static daObj_Myogan_HIO_c l_HIO;
@@ -74,7 +74,7 @@ static int daObj_Myogan_IsDelete(obj_myogan_class* i_this) {
static int daObj_Myogan_Delete(obj_myogan_class* i_this) {
dComIfG_resDelete(&i_this->mPhase, "S_YOGAN");
if (i_this->mInitialized) {
- initialized = false;
+ hio_set = false;
}
dComIfG_Bgsp().Release(i_this->mpBgW);
@@ -142,9 +142,9 @@ static int daObj_Myogan_Create(fopAc_ac_c* i_this) {
return cPhs_ERROR_e;
}
- if (!initialized) {
+ if (!hio_set) {
a_this->mInitialized = 1;
- initialized = true;
+ hio_set = true;
l_HIO.field_0x4 = -1;
}
diff --git a/src/d/actor/d_a_obj_nan.cpp b/src/d/actor/d_a_obj_nan.cpp
index 10cc59d483..597cce820e 100644
--- a/src/d/actor/d_a_obj_nan.cpp
+++ b/src/d/actor/d_a_obj_nan.cpp
@@ -573,12 +573,12 @@ int daObjNAN_c::execute() {
return 1;
}
-static u8 l_hio_init;
+static u8 hio_set;
int daObjNAN_c::_delete() {
dComIfG_resDelete(&mPhase, "I_Nan");
if (field_0x7fd != 0) {
- l_hio_init = 0;
+ hio_set = 0;
}
if (heap != NULL) {
mMorf->stopZelAnime();
@@ -686,8 +686,8 @@ int daObjNAN_c::create() {
return cPhs_ERROR_e;
}
OS_REPORT("/////////////// I_NAN SET OK //////////\n");
- if (l_hio_init == 0) {
- l_hio_init = 1;
+ if (hio_set == 0) {
+ hio_set = 1;
field_0x7fd = 1;
l_HIO.field_0x4 = -1;
}
diff --git a/src/d/actor/d_a_obj_octhashi.cpp b/src/d/actor/d_a_obj_octhashi.cpp
index 1f49c3870c..dc2565daad 100644
--- a/src/d/actor/d_a_obj_octhashi.cpp
+++ b/src/d/actor/d_a_obj_octhashi.cpp
@@ -28,23 +28,23 @@ static char* l_arcName[1] = {
"Octhashi"
};
-static dCcD_SrcCyl ccCylSrc = {
- {
- {0x0, {{0x0, 0x0, 0xd}, {0x104002, 0x1f}, 0x75}}, // mObj
- {dCcD_SE_STONE, 0x2, 0x0, 0x0, 0x1}, // mGObjAt
- {dCcD_SE_STONE, 0x2, 0x0, 0x0, 0x1}, // mGObjTg
- {0x0}, // mGObjCo
- }, // mObjInf
- {
- {0.0f, 0.0f, 0.0f}, // mCenter
- 400.0f, // mRadius
- 0.0f // mHeight
- } // mCyl
-};
-
static s8 l_cyl_height_init = 0;
void daObjOCTHASHI_c::initCcCylinder() {
+ static dCcD_SrcCyl ccCylSrc = {
+ {
+ {0x0, {{0x0, 0x0, 0xd}, {0x104002, 0x1f}, 0x75}}, // mObj
+ {dCcD_SE_STONE, 0x2, 0x0, 0x0, 0x1}, // mGObjAt
+ {dCcD_SE_STONE, 0x2, 0x0, 0x0, 0x1}, // mGObjTg
+ {0x0}, // mGObjCo
+ }, // mObjInf
+ {
+ {0.0f, 0.0f, 0.0f}, // mCenter
+ 400.0f, // mRadius
+ 0.0f // mHeight
+ } // mCyl
+ };
+
if (l_cyl_height_init == 0) {
ccCylSrc.mCyl.mHeight = (f32)(mPieceNum + 1) * 800.0f - 100.f;
l_cyl_height_init = 1;
diff --git a/src/d/actor/d_a_obj_riverrock.cpp b/src/d/actor/d_a_obj_riverrock.cpp
index ecf841b3f6..81ad137d34 100644
--- a/src/d/actor/d_a_obj_riverrock.cpp
+++ b/src/d/actor/d_a_obj_riverrock.cpp
@@ -103,7 +103,7 @@ void daObjRIVERROCK_c::CheckBG() {
field_0x5d0 = particlePos;
}
-static bool mHIOInitialized;
+static bool hio_set;
static daObjRIVERROCK_HIO_c l_HIO;
@@ -244,8 +244,8 @@ int daObjRIVERROCK_c::create() {
} else {
field_0x5c4.set(1.0f, 1.0f, 1.0f);
}
- if (!mHIOInitialized) {
- mHIOInitialized = true;
+ if (!hio_set) {
+ hio_set = true;
mHIONeedDelete = true;
l_HIO.field_0x4 = -1;
}
@@ -304,7 +304,7 @@ int daObjRIVERROCK_c::Draw() {
int daObjRIVERROCK_c::Delete() {
dComIfG_resDelete(&mPhase, l_arcName);
if (mHIONeedDelete) {
- mHIOInitialized = false;
+ hio_set = false;
}
mSoundObj.deleteObject();
return 1;
diff --git a/src/d/actor/d_a_obj_rock.cpp b/src/d/actor/d_a_obj_rock.cpp
index 072bf8bbee..2301852a13 100644
--- a/src/d/actor/d_a_obj_rock.cpp
+++ b/src/d/actor/d_a_obj_rock.cpp
@@ -89,19 +89,19 @@ static int set_pos_check(obj_rock_class* i_this, int target_index) {
return TRUE;
}
-static dCcD_SrcSph cc_sph_src = {
- {
- {0x0, {{0x0, 0x0, 0x0}, {0xd8fbfdff, 0x11}, 0x79}}, // mObj
- {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
- {dCcD_SE_METAL, 0x2, 0x0, 0x0, 0x3}, // mGObjTg
- {0x0}, // mGObjCo
- }, // mObjInf
- {
- {{0.0f, 0.0f, 0.0f}, 40.0f} // mSph
- } // mSphAttr
-};
-
static int daObj_Rock_Create(fopAc_ac_c* i_this) {
+ static dCcD_SrcSph cc_sph_src = {
+ {
+ {0x0, {{0x0, 0x0, 0x0}, {0xd8fbfdff, 0x11}, 0x79}}, // mObj
+ {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
+ {dCcD_SE_METAL, 0x2, 0x0, 0x0, 0x3}, // mGObjTg
+ {0x0}, // mGObjCo
+ }, // mObjInf
+ {
+ {{0.0f, 0.0f, 0.0f}, 40.0f} // mSph
+ } // mSphAttr
+ };
+
obj_rock_class* a_this = static_cast<obj_rock_class*>(i_this);
fopAcM_ct(a_this, obj_rock_class);
diff --git a/src/d/actor/d_a_obj_so.cpp b/src/d/actor/d_a_obj_so.cpp
index 921f8b74ab..ebf7648909 100644
--- a/src/d/actor/d_a_obj_so.cpp
+++ b/src/d/actor/d_a_obj_so.cpp
@@ -877,7 +877,7 @@ static void demo_camera(obj_so_class* i_this) {
}
}
-static u8 data_80CE3C90;
+static u8 hio_set;
static daObj_So_HIO_c l_HIO;
@@ -909,8 +909,8 @@ static int daObj_So_Delete(obj_so_class* i_this) {
dComIfG_resDelete(&i_this->mPhase, "Obj_so");
if (i_this->field_0x1bcc != 0) {
- data_80CE3C90 = 0;
- mDoHIO_DELETE_CHILD(data_80CE3C90);
+ hio_set = 0;
+ mDoHIO_DELETE_CHILD(hio_set);
}
for (int i = 0; i < 2; i++) {
@@ -1027,9 +1027,9 @@ static int daObj_So_Create(fopAc_ac_c* a_this) {
}
}
- if (data_80CE3C90 == 0) {
+ if (hio_set == 0) {
i_this->field_0x1bcc = 1;
- data_80CE3C90 = 1;
+ hio_set = 1;
mDoHIO_CREATE_CHILD("猿オリOBJ", &l_HIO); // Monkey jail OBJ
l_HIO.field_0x4 = -1;
}
diff --git a/src/d/actor/d_a_obj_ten.cpp b/src/d/actor/d_a_obj_ten.cpp
index 0cfb3c3e61..729f3ac8a9 100644
--- a/src/d/actor/d_a_obj_ten.cpp
+++ b/src/d/actor/d_a_obj_ten.cpp
@@ -615,12 +615,12 @@ void daObjTEN_c::Z_BufferChk() {
field_0x618 = ((near + ((far * near) / local_5c.z)) / (far - near) + 1.0f) * 16777215.0f;
}
-static u8 data_80D0BAB8;
+static u8 hio_set;
int daObjTEN_c::Delete() {
dComIfG_resDelete(&mPhase, "I_Ten");
if (field_0xa64 != 0) {
- data_80D0BAB8 = 0;
+ hio_set = 0;
}
mCreature.deleteObject();
return 1;
@@ -722,8 +722,8 @@ int daObjTEN_c::create() {
if (fopAcM_entrySolidHeap(this, useHeapInit, 0xbc0) == 0) {
return cPhs_ERROR_e;
}
- if (data_80D0BAB8 == 0) {
- data_80D0BAB8 = 1;
+ if (hio_set == 0) {
+ hio_set = 1;
field_0xa64 = 1;
l_HIO.field_0x4 = -1;
}
diff --git a/src/d/actor/d_a_obj_web0.cpp b/src/d/actor/d_a_obj_web0.cpp
index 470ca3536f..e9182f827b 100644
--- a/src/d/actor/d_a_obj_web0.cpp
+++ b/src/d/actor/d_a_obj_web0.cpp
@@ -157,13 +157,13 @@ static int daObj_Web0_IsDelete(obj_web0_class* i_this) {
return 1;
}
-static u8 data_80D35290;
+static u8 hio_set;
static int daObj_Web0_Delete(obj_web0_class* i_this) {
dComIfG_resDelete(&i_this->mPhase, "Obj_web0");
if (i_this->field_0x739) {
- data_80D35290 = 0;
+ hio_set = 0;
}
dComIfG_Bgsp().Release(i_this->mpBgW);
@@ -251,9 +251,9 @@ static int daObj_Web0_Create(fopAc_ac_c* i_this) {
return cPhs_ERROR_e;
}
- if (!data_80D35290) {
+ if (!hio_set) {
_this->field_0x739 = 1;
- data_80D35290 = true;
+ hio_set = true;
l_HIO.field_0x4 = -1;
}
diff --git a/src/d/actor/d_a_obj_web1.cpp b/src/d/actor/d_a_obj_web1.cpp
index bf3fb86dbc..ac5020f8d6 100644
--- a/src/d/actor/d_a_obj_web1.cpp
+++ b/src/d/actor/d_a_obj_web1.cpp
@@ -181,13 +181,13 @@ static int daObj_Web1_IsDelete(obj_web1_class* i_this) {
return 1;
}
-static u8 data_80D361F8;
+static u8 hio_set;
static int daObj_Web1_Delete(obj_web1_class* i_this) {
dComIfG_resDelete(&i_this->mPhase, "Obj_web1");
if (i_this->field_0x76c) {
- data_80D361F8 = 0;
+ hio_set = 0;
}
dComIfG_Bgsp().Release(i_this->mpBgW);
@@ -279,9 +279,9 @@ static int daObj_Web1_Create(fopAc_ac_c* i_this) {
return cPhs_ERROR_e;
}
- if (!data_80D361F8) {
+ if (!hio_set) {
_this->field_0x76c = 1;
- data_80D361F8 = true;
+ hio_set = true;
l_HIO.field_0x4 = -1;
}
diff --git a/src/d/actor/d_a_obj_wflag.cpp b/src/d/actor/d_a_obj_wflag.cpp
index 979934f296..7c35664b04 100644
--- a/src/d/actor/d_a_obj_wflag.cpp
+++ b/src/d/actor/d_a_obj_wflag.cpp
@@ -27,10 +27,10 @@ static int daObj_Wflag_Draw(obj_wflag_class* i_this) {
return 1;
}
-static f32 pd[19] = {1.0f, 0.9f, 0.8f, 0.7f, 0.6f, 0.5f, 0.4f, 0.3f, 0.2f, 0.2f,
- 0.2f, 0.2f, 0.2f, 0.2f, 0.2f, 0.2f, 0.2f, 0.2f, 0.2f};
-
static void tail_control(fopAc_ac_c* param_1, wf_tail_s* param_2) {
+ static f32 pd[19] = {1.0f, 0.9f, 0.8f, 0.7f, 0.6f, 0.5f, 0.4f, 0.3f, 0.2f, 0.2f,
+ 0.2f, 0.2f, 0.2f, 0.2f, 0.2f, 0.2f, 0.2f, 0.2f, 0.2f};
+
cXyz local_74;
cXyz cStack_80;
int i;
diff --git a/src/d/actor/d_a_obj_ystone.cpp b/src/d/actor/d_a_obj_ystone.cpp
index 7b0681700a..d94f5e702d 100644
--- a/src/d/actor/d_a_obj_ystone.cpp
+++ b/src/d/actor/d_a_obj_ystone.cpp
@@ -19,18 +19,6 @@ static char const* l_arcName[7] = {
"MirrorB",
};
-static char const* l_stageName[9] = {
- "D_MN05A",
- "D_MN04A",
- "D_MN01A",
- "D_MN10A",
- "D_MN11A",
- "D_MN06A",
- "D_MN07A",
- "D_MN01A",
- "D_MN01A",
-};
-
static int const l_bmdIndex[7] = {4, 4, 4, 9, 9, 10, 11};
static int const l_brkIndex[3] = {7, 7, 7};
@@ -38,6 +26,18 @@ static int const l_brkIndex[3] = {7, 7, 7};
static int const l_btkIndex[7] = {14, 14, 14, 14, 14, 15, 16};
static int getNowLevel() {
+ static char const* l_stageName[9] = {
+ "D_MN05A",
+ "D_MN04A",
+ "D_MN01A",
+ "D_MN10A",
+ "D_MN11A",
+ "D_MN06A",
+ "D_MN07A",
+ "D_MN01A",
+ "D_MN01A",
+ };
+
for (int i = 0; i < 9; i++) {
if (!strcmp(dComIfGp_getStartStageName(), l_stageName[i])) {
return i + 1;
diff --git a/src/d/actor/d_a_tag_kago_fall.cpp b/src/d/actor/d_a_tag_kago_fall.cpp
index d3b90f3458..5f5435761b 100644
--- a/src/d/actor/d_a_tag_kago_fall.cpp
+++ b/src/d/actor/d_a_tag_kago_fall.cpp
@@ -56,7 +56,7 @@ int daTagKagoFall_c::execute() {
return TRUE;
}
-void daTagKagoFall_c::setActionMode(ActionMode mode, u8 state) {
+void daTagKagoFall_c::setActionMode(u8 mode, u8 state) {
mActionMode = mode;
mActionState = state;
}
diff --git a/src/d/actor/d_a_tag_statue_evt.cpp b/src/d/actor/d_a_tag_statue_evt.cpp
index 538420e3ff..a0d4f694c3 100644
--- a/src/d/actor/d_a_tag_statue_evt.cpp
+++ b/src/d/actor/d_a_tag_statue_evt.cpp
@@ -241,33 +241,33 @@ void daTagStatue_c::actionDead() {
/* empty function */
}
-static char* action_table[3] = {
- "WAIT",
- "ST_MOVE",
- "ITEM"
-};
-
-// Saved positions of Owl Statues for cutscenes
-static Vec l_statue_pos[6] = {
- {-17312.3007812f, -349.100006104f, -20523.1992188f}, // Faron Woods
- {-17312.3007812f, -349.100006104f, -20523.1992188f}, // Gerudo Desert
- {-9675.59960938f, -4800.0f, 39693.8984375f}, // Kakariko Gorge
- {33345.6015625f, -75.5999984741f, -36331.1015625f}, // Great Eldin Bridge
- {-94009.5f, -5440.10009766f, 18534.9003906f}, // Lake Hylia
- {-81451.296875f, -1654.09997559f, 20832.1992188} // Ruined Theatre
-};
-
-// Saved y orientations of Owl Statues for cutscenes
-static s16 l_statue_ang[6] = {
- 16384, // Faron Woods
- 16384, // Gerudo Desert
- 8485, // Kakariko Gorge
- 16384, // Great Eldin Bridge
- 16384, // Lake Hylia
- 16384 // Ruined Theatre
-};
-
int daTagStatue_c::demoProc() {
+ static char* action_table[3] = {
+ "WAIT",
+ "ST_MOVE",
+ "ITEM"
+ };
+
+ // Saved positions of Owl Statues for cutscenes
+ static Vec l_statue_pos[6] = {
+ {-17312.3007812f, -349.100006104f, -20523.1992188f}, // Faron Woods
+ {-17312.3007812f, -349.100006104f, -20523.1992188f}, // Gerudo Desert
+ {-9675.59960938f, -4800.0f, 39693.8984375f}, // Kakariko Gorge
+ {33345.6015625f, -75.5999984741f, -36331.1015625f}, // Great Eldin Bridge
+ {-94009.5f, -5440.10009766f, 18534.9003906f}, // Lake Hylia
+ {-81451.296875f, -1654.09997559f, 20832.1992188} // Ruined Theatre
+ };
+
+ // Saved y orientations of Owl Statues for cutscenes
+ static s16 l_statue_ang[6] = {
+ 16384, // Faron Woods
+ 16384, // Gerudo Desert
+ 8485, // Kakariko Gorge
+ 16384, // Great Eldin Bridge
+ 16384, // Lake Hylia
+ 16384 // Ruined Theatre
+ };
+
int act_id = dComIfGp_evmng_getMyActIdx(mStaffId, action_table, ARRAY_SIZEU(action_table), 0, 0);
if(dComIfGp_evmng_getIsAddvance(mStaffId)) {
diff --git a/src/d/d_msg_scrn_staff.cpp b/src/d/d_msg_scrn_staff.cpp
index aeeae95c0d..cbba48b164 100644
--- a/src/d/d_msg_scrn_staff.cpp
+++ b/src/d/d_msg_scrn_staff.cpp
@@ -11,11 +11,11 @@
#include "d/d_msg_object.h"
#include "d/d_pane_class.h"
-static u64 t_tag[6] = {
- 'right_s', 'right', 'center_s', 'center', 'left_s', 'left',
-};
-
dMsgScrnStaff_c::dMsgScrnStaff_c(u8 unused) {
+ static u64 t_tag[6] = {
+ 'right_s', 'right', 'center_s', 'center', 'left_s', 'left',
+ };
+
init();
field_0xd0 = 0.0f;