mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-29 23:27:25 -04:00
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:
@@ -1,8 +1,9 @@
|
||||
#include "JSystem/JSystem.h" // IWYU pragma: keep
|
||||
|
||||
#include "JSystem/J3DGraphAnimator/J3DMaterialAttach.h"
|
||||
#include "JSystem/J3DGraphAnimator/J3DMaterialAnm.h"
|
||||
#include "JSystem/J3DGraphAnimator/J3DMaterialAttach.h"
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
|
||||
void J3DMaterialTable::clear() {
|
||||
@@ -153,7 +154,7 @@ int J3DMaterialTable::createTexMtxForAnimator(J3DAnmTextureSRTKey* pTexSRTKey) {
|
||||
rv = 1;
|
||||
} else {
|
||||
if (texMtx != 0xff && material->getTexMtx(texMtx) == NULL) {
|
||||
J3DTexMtx* mtx = new J3DTexMtx();
|
||||
J3DTexMtx* mtx = JKR_NEW J3DTexMtx();
|
||||
rv = 4;
|
||||
material->setTexMtx(texMtx, mtx);
|
||||
JUT_WARN(420, "matNo<%d> : texMtx%d nothing !\n", matNo, texMtx);
|
||||
|
||||
Reference in New Issue
Block a user