aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-07-17 23:16:04 +0200
committerEinar Johan Trøan Sømåen2012-07-17 23:20:51 +0200
commit642714dc192d9fddd02dd8fa7790a153f6fd1247 (patch)
tree8806fa407fe9882b58c9bfc54090b740092ffa27
parent10c4aa8cecd5fed3acc15cf6c8e7762a6722afc6 (diff)
downloadscummvm-rg350-642714dc192d9fddd02dd8fa7790a153f6fd1247.tar.gz
scummvm-rg350-642714dc192d9fddd02dd8fa7790a153f6fd1247.tar.bz2
scummvm-rg350-642714dc192d9fddd02dd8fa7790a153f6fd1247.zip
WINTERMUTE: Remove/comment out all ifdef __IPHONE occurences
-rw-r--r--engines/wintermute/Base/BFileManager.cpp27
-rw-r--r--engines/wintermute/Base/BGame.cpp46
-rw-r--r--engines/wintermute/Base/BRenderSDL.cpp10
-rw-r--r--engines/wintermute/PlatformSDL.cpp6
-rw-r--r--engines/wintermute/wintermute.cpp4
5 files changed, 15 insertions, 78 deletions
diff --git a/engines/wintermute/Base/BFileManager.cpp b/engines/wintermute/Base/BFileManager.cpp
index a143231abc..61017a9850 100644
--- a/engines/wintermute/Base/BFileManager.cpp
+++ b/engines/wintermute/Base/BFileManager.cpp
@@ -300,33 +300,6 @@ ERRORCODE CBFileManager::initPaths() {
// package files paths
addPath(PATH_PACKAGE, "./");
- /*#ifdef __APPLE__
- // search .app path and Resources dir in the bundle
- CFURLRef appUrlRef = CFBundleCopyBundleURL(CFBundleGetMainBundle());
- CFStringRef macPath = CFURLCopyFileSystemPath(appUrlRef, kCFURLPOSIXPathStyle);
- const char *pathPtr = CFStringGetCStringPtr(macPath, CFStringGetSystemEncoding());
-
- #ifdef __IPHONE__
- AddPath(PATH_PACKAGE, pathPtr);
- AddPath(PATH_SINGLE, pathPtr);
- #else
- char bundlePath[MAX_PATH_LENGTH];
-
- sprintf(bundlePath, "%s/../", pathPtr);
- AddPath(PATH_PACKAGE, bundlePath);
- AddPath(PATH_SINGLE, bundlePath);
-
- sprintf(bundlePath, "%s/Contents/Resources/", pathPtr);
- AddPath(PATH_PACKAGE, bundlePath);
- AddPath(PATH_SINGLE, bundlePath);
-
-
- CFRelease(appUrlRef);
- CFRelease(macPath);
- #endif
- #endif*/
-
-
pathList = Game->_registry->readString("Resource", "PackagePaths", "");
numPaths = CBUtils::strNumEntries(pathList.c_str(), ';');
diff --git a/engines/wintermute/Base/BGame.cpp b/engines/wintermute/Base/BGame.cpp
index 4ff0980e84..c262c6de91 100644
--- a/engines/wintermute/Base/BGame.cpp
+++ b/engines/wintermute/Base/BGame.cpp
@@ -68,10 +68,6 @@
#include "common/system.h"
#include "common/file.h"
-#ifdef __IPHONEOS__
-# include "ios_utils.h"
-#endif
-
namespace WinterMute {
//////////////////////////////////////////////////////////////////////
@@ -262,13 +258,13 @@ CBGame::CBGame(): CBObject(this) {
_autoSaveSlot = 999;
_cursorHidden = false;
-#ifdef __IPHONEOS__
+/*#ifdef __IPHONEOS__
_touchInterface = true;
_constrainedMemory = true; // TODO differentiate old and new iOS devices
-#else
+#else*/
_touchInterface = false;
_constrainedMemory = false;
-#endif
+//#endif
}
@@ -512,19 +508,6 @@ ERRORCODE CBGame::initialize3() { // renderer is initialized
void CBGame::DEBUG_DebugEnable(const char *filename) {
_dEBUG_DebugMode = true;
-#ifndef __IPHONEOS__
- //if (filename)_dEBUG_LogFile = fopen(filename, "a+");
- //else _dEBUG_LogFile = fopen("./zz_debug.log", "a+");
-
- if (!_dEBUG_LogFile) {
- AnsiString safeLogFileName = PathUtil::getSafeLogFileName();
- //_dEBUG_LogFile = fopen(safeLogFileName.c_str(), "a+");
- }
-
- //if (_dEBUG_LogFile != NULL) fprintf((FILE *)_dEBUG_LogFile, "\n");
- warning("BGame::DEBUG_DebugEnable - No logfile is currently created"); //TODO: Use a dumpfile?
-#endif
-
/* time_t timeNow;
time(&timeNow);
struct tm *tm = localtime(&timeNow);
@@ -2139,9 +2122,9 @@ ERRORCODE CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ShowStatusLine") == 0) {
stack->correctParams(0);
-#ifdef __IPHONEOS__
+/*#ifdef __IPHONEOS__
IOS_ShowStatusLine(TRUE);
-#endif
+#endif*/
stack->pushNULL();
return STATUS_OK;
@@ -2152,9 +2135,9 @@ ERRORCODE CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "HideStatusLine") == 0) {
stack->correctParams(0);
-#ifdef __IPHONEOS__
+/*#ifdef __IPHONEOS__
IOS_ShowStatusLine(FALSE);
-#endif
+#endif*/
stack->pushNULL();
return STATUS_OK;
@@ -3839,12 +3822,8 @@ ERRORCODE CBGame::getSaveSlotFilename(int slot, char *buffer) {
//////////////////////////////////////////////////////////////////////////
AnsiString CBGame::getDataDir() {
AnsiString userDir = PathUtil::getUserDirectory();
-#ifdef __IPHONEOS__
- return userDir;
-#else
AnsiString baseDir = _registry->getBasePath();
return PathUtil::combine(userDir, baseDir);
-#endif
}
@@ -4453,11 +4432,6 @@ bool CBGame::isDoubleClick(int buttonIndex) {
int maxMoveX = 4;
int maxMoveY = 4;
-#if __IPHONEOS__
- maxMoveX = 16;
- maxMoveY = 16;
-#endif
-
Point32 pos;
CBPlatform::getCursorPos(&pos);
@@ -4494,13 +4468,7 @@ void CBGame::addMem(int bytes) {
//////////////////////////////////////////////////////////////////////////
AnsiString CBGame::getDeviceType() const {
-#ifdef __IPHONEOS__
- char devType[128];
- IOS_GetDeviceType(devType);
- return AnsiString(devType);
-#else
return "computer";
-#endif
}
} // end of namespace WinterMute
diff --git a/engines/wintermute/Base/BRenderSDL.cpp b/engines/wintermute/Base/BRenderSDL.cpp
index f539b06668..8898c97328 100644
--- a/engines/wintermute/Base/BRenderSDL.cpp
+++ b/engines/wintermute/Base/BRenderSDL.cpp
@@ -138,7 +138,7 @@ ERRORCODE CBRenderSDL::initRenderer(int width, int height, bool windowed) {
// find suitable resolution
-#ifdef __IPHONEOS__
+/*#ifdef __IPHONEOS__
_realWidth = 480;
_realHeight = 320;
@@ -153,10 +153,10 @@ ERRORCODE CBRenderSDL::initRenderer(int width, int height, bool windowed) {
break;
}
}
-#else
+#else*/
_realWidth = Game->_registry->readInt("Debug", "ForceResWidth", _width);
_realHeight = Game->_registry->readInt("Debug", "ForceResHeight", _height);
-#endif
+//#endif
/*
_realWidth = 480;
@@ -191,7 +191,7 @@ ERRORCODE CBRenderSDL::initRenderer(int width, int height, bool windowed) {
Uint32 flags = SDL_WINDOW_SHOWN;
#endif
#ifdef __IPHONEOS__
- flags |= SDL_WINDOW_OPENGL | SDL_WINDOW_BORDERLESS;
+ //flags |= SDL_WINDOW_OPENGL | SDL_WINDOW_BORDERLESS;
#endif
//_windowed = Game->_registry->readBool("Video", "Windowed", true);
@@ -220,7 +220,7 @@ ERRORCODE CBRenderSDL::initRenderer(int width, int height, bool windowed) {
#ifdef __IPHONEOS__
// SDL defaults to OGL ES2, which doesn't work on old devices
- SDL_SetHint(SDL_HINT_RENDER_DRIVER, "opengles");
+ //SDL_SetHint(SDL_HINT_RENDER_DRIVER, "opengles");
#else
//SDL_SetHint(SDL_HINT_RENDER_DRIVER, "opengl");
#endif
diff --git a/engines/wintermute/PlatformSDL.cpp b/engines/wintermute/PlatformSDL.cpp
index 9edd8f2152..0bf3f95e9e 100644
--- a/engines/wintermute/PlatformSDL.cpp
+++ b/engines/wintermute/PlatformSDL.cpp
@@ -133,14 +133,14 @@ void CBPlatform::handleEvent(Common::Event *event) {
*/
case Common::EVENT_QUIT:
case Common::EVENT_RTL:
-#ifdef __IPHONEOS__
+/*#ifdef __IPHONEOS__
if (Game) {
Game->AutoSaveOnExit();
Game->_quitting = true;
}
-#else
+#else*/
if (Game) Game->onWindowClose();
-#endif
+//#endif
break;
default:
diff --git a/engines/wintermute/wintermute.cpp b/engines/wintermute/wintermute.cpp
index 9d1f5f731d..3f8472e6d6 100644
--- a/engines/wintermute/wintermute.cpp
+++ b/engines/wintermute/wintermute.cpp
@@ -219,10 +219,6 @@ int WinterMuteEngine::init() {
_game->initialize3();
-#ifdef __IPHONEOS__
- SDL_AddEventWatch(CBPlatform::SDLEventWatcher, NULL);
-#endif
-
// initialize sound manager (non-fatal if we fail)
ret = _game->_soundMgr->initialize();
if (DID_FAIL(ret)) {