Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | Related Pages

GraphicsEngine Class Reference

Graphics engine. More...

#include <gfxeng.h>

List of all members.

Public Member Functions

void update (Uint8)
 Update what should be drawn to the screen.
void draw ()
 Update the screen drawings...
void resize (Uint16 width, Uint16 height)
 Runs SDL_SetVideoMode with the new parameters.
void togglePlayerBar ()
void toggleFPS ()
void toggleFullScreen ()
void setShowDebug ()
void unsetShowDebug ()
void toggleShowDebug ()
void setMenuBG (SDL_Surface *menu_background=NULL)
const SDL_Rect & addShift (Sint16, Sint16)
const SDL_Rect & setShift (Sint16, Sint16)
const SDL_Rect & getShift ()
void resetShift ()
void drawRectangle (SDL_Rect rect, Uint8 border=1, Uint32 color=0)
SDL_Surface * createRGBSurface (Uint16 width, Uint16 height)
SDL_Surface * createRGBASurface (Uint16 width, Uint16 height)
SDL_Surface * createRGBScreenSurface ()
SDL_Surface * createRGBAScreenSurface ()

Protected Member Functions

void drawGameScene ()
void drawEditScene ()
void drawPlayerBar ()
void drawFPS ()
 Draw the frames per second.
void drawMenu ()
 draw the menu
void drawBox ()
void resetMenuBG ()
SDL_Rect clipToBG (SDL_Rect dest) const
SDL_Rect setShift (SDL_Rect center)
 updates backpos and returns the new shift vector (ignore w,h)
SDL_Rect * shiftMapArea (SDL_Rect &area, const SDL_Rect &shift)
 simple vector addition, should be replaced by operator
void setGameMenuBG ()
 sets the menu background while playing a scenario

Protected Attributes

const Uint32 rmask
 masks
const Uint32 gmask
const Uint32 bmask
const Uint32 amask
Uint32 vflags
 Video flags.
SDL_Surface * screen
 main screen
SDL_Rect vis_map
 currently visible part of the map area
SDL_Surface * menubg
 menu background
SDL_Rect bar
 player bar
bool show_bar
bool show_fps
bool show_debug
bool fullscreen
Uint8 updatetype
SDL_Rect shift
EmptyAnimationPtr lifeimage
 symbol for one life of a player


Detailed Description

Graphics engine.

Draws each object in the pool and optionally a player bar and/or frames per seconds. Always run time resizing and fullscreen switching.


Member Function Documentation

void GraphicsEngine::drawGameScene  )  [inline, protected]
 

Draw the background and all objects in the pool. This is a very time consuming function...

void GraphicsEngine::drawPlayerBar  )  [inline, protected]
 

Draw player bar

void GraphicsEngine::drawMenu  )  [inline, protected]
 

draw the menu

If no scenario is running or the scenario was interrupted this will draw the menu.


The documentation for this class was generated from the following file:
Generated on Sun Feb 5 13:02:37 2006 for Lost Penguins by doxygen 1.3.8