I changed the approach a bit.
I realized that injection of stuff like text and the looker sprite at runtime, would result in every var
reference requiring an address shift.
That would be much more difficult to track and patch at runtime.
So I decided to do things a little differently:
- Copied the grit-*generated* lookerRSE.c, lookerFRLG.c and associated headers.
- text injection will also be done at compile time. To do so, I'll take the path to the uncompressed
RSEFRLG table (which is generated by text_helper) as a cmdline arg and use it to inject those strings
at compile time.
So the only runtime injection required would be the pokémon themselves. And the size of those is static.
So that works out!