AGOS: cleanup

This commit is contained in:
Max Horn 2011-05-17 15:32:41 +02:00
parent d84ae94b54
commit 183e018c19
5 changed files with 46 additions and 48 deletions

View File

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

View File

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

View File

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

View File

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

View File

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