Thread: Akos...
View Single Post
Old 05-09-2002, 05:44 AM   #13
Serge
SCUMMLord
 
Join Date: Mar 2002
Location: Denmark
Posts: 196
A byte can be big endian/little endian in the way the bits are arranged inside the byte. So, the number 1 - in binary 00000001 - can be stored as:

little endian: 10000000
or:
big endian: 00000001

As for AKOF, AKCI, AKCD etc., the simplest way to decode the cels of the costume, with no regard to the playing order etc. (which is, as far as I recall, stored in AKSQ - don't remember the format, but it consists of frame numbers and various commands (those that begin with the byte C0)) is:

- Find the amount of cells - stored as a LE word at offset 14 in AKHD

- Find the codec (you know where to find that)

- Find the height and width of each cel - that's stored in AKCI, cel by cel, in LE words, width height width height width height etc. The offset where the width/height for one particular cel is stored is found in AKOF, which consists of 6 bytes for each cel - the first 4 (a little endian doubleword) are the offset into AKCD where the image data is found, the last 2 (a little endian word) are the offset into AKCI where you find the width/height. Both those offsets are relative to the start of the block content. I.e., for the width/height offsets, it's relative to offset 8 in the AKCI block, for the image data, it's relative to offset 8 in the AKCD block.

- Then the palette - you know all about that too.

- Finally, start decoding at the offset given in AKOF.

Once again, hope this helped

- Serge
Serge is offline   you may: quote & reply,