summaryrefslogtreecommitdiff
path: root/src/engine
diff options
context:
space:
mode:
authorMegaMech <inkstudios1@hotmail.com>2025-05-17 15:33:41 -0600
committerMegaMech <inkstudios1@hotmail.com>2025-05-17 15:33:41 -0600
commita5670c9193a9c56475d93271b980485e17dc6e86 (patch)
tree0db5f6243f4d570df86545aeae2b358b59e8c5a4 /src/engine
parent9635600bdcf79b6b7b2b4c703322c84fb575639b (diff)
Tag more itemsframeinterpolation
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/World.cpp4
-rw-r--r--src/engine/objects/Bat.cpp5
-rw-r--r--src/engine/objects/Boos.cpp3
3 files changed, 12 insertions, 0 deletions
diff --git a/src/engine/World.cpp b/src/engine/World.cpp
index 8e20806ff..9439b97b6 100644
--- a/src/engine/World.cpp
+++ b/src/engine/World.cpp
@@ -7,6 +7,7 @@
#include <memory>
#include "objects/Object.h"
#include "port/Game.h"
+#include "src/port/interpolation/FrameInterpolation.h"
#include "editor/GameObject.h"
@@ -238,8 +239,11 @@ ParticleEmitter* World::AddEmitter(ParticleEmitter* emitter) {
}
void World::DrawObjects(s32 cameraId) {
+ size_t i = 0;
for (const auto& object : Objects) {
+ FrameInterpolation_RecordOpenChild(object, TAG_OBJECT(((u32)&object << 8) + i++));
object->Draw(cameraId);
+ FrameInterpolation_RecordCloseChild();
}
}
diff --git a/src/engine/objects/Bat.cpp b/src/engine/objects/Bat.cpp
index 764476064..d1ecba10e 100644
--- a/src/engine/objects/Bat.cpp
+++ b/src/engine/objects/Bat.cpp
@@ -1,6 +1,7 @@
#include "Bat.h"
#include "World.h"
#include "CoreMath.h"
+#include "src/port/interpolation/FrameInterpolation.h"
extern "C" {
#include "render_objects.h"
@@ -114,6 +115,7 @@ void OBat::Draw(s32 cameraId) {
if ((D_8018CFB0 != 0) || (D_8018CFC8 != 0)) {
for (var_s2 = 0; var_s2 < 40; var_s2++) {
objectIndex = gObjectParticle2[var_s2];
+ FrameInterpolation_RecordOpenChild(&gObjectList[objectIndex], TAG_OBJECT((objectIndex << 8) + var_s2));
if (objectIndex == -1) {
continue;
}
@@ -124,11 +126,13 @@ void OBat::Draw(s32 cameraId) {
func_800431B0(gObjectList[objectIndex].pos, D_80183E80, gObjectList[objectIndex].sizeScaling,
(Vtx*)D_0D0062B0);
}
+ FrameInterpolation_RecordCloseChild();
}
}
if ((D_8018CFE8 != 0) || (D_8018D000 != 0)) {
for (var_s2 = 0; var_s2 < 30; var_s2++) {
objectIndex = gObjectParticle3[var_s2];
+ FrameInterpolation_RecordOpenChild(&gObjectList[objectIndex], TAG_OBJECT((objectIndex << 8) + var_s2));
if (objectIndex == -1) {
continue;
}
@@ -139,6 +143,7 @@ void OBat::Draw(s32 cameraId) {
func_800431B0(gObjectList[objectIndex].pos, D_80183E80, gObjectList[objectIndex].sizeScaling,
(Vtx*)D_0D0062B0);
}
+ FrameInterpolation_RecordCloseChild();
}
}
gSPTexture(gDisplayListHead++, 0x0001, 0x0001, 0, G_TX_RENDERTILE, G_OFF);
diff --git a/src/engine/objects/Boos.cpp b/src/engine/objects/Boos.cpp
index 5bdbd41cf..553a34900 100644
--- a/src/engine/objects/Boos.cpp
+++ b/src/engine/objects/Boos.cpp
@@ -1,6 +1,7 @@
#include "Boos.h"
#include "World.h"
#include "CoreMath.h"
+#include "src/port/interpolation/FrameInterpolation.h"
extern "C" {
#include "render_objects.h"
@@ -83,6 +84,7 @@ void OBoos::Draw(s32 cameraId) {
for (size_t i = 0; i < _numBoos; i++) {
objectIndex = _indices[i]; //indexObjectList3[i];
+ FrameInterpolation_RecordOpenChild(&gObjectList[objectIndex], TAG_OBJECT((objectIndex << 8) + i));
if (gObjectList[objectIndex].state >= 2) {
temp_s2 = func_8008A364(objectIndex, cameraId, 0x4000U, 0x00000320);
if (CVarGetInteger("gNoCulling", 0) == 1) {
@@ -92,6 +94,7 @@ void OBoos::Draw(s32 cameraId) {
func_800523B8(objectIndex, cameraId, temp_s2);
}
}
+ FrameInterpolation_StopRecord();
}
}