From c6f76e7240dde8bbcf40a88d6d88cf87cab616b4 Mon Sep 17 00:00:00 2001 From: Caroline Madsen <69010899+randomsalience@users.noreply.github.com> Date: Wed, 9 Apr 2025 16:45:30 -0400 Subject: Various JSystem work (#2383) * JKernel and JStudio cleanup * JMessage cleanup * JAudio cleanup * JASBNKParser work * functionvalue work * fvb work * J2D and J3D cleanup * steal from tww * J2DPictureEx mostly done * fix build --- src/JSystem/J3DGraphBase/J3DShapeDraw.cpp | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'src/JSystem/J3DGraphBase/J3DShapeDraw.cpp') diff --git a/src/JSystem/J3DGraphBase/J3DShapeDraw.cpp b/src/JSystem/J3DGraphBase/J3DShapeDraw.cpp index fae878e601..ee7ada7dee 100644 --- a/src/JSystem/J3DGraphBase/J3DShapeDraw.cpp +++ b/src/JSystem/J3DGraphBase/J3DShapeDraw.cpp @@ -10,16 +10,6 @@ #include #include "global.h" -// -// External References: -// - -extern "C" void countVertex__12J3DShapeDrawFUl(); -extern "C" void* __nwa__FUli(); -extern "C" void __dl__FPv(); -extern "C" void _savegpr_18(); -extern "C" void _restgpr_18(); - /* 80314924-80314974 30F264 0050+00 1/1 0/0 0/0 .text countVertex__12J3DShapeDrawFUl */ u32 J3DShapeDraw::countVertex(u32 stride) { u32 count = 0; @@ -54,18 +44,18 @@ void J3DShapeDraw::addTexMtxIndexInDL(u32 stride, u32 attrOffs, u32 valueBase) { // Copy count // regalloc (I suspect there's a way to shove this in a u16 temp without an mr) - u32 vtxNum = *((u16*)(oldDL + 1)); + s32 vtxNum = *((u16*)(oldDL + 1)); *((u16*)newDL) = vtxNum; newDL += 2; - for (s32 i = 0; i < (u16)vtxNum; i++) { + for (s32 i = 0; i < vtxNum; i++) { u8* oldDLVtx = &oldDL[stride * i + 3]; u8 pnmtxidx = *oldDLVtx; memcpy(newDL, oldDLVtx, attrOffs); - u8* newDL1 = &newDL[attrOffs]; - *newDL1++ = valueBase + pnmtxidx; - memcpy(newDL1, oldDLVtx + attrOffs, stride - attrOffs); - newDL = newDL1 + (stride - attrOffs); + newDL += attrOffs; + *newDL++ = valueBase + pnmtxidx; + memcpy(newDL, oldDLVtx + attrOffs, stride - attrOffs); + newDL += (stride - attrOffs); } oldDL += stride * vtxNum; -- cgit v1.2.3