Skip to content

Commit

Permalink
Preserve struct order when more than one RTTI struct fit in header
Browse files Browse the repository at this point in the history
  • Loading branch information
bwrsandman committed Sep 16, 2024
1 parent 04665c2 commit 8a31e40
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions scripts/headers/bw1_decomp_gen/generate_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,14 @@ def find_methods(function_db: list[dict]) -> tuple[dict[str, DefinedFunctionProt
includes: list[Header.Include] = []
virtual_method_names = [i.name for i in vftable.members] if vftable else []

structs: list[Struct] = []
header = header_map.get(path)
structs: list[Struct] = header.structs if header is not None else []
if vftable:
structs.append(vftable)
if t.name in helper_base_map:
structs.append(helper_base_map[t.name])
structs.append(RTTIClass(t, vftable_address_look_up, virtual_method_names, class_method_look_up, class_static_method_look_up))

header = header_map.get(path)
if header is not None:
structs += header.structs

for s in structs:
local_header_import_map[s.decorated_name] = path
header = Header(path, includes, structs, local_header_import_map)
Expand Down

0 comments on commit 8a31e40

Please sign in to comment.