⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 maingame.h

📁 混乱竞技场的全套代码,客户端资源可以网上搜
💻 H
字号:
// MainGame.h: interface for the MainGame class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_MAINGAME_H__FA517629_B1B3_41E3_97D2_F5DA150FB29D__INCLUDED_)
#define AFX_MAINGAME_H__FA517629_B1B3_41E3_97D2_F5DA150FB29D__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class Game_Unit;

class MainGame : public CGsGame , public Game_Client
{
public:
	HRESULT Redraw_Msg();
	void add_game_msg(D3DCOLOR color, const char* str_msg,...);
	void EndGame();
	BOOL StartGame();
	Game_Unit* GetControlUnit();
	BOOL InitGame();
	BOOL LoadConfig();
	GameWorld*	GetGameWorld()	{return &m_world;}

	MainGame(CGsEngine*	pEngine);
	virtual ~MainGame();

	virtual HRESULT Draw(CGsSurface* pSurface);
	virtual VOID Cleanup();

	virtual HRESULT Render();
	virtual FLAG Update(DWORD dwPassTime);



	virtual	LRESULT	MsgProc( UINT uMsg, WPARAM wParam, LPARAM lParam );

	virtual ID	OnMouseMove( UINT nFlags, GPOINT point );		
	virtual ID	OnMouseWheel( UINT nFlags, short zDelta, GPOINT point );
	virtual ID	OnLButtonDown( UINT nFlags, GPOINT point );
	virtual ID	OnLButtonUp( UINT nFlags, GPOINT point );
	virtual ID	OnLButtonDbClk( UINT nFlags, GPOINT point )	;
	virtual ID	OnRButtonDown( UINT nFlags, GPOINT point );
	virtual ID	OnRButtonUp( UINT nFlags, GPOINT point );
	virtual ID	OnRButtonDbClk( UINT nFlags, GPOINT point );
	virtual ID	OnChar( UINT nChar, UINT nRepCnt, UINT nFlags );
	virtual ID	OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	virtual ID	OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);

	virtual VOID	ReleaseSource();	//{return S_OK;}
	virtual HRESULT	RestoreSource(); //{return S_OK;}

protected:
	virtual void on_speek(uint32 uid_speeker, const char* strSpeek);
	virtual void on_handle_place(void* pData);
	virtual void on_login(void* pData);
	virtual void on_add_unit(void* pData);
	virtual void on_del_unit(void* pData);
	virtual void on_handle_unit(void* pData);


public:
	std::vector<ID>	m_array_uid_select;

	GSANI			m_ani_select_unit;
	GSANI			m_ani_light_shadow;
	GSANI			m_ani_dreamland;

	GSANI			m_ani_test;
//	GSANI			m_ani_magic_skill;

	CGsMedia		m_bk_music;

	BOOL			m_want_unit_light;
	GRECT			m_rc_energy;
	GRECT			m_rc_power;
protected:
	GameWorld		m_world;
	CGsTexture		m_tex_game_msg;
	BOOL			m_is_msg_change;
	BOOL			m_is_inputing_text;
	BOOL			m_is_handling_place;
	D3DTLVERTEX		m_aVertex[4];
	struct GAME_MSG 
	{
		std::string str_msg;
		D3DCOLOR	color;
	};
	std::list<GAME_MSG>	m_list_game_msg;
	struct MAGIC_SKILL {
		uint16	type;
		GSANI	icon;
		LONG	use;
	};
	MAGIC_SKILL	m_magic_list[8];
	int	m_select_magic;
};

#endif // !defined(AFX_MAINGAME_H__FA517629_B1B3_41E3_97D2_F5DA150FB29D__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -