From 1f299bb24ac9ab8ded2542aaeeffad77b53faa9b Mon Sep 17 00:00:00 2001 From: Fabio Battaglia Date: Sun, 15 Mar 2009 11:36:16 +0000 Subject: sword2: added detection for Broken Sword 2 PSX, and a check to say wether pc or psx version is run svn-id: r39417 --- engines/sword2/sword2.cpp | 9 +++++++++ engines/sword2/sword2.h | 6 ++++++ 2 files changed, 15 insertions(+) (limited to 'engines') 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 -- cgit v1.2.3