[Scummvm-cvs-logs] SF.net SVN: scummvm:[39417] scummvm/trunk/engines/sword2

hkz at users.sourceforge.net hkz at users.sourceforge.net
Sun Mar 15 12:36:16 CET 2009


Revision: 39417
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39417&view=rev
Author:   hkz
Date:     2009-03-15 11:36:16 +0000 (Sun, 15 Mar 2009)

Log Message:
-----------
sword2: added detection for Broken Sword 2 PSX, and a check to say wether pc or psx version is run

Modified Paths:
--------------
    scummvm/trunk/engines/sword2/sword2.cpp
    scummvm/trunk/engines/sword2/sword2.h

Modified: scummvm/trunk/engines/sword2/sword2.cpp
===================================================================
--- scummvm/trunk/engines/sword2/sword2.cpp	2009-03-15 10:25:22 UTC (rev 39416)
+++ scummvm/trunk/engines/sword2/sword2.cpp	2009-03-15 11:36:16 UTC (rev 39417)
@@ -54,6 +54,8 @@
 
 namespace Sword2 {
 
+Common::Platform Sword2Engine::_platform;
+
 struct GameSettings {
 	const char *gameid;
 	const char *description;
@@ -65,6 +67,7 @@
 	/* 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 @@
 	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");
 

Modified: scummvm/trunk/engines/sword2/sword2.h
===================================================================
--- scummvm/trunk/engines/sword2/sword2.h	2009-03-15 10:25:22 UTC (rev 39416)
+++ scummvm/trunk/engines/sword2/sword2.h	2009-03-15 11:36:16 UTC (rev 39417)
@@ -122,6 +122,9 @@
 
 	StartUp _startList[MAX_starts];
 
+	// Original game platform (PC/PSX)
+	static Common::Platform _platform;
+
 protected:
 	// Engine APIs
 	virtual Common::Error run();
@@ -233,6 +236,9 @@
 	// 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


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