Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

WINTERMUTE: Remove a few of the __WIN32__ macros.

  • Loading branch information...
commit b3b87770917856c3312ba4036aa863ba94e78879 1 parent 7b3ec47
@somaen authored
View
23 engines/wintermute/BFileManager.cpp
@@ -50,30 +50,7 @@
#include "common/system.h"
#include "common/fs.h"
#include "common/file.h"
-/*
-#ifdef __WIN32__
-# include <direct.h>
-#else
-# include <unistd.h>
-#endif
-*/
-/*#ifdef __APPLE__
-# include <CoreFoundation/CoreFoundation.h>
-#endif*/
-
-/*
-#if _DEBUG
-#pragma comment(lib, "zlib_d.lib")
-#else
-#pragma comment(lib, "zlib.lib")
-#endif
-
-extern "C"
-{
-#include "zlib.h"
-}
-*/
namespace WinterMute {
//////////////////////////////////////////////////////////////////////
View
13 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
View
34 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
}
View
7 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");
View
4 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
Please sign in to comment.
Something went wrong with that request. Please try again.