From 7619dffaf1c66199b2b688801a907c9f1685db48 Mon Sep 17 00:00:00 2001 From: Haibo Date: Fri, 25 May 2018 00:33:46 +0800 Subject: [PATCH] =?UTF-8?q?VS2012&VS2013=E9=A1=B9=E7=9B=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/Common/String.cpp | 1 + core/e2dcommon.h | 8 +- core/e2dmacros.h | 41 ++-- core/easy2d.h | 8 +- project/vs2012/Easy2D.vcxproj | 136 ++++++------ project/vs2012/Easy2D.vcxproj.filters | 300 ++++++++++++++------------ project/vs2013/Easy2D.vcxproj | 136 ++++++------ project/vs2013/Easy2D.vcxproj.filters | 260 ++++++++++++---------- 8 files changed, 480 insertions(+), 410 deletions(-) diff --git a/core/Common/String.cpp b/core/Common/String.cpp index 4fcd1df5..a8e59e26 100644 --- a/core/Common/String.cpp +++ b/core/Common/String.cpp @@ -1,6 +1,7 @@ #include "..\e2dcommon.h" #include #include +#include #include #pragma comment(lib, "comsuppw.lib") diff --git a/core/e2dcommon.h b/core/e2dcommon.h index dcaf9a8a..fec59d01 100644 --- a/core/e2dcommon.h +++ b/core/e2dcommon.h @@ -232,12 +232,12 @@ public: String operator+ (const wchar_t *); // 友元运算符 - friend class String operator+ (const char *, const String &); - friend class String operator+ (const wchar_t*, const String &); + friend String operator+ (const char *, const String &); + friend String operator+ (const wchar_t*, const String &); // 类型转换操作符 - explicit operator const wchar_t* () const; - explicit operator wchar_t* () const; + E2D_EXPLICIT operator const wchar_t* () const; + E2D_EXPLICIT operator wchar_t* () const; // 比较运算符 bool operator== (const String &) const; diff --git a/core/e2dmacros.h b/core/e2dmacros.h index 98b9cc7e..7755a0b4 100644 --- a/core/e2dmacros.h +++ b/core/e2dmacros.h @@ -1,28 +1,28 @@ #pragma once #ifndef WINVER -#define WINVER 0x0700 // Allow use of features specific to Windows 7 or later +# define WINVER 0x0700 // Allow use of features specific to Windows 7 or later #endif #ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x0700 // Allow use of features specific to Windows 7 or later +# define _WIN32_WINNT 0x0700 // Allow use of features specific to Windows 7 or later #endif #ifndef NTDDI_VERSION -#define NTDDI_VERSION NTDDI_WIN7 +# define NTDDI_VERSION NTDDI_WIN7 #endif #ifndef UNICODE -#define UNICODE +# define UNICODE #endif // Exclude rarely-used items from Windows headers #ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN #endif #ifndef DIRECTINPUT_VERSION -#define DIRECTINPUT_VERSION 0x0800 +# define DIRECTINPUT_VERSION 0x0800 #endif #define INITGUID @@ -56,25 +56,30 @@ #ifndef HINST_THISCOMPONENT -EXTERN_C IMAGE_DOS_HEADER __ImageBase; -#define HINST_THISCOMPONENT ((HINSTANCE)&__ImageBase) + EXTERN_C IMAGE_DOS_HEADER __ImageBase; +# define HINST_THISCOMPONENT ((HINSTANCE)&__ImageBase) #endif #ifndef WARN -#if defined( DEBUG ) || defined( _DEBUG ) -#define WARN(message, ...) do { fwprintf(stderr, L"Warning: " _CRT_WIDE(#message) L"\n", __VA_ARGS__); } while(0) -#else -#define WARN(message, ...) ((void)0) -#endif +# if defined( DEBUG ) || defined( _DEBUG ) +# define WARN(message, ...) do { fwprintf(stderr, L"Warning: " _CRT_WIDE(#message) L"\n", __VA_ARGS__); } while(0) +# else +# define WARN(message, ...) ((void)0) +# endif #endif #ifndef WARN_IF -#if defined( DEBUG ) || defined( _DEBUG ) - #define WARN_IF(expression, message, ...) do { if (expression) { fwprintf(stderr, L"Warning: " _CRT_WIDE(#message) L"\n", __VA_ARGS__); } } while(0) -#else - #define WARN_IF(expression, message, ...) ((void)0) -#endif +# if defined( DEBUG ) || defined( _DEBUG ) +# define WARN_IF(expression, message, ...) do { if (expression) { fwprintf(stderr, L"Warning: " _CRT_WIDE(#message) L"\n", __VA_ARGS__); } } while(0) +# else +# define WARN_IF(expression, message, ...) ((void)0) +# endif #endif +#if _MSC_VER >= 1800 +# define E2D_EXPLICIT explicit +#else +# define E2D_EXPLICIT +#endif \ No newline at end of file diff --git a/core/easy2d.h b/core/easy2d.h index 3f5497a8..2f088a53 100644 --- a/core/easy2d.h +++ b/core/easy2d.h @@ -9,11 +9,11 @@ #pragma once #ifndef __cplusplus - #error 仅能在 C++ 环境下使用 Easy2D +# error 仅能在 C++ 环境下使用 Easy2D #endif #if _MSC_VER < 1700 - #error Easy2D 不支持 Visual Studio 2012 以下版本 +# error Easy2D 不支持 Visual Studio 2012 以下版本 #endif @@ -30,9 +30,9 @@ #if defined(DEBUG) || defined(_DEBUG) - #pragma comment(lib, "Easy2Ddw.lib") +# pragma comment(lib, "Easy2Ddw.lib") #else - #pragma comment(lib, "Easy2Dw.lib") +# pragma comment(lib, "Easy2Dw.lib") #endif diff --git a/project/vs2012/Easy2D.vcxproj b/project/vs2012/Easy2D.vcxproj index 098fedef..d1459dcd 100644 --- a/project/vs2012/Easy2D.vcxproj +++ b/project/vs2012/Easy2D.vcxproj @@ -18,70 +18,6 @@ x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -96,6 +32,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {722EA245-ADD5-4296-8C85-8FF42C0335D3} Win32Proj diff --git a/project/vs2012/Easy2D.vcxproj.filters b/project/vs2012/Easy2D.vcxproj.filters index ad2f2a8b..233aa586 100644 --- a/project/vs2012/Easy2D.vcxproj.filters +++ b/project/vs2012/Easy2D.vcxproj.filters @@ -32,55 +32,84 @@ {8ef0d8e2-1138-40c0-a1a8-0eb681721f4e} + + + + + + + + + + + + + + Action - - Action - - - Action - - - Action - - - Action - - - Action - - - Action - - - Action - - - Action - - - Action - - - Action - - - Action - - - Action - - + Action Action + + Action + + + Action + + + Action + + + Action + + + Action + + + Action + + + Action + + + Action + + + Action + + + Action + + + Action + + + Action + + + Action + + + Action + + + Action + + + Action + Base + + Base + Base @@ -93,99 +122,27 @@ Base - - Manager - - - Manager - - - Manager - - - Tool - - - Tool - - - Tool - - - Node - - - Node - - - Node - - - Node - - - Node - - - Node - - - Tool - - - Transition - - - Transition - - - Transition - - - Transition - - - Tool - - - Manager - - - Action - - - Node\Shape - - - Node\Shape - - - Node\Shape - - - Node\Shape - - - Node\Shape + + Collider Collider - + Collider - + Collider - + Collider - - Manager - Common + + Common + Common @@ -198,6 +155,9 @@ Common + + Common + Common @@ -207,31 +167,95 @@ Common - - Common - - + Custom - - Action + + Custom - + + Custom + + + Custom + + + Manager + + + Manager + + + Manager + + + Node + + + Node + + + Node + + + Node + + + Node + + + Node + + + Node\Shape + + + Node\Shape + + + Node\Shape + + + Node\Shape + + + Node\Shape + + + Tool + + + Tool + + + Tool + + + Tool + + + Tool + + + Tool + + + Tool + + + Transition + + + Transition + + + Transition + + + Transition + + Transition - - - - - - - - - - - - - - \ No newline at end of file diff --git a/project/vs2013/Easy2D.vcxproj b/project/vs2013/Easy2D.vcxproj index aff6613a..9cc653e0 100644 --- a/project/vs2013/Easy2D.vcxproj +++ b/project/vs2013/Easy2D.vcxproj @@ -162,70 +162,6 @@ true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -240,6 +176,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project/vs2013/Easy2D.vcxproj.filters b/project/vs2013/Easy2D.vcxproj.filters index 51219103..cdfaa8c1 100644 --- a/project/vs2013/Easy2D.vcxproj.filters +++ b/project/vs2013/Easy2D.vcxproj.filters @@ -32,55 +32,84 @@ {7660a3fa-36f9-4b1b-8942-e38e02c0c95b} + + + + + + + + + + + + + + Action - - Action - - - Action - - - Action - - - Action - - - Action - - - Action - - - Action - - - Action - - - Action - - - Action - - - Action - - - Action - - + Action Action + + Action + + + Action + + + Action + + + Action + + + Action + + + Action + + + Action + + + Action + + + Action + + + Action + + + Action + + + Action + + + Action + + + Action + + + Action + + + Action + Base + + Base + Base @@ -93,42 +122,75 @@ Base + + Collider + + + Collider + + + Collider + + + Collider + + + Collider + + + Common + + + Common + + + Common + Common Common + + Common + + + Common + Common + + Common + Common + + Custom + + + Custom + + + Custom + + + Custom + Manager - + Manager Manager - - Tool - - - Tool - - - Tool - Node - - Node - Node @@ -141,97 +203,59 @@ Node - - Common + + Node - - Common - - - Tool - - - Transition - - - Transition - - - Transition - - - Transition - - - Tool - - - Manager - - - Action - - + Node\Shape - + Node\Shape - + Node\Shape - + Node\Shape Node\Shape - - Collider + + Tool - - Collider + + Tool - - Collider + + Tool - - Collider + + Tool - - Manager + + Tool - - Common + + Tool - - Common + + Tool - - Common + + Transition - - Custom + + Transition - - Action + + Transition - + + Transition + + Transition - - - - - - - - - - - - - - \ No newline at end of file