d_a_obj_brg matching (#2539)

This commit is contained in:
YunataSavior 2025-07-18 00:53:45 -07:00 committed by GitHub
parent 522f06458d
commit 6bc4faa5f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 359 additions and 444 deletions

View File

@ -3,9 +3,9 @@ _epilog = .text:0x0000002C; // type:function size:0x2C scope:global
_unresolved = .text:0x00000058; // type:function size:0x20 scope:global _unresolved = .text:0x00000058; // type:function size:0x20 scope:global
__register_global_object = .text:0x00000078; // type:function size:0x1C scope:global __register_global_object = .text:0x00000078; // type:function size:0x1C scope:global
__destroy_global_chain = .text:0x00000094; // type:function size:0x58 scope:global __destroy_global_chain = .text:0x00000094; // type:function size:0x58 scope:global
ride_call_back__FP4dBgWP10fopAc_ac_cP10fopAc_ac_c = .text:0x000000EC; // type:function size:0x3F0 scope:global ride_call_back__FP4dBgWP10fopAc_ac_cP10fopAc_ac_c = .text:0x000000EC; // type:function size:0x3F0 scope:local
__dt__4cXyzFv = .text:0x000004DC; // type:function size:0x3C scope:global __dt__4cXyzFv = .text:0x000004DC; // type:function size:0x3C scope:global
daObj_Brg_Draw__FP13obj_brg_class = .text:0x00000518; // type:function size:0xA08 scope:global daObj_Brg_Draw__FP13obj_brg_class = .text:0x00000518; // type:function size:0xA08 scope:local
control1__FP13obj_brg_classP4br_s = .text:0x00000F20; // type:function size:0x324 scope:global control1__FP13obj_brg_classP4br_s = .text:0x00000F20; // type:function size:0x324 scope:global
control2__FP13obj_brg_classP4br_s = .text:0x00001244; // type:function size:0x1C4 scope:global control2__FP13obj_brg_classP4br_s = .text:0x00001244; // type:function size:0x1C4 scope:global
control3__FP13obj_brg_classP4br_s = .text:0x00001408; // type:function size:0xC0 scope:global control3__FP13obj_brg_classP4br_s = .text:0x00001408; // type:function size:0xC0 scope:global
@ -13,12 +13,12 @@ cut_control1__FP13obj_brg_classP4br_s = .text:0x000014C8; // type:function size:
cut_control2__FP13obj_brg_classP4br_s = .text:0x000017E8; // type:function size:0x330 scope:global cut_control2__FP13obj_brg_classP4br_s = .text:0x000017E8; // type:function size:0x330 scope:global
himo_cut_control1__FP13obj_brg_classP4cXyzf = .text:0x00001B18; // type:function size:0x240 scope:global himo_cut_control1__FP13obj_brg_classP4cXyzf = .text:0x00001B18; // type:function size:0x240 scope:global
obj_brg_move__FP13obj_brg_class = .text:0x00001D58; // type:function size:0xCA4 scope:global obj_brg_move__FP13obj_brg_class = .text:0x00001D58; // type:function size:0xCA4 scope:global
daObj_Brg_Execute__FP13obj_brg_class = .text:0x000029FC; // type:function size:0x1618 scope:global daObj_Brg_Execute__FP13obj_brg_class = .text:0x000029FC; // type:function size:0x1618 scope:local
daObj_Brg_IsDelete__FP13obj_brg_class = .text:0x00004014; // type:function size:0x20 scope:global daObj_Brg_IsDelete__FP13obj_brg_class = .text:0x00004014; // type:function size:0x20 scope:local
daObj_Brg_Delete__FP13obj_brg_class = .text:0x00004034; // type:function size:0x5C scope:global daObj_Brg_Delete__FP13obj_brg_class = .text:0x00004034; // type:function size:0x5C scope:local
CreateInit__FP10fopAc_ac_c = .text:0x00004090; // type:function size:0x190 scope:global CreateInit__FP10fopAc_ac_c = .text:0x00004090; // type:function size:0x190 scope:global
CallbackCreateHeap__FP10fopAc_ac_c = .text:0x00004220; // type:function size:0x610 scope:global CallbackCreateHeap__FP10fopAc_ac_c = .text:0x00004220; // type:function size:0x610 scope:local
daObj_Brg_Create__FP10fopAc_ac_c = .text:0x00004830; // type:function size:0xD24 scope:global daObj_Brg_Create__FP10fopAc_ac_c = .text:0x00004830; // type:function size:0xD24 scope:local
__dt__8dCcD_CylFv = .text:0x00005554; // type:function size:0xCC scope:global __dt__8dCcD_CylFv = .text:0x00005554; // type:function size:0xCC scope:global
__ct__8dCcD_CylFv = .text:0x00005620; // type:function size:0x84 scope:global __ct__8dCcD_CylFv = .text:0x00005620; // type:function size:0x84 scope:global
__dt__8cM3dGCylFv = .text:0x000056A4; // type:function size:0x48 scope:global __dt__8cM3dGCylFv = .text:0x000056A4; // type:function size:0x48 scope:global
@ -173,10 +173,10 @@ obj_brg_bmd$5576 = .rodata:0x00000160; // type:object size:0xC scope:local
@stringBase0 = .rodata:0x00000244; // type:object size:0x17 scope:local data:string_table @stringBase0 = .rodata:0x00000244; // type:object size:0x17 scope:local data:string_table
l_color$4002 = .data:0x00000000; // type:object size:0x4 scope:local l_color$4002 = .data:0x00000000; // type:object size:0x4 scope:local
l_color$4042 = .data:0x00000004; // type:object size:0x4 scope:local l_color$4042 = .data:0x00000004; // type:object size:0x4 scope:local
ita_z_p = .data:0x00000008; // type:object size:0x2C scope:global align:4 data:float ita_z_p = .data:0x00000008; // type:object size:0x2C scope:local align:4 data:float
himo_cyl_src$5532 = .data:0x00000034; // type:object size:0x44 scope:local himo_cyl_src$5532 = .data:0x00000034; // type:object size:0x44 scope:local
wire_cyl_src$5533 = .data:0x00000078; // type:object size:0x44 scope:local wire_cyl_src$5533 = .data:0x00000078; // type:object size:0x44 scope:local
l_daObj_Brg_Method = .data:0x000000BC; // type:object size:0x20 scope:global l_daObj_Brg_Method = .data:0x000000BC; // type:object size:0x20 scope:local
g_profile_OBJ_BRG = .data:0x000000DC; // type:object size:0x30 scope:global g_profile_OBJ_BRG = .data:0x000000DC; // type:object size:0x30 scope:global
__vt__8cM3dGAab = .data:0x0000010C; // type:object size:0xC scope:global __vt__8cM3dGAab = .data:0x0000010C; // type:object size:0xC scope:global
__vt__8cM3dGCyl = .data:0x00000118; // type:object size:0xC scope:global __vt__8cM3dGCyl = .data:0x00000118; // type:object size:0xC scope:global
@ -199,7 +199,7 @@ __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:globa
@1012 = .bss:0x0000003C; // type:object size:0x1 scope:local @1012 = .bss:0x0000003C; // type:object size:0x1 scope:local
@1010 = .bss:0x00000040; // type:object size:0x1 scope:local @1010 = .bss:0x00000040; // type:object size:0x1 scope:local
@1009 = .bss:0x00000044; // type:object size:0x1 scope:local @1009 = .bss:0x00000044; // type:object size:0x1 scope:local
wy = .bss:0x00000046; // type:object size:0x2 scope:global data:2byte wy = .bss:0x00000046; // type:object size:0x2 scope:local data:2byte
@5786 = .bss:0x00000048; // type:object size:0xC scope:local @5786 = .bss:0x00000048; // type:object size:0xC scope:local
@5789 = .bss:0x00000058; // type:object size:0xC scope:local @5789 = .bss:0x00000058; // type:object size:0xC scope:local
@5790 = .bss:0x00000064; // type:object size:0xC scope:local @5790 = .bss:0x00000064; // type:object size:0xC scope:local

View File

@ -1891,7 +1891,7 @@ config.libs = [
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_bmshutter"), ActorRel(MatchingFor("GZ2E01"), "d_a_obj_bmshutter"),
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_bombf"), ActorRel(MatchingFor("GZ2E01"), "d_a_obj_bombf"),
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_boumato"), ActorRel(MatchingFor("GZ2E01"), "d_a_obj_boumato"),
ActorRel(NonMatching, "d_a_obj_brg"), ActorRel(MatchingFor("GZ2E01"), "d_a_obj_brg"),
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_bsGate"), ActorRel(MatchingFor("GZ2E01"), "d_a_obj_bsGate"),
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_bubblePilar"), ActorRel(MatchingFor("GZ2E01"), "d_a_obj_bubblePilar"),
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_catdoor"), ActorRel(MatchingFor("GZ2E01"), "d_a_obj_catdoor"),

View File

@ -89,8 +89,9 @@ public:
/* 0xB1EE */ u8 field_0xB1EE[0xB1EF - 0xB1EE]; /* 0xB1EE */ u8 field_0xB1EE[0xB1EF - 0xB1EE];
/* 0xB1EF */ s8 field_0xb1ef; /* 0xB1EF */ s8 field_0xb1ef;
/* 0xB1F0 */ s8 field_0xb1f0; /* 0xB1F0 */ s8 field_0xb1f0;
/* 0xB1F1 */ u8 field_0xb1f1; /* 0xB1F1 */ s8 field_0xb1f1;
/* 0xB1F2 */ u8 field_0xb1f2[0xb1f8 - 0xB1F2]; /* 0xB1F2 */ s8 field_0xb1f2[2];
/* 0xB1F4 */ u8 field_0xb1f4[0xb1f8 - 0xB1F4];
}; };
STATIC_ASSERT(sizeof(obj_brg_class) == 0xb1f8); STATIC_ASSERT(sizeof(obj_brg_class) == 0xb1f8);

