My Project
|
Game. More...
#include <Game.h>
Public Member Functions | |
CGame () | |
Default constructor. | |
virtual | ~CGame () |
Destructor. | |
void | GameLoop () |
The Main Loop to Peek the Messages and Execute the Game. | |
bool | Initialise (HWND hWnd, HINSTANCE hInst) |
Init the Game Engine and calls then the InitialiseEx. | |
Static Public Member Functions | |
static LPDIRECT3DDEVICE9 | GetDevice () |
Gets the direct3d device. | |
static LPDIRECT3D9 | GetD3D () |
Gets the Direct3d. | |
static SallyAPI::Core::CCamera * | GetCamera () |
Gets the camera. | |
static SallyAPI::Core::CCounter * | GetCounter () |
Gets the counter instance. | |
static LPD3DXSPRITE | GetSpriteInterface () |
Gets the sprite interface. | |
static SallyAPI::System::CLogger * | GetLogger () |
Gets the logger. | |
static HWND | GetHWnd () |
Gets the HWND of the window. | |
static HINSTANCE | GetHInstance () |
Gets the HInstance of the window. | |
static int | GetScreenWidth () |
Gets the screen width. | |
static int | GetScreenHeight () |
Gets the screen height. | |
static std::string | GetMediaFolder () |
Gets the media folder. | |
static void | SetMediaFolder (const std::string &mediaFolder) |
Sets a media folder. | |
static void | IncreaseDrawCount () |
Increase draw count. | |
static bool | StartRenderToTexture (LPDIRECT3DTEXTURE9 pRenderTexture) |
static bool | EndRenderToTexture () |
Protected Member Functions | |
bool | InitialiseLights () |
Initialises the lights. | |
bool | InitialiseDirect3D () |
Initialises the direct 3 d. | |
bool | InitialiseDeviceStates () |
Initialises the device states. | |
bool | CheckDevice () |
check for lost device. | |
void | CheckDisplayMode () |
Check display mode. | |
bool | InitialisePresentationParameters () |
Initialises the presentation parameters. | |
bool | InitialiseDisplayMode () |
Initialises the display mode. | |
bool | OnLostDevice () |
Executes the lost device action. | |
bool | OnRestoreDevice () |
Executes the restore device action. | |
void | Render () |
The core Render Methods (calculates the FPS). | |
void | ExecuteGame () |
Executes the Game Actions and calls the Render Method. | |
virtual bool | InitialiseEx () |
Initialises the ex. | |
virtual void | ExecuteGameEx () |
Executes the game ex operation. | |
virtual void | OnCommandDeviceRestoreStart ()=0 |
virtual void | OnCommandDeviceRestoreEnd ()=0 |
virtual void | OnCommandDeviceLost ()=0 |
virtual void | TimerEvent ()=0 |
virtual void | RenderEx ()=0 |
Protected Attributes | |
int | m_iDeviceId |
int | m_iVertexProcessing |
bool | m_bWindowd |
bool | m_bMultiMonitor |
std::string | m_strMonitorId |
int | m_iWindowPosX |
int | m_iWindowPosY |
int | m_iWindowWidth |
int | m_iWindowHeight |
float | m_fWidthCorrection |
float | m_fHeightCorrection |
int | m_iScreenColorDepth |
DEVICE_STATE | m_eDeviceState |
D3DMULTISAMPLE_TYPE | m_MultiSampleType |
D3DDISPLAYMODE | m_DisplayMode |
D3DPRESENT_PARAMETERS | m_PresentParameters |
LPDIRECTINPUT8 | m_pDirectInput |
LPDIRECTINPUTDEVICE8 | m_pKeyboard |
LPDIRECTINPUTDEVICE8 | m_pMouse |
LPDIRECTINPUTDEVICE8 | m_pGamepad |
DWORD | m_dwFrames |
DWORD | m_dwFramesPerSecond |
DWORD | m_dwFramesPerSecondNew |
DWORD | m_dwLastFramesPerSecondTime |
int | m_iQuit |
Static Protected Attributes | |
static int | m_iScreenWidth |
static int | m_iScreenHeight |
static std::string | m_strMediaFolder |
static SallyAPI::System::CLogger * | m_pLogger = NULL |
static SallyAPI::Core::CCamera * | m_pCamera = NULL |
static SallyAPI::Core::CCounter * | m_pCounter = NULL |
static LPDIRECT3DDEVICE9 | m_pDirect3DDevice = NULL |
static LPD3DXSPRITE | m_pSpriteInterface = NULL |
static LPDIRECT3D9 | m_pDirect3D = NULL |
static LPDIRECT3DSURFACE9 | m_pBackBuffer = NULL |
static LPDIRECT3DSURFACE9 | m_pRenderTarget = NULL |
static HWND | m_hWnd = NULL |
static HINSTANCE | m_hInst = NULL |
static int | m_iDrawCount = 0 |
static int | m_iDrawCountNew = 0 |
Game.
CGame::CGame | ( | ) |
Default constructor.
CGame::~CGame | ( | ) | [virtual] |
Destructor.
bool CGame::CheckDevice | ( | ) | [protected] |
check for lost device.
void CGame::CheckDisplayMode | ( | ) | [protected] |
Check display mode.
bool CGame::EndRenderToTexture | ( | ) | [static] |
void CGame::ExecuteGame | ( | ) | [protected] |
Executes the Game Actions and calls the Render Method.
void CGame::ExecuteGameEx | ( | ) | [protected, virtual] |
Executes the game ex operation.
void CGame::GameLoop | ( | ) |
The Main Loop to Peek the Messages and Execute the Game.
SallyAPI::Core::CCamera * CGame::GetCamera | ( | ) | [static] |
Gets the camera.
SallyAPI::Core::CCounter * CGame::GetCounter | ( | ) | [static] |
Gets the counter instance.
LPDIRECT3D9 CGame::GetD3D | ( | ) | [static] |
Gets the Direct3d.
LPDIRECT3DDEVICE9 CGame::GetDevice | ( | ) | [static] |
Gets the direct3d device.
HINSTANCE CGame::GetHInstance | ( | ) | [static] |
Gets the HInstance of the window.
HWND CGame::GetHWnd | ( | ) | [static] |
Gets the HWND of the window.
SallyAPI::System::CLogger * CGame::GetLogger | ( | ) | [static] |
Gets the logger.
std::string CGame::GetMediaFolder | ( | ) | [static] |
Gets the media folder.
int CGame::GetScreenHeight | ( | ) | [static] |
Gets the screen height.
int CGame::GetScreenWidth | ( | ) | [static] |
Gets the screen width.
LPD3DXSPRITE CGame::GetSpriteInterface | ( | ) | [static] |
Gets the sprite interface.
void CGame::IncreaseDrawCount | ( | ) | [static] |
Increase draw count.
bool CGame::Initialise | ( | HWND | hWnd, |
HINSTANCE | hInst | ||
) |
Init the Game Engine and calls then the InitialiseEx.
hWnd | Handle of the window. |
hInst | The instance. |
bool CGame::InitialiseDeviceStates | ( | ) | [protected] |
Initialises the device states.
bool CGame::InitialiseDirect3D | ( | ) | [protected] |
Initialises the direct 3 d.
bool CGame::InitialiseDisplayMode | ( | ) | [protected] |
Initialises the display mode.
bool CGame::InitialiseEx | ( | ) | [protected, virtual] |
Initialises the ex.
bool CGame::InitialiseLights | ( | ) | [protected] |
Initialises the lights.
bool CGame::InitialisePresentationParameters | ( | ) | [protected] |
Initialises the presentation parameters.
virtual void SallyAPI::Core::CGame::OnCommandDeviceLost | ( | ) | [protected, pure virtual] |
virtual void SallyAPI::Core::CGame::OnCommandDeviceRestoreEnd | ( | ) | [protected, pure virtual] |
virtual void SallyAPI::Core::CGame::OnCommandDeviceRestoreStart | ( | ) | [protected, pure virtual] |
bool CGame::OnLostDevice | ( | ) | [protected] |
Executes the lost device action.
bool CGame::OnRestoreDevice | ( | ) | [protected] |
Executes the restore device action.
void CGame::Render | ( | ) | [protected] |
The core Render Methods (calculates the FPS).
virtual void SallyAPI::Core::CGame::RenderEx | ( | ) | [protected, pure virtual] |
void CGame::SetMediaFolder | ( | const std::string & | mediaFolder | ) | [static] |
Sets a media folder.
mediaFolder | Pathname of the media folder. |
bool CGame::StartRenderToTexture | ( | LPDIRECT3DTEXTURE9 | pRenderTexture | ) | [static] |
virtual void SallyAPI::Core::CGame::TimerEvent | ( | ) | [protected, pure virtual] |
bool SallyAPI::Core::CGame::m_bMultiMonitor [protected] |
bool SallyAPI::Core::CGame::m_bWindowd [protected] |
D3DDISPLAYMODE SallyAPI::Core::CGame::m_DisplayMode [protected] |
DWORD SallyAPI::Core::CGame::m_dwFrames [protected] |
DWORD SallyAPI::Core::CGame::m_dwFramesPerSecond [protected] |
DWORD SallyAPI::Core::CGame::m_dwFramesPerSecondNew [protected] |
DWORD SallyAPI::Core::CGame::m_dwLastFramesPerSecondTime [protected] |
DEVICE_STATE SallyAPI::Core::CGame::m_eDeviceState [protected] |
float SallyAPI::Core::CGame::m_fHeightCorrection [protected] |
float SallyAPI::Core::CGame::m_fWidthCorrection [protected] |
HINSTANCE CGame::m_hInst = NULL [static, protected] |
HWND CGame::m_hWnd = NULL [static, protected] |
int SallyAPI::Core::CGame::m_iDeviceId [protected] |
int CGame::m_iDrawCount = 0 [static, protected] |
int CGame::m_iDrawCountNew = 0 [static, protected] |
int SallyAPI::Core::CGame::m_iQuit [protected] |
int SallyAPI::Core::CGame::m_iScreenColorDepth [protected] |
int CGame::m_iScreenHeight [static, protected] |
int CGame::m_iScreenWidth [static, protected] |
int SallyAPI::Core::CGame::m_iVertexProcessing [protected] |
int SallyAPI::Core::CGame::m_iWindowHeight [protected] |
int SallyAPI::Core::CGame::m_iWindowPosX [protected] |
int SallyAPI::Core::CGame::m_iWindowPosY [protected] |
int SallyAPI::Core::CGame::m_iWindowWidth [protected] |
D3DMULTISAMPLE_TYPE SallyAPI::Core::CGame::m_MultiSampleType [protected] |
LPDIRECT3DSURFACE9 CGame::m_pBackBuffer = NULL [static, protected] |
SallyAPI::Core::CCamera * CGame::m_pCamera = NULL [static, protected] |
SallyAPI::Core::CCounter * CGame::m_pCounter = NULL [static, protected] |
LPDIRECT3D9 CGame::m_pDirect3D = NULL [static, protected] |
LPDIRECT3DDEVICE9 CGame::m_pDirect3DDevice = NULL [static, protected] |
LPDIRECTINPUT8 SallyAPI::Core::CGame::m_pDirectInput [protected] |
LPDIRECTINPUTDEVICE8 SallyAPI::Core::CGame::m_pGamepad [protected] |
LPDIRECTINPUTDEVICE8 SallyAPI::Core::CGame::m_pKeyboard [protected] |
SallyAPI::System::CLogger * CGame::m_pLogger = NULL [static, protected] |
LPDIRECTINPUTDEVICE8 SallyAPI::Core::CGame::m_pMouse [protected] |
LPDIRECT3DSURFACE9 CGame::m_pRenderTarget = NULL [static, protected] |
D3DPRESENT_PARAMETERS SallyAPI::Core::CGame::m_PresentParameters [protected] |
LPD3DXSPRITE CGame::m_pSpriteInterface = NULL [static, protected] |
std::string CGame::m_strMediaFolder [static, protected] |
std::string SallyAPI::Core::CGame::m_strMonitorId [protected] |