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

📄 stdafx.h

📁 是一个基于热血战国协议的网络游戏。现在脱机客户端先放出来给大家研究
💻 H
字号:
// stdafx.h : 标准系统包含文件的包含文件,
// 或是经常使用但不常更改的
// 特定于项目的包含文件

#pragma once

#ifndef _SECURE_ATL
#define _SECURE_ATL 1
#endif

#ifndef VC_EXTRALEAN
#define VC_EXTRALEAN		// 从 Windows 头中排除极少使用的资料
#endif

// 如果您必须使用下列所指定的平台之前的平台,则修改下面的定义。
// 有关不同平台的相应值的最新信息,请参考 MSDN。
#ifndef WINVER				// 允许使用特定于 Windows XP 或更高版本的功能。
#define WINVER 0x0501		// 将此值更改为相应的值,以适用于 Windows 的其他版本。
#endif

#ifndef _WIN32_WINNT		// 允许使用特定于 Windows XP 或更高版本的功能。
#define _WIN32_WINNT 0x0501	// 将此值更改为相应的值,以适用于 Windows 的其他版本。
#endif						

#ifndef _WIN32_WINDOWS		// 允许使用特定于 Windows 98 或更高版本的功能。
#define _WIN32_WINDOWS 0x0410 // 将它更改为适合 Windows Me 或更高版本的相应值。
#endif

#ifndef _WIN32_IE			// 允许使用特定于 IE 6.0 或更高版本的功能。
#define _WIN32_IE 0x0600	// 将此值更改为相应的值,以适用于 IE 的其他版本。值。
#endif

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS	// 某些 CString 构造函数将是显式的

// 关闭 MFC 对某些常见但经常可放心忽略的警告消息的隐藏
#define _AFX_ALL_WARNINGS

#include <afxwin.h>         // MFC 核心组件和标准组件
#include <afxext.h>         // MFC 扩展


#include <afxdisp.h>        // MFC 自动化类



#ifndef _AFX_NO_OLE_SUPPORT
#include <afxdtctl.h>		// MFC 对 Internet Explorer 4 公共控件的支持
#endif
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h>			// MFC 对 Windows 公共控件的支持
#endif // _AFX_NO_AFXCMN_SUPPORT

////////////////////////////////////////////////////////////////////////
//自己添加上去的
#include <afxsock.h>		// MFC socket extensions
#include <windowsx.h>
#include <afx.h>

#include <afxrich.h>
#include <WindowsX.h>

#include <vector>
#include <string>
#include <list>
#include <map>
#include <set>
#include <algorithm>
#include <deque>
#include <hash_map>
#include <functional>
#include <algorithm>

#include "Engine\Protocol.h"
#include "Engine\DefMir.h"
#include "Engine\Def.h"

#include "Engine\GameAction.h"     //游戏动作
#include "Engine\GameAutoFight.h"  //自动战斗
#include "Engine\GameData.h"       //游戏数据
#include "Engine\GameDStar.h"      //游戏路径      
#include "Engine\GameMap.h"        //游戏地图
#include "Engine\GameSetting.h"    //设置管理
#include "Engine\GameSet.h"        //游戏设置
#include "Engine\ScriptEngine.h"   //脚本引擎
#include "Engine\ScriptInterface.h"//脚本接口
#include "Engine\GameMir.h"        //游戏传奇
#include "Engine\Global.h"

#define WM_ADDLOG		(WM_USER+1)
#define WM_DEBUGOUT		(WM_ADDLOG+1)
#define WM_ADDCHAT		(WM_DEBUGOUT+1)
#define WM_TRAYICON_NOTIFY (WM_USER+1000)

#define RDTSC  _asm _emit 0x0f _asm _emit 0x31
#pragma warning (push)
#pragma warning (disable: 4035)
inline unsigned __int64 timestamp()
{
	__asm RDTSC
}
#pragma warning (pop)

inline bool operator==( const POINT&p1, const POINT&p2 )
{
	return p1.x==p2.x && p1.y==p2.y;
}

inline BYTE GetDirect ( const POINT&start, const POINT&next )
{
	POINT search;
	for(BYTE i=0;i<8;i++)
	{
		search.x=start.x+xofs_walk[i];
		search.y=start.y+yofs_walk[i];
		if( search==next )
		{
			return i;
		}
		search.x+=xofs_walk[i];
		search.y+=yofs_walk[i];
		if( search==next )
		{
			return i | 0x8;
		}
	}
	return 0xf0;
}

inline const char* GetDelphiString( const char* input, int size, char* buffer )
{
	int len=*(input-1);
	len=min(len,size);
	memcpy(buffer,input,len);
	buffer[len]=static_cast<char>(0);
	return buffer;
}
////////////////////////////////////////////////////////////////////////

#ifdef _UNICODE
#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_IA64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#else
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif
#endif


⌨️ 快捷键说明

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