View File

@ -757,7 +757,7 @@ public:
virtual BOOL checkCutCharge() const { return FALSE; } virtual BOOL checkCutCharge() const { return FALSE; }
virtual BOOL checkCutTurnCharge() const { return FALSE; } virtual BOOL checkCutTurnCharge() const { return FALSE; }
virtual BOOL checkCutLargeJumpCharge() const { return FALSE; } virtual BOOL checkCutLargeJumpCharge() const { return FALSE; }
virtual bool getBokoFlamePos(cXyz*) { return FALSE; } virtual BOOL getBokoFlamePos(cXyz*) { return FALSE; }
virtual BOOL checkComboCutTurn() const { return FALSE; } virtual BOOL checkComboCutTurn() const { return FALSE; }
virtual BOOL checkClimbMove() const { return FALSE; } virtual BOOL checkClimbMove() const { return FALSE; }
virtual BOOL checkGrassWhistle() const { return FALSE; } virtual BOOL checkGrassWhistle() const { return FALSE; }

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,104 @@
import sys
REG_F = {
"TREG_F": 0x00c,
"DREG_F": 0x09c,
"IREG_F": 0x12c,
"SREG_F": 0x1bc,
"UREG_F": 0x24c,
"OREG_F": 0x2dc,
"YREG_F": 0x36c,
"KREG_F": 0x3fc,
"BREG_F": 0x48c,
"MREG_F": 0x51c,
"AREG_F": 0x5ac,
"PREG_F": 0x63c,
"NREG_F": 0x6cc,
"WREG_F": 0x75c,
"JREG_F": 0x7ec,
"HREG_F": 0x87c,
"VREG_F": 0x90c,
"XREG_F": 0x99c,
"ZREG_F": 0xa2c,
"nREG_F": 0xabc,
"kREG_F": 0xb4c,
"oREG_F": 0xbdc,
"yREG_F": 0xc6c,
"aREG_F": 0xcfc,
"hREG_F": 0xd8c,
"tREG_F": 0xe1c
}
REG_S = {
"TREG_S": 0x084,
"DREG_S": 0x114,
"IREG_S": 0x1a4,
"SREG_S": 0x234,
"UREG_S": 0x2c4,
"OREG_S": 0x354,
"YREG_S": 0x3e4,
"KREG_S": 0x474,
"BREG_S": 0x504,
"MREG_S": 0x594,
"AREG_S": 0x624,
"PREG_S": 0x6b4,
"NREG_S": 0x744,
"WREG_S": 0x7d4,
"JREG_S": 0x864,
"HREG_S": 0x8f4,
"VREG_S": 0x984,
"XREG_S": 0xa14,
"ZREG_S": 0xaa4,
"nREG_S": 0xb34,
"kREG_S": 0xbc4,
"oREG_S": 0xc54,
"yREG_S": 0xce4,
"aREG_S": 0xd74,
"hREG_S": 0xe04,
"tREG_S": 0xe94
}
def find_register(hex_val, reg_map, step):
best_match = None
best_base = -1
for name, base in reg_map.items():
if base <= hex_val and base > best_base:
best_match = name
best_base = base
if best_match is not None:
index = (hex_val - best_base) // step
expected = best_base + index * step
if expected == hex_val:
return f"{best_match}({index})"
raise ValueError("No matching register found.")
def main():
if len(sys.argv) != 3:
print("Usage: greg_calc.py [s|f] [hex_val]")
return
mode = sys.argv[1].lower()
try:
hex_val = int(sys.argv[2], 16)
except ValueError:
print("Invalid hex value. Use format like 0x75c")
return
if mode == 'f':
result = find_register(hex_val, REG_F, 4)
elif mode == 's':
result = find_register(hex_val, REG_S, 2)
else:
print("Invalid mode. Use 's' for short or 'f' for float.")
return
print(result)
if __name__ == "__main__":
main()