OBD:TSGA
|
|
|
TSGA is essentially a code page which breaks down the pixel data block in a TSFT instance into individual glyphs to represent designated ASCII characters (see TSFT's page for the details of the pixel storage). Each TSGA is linked from a single TSFT. Every TSGA instance contains 256 elements of 20 bytes each, thus taking up 5,120 bytes without the header.
A TSFT can link to 256 TSGAs, but in the vanilla data for Western-language releases, TSFTs only use their first TSGA link slot, pointing to a dedicated TSGA which delineates the TSFT pixel block into ASCII symbols which can be grouped together as follows:
- the first 32 symbols (0 to 31) are non-printable control characters, so these elements are always all zero;
- the next 96 symbols (32 to 127) correspond to standard US ASCII;
- the upper half of the table (128 to 255) contains additional punctuations and ligatures, Latin characters with diacritics and, in the case of the Russian version, Cyrillic script.
The code page is not the same for all Western Oni versions. And Asian localizations of Oni use their own extended encoding system and glyph data either in place of Oni's (Chinese), or in combination with it (Japanese). See OBD:Text encoding for details on the encoding systems, a list of the available characters in each language version, and a review of known issues.
PC implementation
| 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 (blank due to being unprintable control character) | ||||
| 0x00 | uint16 | 00 00 | empty | character code |
| 0x02 | uint16 | 00 00 | empty | kerning |
| 0x04 | uint16 | 00 00 | empty | bitmap width |
| 0x06 | uint16 | 00 00 | empty | bitmap height |
| 0x08 | uint16 | 00 00 | empty | bitmap x origin |
| 0x0A | uint16 | 00 00 | empty | bitmap y origin |
| 0x0C | uint32 | 00 00 00 00 | empty | start element index (size uint32) in the TSFT pixel array |
| 0x10 | uint32 | 00 00 00 00 | "cell"; runtime only | |
PS2 implementation
The end of the PS2 TSGA differs. See the TSFT page for an explanation of the new indexation method for the glyph pixel data.
| 0x0C | uint32 | 00 00 00 00 | unused | position of the pixel glyph data in the .raw part of the TSFT file, in quarter-bytes |
| 0x10 | uint32 | 00 00 00 00 | unused | runtime only? |
| ONI BINARY DATA |
|---|
| TSFT << Other file types >> TStr |
| TSGA : Glyph Array |
| Interface file |

