summaryrefslogtreecommitdiff
path: root/src/d
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2025-08-31 22:25:42 -0400
committerLagoLunatic <LagoLunatic@users.noreply.github.com>2025-08-31 22:25:42 -0400
commit2866b1570fc74d329fc4e4a5bb67bd3fe08b9ab5 (patch)
treeb06c82c7a900c37d1580ea8158948ae724f78a5b /src/d
parent0c71bad908e7cc2d039b9cb6c9c79e37566714b2 (diff)
gy_ctrl OK
Diffstat (limited to 'src/d')
-rw-r--r--src/d/actor/d_a_canon.cpp4
-rw-r--r--src/d/actor/d_a_gy_ctrl.cpp22
-rw-r--r--src/d/actor/d_a_obj_ikada.cpp22
3 files changed, 13 insertions, 35 deletions
diff --git a/src/d/actor/d_a_canon.cpp b/src/d/actor/d_a_canon.cpp
index f54f409e..ee440eb7 100644
--- a/src/d/actor/d_a_canon.cpp
+++ b/src/d/actor/d_a_canon.cpp
@@ -24,8 +24,8 @@
#include "f_op/f_op_camera_mng.h"
#include "m_Do/m_Do_controller_pad.h"
-static LIGHT_INFLUENCE plight;
-static WIND_INFLUENCE pwind;
+LIGHT_INFLUENCE plight;
+WIND_INFLUENCE pwind;
const char daCanon_c::M_arcname[] = "Bomber";
static const s16 angle_x_tbl[] = {0xF000, 0xF24A, 0xF493, 0xF6DC, 0xF925, 0xFB6E, 0xFDB7, 0x0000};
diff --git a/src/d/actor/d_a_gy_ctrl.cpp b/src/d/actor/d_a_gy_ctrl.cpp
index 0cc6fd90..1ea13e3a 100644
--- a/src/d/actor/d_a_gy_ctrl.cpp
+++ b/src/d/actor/d_a_gy_ctrl.cpp
@@ -19,7 +19,7 @@
class daGy_Ctrl_HIO_c : public mDoHIO_entry_c {
public:
daGy_Ctrl_HIO_c();
- virtual ~daGy_Ctrl_HIO_c();
+ virtual ~daGy_Ctrl_HIO_c() {}
void genMessage(JORMContext*);
@@ -203,9 +203,7 @@ bool daGy_Ctrl_c::checkPath() {
mDoMtx_stack_c::YrotM(tmp2);
mDoMtx_stack_c::transM(sp14.x, sp14.y, sp14.z);
- m3EC[i].x = mDoMtx_stack_c::get()[0][3];
- m3EC[i].y = mDoMtx_stack_c::get()[1][3];
- m3EC[i].z = mDoMtx_stack_c::get()[2][3];
+ mDoMtx_stack_c::multVecZero(&m3EC[i]);
#if VERSION == VERSION_DEMO
m3EC[i].y = getWaterY(m3EC[i]);
@@ -233,12 +231,8 @@ void daGy_Ctrl_c::setPathPos() {
m308[i] = m34C + tmp3;
s16 uVar1 = m308[i];
s16 uVar2 = uVar1 + 0x500;
-#if VERSION == VERSION_DEMO
- f32 tmp = l_HIO.m10 * cM_ssin(uVar1);
- tmp = m348 + tmp;
-#else
- f32 tmp = m348 + l_HIO.m10 * cM_ssin(uVar1);
-#endif
+ f32 tmp4 = l_HIO.m10 * cM_ssin(uVar1);
+ f32 tmp = m348 + tmp4;
cXyz sp14;
sp14.set(tmp, 0.0f, 0.0f);
@@ -246,9 +240,7 @@ void daGy_Ctrl_c::setPathPos() {
mDoMtx_stack_c::YrotM(uVar1);
mDoMtx_stack_c::transM(sp14.x, sp14.y, sp14.z);
- m290[i].x = mDoMtx_stack_c::get()[0][3];
- m290[i].y = mDoMtx_stack_c::get()[1][3];
- m290[i].z = mDoMtx_stack_c::get()[2][3];
+ mDoMtx_stack_c::multVecZero(&m290[i]);
m290[i].y = getWaterY(m290[i]);
@@ -257,9 +249,7 @@ void daGy_Ctrl_c::setPathPos() {
mDoMtx_stack_c::YrotM(uVar2);
mDoMtx_stack_c::transM(sp14.x, sp14.y, sp14.z);
- m2CC[i].x = mDoMtx_stack_c::get()[0][3];
- m2CC[i].y = mDoMtx_stack_c::get()[1][3];
- m2CC[i].z = mDoMtx_stack_c::get()[2][3];
+ mDoMtx_stack_c::multVecZero(&m2CC[i]);
cXyz sp08 = m2CC[i];
sp08.y += l_HIO.m24;
diff --git a/src/d/actor/d_a_obj_ikada.cpp b/src/d/actor/d_a_obj_ikada.cpp
index dee6c9b0..ea4af71d 100644
--- a/src/d/actor/d_a_obj_ikada.cpp
+++ b/src/d/actor/d_a_obj_ikada.cpp
@@ -465,10 +465,7 @@ void daObj_Ikada_c::setRopePos() {
mDoMtx_stack_c::copy(mpModel->getAnmMtx(1));
mDoMtx_stack_c::transM(m_crane_offset.x, m_crane_offset.y, m_crane_offset.z);
-
- pcVar6->x = mDoMtx_stack_c::get()[0][3];
- pcVar6->y = mDoMtx_stack_c::get()[1][3];
- pcVar6->z = mDoMtx_stack_c::get()[2][3];
+ mDoMtx_stack_c::multVecZero(pcVar6);
if (mCurMode == 1) {
ropeEndMtx = mpRopeEnd->getBaseTRMtx();
@@ -534,10 +531,7 @@ void daObj_Ikada_c::setRopePos() {
mDoMtx_stack_c::ZXYrotM(cM_atan2s(sp98.z, sp98.y) + iVar3, shape_angle.y, cM_atan2s(-sp98.x, std::sqrtf(sp98.y * sp98.y + sp98.z * sp98.z)) + iVar4);
mDoMtx_stack_c::XrotM(-0x4000);
-
- m0474.x = mDoMtx_stack_c::get()[0][3];
- m0474.y = mDoMtx_stack_c::get()[1][3];
- m0474.z = mDoMtx_stack_c::get()[2][3];
+ mDoMtx_stack_c::multVecZero(&m0474);
mpRopeEnd->setBaseTRMtx(mDoMtx_stack_c::get());
f32 fVar9 = pcVar7->y;
@@ -643,9 +637,7 @@ void daObj_Ikada_c::setMtx() {
mDoMtx_stack_c::XrotM(mLightRotX);
mDoMtx_stack_c::scaleM(mLightPower, mLightPower, mLightPower);
cMtx_copy(mDoMtx_stack_c::get(), mLightMtx);
- mPLight.mPos.x = mDoMtx_stack_c::get()[0][3];
- mPLight.mPos.y = mDoMtx_stack_c::get()[1][3];
- mPLight.mPos.z = mDoMtx_stack_c::get()[2][3];
+ mDoMtx_stack_c::multVecZero(&mPLight.mPos);
mPLight.mColor.r = 600;
mPLight.mColor.g = 400;
mPLight.mColor.b = 120;
@@ -1394,9 +1386,7 @@ void daObj_Ikada_c::createInit() {
mDoMtx_stack_c::copy(mpModel->getAnmMtx(1));
mDoMtx_stack_c::transM(m_crane_offset.x, m_crane_offset.y, m_crane_offset.z);
- pcVar8->x = mDoMtx_stack_c::get()[0][3];
- pcVar8->y = mDoMtx_stack_c::get()[1][3];
- pcVar8->z = mDoMtx_stack_c::get()[2][3];
+ mDoMtx_stack_c::multVecZero(pcVar8);
cXyz sp80(0.0f, -1.0f, 0.0f);
sp80 *= 10.0f;
@@ -1426,9 +1416,7 @@ void daObj_Ikada_c::createInit() {
mDoMtx_stack_c::transS(pcVar8->x, pcVar8->y, pcVar8->z);
mDoMtx_stack_c::ZXYrotM((s16)cM_atan2s(sp68.z, sp68.y), shape_angle.y, (s16)cM_atan2s(-sp68.x, std::sqrtf(sp68.y * sp68.y + sp68.z * sp68.z)));
mDoMtx_stack_c::XrotM(-0x4000);
- m0474.x = mDoMtx_stack_c::get()[0][3];
- m0474.y = mDoMtx_stack_c::get()[1][3];
- m0474.z = mDoMtx_stack_c::get()[2][3];
+ mDoMtx_stack_c::multVecZero(&m0474);
mpRopeEnd->setBaseTRMtx(mDoMtx_stack_c::get());
}