Back to index

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

#include <loading.h>

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

List of all members.

Public Member Functions

 Loading ()
 ~Loading ()
void loop (float timeStep)
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

Private Attributes

std::string m_loadedCourse
race_conditions_t m_loadedCondition
pp::Labelmp_loadingLbl

Detailed Description

Definition at line 30 of file loading.h.


Constructor & Destructor Documentation

Definition at line 47 of file loading.cpp.

{
    int width = getparam_x_resolution();
    int height = getparam_y_resolution();
       
       pp::Vec2d pos(width/2,height/2);   
       mp_loadingLbl = new pp::Label(pos,"loading",_("Loading, Please Wait..."));
       mp_loadingLbl->alignment.center();
       mp_loadingLbl->alignment.middle();
       
       m_loadedCondition = (race_conditions_t)-1;
       play_music( "loading" );
}

Here is the call graph for this function:

Definition at line 61 of file loading.cpp.

{
       delete mp_loadingLbl;
}

Member Function Documentation

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

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, inherited]

Reimplemented in Racing.

Definition at line 90 of file loop.h.

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

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, inherited]

Reimplemented in HighscoreShow, and SplashScreen.

Definition at line 92 of file loop.h.

{return false;};
void Loading::loop ( float  timeStep) [virtual]

Implements GameMode.

Definition at line 67 of file loading.cpp.

{
       int width, height;
    width = getparam_x_resolution();
    height = getparam_y_resolution();

    update_audio();

    clear_rendering_context();

    set_gl_options( GUI );

    UIMgr.setupDisplay();

       drawSnow(timeStep, gameMgr->getCurrentRace().windy);
       
    theme.drawMenuDecorations();

    reshape( width, height );

       UIMgr.draw(); 
       
    winsys_swap_buffers();
       

    if ( m_loadedCourse.empty() ||
              m_loadedCourse != gameMgr->getCurrentRace().course ||
              m_loadedCondition != gameMgr->getCurrentRace().condition ) 
    {
       // Load the course
       load_course( gameMgr->getCurrentRace().course );

       m_loadedCourse = gameMgr->getCurrentRace().course;
       m_loadedCondition = gameMgr->getCurrentRace().condition;
    }

    set_course_mirroring( gameMgr->getCurrentRace().mirrored );

    // We're done here, enter INTRO mode
    set_game_mode( INTRO ); 
}

Here is the call graph for this function:

virtual bool GameMode::mouseButtonEvent ( int  button,
int  x,
int  y,
bool  pressed 
) [inline, virtual, inherited]

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, inherited]

Definition at line 95 of file loop.h.

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

Reimplemented in CreditsTrans, and SplashScreen.

Definition at line 96 of file loop.h.

{return false;};

Member Data Documentation

GameMode * GameMode::currentMode = NULL [static, inherited]

Definition at line 96 of file loop.h.

Definition at line 33 of file loading.h.

std::string Loading::m_loadedCourse [private]

Definition at line 32 of file loading.h.

game_mode_t GameMode::mode [static, inherited]

Definition at line 99 of file loop.h.

Definition at line 34 of file loading.h.

game_mode_t GameMode::prevmode [static, inherited]

Definition at line 100 of file loop.h.


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