GRAF:Aglaia Online: Difference between revisions
imported>WATTO |
imported>WATTO |
||
| Line 10: | Line 10: | ||
<tt><b> | <tt><b> | ||
char {4} - Header <font color="purple">(TXB )</font> <br> | |||
uint16 {2} - Image Width <br> | uint16 {2} - Image Width <br> | ||
uint16 {2} - Image Height <br> | uint16 {2} - Image Height <br> | ||
| Line 24: | Line 24: | ||
: <font color="blue"> ''' } ''' </font> <br> | : <font color="blue"> ''' } ''' </font> <br> | ||
<br> | <br> | ||
byte {X} - Compressed Pixel Data | byte {X} - Compressed Pixel Data (ZLib) <br> | ||
<br> | <br> | ||
<font color="green"> ''' // When the compressed pixel data is decompressed...{ ''' </font> <br> | <font color="green"> ''' // When the compressed pixel data is decompressed...{ ''' </font> <br> | ||
Revision as of 07:58, 20 December 2005
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
char {4} - Header (TXB )
uint16 {2} - Image Width
uint16 {2} - Image Height
uint32 {4} - Palette Type (1/3)
byte {20} - null
if (paletteType == 1){
- // for each color (256)
- byte {1} - Alpha
- byte {1} - Red
- byte {1} - Green
- byte {1} - Blue
- byte {1} - Alpha
- }
byte {X} - Compressed Pixel Data (ZLib)
// When the compressed pixel data is decompressed...{
- if (paletteType == 1){
- for (width*height){
- byte {1} - Palette Index
- }
- byte {1} - Palette Index
- }
- for (width*height){
- else if (paletteType == 3){
- for (width*height){
- byte {1} - Blue
- byte {1} - Green
- byte {1} - Red
- byte {1} - Alpha
- }
- byte {1} - Blue
- }
- for (width*height){
- uint64 {8} - null
- byte {16} - Signature (TRUEVISION-XFILE)
- byte {1} - Tag (0x2E)
- byte {1} - null
- }
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