ApplyProtos: REPENTOGON prototypes applied only where the callee's RET n agrees (~600 functions)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
737a867934
commit
288ea53ab4
3 files changed
+91
-1
No files matched your search
@@ -84,7 +84,10 @@ 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`).
|
||||
ZHL `__thiscall` methods get a typed `this`, and every `NpcAI::` routine is
|
||||
**Prototypes** come from REPENTOGON's declarations only where this exe confirms them: a `__thiscall`/`__stdcall` callee
|
||||
pops its own stack arguments (`RET n`), so the declared parameters must add up to `n` (`scripts/ApplyProtos.java`, about
|
||||
600 functions; the comment says `prototype: REPENTOGON, confirmed by RET n`). Methods of a class get a typed `this`
|
||||
even without a prototype, 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
|
||||
`find.sh field` or `find.sh lua` (the Lua table has authoritative offsets such as `EntityNPC State field+0xb64`).
|
||||
|
||||
Reference in new issue
Block a user