OpenMortal Apocalypse mirror
Sourceforge mirror
SourceForge.net Logo
      News | Info | Characters | Arenas | Screenshots | Forums | Download  
Developer: Making of | Character-HOWTO | AI Design | Submit a Character
Documentation: Main Page | Modules | Class Hierarchy | Class List | File List

gfx.cpp File Reference

#include <string.h>
#include "SDL.h"
#include "SDL_video.h"
#include "SDL_image.h"
#include "sge_tt_text.h"
#include "sge_surface.h"
#include "common.h"
#include "gfx.h"
#include "State.h"
#include "Event.h"

Functions

Uint16 * UTF8_to_UNICODE (Uint16 *unicode, const char *utf8, int len)
void sge_TTF_SizeText (_sge_TTFont *font, const char *text, int *x, int *y)
int DrawTextMSZ (const char *string, _sge_TTFont *font, int x, int y, int flags, int fg, SDL_Surface *target, bool a_bTranslate)
void DrawGradientText (const char *text, _sge_TTFont *font, int y, SDL_Surface *target, bool a_bTranslate)
SDL_Color MakeColor (Uint8 r, Uint8 g, Uint8 b)
SDLKey GetKey (bool a_bTranslate)
 Waits for a key event and returns it.
SDL_Surface * LoadBackground (const char *a_pcFilename, int a_iNumColors, int a_iPaletteOffset, bool a_bTransparent)
bool SetVideoMode (bool a_bLarge, bool a_bFullScreen, int a_iAdditionalFlags)

Function Documentation

void DrawGradientText const char *  text,
_sge_TTFont *  font,
int  y,
SDL_Surface *  target,
bool  a_bTranslate
 

int DrawTextMSZ const char *  string,
_sge_TTFont *  font,
int  x,
int  y,
int  flags,
int  fg,
SDL_Surface *  target,
bool  a_bTranslate
 

SDLKey GetKey bool  a_bTranslate  ) 
 

Waits for a key event and returns it.

Parameters:
a_bTranslate If this is true, then keypad events will also be read and processed info keys (cursor, return and escape).

SDL_Surface* LoadBackground const char *  a_pcFilename,
int  a_iNumColors,
int  a_iPaletteOffset,
bool  a_bTransparent
 

SDL_Color MakeColor Uint8  r,
Uint8  g,
Uint8  b
 

bool SetVideoMode bool  a_bLarge,
bool  a_bFullScreen,
int  a_iAdditionalFlags
 

void sge_TTF_SizeText _sge_TTFont *  font,
const char *  text,
int *  x,
int *  y
 

Uint16* UTF8_to_UNICODE Uint16 *  unicode,
const char *  utf8,
int  len