mirror of
https://github.com/zeldaret/tp
synced 2026-07-09 23:01:41 -04:00
Jsystem work (#399)
* Almost match JASBasicInst * JASDrumSet OK * Some JAudio2 struct adjustment * Match JKRHeap::callAllDisposer * JAISe OK * Fix setAutoDelete * JAISound OK * Match a few functions in linklist * Few matches in d_a_e_ym * JUTTexture OK * Work on JUTGamePad * Import JUTResource * Work on JUTResFont::getFontCode
This commit is contained in:
@@ -342,6 +342,12 @@ void* JKRExpHeap::allocFromHead(u32 size, int align) {
|
||||
} else {
|
||||
CMemBlock* prev = foundBlock->mPrev;
|
||||
CMemBlock* next = foundBlock->mNext;
|
||||
// Works but very fake match
|
||||
/*size = (u32)foundBlock->allocFore(size, mCurrentGroupId, 0, 0, 0);
|
||||
removeFreeBlock(foundBlock);
|
||||
if (size) {
|
||||
setFreeBlock((CMemBlock*)size, prev, next);
|
||||
}*/
|
||||
newFreeBlock = foundBlock->allocFore(size, mCurrentGroupId, 0, 0, 0);
|
||||
removeFreeBlock(foundBlock);
|
||||
if (newFreeBlock) {
|
||||
|
||||
@@ -188,25 +188,13 @@ void JKRHeap::free(void* ptr) {
|
||||
}
|
||||
|
||||
/* 802CE574-802CE5CC 2C8EB4 0058+00 1/0 5/2 0/0 .text callAllDisposer__7JKRHeapFv */
|
||||
// missing stack var
|
||||
#ifdef NONMATCHING
|
||||
void JKRHeap::callAllDisposer() {
|
||||
JSUListIterator<JKRDisposer> iterator;
|
||||
|
||||
while (iterator = mDisposerList.getFirst(), iterator != mDisposerList.getEnd()) {
|
||||
while ((iterator = mDisposerList.getFirst()) != mDisposerList.getEnd()) {
|
||||
iterator->~JKRDisposer();
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JKRHeap::callAllDisposer() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JKernel/JKRHeap/callAllDisposer__7JKRHeapFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 802CE5CC-802CE5F8 2C8F0C 002C+00 0/0 12/12 0/0 .text freeAll__7JKRHeapFv */
|
||||
void JKRHeap::freeAll() {
|
||||
|
||||
Reference in New Issue
Block a user