diff options
author | Fabio Battaglia | 2009-03-15 11:36:16 +0000 |
---|---|---|
committer | Fabio Battaglia | 2009-03-15 11:36:16 +0000 |
commit | 1f299bb24ac9ab8ded2542aaeeffad77b53faa9b (patch) | |
tree | ea7b2e2aaa92ed9192fbb94d897f4eb70ff997ca | |
parent | 647276b8859210223c10abe51c09aac5fb6e9159 (diff) | |
download | scummvm-rg350-1f299bb24ac9ab8ded2542aaeeffad77b53faa9b.tar.gz scummvm-rg350-1f299bb24ac9ab8ded2542aaeeffad77b53faa9b.tar.bz2 scummvm-rg350-1f299bb24ac9ab8ded2542aaeeffad77b53faa9b.zip |
sword2: added detection for Broken Sword 2 PSX, and a check to say wether pc or psx version is run
svn-id: r39417
-rw-r--r-- | engines/sword2/sword2.cpp | 9 | ||||
-rw-r--r-- | engines/sword2/sword2.h | 6 |
2 files changed, 15 insertions, 0 deletions
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp index 1e7bb2f5fb..af40e7d635 100644 --- a/engines/sword2/sword2.cpp +++ b/engines/sword2/sword2.cpp @@ -54,6 +54,8 @@ namespace Sword2 { +Common::Platform Sword2Engine::_platform; + struct GameSettings { const char *gameid; const char *description; @@ -65,6 +67,7 @@ static const GameSettings sword2_settings[] = { /* Broken Sword 2 */ {"sword2", "Broken Sword 2: The Smoking Mirror", 0, "players.clu" }, {"sword2alt", "Broken Sword 2: The Smoking Mirror (alt)", 0, "r2ctlns.ocx" }, + {"sword2psx", "Broken Sword 2: The Smoking Mirror (PlayStation)", 0, "screens.clu"}, {"sword2demo", "Broken Sword 2: The Smoking Mirror (Demo)", Sword2::GF_DEMO, "players.clu" }, {NULL, NULL, 0, NULL} }; @@ -263,6 +266,12 @@ Sword2Engine::Sword2Engine(OSystem *syst) : Engine(syst) { else _features = 0; + // Check if we are running PC or PSX version. + if (0 == scumm_stricmp(ConfMan.get("gameid").c_str(), "sword2psx")) + Sword2Engine::_platform = Common::kPlatformPSX; + else + Sword2Engine::_platform = Common::kPlatformPC; + _bootParam = ConfMan.getInt("boot_param"); _saveSlot = ConfMan.getInt("save_slot"); diff --git a/engines/sword2/sword2.h b/engines/sword2/sword2.h index db1c075951..e262a35f09 100644 --- a/engines/sword2/sword2.h +++ b/engines/sword2/sword2.h @@ -122,6 +122,9 @@ private: StartUp _startList[MAX_starts]; + // Original game platform (PC/PSX) + static Common::Platform _platform; + protected: // Engine APIs virtual Common::Error run(); @@ -233,6 +236,9 @@ public: // Convenience alias for OSystem::getMillis(). // This is a bit hackish, of course :-). uint32 getMillis(); + + //Used to check wether we are running PSX version + static bool isPsx() { return _platform == Common::kPlatformPSX; } }; } // End of namespace Sword2 |