aboutsummaryrefslogtreecommitdiff
path: root/engines/sword2
diff options
context:
space:
mode:
authorMax Horn2006-04-15 20:36:41 +0000
committerMax Horn2006-04-15 20:36:41 +0000
commit68cb7f52c8dd64ccfe8f28e847b530c8835175c3 (patch)
tree635011611fbc8592289b85c0b704d5a0cec057ea /engines/sword2
parentad45318328e23b76e346414c62ef4c22d8ebe059 (diff)
downloadscummvm-rg350-68cb7f52c8dd64ccfe8f28e847b530c8835175c3.tar.gz
scummvm-rg350-68cb7f52c8dd64ccfe8f28e847b530c8835175c3.tar.bz2
scummvm-rg350-68cb7f52c8dd64ccfe8f28e847b530c8835175c3.zip
- 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 svn-id: r21916
Diffstat (limited to 'engines/sword2')
-rw-r--r--engines/sword2/sword2.cpp13
-rw-r--r--engines/sword2/sword2.h6
2 files changed, 7 insertions, 12 deletions
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp
index 32ce29c0f0..0d354a3f35 100644
--- a/engines/sword2/sword2.cpp
+++ b/engines/sword2/sword2.cpp
@@ -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 @@ DetectedGameList Engine_SWORD2_detectGames(const FSList &fslist) {
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 @@ Sword2Engine::Sword2Engine(GameDetector *detector, OSystem *syst) : Engine(syst)
else
_features = 0;
- _targetName = detector->_targetName;
-
_bootParam = ConfMan.getInt("boot_param");
_saveSlot = ConfMan.getInt("save_slot");
@@ -243,12 +240,12 @@ void Sword2Engine::setupPersistentResources() {
_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();
diff --git a/engines/sword2/sword2.h b/engines/sword2/sword2.h
index f3aff6b0fb..31ab253830 100644
--- a/engines/sword2/sword2.h
+++ b/engines/sword2/sword2.h
@@ -36,7 +36,6 @@
#define MAX_starts 100
#define MAX_description 100
-class GameDetector;
class OSystem;
namespace Sword2 {
@@ -121,10 +120,10 @@ private:
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 @@ public:
bool _quit;
uint32 _features;
- Common::String _targetName; // target name for saves
MemoryManager *_memory;
ResourceManager *_resman;