coo crash fix

This commit is contained in:
TakaRikka
2026-03-31 22:51:26 -07:00
parent 427a27c803
commit a3e3720cb1
+10
View File
@@ -392,6 +392,16 @@ static void dummy1(dStage_roomControl_c* roomControl) {
}
JKRExpHeap* dStage_roomControl_c::createMemoryBlock(int i_blockIdx, u32 i_heapSize) {
#if TARGET_PC
// Cave of Ordeals crashes around floor 29 due to no free heap space
// Increasing the size here avoids that, though its ugly. maybe TODO a better fix
if (strcmp(dComIfGp_getStartStageName(), "D_SB01") == 0) {
u32 prev = i_heapSize;
i_heapSize *= 2;
DuskLog.warn("Doubling heap size for D_SB01... ({}) -> ({})", prev, i_heapSize);
}
#endif
if (mMemoryBlock[i_blockIdx] == NULL) {
mMemoryBlock[i_blockIdx] = JKRCreateExpHeap(i_heapSize, mDoExt_getArchiveHeap(), false);
JKRHEAP_NAMEF(mMemoryBlock[i_blockIdx], "Room control memory block %d", i_blockIdx);