View Single Post
Old 08-30-2010, 09:14 AM   #11
Dunstan
Rookie
 
Join Date: Jul 2010
Posts: 11
For those who'd like to write a translator for Mi2SE:

The fr.uitext.info's format is the following:

Byte 0-3: identifying data(?)
Byte 4-10131 index table
Byte 10131- localization data in pointer text - localization text format separated by 00 bytes.


The index table contains reversed 4 byte values (for example hex 90 27 00 00 -> hex 00 00 27 90), every value corresponds to one of the pointer texts (like MENU_PLAY_NEW_GAME) or one of the localized texts (like NOUVELLE PARTIE).
There is an offset value for every element in the index table which is i*4 where i is the element's position in the table (starting with 1). In the case of the first index of the table which points to 'MENU_PLAY_NEW_GAME' by value 00 00 27 90, the correct address would be 00 00 27 94, the second index, which is the translated text 'NOUVELLE PARTIE' 00 00 27 9F, the correct address is 00 00 27 A7.

The correct addresses of the n-th item are:

pointer text of the n-th item: (2*(n)-1)-th element of the index table+4*(2*n-1)
localized text of the n-th item: (2*n)-th element of the index table+4*(2*n)

where n starts with 1.

I hope it helps.
Dunstan is offline   you may: quote & reply,