/** 
 * \file GameUtils.h
 * \brief Header file for utility functions in GameUtils.cpp.
 * 
 * \author Petar Bajic, MPE (C) All Rights Reserved, Homepage: www.mystic-peanut.com
 * \date January, 16 2007.
 */

#include <Windows.h>
#include "d3dx9.h"
#include <dsound.h>
#include <vector>
using namespace std;

/** 
* Game modes enum.
* Defines several game modes assigned to m_GameMode member variable of CGame.
*/
enum GAME_MODES_ENUM {
	GAMEMODE_MENU,
	GAMEMODE_LEVEL,
	GAMEMODE_MOVIE,
	GAMEMODE_BONUS,
};

bool InitD3D(HWND hWnd, LPDIRECT3DDEVICE9* pd3dDevice, LPDIRECT3D9* pD3D, D3DPRESENT_PARAMETERS** ppPP, bool fullscreen);
bool InitMusic();
bool InitLight (LPDIRECT3DDEVICE9 pd3dDevice, D3DLIGHT9* light1, D3DLIGHT9* light2, D3DLIGHT9* light3);
bool InitSound(HWND hWnd, IDirectSound8** m_pDS);
void SetupMatrices(LPDIRECT3DDEVICE9* ppd3dDevice, D3DXVECTOR3* eye, D3DXVECTOR3* lookAt, D3DXVECTOR3* upVec, float aspectRatio);
void CaptureWindowParameters(HWND hWnd);
void ToggleFullScreen(HWND hWnd, LPDIRECT3DDEVICE9 pd3dDevice, D3DPRESENT_PARAMETERS** ppPP, LPDIRECT3D9 pD3D, int* oldScreenWidth, int* oldScreenHeight, int* screenWidth, int* screenHeight);
void Reset3D(LPDIRECT3DDEVICE9 pd3dDevice, D3DPRESENT_PARAMETERS* pPP);

