From 034ff984cc6704edbc3f8dd13a69f646ae2ff8f2 Mon Sep 17 00:00:00 2001 From: fgsfds Date: Wed, 16 Aug 2023 14:52:25 +0200 Subject: [PATCH] port: fix s32 pointer in bgRenderRoomPass --- src/game/bg.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/game/bg.c b/src/game/bg.c index 95958856e..c9bdf4cd4 100644 --- a/src/game/bg.c +++ b/src/game/bg.c @@ -3174,8 +3174,13 @@ Gfx *bgRenderRoomPass(Gfx *gdl, s32 roomnum, struct roomblock *block, bool arg3) v0 = (uintptr_t)g_Rooms[roomnum].colours; if (v0 != NULL) { +#ifdef PLATFORM_N64 s32 addr = ALIGN8((uintptr_t)&g_Rooms[roomnum].gfxdata->vertices[g_Rooms[roomnum].gfxdata->numvertices]); v0 += (((intptr_t)block->colours - addr) >> 2) * 4; +#else + uintptr_t addr = ALIGN8((uintptr_t)&g_Rooms[roomnum].gfxdata->vertices[g_Rooms[roomnum].gfxdata->numvertices]); + v0 += (((uintptr_t)block->colours - addr) >> 2) * 4; +#endif } else { v0 = (uintptr_t)block->colours; }