[Scummvm-cvs-logs] SF.net SVN: scummvm:[38502] scummvm/trunk/engines/sci
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Wed Feb 18 21:08:50 CET 2009
Revision: 38502
http://scummvm.svn.sourceforge.net/scummvm/?rev=38502&view=rev
Author: thebluegr
Date: 2009-02-18 20:08:49 +0000 (Wed, 18 Feb 2009)
Log Message:
-----------
Added methods to get information for the detected game version
Modified Paths:
--------------
scummvm/trunk/engines/sci/detection.cpp
scummvm/trunk/engines/sci/sci.cpp
scummvm/trunk/engines/sci/sci.h
Modified: scummvm/trunk/engines/sci/detection.cpp
===================================================================
--- scummvm/trunk/engines/sci/detection.cpp 2009-02-18 20:03:32 UTC (rev 38501)
+++ scummvm/trunk/engines/sci/detection.cpp 2009-02-18 20:08:49 UTC (rev 38502)
@@ -89,6 +89,26 @@
{0, 0}
};
+const char* SciEngine::getGameID() const {
+ return _gameDescription->desc.gameid;
+}
+
+Common::Platform SciEngine::getPlatform() const {
+ return _gameDescription->desc.platform;
+}
+
+Common::Language SciEngine::getLanguage() const {
+ return _gameDescription->desc.language;
+}
+
+uint32 SciEngine::getFlags() const {
+ return _gameDescription->desc.flags;
+}
+
+uint16 SciEngine::getVersion() const {
+ return _gameDescription->version;
+}
+
/*
// Missing - from FreeSCI
{ 0x980CEAD3, SCI_VERSION(0, 000, 629), "Demo Quest" },
Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp 2009-02-18 20:03:32 UTC (rev 38501)
+++ scummvm/trunk/engines/sci/sci.cpp 2009-02-18 20:08:49 UTC (rev 38502)
@@ -129,7 +129,7 @@
}
SciEngine::SciEngine(OSystem *syst, const SciGameDescription *desc)
- : Engine(syst) {
+ : Engine(syst), _gameDescription(desc) {
// Put your engine in a sane state, but do nothing big yet;
// in particular, do not load data from files; rather, if you
// need to do such things, do them from init().
@@ -141,7 +141,6 @@
// Set up the engine specific debug levels
//Common::addSpecialDebugLevel(SCI_DEBUG_RESOURCES, "resources", "Debug the resources loading");
- _version = desc->version;
printf("SciEngine::SciEngine\n");
}
Modified: scummvm/trunk/engines/sci/sci.h
===================================================================
--- scummvm/trunk/engines/sci/sci.h 2009-02-18 20:03:32 UTC (rev 38501)
+++ scummvm/trunk/engines/sci/sci.h 2009-02-18 20:08:49 UTC (rev 38502)
@@ -61,9 +61,15 @@
virtual Common::Error init(void);
virtual Common::Error go(void);
- int getVersion() { return _version; }
+
+ const SciGameDescription *_gameDescription;
+ const char* getGameID() const;
+ uint16 getVersion() const;
+ Common::Language getLanguage() const;
+ Common::Platform getPlatform() const;
+ uint32 getFlags() const;
+
private:
- int _version;
//Console *_console;
};
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