// stdafx.h : ÀÚÁÖ »ç¿ëÇÏÁö¸¸ ÀÚÁÖ º¯°æµÇÁö´Â ¾Ê´Â // Ç¥ÁØ ½Ã½ºÅÛ Æ÷ÇÔ ÆÄÀÏ ¹× ÇÁ·ÎÁ§Æ® °ü·Ã Æ÷ÇÔ ÆÄÀÏÀÌ // µé¾î ÀÖ´Â Æ÷ÇÔ ÆÄÀÏÀÔ´Ï´Ù. #pragma once #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 // MFC ÇÙ½É ¹× Ç¥ÁØ ±¸¼º ¿ä¼ÒÀÔ´Ï´Ù. #include // MFC È®ÀåÀÔ´Ï´Ù. #include // MFC ÀÚµ¿È­ Ŭ·¡½º #include #define DIRECTINPUT_VERSION 0x0800 #ifndef _AFX_NO_OLE_SUPPORT #include // Internet Explorer 4 °ø¿ë ÄÁÆ®·Ñ¿¡ ´ëÇÑ MFC Áö¿øÀÔ´Ï´Ù. #endif #ifndef _AFX_NO_AFXCMN_SUPPORT #include // Windows °ø¿ë ÄÁÆ®·Ñ¿¡ ´ëÇÑ MFC Áö¿øÀÔ´Ï´Ù. #endif // _AFX_NO_AFXCMN_SUPPORT #pragma warning( push, 3 ) #include #include #include #include /// Animation #include #include #include #include #include #include #include #include #include /// Shader #include #include #include #include #include #include #include #pragma warning (pop) NiSmartPointer(NiFont); NiSmartPointer(NiOldString2D); #include #include // MFC Multi-threading support #include // Undocumented MFC #include #include "BasicString.h" #include "Algorithm.h" #include "Hasher.h" #include "Functor.h" #include "PriorityQueue.h" #include "Pool.h" #include "Array.h" #include "PointerList.h" #include "List.h" #include "Set.h" #include "Map.h" #include "HashSet.h" #include "HashMap.h" #include "PointerHashMap.h" #include "Lexer.h" #include "Parser.h" #include "Allocator.h" #include "DefragmentArray.h" #include "PointerArray.h" #include "PointerHashSet.h" #include "Console.h" #include "File.h" #include "./util/FileLoader.h" #include "FileSaver.h" #include "./util/Tokenizer.h" #include "TargaImage.h" #define STRSAFE_NO_DEPRECATE #define STRSAFE_LIB #include /// defines #define SAFE_DELETE(x) if(x) { delete x; x = NULL; } #define SAFE_DELETE_ARRAY(x) if(x) { delete[] x; x = NULL; } #define SAFE_RELEASE(x) if(x) { x->Release(); x = NULL; } #define SAFE_NIDELETE(x) if(x) { NiDelete x; x = NULL; } #define SAFE_EXIT_DELETE(x) if(x) { x->Exit(); delete x; x = NULL; } inline long FloatToInt( float value ) { int i = (int)value; return ( value - i >= 0.999f ) ? ++i : i; } const int SECOND = 1000; const int MINUTE = 60 * SECOND; const int HOUR = 60 * MINUTE; const int DAY = 24 * HOUR; #define S_PI (3.14159265358979323846f) #define S_ToRadian( degree ) ((degree) * (S_PI / 180.0f)) int ConvertToAscii( const wchar_t* uniStr, char* str, unsigned int bufferSize ); int ConvertToUnicode( const char* str, wchar_t* uniStr, unsigned int buffersize ); #define MAXSTRINGLEN(s) ((sizeof(s)/sizeof(s[0]))-1) void Sstrncpy( LPTSTR pDest, unsigned int destMaxLen, LPCTSTR pSrc, unsigned int count ); void Sstrncat( LPTSTR pDest, unsigned int destMaxLen, LPCTSTR pSrc, unsigned int count ); // #ifdef _DEVSYS #undef assert #define assert(exp) {if(!(exp)) __asm{int 0x03}} #endif /// ºñÇ¥ÁØ È®ÀåÀ» »ç¿ëÇß½À´Ï´Ù : ±¸Á¶Ã¼/°ø¿ë ±¸Á¶Ã¼ÀÇ À̸§ÀÌ ¾ø½À´Ï´Ù. #pragma warning( disable: 4201 ) // º¹»ç »ý¼ºÀÚ¸¦ »ý¼ºÇÏÁö ¸øÇß½À´Ï´Ù. #pragma warning( disable: 4511 ) // ÄÄÆÄÀÏ·¯¿¡¼­ ÁÖ¾îÁø Ŭ·¡½º¿¡ ´ëÇÑ ´ëÀÔ ¿¬»êÀÚ¸¦ »ý¼ºÇÒ ¼ö ¾ø½À´Ï´Ù. #pragma warning( disable: 4512 ) // Á¶°Ç½ÄÀÌ »ó¼öÀÔ´Ï´Ù. #pragma warning( disable: 4127 ) // ÂüÁ¶µÇÁö ¾ÊÀº Çü½Ä ¸Å°³ º¯¼öÀÔ´Ï´Ù. #pragma warning( disable: 4100 ) void GameErrorLog( char* format, ... ); #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