//

//CGame.h


/*******************************************************
//
//	Name: CGame.h
//
//	Author: Dave Ratti
//
//	Date:10-16-01
//
//	Modified: 10-16-01
//
//	Notes: This class will control the flow of the actuall game. 
//	Not the actuall program (title screens, options menues, ect)
//
//
//
//
//
*********************************************************/

#ifndef CGAME_H_
#define CGAME_H_

#include "stringc.h"
#include "CGraphicSystem.h"
#include "Assert.h"
#include "CImage.h"
#include "CCommand.h"
#include "singleton.h"
#include "CMap.h"
#include "CPlayerObject.h"
#include "CAIMap.h"

#include "CSound.h"
#include "CDAudioManager.h"

///////////////////////////////////////////////
typedef enum 
{

	GS_MAIN=0	
	
	
} GAMESTATE;



///////////////////////////////////////////////


#define g_Game CGame::GetSingleton()

class CGame: public Singleton <CGame>
{

public:

	CGame(){ Clear(); }
	~CGame(){  }
	void Clear();
	bool Init();
	void ShutDown();

	int MainLoop();	//this is called in the main loop.

	int	getTileSize(){ return m_tileSize; }
	

	//AI FUNCTIONS///////////////////////////

	CAIMap	getAIMap();	//used by AI. gets a map of current objects on screen.
	POINT	getMapFromScreen(POINT scr);
	


protected:

	GAMESTATE		m_GameState;
	CMap*			m_Map;
	CPlayerObject*	m_Player1;
	CPlayerObject*  m_Player2;
	CPlayerObject*  m_Player3;
	CPlayerObject*  m_Player4;

	//CCommands
	CCommand		m_moveDownP1;
	CCommand		m_moveUpP1;
	CCommand		m_moveLeftP1;
	CCommand		m_moveRightP1;

	CCommand		m_dropBombP1;

	CSound*			m_testSound;

	//Game setting an options
	int				m_tileSize;			//should always be 32 or 64

	POINT			m_mapAnchor;


};

#endif