summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSonic Dreamcaster <alejandro.asenjo88@gmail.com>2025-05-17 03:54:53 -0300
committerSonic Dreamcaster <alejandro.asenjo88@gmail.com>2025-05-17 03:54:53 -0300
commit19d29604c094450a3a62f334db5b335322fd4b44 (patch)
treef8be4c02b0b995276ae85c8e0ef5d1a9ad9cfa3c
parent3852e7e88b8ff36529c830b376a391a89d430f37 (diff)
tag whatever func_80051ABC is
-rw-r--r--src/render_objects.c47
1 files changed, 30 insertions, 17 deletions
diff --git a/src/render_objects.c b/src/render_objects.c
index cd9d8bf76..b2de13f7c 100644
--- a/src/render_objects.c
+++ b/src/render_objects.c
@@ -46,6 +46,8 @@
#include "engine/courses/Course.h"
#include "engine/Matrix.h"
+#include "port/interpolation/FrameInterpolation.h"
+
Lights1 D_800E45C0[] = {
gdSPDefLights1(100, 0, 0, 100, 0, 0, 0, -120, 0),
gdSPDefLights1(100, 100, 0, 255, 255, 0, 0, -120, 0),
@@ -1679,7 +1681,7 @@ void render_texture_rectangle_wide_left(s32 x, s32 y, s32 width, s32 height, s32
if (gPlayerCount == 3) {
// Center item in area of screen
s32 center = (s32) ((OTRGetDimensionFromLeftEdge(SCREEN_WIDTH) - SCREEN_WIDTH) / 2) +
- ((SCREEN_WIDTH / 4) + (SCREEN_WIDTH / 2));
+ ((SCREEN_WIDTH / 4) + (SCREEN_WIDTH / 2));
s32 coordX = (s32) (center - (width / 2)) << 2;
s32 coordX2 = (s32) (center + (width / 2)) << 2;
gSPWideTextureRectangle(gDisplayListHead++, coordX, yl, coordX2, yh2, G_TX_RENDERTILE, arg4 << 5,
@@ -2682,23 +2684,25 @@ void func_8004EB38(s32 playerId) {
}
if ((u8) temp_s0->unk_7E != 0) {
func_8004C9D8_wide((s32) temp_s0->lapAfterImage1X, temp_s0->lapY + 3, 0x00000080, (u8*) common_texture_hud_lap,
- 0x00000020, 8, 0x00000020, 8);
+ 0x00000020, 8, 0x00000020, 8);
func_8004C9D8_wide(temp_s0->lapAfterImage1X + 0x1C, (s32) temp_s0->lapY, 0x00000080,
- (u8*) gHudLapTextures[temp_s0->alsoLapCount], 0x00000020, 0x00000010, 0x00000020, 0x00000010);
+ (u8*) gHudLapTextures[temp_s0->alsoLapCount], 0x00000020, 0x00000010, 0x00000020,
+ 0x00000010);
}
if ((u8) temp_s0->unk_7F != 0) {
func_8004C9D8_wide((s32) temp_s0->lapAfterImage2X, temp_s0->lapY + 3, 0x00000050, (u8*) common_texture_hud_lap,
- 0x00000020, 8, 0x00000020, 8);
+ 0x00000020, 8, 0x00000020, 8);
func_8004C9D8_wide(temp_s0->lapAfterImage2X + 0x1C, (s32) temp_s0->lapY, 0x00000050,
- (u8*) gHudLapTextures[temp_s0->alsoLapCount], 0x00000020, 0x00000010, 0x00000020, 0x00000010);
+ (u8*) gHudLapTextures[temp_s0->alsoLapCount], 0x00000020, 0x00000010, 0x00000020,
+ 0x00000010);
}
}
void func_8004ED40(s32 arg0) {
func_8004A2F4(playerHUD[arg0].speedometerX, playerHUD[arg0].speedometerY, 0U, 1.0f,
// RGBA
- CM_GetProps()->Minimap.Colour.r, CM_GetProps()->Minimap.Colour.g, CM_GetProps()->Minimap.Colour.b, 0xFF,
- LOAD_ASSET(common_texture_speedometer), LOAD_ASSET(D_0D0064B0), 64, 96, 64, 48);
+ CM_GetProps()->Minimap.Colour.r, CM_GetProps()->Minimap.Colour.g, CM_GetProps()->Minimap.Colour.b,
+ 0xFF, LOAD_ASSET(common_texture_speedometer), LOAD_ASSET(D_0D0064B0), 64, 96, 64, 48);
func_8004A258(D_8018CFEC, D_8018CFF4, D_8016579E, 1.0f, common_texture_speedometer_needle, D_0D005FF0, 0x40, 0x20,
0x40, 0x20);
}
@@ -2708,14 +2712,14 @@ void func_8004EE54(s32 playerId) {
if (gIsMirrorMode != 0) {
func_8004D4E8(CM_GetProps()->Minimap.Pos[playerId].X, CM_GetProps()->Minimap.Pos[playerId].Y, (u8*) D_8018D240,
// RGBA
- CM_GetProps()->Minimap.Colour.r, CM_GetProps()->Minimap.Colour.g, CM_GetProps()->Minimap.Colour.b, 0xFF,
- CM_GetProps()->Minimap.Width, CM_GetProps()->Minimap.Height, CM_GetProps()->Minimap.Width,
+ CM_GetProps()->Minimap.Colour.r, CM_GetProps()->Minimap.Colour.g, CM_GetProps()->Minimap.Colour.b,
+ 0xFF, CM_GetProps()->Minimap.Width, CM_GetProps()->Minimap.Height, CM_GetProps()->Minimap.Width,
CM_GetProps()->Minimap.Height);
} else {
func_8004D37C(CM_GetProps()->Minimap.Pos[playerId].X, CM_GetProps()->Minimap.Pos[playerId].Y, (u8*) D_8018D240,
// RGBA
- CM_GetProps()->Minimap.Colour.r, CM_GetProps()->Minimap.Colour.g, CM_GetProps()->Minimap.Colour.b, 0xFF,
- CM_GetProps()->Minimap.Width, CM_GetProps()->Minimap.Height, CM_GetProps()->Minimap.Width,
+ CM_GetProps()->Minimap.Colour.r, CM_GetProps()->Minimap.Colour.g, CM_GetProps()->Minimap.Colour.b,
+ 0xFF, CM_GetProps()->Minimap.Width, CM_GetProps()->Minimap.Height, CM_GetProps()->Minimap.Width,
CM_GetProps()->Minimap.Height);
}
}
@@ -2745,8 +2749,10 @@ void set_minimap_finishline_position(s32 playerId) {
}
// minimap center pos - minimap left edge + offset
- var_f2 = (center - (CM_GetProps()->Minimap.Width / 2)) + CM_GetProps()->Minimap.PlayerX; // (center - (gMinimapWidth / 2)) + gMinimapPlayerX;
- var_f0 = (CM_GetProps()->Minimap.Pos[playerId].Y - (CM_GetProps()->Minimap.Height / 2)) + CM_GetProps()->Minimap.PlayerY; // (gMinimapY[arg0] - (gMinimapHeight / 2)) + gMinimapPlayerY
+ var_f2 = (center - (CM_GetProps()->Minimap.Width / 2)) +
+ CM_GetProps()->Minimap.PlayerX; // (center - (gMinimapWidth / 2)) + gMinimapPlayerX;
+ var_f0 = (CM_GetProps()->Minimap.Pos[playerId].Y - (CM_GetProps()->Minimap.Height / 2)) +
+ CM_GetProps()->Minimap.PlayerY; // (gMinimapY[arg0] - (gMinimapHeight / 2)) + gMinimapPlayerY
var_f2 += CM_GetProps()->Minimap.FinishlineX;
var_f0 += CM_GetProps()->Minimap.FinishlineY;
@@ -2780,7 +2786,8 @@ void func_8004F168(s32 arg0, s32 playerId, s32 characterId) {
}
temp_a0 = (center - (CM_GetProps()->Minimap.Width / 2)) + CM_GetProps()->Minimap.PlayerX + (s16) (thing0);
- temp_a1 = (CM_GetProps()->Minimap.Pos[arg0].Y - (CM_GetProps()->Minimap.Height / 2)) + CM_GetProps()->Minimap.PlayerY + (s16) (thing1);
+ temp_a1 = (CM_GetProps()->Minimap.Pos[arg0].Y - (CM_GetProps()->Minimap.Height / 2)) +
+ CM_GetProps()->Minimap.PlayerY + (s16) (thing1);
if (characterId != 8) {
if ((gGPCurrentRaceRankByPlayerId[playerId] == 0) && (gModeSelection != 3) && (gModeSelection != 1)) {
#if EXPLICIT_AND == 1
@@ -3465,7 +3472,14 @@ void func_80051ABC(s16 arg0, s32 arg1) {
for (var_s0 = 0; var_s0 < D_8018D1F0; var_s0++) {
objectIndex = D_8018CC80[arg1 + var_s0];
object = &gObjectList[objectIndex];
+
+ // @port: Tag the transform.
+ FrameInterpolation_RecordOpenChild("func_80051ABC", TAG_OBJECT(object));
+
func_800518F8(objectIndex, object->unk_09C, arg0 - object->unk_09E);
+
+ // @port Pop the transform id.
+ FrameInterpolation_RecordCloseChild();
}
}
}
@@ -4019,8 +4033,8 @@ void func_8005669C(s32 objectIndex, UNUSED s32 arg1, s32 arg2) {
gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF);
}
+Mat4 mtx;
void func_800568A0(s32 objectIndex, s32 playerId) {
- Mat4 mtx;
Player* player;
player = &gPlayerOne[playerId];
@@ -4040,13 +4054,12 @@ void func_800569F4(s32 playerIndex) {
CM_DisplayBattleBombKart(playerIndex, 0);
}
-
void func_80056A40(s32 playerIndex, s32 arg1) {
CM_DisplayBattleBombKart(playerIndex, arg1);
}
void func_80056A94(s32 playerIndex) {
- //func_80072428(gIndexObjectBombKart[playerIndex]);
+ // func_80072428(gIndexObjectBombKart[playerIndex]);
CM_DisplayBattleBombKart(playerIndex, 0);
}