#include <MainLoop.h>
Public Member Functions | |
MainLoop () | |
virtual | ~MainLoop () |
void | pop_scene () |
Stop the current scene. | |
void | push_scene (Engine::Scene &scene) |
Run a scene. | |
Private Member Functions | |
void | run (Engine::Scene &scene) |
Run the current scene until it quits. | |
void | process_events () |
Record input. | |
void | do_logic (Engine::Scene &scene) |
Update game state (do logic / physics). | |
void | redraw (Engine::Scene &scene) |
Update the display. | |
void | update_sound (Engine::Scene &scene) |
Update the sound. | |
Private Attributes | |
unsigned int | milliseconds |
bool | done |
true iff current scene should end. | |
bool | quit |
true iff all scenes should end. |
Scene can take over for a while with push_scene(). Once they are done, they should call pop_scene(). Scenes are recursive, pop_scene() will return to the caller of push_scene(), which is often another scene.
Definition at line 22 of file MainLoop.h.
MainLoop::MainLoop | ( | ) |
Definition at line 20 of file MainLoop.cpp.
MainLoop::~MainLoop | ( | ) | [virtual] |
Definition at line 26 of file MainLoop.cpp.
void MainLoop::do_logic | ( | Engine::Scene & | scene | ) | [private] |
void MainLoop::pop_scene | ( | ) |
Stop the current scene.
When there are no more scenes, the main loop ends. Must be called only once per scene.
Definition at line 43 of file MainLoop.cpp.
void MainLoop::process_events | ( | ) | [private] |
void MainLoop::push_scene | ( | Engine::Scene & | scene | ) |
Run a scene.
The scene should call pop_scene() when it wants to quit. push_scene() does not return until this happens.
Definition at line 48 of file MainLoop.cpp.
void MainLoop::redraw | ( | Engine::Scene & | scene | ) | [private] |
void MainLoop::run | ( | Engine::Scene & | scene | ) | [private] |
void MainLoop::update_sound | ( | Engine::Scene & | scene | ) | [private] |
bool MainLoop::done [private] |
unsigned int MainLoop::milliseconds [private] |
Definition at line 51 of file MainLoop.h.
bool MainLoop::quit [private] |
Generated at Mon Sep 6 00:41:16 2010 by Doxygen version 1.4.7 for Racer version svn335.