summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSonic Dreamcaster <alejandro.asenjo88@gmail.com>2025-05-17 03:30:45 -0300
committerSonic Dreamcaster <alejandro.asenjo88@gmail.com>2025-05-17 03:30:45 -0300
commit06cb8a7c29976177a2d718d1f488b31cb37fbffc (patch)
tree4e8760b0284ec63f7e33db853d6fa6a6636bdf10 /src
parent6090347aeb343f3269345c52a513cc6513678939 (diff)
tag fake item box and whatever func_800696CC is
Diffstat (limited to 'src')
-rw-r--r--src/actors/fake_item_box/render.inc.c6
-rw-r--r--src/actors/item_box/render.inc.c2
-rw-r--r--src/code_80057C60.c12
-rw-r--r--src/port/interpolation/FrameInterpolation.h5
4 files changed, 22 insertions, 3 deletions
diff --git a/src/actors/fake_item_box/render.inc.c b/src/actors/fake_item_box/render.inc.c
index 7d0dab71e..ac1621b4f 100644
--- a/src/actors/fake_item_box/render.inc.c
+++ b/src/actors/fake_item_box/render.inc.c
@@ -2,6 +2,7 @@
#include <code_800029B0.h>
#include <libultra/gbi.h>
#include <main.h>
+#include "port/interpolation/FrameInterpolation.h"
/**
* @brief Renders the fake item box actor.
@@ -24,6 +25,9 @@ void render_actor_fake_item_box(Camera* camera, struct FakeItemBox* fakeItemBox)
f32 temp_f2_2;
f32 someMultiplier;
+ // @port: Tag the transform.
+ FrameInterpolation_RecordOpenChild(TAG_ITEM_ADDR(fakeItemBox), 0);
+
if (is_within_render_distance(camera->pos, fakeItemBox->pos, camera->rot[1], 2500.0f, gCameraZoom[camera - camera1],
1000000.0f) < 0 &&
CVarGetInteger("gNoCulling", 0) == 0) {
@@ -163,4 +167,6 @@ void render_actor_fake_item_box(Camera* camera, struct FakeItemBox* fakeItemBox)
gSPDisplayList(gDisplayListHead++, D_0D0030F8);
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
}
+ // @port Pop the transform id.
+ FrameInterpolation_RecordCloseChild();
}
diff --git a/src/actors/item_box/render.inc.c b/src/actors/item_box/render.inc.c
index 77cbfbd8f..8c2591295 100644
--- a/src/actors/item_box/render.inc.c
+++ b/src/actors/item_box/render.inc.c
@@ -3,7 +3,7 @@
#include <macros.h>
#include "port/interpolation/FrameInterpolation.h"
-#define TAG_ITEM_ADDR(x) ((u32) 0x10000000 | (u32) x)
+
/**
* @brief Renders the item box actor.
diff --git a/src/code_80057C60.c b/src/code_80057C60.c
index 24ce0abe7..f9d56af83 100644
--- a/src/code_80057C60.c
+++ b/src/code_80057C60.c
@@ -39,6 +39,7 @@
#include <assets/some_data.h>
#include "port/Game.h"
#include "engine/Matrix.h"
+#include "port/interpolation/FrameInterpolation.h"
//! @warning this macro is undef'd at the end of this file
#define MAKE_RGB(r, g, b) (((r) << 0x10) | ((g) << 0x08) | (b << 0x00))
@@ -769,7 +770,7 @@ void render_object_for_player(s32 cameraId) {
render_object_leaf_particle(cameraId);
if (D_80165730 != 0) {
- //render_balloons_grand_prix(cameraId);
+ // render_balloons_grand_prix(cameraId);
}
if (gModeSelection == BATTLE) {
CM_DrawBattleBombKarts(cameraId);
@@ -1632,7 +1633,7 @@ void update_object(void) {
// update_ferries_smoke_particle();
// break;
// }
- //if (D_80165730 != 0) {
+ // if (D_80165730 != 0) {
// func_80074EE8(); // Grand prix balloons
//}
func_80076F2C();
@@ -5737,6 +5738,10 @@ void func_800696CC(Player* player, UNUSED s8 arg1, s16 arg2, s8 arg3, f32 arg4)
sp54[0] = 0;
sp54[1] = player->unk_048[arg3];
sp54[2] = 0;
+
+ // @port: Tag the transform.
+ FrameInterpolation_RecordOpenChild("func_800696CC", TAG_OBJECT(arg2));
+
func_800652D4(sp5C, sp54, player->size * arg4);
gSPDisplayList(gDisplayListHead++, D_0D008D58);
gDPSetTextureLUT(gDisplayListHead++, G_TT_NONE);
@@ -5748,6 +5753,9 @@ void func_800696CC(Player* player, UNUSED s8 arg1, s16 arg2, s8 arg3, f32 arg4)
gSPVertex(gDisplayListHead++, D_800E87C0, 4, 0);
gSPDisplayList(gDisplayListHead++, D_0D008DA0);
gMatrixEffectCount += 1;
+
+ // @port Pop the transform id.
+ FrameInterpolation_RecordCloseChild();
}
}
diff --git a/src/port/interpolation/FrameInterpolation.h b/src/port/interpolation/FrameInterpolation.h
index 87012f66b..5d3f9cb35 100644
--- a/src/port/interpolation/FrameInterpolation.h
+++ b/src/port/interpolation/FrameInterpolation.h
@@ -10,11 +10,16 @@
#include <unordered_map>
+
+
std::unordered_map<Mtx*, MtxF> FrameInterpolation_Interpolate(float step);
extern "C" {
#endif
+#define TAG_ITEM_ADDR(x) ((u32) 0x10000000 | (u32) x)
+#define TAG_OBJECT(x) ((u32) 0x40000000 | (u32) (x))
+
void FrameInterpolation_ShouldInterpolateFrame(bool shouldInterpolate);
void FrameInterpolation_StartRecord(void);