diff options
| author | Caroline Madsen <69010899+randomsalience@users.noreply.github.com> | 2025-04-09 16:45:30 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-09 13:45:30 -0700 |
| commit | c6f76e7240dde8bbcf40a88d6d88cf87cab616b4 (patch) | |
| tree | bf9afbb1c32e66f45bdba30f61a9e4f0d92f804a /src/JSystem/J3DGraphBase/J3DShapeDraw.cpp | |
| parent | 6672817e41064e04951ec28d51070b66fc8377ac (diff) | |
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
Diffstat (limited to 'src/JSystem/J3DGraphBase/J3DShapeDraw.cpp')
| -rw-r--r-- | src/JSystem/J3DGraphBase/J3DShapeDraw.cpp | 22 |
1 files changed, 6 insertions, 16 deletions
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 <dolphin/os.h> #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; |
