V.Flash PTX

From MultimediaWiki
Revision as of 10:04, 17 July 2012 by Pbm (talk | contribs) (fix incorrect information)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This image format is used by The Amazing Spider-Man: Countdown To Doom game for the VTech V.Flash Game Console and possibly other games for the same system.

The files consist of a 44-byte header (fields in little-endian order), followed by the image data.

typedef struct ptx_header_s {
 uint16_t offset;          // offset to where the image data starts, 0x2c (44)
 uint16_t unknown0[2];     // all zero
 uint16_t unknown1;        // 0x01e0 (480)
 uint16_t width;
 uint16_t height;
 uint16_t bits_per_pixel;
 uint16_t unknown2[9]      // all zero
 uint16_t width2;          // duplicate of width (why?)
 uint16_t height2;         // duplicate of height (why?)
 uint16_t unknown3;        // 0x0000 (0)
 uint16_t unknown4;        // 0x0004 (4)
 uint16_t unknown5;        // possibly foreground color? mostly 0x0008
 uint16_t unknown6;        // possibly background color? varies between 0x0686 and 0x0688
} ptx_header_t;

The image data is BGR555 in little-endian order. The most significant bit is used as a 1-bit alpha channel.