Advertisement
Kaphotics

bclim notes

Jun 11th, 2014
673
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. // BCLIM Format - Banner Ctr Layered(?) IMage
  2. // Specs: Data & Footer
  3. // Footer pointer is at the end of the file, which doubles as a pixel data length.
  4. // Pixel data is at the start of the file.
  5.  
  6. // Footer Format:
  7. //
  8. // CLIM
  9. UInt32 Magic (CLIM)
  10. UInt16 BOM (Byte Order Marking: FF FE)
  11. UInt32 climLength (14)
  12. Byte TileWidth (?)(1 << ~2) 8
  13. Byte TileHeight (?)(1 << ~2) 8
  14. UInt32 FileSize
  15. UInt32 Layers (?) (Haven't seen anything but 1)
  16. //
  17. // imag
  18. UInt32 Magic (imag)
  19. UInt32 imagLength (10)
  20. UInt16 Width
  21. UInt16 Height
  22. UInt32 ImageFormat
  23. //
  24. // Image Data
  25. UInt32 Size
  26.  
  27. /* Notes
  28. * Dimensions are expanded so that they are divisible by 8, then trimmed, as the images use 8x8 tiles.
  29. * Pixels are arranged into 8x8 tiles using a Z-Order curve (morton code)
  30. * Tiles are then placed into position left to right, top to bottom.
  31. * Some Image formats build from a square base, others do not.
  32. * Some Image formats use different amounts of bytes per pixel.
  33. * Every other format (unless compressed) is either 4/8/16/32bpp, straight data.
  34. * Format 7 uses an internal pixelformat and palette, followed by color choices.
  35. * Can be 8bpColorChoice or 4bpcc, depending on amount of colors.
  36. * Some formats have their first color used instead as transparent.
  37. * Most formats assume a specific pixel format, which is not specified in the file (besides the format value).
  38. * Possible formats: http://3dbrew.org/wiki/Extended_Banner
  39. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement