?? gtgame.h
字號:
#ifndef GTGAME_H_
#define GTGAME_H_
#include "EasyDraw.h"
#include "Surface.h"
#include "Building.h"
#include "Map.h"
#include "PictureGroup.h"
#include "RTimer.h"
class GtGame;
typedef int (GtGame::*WWndFunc)(DWORD,DWORD);
struct WMessageFunc {
DWORD id;
WWndFunc func;
};
#define MAP_MESSAGE_FUNC() \
public: \
virtual const WMessageFunc* GetMessageEntries() { return messageEntries; } \
static const WMessageFunc messageEntries[];
#define MAP_MESSAGE(id,func) {id,(WWndFunc)&func},
#define END_MAP_MESSAGE() {0,0}};
class GtGame
{
public:
GtGame(HINSTANCE hInstance,int nCmdShow);
~GtGame();
void Create();
int MainLoop();
private:
static LRESULT CALLBACK _ProcFn( HWND hwnd, UINT uMsg,WPARAM wParam, LPARAM lParam );
int OnLButtonDown(DWORD w,DWORD l); // 窗口關閉, 發一退出消息
int OnDestroy(DWORD w,DWORD l); // 窗口關閉, 發一退出消息
int OnKeyDown(DWORD w,DWORD l);
HWND GameHwnd;
ATOM MyRegisterClass();
HINSTANCE hInstance;
int nCmdShow;
Surface surface;
Surface surface1;
Building build;
PictureGroup hero;
Map map;
RTimer timer;
HFONT font;
MAP_MESSAGE_FUNC()
};
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -