#include <dxf_game.h>
Public Member Functions | |
| LRESULT | MsgProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, bool *pbNoFurtherProcessing, void *pUserContext) |
| HRESULT | Load (const wchar_t *windowName, RegistrarInterface *pRegistrar, int initialWidth, int initialHeight, bool forceResolution=false, bool startWindowed=true) |
| int | Run () |
Static Public Member Functions | |
| static Game *const | Instance () |
Protected Member Functions | |
| Game () | |
| Game (const Game &) | |
| Game & | operator= (const Game &) |
Private Attributes | |
| View *const | pView |
| Controller *const | pController |
| Model *const | pModel |
| Console *const | pConsole |
| CSoundManager | sound |
Definition at line 86 of file dxf_game.h.
| dxf::Game::Game | ( | ) | [protected] |
Definition at line 38 of file dxf_game.cpp.
| dxf::Game::Game | ( | const Game & | ) | [protected] |
| Game *const dxf::Game::Instance | ( | ) | [static] |
| HRESULT dxf::Game::Load | ( | const wchar_t * | windowName, | |
| RegistrarInterface * | pRegistrar, | |||
| int | initialWidth, | |||
| int | initialHeight, | |||
| bool | forceResolution = false, |
|||
| bool | startWindowed = true | |||
| ) |
Load the engine so it is ready for use.
| windowName | The name used in the title bar/task manager for the application.\ | |
| pRegistrar | a pointer to a client-owned registrar that handles registering states and custom commands. | |
| initialWidth | Initial window/back buffer width to use for the application. A safe value is 800 | |
| initialHeight | initial window/back buffer height for the application. A safe value is 600 | |
| forceResolution | Using true here will force the window size to be the initial size. Use with caution. If the user's monitor cannot display this resolution, the application will fail to start. If false is passed here, the back buffer size may not be constant, it will be able to change during a run, so you must program to allow for this. | |
| startWindowed | Using true here will start the application in a window. Using false here will start the application in full screen mode. |
Definition at line 70 of file dxf_game.cpp.
References dxf::View::Init(), dxf::Console::Load(), dxf::Controller::Load(), dxf::Model::Load(), dxf::View::Load(), MsgProc(), pConsole, pController, pModel, pView, dxf::RegistrarInterface::RegisterCommands(), dxf::RegistrarInterface::RegisterStates(), dxf::Sound::SetManager(), and sound.
| LRESULT dxf::Game::MsgProc | ( | HWND | hWnd, | |
| UINT | uMsg, | |||
| WPARAM | wParam, | |||
| LPARAM | lParam, | |||
| bool * | pbNoFurtherProcessing, | |||
| void * | pUserContext | |||
| ) |
Definition at line 48 of file dxf_game.cpp.
References dxf::Controller::BufferedInput(), dxf::StateManager::GetCurrentGameState(), dxf::GameState::MsgProc(), pController, pModel, and dxf::Controller::SetMousePosition().
Referenced by Load().
| int dxf::Game::Run | ( | ) |
Run the application. Start the real-time simulation. This returns when the application is finished.
Definition at line 102 of file dxf_game.cpp.
References pConsole, pController, pModel, pView, dxf::View::Unload(), dxf::Controller::Unload(), dxf::Model::Unload(), and dxf::Console::Unload().
Console* const dxf::Game::pConsole [private] |
Controller* const dxf::Game::pController [private] |
Model* const dxf::Game::pModel [private] |
View* const dxf::Game::pView [private] |
CSoundManager dxf::Game::sound [private] |
1.4.7