SpriteSheet struct
#include <Jazz2/ContentResolver.h>
Sprite sheet of a graphics asset (.aura) as it's stored, see ReadSpriteSheet().
The fields have the meaning of the same fields of GenericGraphicResource, the frames are laid out the same way. The pixels keep the channels of the file - 1 (palette index), 2 (palette index and alpha) or 4 (RGBA).
Public variables
- Vector2i Size
- Size of the sheet in pixels.
-
std::
int32_t ChannelCount - Bytes per pixel of Pixels.
- bool IsIndexed
- Whether the pixels are palette indices rather than colors.
- Vector2i FrameDimensions
- Size of the logical cell of a frame.
- Vector2i FrameConfiguration
- Columns and rows of the regular grid.
-
std::
int32_t FrameCount - Number of frames.
- float AnimDuration
- Animation duration (in normalized frames).
- Vector2i Hotspot
- Hotspot.
- Vector2i Coldspot
- Coldspot, InvalidValue if there's none.
- Vector2i Gunspot
- Gunspot, InvalidValue if there's none.
-
SmallVector<Resources::
FrameRect, 0> FrameRects - Where each frame sits in a tightly packed sheet, empty for a regular grid.
-
std::
unique_ptr<std:: uint8_t[]> Pixels - Pixels, ChannelCount bytes each, rows packed continuously.