Difference between revisions of "SPR Spritesheet"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m (→‎Palette Data: updated order or channels)
m (→‎Palette Data: removed duplicate word)
Line 3: Line 3:
  
 
== Palette Data ==
 
== Palette Data ==
The file starts with the palette data and contains 256 colors (512 bytes), 16 palettes of 16 colors each. Palette's use 2 bytes per color, 1 bit for alpha, followed by 5 bits per channel (B,G,R) and 1 bit for alpha. The first 8 palettes are for the unit, the second 8 palettes are for the portrait.
+
The file starts with the palette data and contains 256 colors (512 bytes), 16 palettes of 16 colors each. Palette's use 2 bytes per color, 1 bit for alpha, followed by 5 bits per channel (B,G,R). The first 8 palettes are for the unit, the second 8 palettes are for the portrait.
  
 
== Data ==
 
== Data ==
 
Each byte is the index of the color of the pixel from palette. The spritesheet is 256 pixels wide.
 
Each byte is the index of the color of the pixel from palette. The spritesheet is 256 pixels wide.
 
The lower half of unit spritesheets (the part with the parts for attacks) has compressed regions representing "there are this many 0s here"
 
The lower half of unit spritesheets (the part with the parts for attacks) has compressed regions representing "there are this many 0s here"

Revision as of 01:02, 17 January 2025

SPR (Unit Sprite) files contain the bitmap data for a sprite. Sp2 are similar format used for extra images used by MON shp types. Note:

Palette Data

The file starts with the palette data and contains 256 colors (512 bytes), 16 palettes of 16 colors each. Palette's use 2 bytes per color, 1 bit for alpha, followed by 5 bits per channel (B,G,R). The first 8 palettes are for the unit, the second 8 palettes are for the portrait.

Data

Each byte is the index of the color of the pixel from palette. The spritesheet is 256 pixels wide. The lower half of unit spritesheets (the part with the parts for attacks) has compressed regions representing "there are this many 0s here"