_________ __ __
/ _____// |_____________ _/ |______ ____ __ __ ______
\_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
/ \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \
/_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
\/ \/ \//_____/ \/
______________________ ______________________
T H E W A R B E G I N S
Stratagus - A free fantasy real time strategy game engine
A class to encode unit-variable dependent palette swaps. More...
#include <color.h>
Public Member Functions | |
| unsigned int | GetUnitVariableIndex () |
| unsigned int | GetColorIndexStart () |
| unsigned int | GetColorCount () |
color.h - The A platform independent color. | |
| PaletteSwap (unsigned int variable, unsigned char colorStart, unsigned char colorCount, unsigned char steps, unsigned char alternatives, std::vector< CColor > &colors) | |
| ~PaletteSwap () | |
| SDL_Color * | GetColorsForPercentAndAlternative (unsigned int value, unsigned int max, unsigned int alt) |
A class to encode unit-variable dependent palette swaps.
This class encodes a range of colors that should be swapped based on the current percentage of a unit variable, with a resolution of a number of steps and a number of alternative colorings per step.
The colors most be laid out first by step, then alternative, then color.
| PaletteSwap::PaletteSwap | ( | unsigned int | variable, |
| unsigned char | colorStart, | ||
| unsigned char | colorCount, | ||
| unsigned char | steps, | ||
| unsigned char | alternatives, | ||
| std::vector< CColor > & | colors | ||
| ) |
| PaletteSwap::~PaletteSwap | ( | ) |
|
inline |
|
inline |
| SDL_Color * PaletteSwap::GetColorsForPercentAndAlternative | ( | unsigned int | value, |
| unsigned int | max, | ||
| unsigned int | alt | ||
| ) |
|
inline |
1.8.17
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.