summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSonic Dreamcaster <alejandro.asenjo88@gmail.com>2025-05-20 22:06:18 -0300
committerSonic Dreamcaster <alejandro.asenjo88@gmail.com>2025-05-20 22:06:18 -0300
commit1024abdd4afcde0d71866e1b6344436a257ce29b (patch)
tree390a7f54470921892aadb909a883488449b7f7e5
parentf4f06585c758f2e1ce584496eeec4c65f8461a92 (diff)
fix tags
-rw-r--r--src/engine/objects/Bat.cpp55
-rw-r--r--src/engine/objects/Boos.cpp11
-rw-r--r--src/engine/objects/TrashBin.cpp2
3 files changed, 38 insertions, 30 deletions
diff --git a/src/engine/objects/Bat.cpp b/src/engine/objects/Bat.cpp
index 2056a17f7..e4f3a2086 100644
--- a/src/engine/objects/Bat.cpp
+++ b/src/engine/objects/Bat.cpp
@@ -23,7 +23,7 @@ OBat::OBat(const FVector& pos, const IRotator& rot) {
Name = "Bat";
find_unused_obj_index(&_objectIndex);
- init_texture_object(_objectIndex, (uint8_t*)d_course_banshee_boardwalk_bat_tlut, sBoardwalkTexList, 0x20U,
+ init_texture_object(_objectIndex, (uint8_t*) d_course_banshee_boardwalk_bat_tlut, sBoardwalkTexList, 0x20U,
(u16) 0x00000040);
gObjectList[_objectIndex].orientation[0] = rot.pitch;
gObjectList[_objectIndex].orientation[1] = rot.roll;
@@ -102,59 +102,64 @@ void OBat::Tick() {
}
void OBat::Draw(s32 cameraId) {
- s32 var_s2;
- s32 objectIndex;
- Camera* temp_s7;
+ s32 i;
+ s32 objectIndex = _objectIndex;
+ Camera* cam = &camera1[cameraId];
- objectIndex = _objectIndex;
- temp_s7 = &camera1[cameraId];
- OBat::func_80046F60((u8*)gObjectList[objectIndex].activeTLUT, (u8*)gObjectList[objectIndex].activeTexture, 0x00000020, 0x00000040,
- 5);
+ OBat::func_80046F60((u8*) gObjectList[objectIndex].activeTLUT, (u8*) gObjectList[objectIndex].activeTexture,
+ 0x00000020, 0x00000040, 5);
D_80183E80[0] = gObjectList[objectIndex].orientation[0];
D_80183E80[2] = gObjectList[objectIndex].orientation[2];
+
if ((D_8018CFB0 != 0) || (D_8018CFC8 != 0)) {
- for (var_s2 = 0; var_s2 < 40; var_s2++) {
- // @port: Tag the transform.
- FrameInterpolation_RecordOpenChild("Bat set 1", var_s2);
- objectIndex = gObjectParticle2[var_s2];
+ for (i = 0; i < 40; i++) {
+ objectIndex = gObjectParticle2[i];
if (objectIndex == -1) {
continue;
}
if ((gObjectList[objectIndex].state >= 2) && (gMatrixHudCount < 0x2EF)) {
+ // @port: Tag the transform.
+ FrameInterpolation_RecordOpenChild("Bat set 1", (uintptr_t) &gObjectList[objectIndex]);
+
D_80183E80[1] =
- func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], temp_s7->pos);
+ func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], cam->pos);
func_800431B0(gObjectList[objectIndex].pos, D_80183E80, gObjectList[objectIndex].sizeScaling,
- (Vtx*)D_0D0062B0);
+ (Vtx*) D_0D0062B0);
+
+ // @port Pop the transform id.
+ FrameInterpolation_RecordCloseChild();
}
- // @port Pop the transform id.
- FrameInterpolation_RecordCloseChild();
}
}
+
if ((D_8018CFE8 != 0) || (D_8018D000 != 0)) {
- for (var_s2 = 0; var_s2 < 30; var_s2++) {
- // @port: Tag the transform.
- FrameInterpolation_RecordOpenChild("Bat set 2", var_s2);
- objectIndex = gObjectParticle3[var_s2];
+ for (i = 0; i < 30; i++) {
+
+ objectIndex = gObjectParticle3[i];
if (objectIndex == -1) {
continue;
}
if ((gObjectList[objectIndex].state >= 2) && (gMatrixHudCount < 0x2EF)) {
+ // @port: Tag the transform.
+ FrameInterpolation_RecordOpenChild("Bat set 2", (uintptr_t) &gObjectList[objectIndex]);
+
D_80183E80[1] =
- func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], temp_s7->pos);
+ func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], cam->pos);
func_800431B0(gObjectList[objectIndex].pos, D_80183E80, gObjectList[objectIndex].sizeScaling,
- (Vtx*)D_0D0062B0);
+ (Vtx*) D_0D0062B0);
+
+ // @port Pop the transform id.
+ FrameInterpolation_RecordCloseChild();
}
- // @port Pop the transform id.
- FrameInterpolation_RecordCloseChild();
}
}
gSPTexture(gDisplayListHead++, 0x0001, 0x0001, 0, G_TX_RENDERTILE, G_OFF);
}
void OBat::func_80046F60(u8* tlut, u8* arg1, s32 arg2, s32 arg3, s32 arg4) {
- gSPDisplayList(gDisplayListHead++, (Gfx*)D_0D007D78);
+ gSPDisplayList(gDisplayListHead++, (Gfx*) D_0D007D78);
gDPLoadTLUT_pal256(gDisplayListHead++, tlut);
rsp_load_texture_mask(arg1, arg2, arg3, arg4);
}
diff --git a/src/engine/objects/Boos.cpp b/src/engine/objects/Boos.cpp
index 69bb95072..5f02d7876 100644
--- a/src/engine/objects/Boos.cpp
+++ b/src/engine/objects/Boos.cpp
@@ -83,20 +83,23 @@ void OBoos::Draw(s32 cameraId) {
s32 objectIndex;
for (size_t i = 0; i < _numBoos; i++) {
- // @port: Tag the transform.
- FrameInterpolation_RecordOpenChild("Boo", i);
objectIndex = _indices[i]; //indexObjectList3[i];
if (gObjectList[objectIndex].state >= 2) {
temp_s2 = func_8008A364(objectIndex, cameraId, 0x4000U, 0x00000320);
if (CVarGetInteger("gNoCulling", 0) == 1) {
temp_s2 = MIN(temp_s2, 0x15F91U);
}
+
+ // @port: Tag the transform.
+ FrameInterpolation_RecordOpenChild("Boo", (uintptr_t)&gObjectList[objectIndex]);
+
if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) {
func_800523B8(objectIndex, cameraId, temp_s2);
}
+
+ // @port Pop the transform id.
+ FrameInterpolation_RecordCloseChild();
}
- // @port Pop the transform id.
- FrameInterpolation_RecordCloseChild();
}
}
diff --git a/src/engine/objects/TrashBin.cpp b/src/engine/objects/TrashBin.cpp
index 361b93631..89ac5dae5 100644
--- a/src/engine/objects/TrashBin.cpp
+++ b/src/engine/objects/TrashBin.cpp
@@ -65,7 +65,7 @@ void OTrashBin::Draw(s32 cameraId) {
Vec3s Rot = { 0, 0x4000, 0 };
// @port: Tag the transform.
- FrameInterpolation_RecordOpenChild("Bin", (uintptr_t) object);
+ FrameInterpolation_RecordOpenChild("OTrashBin", (uintptr_t) object);
mtxf_pos_rotation_xyz(mtx, Pos, Rot);
//mtxf_scale(mtx, 1.0f);