mirror of
https://github.com/zeldaret/ss
synced 2026-09-06 18:51:12 -04:00
More splits (text only)
This commit is contained in:
+1
-1
@@ -32,7 +32,7 @@ void dHeapAllocator::onAlloc(EGG::HeapAllocArg *arg) {
|
||||
EGG::ExpHeap *dHeap::init(const char *name, size_t size, EGG::Heap *parent) {
|
||||
heap = EGG::ExpHeap::create(size, parent, 4);
|
||||
if (heap != nullptr) {
|
||||
heap->setGroupID(0);
|
||||
heap->setAllocMode(0);
|
||||
heap->mName = name;
|
||||
}
|
||||
return heap;
|
||||
|
||||
@@ -100,15 +100,15 @@ u32 ExpHeap::resizeForMBlock(void *block, u32 size) {
|
||||
}
|
||||
|
||||
u32 ExpHeap::getTotalFreeSize() {
|
||||
return MEMGetAllocatableSizeForExpHeap(mHeapHandle);
|
||||
return MEMGetTotalFreeSizeForExpHeap(mHeapHandle);
|
||||
}
|
||||
|
||||
u32 ExpHeap::getAllocatableSize(s32 align) {
|
||||
return MEMGetAllocatableSizeForExpHeapEx(mHeapHandle, align);
|
||||
}
|
||||
|
||||
void ExpHeap::setGroupID(u16 groupId) {
|
||||
MEMSetGroupIdForExpHeap(mHeapHandle, groupId);
|
||||
void ExpHeap::setAllocMode(u16 allocMode) {
|
||||
MEMSetAllocModeForExpHeap(mHeapHandle, allocMode);
|
||||
}
|
||||
|
||||
u32 ExpHeap::adjust() {
|
||||
|
||||
@@ -106,7 +106,7 @@ Heap *Heap::findHeap(MEMiHeapHead *head) {
|
||||
/* 80495730 */
|
||||
Heap *Heap::findParentHeap() {
|
||||
Heap *retHeap = nullptr;
|
||||
MEMiHeapHead *heap = MEMFindContainHeap(mHeapHandle);
|
||||
MEMiHeapHead *heap = MEMFindParentHeap(mHeapHandle);
|
||||
if (heap) {
|
||||
retHeap = findHeap(heap);
|
||||
}
|
||||
@@ -114,12 +114,10 @@ Heap *Heap::findParentHeap() {
|
||||
return retHeap;
|
||||
}
|
||||
|
||||
extern "C" MEMiHeapHead *findSomethingInListObject(const void *memBlock);
|
||||
|
||||
/* 80495780 */
|
||||
Heap *Heap::findContainHeap(const void *memBlock) {
|
||||
Heap *retHeap = nullptr;
|
||||
MEMiHeapHead *heap = findSomethingInListObject(memBlock);
|
||||
MEMiHeapHead *heap = MEMFindContainHeap(memBlock);
|
||||
if (heap) {
|
||||
retHeap = findHeap(heap);
|
||||
}
|
||||
@@ -130,7 +128,7 @@ Heap *Heap::findContainHeap(const void *memBlock) {
|
||||
/* 804957c0 */
|
||||
void Heap::free(void *ptr, Heap *heap) {
|
||||
if (heap == nullptr) {
|
||||
MEMiHeapHead *iheap = findSomethingInListObject(ptr);
|
||||
MEMiHeapHead *iheap = MEMFindContainHeap(ptr);
|
||||
if (iheap == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ CpuTexture::CpuTexture(const GXTexObj *pObj) {
|
||||
mWidth = GXGetTexObjWidth(pObj);
|
||||
mHeight = GXGetTexObjHeight(pObj);
|
||||
|
||||
mTexFormat = GXGetTexObjFormat(pObj);
|
||||
mTexFormat = GXGetTexObjFmt(pObj);
|
||||
mWrapS = GXGetTexObjWrapS(pObj);
|
||||
mWrapT = GXGetTexObjWrapT(pObj);
|
||||
mMinFilt = GXGetTexObjMinFilt(pObj);
|
||||
|
||||
+1
-1
@@ -149,7 +149,7 @@ mHeap::~mHeap() {
|
||||
EGG::ExpHeap *mHeap::createHeap(size_t size, EGG::Heap *block, const char *name) {
|
||||
EGG::ExpHeap *heap = EGG::ExpHeap::create(size, block, 4);
|
||||
if (heap != nullptr) {
|
||||
heap->setGroupID(0);
|
||||
heap->setAllocMode(0);
|
||||
if (name != nullptr) {
|
||||
heap->mName = name;
|
||||
}
|
||||
|
||||
@@ -74,8 +74,6 @@ void Exception_Init() {
|
||||
}
|
||||
extern "C" u32 PPCMfmsr();
|
||||
extern "C" void PPCMtmsr(u32);
|
||||
extern "C" void OSFillFPUContext(OSContext *ctx);
|
||||
extern "C" void fn_803AA2E0(u32, u32, u32, u32);
|
||||
|
||||
static void DumpException_(const ExceptionCallbackParam *);
|
||||
|
||||
@@ -85,10 +83,10 @@ void ErrorHandler_(u16 error, OSContext *ctx, u32 dsisr, u32 dar) {
|
||||
OSFillFPUContext(ctx);
|
||||
OSSetErrorHandler(error, nullptr);
|
||||
if (error == 0xf) {
|
||||
fn_803AA2E0(0, 0, 0, 3);
|
||||
fn_803AA2E0(1, 0, 0, 3);
|
||||
fn_803AA2E0(2, 0, 0, 3);
|
||||
fn_803AA2E0(3, 0, 0, 3);
|
||||
OSProtectRange(OS_PROTECT_CHAN0, 0, 0, OS_PROTECT_CONTROL_RDWR);
|
||||
OSProtectRange(OS_PROTECT_CHAN1, 0, 0, OS_PROTECT_CONTROL_RDWR);
|
||||
OSProtectRange(OS_PROTECT_CHAN2, 0, 0, OS_PROTECT_CONTROL_RDWR);
|
||||
OSProtectRange(OS_PROTECT_CHAN3, 0, 0, OS_PROTECT_CONTROL_RDWR);
|
||||
}
|
||||
ExceptionCallbackParam param;
|
||||
|
||||
|
||||
@@ -213,7 +213,7 @@ void SetTMemLayout(TMemLayout layout) {
|
||||
} // namespace nw4r
|
||||
|
||||
static GXTexRegion *TexRegionCallback(const GXTexObj *pObj, GXTexMapID map) {
|
||||
GXTexFmt fmt = GXGetTexObjFormat(pObj);
|
||||
GXTexFmt fmt = GXGetTexObjFmt(pObj);
|
||||
GXBool mipmap = GXGetTexObjMipMap(pObj);
|
||||
|
||||
switch (fmt) {
|
||||
|
||||
Reference in New Issue
Block a user