From a2568e558305e0f3d3ff0f2dc50b28c35b64c3c8 Mon Sep 17 00:00:00 2001 From: mparisi20 Date: Wed, 12 Feb 2025 00:21:25 -0500 Subject: [PATCH] Match gr_dxbigblue.cpp --- config/RSBE01_02/rels/st_dxbigblue/splits.txt | 5 ++ .../RSBE01_02/rels/st_dxbigblue/symbols.txt | 52 +++++++++---------- config/RSBE01_02/symbols.txt | 6 +-- configure.py | 4 +- include/lib/BrawlHeaders | 2 +- include/st_dxbigblue/gr_dxbigblue.h | 15 ++++++ src/mo_stage/st_dxbigblue/gr_dxbigblue.cpp | 17 ++++++ 7 files changed, 70 insertions(+), 31 deletions(-) create mode 100644 include/st_dxbigblue/gr_dxbigblue.h create mode 100644 src/mo_stage/st_dxbigblue/gr_dxbigblue.cpp diff --git a/config/RSBE01_02/rels/st_dxbigblue/splits.txt b/config/RSBE01_02/rels/st_dxbigblue/splits.txt index 8de6302..09534f6 100644 --- a/config/RSBE01_02/rels/st_dxbigblue/splits.txt +++ b/config/RSBE01_02/rels/st_dxbigblue/splits.txt @@ -11,6 +11,11 @@ global_destructor_chain.c: .dtors start:0x00000000 end:0x00000008 .bss start:0x00000000 end:0x00000004 +mo_stage/st_dxbigblue/gr_dxbigblue.cpp: + .text start:0x00004178 end:0x000042C8 + .rodata start:0x00000090 end:0x00000094 + .data start:0x000007A8 end:0x00000A20 + mo_stage/mo_stage.cpp: .text start:0x00008288 end:0x00008324 .data start:0x00001F98 end:0x00001FA5 diff --git a/config/RSBE01_02/rels/st_dxbigblue/symbols.txt b/config/RSBE01_02/rels/st_dxbigblue/symbols.txt index 898d80e..20868df 100644 --- a/config/RSBE01_02/rels/st_dxbigblue/symbols.txt +++ b/config/RSBE01_02/rels/st_dxbigblue/symbols.txt @@ -8,7 +8,7 @@ fn_81_570 = .text:0x00000570; // type:function size:0xA8 fn_81_618 = .text:0x00000618; // type:function size:0x8 fn_81_620 = .text:0x00000620; // type:function size:0x364 fn_81_984 = .text:0x00000984; // type:function size:0x118 -fn_81_A9C = .text:0x00000A9C; // type:function size:0x8 +setStageData__6GroundFPv = .text:0x00000A9C; // type:function size:0x8 fn_81_AA4 = .text:0x00000AA4; // type:function size:0x8 fn_81_AAC = .text:0x00000AAC; // type:function size:0x8 fn_81_AB4 = .text:0x00000AB4; // type:function size:0x8 @@ -101,23 +101,23 @@ fn_81_4068 = .text:0x00004068; // type:function size:0x64 fn_81_40CC = .text:0x000040CC; // type:function size:0x74 fn_81_4140 = .text:0x00004140; // type:function size:0x34 fn_81_4174 = .text:0x00004174; // type:function size:0x4 -fn_81_4178 = .text:0x00004178; // type:function size:0x8 -fn_81_4180 = .text:0x00004180; // type:function size:0x64 -fn_81_41E4 = .text:0x000041E4; // type:function size:0x58 -fn_81_423C = .text:0x0000423C; // type:function size:0x8 -fn_81_4244 = .text:0x00004244; // type:function size:0x8 -fn_81_424C = .text:0x0000424C; // type:function size:0x4 -fn_81_4250 = .text:0x00004250; // type:function size:0x4 -fn_81_4254 = .text:0x00004254; // type:function size:0x10 -fn_81_4264 = .text:0x00004264; // type:function size:0x10 -fn_81_4274 = .text:0x00004274; // type:function size:0xC -fn_81_4280 = .text:0x00004280; // type:function size:0x8 -fn_81_4288 = .text:0x00004288; // type:function size:0x4 -fn_81_428C = .text:0x0000428C; // type:function size:0x8 -fn_81_4294 = .text:0x00004294; // type:function size:0x1C -fn_81_42B0 = .text:0x000042B0; // type:function size:0x8 -fn_81_42B8 = .text:0x000042B8; // type:function size:0x8 -fn_81_42C0 = .text:0x000042C0; // type:function size:0x8 +setMdlIndex__6GroundFi = .text:0x00004178; // type:function size:0x8 +__ct__11grDxBigBlueFPCc = .text:0x00004180; // type:function size:0x64 +__dt__11grDxBigBlueFv = .text:0x000041E4; // type:function size:0x58 +adventureEventGetItem__6GroundFiP13stTriggerData = .text:0x0000423C; // type:function size:0x8 +getInitializeInfo__6GroundFi = .text:0x00004244; // type:function size:0x8 +setInitializeInfo__6GroundFi = .text:0x0000424C; // type:function size:0x4 +setInitializeFlag__6GroundFv = .text:0x00004250; // type:function size:0x4 +disableCalcCollision__6GroundFv = .text:0x00004254; // type:function size:0x10 +enableCalcCollision__6GroundFv = .text:0x00004264; // type:function size:0x10 +isEnableCalcCollision__6GroundFv = .text:0x00004274; // type:function size:0xC +getMdlIndex__6GroundFv = .text:0x00004280; // type:function size:0x8 +initStageData__6GroundFv = .text:0x00004288; // type:function size:0x4 +getStageData__6GroundFv = .text:0x0000428C; // type:function size:0x8 +getModelCount__6GroundFv = .text:0x00004294; // type:function size:0x1C +getTransparencyFlag__9grGimmickFv = .text:0x000042B0; // type:function size:0x8 +getGimmickData__9grGimmickFv = .text:0x000042B8; // type:function size:0x8 +setGimmickData__9grGimmickFPv = .text:0x000042C0; // type:function size:0x8 fn_81_42C8 = .text:0x000042C8; // type:function size:0x110 fn_81_43D8 = .text:0x000043D8; // type:function size:0x58 fn_81_4430 = .text:0x00004430; // type:function size:0x50 @@ -192,8 +192,8 @@ lbl_81_rodata_1C = .rodata:0x0000001C; // type:object size:0x10 align:4 data:flo lbl_81_rodata_2C = .rodata:0x0000002C; // type:object size:0x24 align:4 data:float lbl_81_rodata_50 = .rodata:0x00000050; // type:object size:0x20 align:4 data:float lbl_81_rodata_70 = .rodata:0x00000070; // type:object size:0x20 align:4 data:float -lbl_81_rodata_90 = .rodata:0x00000090; // type:object size:0x8 align:4 data:float -lbl_81_rodata_98 = .rodata:0x00000098; // type:object size:0x18 align:4 data:float +lbl_81_rodata_90 = .rodata:0x00000090; // type:object size:0x4 align:4 data:float +lbl_81_rodata_98 = .rodata:0x00000098; // type:object size:0x18 align:8 data:float lbl_81_rodata_B0 = .rodata:0x000000B0; // type:object size:0x4 align:4 data:float lbl_81_rodata_B4 = .rodata:0x000000B4; // type:object size:0x4 align:4 data:float lbl_81_rodata_B8 = .rodata:0x000000B8; // type:object size:0x4 align:4 data:float @@ -234,26 +234,26 @@ lbl_81_data_710 = .data:0x00000710; // type:object size:0x8 lbl_81_data_718 = .data:0x00000718; // type:object size:0x10 lbl_81_data_728 = .data:0x00000728; // type:object size:0x8 lbl_81_data_730 = .data:0x00000730; // type:object size:0x8 -lbl_81_data_738 = .data:0x00000738; // type:object size:0x8 +__RTTI__6gfTask = .data:0x00000738; // type:object size:0x8 lbl_81_data_740 = .data:0x00000740; // type:object size:0x14 lbl_81_data_754 = .data:0x00000754; // type:object size:0x24 lbl_81_data_778 = .data:0x00000778; // type:object size:0x10 lbl_81_data_788 = .data:0x00000788; // type:object size:0x8 lbl_81_data_790 = .data:0x00000790; // type:object size:0x10 lbl_81_data_7A0 = .data:0x000007A0; // type:object size:0x8 -lbl_81_data_7A8 = .data:0x000007A8; // type:object size:0x1C8 +__vt__11grDxBigBlue = .data:0x000007A8; // type:object size:0x1C8 lbl_81_data_970 = .data:0x00000970; // type:object size:0xC data:string lbl_81_data_97C = .data:0x0000097C; // type:object size:0x24 -lbl_81_data_9A0 = .data:0x000009A0; // type:object size:0x8 +__RTTI__11grDxBigBlue = .data:0x000009A0; // type:object size:0x8 lbl_81_data_9A8 = .data:0x000009A8; // type:object size:0xC lbl_81_data_9B4 = .data:0x000009B4; // type:object size:0x1C -lbl_81_data_9D0 = .data:0x000009D0; // type:object size:0x8 +__RTTI__10grYakumono = .data:0x000009D0; // type:object size:0x8 lbl_81_data_9D8 = .data:0x000009D8; // type:object size:0xC lbl_81_data_9E4 = .data:0x000009E4; // type:object size:0x14 -lbl_81_data_9F8 = .data:0x000009F8; // type:object size:0x8 +__RTTI__9grGimmick = .data:0x000009F8; // type:object size:0x8 lbl_81_data_A00 = .data:0x00000A00; // type:object size:0x8 lbl_81_data_A08 = .data:0x00000A08; // type:object size:0x10 -lbl_81_data_A18 = .data:0x00000A18; // type:object size:0x8 +__RTTI__6Ground = .data:0x00000A18; // type:object size:0x8 lbl_81_data_A20 = .data:0x00000A20; // type:object size:0x1D8 lbl_81_data_BF8 = .data:0x00000BF8; // type:object size:0x10 lbl_81_data_C08 = .data:0x00000C08; // type:object size:0x30 diff --git a/config/RSBE01_02/symbols.txt b/config/RSBE01_02/symbols.txt index 7ddc373..620bd6e 100644 --- a/config/RSBE01_02/symbols.txt +++ b/config/RSBE01_02/symbols.txt @@ -7146,7 +7146,7 @@ fn_8018D098 = .text:0x8018D098; // type:function size:0x70 fn_8018D108 = .text:0x8018D108; // type:function size:0x6C fn_8018D174 = .text:0x8018D174; // type:function size:0x98 fn_8018D20C = .text:0x8018D20C; // type:function size:0x98 -GetResMdlNumEntries__Q34nw4r3g3d7ResFileFv = .text:0x8018D2A4; // type:function size:0x6C +GetResMdlNumEntries__Q34nw4r3g3d7ResFileCFv = .text:0x8018D2A4; // type:function size:0x6C fn_8018D310 = .text:0x8018D310; // type:function size:0x6C fn_8018D37C = .text:0x8018D37C; // type:function size:0x74 fn_8018D3F0 = .text:0x8018D3F0; // type:function size:0x6C @@ -17750,7 +17750,7 @@ lbl_80422EA8 = .data:0x80422EA8; // type:object size:0x10 lbl_80422EB8 = .data:0x80422EB8; // type:object size:0x10 jumptable_80422EC8 = .data:0x80422EC8; // type:object size:0x20 scope:local jumptable_80422EE8 = .data:0x80422EE8; // type:object size:0x20 scope:local -lbl_80422F08 = .data:0x80422F08; // type:object size:0x68 +__vt__6gfTask = .data:0x80422F08; // type:object size:0x68 lbl_80422F70 = .data:0x80422F70; // type:object size:0x64 data:4byte lbl_80422FD4 = .data:0x80422FD4; // type:object size:0xC lbl_80422FE0 = .data:0x80422FE0; // type:object size:0xC @@ -28419,7 +28419,7 @@ lbl_8059C4D0 = .sdata:0x8059C4D0; // type:object size:0x8 data:string lbl_8059C4D8 = .sdata:0x8059C4D8; // type:object size:0x8 data:string lbl_8059C4E0 = .sdata:0x8059C4E0; // type:object size:0x8 lbl_8059C4E8 = .sdata:0x8059C4E8; // type:object size:0x8 -lbl_8059C4F0 = .sdata:0x8059C4F0; // type:object size:0x8 +__RTTI__6gfTask = .sdata:0x8059C4F0; // type:object size:0x8 lbl_8059C4F8 = .sdata:0x8059C4F8; // type:object size:0x8 lbl_8059C500 = .sdata:0x8059C500; // type:object size:0x8 lbl_8059C508 = .sdata:0x8059C508; // type:object size:0x8 diff --git a/configure.py b/configure.py index a00b399..6c87c1d 100755 --- a/configure.py +++ b/configure.py @@ -921,7 +921,9 @@ def MatchingFor(*versions): "mw_version": config.linker_version, "cflags": cflags_rel, "host": False, - "objects": [], + "objects": [ + Object(Matching, "mo_stage/st_dxbigblue/gr_dxbigblue.cpp"), + ], }, { "lib": "st_dxcorneria", diff --git a/include/lib/BrawlHeaders b/include/lib/BrawlHeaders index 792c6ce..9c725e8 160000 --- a/include/lib/BrawlHeaders +++ b/include/lib/BrawlHeaders @@ -1 +1 @@ -Subproject commit 792c6ce926acee147bc32fa48a8dc991574a9586 +Subproject commit 9c725e8f590653c8a40fae21275922d8fed4775b diff --git a/include/st_dxbigblue/gr_dxbigblue.h b/include/st_dxbigblue/gr_dxbigblue.h new file mode 100644 index 0000000..ef147ac --- /dev/null +++ b/include/st_dxbigblue/gr_dxbigblue.h @@ -0,0 +1,15 @@ +#pragma once + +#include +#include +#include + +class grDxBigBlue : public grYakumono { +protected: + u8 unk150; + float unk154; +public: + grDxBigBlue(const char* taskName); + virtual ~grDxBigBlue(); +}; +static_assert(sizeof(grDxBigBlue) == 0x158, "Class is the wrong size!"); diff --git a/src/mo_stage/st_dxbigblue/gr_dxbigblue.cpp b/src/mo_stage/st_dxbigblue/gr_dxbigblue.cpp new file mode 100644 index 0000000..929dfa7 --- /dev/null +++ b/src/mo_stage/st_dxbigblue/gr_dxbigblue.cpp @@ -0,0 +1,17 @@ +#include +#include + +#include + +// Deadstripped function to emit Ground::setMdlIndex +static void wrapper(grDxBigBlue* ths, s32 mdlIndex) { + ths->setMdlIndex(mdlIndex); +} + +grDxBigBlue::grDxBigBlue(const char* taskName) : grYakumono(taskName) { + unk150 = 0; + unk154 = 0.0f; + setupMelee(); +} + +grDxBigBlue::~grDxBigBlue() { }