Struct fields only where this exe confirms them; 600 verified fields; generated src/structs.hpp
REPENTOGON targets 1.9.7.12 and its offsets drift, so they are no longer trusted by themselves: scripts/zhl_fields.py (replaces fix_offsets.py) keeps a REPENTOGON field only when a getter or the game's Lua field table confirms it, or it sits between two confirmed fields with the same shift. 8 agents verified the rest against code (Game/Manager/Entity_Player shift in steps; Room, ANM2, EntityConfig unshifted). src/structs.hpp is generated from the confirmed fields with static_asserts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d2b8a9229a
commit
5d1b595294
11 files changed
+5713
-1608
No files matched your search
@@ -13,7 +13,8 @@ it, or paste large parts of it anywhere public. The game install is only read, n
|
||||
db/ YOUR names and types: names.tsv (address -> name, beats every other source), fields.tsv (struct fields),
|
||||
locals.tsv (local variables inside one function)
|
||||
notes/ what is known per entity/item/character/system, with addresses; notes/README.md is the index
|
||||
src/ reimplementations checked against the decompile: anm2/ (sprite player), rooms/ (.stb + RoomConfig)
|
||||
src/ C++ checked against the decompile: structs.hpp (generated: every confirmed struct, offsets static_asserted),
|
||||
anm2/ (sprite player), rooms/ (.stb + RoomConfig)
|
||||
decompile.sh print decompiled C for a function (name regex or address), from the dump or live
|
||||
find.sh search: names, strings, string users, code, callers/callees, NPC type -> AI, item id, enums, fields
|
||||
build.sh rebuild everything from the exe (after a game update)
|
||||
@@ -72,10 +73,17 @@ and 230 `NpcAI::` routines.
|
||||
(`EntityPtr::Ref` is also `RNG::GetSeed`, `Level::GetCurrentRoom` is `Game::GetRoom`, and so on). Judge tiny
|
||||
functions by their body, not their name.
|
||||
|
||||
Types: structs built from REPENTOGON's zhl struct definitions, plus `lua_fields.tsv` (about 100 fields REPENTOGON lacks,
|
||||
**Struct fields are only shown where this exe confirms the offset.** REPENTOGON's definitions target 1.9.7.12 and members
|
||||
drift (Game +0x58 .. +0xd98 in steps, Entity_Player +4 .. +0x2c, Entity_Familiar +0x14, GridEntity_Door +0x114), so a
|
||||
REPENTOGON offset is never evidence by itself. `scripts/zhl_fields.py` keeps a REPENTOGON field only when a trivial getter
|
||||
or the game's Lua field table confirms it, or when it sits between two confirmed fields with the same shift;
|
||||
`db/fields.tsv` holds the rest, each with the function that proves it (about 600 were verified that way). Anything else is
|
||||
`field_0xNNN`: unknown, not guessed. `src/structs.hpp` is generated from the same data and only compiles if every offset
|
||||
is consistent.
|
||||
|
||||
Types: structs built from the confirmed REPENTOGON fields, plus `lua_fields.tsv` (about 100 fields REPENTOGON lacks,
|
||||
read from the game's own trivial Lua getters, e.g. Entity 0x334 `_targetPosition`) and `db/fields.tsv`. Embedded structs
|
||||
are typed too (`npc->_sprite._animState._isPlaying`). 245 structs (Entity, Entity_NPC, Entity_Player, ...),
|
||||
with offsets **re-anchored for this exe** against trivial getters (Entity_Player fields drift +4 … +0x2c past 0x13b8).
|
||||
are typed too (`npc->_sprite._animState._isPlaying`).
|
||||
ZHL `__thiscall` methods get a typed `this`, and every `NpcAI::` routine is
|
||||
`__fastcall (Entity_NPC *npc)`, so you read `npc->_state`, `npc->_variant`, `npc->_i1` rather than
|
||||
`param_1[0x2d9]`. Unknown offsets still show as `field_0xNNN` or `*(int *)(p + 0xNNN)`. Look them up with
|
||||
@@ -222,7 +230,8 @@ finding only in your scratch files or your final message.
|
||||
(instant: renames it in the dump everywhere, including call sites and `npc_ai.tsv`).
|
||||
For a virtual method, `./find.sh vtable CLASS` shows which slot it is; slot names are the most reliable evidence
|
||||
there is (a short ZHL sig or ICF can put a name on the wrong function, a vtable slot cannot).
|
||||
2. **A struct field** you have confirmed: add `Class<TAB>0xOFF<TAB>type _name<TAB>evidence` to `db/fields.tsv`.
|
||||
2. **A struct field** you have confirmed in this exe: add `Class<TAB>0xOFF<TAB>type _name<TAB>evidence` to `db/fields.tsv`
|
||||
(arrays as `int _slots[4]`). Evidence is a function that reads/writes it with a known meaning, never REPENTOGON's offset.
|
||||
**A local variable** in a function you have read closely: `function<TAB>local_2c0<TAB>newName[<TAB>C type]` in
|
||||
`db/locals.tsv`. Only when every use has the same role: MSVC reuses registers and stack slots (see the file header).
|
||||
Name-only rows reach the dump with `apply_db.py`; rows with a type (e.g. `Vector` for an x/y pair) need `--db`.
|
||||
|
||||
Reference in new issue
Block a user