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

📄 myapp.h

📁 BREW BREWwinz Application development APIs
💻 H
字号:
// main.h: interface for the CMyApp class.
//
// BREW Game 
// ----------------------------------------
// Project Name :  __________
//     Code ver :  __________
//    Last Date :  __________
//   Written by :  __________
//
// BREW Game Engine.
// Version: 1.0a
// (c)2003 anecia all rights reserved
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_MYAPP_H__D6A54371_0EC6_4795_BEB8_71B1CB76AFAA__INCLUDED_)
#define AFX_MYAPP_H__D6A54371_0EC6_4795_BEB8_71B1CB76AFAA__INCLUDED_

#ifdef WIN32
	#if _MSC_VER > 1000
		#pragma once
	#endif // _MSC_VER > 1000
#endif

#include "MyProject_res.h"

#include "AEEAppGen.h"
#include "AEEModGen.h"
#include "AEEMenu.h"
#include "AEETime.h"

#include "SprFunc.h"
#include "Sprite.h"

#include "Keypad.h"
#include "SoundPlayer.h"

//#define	REPEAT_RATE 50

void JBitBlt(IDisplay * pIDisplay, int xDest, int yDest, int cxDest,
				int cyDest, const void * pbmSource, int xSrc, int ySrc, AEERasterOp dwRopCode);
void JDrawRect(IDisplay* pIDisplay, const AEERect* pRect, RGBVAL clrFrame, RGBVAL clrFill, uint32 dwFlags);
void JFillRect(IDisplay* pIDisplay, const AEERect* pRect, RGBVAL clrFill);
void JDrawText(IDisplay* pIDisplay, AEEFont Font, const AECHAR* pcText, int nChars, 
			   int x, int y, const AEERect* prcBackground, uint32 dwFlags);
RGBVAL JSetColor(IDisplay* pIDisplay, AEEClrItem item, RGBVAL rgb);
BOOL CheckAvailableMemory(IShell* lpIShell, uint32 unSize);

class CMyApp : public AEEApplet
{
public:
	static BOOL HandleEvent(CMyApp* lpMyApp, AEEEvent eCode, uint16 wParam, uint32 dwParam);
	static void	FreeAppData(CMyApp* lpMyApp);
	static BOOL InitAppData(CMyApp* lpMyApp);
	static void	HandleTimer(CMyApp* lpMyApp);

	int GetScreenWidth(BOOL bRealSize = FALSE);
	int GetScreenHeight(BOOL bRealSize = FALSE);
	int DisplayString(int nX, int nLine, int nPageNo, char* pszStr, BOOL bTransparent, AEEFont Font = AEE_FONT_NORMAL);

	void SetBCEN(char* lpData);

	void SetViewPort(JRECT rect);
	void SetViewPort(int nX, int nY);
	JRECT GetViewPort();

protected:
	void InitObjectFunctions();
	BOOL OnAppInitData();
	void OnFreeAppData();
	BOOL OnEvent(AEEEvent eCode, uint16 wParam, uint32 dwParam);
	void OnTimer();
	void OnKey(WORD wKeycode);

public:
	byte			m_mbCurrPageNo;
	byte			m_mbMaxPageNo;

#ifdef AEE_SIMULATOR
public:
	CSoundPlayer	m_BGM;
	CKeypad			m_key;

	// all game data here!!!
	CImageManager*	m_lpImageManager;
	LPJINLIST		m_lpEnemyList;
	LPJBMP			m_lpBackground;

	LPSPRITE		m_lpHero;

private:
	IMenuCtl*		m_pIMenuCtl;
	AEEDeviceInfo   m_dInfo;

	//AECHAR			m_szDebugString[256];
	//int				m_nDebugPosY;

	BOOL			m_bShowFPS;
	dword			m_dwCurrTick;
	dword			m_dwDiffTick;
	dword			m_dwLastTick;
	dword			m_dwFPSTimer;
	dword			m_dwFPS;
	dword			m_dwFrames;

	JRECT			m_rtViewPort;
#endif
};

#endif // !defined(AFX_MYAPP_H__D6A54371_0EC6_4795_BEB8_71B1CB76AFAA__INCLUDED_)

⌨️ 快捷键说明

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