summaryrefslogtreecommitdiff
path: root/src/engine/actors/FallingRock.cpp
diff options
context:
space:
mode:
authorMegaMech <MegaMech@users.noreply.github.com>2026-03-06 20:10:07 -0700
committerGitHub <noreply@github.com>2026-03-06 20:10:07 -0700
commit132357d9fb50d7962518e10b22db358c85d87ba5 (patch)
tree428671c5f9d888bb6905fe20c07d26a70430b392 /src/engine/actors/FallingRock.cpp
parent25d49df90fe1ab2c95c962d45ef146cb5cf0c794 (diff)
Big Interpolation Overhaul (#674)
* Fix FI * FI statue * Intepr fixes * Improve * More interp * Fix compile * More interp * Fix text
Diffstat (limited to 'src/engine/actors/FallingRock.cpp')
-rw-r--r--src/engine/actors/FallingRock.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/engine/actors/FallingRock.cpp b/src/engine/actors/FallingRock.cpp
index d32b65c9d..4cd4b72ce 100644
--- a/src/engine/actors/FallingRock.cpp
+++ b/src/engine/actors/FallingRock.cpp
@@ -24,6 +24,7 @@ AFallingRock::AFallingRock(SpawnParams params) : AActor(params) {
Type = ACTOR_FALLING_ROCK;
Name = "Falling Rock";
ResourceName = "mk:falling_rock";
+ _idx = _count;
FVector pos = params.Location.value_or(FVector(0, 0, 0));
TimerLength = params.Behaviour.value_or(80);
@@ -179,7 +180,7 @@ void AFallingRock::Draw(Camera* camera) {
sp98[2] = 0;
sp8C[1] = height + 2.0f;
- FrameInterpolation_RecordOpenChild("rock_shadow", (uintptr_t) this);
+ FrameInterpolation_RecordOpenChild("rock_shadow", (_idx << 4) | camera->cameraId);
mtxf_pos_rotation_xyz(mtx, sp8C, sp98);
if (render_set_position(mtx, 0) == 0) {
FrameInterpolation_RecordCloseChild();
@@ -190,18 +191,15 @@ void AFallingRock::Draw(Camera* camera) {
}
}
- // @port: Tag the transform.
- FrameInterpolation_RecordOpenChild("rock", (uintptr_t) this);
+ FrameInterpolation_RecordOpenChild("rock", (_idx << 4) | camera->cameraId);
mtxf_pos_rotation_xyz(mtx, Pos, Rot);
if (render_set_position(mtx, 0) == 0) {
- // @port Pop the transform id.
FrameInterpolation_RecordCloseChild();
return;
}
gSPDisplayList(gDisplayListHead++, (Gfx*)d_course_choco_mountain_dl_falling_rock);
- // @port Pop the transform id.
FrameInterpolation_RecordCloseChild();
}