Isolate JKRHeap operator overloads

Fixes #25

This isolates the JKRHeap operator new/delete overloads. Every single new/delete site in the code has been replaced with a macro.

Sadly for new[] and delete[] we have to keep global operators. The global new[] just allocates into malloc() however, and delete[] goes into free() if it's not in a JKRHeap. So that's fine.
This commit is contained in:
PJB3005
2026-02-27 23:11:59 +01:00
parent f59295c127
commit 0ee3b2b197
634 changed files with 3451 additions and 3350 deletions
+2 -1
View File
@@ -8,6 +8,7 @@
#include "JSystem/J3DGraphBase/J3DFifo.h"
#include "JSystem/J3DGraphBase/J3DPacket.h"
#include "JSystem/J3DGraphBase/J3DVertex.h"
#include "JSystem/JKernel/JKRHeap.h"
void J3DGDSetVtxAttrFmtv(_GXVtxFmt, GXVtxAttrFmtList const*, bool);
void J3DFifoLoadPosMtxImm(Mtx, u32);
@@ -85,7 +86,7 @@ void J3DShape::addTexMtxIndexInVcd(GXAttr attr) {
if (attrIdx == -1)
return;
GXVtxDescList* newVtxDesc = new GXVtxDescList[attrCount + 2];
GXVtxDescList* newVtxDesc = JKR_NEW GXVtxDescList[attrCount + 2];
bool inserted = false;
vtxDesc = getVtxDesc();