_________ __ __ / _____// |_____________ _/ |______ ____ __ __ ______ \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > \/ \/ \//_____/ \/ ______________________ ______________________ T H E W A R B E G I N S Stratagus - A free fantasy real time strategy game engine
#include "stratagus.h"
#include <string>
#include <map>
#include <list>
#include "video.h"
#include "player.h"
#include "intern_video.h"
#include "iocompat.h"
#include "iolib.h"
#include "ui.h"
graphic.cpp - The general graphic functions. | |
static int | HashCount |
static std::map< std::string, CGraphic * > | GraphicHash |
static std::list< CGraphic * > | Graphics |
static void | ApplyGrayScale (SDL_Surface *Surface, int Width, int Height) |
static void | FreeSurface (SDL_Surface **surface) |
void | FreeOpenGLGraphics () |
Free OpenGL graphics. More... | |
void | ReloadGraphics () |
Reload OpenGL graphics. More... | |
static int | PowerOf2 (int x) |
static void | MakeTextures2 (CGraphic *g, GLuint texture, CUnitColors *colors, int ow, int oh) |
static void | MakeTextures (CGraphic *g, int player, CUnitColors *colors) |
void | MakeTexture (CGraphic *g) |
Make an OpenGL texture. More... | |
void | LazilyMakeColorCyclingTextures (CGraphic *g, std::vector< ColorIndexRange > ranges) |
Make OpenGL textures for color cycling. More... | |
void | MakeColorCyclingTextures (CGraphic *g, int count) |
void | MakePlayerColorTexture (CPlayerColorGraphic *g, int player) |
Make an OpenGL texture of the player color pixels only. More... | |
void | FreeGraphics () |
|
static |
void FreeGraphics | ( | ) |
void FreeOpenGLGraphics | ( | ) |
Free OpenGL graphics.
Free OpenGL graphics
|
static |
Free a SDL surface
surface | SDL surface to free |
void LazilyMakeColorCyclingTextures | ( | CGraphic * | g, |
std::vector< ColorIndexRange > | ranges | ||
) |
Make OpenGL textures for color cycling.
void MakeColorCyclingTextures | ( | CGraphic * | g, |
int | count | ||
) |
void MakePlayerColorTexture | ( | CPlayerColorGraphic * | g, |
int | player | ||
) |
Make an OpenGL texture of the player color pixels only.
Make an OpenGL texture with the player colors.
g | The graphic to texture with player colors. |
player | Player number to make textures for. |
void MakeTexture | ( | CGraphic * | g | ) |
Make an OpenGL texture.
Make an OpenGL texture or textures out of a graphic object.
g | The graphic object. |
|
static |
Make an OpenGL texture or textures out of a graphic object.
g | The graphic object. |
player | Player number. |
colors | Unit colors. |
|
static |
Make an OpenGL texture or textures out of a graphic object.
g | The graphic object. |
texture | Texture. |
colors | Unit colors. |
ow | Offset width. |
oh | Offset height. |
|
static |
Find the next power of 2 >= x
void ReloadGraphics | ( | ) |
Reload OpenGL graphics.
Reload OpenGL graphics
|
static |
|
static |
|
static |