Commit Graph
3 Commits
Author SHA1 Message Date
shweetandClaude Opus 5.5 fdfdb10137 Build 28: DumpAll exports types, globals and imports; the generated tree targets 64-bit Linux
DumpAll writes dump/types.tsv (Ghidra structs/unions with components, typedefs, enums with values), data.tsv (global
data labels with types) and externals.tsv (imported functions). source_tree.py lays the Ghidra types out with the
classes (591 types, 347 sized), declares every global, import and code label, drops Windows calling conventions,
leaves third-party classes (std, rapidxml, theoraplayer, luabridge, stb_vorbis) declared but not reconstructed, turns
raw vtable calls on typed objects into named virtual calls and (int)p + n byte arithmetic into (char *)p + n.
The tree now targets x86_64 Linux; the original 32-bit layout stays as LAYOUT32 asserts, checked with -m32 (they hold).
--check: 775/3262 method bodies compile for x86_64 (23.8%), 23010 raw offset accesses left (64-bit hazards).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 20:54:04 -05:00
shweetandClaude Opus 5.5 177020866b Build 27: real class sizes in Ghidra's structs; src/game: generated C++ tree with method bodies
ApplyTypes grows each struct to its RTTI size: this[1] misreads 1363 -> 941, prototypes applied 3266.
scripts/source_tree.py now writes src/game/classes.hpp (477 classes, every free and namespace function declared,
Ghidra p-code intrinsics as macros) and one .cpp per class with its decompiled method bodies; member calls become
direct calls ((Class *)(obj))->Class::method(args) and field_0xN bytes explicit offsets. --check compiles the tree:
652/3315 method bodies compile against the header (19.7%), the rest mostly need the data globals and Ghidra types
DumpAll exports from the next build. CLAUDE.md is untracked (gitignored).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 20:18:39 -05:00
shweetandClaude Opus 5.5 c426b91486 Full redump with round 26 (689 locals in 127 functions); src/game/classes.hpp: reconstructed class declarations
classes.tsv (vtable.py --classes): 194 RTTI classes with vftable, direct bases (offsets from the PMD), vtable slots and,
for 176, the exact size from the deleting destructor's sized delete. Sizes flow into structs.hpp (static_assert sizeof)
and, next build, into Ghidra's structs (ApplyTypes 'size' rows) so this[1]._x stops standing in for the tail.
scripts/source_tree.py generates src/game/classes.hpp: 293 classes with real bases, vtables in slot order (overrides,
REPENTOGON slot names, vfunc_N placeholders), fields at their offsets, 2400 method declarations; it compiles with
clang --target=i686-pc-windows-msvc and all 174 sizeof / 1899 offsetof asserts hold. Round 26's prototypes are held.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 19:43:13 -05:00