Typed this for ~780 more methods whose ECX reads fit their class's confirmed fields; Sprite/Color = ANM2/ColorMod

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shweetandClaude Opus 5.5 committed 2026-10-25 16:08:01 -04:00
1 parent 76ef4d7834
commit cbb2f465ec
5 files changed
+62 -6

No files matched your search

+4 -2
View File
@@ -87,8 +87,10 @@ read from the game's own trivial Lua getters, e.g. Entity 0x334 `_targetPosition
are typed too (`npc->_sprite._animState._isPlaying`).
**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, plus `db/protos.zhl`; the comment says `prototype: REPENTOGON, confirmed by RET n` or names the db file). Methods of a class get a typed `this`
even without a prototype, and every `NpcAI::` routine is
600 functions, plus `db/protos.zhl`; the comment says `prototype: REPENTOGON, confirmed by RET n` or names the db file).
Methods with a REPENTOGON `__thiscall` declaration get a typed `this`; so does any other `Class::method` whose reads
from ECX land at least 60% inside Class's confirmed fields (`scripts/this_types.py`, ~800 methods; the Lua `Sprite` and
`Color` classes are ANM2 and ColorMod). 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`).