game_editor.h
来自「大家好!这是一个网络游戏源码」· C头文件 代码 · 共 80 行
H
80 行
#include "scene_view.h"
#include "spr_view.h"
#define EDITOR_TARGET_WORLD 1
#define EDITOR_TARGET_COVER 2
#define EDITOR_TARGET_RUN 3
#define WORLD_ATTR_CHAR 1
#define WORLD_ATTR_COLOR 2
struct EDITOR_STATE
{
BOOL boShowWorldGrid;
BOOL boShowCoverGrid;
BOOL boShowWorldAttr;
BOOL boShowCoverAttr;
BOOL boShowCoverRedrawRect;
BOOL boShowMap;
BOOL boShowCha;
BOOL boShowChaPath;
BOOL boShowChaRect;
BOOL boCharMove;
BOOL boShowGridInfo;
BOOL boShowMapInfo;
int iWorldAttrShowMode;
int iEditorTarget;
};
class GAME_EDITOR
{
public:
GAME_SCENE *pScene;
SCENE_VIEW *pSceneView;
SPR_CHARACTER *pMan;
SPR_VIEW *pSprView;
EDITOR_STATE EditorState;
int iMouseAtCoverGridX;
int iMouseAtCoverGridY;
int iMouseAtWorldGridX;
int iMouseAtWorldGridY;
BOOL Init();
VOID Release();
VOID ReleaseDeviceObj();
BOOL HandleKeyboard();
BOOL HandleMouse(int iMouseState);
BOOL Run();
BOOL DrawAll();
VOID SetCoverHeight(int iGridX , int iGridY , BYTE bHeight);
BOOL GetCoverHeight(int iGridX , int iGridY , LPBYTE pbHeihgt);
VOID SetEditorTarget(int iTarget);
TCHAR strMouseInfo[128];
TCHAR strEditorTarget[64];
GAME_EDITOR()
{
pScene = NULL;
pSceneView = NULL;
pSprView = NULL;
}
~GAME_EDITOR()
{
Release();
}
};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?