OBD:TSGA

From OniGalore
Revision as of 10:33, 25 May 2008 by Neo (talk | contribs)
Jump to navigation Jump to search
ONI BINARY DATA
TSFT << Other file types >> TStr
TSGA : Glyph Array
switch to XML:TSGA page
Overview @ Oni Stuff
OBD.png


Every TSGA file contains 256 elements. One element stands for one of the 256 signs of the ASCII table. The first 32 signs are reserved control characters, so these elements are always complete zero.


Tsga a.gif


Offset Type Raw Hex Value Description
0x00 res_id 01 04 00 00 4 00004-.TSGA
0x04 lev_id 01 00 00 00 0 level 0
First element (black outline)
0x00 int16 00 00 unused character code
0x02 int16 00 00 unused width
0x04 int16 00 00 unused bitmap width
0x06 int16 00 00 unused bitmap height
0x08 int16 00 00 unused bitmap x origin
0x0A int16 00 00 unused bitmap y origin
0x0C int32 00 00 00 00 unused start element in the TSFT file
0x10 int32 00 00 00 00 unused runtime only


A glyph is basically a monochrome bitmap width * height pixels in size. Each pixel is stored in one byte in the TSFT file (fonts are antialiased so shades of gray are needed rather than storing each pixel in one bit) so each element in the TSFT file contains 4 pixels. Rows of pixels are not 4 bytes aligned so a row can start inside an element.


ONI BINARY DATA
TSFT << Other file types >> TStr
TSGA : Glyph Array
Global file