For now, the tool can:
- * Unpack/Repack *.PAK files (like dekyra)
* Extract/Insert *.TXT from *.DL* files
* Extract *.TXT from *.EMC files (I'm working in insertion)
Looking to the file internals, I don't have any idea on how to proceed, so, I've to look at Kyra Engine source code, to get any, and the file starts do make a little sense.
Code: Select all
if (!fontData || !sz)
error("couldn't load font file '%s'", filename);
uint16 fontSig = READ_LE_UINT16(fontData + 2);
if (fontSig != 0x500)
error("Invalid font data (file '%s')", filename);
fnt->charWidthTable = fontData + READ_LE_UINT16(fontData + 8);
fnt->charSizeOffset = READ_LE_UINT16(fontData + 4);
fnt->charBitmapOffset = READ_LE_UINT16(fontData + 6);
fnt->charWidthTableOffset = READ_LE_UINT16(fontData + 8);
fnt->charHeightTableOffset = READ_LE_UINT16(fontData + 0xC);
return true;
- * The first two bytes are the filesize;
* The 3rd and 4º are a kind of signature;
* 5º and 6º charSizeOffset;
* 7º and 8º charBitmapOffset;
* 9º and 10º charWidthTableOffset;
* 11º and 12º don't have in reference (maybe the end of charWidthTable?)
* 13 and 14º charHeightTableOffset;
I looking for more details about...
* What's the charWidthTableOffset and charHeightTableOffset, what the purpose of this two tables?
* What's the 11º and 12º bytes(fontData + 0xA)? Is really the end of charWidthTableOffset?
* And the charBitmapOffset? Is the whole bitmap including tables?
My idea is convert the *.FNT Files to *.BMP, add the Latin-1 characters and convert the *.BMP into a new *.FNT.
Thanks in advance!
Sandro