Isle
Loading...
Searching...
No Matches
legocolor.h
Go to the documentation of this file.
1#ifndef __LEGOCOLOR_H
2#define __LEGOCOLOR_H
3
4#include "misc/legotypes.h"
5
6class LegoStorage;
7
10class LegoColor {
11public:
15
18 LegoU8 GetRed() { return m_red; }
19
22 void SetRed(LegoU8 p_red) { m_red = p_red; }
23
26 LegoU8 GetGreen() { return m_green; }
27
30 void SetGreen(LegoU8 p_green) { m_green = p_green; }
31
34 LegoU8 GetBlue() { return m_blue; }
35
38 void SetBlue(LegoU8 p_blue) { m_blue = p_blue; }
39
44 LegoResult Read(LegoStorage* p_storage);
45
46protected:
50};
51
52#endif // __LEGOCOLOR_H
LEGO color representation with 8-bit RGB channels.
Definition: legocolor.h:10
void SetGreen(LegoU8 p_green)
Set the green channel value.
Definition: legocolor.h:30
LegoColor()
Default constructor.
Definition: legocolor.h:14
LegoU8 GetRed()
Get the red channel value.
Definition: legocolor.h:18
LegoU8 m_green
Green color component (0x01 offset). [AI].
Definition: legocolor.h:48
void SetBlue(LegoU8 p_blue)
Set the blue channel value.
Definition: legocolor.h:38
void SetRed(LegoU8 p_red)
Set the red channel value.
Definition: legocolor.h:22
LegoResult Read(LegoStorage *p_storage)
Read the color from a storage object in the order red, green, blue (each as a byte).
Definition: legocolor.cpp:9
LegoU8 m_red
Red color component (0x00 offset). [AI].
Definition: legocolor.h:47
LegoU8 m_blue
Blue color component (0x02 offset). [AI].
Definition: legocolor.h:49
LegoU8 GetGreen()
Get the green channel value.
Definition: legocolor.h:26
LegoU8 GetBlue()
Get the blue channel value.
Definition: legocolor.h:34
Abstract base class providing an interface for file-like storage with binary and text read/write oper...
Definition: legostorage.h:16
[AI] Defines basic fixed-width data types and platform-neutral constants for LEGO Island codebase.
unsigned char LegoU8
[AI] Unsigned 8-bit integer type used throughout LEGO Island.
Definition: legotypes.h:47
LegoS32 LegoResult
[AI] Function result type (return code): typically SUCCESS (0) or FAILURE (-1).
Definition: legotypes.h:101