Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

Graphics Class Reference

#include <CGraphics.h>

List of all members.

Public Member Functions

 Graphics ()
void free ()
void destroy ()
void registerEngine (Engine *engine)
void mapColors ()
SpritegetSpriteHead ()
void setTransparent (SDL_Surface *sprite)
void updateScreen ()
void delay (int time)
void RGBtoHSV (float r, float g, float b, float *h, float *s, float *v)
void HSVtoRGB (float *r, float *g, float *b, float h, float s, float v)
SDL_Surface * loadImage (char *filename)
SDL_Surface * loadImage (char *filename, int hue, int sat, int value)
SDL_Surface * quickSprite (char *name, SDL_Surface *image)
void fade (int amount)
void fadeToBlack ()
void loadMapTiles (char *baseDir)
void loadFont (int i, char *filename, int pixelSize)
SpriteaddSprite (char *name)
SpritegetSprite (char *name, bool required)
void animateSprites ()
int getWaterAnim ()
int getSlimeAnim ()
int getLavaAnim ()
int getLavaAnim (int current)
void loadBackground (char *filename)
void putPixel (int x, int y, Uint32 pixel, SDL_Surface *dest)
Uint32 getPixel (SDL_Surface *surface, int x, int y)
void drawLine (float startX, float startY, float endX, float endY, int color, SDL_Surface *dest)
void blit (SDL_Surface *image, int x, int y, SDL_Surface *dest, bool centered)
void drawBackground ()
void drawBackground (SDL_Rect *r)
void drawRect (int x, int y, int w, int h, int color, SDL_Surface *dest)
void drawRect (int x, int y, int w, int h, int color, int borderColor, SDL_Surface *dest)
void setFontColor (int red, int green, int blue, int red2, int green2, int blue2)
void setFontSize (int size)
SDL_Surface * getString (char *in, bool transparent)
void drawString (char *in, int x, int y, int alignment, SDL_Surface *dest)
void clearChatString ()
void createChatString (char *in)
void drawChatString (SDL_Surface *surface, int y)
void drawWidgetRect (int x, int y, int w, int h)
SDL_Surface * createSurface (int width, int height)
SDL_Surface * alphaRect (int width, int height, Uint8 red, Uint8 green, Uint8 blue)
void colorize (SDL_Surface *image, int red, int green, int blue)
void lock (SDL_Surface *surface)
void unlock (SDL_Surface *surface)
void resetLoading ()
void showLoading (int amount, int max)
void showErrorAndExit (char *error, char *param)
void showLicenseErrorAndExit ()
void showRootWarning ()

Public Attributes

bool takeRandomScreenShots
SDL_Surface * screen
SDL_Surface * background
SDL_Surface * tile [MAX_TILES]
SDL_Surface * infoBar
int red
int yellow
int green
int darkGreen
int skyBlue
int blue
int cyan
int white
int lightGrey
int grey
int darkGrey
int black

Private Attributes

Engineengine
SDL_Rect gRect
TTF_Font * font [5]
SDL_Color fontForeground
SDL_Color fontBackground
List spriteList
int fontSize
int waterAnim
int slimeAnim
int lavaAnim
int currentLoading
int screenShotNumber
char screenshot [100]
char chatString [1024]
SDL_Surface * fadeBlack
SDL_Surface * infoMessage


Constructor & Destructor Documentation

Graphics::Graphics  ) 
 


Member Function Documentation

Sprite * Graphics::addSprite char *  name  ) 
 

SDL_Surface * Graphics::alphaRect int  width,
int  height,
Uint8  red,
Uint8  green,
Uint8  blue
 

void Graphics::animateSprites  ) 
 

void Graphics::blit SDL_Surface *  image,
int  x,
int  y,
SDL_Surface *  dest,
bool  centered
 

void Graphics::clearChatString  ) 
 

void Graphics::colorize SDL_Surface *  image,
int  red,
int  green,
int  blue
 

void Graphics::createChatString char *  in  ) 
 

SDL_Surface * Graphics::createSurface int  width,
int  height
 

void Graphics::delay int  time  ) 
 

void Graphics::destroy  ) 
 

void Graphics::drawBackground SDL_Rect *  r  ) 
 

void Graphics::drawBackground  ) 
 

void Graphics::drawChatString SDL_Surface *  surface,
int  y
 

void Graphics::drawLine float  startX,
float  startY,
float  endX,
float  endY,
int  color,
SDL_Surface *  dest
 

