From 1a65a6bbbd263538bd04faae2d9e899d59ec0d5d Mon Sep 17 00:00:00 2001 From: Jcw87 Date: Tue, 13 Jan 2026 07:49:09 -0800 Subject: J3D debug (#3037) * J3DGraphBase debug * J3DGraphAnimator debug * J3DGraphLoader debug --- src/JSystem/J3DGraphBase/J3DShape.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/JSystem/J3DGraphBase/J3DShape.cpp') diff --git a/src/JSystem/J3DGraphBase/J3DShape.cpp b/src/JSystem/J3DGraphBase/J3DShape.cpp index 1c7500fac4..91dd5b8ea0 100644 --- a/src/JSystem/J3DGraphBase/J3DShape.cpp +++ b/src/JSystem/J3DGraphBase/J3DShape.cpp @@ -72,9 +72,11 @@ void J3DShape::addTexMtxIndexInVcd(GXAttr attr) { GXVtxDescList* vtxDesc = getVtxDesc(); s32 attrCount = 0; - for (; vtxDesc->attr != GX_VA_NULL; attrCount++, vtxDesc++) { - if (vtxDesc->attr == GX_VA_PNMTXIDX) + for (; vtxDesc->attr != GX_VA_NULL; vtxDesc++) { + if (vtxDesc->attr == GX_VA_PNMTXIDX) { attrIdx = stride; + } + attrCount++; } if (attrIdx == -1) @@ -85,7 +87,7 @@ void J3DShape::addTexMtxIndexInVcd(GXAttr attr) { vtxDesc = getVtxDesc(); GXVtxDescList* dst = newVtxDesc; - for (; vtxDesc->attr != GX_VA_NULL; dst++, vtxDesc++) { + for (; vtxDesc->attr != GX_VA_NULL; vtxDesc++) { if ((attr < vtxDesc->attr) && !inserted) { dst->attr = attr; dst->type = GX_DIRECT; @@ -98,6 +100,7 @@ void J3DShape::addTexMtxIndexInVcd(GXAttr attr) { dst->attr = vtxDesc->attr; dst->type = vtxDesc->type; stride = stride + kSize[vtxDesc->type]; + dst++; } dst->attr = GX_VA_NULL; -- cgit v1.2.3