dxf::Game Class Reference

#include <dxf_game.h>

List of all members.

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 &)
Gameoperator= (const Game &)

Private Attributes

View *const pView
Controller *const pController
Model *const pModel
Console *const pConsole
CSoundManager sound


Detailed Description

The game class is the top level container for the DXFramework engine.

Definition at line 86 of file dxf_game.h.


Constructor & Destructor Documentation

dxf::Game::Game (  )  [protected]

Definition at line 38 of file dxf_game.cpp.

dxf::Game::Game ( const Game  )  [protected]


Member Function Documentation

Game *const dxf::Game::Instance (  )  [static]

Definition at line 43 of file dxf_game.cpp.

Referenced by MsgProc().

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.

Parameters:
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().

Game& dxf::Game::operator= ( const Game  )  [protected]

int dxf::Game::Run (  ) 

Run the application. Start the real-time simulation. This returns when the application is finished.

Returns:
Exit code

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().


Member Data Documentation

Console* const dxf::Game::pConsole [private]

Definition at line 125 of file dxf_game.h.

Referenced by Load(), and Run().

Controller* const dxf::Game::pController [private]

Definition at line 123 of file dxf_game.h.

Referenced by Load(), MsgProc(), and Run().

Model* const dxf::Game::pModel [private]

Definition at line 124 of file dxf_game.h.

Referenced by Load(), MsgProc(), and Run().

View* const dxf::Game::pView [private]

Definition at line 122 of file dxf_game.h.

Referenced by Load(), and Run().

CSoundManager dxf::Game::sound [private]

Definition at line 126 of file dxf_game.h.

Referenced by Load().


The documentation for this class was generated from the following files:
Generated on Fri Aug 18 12:01:28 2006 for DXFramework by  doxygen 1.4.7