void Graphics::drawRect int  x,
int  y,
int  w,
int  h,
int  color,
int  borderColor,
SDL_Surface *  dest
 

void Graphics::drawRect int  x,
int  y,
int  w,
int  h,
int  color,
SDL_Surface *  dest
 

void Graphics::drawString char *  in,
int  x,
int  y,
int  alignment,
SDL_Surface *  dest
 

void Graphics::drawWidgetRect int  x,
int  y,
int  w,
int  h
 

void Graphics::fade int  amount  ) 
 

void Graphics::fadeToBlack  ) 
 

void Graphics::free  ) 
 

int Graphics::getLavaAnim int  current  ) 
 

int Graphics::getLavaAnim  ) 
 

Uint32 Graphics::getPixel SDL_Surface *  surface,
int  x,
int  y
 

int Graphics::getSlimeAnim  ) 
 

Sprite * Graphics::getSprite char *  name,
bool  required
 

Sprite * Graphics::getSpriteHead  ) 
 

SDL_Surface * Graphics::getString char *  in,
bool  transparent
 

int Graphics::getWaterAnim  ) 
 

void Graphics::HSVtoRGB float *  r,
float *  g,
float *  b,
float  h,
float  s,
float  v
 

void Graphics::loadBackground char *  filename  ) 
 

void Graphics::loadFont int  i,
char *  filename,
int  pixelSize
 

SDL_Surface * Graphics::loadImage char *  filename,
int  hue,
int  sat,
int  value
 

SDL_Surface * Graphics::loadImage char *  filename  ) 
 

void Graphics::loadMapTiles char *  baseDir  ) 
 

void Graphics::lock SDL_Surface *  surface  ) 
 

void Graphics::mapColors  ) 
 

void Graphics::putPixel int  x,
int  y,
Uint32  pixel,
SDL_Surface *  dest
 

SDL_Surface * Graphics::quickSprite char *  name,
SDL_Surface *  image
 

void Graphics::registerEngine Engine engine  ) 
 

void Graphics::resetLoading  ) 
 

void Graphics::RGBtoHSV float  r,
float  g,
float  b,
float *  h,
float *  s,
float *  v
 

void Graphics::setFontColor int  red,
int  green,
int  blue,
int  red2,
int  green2,
int  blue2
 

void Graphics::setFontSize int  size  ) 
 

void Graphics::setTransparent SDL_Surface *  sprite  ) 
 

void Graphics::showErrorAndExit char *  error,
char *  param
 

void Graphics::showLicenseErrorAndExit  ) 
 

void Graphics::showLoading int  amount,
int  max
 

void Graphics::showRootWarning  ) 
 

void Graphics::unlock SDL_Surface *  surface  ) 
 

void Graphics::updateScreen  ) 
 


Member Data Documentation

SDL_Surface * Graphics::background
 

int Graphics::black
 

int Graphics::blue
 

char Graphics::chatString[1024] [private]
 

int Graphics::currentLoading [private]
 

int Graphics::cyan
 

int Graphics::darkGreen
 

int Graphics::darkGrey
 

Engine* Graphics::engine [private]
 

SDL_Surface* Graphics::fadeBlack [private]
 

TTF_Font* Graphics::font[5] [private]
 

SDL_Color Graphics::fontBackground [private]
 

SDL_Color Graphics::fontForeground [private]
 

int Graphics::fontSize [private]
 

SDL_Rect Graphics::gRect [private]
 

int Graphics::green
 

int Graphics::grey
 

SDL_Surface* Graphics::infoBar
 

SDL_Surface* Graphics::infoMessage [private]
 

int Graphics::lavaAnim [private]
 

int Graphics::lightGrey
 

int Graphics::red
 

SDL_Surface* Graphics::screen
 

char Graphics::screenshot[100] [private]
 

int Graphics::screenShotNumber [private]
 

int Graphics::skyBlue
 

int Graphics::slimeAnim [private]
 

List Graphics::spriteList [private]
 

bool Graphics::takeRandomScreenShots
 

SDL_Surface* Graphics::tile[MAX_TILES]
 

int Graphics::waterAnim [private]
 

int Graphics::white
 

int Graphics::yellow
 


The documentation for this class was generated from the following files:
Generated on Thu Dec 2 20:26:04 2004 for Blob Wars : Metal Blob Solid by doxygen 1.3.7