/* ==========================================================================
* 파    일 : NoticeMsgPlane.h
* 목    적 : 
* 작 성 자 : 김가람
* 작 성 일 : 2008-08-13
* 주의사항 :
*===========================================================================*/
#pragma once
#include "DepthPlane.h"
#include "PointerQueue.h"

const unsigned int MAX_NOTICCOUNT = 3;
const unsigned int NOTICEMSG_ACTIVE_TIME = 15000;
const unsigned int NOTICEMSG_FADEOUT_TIME = 5000;
const unsigned int NOTICEMSG_TEXT_LENGTH = 40;
const unsigned int PRINT_POSY = 100;

/// 공지용 메세지 출력
class cNoticeMsgPlane : public cPlane
{
public:
	cNoticeMsgPlane();
	virtual ~cNoticeMsgPlane();

	void Update( unsigned long deltaTime, unsigned long accumTime );
	void ActiveMsg( LPCTSTR msg, unsigned long color );

	bool IsActive() { return (mMsgList.IsEmpty() == false); }

protected:
	void Draw();

protected:
	struct sNoticeMsgItem
	{
		TCHAR			msg[NOTICEMSG_TEXT_LENGTH];
		unsigned int	msgLength;
		unsigned long	color;
		unsigned long	startTime;

		int posX;

		sNoticeMsgItem()
		{
			::memset( msg, 0, sizeof(TCHAR)*NOTICEMSG_TEXT_LENGTH );
			msgLength = 0;
			color = 0xFFFFFFFF;
				
			posX = 0;
			startTime = 0;
		}
	};

private:
	typedef tPointerList<void*> cMsgList;
	cMsgList	mMsgList;
	cMsgList	mMsgDelList;
};