/** 
 * \file Level2D.h
 * \brief This file defines CLevel2D class that draws 2D GUI while in level mode.
 * While player is is level mode, he can see number of lives, level number, timer, all displayed with 2D sprites.
 * 
 * \author Petar Bajic, MPE (C) All Rights Reserved, Homepage: www.mystic-peanut.com
 * \date January, 16 2007.
 */

#include "d3dx9.h"
#include "MyDrawSprite.h"

#define LEVEL_DURATION 85
class CLanguage;


/**
 * \brief Level helper class for drawing 2D interface
 *
 * While player is is level mode, he can see number of lives, level number, timer, all displayed with 2D sprites.
 * \author Petar Bajic \date January, 16 2007.
 */
class CLevel2D
{
public:
	CLevel2D();
	~CLevel2D();

	bool Init(HWND hWnd, LPDIRECT3DDEVICE9 pd3dDevice, int screenWidth, int screenHeight);
	void Render(LPDIRECT3DDEVICE9 pd3dDevice, bool finish, int outcome, float elapsedTime, bool edge_warning, bool doubleFlower, 
				bool harmlessFlower, int level, int lives, int countdown, bool paused, CLanguage* language);
	void OnLostDevice();
	void OnResetDevice(LPDIRECT3DDEVICE9 pd3dDevice, int screenWidth, int screenHeight);

	LPDIRECT3DTEXTURE9	m_outTextureSucc;
	LPDIRECT3DTEXTURE9	m_outTextureFail;
	LPDIRECT3DTEXTURE9	m_DoubleFlower;
	LPDIRECT3DTEXTURE9	m_HarmlessFlower;
	LPDIRECT3DTEXTURE9	m_GoldenCoin;
	LPDIRECT3DTEXTURE9	m_HeartIcon;
	LPDIRECT3DTEXTURE9	m_SheepIcon;
	LPDIRECT3DTEXTURE9	m_GreenBar;
	LPDIRECT3DTEXTURE9	m_YellowPannel;
	LPDIRECT3DTEXTURE9	m_WhitePannel;
	LPD3DXSPRITE		m_sprite;
	LPD3DXFONT			m_pFont;
	LPD3DXFONT			m_pFontBig;
	int m_ScreenWidth;
	int m_ScreenHeight;

};