mirror of
https://github.com/zeldaret/tww.git
synced 2026-07-28 07:08:12 -04:00
Translate strings in fopAcM_entrySolidHeap
This commit is contained in:
@@ -299,7 +299,7 @@ void* JKRExpHeap::allocFromTail(u32 size, int align) {
|
||||
|
||||
if (foundBlock != NULL) {
|
||||
if (offset >= sizeof(CMemBlock)) {
|
||||
newBlock->initiate(NULL, NULL, usedSize, mCurrentGroupId, -0x80);
|
||||
newBlock->initiate(NULL, NULL, usedSize, mCurrentGroupId, 0x80);
|
||||
foundBlock->size = foundBlock->size - usedSize - sizeof(CMemBlock);
|
||||
appendUsedList(newBlock);
|
||||
return newBlock->getContent();
|
||||
@@ -311,7 +311,7 @@ void* JKRExpHeap::allocFromTail(u32 size, int align) {
|
||||
return newBlock->getContent();
|
||||
} else {
|
||||
removeFreeBlock(foundBlock);
|
||||
newBlock->initiate(NULL, NULL, usedSize, mCurrentGroupId, -0x80);
|
||||
newBlock->initiate(NULL, NULL, usedSize, mCurrentGroupId, 0x80);
|
||||
appendUsedList(newBlock);
|
||||
return newBlock->getContent();
|
||||
}
|
||||
|
||||
@@ -15,12 +15,12 @@ JKRSolidHeap* JKRSolidHeap::create(u32 size, JKRHeap* heap, bool useErrorHandler
|
||||
heap = getRootHeap();
|
||||
}
|
||||
|
||||
if (size == 0xffffffff) {
|
||||
if (size == -1) {
|
||||
size = heap->getMaxAllocatableSize(0x10);
|
||||
}
|
||||
|
||||
u32 alignedSize = ALIGN_PREV(size, 0x10);
|
||||
u32 solidHeapSize = ALIGN_NEXT(sizeof(JKRSolidHeap), 0x10);
|
||||
u32 solidHeapSize = sizeof(JKRSolidHeap);
|
||||
if (alignedSize < solidHeapSize)
|
||||
return NULL;
|
||||
|
||||
|
||||
@@ -14,12 +14,12 @@ JUTGraphFifo* JUTGraphFifo::sCurrentFifo;
|
||||
JUTGraphFifo::JUTGraphFifo(u32 size) {
|
||||
mSize = size + 0x1F & ~0x1F;
|
||||
if (sInitiated) {
|
||||
mFifo = (GXFifoObj*)JKRAllocFromSysHeap(mSize + 0x80, 32);
|
||||
mFifo = (GXFifoObj*)JKRAllocFromSysHeap(sizeof(GXFifoObj) + mSize, 0x20);
|
||||
mBase = mFifo + 1;
|
||||
GXInitFifoBase(mFifo, mBase, mSize);
|
||||
GXInitFifoPtrs(mFifo, mBase, mBase);
|
||||
} else {
|
||||
mBase = JKRAllocFromSysHeap(mSize + 0xA0, 32);
|
||||
mBase = JKRAllocFromSysHeap(0xA0 + mSize, 0x20); // TODO: What struct is 0xA0 bytes in size?
|
||||
mBase = (void*)((int)mBase + 0x1F & ~0x1F);
|
||||
mFifo = GXInit(mBase, mSize);
|
||||
sInitiated = true;
|
||||
|
||||
Reference in New Issue
Block a user