aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorMax Horn2009-02-15 08:20:53 +0000
committerMax Horn2009-02-15 08:20:53 +0000
commit206eb0573ea33d3f927a89f0e7c9573976557254 (patch)
tree014f615affd9394f786270516b55b410d851e987 /engines/sci
parent75f4c44fd0644e10ceb556b2fbeaa7737d521a85 (diff)
downloadscummvm-rg350-206eb0573ea33d3f927a89f0e7c9573976557254.tar.gz
scummvm-rg350-206eb0573ea33d3f927a89f0e7c9573976557254.tar.bz2
scummvm-rg350-206eb0573ea33d3f927a89f0e7c9573976557254.zip
SCI: Updated some stuff to recent ScummVM changes (fixes compilation of files in engines/sci/scummvm/)
svn-id: r38198
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/scummvm/detection.cpp14
-rw-r--r--engines/sci/scummvm/scummvm_engine.cpp17
-rw-r--r--engines/sci/scummvm/scummvm_engine.h6
3 files changed, 19 insertions, 18 deletions
diff --git a/engines/sci/scummvm/detection.cpp b/engines/sci/scummvm/detection.cpp
index c029657ed9..84f7eca95f 100644
--- a/engines/sci/scummvm/detection.cpp
+++ b/engines/sci/scummvm/detection.cpp
@@ -20,7 +20,7 @@
*
*/
-#include "common/advancedDetector.h"
+#include "engines/advancedDetector.h"
#include "base/plugins.h"
#include "scummvm_engine.h"
@@ -862,7 +862,7 @@ static const struct SciGameDescription SciGameGeneric[] = {
};
// Filename based fallback information
-static const struct Common::ADFileBasedFallback SciGameFallback[] = {
+static const struct ADFileBasedFallback SciGameFallback[] = {
{(const void*)&SciGameGeneric[0], {"resource.map", "resource.000", NULL} },
{(const void*)&SciGameGeneric[0], {"resource.map", "resource.001", NULL} },
{(const void*)&SciGameGeneric[0], {"resmap.000", "ressci.000", NULL} },
@@ -870,7 +870,7 @@ static const struct Common::ADFileBasedFallback SciGameFallback[] = {
{0, {NULL}}
};
-static const Common::ADParams detectionParams = {
+static const ADParams detectionParams = {
// Pointer to ADGameDescription or its superset structure
(const byte *)SciGameDescriptions,
// Size of that superset structure
@@ -889,9 +889,9 @@ static const Common::ADParams detectionParams = {
0
};
-class SciMetaEngine : public Common::AdvancedMetaEngine {
+class SciMetaEngine : public AdvancedMetaEngine {
public:
- SciMetaEngine() : Common::AdvancedMetaEngine(detectionParams) {}
+ SciMetaEngine() : AdvancedMetaEngine(detectionParams) {}
virtual const char *getName() const {
return "SCI Engine";
@@ -901,11 +901,11 @@ public:
return "Sierra's Creative Interpreter (C) Sierra Online";
}
- virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *gd) const;
+ virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const;
};
-bool SciMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *gd) const {
+bool SciMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const {
const SciGameDescription *desc = (const SciGameDescription *)gd;
*engine = new SciEngine(syst, desc);
diff --git a/engines/sci/scummvm/scummvm_engine.cpp b/engines/sci/scummvm/scummvm_engine.cpp
index 652666fc3e..907aa39e05 100644
--- a/engines/sci/scummvm/scummvm_engine.cpp
+++ b/engines/sci/scummvm/scummvm_engine.cpp
@@ -26,11 +26,11 @@
***************************************************************************/
#include "common/system.h"
-#include "common/advancedDetector.h"
#include "common/config-manager.h"
-#include "scummvm_engine.h"
-#include "engine.h"
+#include "engines/advancedDetector.h"
+#include "sci/scummvm/scummvm_engine.h"
+#include "sci/include/engine.h"
//namespace Sci {
@@ -375,7 +375,7 @@ SciEngine::~SciEngine() {
//Common::clearAllSpecialDebugLevels();
}
-int SciEngine::init(void) {
+Common::Error SciEngine::init() {
initCommonGFX(false);
_system->beginGFXTransaction();
//_system->initSize(640, 400),;
@@ -390,10 +390,10 @@ int SciEngine::init(void) {
// Additional setup.
printf("SciEngine::init\n");
- return 0;
+ return Common::kNoError;
}
-int SciEngine::go() {
+Common::Error SciEngine::go() {
// Your main even loop should be (invoked from) here.
/* bool end = false;
@@ -408,9 +408,10 @@ int SciEngine::go() {
_system->delayMillis(10);
} */
- main_(_gameDataPath.c_str());
+ // FIXME: Not a good idea to use _gameDataDir.getPath() like this...
+ main_(_gameDataDir.getPath().c_str());
- return 0;
+ return Common::kNoError;
}
//} // End of namespace Sci
diff --git a/engines/sci/scummvm/scummvm_engine.h b/engines/sci/scummvm/scummvm_engine.h
index dc614f6d55..5f7834395a 100644
--- a/engines/sci/scummvm/scummvm_engine.h
+++ b/engines/sci/scummvm/scummvm_engine.h
@@ -22,7 +22,7 @@ struct GameFlags {
};
struct SciGameDescription {
- Common::ADGameDescription desc;
+ ADGameDescription desc;
GameFlags flags;
};
@@ -33,8 +33,8 @@ class SciEngine : public Engine {
SciEngine(OSystem *syst, const SciGameDescription *desc);
~SciEngine();
- virtual int init(void);
- virtual int go(void);
+ virtual Common::Error init(void);
+ virtual Common::Error go(void);
private:
//Console *_console;