port: swap room verts

This commit is contained in:
fgsfds committed 2023-08-02 00:11:51 +02:00
1 parent 9ec6fa06f8
commit 23f5b72943
1 file changed
+3 -1
+3 -1
View File
@@ -1339,9 +1339,11 @@ void preprocessBgRoom(u8 *data, u32 ofs) {
PD_SWAP_PTR(rgfx->xlublocks);
PD_SWAP_PTR(rgfx->colours);
// numvertices is actually 0 in the data because fuck you
const s32 numverts = ((uintptr_t) rgfx->colours - (uintptr_t) rgfx->vertices) / sizeof(Vtx);
Vtx *vertices = PD_PTR_BASEOFS(rgfx->vertices, data, ofs);
Vtx *vtx = vertices;
for (s32 i = 0; i < rgfx->numvertices; ++i, ++vtx) {
for (s32 i = 0; i < numverts; ++i, ++vtx) {
preprocessVtx(vtx);
}