forked from Ports/perfect_dark
port: fix s32 pointer in bgRenderRoomPass
This commit is contained in:
1 parent
fedcbb8917
commit
034ff984cc
1 file changed
+5
@@ -3174,8 +3174,13 @@ Gfx *bgRenderRoomPass(Gfx *gdl, s32 roomnum, struct roomblock *block, bool arg3)
|
|||||||
v0 = (uintptr_t)g_Rooms[roomnum].colours;
|
v0 = (uintptr_t)g_Rooms[roomnum].colours;
|
||||||
|
|
||||||
if (v0 != NULL) {
|
if (v0 != NULL) {
|
||||||
|
#ifdef PLATFORM_N64
|
||||||
s32 addr = ALIGN8((uintptr_t)&g_Rooms[roomnum].gfxdata->vertices[g_Rooms[roomnum].gfxdata->numvertices]);
|
s32 addr = ALIGN8((uintptr_t)&g_Rooms[roomnum].gfxdata->vertices[g_Rooms[roomnum].gfxdata->numvertices]);
|
||||||
v0 += (((intptr_t)block->colours - addr) >> 2) * 4;
|
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 {
|
} else {
|
||||||
v0 = (uintptr_t)block->colours;
|
v0 = (uintptr_t)block->colours;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user