summaryrefslogtreecommitdiff
path: root/src/actors/item_box/render.inc.c
diff options
context:
space:
mode:
authorSonic Dreamcaster <alejandro.asenjo88@gmail.com>2025-05-17 03:07:04 -0300
committerSonic Dreamcaster <alejandro.asenjo88@gmail.com>2025-05-17 03:07:04 -0300
commit8667da55b90a2884b24da41b4633ef80ff77763d (patch)
tree6f5e51a95a8191f1836ca2c4e64739096777348d /src/actors/item_box/render.inc.c
parent1228f206e17ebdadc14248afdbfcbee3ec5540bb (diff)
tag and fix item boxes
Diffstat (limited to 'src/actors/item_box/render.inc.c')
-rw-r--r--src/actors/item_box/render.inc.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/actors/item_box/render.inc.c b/src/actors/item_box/render.inc.c
index 0d02c3979..81670381e 100644
--- a/src/actors/item_box/render.inc.c
+++ b/src/actors/item_box/render.inc.c
@@ -3,6 +3,8 @@
#include <macros.h>
#include "port/interpolation/FrameInterpolation.h"
+#define TAG_ITEM_ADDR(x) ((u32) 0x10000000 | (u32) x)
+
/**
* @brief Renders the item box actor.
*
@@ -27,8 +29,8 @@ void render_actor_item_box(Camera* camera, struct ItemBox* item_box) {
f32 temp_f2_2;
f32 someMultiplier;
- FrameInterpolation_RecordMatrixPush(someMatrix1);
- FrameInterpolation_RecordMatrixPush(someMatrix2);
+ // @port: Tag the transform.
+ FrameInterpolation_RecordOpenChild(TAG_ITEM_ADDR(item_box), 0);
temp_f0 = is_within_render_distance(camera->pos, item_box->pos, camera->rot[1], 0.0f, gCameraZoom[camera - camera1],
4000000.0f);
@@ -78,18 +80,18 @@ void render_actor_item_box(Camera* camera, struct ItemBox* item_box) {
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
- if ((item_box->rot[1] < 0xAA1) && (item_box->rot[1] > 0)) {
- gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
- } else if ((item_box->rot[1] >= 0x6AA5) && (item_box->rot[1] < 0x754E)) {
- gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
- } else if ((item_box->rot[1] >= 0x38E1) && (item_box->rot[1] < 0x438A)) {
- gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
- } else if ((item_box->rot[1] >= 0xC711) && (item_box->rot[1] < 0xD1BA)) {
- gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
- } else {
+ // if ((item_box->rot[1] < 0xAA1) && (item_box->rot[1] > 0)) {
+ // gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
+ // } else if ((item_box->rot[1] >= 0x6AA5) && (item_box->rot[1] < 0x754E)) {
+ // gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
+ // } else if ((item_box->rot[1] >= 0x38E1) && (item_box->rot[1] < 0x438A)) {
+ // gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
+ // } else if ((item_box->rot[1] >= 0xC711) && (item_box->rot[1] < 0xD1BA)) {
+ // gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
+ // } else {
gDPSetBlendMask(gDisplayListHead++, 0xFF);
gDPSetRenderMode(gDisplayListHead++, G_RM_ZB_CLD_SURF, G_RM_ZB_CLD_SURF2);
- }
+ // }
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
gSPDisplayList(gDisplayListHead++, D_0D003090);
} else {
@@ -183,7 +185,6 @@ void render_actor_item_box(Camera* camera, struct ItemBox* item_box) {
}
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
}
-
- FrameInterpolation_RecordMatrixPop(someMatrix1);
- FrameInterpolation_RecordMatrixPop(someMatrix2);
+ // @port Pop the transform id.
+ FrameInterpolation_RecordCloseChild();
}