mirror of
https://github.com/zeldaret/st
synced 2026-07-09 14:45:32 -04:00
Misc Stuff 2 (#33)
* 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)
This commit is contained in:
@@ -395,7 +395,7 @@ public:
|
||||
|
||||
void LoadEquipItem(ItemFlag equipId);
|
||||
|
||||
SysFault *func_020148d0(unk32 param1);
|
||||
void func_020148d0(OverlayIndex index);
|
||||
void func_02014994(unk32 param1);
|
||||
};
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ struct Random {
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef __MWERKS__
|
||||
Vec2us &NextPos(u16 xMax, u16 yMax) {
|
||||
Vec2us pos;
|
||||
|
||||
@@ -60,6 +61,12 @@ struct Random {
|
||||
|
||||
return pos;
|
||||
}
|
||||
#else
|
||||
const Vec2us NextPos(u16 xMax, u16 yMax) {
|
||||
const Vec2us pos = {(u16) this->Next32(0, xMax), (u16) this->Next32(0, yMax)};
|
||||
return pos;
|
||||
}
|
||||
#endif
|
||||
|
||||
void Init();
|
||||
};
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
class SysFault {
|
||||
public:
|
||||
/* 00 */ unk32 mUnk_00;
|
||||
/* 04 */ unk8 mUnk_04;
|
||||
/* 05 */ unk8 mUnk_05;
|
||||
/* 04 */ u8 mUnk_04;
|
||||
/* 05 */ u8 mUnk_05;
|
||||
|
||||
void func_020125a4(char *file, u16 line, char *msg, ...);
|
||||
void func_020127f0(unk32 param1);
|
||||
|
||||
void func_ov018_020c4840();
|
||||
};
|
||||
|
||||
+26
-18
@@ -1,37 +1,45 @@
|
||||
#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',
|
||||
UnkId_FRMH = 'FRMH',
|
||||
UnkId_UNTH = 'UNTH',
|
||||
UnkId_UNSH = 'UNSH',
|
||||
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_0 = 0,
|
||||
HeapIndex_1 = 1,
|
||||
HeapIndex_2 = 2,
|
||||
HeapIndex_3 = 3,
|
||||
HeapIndex_4 = 4,
|
||||
HeapIndex_5 = 5,
|
||||
HeapIndex_6 = 6,
|
||||
HeapIndex_7 = 7,
|
||||
HeapIndex_8 = 8,
|
||||
HeapIndex_Max = 9
|
||||
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:
|
||||
static void operator delete[](void *ptr);
|
||||
void operator delete[](void *ptr);
|
||||
};
|
||||
|
||||
static void *operator new(unsigned long length, u32 id, u32 idLength = 4);
|
||||
static void *operator new[](unsigned long length, u32 id, u32 idLength = 4);
|
||||
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:
|
||||
@@ -51,7 +59,7 @@ public:
|
||||
|
||||
class UnkStruct_02011e10 : public SysObject {
|
||||
public:
|
||||
/* 00 */ UnkStruct_02011e10_Sub1 *mUnk_00[HeapIndex_Max];
|
||||
/* 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;
|
||||
|
||||
Reference in New Issue
Block a user