summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2025-08-26 14:19:24 -0400
committerLagoLunatic <LagoLunatic@users.noreply.github.com>2025-08-26 14:19:24 -0400
commit9a922148c9108730ca5010fb2adfdc189d3db1df (patch)
treefe532b419619eb7449d4bc2a8777b6dbba942d2a /src
parentd8a0ddf8e01e134111d855edaf6855378494dee4 (diff)
bridge regalloc closer
Diffstat (limited to 'src')
-rw-r--r--src/JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.cpp2
-rw-r--r--src/d/actor/d_a_bridge.cpp19
2 files changed, 11 insertions, 10 deletions
diff --git a/src/JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.cpp b/src/JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.cpp
index 3824b5a4..01b7f64b 100644
--- a/src/JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.cpp
+++ b/src/JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.cpp
@@ -218,7 +218,7 @@ u32 J3DModelLoader::calcSizeShape(const J3DShapeBlock* i_block, u32 i_flags) {
}
size += count * sizeof(J3DShape*);
size += factory.calcSizeVcdVatCmdBuffer(count);
- for (J3DModelHierarchy* hierarchy = mpModelHierarchy; hierarchy->mType != 0; hierarchy = hierarchy + 1) {
+ for (J3DModelHierarchy* hierarchy = mpModelHierarchy; hierarchy->mType != 0; hierarchy++) {
if (hierarchy->mType == 0x12) {
size += factory.calcSize(hierarchy->mValue, i_flags);
}
diff --git a/src/d/actor/d_a_bridge.cpp b/src/d/actor/d_a_bridge.cpp
index 820ddd87..c054f228 100644
--- a/src/d/actor/d_a_bridge.cpp
+++ b/src/d/actor/d_a_bridge.cpp
@@ -785,13 +785,14 @@ void bridge_move(bridge_class* i_this) {
i_this->m02F2 = 3000;
i_this->m02F0 = 0x578;
+ f32 tmpf2;
if (*wp > 0.1f) {
- tmpf = 2.0f;
+ tmpf2 = 2.0f;
} else {
- tmpf = 0.0f;
+ tmpf2 = 0.0f;
}
- cLib_addCalc2(&i_this->m02E0, tmpf, 0.1f, 0.1f);
- cLib_addCalc2(&i_this->m02E4, tmpf * 0.3f, 0.1f, 0.05f);
+ cLib_addCalc2(&i_this->m02E0, tmpf2, 0.1f, 0.1f);
+ cLib_addCalc2(&i_this->m02E4, tmpf2 * 0.3f, 0.1f, 0.05f);
break;
case 4:
@@ -855,7 +856,7 @@ bridge_class* search_aite(bridge_class* i_this) {
/* 00002AB8-00003C68 .text daBridge_Execute__FP12bridge_class */
static BOOL daBridge_Execute(bridge_class* i_this) {
- /* Nonmatching */
+ /* Nonmatching - regswap */
fopAc_ac_c* a_player = static_cast<fopAc_ac_c*>(dComIfGp_getPlayer(0));
daPy_py_c* player = static_cast<daPy_py_c*>(dComIfGp_getPlayer(0));
camera_class* pCam = dComIfGp_getCamera(0);
@@ -1111,7 +1112,7 @@ static BOOL daBridge_Execute(bridge_class* i_this) {
pBr->mpModel->setBaseTRMtx(*calc_mtx);
if (((i_this->mTypeBits & 1) == 0) && ((pBr->m408 & 4) != 0)) {
- s32 idx;
+ int idx;
cXyz* segment0 = i_this->mLineMat.getPos(0);
cXyz* segment1 = i_this->mLineMat.getPos(1);
cXyz* segment00;
@@ -1172,9 +1173,9 @@ static BOOL daBridge_Execute(bridge_class* i_this) {
cBgD_Vtx_t* vtxTbl = i_this->mpBgW->GetVtxTbl();
- s32 idx;
- s32 sw;
- s32 other_i = 0;
+ int idx;
+ int sw;
+ int other_i = 0;
for (i = 0; i < i_this->mpBgW->GetVtxNum(); i++, pBr++) {
sw = i & 3;
idx = i;