Isle
Loading...
Searching...
No Matches
LegoPaletteEntry Class Reference

[AI] Represents a single entry in an 8-bit RGB palette with red, green, and blue components. More...

#include <legoimage.h>

Public Member Functions

 LegoPaletteEntry ()
 [AI] Constructs an empty palette entry with all components initialized to 0. [Existing comment: Default constructor] More...
 
LegoU8 GetRed ()
 [AI] Returns the red color intensity of this palette entry. More...
 
void SetRed (LegoU8 p_red)
 [AI] Sets the red color intensity. More...
 
LegoU8 GetGreen ()
 [AI] Returns the green color intensity of this palette entry. More...
 
void SetGreen (LegoU8 p_green)
 [AI] Sets the green color intensity. More...
 
LegoU8 GetBlue ()
 [AI] Returns the blue color intensity of this palette entry. More...
 
void SetBlue (LegoU8 p_blue)
 [AI] Sets the blue color intensity. More...
 
LegoResult Read (LegoStorage *p_storage)
 [AI] Reads the palette entry data from a storage object. More...
 
LegoResult Write (LegoStorage *p_storage)
 [AI] Writes the palette entry data to a storage object. More...
 

Protected Attributes

LegoU8 m_red
 [AI] Red channel (0-255). Offset 0x00. More...
 
LegoU8 m_green
 [AI] Green channel (0-255). Offset 0x01. More...
 
LegoU8 m_blue
 [AI] Blue channel (0-255). Offset 0x02. More...
 

Detailed Description

[AI] Represents a single entry in an 8-bit RGB palette with red, green, and blue components.

[AI] Used for the palette of indexed images in the LEGO Island engine; each entry stores the intensity for a single color channel. The palette is typically used for mapping image indices to RGB color values.

Definition at line 12 of file legoimage.h.

Constructor & Destructor Documentation

◆ LegoPaletteEntry()

LegoPaletteEntry::LegoPaletteEntry ( )

[AI] Constructs an empty palette entry with all components initialized to 0. [Existing comment: Default constructor]

Definition at line 11 of file legoimage.cpp.

Member Function Documentation

◆ GetBlue()

LegoU8 LegoPaletteEntry::GetBlue ( )
inline

[AI] Returns the blue color intensity of this palette entry.

Definition at line 40 of file legoimage.h.

◆ GetGreen()

LegoU8 LegoPaletteEntry::GetGreen ( )
inline

[AI] Returns the green color intensity of this palette entry.

Definition at line 33 of file legoimage.h.

◆ GetRed()

LegoU8 LegoPaletteEntry::GetRed ( )
inline

[AI] Returns the red color intensity of this palette entry.

Definition at line 26 of file legoimage.h.

◆ Read()

LegoResult LegoPaletteEntry::Read ( LegoStorage p_storage)

[AI] Reads the palette entry data from a storage object.

Order: red, green, blue.

Parameters
p_storage[AI] Storage interface from which the palette entry data is read (usually a file or memory stream).

[AI] Returns a LegoResult code. If a read fails midway, the error code is reported and object may be partially filled.

Definition at line 19 of file legoimage.cpp.

◆ SetBlue()

void LegoPaletteEntry::SetBlue ( LegoU8  p_blue)
inline

[AI] Sets the blue color intensity.

Parameters
p_blue[AI] Value to assign to the blue component.

Definition at line 44 of file legoimage.h.

◆ SetGreen()

void LegoPaletteEntry::SetGreen ( LegoU8  p_green)
inline

[AI] Sets the green color intensity.

Parameters
p_green[AI] Value to assign to the green component.

Definition at line 37 of file legoimage.h.

◆ SetRed()

void LegoPaletteEntry::SetRed ( LegoU8  p_red)
inline

[AI] Sets the red color intensity.

Parameters
p_red[AI] Value to assign to the red component.

Definition at line 30 of file legoimage.h.

◆ Write()

LegoResult LegoPaletteEntry::Write ( LegoStorage p_storage)

[AI] Writes the palette entry data to a storage object.

Order: red, green, blue.

Parameters
p_storage[AI] Storage interface to which the palette entry data is written (usually a file or memory stream).

[AI] Returns a LegoResult code. If a write fails midway, the error code is reported.

Definition at line 35 of file legoimage.cpp.

Member Data Documentation

◆ m_blue

LegoU8 LegoPaletteEntry::m_blue
protected

[AI] Blue channel (0-255). Offset 0x02.

Definition at line 59 of file legoimage.h.

◆ m_green

LegoU8 LegoPaletteEntry::m_green
protected

[AI] Green channel (0-255). Offset 0x01.

Definition at line 58 of file legoimage.h.

◆ m_red

LegoU8 LegoPaletteEntry::m_red
protected

[AI] Red channel (0-255). Offset 0x00.

Definition at line 57 of file legoimage.h.


The documentation for this class was generated from the following files: