_________ __ __
/ _____// |_____________ _/ |______ ____ __ __ ______
\_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
/ \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \
/_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
\/ \/ \//_____/ \/
______________________ ______________________
T H E W A R B E G I N S
Stratagus - A free fantasy real time strategy game engine
Go to the documentation of this file.
47 CColor(
unsigned char r,
unsigned char g,
unsigned char b,
48 unsigned char a = 0) :
R(r),
G(g),
B(b),
A(a) {}
51 void Parse(lua_State *l,
int index = -1);
54 operator SDL_Color()
const;
76 void Set(std::vector<CColor> &colors);
79 std::vector<CColor> Colors;
96 PaletteSwap(
unsigned int variable,
unsigned char colorStart,
unsigned char colorCount,
unsigned char steps,
unsigned char alternatives, std::vector<CColor> &colors);
106 unsigned int UnitVariableIndex;
107 unsigned char ColorIndexStart;
108 unsigned char ColorCount;
110 unsigned char AlternativesCount;
111 SDL_Color *Colors =
nullptr;
CColor()
Definition: color.h:46
~PaletteSwap()
Definition: color.cpp:94
A class to encode unit-variable dependent palette swaps.
Definition: color.h:93
CColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a=0)
Definition: color.h:47
unsigned int GetColorCount()
Definition: color.h:103
unsigned char G
Red.
Definition: color.h:61
uint32_t IntColor
Definition: color.h:37
unsigned int GetColorIndexStart()
Definition: color.h:102
void Set(std::vector< CColor > &colors)
Definition: color.cpp:75
void Clear()
Definition: color.cpp:70
A platform independent color.
Definition: color.h:43
unsigned char R
Definition: color.h:60
unsigned char A
Blue.
Definition: color.h:63
SDL_Color * GetColorsForPercentAndAlternative(unsigned int value, unsigned int max, unsigned int alt)
Definition: color.cpp:101
void Parse(lua_State *l, int index=-1)
Definition: color.cpp:50
unsigned int GetUnitVariableIndex()
Definition: color.h:101
CColor(const CColor &color)
Definition: color.h:49
IntColor InterpolateColor(IntColor color1, IntColor color2, float fraction)
Definition: color.cpp:112
unsigned char B
Green.
Definition: color.h:62
CUnitColors()
Definition: color.h:72
PaletteSwap(unsigned int variable, unsigned char colorStart, unsigned char colorCount, unsigned char steps, unsigned char alternatives, std::vector< CColor > &colors)
Definition: color.cpp:80
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.