mirror of
https://github.com/zeldaret/ph
synced 2026-08-25 23:43:47 -04:00
decomp heap.c (#145)
* add heap.c * add frmh heap * add heap_list * add unth heap * link heap.c * fix external references
This commit is contained in:
@@ -129,7 +129,6 @@ THUMB void ActorManager::func_ov004_0210532c() {
|
||||
return;
|
||||
}
|
||||
|
||||
extern "C" void func_020174a4(u32 *, void *);
|
||||
extern "C" void func_ov017_02168a90();
|
||||
extern "C" void func_ov025_0216d6dc();
|
||||
extern "C" void func_ov029_0216d6f0(unk32 *);
|
||||
@@ -147,7 +146,7 @@ THUMB void ActorManager::func_ov004_021053dc() {
|
||||
this->DeleteActor(i, true);
|
||||
}
|
||||
}
|
||||
func_020174a4(data_027e0ce0[1], this->mActorTable);
|
||||
Heap_EXPHFreeBlock((Heap_Header *) data_027e0ce0[1], this->mActorTable);
|
||||
this->mActorTable = NULL;
|
||||
delete this->mUnk_14;
|
||||
this->mUnk_14 = NULL;
|
||||
@@ -179,7 +178,6 @@ THUMB void ActorManager::func_ov004_021053dc() {
|
||||
}
|
||||
|
||||
extern "C" void func_ov000_020c3388(unk32);
|
||||
extern "C" void *NewEXPH(u32 *id, s32 length, s32 param_3);
|
||||
THUMB void ActorManager::func_ov004_021054a4(FileEntryFlag *param1, s32 param2, unk32 param3) {
|
||||
u16 sVar1;
|
||||
u16 sVar2;
|
||||
@@ -205,7 +203,7 @@ THUMB void ActorManager::func_ov004_021054a4(FileEntryFlag *param1, s32 param2,
|
||||
}
|
||||
param1->vfunc_0c();
|
||||
func_ov000_020c3388(sVar2);
|
||||
this->mActorTable = (Actor **) NewEXPH(data_027e0ce0[1], this->mMaxActors * 4, 4);
|
||||
this->mActorTable = (Actor **) Heap_EXPHNew((Heap_Header *) data_027e0ce0[1], this->mMaxActors * 4, 4);
|
||||
Fill256(0, this->mActorTable, this->mMaxActors * 4);
|
||||
this->mUnk_14 = new(data_027e0ce0[1], 4) ActorManager_Unk14(this->mMaxActors);
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "Unknown/UnkStruct_027e0d54.hpp"
|
||||
#include "Unknown/UnkStruct_027e0dbc.hpp"
|
||||
#include "Unknown/UnkStruct_027e0f88.hpp"
|
||||
#include "nds/heap.h"
|
||||
|
||||
extern "C" {
|
||||
void func_0200a23c();
|
||||
@@ -22,9 +23,7 @@ void func_0200a318(u8 *);
|
||||
unk32 func_0200dd94();
|
||||
unk32 func_0200a284(u8 *);
|
||||
u16 func_ov001_020efdac();
|
||||
void *NewEXPH(char *id, s32 length, s32 param_3);
|
||||
unk32 func_ov000_020773c0();
|
||||
void func_020174a4(u32 *, void *);
|
||||
void func_0201f378();
|
||||
void func_0202019c(void *, const char *, u32 *, unk32);
|
||||
void func_020213f0(u32 *);
|
||||
@@ -165,13 +164,13 @@ ARM UnkStruct_020ee698::UnkStruct_020ee698() :
|
||||
mUnk_02(0),
|
||||
mUnk_04(func_ov001_020efdac()),
|
||||
mUnk_08(0x0D) {
|
||||
void *newHeap = NewEXPH((char *) data_027e0ce0[1], 0x700, 0x20);
|
||||
void *newHeap = Heap_EXPHNew((Heap_Header *) data_027e0ce0[1], 0x700, 0x20);
|
||||
|
||||
if (func_ov000_020773c0() == 3) {
|
||||
this->mUnk_00 = 1;
|
||||
}
|
||||
|
||||
func_020174a4(data_027e0ce0[1], newHeap);
|
||||
Heap_EXPHFreeBlock((Heap_Header *) data_027e0ce0[1], newHeap);
|
||||
}
|
||||
|
||||
// --- data_ov000_020ee734 ---
|
||||
|
||||
Reference in New Issue
Block a user