GRAF:Aglaia Online

From XentaxWiki
Revision as of 18:03, 4 December 2005 by Paul Siramy (talk | contribs) (Format specification for TXB)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

TXB

  • Format Type : Compressed image (8bpp or 32bpp)
  • Endian Order : Little Endian
  • Forum Threads : None
  • Date Posted : December 4th 2005 05:22 AM


Format Specifications


// Main header
byte {4}  - Signature "TXB "
uint16    - Width
uint16    - Height
uint32    - Palette Type 1 or 3
byte {20} - null

// Optional palette
if (Palette Type == 1){

// this TXB is a 8bpp image, here is the palette
byte {256}{4}  - Palette data 256 ARGB colors, total of 1024 bytes

}

// Compressed image
byte {X} - Image Data

Notes and Comments

Image Data is a ZLIB compressed buffer (hint : it start with an 'x'). Give it to the uncompress() function of ZLIB and you obtain the uncompressed image. The format of this uncompressed image can be of 2 sort, depending of the Palette Type. Whatever the format, after the pixels it has a footer of 26 bytes. Note that the pixels are from bottom to top, and for each row are left to right. The Alpha Channel is used in certain TXB of the game, it's not here just for padding.

If Palette Type == 1 then the uncompressed image contain palette indexs. Its size is 26 + (Width * Height) bytes.


If Palette Type == 3 then the uncompressed image contain a true color image. Here, the image size is 26 + (4 * Width * height) bytes. Each pixel is in BGRA format.


The footer is 26 bytes, structured like that :

byte {8}  - null
byte {16} - signature "TRUEVISION-XFILE"
byte {1}  - Tag 0x2E
byte {1}  - null


MultiEx BMS Script

Not written yet


Supported by Programs

None


Other Games

None