[AI] Class representing an 8-bit palettized image with up to 256 palette entries and indexed pixel da...
LegoPaletteEntry m_palette[256]
[AI] Full palette array (256 possible 8-bit RGB entries).
LegoResult Read(LegoStorage *p_storage, LegoU32 p_square)
[AI] Reads the full image from the storage source, including width, height, count,...
LegoU8 * m_bits
[AI] Pointer to the image bits. Each byte is a palette index; size = width*height.
LegoImage()
[AI] Constructs an empty image object. Palette is not initialized; bits is nullptr.
LegoU32 GetWidth()
[AI] Returns the current image width in pixels.
LegoU32 m_count
[AI] Number of palette entries in use (<= 256).
void SetCount(LegoU32 p_count)
[AI] Sets the palette color count (number of valid entries in m_palette).
LegoPaletteEntry & GetPaletteEntry(LegoU32 p_i)
[AI] Returns a reference to the palette entry at index p_i.
void SetBits(LegoU8 *p_bits)
[AI] Sets the pixel data buffer pointer.
~LegoImage()
[AI] Destructor; releases any allocated pixel buffer memory.
void SetPaletteEntry(LegoU32 p_i, LegoPaletteEntry &p_paletteEntry)
[AI] Sets the palette entry at index p_i to the given value.
LegoU8 * GetBits()
[AI] Returns pointer to the buffer containing indexed pixel data.
LegoU32 m_width
[AI] Image width, in pixels.
LegoResult Write(LegoStorage *p_storage)
[AI] Writes the full image to the given storage: width, height, count, palette, pixel indices.
void SetHeight(LegoU32 p_height)
[AI] Sets the image height in pixels.
LegoU32 m_height
[AI] Image height, in pixels.
void SetWidth(LegoU32 p_width)
[AI] Sets the image width in pixels.
LegoPaletteEntry * GetPalette()
[AI] Returns the pointer to the start of the palette array (256 entries).
LegoU32 GetHeight()
[AI] Returns the current image height in pixels.
LegoU32 GetCount()
[AI] Returns the number of palette entries in use for this image.
[AI] Represents a single entry in an 8-bit RGB palette with red, green, and blue components.
LegoResult Read(LegoStorage *p_storage)
[AI] Reads the palette entry data from a storage object.
void SetBlue(LegoU8 p_blue)
[AI] Sets the blue color intensity.
LegoResult Write(LegoStorage *p_storage)
[AI] Writes the palette entry data to a storage object.
void SetGreen(LegoU8 p_green)
[AI] Sets the green color intensity.
LegoU8 m_blue
[AI] Blue channel (0-255). Offset 0x02.
LegoPaletteEntry()
[AI] Constructs an empty palette entry with all components initialized to 0. [Existing comment: Defau...
LegoU8 GetBlue()
[AI] Returns the blue color intensity of this palette entry.
LegoU8 GetRed()
[AI] Returns the red color intensity of this palette entry.
LegoU8 m_red
[AI] Red channel (0-255). Offset 0x00.
LegoU8 m_green
[AI] Green channel (0-255). Offset 0x01.
LegoU8 GetGreen()
[AI] Returns the green color intensity of this palette entry.
void SetRed(LegoU8 p_red)
[AI] Sets the red color intensity.
Abstract base class providing an interface for file-like storage with binary and text read/write oper...
[AI] Defines basic fixed-width data types and platform-neutral constants for LEGO Island codebase.
unsigned long LegoU32
[AI] Unsigned 32-bit integer type for cross-platform compatibility.
unsigned char LegoU8
[AI] Unsigned 8-bit integer type used throughout LEGO Island.
LegoS32 LegoResult
[AI] Function result type (return code): typically SUCCESS (0) or FAILURE (-1).