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

📄 gsgame.h

📁 连连看这个游戏都玩过吧
💻 H
字号:
// GsGame.h: interface for the CGsGame class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_GSGAME_H__B0B9C6CE_2C12_4CC4_A102_522F494A7B43__INCLUDED_)
#define AFX_GSGAME_H__B0B9C6CE_2C12_4CC4_A102_522F494A7B43__INCLUDED_

#include "GSLib.h"	// Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class GSLIB_API CGsGame  
{
	friend CGsEngine;
protected:
	CGsEngine*	m_pEngine;
	CGsUIPanel					m_UI;
	KEY				m_key_style;
	std::list<CGsSound*>			m_list_sound;
public:
	bool play_sound(const char *strSound, int volume=0);
	virtual VOID Cleanup();
	CGsGame(CGsEngine*	pEngine);
	virtual ~CGsGame();

	const char*	GetStyle()	{return m_key_style.c_str();}
	BOOL	IsStyle(const char* style) { return m_key_style==style; }

	HRESULT RenderUI();

	CGsUIPanel*					GetMainUI()				{ return &m_UI; }

	virtual HRESULT Render();
	virtual HRESULT Draw(CGsSurface* pSurface)			{return S_OK;}
	virtual FLAG Update(DWORD dwPassTime);
	virtual	FLAG	UpdateSecond()					    { return 0; }
	virtual	FLAG	UpdateMinute()					    { return 0; }



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


	virtual	LRESULT	MsgProc( UINT uMsg, WPARAM wParam, LPARAM lParam );
//	virtual	VOID	Pause( BOOL bPause );

	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);

protected:
	virtual VOID OnUICmd(CGsUIPanel* pUI, UINT msg, LONG param);

};

#endif // !defined(AFX_GSGAME_H__B0B9C6CE_2C12_4CC4_A102_522F494A7B43__INCLUDED_)

⌨️ 快捷键说明

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