db/globals.tsv + ApplyGlobals.java: label and type global data; apply_db.py 1000x faster (token match + dict lookup)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1d43433e1b
commit
2e4322b8a5
5 files changed
+70
-4
No files matched your search
@@ -11,7 +11,7 @@ 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)
|
||||
locals.tsv (local variables inside one function), globals.tsv (global data), protos.zhl (signatures)
|
||||
notes/ what is known per entity/item/character/system, with addresses; notes/README.md is the index
|
||||
src/ C++ checked against the decompile: structs.hpp (generated: every confirmed struct, offsets static_asserted),
|
||||
anm2/ (sprite player), rooms/ (.stb + RoomConfig)
|
||||
@@ -240,6 +240,8 @@ finding only in your scratch files or your final message.
|
||||
**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`.
|
||||
**A global** (a `DAT_<address>` you identified, e.g. the Game singleton): `address<TAB>g_name<TAB>C type<TAB>evidence`
|
||||
in `db/globals.tsv`. Pointer types (`Game*`) type every access; `apply_db.py` renames it in the dump at once.
|
||||
**A function signature**: one REPENTOGON-style line in `db/protos.zhl`, e.g.
|
||||
`__thiscall int Entity_NPC::FooBar(int count, Vector* pos);`. It is applied only if the callee's `RET n` agrees.
|
||||
3. **Re-apply to Ghidra** after any of them: `./build.sh --db` (about 10 min: updates the project and re-decompiles every
|
||||
|
||||
Reference in new issue
Block a user