Savage Warriors ANM
Jump to navigation
Jump to search
- Extension: anm
- Samples: http://samples.mplayerhq.hu/game-formats/anm-savagewarriors/
- Game: Savage Warriors
This is a format that employs LZ77 compression from Diet (Japanese executable compressor). Additionally there are two flavours of the format, the version used in demo version of the game and lacks "CHCK" header, and the one used in the full version (with the header and 32-bit checksum inserted after every 4kB of the file data).
Beside the 4-byte header the rest are video frame chunks:
1 byte - mode (0 - Diet packed image data, 1 - RLE, 0xFF - end of file) 1 byte - palette present 2 bytes - unknown 2 bytes - width 2 bytes - height 2 bytes - X offset 2 bytes - Y offset 4 bytes - frame size (if palette is present) 768 bytes - palette N bytes - frame size
RLE compression codes segments in form of (skip, opcode, data)
where skip
is the number of pixels to skip, opcode
tells what operations to perform (skip=opcode=0 means image end, 1-127 means copying 1-127 pixels from the stream, 128-255 means run of 128-1 pixels).