[Scummvm-cvs-logs] SF.net SVN: scummvm:[48933] scummvm/trunk/engines
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Tue May 4 13:56:52 CEST 2010
Revision: 48933
http://scummvm.svn.sourceforge.net/scummvm/?rev=48933&view=rev
Author: fingolfin
Date: 2010-05-04 11:56:52 +0000 (Tue, 04 May 2010)
Log Message:
-----------
Get rid of Engine::_gameDataDir.
This greatly reduces indirect dependencies on several header files
from common.
Modified Paths:
--------------
scummvm/trunk/engines/agi/loader_v3.cpp
scummvm/trunk/engines/agi/sound.cpp
scummvm/trunk/engines/agos/agos.cpp
scummvm/trunk/engines/draci/draci.cpp
scummvm/trunk/engines/engine.cpp
scummvm/trunk/engines/engine.h
scummvm/trunk/engines/groovie/groovie.cpp
scummvm/trunk/engines/m4/m4.cpp
scummvm/trunk/engines/mohawk/mohawk.h
scummvm/trunk/engines/mohawk/myst.cpp
scummvm/trunk/engines/mohawk/riven.cpp
scummvm/trunk/engines/mohawk/riven_scripts.h
scummvm/trunk/engines/saga/saga.cpp
scummvm/trunk/engines/sci/resource.h
scummvm/trunk/engines/sci/sci.cpp
scummvm/trunk/engines/sci/sci.h
scummvm/trunk/engines/scumm/resource.cpp
scummvm/trunk/engines/scumm/scumm.cpp
scummvm/trunk/engines/sword1/sword1.cpp
scummvm/trunk/engines/sword2/sword2.cpp
scummvm/trunk/engines/teenagent/inventory.cpp
scummvm/trunk/engines/teenagent/scene.cpp
scummvm/trunk/engines/tinsel/tinsel.cpp
Modified: scummvm/trunk/engines/agi/loader_v3.cpp
===================================================================
--- scummvm/trunk/engines/agi/loader_v3.cpp 2010-05-04 11:47:12 UTC (rev 48932)
+++ scummvm/trunk/engines/agi/loader_v3.cpp 2010-05-04 11:56:52 UTC (rev 48933)
@@ -27,7 +27,7 @@
#include "agi/lzw.h"
#include "common/config-manager.h"
-//#include "common/fs.h"
+#include "common/fs.h"
namespace Agi {
Modified: scummvm/trunk/engines/agi/sound.cpp
===================================================================
--- scummvm/trunk/engines/agi/sound.cpp 2010-05-04 11:47:12 UTC (rev 48932)
+++ scummvm/trunk/engines/agi/sound.cpp 2010-05-04 11:56:52 UTC (rev 48933)
@@ -25,6 +25,7 @@
#include "common/md5.h"
#include "common/config-manager.h"
+#include "common/fs.h"
#include "common/random.h"
#include "common/str-array.h"
Modified: scummvm/trunk/engines/agos/agos.cpp
===================================================================
--- scummvm/trunk/engines/agos/agos.cpp 2010-05-04 11:47:12 UTC (rev 48932)
+++ scummvm/trunk/engines/agos/agos.cpp 2010-05-04 11:56:52 UTC (rev 48933)
@@ -24,10 +24,11 @@
*/
#include "common/config-manager.h"
+#include "common/EventRecorder.h"
+#include "common/events.h"
#include "common/file.h"
+#include "common/fs.h"
#include "common/system.h"
-#include "common/events.h"
-#include "common/EventRecorder.h"
#include "agos/debugger.h"
#include "agos/intern.h"
@@ -514,20 +515,22 @@
"\x5\x5\x4\x6\x5\x3\x4\x5\x6\x3\x5\x5\x4\x6\x5\x3\x4\x6\x5\x6\x6\x6\x5\x5\x5\x6\x5\x6\x6\x6\x6\x6", 32);
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+
// Add default file directories for Acorn version of
// Simon the Sorcerer 1
- SearchMan.addSubDirectoryMatching(_gameDataDir, "execute");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "execute");
// Add default file directories for Amiga/Macintosh
// verisons of Simon the Sorcerer 2
- SearchMan.addSubDirectoryMatching(_gameDataDir, "voices");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "voices");
// Add default file directories for Amiga & Macintosh
// versions of The Feeble Files
- SearchMan.addSubDirectoryMatching(_gameDataDir, "gfx");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "movies");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "sfx");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "speech");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "gfx");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "movies");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "sfx");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "speech");
g_eventRec.registerRandomSource(_rnd, "agos");
}
Modified: scummvm/trunk/engines/draci/draci.cpp
===================================================================
--- scummvm/trunk/engines/draci/draci.cpp 2010-05-04 11:47:12 UTC (rev 48932)
+++ scummvm/trunk/engines/draci/draci.cpp 2010-05-04 11:56:52 UTC (rev 48933)
@@ -79,7 +79,8 @@
// Do not initialize graphics here
// However this is the place to specify all default directories
- //SearchMan.addSubDirectoryMatching(_gameDataDir, "sound");
+ //const Common::FSNode gameDataDir(ConfMan.get("path"));
+ //SearchMan.addSubDirectoryMatching(gameDataDir, "sound");
// Here is the right place to set up the engine specific debug levels
DebugMan.addDebugChannel(kDraciGeneralDebugLevel, "general", "Draci general debug info");
Modified: scummvm/trunk/engines/engine.cpp
===================================================================
--- scummvm/trunk/engines/engine.cpp 2010-05-04 11:47:12 UTC (rev 48932)
+++ scummvm/trunk/engines/engine.cpp 2010-05-04 11:56:52 UTC (rev 48933)
@@ -90,7 +90,6 @@
_eventMan(_system->getEventManager()),
_saveFileMan(_system->getSavefileManager()),
_targetName(ConfMan.getActiveDomainName()),
- _gameDataDir(ConfMan.get("path")),
_pauseLevel(0),
_mainMenuDialog(NULL) {
@@ -320,12 +319,14 @@
char buffer[MAXPATHLEN];
int i;
- if (_gameDataDir.getPath().empty()) {
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+
+ if (gameDataDir.getPath().empty()) {
// That's it! I give up!
if (getcwd(buffer, MAXPATHLEN) == NULL)
return;
} else
- strncpy(buffer, _gameDataDir.getPath().c_str(), MAXPATHLEN);
+ strncpy(buffer, gameDataDir.getPath().c_str(), MAXPATHLEN);
for (i = 0; i < MAXPATHLEN - 1; i++) {
if (buffer[i] == '\\')
Modified: scummvm/trunk/engines/engine.h
===================================================================
--- scummvm/trunk/engines/engine.h 2010-05-04 11:47:12 UTC (rev 48932)
+++ scummvm/trunk/engines/engine.h 2010-05-04 11:56:52 UTC (rev 48933)
@@ -27,8 +27,8 @@
#include "common/scummsys.h"
#include "common/error.h"
-#include "common/fs.h"
#include "common/str.h"
+#include "common/list.h"
#include "graphics/pixelformat.h"
class OSystem;
@@ -89,8 +89,6 @@
const Common::String _targetName; // target name for saves
- const Common::FSNode _gameDataDir; // FIXME: Get rid of this
-
private:
/**
* The pause level, 0 means 'running', a positive value indicates
Modified: scummvm/trunk/engines/groovie/groovie.cpp
===================================================================
--- scummvm/trunk/engines/groovie/groovie.cpp 2010-05-04 11:47:12 UTC (rev 48932)
+++ scummvm/trunk/engines/groovie/groovie.cpp 2010-05-04 11:56:52 UTC (rev 48933)
@@ -41,9 +41,10 @@
_graphicsMan(NULL), _waitingForInput(false) {
// Adding the default directories
- SearchMan.addSubDirectoryMatching(_gameDataDir, "groovie");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "media");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "system");
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+ SearchMan.addSubDirectoryMatching(gameDataDir, "groovie");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "media");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "system");
// Initialize the custom debug levels
DebugMan.addDebugChannel(kGroovieDebugAll, "All", "Debug everything");
Modified: scummvm/trunk/engines/m4/m4.cpp
===================================================================
--- scummvm/trunk/engines/m4/m4.cpp 2010-05-04 11:47:12 UTC (rev 48932)
+++ scummvm/trunk/engines/m4/m4.cpp 2010-05-04 11:56:52 UTC (rev 48933)
@@ -52,6 +52,7 @@
#include "m4/mads_menus.h"
#include "common/file.h"
+#include "common/fs.h"
#include "common/events.h"
#include "common/EventRecorder.h"
#include "common/endian.h"
@@ -111,9 +112,11 @@
_vm = this;
_madsVm = NULL;
- SearchMan.addSubDirectoryMatching(_gameDataDir, "goodstuf");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "resource");
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+ SearchMan.addSubDirectoryMatching(gameDataDir, "goodstuf");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "resource");
+
DebugMan.addDebugChannel(kDebugScript, "script", "Script debug level");
DebugMan.addDebugChannel(kDebugGraphics, "graphics", "Graphics debug level");
DebugMan.addDebugChannel(kDebugConversations, "conversations", "Conversations debugging");
Modified: scummvm/trunk/engines/mohawk/mohawk.h
===================================================================
--- scummvm/trunk/engines/mohawk/mohawk.h 2010-05-04 11:47:12 UTC (rev 48932)
+++ scummvm/trunk/engines/mohawk/mohawk.h 2010-05-04 11:56:52 UTC (rev 48933)
@@ -33,6 +33,10 @@
class OSystem;
+namespace Common {
+ class SeekableReadStream;
+}
+
namespace Mohawk {
enum MohawkGameType {
Modified: scummvm/trunk/engines/mohawk/myst.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/myst.cpp 2010-05-04 11:47:12 UTC (rev 48932)
+++ scummvm/trunk/engines/mohawk/myst.cpp 2010-05-04 11:56:52 UTC (rev 48933)
@@ -74,8 +74,10 @@
_scriptParser->disableInitOpcodes();
- if ((getFeatures() & GF_ME) && getPlatform() == Common::kPlatformMacintosh)
- SearchMan.addSubDirectoryMatching(_gameDataDir, "CD Data");
+ if ((getFeatures() & GF_ME) && getPlatform() == Common::kPlatformMacintosh) {
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+ SearchMan.addSubDirectoryMatching(gameDataDir, "CD Data");
+ }
}
MohawkEngine_Myst::~MohawkEngine_Myst() {
Modified: scummvm/trunk/engines/mohawk/riven.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/riven.cpp 2010-05-04 11:47:12 UTC (rev 48932)
+++ scummvm/trunk/engines/mohawk/riven.cpp 2010-05-04 11:56:52 UTC (rev 48933)
@@ -49,13 +49,15 @@
_activatedSLST = false;
_extrasFile = NULL;
- // Attempt to let game run from the CD's
+ // Attempt to let game run from the CDs
// NOTE: assets2 contains higher quality audio than assets1
- SearchMan.addSubDirectoryMatching(_gameDataDir, "all");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "data");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "exe");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "assets2");
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+ SearchMan.addSubDirectoryMatching(gameDataDir, "all");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "data");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "exe");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "assets2");
+
g_atrusJournalRectSolo = new Common::Rect(295, 402, 313, 426);
g_atrusJournalRect = new Common::Rect(222, 402, 240, 426);
g_cathJournalRect = new Common::Rect(291, 408, 311, 419);
Modified: scummvm/trunk/engines/mohawk/riven_scripts.h
===================================================================
--- scummvm/trunk/engines/mohawk/riven_scripts.h 2010-05-04 11:47:12 UTC (rev 48932)
+++ scummvm/trunk/engines/mohawk/riven_scripts.h 2010-05-04 11:56:52 UTC (rev 48933)
@@ -27,6 +27,7 @@
#define RIVEN_SCRIPTS_H
#include "common/str-array.h"
+#include "common/ptr.h"
class MohawkEngine_Riven;
Modified: scummvm/trunk/engines/saga/saga.cpp
===================================================================
--- scummvm/trunk/engines/saga/saga.cpp 2010-05-04 11:47:12 UTC (rev 48932)
+++ scummvm/trunk/engines/saga/saga.cpp 2010-05-04 11:56:52 UTC (rev 48933)
@@ -23,9 +23,8 @@
*
*/
-
-
#include "common/file.h"
+#include "common/fs.h"
#include "common/config-manager.h"
#include "common/system.h"
#include "common/events.h"
@@ -112,28 +111,30 @@
_frameCount = 0;
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+
// The Linux version of Inherit the Earth puts all data files in an
// 'itedata' sub-directory, except for voices.rsc
- SearchMan.addSubDirectoryMatching(_gameDataDir, "itedata");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "itedata");
// The Windows version of Inherit the Earth puts various data files in
// other subdirectories.
- SearchMan.addSubDirectoryMatching(_gameDataDir, "graphics");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "music");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "sound");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "graphics");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "music");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "sound");
// The Multi-OS version puts the voices file in the root directory of
// the CD. The rest of the data files are in game/itedata
- SearchMan.addSubDirectoryMatching(_gameDataDir, "game/itedata");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "game/itedata");
// Mac CD Wyrmkeep
- SearchMan.addSubDirectoryMatching(_gameDataDir, "patch");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "patch");
// Dinotopia
- SearchMan.addSubDirectoryMatching(_gameDataDir, "smack");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "smack");
// FTA2
- SearchMan.addSubDirectoryMatching(_gameDataDir, "video");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "video");
_displayClip.left = _displayClip.top = 0;
g_eventRec.registerRandomSource(_rnd, "saga");
Modified: scummvm/trunk/engines/sci/resource.h
===================================================================
--- scummvm/trunk/engines/sci/resource.h 2010-05-04 11:47:12 UTC (rev 48932)
+++ scummvm/trunk/engines/sci/resource.h 2010-05-04 11:56:52 UTC (rev 48933)
@@ -27,6 +27,7 @@
#define SCI_SCICORE_RESOURCE_H
#include "common/str.h"
+#include "common/fs.h"
#include "sci/graphics/helpers.h" // for ViewType
#include "sci/decompressor.h"
Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp 2010-05-04 11:47:12 UTC (rev 48932)
+++ scummvm/trunk/engines/sci/sci.cpp 2010-05-04 11:56:52 UTC (rev 48933)
@@ -96,18 +96,20 @@
_gamestate = 0;
- SearchMan.addSubDirectoryMatching(_gameDataDir, "actors"); // KQ6 hi-res portraits
- SearchMan.addSubDirectoryMatching(_gameDataDir, "aud"); // resource.aud and audio files
- SearchMan.addSubDirectoryMatching(_gameDataDir, "avi"); // AVI movie files for Windows versions
- SearchMan.addSubDirectoryMatching(_gameDataDir, "seq"); // SEQ movie files for DOS versions
- SearchMan.addSubDirectoryMatching(_gameDataDir, "wav"); // speech files in WAV format
- SearchMan.addSubDirectoryMatching(_gameDataDir, "sfx"); // music/sound files in WAV format
- SearchMan.addSubDirectoryMatching(_gameDataDir, "robot"); // robot files
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+ SearchMan.addSubDirectoryMatching(gameDataDir, "actors"); // KQ6 hi-res portraits
+ SearchMan.addSubDirectoryMatching(gameDataDir, "aud"); // resource.aud and audio files
+ SearchMan.addSubDirectoryMatching(gameDataDir, "avi"); // AVI movie files for Windows versions
+ SearchMan.addSubDirectoryMatching(gameDataDir, "seq"); // SEQ movie files for DOS versions
+ SearchMan.addSubDirectoryMatching(gameDataDir, "wav"); // speech files in WAV format
+ SearchMan.addSubDirectoryMatching(gameDataDir, "sfx"); // music/sound files in WAV format
+ SearchMan.addSubDirectoryMatching(gameDataDir, "robot"); // robot files
+
// Add the patches directory, except for KQ6CD; The patches folder in some versions of KQ6CD
// is for the demo of Phantasmagoria, included in the disk
if (strcmp(getGameID(), "kq6"))
- SearchMan.addSubDirectoryMatching(_gameDataDir, "patches"); // resource patches
+ SearchMan.addSubDirectoryMatching(gameDataDir, "patches"); // resource patches
}
SciEngine::~SciEngine() {
Modified: scummvm/trunk/engines/sci/sci.h
===================================================================
--- scummvm/trunk/engines/sci/sci.h 2010-05-04 11:47:12 UTC (rev 48932)
+++ scummvm/trunk/engines/sci/sci.h 2010-05-04 11:56:52 UTC (rev 48933)
@@ -27,7 +27,7 @@
#define SCI_H
#include "engines/engine.h"
-//#include "engines/advancedDetector.h"
+#include "common/util.h"
struct ADGameDescription;
Modified: scummvm/trunk/engines/scumm/resource.cpp
===================================================================
--- scummvm/trunk/engines/scumm/resource.cpp 2010-05-04 11:47:12 UTC (rev 48932)
+++ scummvm/trunk/engines/scumm/resource.cpp 2010-05-04 11:56:52 UTC (rev 48933)
@@ -226,7 +226,7 @@
#ifdef MACOSX
sprintf(buf, "Cannot find file: '%s'\nPlease insert disc %d.\nPress OK to retry, Quit to exit", filename, disknum);
#else
- sprintf(buf, "Cannot find file: '%s'\nInsert disc %d into drive %s\nPress OK to retry, Quit to exit", filename, disknum, _gameDataDir.getPath().c_str());
+ sprintf(buf, "Cannot find file: '%s'\nInsert disc %d into drive %s\nPress OK to retry, Quit to exit", filename, disknum, ConfMan.get("path").c_str());
#endif
result = displayMessage("Quit", "%s", buf);
Modified: scummvm/trunk/engines/scumm/scumm.cpp
===================================================================
--- scummvm/trunk/engines/scumm/scumm.cpp 2010-05-04 11:47:12 UTC (rev 48932)
+++ scummvm/trunk/engines/scumm/scumm.cpp 2010-05-04 11:56:52 UTC (rev 48933)
@@ -933,22 +933,24 @@
Common::Error ScummEngine::init() {
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+
// Add default file directories.
if (((_game.platform == Common::kPlatformAmiga) || (_game.platform == Common::kPlatformAtariST)) && (_game.version <= 4)) {
// This is for the Amiga version of Indy3/Loom/Maniac/Zak
- SearchMan.addSubDirectoryMatching(_gameDataDir, "rooms");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "rooms");
}
if ((_game.platform == Common::kPlatformMacintosh) && (_game.version == 3)) {
// This is for the Mac version of Indy3/Loom
- SearchMan.addSubDirectoryMatching(_gameDataDir, "rooms 1");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "rooms 2");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "rooms 3");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "rooms 1");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "rooms 2");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "rooms 3");
}
#ifdef ENABLE_SCUMM_7_8
#ifdef MACOSX
- if (_game.version == 8 && !memcmp(_gameDataDir.getPath().c_str(), "/Volumes/MONKEY3_", 17)) {
+ if (_game.version == 8 && !memcmp(gameDataDir.getPath().c_str(), "/Volumes/MONKEY3_", 17)) {
// Special case for COMI on Mac OS X. The mount points on OS X depend
// on the volume name. Hence if playing from CD, we'd get a problem.
// So if loading of a resource file fails, we fall back to the (fixed)
@@ -963,12 +965,12 @@
#endif
if (_game.version == 8)
// This is for COMI
- SearchMan.addSubDirectoryMatching(_gameDataDir, "resource");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "resource");
if (_game.version == 7) {
// This is for Full Throttle & The Dig
- SearchMan.addSubDirectoryMatching(_gameDataDir, "video");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "data");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "video");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "data");
}
#endif
Modified: scummvm/trunk/engines/sword1/sword1.cpp
===================================================================
--- scummvm/trunk/engines/sword1/sword1.cpp 2010-05-04 11:47:12 UTC (rev 48932)
+++ scummvm/trunk/engines/sword1/sword1.cpp 2010-05-04 11:56:52 UTC (rev 48933)
@@ -56,13 +56,14 @@
_features = 0;
// Add default file directories
- SearchMan.addSubDirectoryMatching(_gameDataDir, "clusters");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "music");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "speech");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "video");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "smackshi");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "english");//PSX Demo
- SearchMan.addSubDirectoryMatching(_gameDataDir, "italian");//PSX Demo
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+ SearchMan.addSubDirectoryMatching(gameDataDir, "clusters");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "music");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "speech");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "video");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "smackshi");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "english");//PSX Demo
+ SearchMan.addSubDirectoryMatching(gameDataDir, "italian");//PSX Demo
}
SwordEngine::~SwordEngine() {
Modified: scummvm/trunk/engines/sword2/sword2.cpp
===================================================================
--- scummvm/trunk/engines/sword2/sword2.cpp 2010-05-04 11:47:12 UTC (rev 48932)
+++ scummvm/trunk/engines/sword2/sword2.cpp 2010-05-04 11:56:52 UTC (rev 48933)
@@ -257,10 +257,11 @@
Sword2Engine::Sword2Engine(OSystem *syst) : Engine(syst) {
// Add default file directories
- SearchMan.addSubDirectoryMatching(_gameDataDir, "clusters");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "sword2");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "video");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "smacks");
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+ SearchMan.addSubDirectoryMatching(gameDataDir, "clusters");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "sword2");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "video");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "smacks");
if (!scumm_stricmp(ConfMan.get("gameid").c_str(), "sword2demo") || !scumm_stricmp(ConfMan.get("gameid").c_str(), "sword2psxdemo"))
_features = GF_DEMO;
Modified: scummvm/trunk/engines/teenagent/inventory.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/inventory.cpp 2010-05-04 11:47:12 UTC (rev 48932)
+++ scummvm/trunk/engines/teenagent/inventory.cpp 2010-05-04 11:56:52 UTC (rev 48933)
@@ -23,6 +23,7 @@
*/
#include "common/stream.h"
+#include "common/ptr.h"
#include "teenagent/inventory.h"
#include "teenagent/resources.h"
Modified: scummvm/trunk/engines/teenagent/scene.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/scene.cpp 2010-05-04 11:47:12 UTC (rev 48932)
+++ scummvm/trunk/engines/teenagent/scene.cpp 2010-05-04 11:56:52 UTC (rev 48933)
@@ -25,6 +25,8 @@
#include "common/config-manager.h"
#include "common/debug.h"
#include "common/algorithm.h"
+#include "common/ptr.h"
+
#include "teenagent/scene.h"
#include "teenagent/resources.h"
#include "teenagent/surface.h"
Modified: scummvm/trunk/engines/tinsel/tinsel.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/tinsel.cpp 2010-05-04 11:47:12 UTC (rev 48932)
+++ scummvm/trunk/engines/tinsel/tinsel.cpp 2010-05-04 11:56:52 UTC (rev 48933)
@@ -29,6 +29,7 @@
#include "common/EventRecorder.h"
#include "common/keyboard.h"
#include "common/file.h"
+#include "common/fs.h"
#include "common/savefile.h"
#include "common/config-manager.h"
#include "common/serializer.h"
@@ -834,11 +835,12 @@
_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
// Add DW2 subfolder to search path in case user is running directly from the CDs
- SearchMan.addSubDirectoryMatching(_gameDataDir, "dw2");
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+ SearchMan.addSubDirectoryMatching(gameDataDir, "dw2");
// Add subfolders needed for psx versions of Discworld 1
if (TinselV1PSX)
- SearchMan.addDirectory(_gameDataDir.getPath(), _gameDataDir, 0, 3, true);
+ SearchMan.addDirectory(gameDataDir.getPath(), gameDataDir, 0, 3, true);
const GameSettings *g;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list