From c9058b544843553f1f5455c2595b6663e88f246f Mon Sep 17 00:00:00 2001 From: Einar Johan Trøan Sømåen Date: Fri, 11 May 2012 18:01:07 +0200 Subject: WINTERMUTE: Remove a few of the __WIN32__ macros. --- engines/wintermute/BFileManager.cpp | 23 ------------------- engines/wintermute/BGame.cpp | 13 +---------- engines/wintermute/PlatformSDL.cpp | 34 +++-------------------------- engines/wintermute/scriptables/ScEngine.cpp | 7 +++--- engines/wintermute/wintypes.h | 4 ++-- 5 files changed, 10 insertions(+), 71 deletions(-) diff --git a/engines/wintermute/BFileManager.cpp b/engines/wintermute/BFileManager.cpp index f3290afdca..71b03a5bb9 100644 --- a/engines/wintermute/BFileManager.cpp +++ b/engines/wintermute/BFileManager.cpp @@ -50,30 +50,7 @@ #include "common/system.h" #include "common/fs.h" #include "common/file.h" -/* -#ifdef __WIN32__ -# include -#else -# include -#endif -*/ -/*#ifdef __APPLE__ -# include -#endif*/ - -/* -#if _DEBUG -#pragma comment(lib, "zlib_d.lib") -#else -#pragma comment(lib, "zlib.lib") -#endif - -extern "C" -{ -#include "zlib.h" -} -*/ namespace WinterMute { ////////////////////////////////////////////////////////////////////// diff --git a/engines/wintermute/BGame.cpp b/engines/wintermute/BGame.cpp index e3ec86aafc..fd3d8908cc 100644 --- a/engines/wintermute/BGame.cpp +++ b/engines/wintermute/BGame.cpp @@ -1796,15 +1796,8 @@ HRESULT CBGame::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS // OpenDocument ////////////////////////////////////////////////////////////////////////// else if (strcmp(Name, "OpenDocument") == 0) { -#ifdef __WIN32__ - Stack->CorrectParams(1); - if (!_renderer->_windowed) CBPlatform::ShowWindow(_renderer->_window, SW_MINIMIZE); - HINSTANCE i = CBPlatform::ShellExecute(_renderer->_window, "open", Stack->Pop()->GetString(), NULL, NULL, SW_MAXIMIZE); - Stack->PushBool((int)i > 32); -#else Stack->CorrectParams(0); Stack->PushNULL(); -#endif return S_OK; } @@ -4421,11 +4414,7 @@ bool CBGame::IsDoubleClick(int buttonIndex) { int maxMoveX = 4; int maxMoveY = 4; -#if __WIN32__ - maxDoubleCLickTime = GetDoubleClickTime(); - maxMoveX = GetSystemMetrics(SM_CXDOUBLECLK); - maxMoveY = GetSystemMetrics(SM_CYDOUBLECLK); -#elif __IPHONEOS__ +#if __IPHONEOS__ maxMoveX = 16; maxMoveY = 16; #endif diff --git a/engines/wintermute/PlatformSDL.cpp b/engines/wintermute/PlatformSDL.cpp index fab72e29da..0fc8c1628a 100644 --- a/engines/wintermute/PlatformSDL.cpp +++ b/engines/wintermute/PlatformSDL.cpp @@ -103,9 +103,7 @@ int CBPlatform::Initialize(CBGame *inGame, int argc, char *argv[]) { delete Game; Game = NULL; -#ifdef __WIN32__ - ::MessageBox(NULL, "Some of the essential files are missing. Please reinstall.", NULL, MB_OK | MB_ICONERROR); -#endif + warning("Some of the essential files are missing. Please reinstall."); return 2; } @@ -325,18 +323,16 @@ int CBPlatform::SDLEventWatcher(void *userdata, Common::Event *event) { // Win32 API bindings ////////////////////////////////////////////////////////////////////////// HINSTANCE CBPlatform::ShellExecute(HWND hwnd, LPCSTR lpOperation, LPCSTR lpFile, LPCSTR lpParameters, LPCSTR lpDirectory, INT nShowCmd) { -#ifdef __WIN32__ - return ::ShellExecute(hwnd, lpOperation, lpFile, lpParameters, lpDirectory, nShowCmd); -#else return NULL; -#endif } ////////////////////////////////////////////////////////////////////////// void CBPlatform::OutputDebugString(LPCSTR lpOutputString) { +/* #ifdef __WIN32__ ::OutputDebugString(lpOutputString); #endif +*/ } @@ -373,11 +369,7 @@ BOOL CBPlatform::SetCursorPos(int X, int Y) { ////////////////////////////////////////////////////////////////////////// BOOL CBPlatform::ShowWindow(HWND hWnd, int nCmdShow) { -#ifdef __WIN32__ - return ::ShowWindow(hWnd, nCmdShow); -#else return FALSE; -#endif } ////////////////////////////////////////////////////////////////////////// @@ -400,29 +392,17 @@ bool CBPlatform::CopyFile(const char *from, const char *to, bool failIfExists) { ////////////////////////////////////////////////////////////////////////// HWND CBPlatform::SetCapture(HWND hWnd) { -#ifdef __WIN32__ - return ::SetCapture(hWnd); -#else return NULL; -#endif } ////////////////////////////////////////////////////////////////////////// BOOL CBPlatform::ReleaseCapture() { -#ifdef __WIN32__ - return ::ReleaseCapture(); -#else return FALSE; -#endif } ////////////////////////////////////////////////////////////////////////// BOOL CBPlatform::SetForegroundWindow(HWND hWnd) { -#ifdef __WIN32__ - return ::SetForegroundWindow(hWnd); -#else return FALSE; -#endif } ////////////////////////////////////////////////////////////////////////// @@ -539,20 +519,12 @@ AnsiString CBPlatform::GetPlatformName() { ////////////////////////////////////////////////////////////////////////// int scumm_stricmp(const char *str1, const char *str2) { -#ifdef __WIN32__ - return ::stricmp(str1, str2); -#else return ::strcasecmp(str1, str2); -#endif } ////////////////////////////////////////////////////////////////////////// int scumm_strnicmp(const char *str1, const char *str2, size_t maxCount) { -#ifdef __WIN32__ - return ::strnicmp(str1, str2, maxCount); -#else return ::strncasecmp(str1, str2, maxCount); -#endif } diff --git a/engines/wintermute/scriptables/ScEngine.cpp b/engines/wintermute/scriptables/ScEngine.cpp index 9c690b1c1f..4edb1c771b 100644 --- a/engines/wintermute/scriptables/ScEngine.cpp +++ b/engines/wintermute/scriptables/ScEngine.cpp @@ -49,7 +49,7 @@ IMPLEMENT_PERSISTENT(CScEngine, true) CScEngine::CScEngine(CBGame *inGame): CBBase(inGame) { Game->LOG(0, "Initializing scripting engine..."); - +/* #ifdef __WIN32__ char CompilerPath[MAX_PATH]; strcpy(CompilerPath, COMPILER_DLL); @@ -88,14 +88,15 @@ CScEngine::CScEngine(CBGame *inGame): CBBase(inGame) { c.Dll_LoadFile = LoadFile; ExtSetCallbacks(&c, Game); */ - +/* _compilerAvailable = true; } } else _compilerAvailable = false; #else +*/ _compilerAvailable = false; _compilerDLL = NULL; -#endif +//#endif if (_compilerAvailable) Game->LOG(0, " Script compiler bound successfuly"); diff --git a/engines/wintermute/wintypes.h b/engines/wintermute/wintypes.h index 3aed2a0ede..4f826e9337 100644 --- a/engines/wintermute/wintypes.h +++ b/engines/wintermute/wintypes.h @@ -56,7 +56,7 @@ typedef int BOOL; #define D3DCOLGetG(rgb) ((byte )(((WORD)(rgb)) >> 8)) #define D3DCOLGetR(rgb) ((byte )((rgb)>>16)) #define D3DCOLGetA(rgb) ((byte )((rgb)>>24)) - +/* #ifndef MAX #define MAX(a,b) (((a) > (b)) ? (a) : (b)) #endif @@ -64,7 +64,7 @@ typedef int BOOL; #ifndef MIN #define MIN(a,b) (((a) < (b)) ? (a) : (b)) #endif - +*/ #define CONST const #define MAX_PATH 512 -- cgit v1.2.3