aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/agos/agos.cpp32
-rw-r--r--engines/agos/agos.h27
-rw-r--r--engines/agos/detection.cpp23
-rw-r--r--engines/agos/feeble.cpp8
-rw-r--r--engines/agos/pn.cpp4
5 files changed, 46 insertions, 48 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index 7e4c564798..4d879909c4 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -56,8 +56,8 @@ static const GameSpecificSettings puzzlepack_settings = {
};
#ifdef ENABLE_AGOS2
-AGOSEngine_DIMP::AGOSEngine_DIMP(OSystem *system)
- : AGOSEngine_PuzzlePack(system) {
+AGOSEngine_DIMP::AGOSEngine_DIMP(OSystem *system, const AGOSGameDescription *gd)
+ : AGOSEngine_PuzzlePack(system, gd) {
_iconToggleCount = 0;
_voiceCount = 0;
@@ -67,24 +67,24 @@ AGOSEngine_DIMP::AGOSEngine_DIMP(OSystem *system)
_tSecondCount = 0;
}
-AGOSEngine_PuzzlePack::AGOSEngine_PuzzlePack(OSystem *system)
- : AGOSEngine_Feeble(system) {
+AGOSEngine_PuzzlePack::AGOSEngine_PuzzlePack(OSystem *system, const AGOSGameDescription *gd)
+ : AGOSEngine_Feeble(system, gd) {
_oopsValid = false;
_gameTime = 0;
}
#endif
-AGOSEngine_Simon2::AGOSEngine_Simon2(OSystem *system)
- : AGOSEngine_Simon1(system) {
+AGOSEngine_Simon2::AGOSEngine_Simon2(OSystem *system, const AGOSGameDescription *gd)
+ : AGOSEngine_Simon1(system, gd) {
}
-AGOSEngine_Simon1::AGOSEngine_Simon1(OSystem *system)
- : AGOSEngine_Waxworks(system) {
+AGOSEngine_Simon1::AGOSEngine_Simon1(OSystem *system, const AGOSGameDescription *gd)
+ : AGOSEngine_Waxworks(system, gd) {
}
-AGOSEngine_Waxworks::AGOSEngine_Waxworks(OSystem *system)
- : AGOSEngine_Elvira2(system) {
+AGOSEngine_Waxworks::AGOSEngine_Waxworks(OSystem *system, const AGOSGameDescription *gd)
+ : AGOSEngine_Elvira2(system, gd) {
_boxCR = false;
_boxLineCount = 0;
@@ -100,16 +100,16 @@ AGOSEngine_Waxworks::AGOSEngine_Waxworks(OSystem *system)
memset(_lineCounts, 0, sizeof(_lineCounts));
}
-AGOSEngine_Elvira2::AGOSEngine_Elvira2(OSystem *system)
- : AGOSEngine_Elvira1(system) {
+AGOSEngine_Elvira2::AGOSEngine_Elvira2(OSystem *system, const AGOSGameDescription *gd)
+ : AGOSEngine_Elvira1(system, gd) {
}
-AGOSEngine_Elvira1::AGOSEngine_Elvira1(OSystem *system)
- : AGOSEngine(system) {
+AGOSEngine_Elvira1::AGOSEngine_Elvira1(OSystem *system, const AGOSGameDescription *gd)
+ : AGOSEngine(system, gd) {
}
-AGOSEngine::AGOSEngine(OSystem *syst)
- : Engine(syst), _rnd("agos") {
+AGOSEngine::AGOSEngine(OSystem *system, const AGOSGameDescription *gd)
+ : Engine(system), _rnd("agos"), _gameDescription(gd) {
_vcPtr = 0;
_vcGetOutOfCode = 0;
diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index 60836b8361..aa68a05eee 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -176,6 +176,7 @@ class Debugger;
#endif
class AGOSEngine : public Engine {
+protected:
friend class Debugger;
// Engine APIs
@@ -193,7 +194,6 @@ class AGOSEngine : public Engine {
virtual void syncSoundSettings();
virtual void pauseEngineIntern(bool pause);
-public:
virtual void setupOpcodes();
uint16 _numOpcodes, _opcode;
@@ -205,8 +205,9 @@ public:
virtual void setupVideoOpcodes(VgaOpcodeProc *op);
- const AGOSGameDescription *_gameDescription;
+ const AGOSGameDescription * const _gameDescription;
+public:
virtual void setupGame();
int getGameId() const;
@@ -584,7 +585,7 @@ protected:
byte _hebrewCharWidths[32];
public:
- AGOSEngine(OSystem *syst);
+ AGOSEngine(OSystem *system, const AGOSGameDescription *gd);
virtual ~AGOSEngine();
byte *_curSfxFile;
@@ -1281,7 +1282,7 @@ class AGOSEngine_PN : public AGOSEngine {
void setupBoxes();
int readfromline();
public:
- AGOSEngine_PN(OSystem *system);
+ AGOSEngine_PN(OSystem *system, const AGOSGameDescription *gd);
~AGOSEngine_PN();
virtual void setupGame();
@@ -1523,7 +1524,7 @@ protected:
class AGOSEngine_Elvira1 : public AGOSEngine {
public:
- AGOSEngine_Elvira1(OSystem *system);
+ AGOSEngine_Elvira1(OSystem *system, const AGOSGameDescription *gd);
//~AGOSEngine_Elvira1();
virtual void setupGame();
@@ -1604,7 +1605,7 @@ protected:
class AGOSEngine_Elvira2 : public AGOSEngine_Elvira1 {
public:
- AGOSEngine_Elvira2(OSystem *system);
+ AGOSEngine_Elvira2(OSystem *system, const AGOSGameDescription *gd);
//~AGOSEngine_Elvira2();
virtual void setupGame();
@@ -1699,7 +1700,7 @@ protected:
class AGOSEngine_Waxworks : public AGOSEngine_Elvira2 {
public:
- AGOSEngine_Waxworks(OSystem *system);
+ AGOSEngine_Waxworks(OSystem *system, const AGOSGameDescription *gd);
//~AGOSEngine_Waxworks();
virtual void setupGame();
@@ -1766,7 +1767,7 @@ protected:
class AGOSEngine_Simon1 : public AGOSEngine_Waxworks {
public:
- AGOSEngine_Simon1(OSystem *system);
+ AGOSEngine_Simon1(OSystem *system, const AGOSGameDescription *gd);
//~AGOSEngine_Simon1();
virtual void setupGame();
@@ -1837,7 +1838,7 @@ protected:
class AGOSEngine_Simon2 : public AGOSEngine_Simon1 {
public:
- AGOSEngine_Simon2(OSystem *system);
+ AGOSEngine_Simon2(OSystem *system, const AGOSGameDescription *gd);
//~AGOSEngine_Simon2();
virtual void setupGame();
@@ -1884,7 +1885,7 @@ protected:
#ifdef ENABLE_AGOS2
class AGOSEngine_Feeble : public AGOSEngine_Simon2 {
public:
- AGOSEngine_Feeble(OSystem *system);
+ AGOSEngine_Feeble(OSystem *system, const AGOSGameDescription *gd);
~AGOSEngine_Feeble();
virtual void setupGame();
@@ -2023,7 +2024,7 @@ protected:
class AGOSEngine_FeebleDemo : public AGOSEngine_Feeble {
public:
- AGOSEngine_FeebleDemo(OSystem *system);
+ AGOSEngine_FeebleDemo(OSystem *system, const AGOSGameDescription *gd);
protected:
bool _filmMenuUsed;
@@ -2044,7 +2045,7 @@ protected:
class AGOSEngine_PuzzlePack : public AGOSEngine_Feeble {
public:
- AGOSEngine_PuzzlePack(OSystem *system);
+ AGOSEngine_PuzzlePack(OSystem *system, const AGOSGameDescription *gd);
//~AGOSEngine_PuzzlePack();
virtual void setupGame();
@@ -2103,7 +2104,7 @@ protected:
class AGOSEngine_DIMP : public AGOSEngine_PuzzlePack {
public:
- AGOSEngine_DIMP(OSystem *system);
+ AGOSEngine_DIMP(OSystem *system, const AGOSGameDescription *gd);
//~AGOSEngine_DIMP();
virtual void setupOpcodes();
diff --git a/engines/agos/detection.cpp b/engines/agos/detection.cpp
index dfd4660f9e..629a5d63fc 100644
--- a/engines/agos/detection.cpp
+++ b/engines/agos/detection.cpp
@@ -148,44 +148,41 @@ bool AgosMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGame
switch (gd->gameType) {
case AGOS::GType_PN:
- *engine = new AGOS::AGOSEngine_PN(syst);
+ *engine = new AGOS::AGOSEngine_PN(syst, gd);
break;
case AGOS::GType_ELVIRA1:
- *engine = new AGOS::AGOSEngine_Elvira1(syst);
+ *engine = new AGOS::AGOSEngine_Elvira1(syst, gd);
break;
case AGOS::GType_ELVIRA2:
- *engine = new AGOS::AGOSEngine_Elvira2(syst);
+ *engine = new AGOS::AGOSEngine_Elvira2(syst, gd);
break;
case AGOS::GType_WW:
- *engine = new AGOS::AGOSEngine_Waxworks(syst);
+ *engine = new AGOS::AGOSEngine_Waxworks(syst, gd);
break;
case AGOS::GType_SIMON1:
- *engine = new AGOS::AGOSEngine_Simon1(syst);
+ *engine = new AGOS::AGOSEngine_Simon1(syst, gd);
break;
case AGOS::GType_SIMON2:
- *engine = new AGOS::AGOSEngine_Simon2(syst);
+ *engine = new AGOS::AGOSEngine_Simon2(syst, gd);
break;
#ifdef ENABLE_AGOS2
case AGOS::GType_FF:
if (gd->features & GF_DEMO)
- *engine = new AGOS::AGOSEngine_FeebleDemo(syst);
+ *engine = new AGOS::AGOSEngine_FeebleDemo(syst, gd);
else
- *engine = new AGOS::AGOSEngine_Feeble(syst);
+ *engine = new AGOS::AGOSEngine_Feeble(syst, gd);
break;
case AGOS::GType_PP:
if (gd->gameId == GID_DIMP)
- *engine = new AGOS::AGOSEngine_DIMP(syst);
+ *engine = new AGOS::AGOSEngine_DIMP(syst, gd);
else
- *engine = new AGOS::AGOSEngine_PuzzlePack(syst);
+ *engine = new AGOS::AGOSEngine_PuzzlePack(syst, gd);
break;
#endif
default:
res = false;
error("AGOS engine: unknown gameType");
}
- if (res) {
- ((AGOS::AGOSEngine *)*engine)->_gameDescription = gd;
- }
return res;
}
diff --git a/engines/agos/feeble.cpp b/engines/agos/feeble.cpp
index 64d2002b5a..4c82b7e19d 100644
--- a/engines/agos/feeble.cpp
+++ b/engines/agos/feeble.cpp
@@ -32,8 +32,8 @@
namespace AGOS {
-AGOSEngine_Feeble::AGOSEngine_Feeble(OSystem *system)
- : AGOSEngine_Simon2(system) {
+AGOSEngine_Feeble::AGOSEngine_Feeble(OSystem *system, const AGOSGameDescription *gd)
+ : AGOSEngine_Simon2(system, gd) {
_interactiveVideo = 0;
_moviePlayer = 0;
@@ -108,8 +108,8 @@ void AGOSEngine_Feeble::stopInteractiveVideo() {
}
}
-AGOSEngine_FeebleDemo::AGOSEngine_FeebleDemo(OSystem *system)
- : AGOSEngine_Feeble(system) {
+AGOSEngine_FeebleDemo::AGOSEngine_FeebleDemo(OSystem *system, const AGOSGameDescription *gd)
+ : AGOSEngine_Feeble(system, gd) {
_filmMenuUsed = 0;
}
diff --git a/engines/agos/pn.cpp b/engines/agos/pn.cpp
index 9efed90860..667a5c3fc8 100644
--- a/engines/agos/pn.cpp
+++ b/engines/agos/pn.cpp
@@ -27,8 +27,8 @@
namespace AGOS {
-AGOSEngine_PN::AGOSEngine_PN(OSystem *system)
- : AGOSEngine(system) {
+AGOSEngine_PN::AGOSEngine_PN(OSystem *system, const AGOSGameDescription *gd)
+ : AGOSEngine(system, gd) {
_stackbase = 0;
_tagOfActiveDoline = 0;