mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-31 17:01:36 -04:00
Pjb dev 3 (#48)
* Undo array allocation changes from #43 Doesn't work * Expand dmeter heap sizes, give names * Fix manual operator delete call in resource.cpp * Disable map rendering for now Aurora can't handle lines * Re-enable assert heap on DVD thread Should be fine? * Some basic debug groups with the new Aurora API * Allow Aurora backend to be set via CLI * Give materials debug groups * More debug groups * JKRHeap separation: array edition Pain
This commit is contained in:
committed by
GitHub
parent
9e303b063f
commit
15732e241c
@@ -12,8 +12,8 @@
|
||||
|
||||
J3DError J3DDisplayListObj::newDisplayList(u32 maxSize) {
|
||||
mMaxSize = ALIGN_NEXT(maxSize, 0x20);
|
||||
mpDisplayList[0] = JKR_NEW_ARGS (0x20) char[mMaxSize];
|
||||
mpDisplayList[1] = JKR_NEW_ARGS (0x20) char[mMaxSize];
|
||||
mpDisplayList[0] = JKR_NEW_ARRAY_ARGS(char, mMaxSize, 0x20);
|
||||
mpDisplayList[1] = JKR_NEW_ARRAY_ARGS(char, mMaxSize, 0x20);
|
||||
mSize = 0;
|
||||
|
||||
if (mpDisplayList[0] == NULL || mpDisplayList[1] == NULL)
|
||||
@@ -24,7 +24,7 @@ J3DError J3DDisplayListObj::newDisplayList(u32 maxSize) {
|
||||
|
||||
J3DError J3DDisplayListObj::newSingleDisplayList(u32 maxSize) {
|
||||
mMaxSize = ALIGN_NEXT(maxSize, 0x20);
|
||||
mpDisplayList[0] = JKR_NEW_ARGS (0x20) char[mMaxSize];
|
||||
mpDisplayList[0] = JKR_NEW_ARRAY_ARGS(char, mMaxSize, 0x20);
|
||||
mpDisplayList[1] = mpDisplayList[0];
|
||||
mSize = 0;
|
||||
|
||||
@@ -36,7 +36,7 @@ J3DError J3DDisplayListObj::newSingleDisplayList(u32 maxSize) {
|
||||
|
||||
int J3DDisplayListObj::single_To_Double() {
|
||||
if (mpDisplayList[0] == mpDisplayList[1]) {
|
||||
mpDisplayList[1] = JKR_NEW_ARGS (0x20) char[mMaxSize];
|
||||
mpDisplayList[1] = JKR_NEW_ARRAY_ARGS(char, mMaxSize, 0x20);
|
||||
|
||||
if (mpDisplayList[1] == NULL)
|
||||
return kJ3DError_Alloc;
|
||||
@@ -211,6 +211,15 @@ void J3DMatPacket::draw() {
|
||||
j3dSys.setTexture(mpTexture);
|
||||
#endif
|
||||
mpMaterial->load();
|
||||
|
||||
#if TARGET_PC
|
||||
if (mpMaterial->mMaterialName != nullptr) {
|
||||
char buf[64];
|
||||
snprintf(buf, sizeof(buf), "Mat: %s", mpMaterial->mMaterialName);
|
||||
GXPushDebugGroup(buf);
|
||||
}
|
||||
#endif
|
||||
|
||||
callDL();
|
||||
|
||||
J3DShapePacket* packet = getShapePacket();
|
||||
@@ -229,6 +238,12 @@ void J3DMatPacket::draw() {
|
||||
}
|
||||
|
||||
J3DShape::resetVcdVatCache();
|
||||
|
||||
#if TARGET_PC
|
||||
if (mpMaterial->mMaterialName != nullptr) {
|
||||
GXPopDebugGroup();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
J3DShapePacket::J3DShapePacket() {
|
||||
|
||||
Reference in New Issue
Block a user