User Tools

Site Tools


falcon4:file_formats:apl_fileformat

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
falcon4:file_formats:apl_fileformat [2009-02-06 22:50]
lightning
falcon4:file_formats:apl_fileformat [2009-02-06 22:50] (current)
Line 13: Line 13:
  
 ===== Reading an .APL file ===== ===== Reading an .APL file =====
-* check the first DWORD (4 bytes) to see that it equals 0x030870; if so, this is an APL file\\ ​+* check the first DWORD (4 bytes) to see that it equals ​''​%%0x030870%%''​; if so, this is an APL file\\ ​
 * then check the next WORD (2 bytes), this is the width, in pixels, of the image\\ ​ * then check the next WORD (2 bytes), this is the width, in pixels, of the image\\ ​
 * then check the next WORD (2 bytes), this is the height, in pixels, of the image\\ ​ * then check the next WORD (2 bytes), this is the height, in pixels, of the image\\ ​
Line 19: Line 19:
 * the next (width * height) bytes represent the image data itself, one byte per pixel, with one row's worth of pixel data coming first, then the next row's worth of pixel data, etc.   The first byte represents the upper-left pixel in the image/​texture;​ the last byte represents the lower-left pixel in the image/​texture. * the next (width * height) bytes represent the image data itself, one byte per pixel, with one row's worth of pixel data coming first, then the next row's worth of pixel data, etc.   The first byte represents the upper-left pixel in the image/​texture;​ the last byte represents the lower-left pixel in the image/​texture.
  
-The byte value associated with each pixel, provides an index into the palette array, telling you which palette entry to use for determining the color to use for rendering that pixel. Just look up the corresponding palette entry to get the color data for that pixel, as well as the alpha channel value. If the alpha component is set to 0x80, then this magic value means do not use ALPHA.+The byte value associated with each pixel, provides an index into the palette array, telling you which palette entry to use for determining the color to use for rendering that pixel. Just look up the corresponding palette entry to get the color data for that pixel, as well as the alpha channel value. If the alpha component is set to ''​%%0x80%%''​, then this magic value means do not use ALPHA.
  
falcon4/file_formats/apl_fileformat.1233960608.txt.gz ยท Last modified: 2009-02-06 22:50 by lightning