- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

# Screen Class Reference

`#include <colorScreen.h>`

List of all members.

## Public Member Functions
void | drawLevel (int texture, GLfloat texCoords[4], SDL_Rect quad)
void | drawScreen (int texture, GLfloat texCoords[4], SDL_Rect quad)
void | drawCutScene (std::string cutSceneText)
void | drawText (std::string text, int x, int y)
void | move (int x, int y)
void | update ()
void | registerFollowObj (Object *o)
Object * | getFollowObj ()
SDL_Rect | getScreenRect ()
void | drawLevel (int texture, GLfloat texCoords[4], SDL_Rect quad)
void | drawScreen (int texture, GLfloat texCoords[4], SDL_Rect quad)
void | drawText (std::string text, int x, int y)
void | drawCutScene (std::string cutSceneText)
void | move (int x, int y)
void | update ()
void | registerFollowObj (Object *o)
Object * | getFollowObj ()
SDL_Rect | getScreenRect ()
void | recenter ()
## Static Public Member Functions
static Screen * | instance ()
static int | height ()
static int | width ()
static Screen * | instance ()
static void | drawScramble ()
static void | drawPause ()
static void | drawLoading ()
static int | height ()
static int | width ()
## Static Public Attributes
static const int | FRAMERATE = 60
## Private Member Functions
| Screen ()
| Screen ()
## Private Attributes
SDL_Rect | _screen
SDL_Rect | _center
Object * | _followMe
int | _scram
GLfloat | _scramCoords [4]
int | _pause
GLfloat | _pauseCoords [4]
int | _loading
GLfloat | _loadingCoords [4]
Object * | _followMe
## Static Private Attributes
static Screen * | _instance = NULL
static const int | CSFRAC = 5
static const int | HEIGHT = 800
static const int | WIDTH = 300
static Screen * | _instance
static int | HEIGHT
static int | WIDTH

## Detailed Description

Definition at line 11 of file colorScreen.h.

## Constructor & Destructor Documentation

Screen::Screen | ( |  | ) | `[private]`

| Definition at line 14 of file colorScreen.cpp. References _center, _screen, HEIGHT, glfuncs::instance(), and WIDTH. Referenced by instance().

Screen::Screen | ( |  | ) | `[private]`

## Member Function Documentation

void Screen::drawCutScene | ( | std::string | cutSceneText | ) |

void Screen::drawCutScene | ( | std::string | cutSceneText | ) |

| Definition at line 136 of file colorScreen.cpp. References _screen, CSFRAC, glfuncs::glPrint(), and glfuncs::instance().

void Screen::drawLevel | ( | int | texture,
|  | GLfloat | texCoords[4],
|  | SDL_Rect | quad
| ) |

void Screen::drawLevel | ( | int | texture,
|  | GLfloat | texCoords[4],
|  | SDL_Rect | quad
| ) |

| Definition at line 102 of file colorScreen.cpp. References _screen, glfuncs::instance(), and glfuncs::intersect(). Referenced by Sprite::draw().

void Screen::drawLoading | ( |  | ) | `[static]`

| Definition at line 181 of file Screen.cpp. References _instance, _loading, _loadingCoords, drawScramble(), drawScreen(), HEIGHT, glfuncs::instance(), and WIDTH.

void Screen::drawPause | ( |  | ) | `[static]`

| Definition at line 170 of file Screen.cpp. References _instance, _pause, _pauseCoords, drawScreen(), HEIGHT, and WIDTH.

void Screen::drawScramble | ( |  | ) | `[static]`

| Definition at line 159 of file Screen.cpp. References _instance, _scram, _scramCoords, drawScreen(), and getScreenRect(). Referenced by TitleScreenMenu::draw(), drawLoading(), and Game::mainLoop().

void Screen::drawScreen | ( | int | texture,
|  | GLfloat | texCoords[4],
|  | SDL_Rect | quad
| ) |

void Screen::drawScreen | ( | int | texture,
|  | GLfloat | texCoords[4],
|  | SDL_Rect | quad
| ) |

| Definition at line 120 of file colorScreen.cpp. References glfuncs::instance(). Referenced by Sprite::draw(), drawLoading(), drawPause(), drawScramble(), and main().

void Screen::drawText | ( | std::string | text,
|  | int | x,
|  | int | y
| ) |

void Screen::drawText | ( | std::string | text,
|  | int | x,
|  | int | y
| ) |

| Definition at line 165 of file colorScreen.cpp. References glfuncs::glPrint(), and glfuncs::instance(). Referenced by showAll(), showColl(), and showObject().

Object* Screen::getFollowObj | ( |  | ) | `[inline]`

| Definition at line 31 of file Screen.h. References _followMe.

Object* Screen::getFollowObj | ( |  | ) | `[inline]`

| Definition at line 29 of file colorScreen.h. References _followMe.

SDL_Rect Screen::getScreenRect | ( |  | ) | `[inline]`

| Definition at line 33 of file Screen.h. References _screen.

SDL_Rect Screen::getScreenRect | ( |  | ) | `[inline]`

