aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/base
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-07-29 17:53:44 +0200
committerEinar Johan Trøan Sømåen2012-07-29 17:53:44 +0200
commit2e7d21fc525a5b0451274d3844e3d6a1de1f6cb2 (patch)
tree9017aeb5500acbd1c6cee7c54779e79cfc7b6e1a /engines/wintermute/base
parentaa3467ddaa4b1df72398a1545c9d8b1c89dad6ad (diff)
downloadscummvm-rg350-2e7d21fc525a5b0451274d3844e3d6a1de1f6cb2.tar.gz
scummvm-rg350-2e7d21fc525a5b0451274d3844e3d6a1de1f6cb2.tar.bz2
scummvm-rg350-2e7d21fc525a5b0451274d3844e3d6a1de1f6cb2.zip
WINTERMUTE: Replace BaseRegistry with ConfMan
Diffstat (limited to 'engines/wintermute/base')
-rw-r--r--engines/wintermute/base/base_engine.cpp5
-rw-r--r--engines/wintermute/base/base_engine.h2
-rw-r--r--engines/wintermute/base/base_file_manager.cpp33
-rw-r--r--engines/wintermute/base/base_game.cpp43
-rw-r--r--engines/wintermute/base/base_registry.cpp279
-rw-r--r--engines/wintermute/base/base_registry.h79
-rw-r--r--engines/wintermute/base/gfx/osystem/base_render_osystem.cpp6
-rw-r--r--engines/wintermute/base/scriptables/script_engine.cpp1
-rw-r--r--engines/wintermute/base/sound/base_sound_manager.cpp1
9 files changed, 32 insertions, 417 deletions
diff --git a/engines/wintermute/base/base_engine.cpp b/engines/wintermute/base/base_engine.cpp
index 0185d973fa..8e3e6cf0e0 100644
--- a/engines/wintermute/base/base_engine.cpp
+++ b/engines/wintermute/base/base_engine.cpp
@@ -28,7 +28,6 @@
#include "engines/wintermute/base/base_file_manager.h"
#include "engines/wintermute/base/base_game.h"
-#include "engines/wintermute/base/base_registry.h"
#include "engines/wintermute/base/base_engine.h"
#include "engines/wintermute/wintermute.h"
#include "common/system.h"
@@ -40,20 +39,16 @@ namespace WinterMute {
BaseEngine::BaseEngine() {
_fileManager = NULL;
- _registry = NULL;
_gameRef = NULL;
_gameId = "";
}
void BaseEngine::init() {
- _registry = new BaseRegistry();
- // File-manager depends on registry.
_fileManager = new BaseFileManager();
}
BaseEngine::~BaseEngine() {
delete _fileManager;
- delete _registry;
}
void BaseEngine::createInstance(const Common::String &gameid) {
diff --git a/engines/wintermute/base/base_engine.h b/engines/wintermute/base/base_engine.h
index d45d979f25..30f241ecc6 100644
--- a/engines/wintermute/base/base_engine.h
+++ b/engines/wintermute/base/base_engine.h
@@ -37,7 +37,6 @@ class BaseGame;
class BaseEngine : public Common::Singleton<WinterMute::BaseEngine> {
void init();
BaseFileManager *_fileManager;
- BaseRegistry *_registry;
Common::String _gameId;
BaseGame *_gameRef;
public:
@@ -48,7 +47,6 @@ public:
BaseGame *getGameRef() { return _gameRef; }
BaseFileManager *getFileManager() { return _fileManager; }
- BaseRegistry *getRegistry() { return _registry; }
static void LOG(bool res, const char *fmt, ...);
const char *getGameId() { return _gameId.c_str(); }
};
diff --git a/engines/wintermute/base/base_file_manager.cpp b/engines/wintermute/base/base_file_manager.cpp
index 801729c5e8..d5071ccf48 100644
--- a/engines/wintermute/base/base_file_manager.cpp
+++ b/engines/wintermute/base/base_file_manager.cpp
@@ -32,7 +32,6 @@
#include "engines/wintermute/base/file/base_save_thumb_file.h"
#include "engines/wintermute/base/file/base_package.h"
#include "engines/wintermute/base/file/base_resources.h"
-#include "engines/wintermute/base/base_registry.h"
#include "engines/wintermute/base/base_engine.h"
#include "engines/wintermute/wintermute.h"
#include "common/debug.h"
@@ -147,42 +146,12 @@ bool BaseFileManager::reloadPaths() {
//////////////////////////////////////////////////////////////////////////
bool BaseFileManager::initPaths() {
- if (!BaseEngine::instance().getRegistry()) { // This function only works when the game-registry is loaded
- return STATUS_FAILED;
- }
-
- AnsiString pathList;
-
- // single files paths
- pathList = BaseEngine::instance().getRegistry()->readString("Resource", "CustomPaths", "");
- Common::StringTokenizer *entries = new Common::StringTokenizer(pathList, ";");
-// numPaths = BaseUtils::strNumEntries(pathList.c_str(), ';');
- while (!entries->empty()) {
- Common::String path = entries->nextToken();
- if (path.size() > 0) {
- error("BaseFileManager::initPaths - Game wants to add customPath: %s", path.c_str()); // TODO
- // addPath(PATH_SINGLE, path);
- }
- }
- delete entries;
- entries = NULL;
+ // Removed: Config-based file-path choice.
// package files paths
const Common::FSNode gameData(ConfMan.get("path"));
addPath(PATH_PACKAGE, gameData);
- pathList = BaseEngine::instance().getRegistry()->readString("Resource", "PackagePaths", "");
- entries = new Common::StringTokenizer(pathList, ";");
- while (!entries->empty()) {
- Common::String path = entries->nextToken();
- if (path.size() > 0) {
- error("BaseFileManager::initPaths - Game wants to add packagePath: %s", path.c_str()); // TODO
- // addPath(PATH_SINGLE, path);
- }
- }
- delete entries;
- entries = NULL;
-
Common::FSNode dataSubFolder = gameData.getChild("data");
if (dataSubFolder.exists()) {
addPath(PATH_PACKAGE, dataSubFolder);
diff --git a/engines/wintermute/base/base_game.cpp b/engines/wintermute/base/base_game.cpp
index 062f92ccae..0453222e24 100644
--- a/engines/wintermute/base/base_game.cpp
+++ b/engines/wintermute/base/base_game.cpp
@@ -39,7 +39,6 @@
#include "engines/wintermute/base/base_keyboard_state.h"
#include "engines/wintermute/base/base_parser.h"
#include "engines/wintermute/base/base_quick_msg.h"
-#include "engines/wintermute/base/base_registry.h"
#include "engines/wintermute/base/sound/base_sound.h"
#include "engines/wintermute/base/sound/base_sound_manager.h"
#include "engines/wintermute/base/base_sprite.h"
@@ -64,6 +63,7 @@
#include "engines/wintermute/utils/utils.h"
#include "engines/wintermute/wintermute.h"
#include "engines/wintermute/platform_osystem.h"
+#include "common/config-manager.h"
#include "common/savefile.h"
#include "common/textconsole.h"
#include "common/util.h"
@@ -276,7 +276,7 @@ BaseGame::~BaseGame() {
LOG(0, "");
LOG(0, "Shutting down...");
- BaseEngine::instance().getRegistry()->writeBool("System", "LastRun", true);
+ ConfMan.setBool("last_run", true);
cleanup();
@@ -1534,7 +1534,8 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
stack->correctParams(2);
const char *key = stack->pop()->getString();
int val = stack->pop()->getInt();
- BaseEngine::instance().getRegistry()->writeInt("PrivateSettings", key, val);
+ Common::String privKey = "priv_" + StringUtil::encodeSetting(key);
+ ConfMan.setInt(privKey, val);
stack->pushNULL();
return STATUS_OK;
}
@@ -1546,7 +1547,12 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
stack->correctParams(2);
const char *key = stack->pop()->getString();
int initVal = stack->pop()->getInt();
- stack->pushInt(BaseEngine::instance().getRegistry()->readInt("PrivateSettings", key, initVal));
+ Common::String privKey = "priv_" + StringUtil::encodeSetting(key);
+ int result = initVal;
+ if (ConfMan.hasKey(privKey)) {
+ result = ConfMan.getInt(privKey);
+ }
+ stack->pushInt(result);
return STATUS_OK;
}
@@ -1557,7 +1563,9 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
stack->correctParams(2);
const char *key = stack->pop()->getString();
const char *val = stack->pop()->getString();
- BaseEngine::instance().getRegistry()->writeString("PrivateSettings", key, val);
+ Common::String privKey = "priv_" + StringUtil::encodeSetting(key);
+ Common::String privVal = StringUtil::encodeSetting(val);
+ ConfMan.set(privKey, privVal);
stack->pushNULL();
return STATUS_OK;
}
@@ -1569,8 +1577,12 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
stack->correctParams(2);
const char *key = stack->pop()->getString();
const char *initVal = stack->pop()->getString();
- AnsiString val = BaseEngine::instance().getRegistry()->readString("PrivateSettings", key, initVal);
- stack->pushString(val.c_str());
+ Common::String privKey = "priv_" + StringUtil::encodeSetting(key);
+ Common::String result = initVal;
+ if (ConfMan.hasKey(privKey)) {
+ result = StringUtil::decodeSetting(ConfMan.get(key));
+ }
+ stack->pushString(result.c_str());
return STATUS_OK;
}
@@ -2627,7 +2639,11 @@ ScValue *BaseGame::scGetProperty(const char *name) {
// MostRecentSaveSlot (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MostRecentSaveSlot") == 0) {
- _scValue->setInt(BaseEngine::instance().getRegistry()->readInt("System", "MostRecentSaveSlot", -1));
+ if (!ConfMan.hasKey("most_recent_saveslot")) {
+ _scValue->setInt(-1);
+ } else {
+ _scValue->setInt(ConfMan.getInt("most_recent_saveslot"));
+ }
return _scValue;
}
@@ -3329,7 +3345,7 @@ bool BaseGame::saveGame(int slot, const char *desc, bool quickSave) {
if (DID_SUCCEED(ret = SystemClassRegistry::getInstance()->saveTable(_gameRef, pm, quickSave))) {
if (DID_SUCCEED(ret = SystemClassRegistry::getInstance()->saveInstances(_gameRef, pm, quickSave))) {
if (DID_SUCCEED(ret = pm->saveFile(filename))) {
- BaseEngine::instance().getRegistry()->writeInt("System", "MostRecentSaveSlot", slot);
+ ConfMan.setInt("most_recent_saveslot", slot);
}
}
}
@@ -3663,7 +3679,7 @@ bool BaseGame::loadSettings(const char *filename) {
break;
case TOKEN_REGISTRY_PATH:
- BaseEngine::instance().getRegistry()->setBasePath((char *)params);
+ //BaseEngine::instance().getRegistry()->setBasePath((char *)params);
break;
case TOKEN_RICH_SAVED_GAMES:
@@ -3687,9 +3703,8 @@ bool BaseGame::loadSettings(const char *filename) {
ret = STATUS_FAILED;
}
- _settingsAllowWindowed = BaseEngine::instance().getRegistry()->readBool("Debug", "AllowWindowed", _settingsAllowWindowed);
- _compressedSavegames = BaseEngine::instance().getRegistry()->readBool("Debug", "CompressedSavegames", _compressedSavegames);
- //_compressedSavegames = false;
+ _settingsAllowWindowed = true; // TODO: These two settings should probably be cleaned out altogether.
+ _compressedSavegames = true;
delete[] origBuffer;
@@ -4679,7 +4694,7 @@ bool BaseGame::isDoubleClick(int buttonIndex) {
//////////////////////////////////////////////////////////////////////////
void BaseGame::autoSaveOnExit() {
_soundMgr->saveSettings();
- BaseEngine::instance().getRegistry()->saveValues();
+ ConfMan.flushToDisk();
if (!_autoSaveOnExit) {
return;
diff --git a/engines/wintermute/base/base_registry.cpp b/engines/wintermute/base/base_registry.cpp
deleted file mode 100644
index d03691ea42..0000000000
--- a/engines/wintermute/base/base_registry.cpp
+++ /dev/null
@@ -1,279 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-/*
- * This file is based on WME Lite.
- * http://dead-code.org/redir.php?target=wmelite
- * Copyright (c) 2011 Jan Nedoma
- */
-
-#include "engines/wintermute/tinyxml/tinyxml.h"
-#include "engines/wintermute/base/base_engine.h"
-#include "engines/wintermute/base/base_registry.h"
-#include "engines/wintermute/utils/path_util.h"
-#include "engines/wintermute/utils/string_util.h"
-#include "engines/wintermute/utils/utils.h"
-#include "engines/wintermute/wintermute.h"
-#include "common/savefile.h"
-#include "common/config-manager.h"
-#include "common/file.h"
-
-namespace WinterMute {
-
-//////////////////////////////////////////////////////////////////////////
-BaseRegistry::BaseRegistry() {
- _iniName = NULL;
-
- setIniName("./wme.ini");
- loadValues(true);
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-BaseRegistry::~BaseRegistry() {
- saveValues();
- delete[] _iniName;
- _iniName = NULL;
-}
-
-
-
-//////////////////////////////////////////////////////////////////////////
-AnsiString BaseRegistry::readString(const AnsiString &subKey, const AnsiString &key, const AnsiString &init) {
- AnsiString ret = "";
-
- bool found = false;
- ret = getValue(_localValues, subKey, key, found);
- if (!found) {
- ret = getValue(_values, subKey, key, found);
- }
- if (!found) {
- ret = init;
- }
-
- return ret;
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-bool BaseRegistry::writeString(const AnsiString &subKey, const AnsiString &key, const AnsiString &value) {
- _values[subKey][key] = value;
- return true;
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-int BaseRegistry::readInt(const AnsiString &subKey, const AnsiString &key, int init) {
- if (subKey == "Audio") {
- if (key == "MasterVolume") {
- if (ConfMan.hasKey("master_volume")) {
- return ConfMan.getInt("master_volume");
- } else {
- return init;
- }
- } else if (key == "SFXVolume") {
- if (ConfMan.hasKey("sfx_volume")) {
- error("This key shouldn't be read by the scripts");
- } else {
- return init;
- }
- } else if (key == "SpeechVolume") {
- if (ConfMan.hasKey("speech_volume")) {
- error("This key shouldn't be read by the scripts");
- } else {
- return init;
- }
- } else if (key == "MusicVolume") {
- if (ConfMan.hasKey("music_volume")) {
- error("This key shouldn't be read by the scripts");
- } else {
- return init;
- }
- }
- }
- AnsiString val = readString(subKey, key, "");
- if (val.empty()) {
- return init;
- } else {
- return atoi(val.c_str());
- }
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-bool BaseRegistry::writeInt(const AnsiString &subKey, const AnsiString &key, int value) {
- if (subKey == "Audio") {
- if (key == "MasterVolume") {
- ConfMan.setInt("master_volume", value);
- return true;
- } else if (key == "SFXVolume") {
- error("This key shouldn't be read by the scripts");
- return true;
- } else if (key == "SpeechVolume") {
- error("This key shouldn't be read by the scripts");
- return true;
- } else if (key == "MusicVolume") {
- error("This key shouldn't be read by the scripts");
- return true;
- }
- }
- writeString(subKey, key, StringUtil::toString(value));
- return true;
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-bool BaseRegistry::readBool(const AnsiString &subKey, const AnsiString &key, bool init) {
- return (readInt(subKey, key, (int)init) != 0);
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-bool BaseRegistry::writeBool(const AnsiString &subKey, const AnsiString &key, bool value) {
- return writeInt(subKey, key, (int)value);
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-void BaseRegistry::setIniName(const char *name) {
- delete[] _iniName;
- _iniName = NULL;
-
- if (strchr(name, '\\') == NULL && strchr(name, '/') == NULL) {
- _iniName = new char [strlen(name) + 3];
- sprintf(_iniName, "./%s", name);
- } else {
- _iniName = new char [strlen(name) + 1];
- strcpy(_iniName, name);
- }
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-char *BaseRegistry::getIniName() {
- return _iniName;
-}
-
-//////////////////////////////////////////////////////////////////////////
-void BaseRegistry::loadValues(bool local) {
- Common::String filename = Common::String(BaseEngine::instance().getGameId()) + "-settings.xml";
- loadXml(filename, _values);
-}
-
-//////////////////////////////////////////////////////////////////////////
-void BaseRegistry::saveValues() {
- Common::String filename = Common::String(BaseEngine::instance().getGameId()) + "-settings.xml";
- saveXml(filename, _values);
-}
-
-//////////////////////////////////////////////////////////////////////////
-void BaseRegistry::setBasePath(const char *basePath) {
- _basePath = PathUtil::getFileNameWithoutExtension(basePath);
-
- loadValues(false);
-}
-
-//////////////////////////////////////////////////////////////////////////
-AnsiString BaseRegistry::getValue(PathValueMap &values, const AnsiString path, const AnsiString &key, bool &found) {
- found = false;
- PathValueMap::iterator it = values.find(path);
- if (it == values.end()) {
- return "";
- }
-
- KeyValuePair pairs = (*it)._value;
- KeyValuePair::iterator keyIt = pairs.find(key);
- if (keyIt == pairs.end()) {
- return "";
- } else {
- found = true;
- return (*keyIt)._value;
- }
-}
-
-//////////////////////////////////////////////////////////////////////////
-void BaseRegistry::loadXml(const AnsiString fileName, PathValueMap &values) {
- Common::SeekableReadStream *stream = g_wintermute->getSaveFileMan()->openForLoading(fileName);
- if (!stream) {
- return;
- }
- char *data = new char[stream->size()];
- stream->read(data, stream->size());
- TiXmlDocument doc;
- doc.Parse(data);
- delete[] data;
-
- TiXmlElement *rootElem = doc.RootElement();
- if (!rootElem || Common::String(rootElem->Value()) != "Settings") { // TODO: Avoid this strcmp-use. (Hack for now, since we might drop TinyXML all together)
- return;
- }
-
- for (TiXmlElement *pathElem = rootElem->FirstChildElement(); pathElem != NULL; pathElem = pathElem->NextSiblingElement()) {
- for (TiXmlElement *keyElem = pathElem->FirstChildElement(); keyElem != NULL; keyElem = keyElem->NextSiblingElement()) {
- values[Common::String(pathElem->Value())][Common::String(keyElem->Value())] = keyElem->GetText();
- }
- }
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-void BaseRegistry::saveXml(const AnsiString fileName, PathValueMap &values) {
- BaseUtils::createPath(fileName.c_str());
-
- TiXmlDocument doc;
- doc.LinkEndChild(new TiXmlDeclaration("1.0", "utf-8", ""));
-
- TiXmlElement *root = new TiXmlElement("Settings");
- doc.LinkEndChild(root);
-
- PathValueMap::iterator pathIt;
- for (pathIt = _values.begin(); pathIt != _values.end(); ++pathIt) {
- TiXmlElement *pathElem = new TiXmlElement((*pathIt)._key.c_str());
- root->LinkEndChild(pathElem);
-
-
- KeyValuePair pairs = (*pathIt)._value;
- KeyValuePair::iterator keyIt;
- for (keyIt = pairs.begin(); keyIt != pairs.end(); ++keyIt) {
- TiXmlElement *keyElem = new TiXmlElement((*keyIt)._key.c_str());
- pathElem->LinkEndChild(keyElem);
-
- keyElem->LinkEndChild(new TiXmlText((*keyIt)._value.c_str()));
- }
- }
-
-
- TiXmlPrinter printer;
- doc.Accept(&printer);
-
- Common::WriteStream *stream = g_wintermute->getSaveFileMan()->openForSaving(fileName);
-
- if (!stream) {
- return;
- } else {
- stream->write(printer.CStr(), printer.Size());
- stream->finalize();
- delete stream;
- }
-}
-
-} // end of namespace WinterMute
diff --git a/engines/wintermute/base/base_registry.h b/engines/wintermute/base/base_registry.h
deleted file mode 100644
index 5e235c2a68..0000000000
--- a/engines/wintermute/base/base_registry.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-/*
- * This file is based on WME Lite.
- * http://dead-code.org/redir.php?target=wmelite
- * Copyright (c) 2011 Jan Nedoma
- */
-
-#ifndef WINTERMUTE_BREGISTRY_H
-#define WINTERMUTE_BREGISTRY_H
-
-#include "engines/wintermute/dctypes.h"
-#include "common/hashmap.h"
-#include "common/hash-str.h"
-#include "common/str.h"
-
-namespace WinterMute {
-
-class BaseRegistry {
-public:
- void setIniName(const char *name);
- char *getIniName();
- bool writeBool(const AnsiString &subKey, const AnsiString &key, bool Value);
- bool readBool(const AnsiString &subKey, const AnsiString &key, bool init = false);
- bool writeInt(const AnsiString &subKey, const AnsiString &key, int value);
- int readInt(const AnsiString &subKey, const AnsiString &key, int init = 0);
- bool writeString(const AnsiString &subKey, const AnsiString &key, const AnsiString &value);
- AnsiString readString(const AnsiString &subKey, const AnsiString &key, const AnsiString &init = "");
- BaseRegistry();
- virtual ~BaseRegistry();
-
- void setBasePath(const char *basePath);
- AnsiString getBasePath() const {
- return _basePath;
- }
-
- void loadValues(bool local);
- void saveValues();
-
-private:
- char *_iniName;
-
- typedef Common::HashMap<AnsiString, AnsiString> KeyValuePair;
- typedef Common::HashMap<AnsiString, KeyValuePair> PathValueMap;
-
- PathValueMap _localValues;
- PathValueMap _values;
-
- AnsiString _basePath;
-
- void loadXml(const AnsiString fileName, PathValueMap &values);
- void saveXml(const AnsiString fileName, PathValueMap &values);
-
- AnsiString getValue(PathValueMap &values, const AnsiString path, const AnsiString &key, bool &found);
-};
-
-} // end of namespace WinterMute
-
-#endif
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
index 8e6c6bb83c..f407a871b0 100644
--- a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
+++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
@@ -27,8 +27,6 @@
*/
#include "engines/wintermute/base/gfx/osystem/base_render_osystem.h"
-#include "engines/wintermute/base/base_registry.h"
-#include "engines/wintermute/base/base_engine.h"
#include "engines/wintermute/base/gfx/osystem/base_surface_osystem.h"
#include "engines/wintermute/base/base_surface_storage.h"
#include "engines/wintermute/base/gfx/base_image.h"
@@ -128,8 +126,8 @@ bool BaseRenderOSystem::initRenderer(int width, int height, bool windowed) {
//TODO: Tiny resolution-displays might want to do some resolution-selection logic here
- _realWidth = BaseEngine::instance().getRegistry()->readInt("Debug", "ForceResWidth", _width);
- _realHeight = BaseEngine::instance().getRegistry()->readInt("Debug", "ForceResHeight", _height);
+ //_realWidth = BaseEngine::instance().getRegistry()->readInt("Debug", "ForceResWidth", _width);
+ //_realHeight = BaseEngine::instance().getRegistry()->readInt("Debug", "ForceResHeight", _height);
float origAspect = (float)_width / (float)_height;
float realAspect = (float)_realWidth / (float)_realHeight;
diff --git a/engines/wintermute/base/scriptables/script_engine.cpp b/engines/wintermute/base/scriptables/script_engine.cpp
index 06f584c9bb..e5d965a4b1 100644
--- a/engines/wintermute/base/scriptables/script_engine.cpp
+++ b/engines/wintermute/base/scriptables/script_engine.cpp
@@ -32,7 +32,6 @@
#include "engines/wintermute/base/scriptables/script.h"
#include "engines/wintermute/base/scriptables/script_stack.h"
#include "engines/wintermute/base/scriptables/script_ext_math.h"
-#include "engines/wintermute/base/base_registry.h"
#include "engines/wintermute/base/base_engine.h"
#include "engines/wintermute/base/base_game.h"
#include "engines/wintermute/base/sound/base_sound.h"
diff --git a/engines/wintermute/base/sound/base_sound_manager.cpp b/engines/wintermute/base/sound/base_sound_manager.cpp
index 43109443a7..ed475ec31c 100644
--- a/engines/wintermute/base/sound/base_sound_manager.cpp
+++ b/engines/wintermute/base/sound/base_sound_manager.cpp
@@ -27,7 +27,6 @@
*/
#include "engines/wintermute/base/sound/base_sound_manager.h"
-#include "engines/wintermute/base/base_registry.h"
#include "engines/wintermute/base/base_engine.h"
#include "engines/wintermute/utils/path_util.h"
#include "engines/wintermute/utils/string_util.h"