Skip to main content

Module paa

Module paa 

Source
Expand description

PAA texture conversion. Functions for working with PAA files.

Format (as used by DayZ / Arma 3, verified against engine-loaded files):

u16  magic (compression: 0xff01 DXT1, 0xff02 DXT2, 0xff03 DXT3,
            0xff04 DXT4, 0xff05 DXT5, 0x8888 RGBA, 0x4444 ARGB4444,
            0x1555 ARGB1555, 0x8080 AI88)
taggs: 8-byte signature (e.g. "GGATSFFO") + u32 data size + data,
       repeated until a zero byte (which is the low byte of the
       palette length following them)
u16  palette size in bytes (+ palette data if non-zero)
mipmaps: u16 width (bit 0x8000 = LZO compressed) + u16 height +
         3-byte (little endian) data size + data, repeated until a
         zero width
u16 x3 zero terminator

The mipmaps of the 16-bit formats (0x4444, 0x1555, 0x8080) are an LZSS stream of width * height * 2 bytes followed by a 4-byte checksum, the signed sum of the output bytes.

Structs§

Paa
A PAA texture.

Enums§

PaaFormat
A format a PAA can be created in.