| Definition at line 31 of file colorScreen.h. References _screen. Referenced by Background::draw(), drawScramble(), main(), and Bullet::update().

static int Screen::height | ( |  | ) | `[inline, static]`

| Definition at line 37 of file Screen.h. References HEIGHT.

static int Screen::height | ( |  | ) | `[inline, static]`

| Definition at line 25 of file colorScreen.h. References HEIGHT. Referenced by glfuncs::glPrint().

static Screen* Screen::instance | ( |  | ) | `[static]`

Screen * Screen::instance | ( |  | ) | `[static]`

| Definition at line 95 of file colorScreen.cpp. References _instance, and Screen(). Referenced by Camera::control(), Sprite::draw(), Background::draw(), SetCameraCommand::execute(), Level::levelLoad(), main(), Menu::mainLoop(), Game::mainLoop(), showAll(), showColl(), showObject(), and Bullet::update().

void Screen::move | ( | int | x,
|  | int | y
| ) |

void Screen::move | ( | int | x,
|  | int | y
| ) |

| Definition at line 185 of file colorScreen.cpp. References _center, and _screen. Referenced by Camera::control(), recenter(), and update().

void Screen::recenter | ( |  | ) |

| Definition at line 251 of file Screen.cpp. References _followMe, _screen, Object::getBox(), HEIGHT, move(), and WIDTH. Referenced by SetCameraCommand::execute().

void Screen::registerFollowObj | ( | Object * | o | ) |

void Screen::registerFollowObj | ( | Object * | o | ) |

| Definition at line 180 of file colorScreen.cpp. References _followMe. Referenced by SetCameraCommand::execute(), and Level::levelLoad().

void Screen::update | ( |  | ) |

void Screen::update | ( |  | ) |

| Definition at line 194 of file colorScreen.cpp. References _center, _followMe, Object::getBox(), glfuncs::intersectX(), glfuncs::intersectY(), and move().

static int Screen::width | ( |  | ) | `[inline, static]`

| Definition at line 38 of file Screen.h. References WIDTH.

static int Screen::width | ( |  | ) | `[inline, static]`

| Definition at line 26 of file colorScreen.h. References WIDTH. Referenced by glfuncs::glPrint().

## Member Data Documentation

SDL_Rect Screen::_center`[private]`

| Definition at line 38 of file colorScreen.h. Referenced by move(), Screen(), and update().

Object* Screen::_followMe`[private]`

| Definition at line 57 of file Screen.h.

Object* Screen::_followMe`[private]`

| Definition at line 41 of file colorScreen.h. Referenced by getFollowObj(), recenter(), registerFollowObj(), and update().

Screen* Screen::_instance`[static, private]`

| Definition at line 43 of file Screen.h.

Screen * Screen::_instance = NULL`[static, private]`

| Definition at line 36 of file colorScreen.h. Referenced by drawLoading(), drawPause(), drawScramble(), and instance().

int Screen::_loading`[private]`

| Definition at line 54 of file Screen.h. Referenced by drawLoading().

GLfloat Screen::_loadingCoords[4]`[private]`

| Definition at line 55 of file Screen.h. Referenced by drawLoading().

int Screen::_pause`[private]`

| Definition at line 51 of file Screen.h. Referenced by drawPause().

GLfloat Screen::_pauseCoords[4]`[private]`

| Definition at line 52 of file Screen.h. Referenced by drawPause().

int Screen::_scram`[private]`

| Definition at line 48 of file Screen.h. Referenced by drawScramble().

GLfloat Screen::_scramCoords[4]`[private]`

| Definition at line 49 of file Screen.h. Referenced by drawScramble().

SDL_Rect Screen::_screen`[private]`

| Definition at line 37 of file colorScreen.h. Referenced by drawCutScene(), drawLevel(), getScreenRect(), move(), recenter(), and Screen().

static const int Screen::CSFRAC = 5`[static, private]`

| Definition at line 44 of file colorScreen.h. Referenced by drawCutScene().

static const int Screen::FRAMERATE = 60`[static]`

| Definition at line 33 of file colorScreen.h. Referenced by main(), Menu::mainLoop(), Game::mainLoop(), Person::update(), and Bullet::update().

int Screen::HEIGHT`[static, private]`

| Definition at line 62 of file Screen.h.

int Screen::HEIGHT = 800`[static, private]`

| Definition at line 46 of file colorScreen.h. Referenced by drawLoading(), drawPause(), height(), recenter(), and Screen().

int Screen::WIDTH`[static, private]`

| Definition at line 63 of file Screen.h.

int Screen::WIDTH = 300`[static, private]`

| Definition at line 47 of file colorScreen.h. Referenced by drawLoading(), drawPause(), recenter(), Screen(), and width().

The documentation for this class was generated from the following files:

- C:/Documents and Settings/jegan/Desktop/projectX/colorScreen.h
- C:/Documents and Settings/jegan/Desktop/projectX/Screen.h
- C:/Documents and Settings/jegan/Desktop/projectX/colorScreen.cpp
- C:/Documents and Settings/jegan/Desktop/projectX/Screen.cpp