fix mHelpAllocator_c symbols and add sbss vars to dBase_c

This commit is contained in:
Elijah Thomas
2023-08-10 11:02:06 -04:00
parent 3ff830a2ca
commit f7b8f8a792
5 changed files with 21 additions and 18 deletions
+1
View File
@@ -21,6 +21,7 @@ d/a/obj/d_a_obj_base.cpp:
d/d_base.cpp:
.text start:0x80050800 end:0x80050A14
.data start:0x80503380 end:0x805033CC
.sbss start:0x805750C0 end:0x805750CC
toBeSorted/unk_flag_stuff.cpp:
.text start:0x800BEF90 end:0x800BF200
+6 -6
View File
@@ -17708,15 +17708,15 @@ fn_802EE130 = .text:0x802EE130; // type:function size:0x58
fn_802EE190 = .text:0x802EE190; // type:function size:0x50
fn_802EE1E0 = .text:0x802EE1E0; // type:function size:0x4
fn_802EE1F0 = .text:0x802EE1F0; // type:function size:0x4
__ct__14mHeapAllocatorFv = .text:0x802EE200; // type:function size:0x3C
__dt__14mHeapAllocatorFv = .text:0x802EE240; // type:function size:0x6C
__ct__16mHeapAllocator_cFv = .text:0x802EE200; // type:function size:0x3C
__dt__16mHeapAllocator_cFv = .text:0x802EE240; // type:function size:0x6C
fn_802EE2B0 = .text:0x802EE2B0; // type:function size:0x84
fn_802EE340 = .text:0x802EE340; // type:function size:0x84
fn_802EE3D0 = .text:0x802EE3D0; // type:function size:0x54
fn_802EE430 = .text:0x802EE430; // type:function size:0x70
fn_802EE4A0 = .text:0x802EE4A0; // type:function size:0x70
fn_802EE510 = .text:0x802EE510; // type:function size:0x4C
adjustFrmHeapRestoreCurrent__14mHeapAllocatorFv = .text:0x802EE560; // type:function size:0x64
adjustFrmHeapRestoreCurrent__16mHeapAllocator_cFv = .text:0x802EE560; // type:function size:0x64
fn_802EE5D0 = .text:0x802EE5D0; // type:function size:0x1C
fn_802EE5F0 = .text:0x802EE5F0; // type:function size:0xA4
fn_802EE6A0 = .text:0x802EE6A0; // type:function size:0x18
@@ -39679,9 +39679,9 @@ lbl_805750A0 = .sbss:0x805750A0; // type:object size:0x8 data:4byte
lbl_805750A8 = .sbss:0x805750A8; // type:object size:0x8 data:4byte
lbl_805750B0 = .sbss:0x805750B0; // type:object size:0x8 data:2byte
lbl_805750B8 = .sbss:0x805750B8; // type:object size:0x8 data:byte
ACTOR_SHOULD_UPDATE_FLAGS = .sbss:0x805750C0; // type:object size:0x4 data:4byte
ACTOR_SHOULD_DRAW_FLAGS = .sbss:0x805750C4; // type:object size:0x4 data:4byte
ACTOR_SHOULD_UNK_FLAGS = .sbss:0x805750C8; // type:object size:0x8 data:4byte
s_ExecuteControlFlags__7dBase_c = .sbss:0x805750C0; // type:object size:0x4 data:4byte
s_DrawControlFlags__7dBase_c = .sbss:0x805750C4; // type:object size:0x4 data:4byte
s_NextExecuteControlFlags__7dBase_c = .sbss:0x805750C8; // type:object size:0x4 data:4byte
lbl_805750D0 = .sbss:0x805750D0; // type:object size:0x8 data:4byte
lbl_805750D8 = .sbss:0x805750D8; // type:object size:0x8 data:4byte
lbl_805750E0 = .sbss:0x805750E0; // type:object size:0x4 data:4byte
+1 -1
View File
@@ -9,7 +9,7 @@ LIBS = [
["Runtime/__init_cpp_exceptions.cpp", False],
["toBeSorted/unk_flag_stuff.cpp", True],
["toBeSorted/bitwise_flag_helper.cpp", True],
["d/d_base.cpp", False],
["d/d_base.cpp", True],
["d/a/d_a_base.cpp", False],
["d/a/obj/d_a_obj_base.cpp", False],
["toBeSorted/save_file.cpp", False],
+3 -3
View File
@@ -32,9 +32,9 @@ private:
inline bool isProcControlFlag(u32 flag) const { return (baseProperties & flag) != 0; }
public:
// /* 805750c0 */ static u32 ACTOR_SHOULD_UPDATE_FLAGS;
// /* 805750c0 */ static u32 ACTOR_SHOULD_DRAW_FLAGS;
// /* 805750c0 */ static u32 ACTOR_SHOULD_UNK_FLAGS;
/* 805750c0 */ static u32 s_ExecuteControlFlags;
/* 805750c0 */ static u32 s_DrawControlFlags;
/* 805750c0 */ static u32 s_NextExecuteControlFlags;
// /* 80575bc0 */ static fProfile::fBaseProfile_c** DAT_ACTOR_ALLOCATION_FUNCTIONS;
friend class fBase_c;
+10 -8
View File
@@ -1,9 +1,11 @@
#include <d/d_base.h>
extern "C" fProfile::fBaseProfile_c** DAT_ACTOR_ALLOCATION_FUNCTIONS;
extern "C" /* 805750c0 */ u32 ACTOR_SHOULD_UPDATE_FLAGS;
extern "C" /* 805750c4 */ u32 ACTOR_SHOULD_DRAW_FLAGS;
extern "C" /* 805750c0 */ u32 ACTOR_SHOULD_UNK_FLAGS;
// .sbss
/* 805750c0 */ u32 dBase_c::s_ExecuteControlFlags;
/* 805750c0 */ u32 dBase_c::s_DrawControlFlags;
/* 805750c0 */ u32 dBase_c::s_NextExecuteControlFlags;
dBase_c::dBase_c() : fBase_c() {
baseProperties = DAT_ACTOR_ALLOCATION_FUNCTIONS[mProfName]->mBaseProperties;
@@ -22,7 +24,7 @@ int dBase_c::preExecute() {
if (fBase_c::preExecute() == 0) {
return NOT_READY;
}
if (ACTOR_SHOULD_UPDATE_FLAGS && !isProcControlFlag(ACTOR_SHOULD_UPDATE_FLAGS)) {
if (s_ExecuteControlFlags && !isProcControlFlag(s_ExecuteControlFlags)) {
return NOT_READY;
}
return SUCCEEDED;
@@ -41,16 +43,16 @@ int dBase_c::preDraw() {
if (fBase_c::preDraw() == NOT_READY) {
return NOT_READY;
}
if (ACTOR_SHOULD_DRAW_FLAGS && !isProcControlFlag(ACTOR_SHOULD_DRAW_FLAGS)) {
if (s_DrawControlFlags && !isProcControlFlag(s_DrawControlFlags)) {
return NOT_READY;
}
return SUCCEEDED;
}
void dBase_c::resetFlags() {
ACTOR_SHOULD_UPDATE_FLAGS = 0;
ACTOR_SHOULD_DRAW_FLAGS = 0;
ACTOR_SHOULD_UNK_FLAGS = 0;
s_ExecuteControlFlags = 0;
s_DrawControlFlags = 0;
s_NextExecuteControlFlags = 0;
}
bool dBase_c::isActorPlayer(dBase_c& base) {