#include <Windows.h>
#include "d3dx9.h"
#include <dsound.h>
#include <vector>


Namespaces | |
| namespace | std |
Enumerations | |
| enum | GAME_MODES_ENUM |
Functions | |
| bool | InitD3D (HWND hWnd, LPDIRECT3DDEVICE9 *pd3dDevice, LPDIRECT3D9 *pD3D, D3DPRESENT_PARAMETERS **ppPP, bool fullscreen) |
| This function creates DirectX 3D Device. | |
| bool | InitLight (LPDIRECT3DDEVICE9 pd3dDevice, D3DLIGHT9 *light1, D3DLIGHT9 *light2, D3DLIGHT9 *light3) |
| This function creates lights. | |
| bool | InitSound (HWND hWnd, IDirectSound8 **m_pDS) |
| This function creates DirectX sound device. | |
| void | SetupMatrices (LPDIRECT3DDEVICE9 *ppd3dDevice, D3DXVECTOR3 *eye, D3DXVECTOR3 *lookAt, D3DXVECTOR3 *upVec, float aspectRatio) |
| World, View and Projection matrices are set with passed function parameters. | |
| void | CaptureWindowParameters (HWND hWnd) |
| Captures current window parameters, to restore them later. | |
| void | ToggleFullScreen (HWND hWnd, LPDIRECT3DDEVICE9 pd3dDevice, D3DPRESENT_PARAMETERS **ppPP, LPDIRECT3D9 pD3D, int *oldScreenWidth, int *oldScreenHeight, int *screenWidth, int *screenHeight) |
| Toggles fullscreen/windowed mode. | |
| void | Reset3D (LPDIRECT3DDEVICE9 pd3dDevice, D3DPRESENT_PARAMETERS *pPP) |
| This function resets D3D device. | |
| enum GAME_MODES_ENUM |
Game modes enum. Defines several game modes assigned to m_GameMode member variable of CGame.
| void CaptureWindowParameters | ( | HWND | hWnd | ) |
Captures current window parameters, to restore them later.
| hWnd | handle to application window |
| bool InitD3D | ( | HWND | hWnd, | |
| LPDIRECT3DDEVICE9 * | ppd3dDevice, | |||
| LPDIRECT3D9 * | ppD3D, | |||
| D3DPRESENT_PARAMETERS ** | ppd3dpp, | |||
| bool | fullscreen | |||
| ) |
This function creates DirectX 3D Device.
| hWnd | handle to the application window | |
| ppd3dDevice | pointer to d3d device to be created | |
| ppd3dpp | directX presentation parameters | |
| fullscreen | boolean telling if application is started in fullscreen or windowed mode |
| bool InitLight | ( | LPDIRECT3DDEVICE9 | pd3dDevice, | |
| D3DLIGHT9 * | light1, | |||
| D3DLIGHT9 * | light2, | |||
| D3DLIGHT9 * | light3 | |||
| ) |
This function creates lights.
| light1 | pointer to light to be created |
| bool InitSound | ( | HWND | hWnd, | |
| IDirectSound8 ** | ppDS | |||
| ) |
This function creates DirectX sound device.
| ppDS | sound device to be created |
| void Reset3D | ( | LPDIRECT3DDEVICE9 | pd3dDevice, | |
| D3DPRESENT_PARAMETERS * | pPP | |||
| ) |
This function resets D3D device.
| pPP | new presentation parameters |
| void SetupMatrices | ( | LPDIRECT3DDEVICE9 * | ppd3dDevice, | |
| D3DXVECTOR3 * | eye, | |||
| D3DXVECTOR3 * | lookAt, | |||
| D3DXVECTOR3 * | upVec, | |||
| float | aspectRatio | |||
| ) |
World, View and Projection matrices are set with passed function parameters.
| eye | position of the camera | |
| lookAt | position where camera is pointed to. |
| void ToggleFullScreen | ( | HWND | hWnd, | |
| LPDIRECT3DDEVICE9 | pd3dDevice, | |||
| D3DPRESENT_PARAMETERS ** | ppPP, | |||
| LPDIRECT3D9 | pD3D, | |||
| int * | oldScreenWidth, | |||
| int * | oldScreenHeight, | |||
| int * | screenWidth, | |||
| int * | screenHeight | |||
| ) |
Toggles fullscreen/windowed mode.
| oldScreenWidth | screen width of previous application window state |
1.5.3