WordInsertion

From Terranigma Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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