[Scummvm-cvs-logs] SF.net SVN: scummvm: [21916] scummvm/trunk/base
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sat Apr 15 13:38:00 CEST 2006
Revision: 21916
Author: fingolfin
Date: 2006-04-15 13:36:41 -0700 (Sat, 15 Apr 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=21916&view=rev
Log Message:
-----------
- Renamed ConfigManager::getActiveDomain to getActiveDomainName, and added a new getActiveDomain method that returns a pointer to the actual active *domain*
- Added Engine::_targetName whose value is computed from the name of the active domain
- Removed GameDetector::_targetName, instead code now uses either Engine::_targetName or the name of the active domain
- This in turn allowed for removing usage of GameDetector in many places
Modified Paths:
--------------
scummvm/trunk/backends/PalmOS/Src/cd_aeroplayer.cpp
scummvm/trunk/backends/PalmOS/Src/cd_pockettunes.cpp
scummvm/trunk/base/engine.cpp
scummvm/trunk/base/engine.h
scummvm/trunk/base/gameDetector.cpp
scummvm/trunk/base/gameDetector.h
scummvm/trunk/base/main.cpp
scummvm/trunk/base/plugins.cpp
scummvm/trunk/base/plugins.h
scummvm/trunk/common/config-manager.h
scummvm/trunk/common/savefile.cpp
scummvm/trunk/engines/cine/cine.cpp
scummvm/trunk/engines/cine/cine.h
scummvm/trunk/engines/gob/gob.cpp
scummvm/trunk/engines/gob/gob.h
scummvm/trunk/engines/kyra/kyra.cpp
scummvm/trunk/engines/kyra/kyra.h
scummvm/trunk/engines/lure/lure.cpp
scummvm/trunk/engines/lure/lure.h
scummvm/trunk/engines/queen/queen.cpp
scummvm/trunk/engines/queen/queen.h
scummvm/trunk/engines/saga/game.cpp
scummvm/trunk/engines/saga/gfx.cpp
scummvm/trunk/engines/saga/gfx.h
scummvm/trunk/engines/saga/saga.cpp
scummvm/trunk/engines/saga/saga.h
scummvm/trunk/engines/scumm/cursor.cpp
scummvm/trunk/engines/scumm/debugger.cpp
scummvm/trunk/engines/scumm/he/intern_he.h
scummvm/trunk/engines/scumm/intern.h
scummvm/trunk/engines/scumm/plugin.cpp
scummvm/trunk/engines/scumm/scumm.cpp
scummvm/trunk/engines/scumm/scumm.h
scummvm/trunk/engines/simon/game.cpp
scummvm/trunk/engines/simon/simon.cpp
scummvm/trunk/engines/simon/simon.h
scummvm/trunk/engines/sky/sky.cpp
scummvm/trunk/engines/sky/sky.h
scummvm/trunk/engines/sword1/sword1.cpp
scummvm/trunk/engines/sword1/sword1.h
scummvm/trunk/engines/sword2/sword2.cpp
scummvm/trunk/engines/sword2/sword2.h
Modified: scummvm/trunk/backends/PalmOS/Src/cd_aeroplayer.cpp
===================================================================
--- scummvm/trunk/backends/PalmOS/Src/cd_aeroplayer.cpp 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/backends/PalmOS/Src/cd_aeroplayer.cpp 2006-04-15 20:36:41 UTC (rev 21916)
@@ -30,7 +30,7 @@
AeroCDPlayer::AeroCDPlayer(OSystem *sys) {
_sys = sys;
- StrCopy(gameP, ConfMan.getActiveDomain().c_str());
+ StrCopy(gameP, ConfMan.getActiveDomainName().c_str());
}
bool AeroCDPlayer::init() {
Modified: scummvm/trunk/backends/PalmOS/Src/cd_pockettunes.cpp
===================================================================
--- scummvm/trunk/backends/PalmOS/Src/cd_pockettunes.cpp 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/backends/PalmOS/Src/cd_pockettunes.cpp 2006-04-15 20:36:41 UTC (rev 21916)
@@ -28,7 +28,7 @@
PckTunesCDPlayer::PckTunesCDPlayer(OSystem *sys) {
_sys = sys;
- StrCopy(gameP, ConfMan.getActiveDomain().c_str());
+ StrCopy(gameP, ConfMan.getActiveDomainName().c_str());
}
bool PckTunesCDPlayer::init() {
Modified: scummvm/trunk/base/engine.cpp
===================================================================
--- scummvm/trunk/base/engine.cpp 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/base/engine.cpp 2006-04-15 20:36:41 UTC (rev 21916)
@@ -24,7 +24,6 @@
#include <malloc.h>
#endif
#include "base/engine.h"
-#include "base/gameDetector.h"
#include "common/config-manager.h"
#include "common/file.h"
#include "common/timer.h"
@@ -37,7 +36,9 @@
Engine *g_engine = 0;
Engine::Engine(OSystem *syst)
- : _system(syst), _gameDataPath(ConfMan.get("path")) {
+ : _system(syst),
+ _gameDataPath(ConfMan.get("path")),
+ _targetName(ConfMan.getActiveDomainName()){
g_engine = this;
_mixer = new Audio::Mixer();
@@ -55,9 +56,9 @@
g_engine = NULL;
}
-void Engine::initCommonGFX(GameDetector &detector, bool defaultTo1XScaler) {
+void Engine::initCommonGFX(bool defaultTo1XScaler) {
const Common::ConfigManager::Domain *transientDomain = ConfMan.getDomain(Common::ConfigManager::kTransientDomain);
- const Common::ConfigManager::Domain *gameDomain = ConfMan.getDomain(detector._targetName);
+ const Common::ConfigManager::Domain *gameDomain = ConfMan.getActiveDomain();
assert(transientDomain);
Modified: scummvm/trunk/base/engine.h
===================================================================
--- scummvm/trunk/base/engine.h 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/base/engine.h 2006-04-15 20:36:41 UTC (rev 21916)
@@ -25,7 +25,6 @@
#include "common/scummsys.h"
#include "common/str.h"
-class GameDetector;
class OSystem;
namespace Audio {
class Mixer;
@@ -42,6 +41,7 @@
Common::Timer * _timer;
protected:
+ const Common::String _targetName; // target name for saves
const Common::String _gameDataPath;
Common::SaveFileManager *_saveFileMan;
@@ -56,7 +56,7 @@
* Init the engine.
* @return 0 for success, else an error code.
*/
- virtual int init(GameDetector &detector) = 0;
+ virtual int init() = 0;
/**
* Start the main engine loop.
@@ -69,7 +69,7 @@
/** Specific for each engine: prepare error string. */
virtual void errorString(const char *buf_input, char *buf_output);
- void initCommonGFX(GameDetector &detector, bool defaultTo1XScaler);
+ void initCommonGFX(bool defaultTo1XScaler);
/** On some systems, check if the game appears to be run from CD. */
void checkCD();
Modified: scummvm/trunk/base/gameDetector.cpp
===================================================================
--- scummvm/trunk/base/gameDetector.cpp 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/base/gameDetector.cpp 2006-04-15 20:36:41 UTC (rev 21916)
@@ -578,11 +578,10 @@
void GameDetector::setTarget(const String &target) {
- _targetName = target;
ConfMan.setActiveDomain(target);
// Make sure the gameid is set in the config manager, and that it is lowercase.
- String gameid(_targetName);
+ String gameid(target);
if (ConfMan.hasKey("gameid"))
gameid = ConfMan.get("gameid");
gameid.toLowercase();
@@ -592,7 +591,7 @@
const Plugin *GameDetector::detectMain() {
const Plugin *plugin = 0;
- if (_targetName.empty()) {
+ if (ConfMan.getActiveDomainName().empty()) {
warning("No game was specified...");
return 0;
}
@@ -602,7 +601,7 @@
if (plugin == 0) {
printf("Failed game detection\n");
- warning("%s is an invalid target. Use the --list-targets option to list targets", _targetName.c_str());
+ warning("%s is an invalid target. Use the --list-targets option to list targets", ConfMan.getActiveDomainName().c_str());
return 0;
}
Modified: scummvm/trunk/base/gameDetector.h
===================================================================
--- scummvm/trunk/base/gameDetector.h 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/base/gameDetector.h 2006-04-15 20:36:41 UTC (rev 21916)
@@ -27,7 +27,6 @@
#include "common/str.h"
#include "common/config-manager.h"
-class GameDetector;
class OSystem;
class Plugin;
@@ -69,8 +68,6 @@
void processSettings(Common::String &target, Common::StringMap &settings);
const Plugin *detectMain();
- String _targetName;
-
public:
static GameDescriptor findGame(const String &gameName, const Plugin **plugin = NULL);
Modified: scummvm/trunk/base/main.cpp
===================================================================
--- scummvm/trunk/base/main.cpp 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/base/main.cpp 2006-04-15 20:36:41 UTC (rev 21916)
@@ -157,7 +157,7 @@
return (dlg.runModal() != -1);
}
-static int runGame(const Plugin *plugin, GameDetector &detector, OSystem &system, const Common::String &edebuglevels) {
+static int runGame(const Plugin *plugin, OSystem &system, const Common::String &edebuglevels) {
// We add it here, so MD5-based detection will be able to
// read mixed case files
if (ConfMan.hasKey("path"))
@@ -166,12 +166,12 @@
Common::File::addDefaultDirectory(".");
// Create the game engine
- Engine *engine = plugin->createInstance(&detector, &system);
+ Engine *engine = plugin->createInstance(&system);
if (!engine) {
// TODO: Show an error dialog or so?
//GUI::MessageDialog alert("ScummVM could not find any game in the specified directory!");
//alert.runModal();
- warning("Failed to instantiate engine for target %s", detector._targetName.c_str());
+ warning("Failed to instantiate engine for target %s", ConfMan.getActiveDomainName().c_str());
return 0;
}
@@ -179,13 +179,13 @@
Common::enableSpecialDebugLevelList(edebuglevels);
// Set the window caption to the game name
- Common::String caption(ConfMan.get("description", detector._targetName));
+ Common::String caption(ConfMan.get("description"));
Common::String desc = GameDetector::findGame(ConfMan.get("gameid")).description;
if (caption.empty() && !desc.empty())
caption = desc;
if (caption.empty())
- caption = detector._targetName;
+ caption = ConfMan.getActiveDomainName(); // Use the domain (=target) name
if (!caption.empty()) {
system.setWindowCaption(caption.c_str());
}
@@ -208,7 +208,7 @@
int result;
// Init the engine (this might change the screen parameters
- result = engine->init(detector);
+ result = engine->init();
// Run the game engine if the initialization was successful.
if (result == 0) {
@@ -314,7 +314,7 @@
setupDummyPalette(system);
// Unless a game was specified, show the launcher dialog
- if (detector._targetName.empty()) {
+ if (ConfMan.getActiveDomainName().empty()) {
running = launcherDialog(detector, system);
// Discard any command line options. Those that affect the graphics
@@ -335,7 +335,7 @@
// to save memory
PluginManager::instance().unloadPluginsExcept(plugin);
- int result = runGame(plugin, detector, system, specialDebug);
+ int result = runGame(plugin, system, specialDebug);
if (result == 0)
break;
Modified: scummvm/trunk/base/plugins.cpp
===================================================================
--- scummvm/trunk/base/plugins.cpp 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/base/plugins.cpp 2006-04-15 20:36:41 UTC (rev 21916)
@@ -23,13 +23,12 @@
#include "common/stdafx.h"
#include "backends/fs/fs.h"
-#include "base/gameDetector.h"
#include "base/plugins.h"
#include "base/engine.h"
#include "common/util.h"
/** Type of factory functions which make new Engine objects. */
-typedef Engine *(*EngineFactory)(GameDetector *detector, OSystem *syst);
+typedef Engine *(*EngineFactory)(OSystem *syst);
typedef const char *(*NameFunc)();
typedef GameDescriptor (*GameIDQueryFunc)(const char *gameid);
@@ -117,9 +116,9 @@
const char *getName() const { return _plugin->_name; }
- Engine *createInstance(GameDetector *detector, OSystem *syst) const {
+ Engine *createInstance(OSystem *syst) const {
assert(_plugin->_ef);
- return (*_plugin->_ef)(detector, syst);
+ return (*_plugin->_ef)(syst);
}
GameList getSupportedGames() const { return _plugin->_games; }
@@ -158,9 +157,9 @@
const char *getName() const { return _name.c_str(); }
- Engine *createInstance(GameDetector *detector, OSystem *syst) const {
+ Engine *createInstance(OSystem *syst) const {
assert(_ef);
- return (*_ef)(detector, syst);
+ return (*_ef)(syst);
}
GameList getSupportedGames() const { return _games; }
Modified: scummvm/trunk/base/plugins.h
===================================================================
--- scummvm/trunk/base/plugins.h 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/base/plugins.h 2006-04-15 20:36:41 UTC (rev 21916)
@@ -31,7 +31,6 @@
class Engine;
class FSList;
-class GameDetector;
class OSystem;
/** List of games. */
@@ -85,7 +84,7 @@
virtual GameDescriptor findGame(const char *gameid) const = 0;
virtual DetectedGameList detectGames(const FSList &fslist) const = 0;
- virtual Engine *createInstance(GameDetector *detector, OSystem *syst) const = 0;
+ virtual Engine *createInstance(OSystem *syst) const = 0;
};
@@ -107,7 +106,7 @@
* - DetectedGameList Engine_##ID##_detectGames(const FSList &fslist)
* -> scans through the given file list (usually the contents of a directory),
* and attempts to detects games present in that location.
- * - Engine *Engine_##ID##_create(GameDetector *detector, OSystem *syst)
+ * - Engine *Engine_##ID##_create(OSystem *syst)
* -> factory function, create an instance of the Engine class.
*
* @todo add some means to query the plugin API version etc.
@@ -131,7 +130,7 @@
PLUGIN_EXPORT const char *PLUGIN_name() { return name; } \
PLUGIN_EXPORT GameList PLUGIN_gameIDList() { return Engine_##ID##_gameIDList(); } \
PLUGIN_EXPORT GameDescriptor PLUGIN_findGameID(const char *gameid) { return Engine_##ID##_findGameID(gameid); } \
- PLUGIN_EXPORT Engine *PLUGIN_createEngine(GameDetector *detector, OSystem *syst) { return Engine_##ID##_create(detector, syst); } \
+ PLUGIN_EXPORT Engine *PLUGIN_createEngine(OSystem *syst) { return Engine_##ID##_create(syst); } \
PLUGIN_EXPORT DetectedGameList PLUGIN_detectGames(const FSList &fslist) { return Engine_##ID##_detectGames(fslist); } \
} \
void dummyFuncToAllowTrailingSemicolon()
@@ -146,7 +145,7 @@
friend class StaticPlugin;
public:
typedef GameDescriptor (*GameIDQueryFunc)(const char *gameid);
- typedef Engine *(*EngineFactory)(GameDetector *detector, OSystem *syst);
+ typedef Engine *(*EngineFactory)(OSystem *syst);
typedef DetectedGameList (*DetectFunc)(const FSList &fslist);
protected:
Modified: scummvm/trunk/common/config-manager.h
===================================================================
--- scummvm/trunk/common/config-manager.h 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/common/config-manager.h 2006-04-15 20:36:41 UTC (rev 21916)
@@ -142,7 +142,9 @@
void flushToDisk();
void setActiveDomain(const String &domName);
- const String & getActiveDomain() const { return _activeDomainName; }
+ Domain * getActiveDomain() { return _activeDomain; }
+ const Domain * getActiveDomain() const { return _activeDomain; }
+ const String & getActiveDomainName() const { return _activeDomainName; }
// void addDomain(const String &domName);
void removeGameDomain(const String &domName);
Modified: scummvm/trunk/common/savefile.cpp
===================================================================
--- scummvm/trunk/common/savefile.cpp 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/common/savefile.cpp 2006-04-15 20:36:41 UTC (rev 21916)
@@ -48,7 +48,7 @@
// Work around a bug (#999122) in the original 0.6.1 release of
// ScummVM, which would insert a bad savepath value into config files.
if (0 == strcmp(dir, "None")) {
- ConfMan.removeKey("savepath", ConfMan.getActiveDomain());
+ ConfMan.removeKey("savepath", ConfMan.getActiveDomainName());
ConfMan.flushToDisk();
dir = ConfMan.get("savepath").c_str();
}
Modified: scummvm/trunk/engines/cine/cine.cpp
===================================================================
--- scummvm/trunk/engines/cine/cine.cpp 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/cine/cine.cpp 2006-04-15 20:36:41 UTC (rev 21916)
@@ -28,7 +28,6 @@
#include "common/config-manager.h"
#include "common/system.h"
-#include "base/gameDetector.h"
#include "base/plugins.h"
#include "backends/fs/fs.h"
@@ -111,15 +110,15 @@
return detectedGames;
}
-Engine *Engine_CINE_create(GameDetector *detector, OSystem *syst) {
- return new Cine::CineEngine(detector, syst);
+Engine *Engine_CINE_create(OSystem *syst) {
+ return new Cine::CineEngine(syst);
}
REGISTER_PLUGIN(CINE, "CINE Engine");
namespace Cine {
-CineEngine::CineEngine(GameDetector *detector, OSystem *syst) : Engine(syst) {
+CineEngine::CineEngine(OSystem *syst) : Engine(syst) {
Common::addSpecialDebugLevel(kCineDebugScript, "Script", "Script debug level");
// Setup mixer
@@ -132,9 +131,12 @@
const Cine::GameSettings *g;
+ const char *gameid = ConfMan.get("gameid").c_str();
for (g = Cine::cine_settings; g->gameid; ++g)
- if (!scumm_stricmp(g->gameid, detector->_targetName.c_str()))
+ if (!scumm_stricmp(g->gameid, gameid)) {
_gameId = g->id;
+ break;
+ }
gameType = _gameId;
}
@@ -146,10 +148,10 @@
strcpy(buf2, buf1);
}
-int CineEngine::init(GameDetector &detector) {
+int CineEngine::init() {
// Initialize backend
_system->beginGFXTransaction();
- initCommonGFX(detector, false);
+ initCommonGFX(false);
_system->initSize(320, 200);
_system->endGFXTransaction();
Modified: scummvm/trunk/engines/cine/cine.h
===================================================================
--- scummvm/trunk/engines/cine/cine.h 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/cine/cine.h 2006-04-15 20:36:41 UTC (rev 21916)
@@ -58,12 +58,12 @@
void errorString(const char *buf_input, char *buf_output);
protected:
- int init(GameDetector & detector);
+ int init();
int go();
void shutdown();
public:
- CineEngine(GameDetector *detector, OSystem *syst);
+ CineEngine(OSystem *syst);
virtual ~CineEngine();
int getGameId() {
return _gameId;
Modified: scummvm/trunk/engines/gob/gob.cpp
===================================================================
--- scummvm/trunk/engines/gob/gob.cpp 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/gob/gob.cpp 2006-04-15 20:36:41 UTC (rev 21916)
@@ -21,7 +21,6 @@
*/
#include "common/stdafx.h"
-#include "base/gameDetector.h"
#include "base/plugins.h"
#include "backends/fs/fs.h"
#include "common/config-manager.h"
@@ -127,7 +126,7 @@
#define MAX_TIME_DELTA 100
-GobEngine::GobEngine(GameDetector *detector, OSystem * syst, uint32 features)
+GobEngine::GobEngine(OSystem * syst, uint32 features)
: Engine(syst) {
// Setup mixer
if (!_mixer->isReady()) {
@@ -189,7 +188,7 @@
_system->quit();
}
-int GobEngine::init(GameDetector &detector) {
+int GobEngine::init() {
_game = new Game(this);
_snd = new Snd(this);
_video = new Video(this);
@@ -223,7 +222,7 @@
_music = new Music(this);
_system->beginGFXTransaction();
- initCommonGFX(detector, false);
+ initCommonGFX(false);
_system->initSize(320, 200);
_system->endGFXTransaction();
@@ -339,7 +338,7 @@
return detectedGames;
}
-Engine *Engine_GOB_create(GameDetector * detector, OSystem *syst) {
+Engine *Engine_GOB_create(OSystem *syst) {
// Detect game features based on MD5
uint8 md5sum[16];
char md5str[32 + 1];
@@ -358,12 +357,8 @@
// TODO
// Fallback. Maybe we will be able to determine game type from game
// data contents
- Common::String realGame;
+ Common::String realGame(ConfMan.get("gameid"));
uint32 features;
- if (ConfMan.hasKey("gameid"))
- realGame = ConfMan.get("gameid");
- else
- realGame = detector->_targetName;
if (!scumm_stricmp(realGame.c_str(), "gob2"))
features = GF_GOB2;
else
@@ -385,7 +380,7 @@
printf("Unknown MD5 (%s)! Please report the details (language, platform, etc.) of this game to the ScummVM team\n", md5str);
}
- return new GobEngine(detector, syst, features);
+ return new GobEngine(syst, features);
}
REGISTER_PLUGIN(GOB, "Gob Engine");
Modified: scummvm/trunk/engines/gob/gob.h
===================================================================
--- scummvm/trunk/engines/gob/gob.h 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/gob/gob.h 2006-04-15 20:36:41 UTC (rev 21916)
@@ -85,10 +85,10 @@
protected:
int go();
- int init(GameDetector &detector);
+ int init();
public:
- GobEngine(GameDetector * detector, OSystem * syst, uint32 features);
+ GobEngine(OSystem *syst, uint32 features);
virtual ~GobEngine();
void shutdown();
Modified: scummvm/trunk/engines/kyra/kyra.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra.cpp 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/kyra/kyra.cpp 2006-04-15 20:36:41 UTC (rev 21916)
@@ -24,7 +24,6 @@
#include "backends/fs/fs.h"
-#include "base/gameDetector.h"
#include "base/plugins.h"
#include "common/config-manager.h"
@@ -205,15 +204,15 @@
return detectedGames;
}
-Engine *Engine_KYRA_create(GameDetector *detector, OSystem *system) {
- return new KyraEngine(detector, system);
+Engine *Engine_KYRA_create(OSystem *system) {
+ return new KyraEngine(system);
}
REGISTER_PLUGIN(KYRA, "Legend of Kyrandia Engine");
namespace Kyra {
-KyraEngine::KyraEngine(GameDetector *detector, OSystem *system)
+KyraEngine::KyraEngine(OSystem *system)
: Engine(system) {
_seq_Forest = _seq_KallakWriting = _seq_KyrandiaLogo = _seq_KallakMalcolm =
_seq_MalcolmTree = _seq_WestwoodLogo = _seq_Demo1 = _seq_Demo2 = _seq_Demo3 =
@@ -326,9 +325,9 @@
}
}
-int KyraEngine::init(GameDetector &detector) {
+int KyraEngine::init() {
_system->beginGFXTransaction();
- initCommonGFX(detector, false);
+ initCommonGFX(false);
//for debug reasons (see Screen::updateScreen)
//_system->initSize(640, 200);
_system->initSize(320, 200);
@@ -506,7 +505,6 @@
_mousePressFlag = false;
- _targetName = detector._targetName;
_menuDirectlyToLoad = false;
_lastMusicCommand = 0;
Modified: scummvm/trunk/engines/kyra/kyra.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra.h 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/kyra/kyra.h 2006-04-15 20:36:41 UTC (rev 21916)
@@ -246,7 +246,7 @@
MUSIC_INTRO = 0
};
- KyraEngine(GameDetector *detector, OSystem *system);
+ KyraEngine(OSystem *system);
~KyraEngine();
void errorString(const char *buf_input, char *buf_output);
@@ -476,7 +476,7 @@
protected:
int go();
- int init(GameDetector &detector);
+ int init();
void startup();
void mainLoop();
@@ -781,8 +781,6 @@
bool _configSounds;
uint8 _configVoice;
- Common::String _targetName;
-
int _curMusicTheme;
int _newMusicTheme;
int16 _lastMusicCommand;
Modified: scummvm/trunk/engines/lure/lure.cpp
===================================================================
--- scummvm/trunk/engines/lure/lure.cpp 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/lure/lure.cpp 2006-04-15 20:36:41 UTC (rev 21916)
@@ -24,7 +24,6 @@
#include "backends/fs/fs.h"
-#include "base/gameDetector.h"
#include "base/plugins.h"
#include "common/config-manager.h"
@@ -155,7 +154,7 @@
return detectedGames;
}
-Engine *Engine_LURE_create(GameDetector *detector, OSystem *system) {
+Engine *Engine_LURE_create(OSystem *system) {
return new LureEngine(system);
}
@@ -252,9 +251,9 @@
}
}
-int LureEngine::init(GameDetector &detector) {
+int LureEngine::init() {
_system->beginGFXTransaction();
- initCommonGFX(detector, false);
+ initCommonGFX(false);
_system->initSize(FULL_SCREEN_WIDTH, FULL_SCREEN_HEIGHT);
_system->endGFXTransaction();
Modified: scummvm/trunk/engines/lure/lure.h
===================================================================
--- scummvm/trunk/engines/lure/lure.h 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/lure/lure.h 2006-04-15 20:36:41 UTC (rev 21916)
@@ -58,7 +58,7 @@
LureEngine(OSystem *system);
~LureEngine();
- virtual int init(GameDetector &detector);
+ virtual int init();
virtual int go();
virtual void errorString(const char *buf_input, char *buf_output);
void quitGame();
Modified: scummvm/trunk/engines/queen/queen.cpp
===================================================================
--- scummvm/trunk/engines/queen/queen.cpp 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/queen/queen.cpp 2006-04-15 20:36:41 UTC (rev 21916)
@@ -24,7 +24,6 @@
#include "backends/fs/fs.h"
-#include "base/gameDetector.h"
#include "base/plugins.h"
#include "common/config-manager.h"
@@ -129,7 +128,7 @@
return detectedGames;
}
-Engine *Engine_QUEEN_create(GameDetector *detector, OSystem *syst) {
+Engine *Engine_QUEEN_create(OSystem *syst) {
return new Queen::QueenEngine(syst);
}
@@ -404,9 +403,9 @@
return 0;
}
-int QueenEngine::init(GameDetector &detector) {
+int QueenEngine::init() {
_system->beginGFXTransaction();
- initCommonGFX(detector, false);
+ initCommonGFX(false);
_system->initSize(GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT);
_system->endGFXTransaction();
Modified: scummvm/trunk/engines/queen/queen.h
===================================================================
--- scummvm/trunk/engines/queen/queen.h 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/queen/queen.h 2006-04-15 20:36:41 UTC (rev 21916)
@@ -25,7 +25,6 @@
#include "base/engine.h"
-class GameDetector;
namespace Common {
class InSaveFile;
}
@@ -136,7 +135,7 @@
void errorString(const char *buf_input, char *buf_output);
int go();
- int init(GameDetector &detector);
+ int init();
int _talkSpeed;
Modified: scummvm/trunk/engines/saga/game.cpp
===================================================================
--- scummvm/trunk/engines/saga/game.cpp 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/saga/game.cpp 2006-04-15 20:36:41 UTC (rev 21916)
@@ -31,7 +31,6 @@
#include "common/hashmap.h"
#include "common/config-manager.h"
#include "base/plugins.h"
-#include "base/gameDetector.h"
#include "backends/fs/fs.h"
#include "saga/rscfile.h"
@@ -84,8 +83,8 @@
return Saga::GAME_detectGames(fslist);
}
-Engine *Engine_SAGA_create(GameDetector *detector, OSystem *syst) {
- return new Saga::SagaEngine(detector, syst);
+Engine *Engine_SAGA_create(OSystem *syst) {
+ return new Saga::SagaEngine(syst);
}
REGISTER_PLUGIN(SAGA, "SAGA Engine");
Modified: scummvm/trunk/engines/saga/gfx.cpp
===================================================================
--- scummvm/trunk/engines/saga/gfx.cpp 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/saga/gfx.cpp 2006-04-15 20:36:41 UTC (rev 21916)
@@ -36,9 +36,9 @@
namespace Saga {
-Gfx::Gfx(SagaEngine *vm, OSystem *system, int width, int height, GameDetector &detector) : _vm(vm), _system(system) {
+Gfx::Gfx(SagaEngine *vm, OSystem *system, int width, int height) : _vm(vm), _system(system) {
_system->beginGFXTransaction();
- _vm->initCommonGFX(detector, (width > 320));
+ _vm->initCommonGFX(width > 320);
_system->initSize(width, height);
_system->endGFXTransaction();
Modified: scummvm/trunk/engines/saga/gfx.h
===================================================================
--- scummvm/trunk/engines/saga/gfx.h 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/saga/gfx.h 2006-04-15 20:36:41 UTC (rev 21916)
@@ -134,7 +134,7 @@
class Gfx {
public:
- Gfx(SagaEngine *vm, OSystem *system, int width, int height, GameDetector &detector);
+ Gfx(SagaEngine *vm, OSystem *system, int width, int height);
~Gfx();
Surface *getBackBuffer() {
return &_backBuffer;
Modified: scummvm/trunk/engines/saga/saga.cpp
===================================================================
--- scummvm/trunk/engines/saga/saga.cpp 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/saga/saga.cpp 2006-04-15 20:36:41 UTC (rev 21916)
@@ -23,7 +23,6 @@
*/
#include "common/stdafx.h"
-#include "base/gameDetector.h"
#include "common/file.h"
#include "common/config-manager.h"
@@ -58,9 +57,8 @@
#define MAX_TIME_DELTA 100
-SagaEngine::SagaEngine(GameDetector *detector, OSystem *syst)
- : Engine(syst),
- _targetName(detector->_targetName) {
+SagaEngine::SagaEngine(OSystem *syst)
+ : Engine(syst) {
_leftMouseButtonPressed = _rightMouseButtonPressed = false;
@@ -148,7 +146,7 @@
strcpy(buf2, buf1);
}
-int SagaEngine::init(GameDetector &detector) {
+int SagaEngine::init() {
_soundVolume = ConfMan.getInt("sfx_volume") / 25;
_musicVolume = ConfMan.getInt("music_volume") / 25;
_subtitlesEnabled = ConfMan.getBool("subtitles");
@@ -186,7 +184,7 @@
_previousTicks = _system->getMillis();
// Initialize graphics
- _gfx = new Gfx(this, _system, getDisplayWidth(), getDisplayHeight(), detector);
+ _gfx = new Gfx(this, _system, getDisplayWidth(), getDisplayHeight());
// Graphics driver should be initialized before console
_console = new Console(this);
Modified: scummvm/trunk/engines/saga/saga.h
===================================================================
--- scummvm/trunk/engines/saga/saga.h 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/saga/saga.h 2006-04-15 20:36:41 UTC (rev 21916)
@@ -573,9 +573,9 @@
protected:
int go();
- int init(GameDetector &detector);
+ int init();
public:
- SagaEngine(GameDetector * detector, OSystem * syst);
+ SagaEngine(OSystem *syst);
virtual ~SagaEngine();
void shutDown() { _quit = true; }
@@ -666,8 +666,6 @@
}
private:
- Common::String _targetName;
-
uint _saveFilesMaxCount;
uint _saveFilesCount;
SaveFileData _saveFiles[MAX_SAVES];
Modified: scummvm/trunk/engines/scumm/cursor.cpp
===================================================================
--- scummvm/trunk/engines/scumm/cursor.cpp 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/scumm/cursor.cpp 2006-04-15 20:36:41 UTC (rev 21916)
@@ -93,8 +93,8 @@
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0x00,0x0F,0x00, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
};
-ScummEngine_v5::ScummEngine_v5(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
- : ScummEngine(detector, syst, gs, md5sum, subst) {
+ScummEngine_v5::ScummEngine_v5(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
+ : ScummEngine(syst, gs, md5sum, subst) {
for (int i = 0; i < 4; i++) {
memcpy(_cursorImages[i], default_cursor_images[i], 32);
Modified: scummvm/trunk/engines/scumm/debugger.cpp
===================================================================
--- scummvm/trunk/engines/scumm/debugger.cpp 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/scumm/debugger.cpp 2006-04-15 20:36:41 UTC (rev 21916)
@@ -82,7 +82,7 @@
DVar_Register("scumm_roomresource", &_vm->_roomResource, DVAR_INT, 0);
DVar_Register("scumm_vars", &_vm->_scummVars, DVAR_INTARRAY, _vm->_numVariables);
- DVar_Register("scumm_gamename", &_vm->_targetName, DVAR_STRING, 0);
+// DVar_Register("scumm_gamename", &_vm->_targetName, DVAR_STRING, 0);
DVar_Register("scumm_exename", &_vm->_baseName, DVAR_STRING, 0);
DVar_Register("scumm_gameid", &_vm->_game.id, DVAR_BYTE, 0);
Modified: scummvm/trunk/engines/scumm/he/intern_he.h
===================================================================
--- scummvm/trunk/engines/scumm/he/intern_he.h 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/scumm/he/intern_he.h 2006-04-15 20:36:41 UTC (rev 21916)
@@ -51,7 +51,7 @@
Common::File _hFileTable[17];
public:
- ScummEngine_v60he(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst) : ScummEngine_v6(detector, syst, gs, md5sum, subst) {}
+ ScummEngine_v60he(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst) : ScummEngine_v6(syst, gs, md5sum, subst) {}
virtual void scummInit();
@@ -116,7 +116,7 @@
bool _skipProcessActors;
public:
- ScummEngine_v70he(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
+ ScummEngine_v70he(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
~ScummEngine_v70he();
Wiz *_wiz;
@@ -182,7 +182,7 @@
class ScummEngine_v71he : public ScummEngine_v70he {
public:
- ScummEngine_v71he(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
+ ScummEngine_v71he(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
protected:
virtual void saveOrLoad(Serializer *s);
@@ -237,7 +237,7 @@
WizParameters _wizParams;
public:
- ScummEngine_v72he(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
+ ScummEngine_v72he(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
virtual void scummInit();
@@ -348,7 +348,7 @@
int32 _heSndResId, _curSndId, _sndPtrOffs, _sndTmrOffs;
public:
- ScummEngine_v80he(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
+ ScummEngine_v80he(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
protected:
virtual void setupOpcodes();
@@ -421,7 +421,7 @@
int32 _curSpriteGroupId;
public:
- ScummEngine_v90he(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
+ ScummEngine_v90he(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
~ScummEngine_v90he();
virtual void scummInit();
@@ -518,7 +518,7 @@
class ScummEngine_v99he : public ScummEngine_v90he {
public:
- ScummEngine_v99he(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst) : ScummEngine_v90he(detector, syst, gs, md5sum, subst) {}
+ ScummEngine_v99he(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst) : ScummEngine_v90he(syst, gs, md5sum, subst) {}
virtual void scummInit();
@@ -549,7 +549,7 @@
const OpcodeEntryV100he *_opcodesV100he;
public:
- ScummEngine_v100he(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst) : ScummEngine_v99he(detector, syst, gs, md5sum, subst) {}
+ ScummEngine_v100he(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst) : ScummEngine_v99he(syst, gs, md5sum, subst) {}
protected:
virtual void setupOpcodes();
Modified: scummvm/trunk/engines/scumm/intern.h
===================================================================
--- scummvm/trunk/engines/scumm/intern.h 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/scumm/intern.h 2006-04-15 20:36:41 UTC (rev 21916)
@@ -50,7 +50,7 @@
byte _cursorHotspots[2 * 4];
public:
- ScummEngine_v5(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
+ ScummEngine_v5(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
protected:
virtual void setupOpcodes();
@@ -193,7 +193,7 @@
*/
class ScummEngine_v4 : public ScummEngine_v5 {
public:
- ScummEngine_v4(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
+ ScummEngine_v4(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
virtual void scummInit();
@@ -212,7 +212,7 @@
*/
class ScummEngine_v3 : public ScummEngine_v4 {
public:
- ScummEngine_v3(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
+ ScummEngine_v3(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
protected:
virtual void readRoomsOffsets();
@@ -224,7 +224,7 @@
*/
class ScummEngine_v3old : public ScummEngine_v3 {
public:
- ScummEngine_v3old(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
+ ScummEngine_v3old(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
protected:
virtual void readResTypeList(int id, const char *name);
@@ -257,7 +257,7 @@
int8 _mouseOverBoxV2;
public:
- ScummEngine_v2(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
+ ScummEngine_v2(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
virtual void scummInit();
@@ -403,7 +403,7 @@
int _currentMode;
public:
- ScummEngine_c64(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
+ ScummEngine_c64(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
virtual void scummInit();
@@ -555,7 +555,7 @@
public:
- ScummEngine_v6(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
+ ScummEngine_v6(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
virtual void scummInit();
@@ -784,7 +784,7 @@
#ifndef DISABLE_SCUMM_7_8
class ScummEngine_v7 : public ScummEngine_v6 {
public:
- ScummEngine_v7(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
+ ScummEngine_v7(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
~ScummEngine_v7();
struct LangIndexNode {
@@ -865,7 +865,7 @@
ObjectNameId *_objectIDMap;
public:
- ScummEngine_v8(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
+ ScummEngine_v8(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
~ScummEngine_v8();
protected:
Modified: scummvm/trunk/engines/scumm/plugin.cpp
===================================================================
--- scummvm/trunk/engines/scumm/plugin.cpp 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/scumm/plugin.cpp 2006-04-15 20:36:41 UTC (rev 21916)
@@ -25,7 +25,6 @@
#include "backends/fs/fs.h"
-#include "base/gameDetector.h"
#include "base/plugins.h"
#include "common/config-manager.h"
@@ -1618,7 +1617,7 @@
*
* This is heavily based on our MD5 detection scheme.
*/
-Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) {
+Engine *Engine_SCUMM_create(OSystem *syst) {
Engine *engine;
const char *gameid = ConfMan.get("gameid").c_str();
@@ -1811,65 +1810,65 @@
case 1:
case 2:
if (game.id == GID_MANIAC && game.platform == Common::kPlatformC64)
- engine = new ScummEngine_c64(detector, syst, game, md5sum, subst);
+ engine = new ScummEngine_c64(syst, game, md5sum, subst);
else
- engine = new ScummEngine_v2(detector, syst, game, md5sum, subst);
+ engine = new ScummEngine_v2(syst, game, md5sum, subst);
break;
case 3:
if (game.features & GF_OLD_BUNDLE)
- engine = new ScummEngine_v3old(detector, syst, game, md5sum, subst);
+ engine = new ScummEngine_v3old(syst, game, md5sum, subst);
else
- engine = new ScummEngine_v3(detector, syst, game, md5sum, subst);
+ engine = new ScummEngine_v3(syst, game, md5sum, subst);
break;
case 4:
- engine = new ScummEngine_v4(detector, syst, game, md5sum, subst);
+ engine = new ScummEngine_v4(syst, game, md5sum, subst);
break;
case 5:
- engine = new ScummEngine_v5(detector, syst, game, md5sum, subst);
+ engine = new ScummEngine_v5(syst, game, md5sum, subst);
break;
case 6:
switch (game.heversion) {
#ifndef DISABLE_HE
case 100:
- engine = new ScummEngine_v100he(detector, syst, game, md5sum, subst);
+ engine = new ScummEngine_v100he(syst, game, md5sum, subst);
break;
case 99:
- engine = new ScummEngine_v99he(detector, syst, game, md5sum, subst);
+ engine = new ScummEngine_v99he(syst, game, md5sum, subst);
break;
case 98:
case 95:
case 90:
- engine = new ScummEngine_v90he(detector, syst, game, md5sum, subst);
+ engine = new ScummEngine_v90he(syst, game, md5sum, subst);
break;
case 80:
- engine = new ScummEngine_v80he(detector, syst, game, md5sum, subst);
+ engine = new ScummEngine_v80he(syst, game, md5sum, subst);
break;
case 73:
case 72:
- engine = new ScummEngine_v72he(detector, syst, game, md5sum, subst);
+ engine = new ScummEngine_v72he(syst, game, md5sum, subst);
break;
case 71:
- engine = new ScummEngine_v71he(detector, syst, game, md5sum, subst);
+ engine = new ScummEngine_v71he(syst, game, md5sum, subst);
break;
case 70:
- engine = new ScummEngine_v70he(detector, syst, game, md5sum, subst);
+ engine = new ScummEngine_v70he(syst, game, md5sum, subst);
break;
#endif
#ifndef PALMOS_68K
case 61:
- engine = new ScummEngine_v60he(detector, syst, game, md5sum, subst);
+ engine = new ScummEngine_v60he(syst, game, md5sum, subst);
break;
#endif
default:
- engine = new ScummEngine_v6(detector, syst, game, md5sum, subst);
+ engine = new ScummEngine_v6(syst, game, md5sum, subst);
}
break;
#ifndef DISABLE_SCUMM_7_8
case 7:
- engine = new ScummEngine_v7(detector, syst, game, md5sum, subst);
+ engine = new ScummEngine_v7(syst, game, md5sum, subst);
break;
case 8:
- engine = new ScummEngine_v8(detector, syst, game, md5sum, subst);
+ engine = new ScummEngine_v8(syst, game, md5sum, subst);
break;
#endif
default:
Modified: scummvm/trunk/engines/scumm/scumm.cpp
===================================================================
--- scummvm/trunk/engines/scumm/scumm.cpp 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/scumm/scumm.cpp 2006-04-15 20:36:41 UTC (rev 21916)
@@ -25,7 +25,6 @@
#include "backends/fs/fs.h"
-#include "base/gameDetector.h"
#include "base/plugins.h"
#include "common/config-manager.h"
@@ -81,7 +80,7 @@
ScummEngine *g_scumm = 0;
-ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
+ScummEngine::ScummEngine(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
: Engine(syst),
_game(gs),
_substResFileName(subst),
@@ -89,8 +88,7 @@
_currentScript(0xFF), // Let debug() work on init stage
gdi(this),
res(this),
- _pauseDialog(0), _mainMenuDialog(0), _versionDialog(0),
- _targetName(detector->_targetName) {
+ _pauseDialog(0), _mainMenuDialog(0), _versionDialog(0) {
// Copy MD5 checksum
memcpy(_gameMD5, md5sum, 16);
@@ -677,22 +675,22 @@
delete _debugger;
}
-ScummEngine_v4::ScummEngine_v4(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
- : ScummEngine_v5(detector, syst, gs, md5sum, subst) {
+ScummEngine_v4::ScummEngine_v4(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
+ : ScummEngine_v5(syst, gs, md5sum, subst) {
_resourceHeaderSize = 6;
}
-ScummEngine_v3::ScummEngine_v3(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
- : ScummEngine_v4(detector, syst, gs, md5sum, subst) {
+ScummEngine_v3::ScummEngine_v3(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
+ : ScummEngine_v4(syst, gs, md5sum, subst) {
}
-ScummEngine_v3old::ScummEngine_v3old(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
- : ScummEngine_v3(detector, syst, gs, md5sum, subst) {
+ScummEngine_v3old::ScummEngine_v3old(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
+ : ScummEngine_v3(syst, gs, md5sum, subst) {
_resourceHeaderSize = 4;
}
-ScummEngine_v2::ScummEngine_v2(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
- : ScummEngine_v3old(detector, syst, gs, md5sum, subst) {
+ScummEngine_v2::ScummEngine_v2(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
+ : ScummEngine_v3old(syst, gs, md5sum, subst) {
VAR_SENTENCE_VERB = 0xFF;
VAR_SENTENCE_OBJECT1 = 0xFF;
@@ -705,14 +703,14 @@
VAR_CLICK_OBJECT = 0xFF;
}
-ScummEngine_c64::ScummEngine_c64(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
- : ScummEngine_v2(detector, syst, gs, md5sum, subst) {
+ScummEngine_c64::ScummEngine_c64(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
+ : ScummEngine_v2(syst, gs, md5sum, subst) {
_currentMode = 0;
}
-ScummEngine_v6::ScummEngine_v6(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
- : ScummEngine(detector, syst, gs, md5sum, subst) {
+ScummEngine_v6::ScummEngine_v6(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
+ : ScummEngine(syst, gs, md5sum, subst) {
_blastObjectQueuePos = 0;
memset(_blastObjectQueue, 0, sizeof(_blastObjectQueue));
_blastTextQueuePos = 0;
@@ -733,8 +731,8 @@
}
#ifndef DISABLE_HE
-ScummEngine_v70he::ScummEngine_v70he(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
- : ScummEngine_v60he(detector, syst, gs, md5sum, subst) {
+ScummEngine_v70he::ScummEngine_v70he(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
+ : ScummEngine_v60he(syst, gs, md5sum, subst) {
if (_game.platform == Common::kPlatformMacintosh && (_game.heversion >= 72 && _game.heversion <= 73))
_resExtractor = new MacResExtractor(this);
else
@@ -765,16 +763,16 @@
free(_storedFlObjects);
}
-ScummEngine_v71he::ScummEngine_v71he(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
- : ScummEngine_v70he(detector, syst, gs, md5sum, subst) {
+ScummEngine_v71he::ScummEngine_v71he(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
+ : ScummEngine_v70he(syst, gs, md5sum, subst) {
_auxBlocksNum = 0;
memset(_auxBlocks, 0, sizeof(_auxBlocks));
_auxEntriesNum = 0;
memset(_auxEntries, 0, sizeof(_auxEntries));
}
-ScummEngine_v72he::ScummEngine_v72he(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
- : ScummEngine_v71he(detector, syst, gs, md5sum, subst) {
+ScummEngine_v72he::ScummEngine_v72he(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
+ : ScummEngine_v71he(syst, gs, md5sum, subst) {
VAR_NUM_ROOMS = 0xFF;
VAR_NUM_SCRIPTS = 0xFF;
VAR_NUM_SOUNDS = 0xFF;
@@ -784,8 +782,8 @@
VAR_POLYGONS_ONLY = 0xFF;
}
-ScummEngine_v80he::ScummEngine_v80he(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
- : ScummEngine_v72he(detector, syst, gs, md5sum, subst) {
+ScummEngine_v80he::ScummEngine_v80he(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
+ : ScummEngine_v72he(syst, gs, md5sum, subst) {
_heSndResId = 0;
_curSndId = 0;
_sndPtrOffs = 0;
@@ -797,8 +795,8 @@
VAR_COLOR_DEPTH = 0xFF;
}
-ScummEngine_v90he::ScummEngine_v90he(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
- : ScummEngine_v80he(detector, syst, gs, md5sum, subst) {
+ScummEngine_v90he::ScummEngine_v90he(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
+ : ScummEngine_v80he(syst, gs, md5sum, subst) {
_sprite = new Sprite(this);
VAR_NUM_SPRITE_GROUPS = 0xFF;
@@ -822,8 +820,8 @@
#endif
#ifndef DISABLE_SCUMM_7_8
-ScummEngine_v7::ScummEngine_v7(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
- : ScummEngine_v6(detector, syst, gs, md5sum, subst) {
+ScummEngine_v7::ScummEngine_v7(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
+ : ScummEngine_v6(syst, gs, md5sum, subst) {
_verbCharset = 0;
_existLanguageFile = false;
_languageBuffer = NULL;
@@ -836,8 +834,8 @@
free(_languageIndex);
}
-ScummEngine_v8::ScummEngine_v8(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
- : ScummEngine_v7(detector, syst, gs, md5sum, subst) {
+ScummEngine_v8::ScummEngine_v8(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst)
+ : ScummEngine_v7(syst, gs, md5sum, subst) {
_objectIDMap = 0;
}
@@ -850,7 +848,7 @@
#pragma mark --- Initialization ---
#pragma mark -
-int ScummEngine::init(GameDetector &detector) {
+int ScummEngine::init() {
// Initialize backend
_system->beginGFXTransaction();
@@ -867,7 +865,7 @@
_system->initSize(_screenWidth, _screenHeight, (ConfMan.getBool("force_1x_overlay") ? 1 : 2));
defaultTo1XScaler = (_screenWidth > 320);
}
- initCommonGFX(detector, defaultTo1XScaler);
+ initCommonGFX(defaultTo1XScaler);
_system->endGFXTransaction();
// On some systems it's not safe to run CD audio games from the CD.
Modified: scummvm/trunk/engines/scumm/scumm.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm.h 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/scumm/scumm.h 2006-04-15 20:36:41 UTC (rev 21916)
@@ -41,7 +41,6 @@
class Dialog;
}
using GUI::Dialog;
-class GameDetector;
namespace Common {
class InSaveFile;
class OutSaveFile;
@@ -445,14 +444,14 @@
public:
// Constructor / Destructor
- ScummEngine(GameDetector *detector, OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
+ ScummEngine(OSystem *syst, const GameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
virtual ~ScummEngine();
/** Startup function, main loop. */
int go();
// Init functions
- int init(GameDetector &detector);
+ int init();
virtual void setupScummVars();
virtual void initScummVars();
@@ -739,7 +738,6 @@
protected:
int _resourceHeaderSize;
Common::String _baseName; // This is the name we use for opening resource files
- Common::String _targetName; // This is the game the user calls it, so use for saving
byte _resourceMapper[128];
byte *_heV7DiskOffsets;
uint32 *_heV7RoomIntOffsets;
Modified: scummvm/trunk/engines/simon/game.cpp
===================================================================
--- scummvm/trunk/engines/simon/game.cpp 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/simon/game.cpp 2006-04-15 20:36:41 UTC (rev 21916)
@@ -24,7 +24,6 @@
#include "backends/fs/fs.h"
-#include "base/gameDetector.h"
#include "base/plugins.h"
#include "common/config-manager.h"
@@ -112,7 +111,7 @@
return Simon::GAME_detectGames(fslist);
}
-Engine *Engine_SIMON_create(GameDetector *detector, OSystem *syst) {
+Engine *Engine_SIMON_create(OSystem *syst) {
const char *gameid = ConfMan.get("gameid").c_str();
for (const ObsoleteGameID *o = obsoleteGameIDsTable; o->from; ++o) {
Modified: scummvm/trunk/engines/simon/simon.cpp
===================================================================
--- scummvm/trunk/engines/simon/simon.cpp 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/simon/simon.cpp 2006-04-15 20:36:41 UTC (rev 21916)
@@ -24,7 +24,6 @@
#include "backends/fs/fs.h"
-#include "base/gameDetector.h"
#include "common/config-manager.h"
#include "common/file.h"
@@ -484,7 +483,7 @@
File::addDefaultDirectory(_gameDataPath + "SPEECH/");
}
-int SimonEngine::init(GameDetector &detector) {
+int SimonEngine::init() {
// Detect game
if (!initGame()) {
@@ -509,7 +508,7 @@
_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
_system->beginGFXTransaction();
- initCommonGFX(detector, getGameType() == GType_FF);
+ initCommonGFX(getGameType() == GType_FF);
_system->initSize(_screenWidth, _screenHeight);
_system->endGFXTransaction();
Modified: scummvm/trunk/engines/simon/simon.h
===================================================================
--- scummvm/trunk/engines/simon/simon.h 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/simon/simon.h 2006-04-15 20:36:41 UTC (rev 21916)
@@ -35,8 +35,6 @@
#include "simon/sound.h"
#include "simon/vga.h"
-class GameDetector;
-
namespace Simon {
/* Various other settings */
@@ -1044,7 +1042,7 @@
void resfile_read(void *dst, uint32 offs, uint32 size);
- int init(GameDetector &detector);
+ int init();
int go();
void openGameFile();
Modified: scummvm/trunk/engines/sky/sky.cpp
===================================================================
--- scummvm/trunk/engines/sky/sky.cpp 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/sky/sky.cpp 2006-04-15 20:36:41 UTC (rev 21916)
@@ -24,7 +24,6 @@
#include "backends/fs/fs.h"
-#include "base/gameDetector.h"
#include "base/plugins.h"
#include "common/config-manager.h"
@@ -111,7 +110,7 @@
return detectedGames;
}
-Engine *Engine_SKY_create(GameDetector *detector, OSystem *syst) {
+Engine *Engine_SKY_create(OSystem *syst) {
return new Sky::SkyEngine(syst);
}
@@ -306,9 +305,9 @@
return 0;
}
-int SkyEngine::init(GameDetector &detector) {
+int SkyEngine::init() {
_system->beginGFXTransaction();
- initCommonGFX(detector, false);
+ initCommonGFX(false);
_system->initSize(320, 200);
_system->endGFXTransaction();
Modified: scummvm/trunk/engines/sky/sky.h
===================================================================
--- scummvm/trunk/engines/sky/sky.h 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/sky/sky.h 2006-04-15 20:36:41 UTC (rev 21916)
@@ -26,8 +26,6 @@
#include "common/stdafx.h"
#include "base/engine.h"
-class GameDetector;
-
namespace Sky {
struct SystemVars {
@@ -98,7 +96,7 @@
uint32 _lastSaveTime;
- int init(GameDetector &detector);
+ int init();
void initItemList();
void initVirgin();
Modified: scummvm/trunk/engines/sword1/sword1.cpp
===================================================================
--- scummvm/trunk/engines/sword1/sword1.cpp 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/sword1/sword1.cpp 2006-04-15 20:36:41 UTC (rev 21916)
@@ -117,8 +117,8 @@
return detectedGames;
}
-Engine *Engine_SWORD1_create(GameDetector *detector, OSystem *syst) {
- return new SwordEngine(detector, syst);
+Engine *Engine_SWORD1_create(OSystem *syst) {
+ return new SwordEngine(syst);
}
REGISTER_PLUGIN(SWORD1, "Broken Sword");
@@ -131,7 +131,7 @@
strcpy(buf2, buf1);
}
-SwordEngine::SwordEngine(GameDetector *detector, OSystem *syst)
+SwordEngine::SwordEngine(OSystem *syst)
: Engine(syst) {
if (0 == scumm_stricmp(ConfMan.get("gameid").c_str(), "sword1demo"))
@@ -166,10 +166,10 @@
delete _resMan;
}
-int SwordEngine::init(GameDetector &detector) {
+int SwordEngine::init() {
_system->beginGFXTransaction();
- initCommonGFX(detector, true);
+ initCommonGFX(true);
_system->initSize(640, 480);
_system->endGFXTransaction();
Modified: scummvm/trunk/engines/sword1/sword1.h
===================================================================
--- scummvm/trunk/engines/sword1/sword1.h 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/sword1/sword1.h 2006-04-15 20:36:41 UTC (rev 21916)
@@ -25,7 +25,6 @@
#include "base/engine.h"
#include "common/util.h"
-#include "base/gameDetector.h"
#include "sword1/sworddefs.h"
namespace Sword1 {
@@ -71,7 +70,7 @@
class SwordEngine : public Engine {
void errorString(const char *buf_input, char *buf_output);
public:
- SwordEngine(GameDetector *detector, OSystem *syst);
+ SwordEngine(OSystem *syst);
virtual ~SwordEngine();
static SystemVars _systemVars;
void reinitialize(void);
@@ -79,7 +78,7 @@
uint32 _features;
protected:
int go();
- int init(GameDetector &detector);
+ int init();
private:
void delay(int32 amount);
Modified: scummvm/trunk/engines/sword2/sword2.cpp
===================================================================
--- scummvm/trunk/engines/sword2/sword2.cpp 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/sword2/sword2.cpp 2006-04-15 20:36:41 UTC (rev 21916)
@@ -23,7 +23,6 @@
#include "backends/fs/fs.h"
-#include "base/gameDetector.h"
#include "base/plugins.h"
#include "common/config-manager.h"
@@ -112,15 +111,15 @@
return detectedGames;
}
-Engine *Engine_SWORD2_create(GameDetector *detector, OSystem *syst) {
- return new Sword2::Sword2Engine(detector, syst);
+Engine *Engine_SWORD2_create(OSystem *syst) {
+ return new Sword2::Sword2Engine(syst);
}
REGISTER_PLUGIN(SWORD2, "Broken Sword 2");
namespace Sword2 {
-Sword2Engine::Sword2Engine(GameDetector *detector, OSystem *syst) : Engine(syst) {
+Sword2Engine::Sword2Engine(OSystem *syst) : Engine(syst) {
// Add default file directories
Common::File::addDefaultDirectory(_gameDataPath + "CLUSTERS/");
Common::File::addDefaultDirectory(_gameDataPath + "SWORD2/");
@@ -134,8 +133,6 @@
else
_features = 0;
- _targetName = detector->_targetName;
-
_bootParam = ConfMan.getInt("boot_param");
_saveSlot = ConfMan.getInt("save_slot");
@@ -243,12 +240,12 @@
_resman->openResource(CUR_PLAYER_ID);
}
-int Sword2Engine::init(GameDetector &detector) {
+int Sword2Engine::init() {
// Get some falling RAM and put it in your pocket, never let it slip
// away
_system->beginGFXTransaction();
- initCommonGFX(detector, true);
+ initCommonGFX(true);
_screen = new Screen(this, 640, 480);
_system->endGFXTransaction();
Modified: scummvm/trunk/engines/sword2/sword2.h
===================================================================
--- scummvm/trunk/engines/sword2/sword2.h 2006-04-15 17:39:14 UTC (rev 21915)
+++ scummvm/trunk/engines/sword2/sword2.h 2006-04-15 20:36:41 UTC (rev 21916)
@@ -36,7 +36,6 @@
#define MAX_starts 100
#define MAX_description 100
-class GameDetector;
class OSystem;
namespace Sword2 {
@@ -121,10 +120,10 @@
StartUp _startList[MAX_starts];
public:
- Sword2Engine(GameDetector *detector, OSystem *syst);
+ Sword2Engine(OSystem *syst);
~Sword2Engine();
int go();
- int init(GameDetector &detector);
+ int init();
void registerDefaultSettings();
void readSettings();
@@ -138,7 +137,6 @@
bool _quit;
uint32 _features;
- Common::String _targetName; // target name for saves
MemoryManager *_memory;
ResourceManager *_resman;
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