WordInsertion

From Terranigma Wiki
Revision as of 07:21, 11 April 2012 by Crediar (talk | contribs) (Created page with "To save space Terranigma uses a simple word insertion for common words. It works like this: Text_E5 = 0x120000 TextInfoTable_E5 = 0x12C4EE u8 Byte = GetByte(); u32 Wo...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

To save space Terranigma uses a simple word insertion for common words.

It works like this:

Text_E5 = 0x120000
TextInfoTable_E5 = 0x12C4EE

u8 Byte = GetByte();
u32 WordOffset = Text_E5 + BS16( *(u16*)( ROM + TextInfoTable_E5 + 1 + (Byte-1) * 2) );

word tables

Name Text TextInfo
0xE5 message opcode 0x120000 0x12C4EE
0xE6 message opcode 0x12D065 0x12CE65
Items 0x128577 0x128176