From e6fc1f18b786fb10803b2a147b7e808805e9d33b Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Thu, 2 Apr 2026 18:25:19 -0400 Subject: [PATCH] Update ghidra struct export script to support C-style actors --- docs/tww_class_to_cpp.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/tww_class_to_cpp.py b/docs/tww_class_to_cpp.py index dd0b67f28..ba531b76f 100644 --- a/docs/tww_class_to_cpp.py +++ b/docs/tww_class_to_cpp.py @@ -68,8 +68,12 @@ for i in range (struct.getNumComponents()): member_name = undefined_member_name_prefix+hex_offset_string if member_name in ["parent", "base"] and data_type in ['fopAc_ac_c', 'dBgS_MoveBgActor', 'fopNpc_npc_c', 'fopEn_enemy_c', 'daPy_py_c', 'daPy_npc_c']: - # Not a member, inheritance - continue + if type_name.endswith("_class"): + # C-style actors use composition instead of inheritance + member_name = "actor" + else: + # Not a member, inheritance + continue # if undefined member if data_type == 'undefined' or check == True: