mirror of
https://github.com/zeldaret/st
synced 2026-05-23 15:01:41 -04:00
804b25cb90
* match UnkStruct_ov000_020b4f84_00_Base * lots of random stuff * match other funcs from game.cpp * data_02049a2c -> gGame, UnkStruct_02049a2c -> Game * match operator new * fix regressions * fix some warnings * another round of random things * another round of random things 2 * complete slots column in overlays.md * add scene indices * gamemode stuff * misc stuff * fix build issues * document random things * fix regressions * final round of random things (for now)
97 lines
2.6 KiB
C++
97 lines
2.6 KiB
C++
#pragma once
|
|
|
|
#include "System/SysFault.hpp"
|
|
#include "global.h"
|
|
#include "types.h"
|
|
|
|
#include <stddef.h>
|
|
|
|
#define GAME_ASSERT(cond, line, msg, ...) \
|
|
(!(cond) ? data_02049984.func_020125a4(__FILE__, (line), (msg), __VA_ARGS__) : ((void) 0))
|
|
#define ASSERT(cond, msg, ...) GAME_ASSERT(cond, __LINE__, msg, __VA_ARGS__)
|
|
|
|
typedef u32 UnkId;
|
|
enum __UnkId {
|
|
UnkId_EXPH = 'EXPH', // Expanded Heap?
|
|
UnkId_FRMH = 'FRMH', // Frame Heap?
|
|
UnkId_UNTH = 'UNTH', // Unit Heap?
|
|
UnkId_UNSH = 'UNSH', // Unspecified Heap?
|
|
};
|
|
|
|
typedef u32 HeapIndex;
|
|
typedef s16 HeapIndex16;
|
|
enum HeapIndex_ {
|
|
HeapIndex_Main = 0, // UnkId_FRMH
|
|
HeapIndex_1 = 1, // UnkId_EXPH
|
|
HeapIndex_2 = 2, // UnkId_UNSH
|
|
HeapIndex_ITCM = 3, // UnkId_UNSH
|
|
HeapIndex_DTCM = 4, // ?
|
|
HeapIndex_5 = 5, // ?
|
|
HeapIndex_6 = 6, // UnkId_FRMH
|
|
HeapIndex_7 = 7, // ?
|
|
HeapIndex_8 = 8, // ?
|
|
HeapIndex_Max = 9
|
|
};
|
|
|
|
class SysObject {
|
|
public:
|
|
void operator delete[](void *ptr);
|
|
};
|
|
|
|
void *operator new(size_t length, u32 id, u32 idLength = 4);
|
|
void *operator new[](size_t length, u32 id, u32 idLength = 4);
|
|
|
|
class UnkStruct_02011e10_Sub1 {
|
|
public:
|
|
/* 00 */ UnkId mId;
|
|
/* 04 */ unk32 mUnk_04;
|
|
/* 04 */ unk32 mUnk_08;
|
|
/* 04 */ unk32 mUnk_0C;
|
|
/* 04 */ unk32 mUnk_10;
|
|
/* 04 */ unk32 mUnk_14;
|
|
/* 04 */ unk32 mUnk_18;
|
|
/* 04 */ unk32 mUnk_1C;
|
|
/* 04 */ unk32 mUnk_20;
|
|
/* 04 */ unk32 mUnk_24;
|
|
/* 04 */ unk32 mUnk_28;
|
|
/* 2C */ unk8 mUnk_2C[0x60 - 0x2C];
|
|
};
|
|
|
|
class UnkStruct_02011e10 : public SysObject {
|
|
public:
|
|
/* 00 */ UnkStruct_02011e10_Sub1 *mUnk_00[HeapIndex_Max]; // the pointer seems to match arena lo
|
|
/* 24 */ unk32 mUnk_24[2];
|
|
/* 28 */ STRUCT_PAD(0x2C, 0x5C);
|
|
/* 5C */ unk32 mUnk_5C;
|
|
/* 60 */ unk32 mUnk_60;
|
|
/* 64 */ unk32 mUnk_64;
|
|
/* 68 */ unk32 mUnk_68;
|
|
/* 6C */ unk32 mUnk_6C;
|
|
/* 70 */ unk32 mUnk_70;
|
|
/* 74 */ unk32 mUnk_74;
|
|
/* 78 */ unk32 mUnk_78;
|
|
/* 7C */ unk8 mUnk_7C;
|
|
/* 7C */ unk8 mUnk_7D;
|
|
/* 7C */ unk8 mUnk_7E;
|
|
/* 7C */ unk8 mUnk_7F;
|
|
/* 80 */ unk8 mUnk_80;
|
|
/* 81 */ unk8 mUnk_81;
|
|
/* 82 */ unk8 mUnk_82;
|
|
/* 83 */ unk8 mUnk_83;
|
|
|
|
void func_02013014();
|
|
void func_02013070();
|
|
|
|
void func_ov001_020ba588(unk32 param1, unk32 param2);
|
|
|
|
void func_ov018_020c4980();
|
|
void func_ov018_020c4a5c();
|
|
};
|
|
|
|
extern UnkStruct_02011e10 data_0204999c;
|
|
|
|
void *SysNew(UnkStruct_02011e10_Sub1 *param1, s32 length, s32 param3);
|
|
void SysDelete(void *ptr);
|
|
void *func_02011f10(s32 length);
|
|
void *func_02011f30(s32 length);
|