Back to index

extremetuxracer  0.5beta
Public Member Functions | Static Public Attributes | Protected Member Functions
GameMode Class Reference

#include <loop.h>

Inheritance diagram for GameMode:
Inheritance graph
[legend]
Collaboration diagram for GameMode:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 GameMode ()
virtual ~GameMode ()
virtual void loop (float timeStep)=0
virtual bool keyboardEvent (SDLKey key, bool release)
virtual bool keyPressEvent (SDLKey key)
virtual bool keyReleaseEvent (SDLKey key)
virtual bool mouseButtonEvent (int button, int x, int y, bool pressed)
virtual bool mouseButtonPressEvent (int button, int x, int y)
virtual bool mouseButtonReleaseEvent (int button, int x, int y)

Static Public Attributes

static GameModecurrentMode = NULL
static game_mode_t mode
static game_mode_t prevmode

Protected Member Functions

void drawSnow (float timeStep, bool windy=false)
 custom function for drawing snow in the ui

Detailed Description

Definition at line 77 of file loop.h.


Constructor & Destructor Documentation

Definition at line 197 of file loop.cpp.

{
}
virtual GameMode::~GameMode ( ) [inline, virtual]

Definition at line 86 of file loop.h.

{}; 

Member Function Documentation

void GameMode::drawSnow ( float  timeStep,
bool  windy = false 
) [protected]

custom function for drawing snow in the ui

Definition at line 203 of file loop.cpp.

{
       // check wether ui snow is 
       if(getparam_ui_snow()){
              // update and draw snow
              update_ui_snow( timeStep, windy );
              draw_ui_snow();
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual bool GameMode::keyboardEvent ( SDLKey  key,
bool  release 
) [inline, virtual]

Reimplemented in Racing.

Definition at line 90 of file loop.h.

{return false;};
virtual bool GameMode::keyPressEvent ( SDLKey  key) [inline, virtual]

Reimplemented in EventSelect, EventRaceSelect, RaceSelect, GameOver, CreditsTrans, ConfigMode, Racing, GameTypeSelect, Paused, Credits, and Intro.

Definition at line 91 of file loop.h.

{return false;};
virtual bool GameMode::keyReleaseEvent ( SDLKey  key) [inline, virtual]

Reimplemented in HighscoreShow, and SplashScreen.

Definition at line 92 of file loop.h.

{return false;};
virtual void GameMode::loop ( float  timeStep) [pure virtual]
virtual bool GameMode::mouseButtonEvent ( int  button,
int  x,
int  y,
bool  pressed 
) [inline, virtual]

Reimplemented in GameOver.

Definition at line 94 of file loop.h.

{return false;};
virtual bool GameMode::mouseButtonPressEvent ( int  button,
int  x,
int  y 
) [inline, virtual]

Definition at line 95 of file loop.h.

{return false;};
virtual bool GameMode::mouseButtonReleaseEvent ( int  button,
int  x,
int  y 
) [inline, virtual]

Reimplemented in CreditsTrans, and SplashScreen.

Definition at line 96 of file loop.h.

{return false;};

Member Data Documentation

GameMode * GameMode::currentMode = NULL [static]

Definition at line 96 of file loop.h.

Definition at line 99 of file loop.h.

Definition at line 100 of file loop.h.


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