#include <application.h>
Contains the main application loop and initializes the display as well as the input and sound, etc.
Definition at line 32 of file application.h.
Public Methods | |
| Application (string title="", int w=800, int h=600) | |
| Constructor. | |
| ~Application () | |
| Destructor. | |
| int | Run () |
| Main Loop. | |
| int | step () |
| Single-Step through the game loop. | |
Private Methods | |
| int | init () |
| Actual initialization method. | |
| int | close () |
| Actual close method. | |
Private Attributes | |
| Graphics | GD |
| The graphics device used in this application. | |
| Input | ID |
| The Input device. | |
| Sound | SD |
| The Sound device. | |
| Game * | CurrentGame |
| The implementation of our game. | |
| int | frame_count |
| Keep track of how many frames (GameSteps) that we have done. | |
|
||||||||||||||||
|
Constructor.
Definition at line 13 of file application.cpp. References GD, Graphics::hideMouse(), init(), and NNCMath::MathInit(). |
|
|
Destructor. Closes all relevant devices. Definition at line 23 of file application.cpp. References close(). |
|
|
Actual close method. closes the graphics device, etc. Definition at line 39 of file application.cpp. References CurrentGame. Referenced by ~Application(). |
|
|
Actual initialization method. Sets up the graphics context, etc. Definition at line 29 of file application.cpp. References CurrentGame, frame_count, GD, ID, and SD. Referenced by Application(). |
|
|
Main Loop. Sits in a main loop until it's time to exit. Definition at line 46 of file application.cpp. References CurrentGame, Input::FAST_QUIT, frame_count, ID, Input::IsPressed(), nnctime::msecs, nnctime::secs, Game::step(), Input::Update(), Util_DiffTime(), and Util_GetTime(). |
|
|
Single-Step through the game loop. Calls a Game-Step function once. |
|
|
The implementation of our game.
Definition at line 83 of file application.h. |
|
|
Keep track of how many frames (GameSteps) that we have done.
Definition at line 86 of file application.h. |
|
|
The graphics device used in this application.
Definition at line 74 of file application.h. Referenced by Application(), and init(). |
|
|
The Input device.
Definition at line 77 of file application.h. |
|
|
The Sound device.
Definition at line 80 of file application.h. Referenced by init(). |
1.3-rc1