SCI: Updated some stuff to recent ScummVM changes (fixes compilation of files in engines/sci/scummvm/)

svn-id: r38198
This commit is contained in:
Max Horn 2009-02-15 08:20:53 +00:00
parent 75f4c44fd0
commit 206eb0573e
3 changed files with 19 additions and 18 deletions

View File

@ -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);

View File

@ -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

View File

@ -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;