WordInsertion

From Terranigma Wiki
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