Display Class Reference

#include <Display.h>

Inherits Singleton< T >< Display >.

Inheritance diagram for Display:

Inheritance graph
[legend]
List of all members.

Detailed Description

Definition at line 7 of file Display.h.

Public Member Functions

void deinit ()
void draw (int x, int y, SDL_Surface *source)
void draw (int x, int y, string text)
void drawRect (SDL_Rect *rect, SDL_Color *color)
int getScreenHeight () const
int getScreenWidth () const
void init ()
bool loadFont (string fileName)
SDL_Surface * loadImage (string fileName, bool useAlpha=true)
void render ()

Private Member Functions

 Display ()

Private Attributes

TTF_Font * _font
SDL_Surface * _screen
int _screenHeight
int _screenWidth

Friends

class Singleton< Display >


Constructor & Destructor Documentation

Display::Display (  )  [private]

Definition at line 4 of file Display.cpp.


Member Function Documentation

void Display::deinit (  ) 

Definition at line 25 of file Display.cpp.

References _font, and _screen.

void Display::draw ( int  x,
int  y,
SDL_Surface *  source 
)

Definition at line 104 of file Display.cpp.

References _screen.

void Display::draw ( int  x,
int  y,
string  text 
)

Definition at line 89 of file Display.cpp.

References _font.

Referenced by Unit::draw().

Here is the caller graph for this function:

void Display::drawRect ( SDL_Rect *  rect,
SDL_Color *  color 
)

Definition at line 115 of file Display.cpp.

References _screen.

Referenced by Map::drawMinimap().

Here is the caller graph for this function:

int Display::getScreenHeight (  )  const

Definition at line 43 of file Display.cpp.

References _screenHeight.

Referenced by Map::drawMinimap(), and Camera::setBorders().

Here is the caller graph for this function:

int Display::getScreenWidth (  )  const

Definition at line 38 of file Display.cpp.

References _screenWidth.

Referenced by Unit::draw(), and Camera::setBorders().

Here is the caller graph for this function:

void Display::init (  ) 

Definition at line 11 of file Display.cpp.

References _screen, _screenHeight, _screenWidth, COLOR_DEPTH, ConfigOptions::get(), HEIGHT, Singleton< T >::instance(), and WIDTH.

Referenced by XClone::init().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Display::loadFont ( string  fileName  ) 

Definition at line 126 of file Display.cpp.

References _font.

Referenced by XClone::init().

Here is the caller graph for this function:

SDL_Surface * Display::loadImage ( string  fileName,
bool  useAlpha = true 
)

Definition at line 48 of file Display.cpp.

void Display::render (  ) 

Definition at line 120 of file Display.cpp.

References _screen.


Friends And Related Function Documentation

friend class Singleton< Display > [friend]

Definition at line 9 of file Display.h.


Member Data Documentation

TTF_Font* Display::_font [private]

Definition at line 28 of file Display.h.

Referenced by deinit(), draw(), and loadFont().

SDL_Surface* Display::_screen [private]

Definition at line 27 of file Display.h.

Referenced by deinit(), draw(), drawRect(), init(), and render().

int Display::_screenHeight [private]

Definition at line 26 of file Display.h.

Referenced by getScreenHeight(), and init().

int Display::_screenWidth [private]

Definition at line 25 of file Display.h.

Referenced by getScreenWidth(), and init().


The documentation for this class was generated from the following files:
Generated on Fri Sep 22 06:00:26 2006 for X-CLONE by  doxygen 1.4.7