📄 stdafx.h
字号:
#pragma once
#pragma warning( disable : 4996 )
#pragma warning( disable : 4244 )
#pragma warning( disable : 4800 )
#pragma warning( disable : 4018 )
#include <windows.h>
#include <assert.h>
#include <wchar.h>
#include <tchar.h>
#include <memory.h>
#include <mmsystem.h>
#include <malloc.h>
#include <math.h>
#include <limits.h>
#include <stdlib.h>
#include <stdio.h>
//#include <d3dx9math.h>
#include <fstream>
#include <iomanip>
#include <string>
#include <iostream>
#include <vector>
#include <list>
#include <map>
#include <algorithm>
#pragma comment( lib, "dxguid.lib" )
#if defined(DEBUG) || defined(_DEBUG)
#pragma comment( lib, "d3dx9d.lib" )
#else
#pragma comment( lib, "d3dx9.lib" )
#endif
#pragma comment( lib, "d3d9.lib" )
#pragma comment( lib, "winmm.lib" )
#pragma comment( lib, "comctl32.lib" )
#pragma comment( lib, "dsound.lib" )
#pragma comment( lib, "dinput8.lib" )
#include <d3d9.h>
#include <d3dx9.h>
#include <dinput.h>
#define KEYDOWN(vb_code) ((GetAsyncKeyState(vb_code) & 0x8000) ? 1 : 0)
#ifndef SAFE_DELETE
#define SAFE_DELETE(p) { if(p) { delete (p); (p)=NULL; } }
#endif
#ifndef SAFE_DELETE_ARRAY
#define SAFE_DELETE_ARRAY(p) { if(p) { delete[] (p); (p)=NULL; } }
#endif
#ifndef SAFE_RELEASE
#define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }
#endif
#define MK_MIN 0x100
#define MK_LEFT 0x100
#define MK_RIGHT 0x101
#define MK_MID 0x102
class Game_DisplayObject;//杂项基类(基)
class Game_SkyBox;//天空类(派)
class Game_Terrain;//地形类(派)
class Game_Input;//游戏输入类
class Game_Timer;//游戏时间类
class Game_Font;//字体显示类
class Game_Root;//初始设备类
class Game_App;//增加游戏对象接口类
class Game_Camera;//摄象机类
class Game_Actor;//游戏成员类(基)
class Game_QuietMesh;//静态网格生成类(派)
class Game_Hero;//主角类(派)
class Game_BillBoard;//公告版类(派)
class Game_EnemyNpc;//敌人NPC类
class Game_UIManage;//游戏UI管理类(基)
class Game_UIBar;//UI生成类(派)
class Game_Mesh;//画静态网格类
class Game_SkinMesh;//骨骼动画类
class Game_Interface;//画界面类
class Game_Resource;//资源管理类
class Game_PointLight;//点光源类
using namespace std;
struct GlobalObject{
HWND g_hwnd;
LPDIRECT3D9 g_pD3D;
LPDIRECT3DDEVICE9 g_pDevice;
D3DPRESENT_PARAMETERS g_pParameters;
LPD3DXFONT g_pFont;
LPD3DXSPRITE g_pSprite;
Game_Input* g_pGame_Input;
Game_App * g_pGameApp;
Game_Timer* g_pGame_Timer;
Game_UIBar* g_pLoading;
Game_UIBar* g_pLoadingBar;
INT g_nScreenWidth;
INT g_nScreenHeight;
BOOL g_bWindow;
//LPD3DXSPRITE sprite;
GlobalObject(){
g_hwnd = 0;
g_pD3D = 0;
g_pDevice = 0;
g_pFont = 0;
g_pSprite = 0;
g_pGame_Input = 0;
g_pGameApp = 0;
g_pLoading = 0;
g_pLoadingBar = 0;
g_pGame_Timer = 0;
g_nScreenWidth = 0;
g_nScreenHeight = 0;
g_bWindow = 0;
//sprite = 0;
}
};
extern GlobalObject g_sGlobal;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -