aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2008-05-03 19:32:45 +0000
committerJohannes Schickel2008-05-03 19:32:45 +0000
commit895adc75fa26335a58f31310ecb15e17fdc1667c (patch)
tree6174383b54b5a6d069fb04ce12dd048e50cb3a40
parentd5545bd8c5589e8d919350b932eaed76b28e83e9 (diff)
downloadscummvm-rg350-895adc75fa26335a58f31310ecb15e17fdc1667c.tar.gz
scummvm-rg350-895adc75fa26335a58f31310ecb15e17fdc1667c.tar.bz2
scummvm-rg350-895adc75fa26335a58f31310ecb15e17fdc1667c.zip
Cleanup.
svn-id: r31842
-rw-r--r--engines/kyra/kyra_hof.cpp12
-rw-r--r--engines/kyra/kyra_hof.h2
-rw-r--r--engines/kyra/kyra_mr.cpp12
-rw-r--r--engines/kyra/kyra_mr.h2
-rw-r--r--engines/kyra/kyra_v2.h3
-rw-r--r--engines/kyra/sequences_v2.cpp2
6 files changed, 18 insertions, 15 deletions
diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp
index 6e0961264f..fad7717e5b 100644
--- a/engines/kyra/kyra_hof.cpp
+++ b/engines/kyra/kyra_hof.cpp
@@ -40,19 +40,19 @@
namespace Kyra {
-namespace {
-const KyraEngine_v2::EngineDesc hofEngineDesc = {
+const KyraEngine_v2::EngineDesc KyraEngine_HoF::_hofEngineDesc = {
+ // Generic shape related
64,
+ KyraEngine_HoF::_characterFrameTable,
+ // Scene script
8,
+ // Animation script specific
33
};
-} // end of anonymous namespace
-
-KyraEngine_HoF::KyraEngine_HoF(OSystem *system, const GameFlags &flags) : KyraEngine_v2(system, flags, hofEngineDesc), _updateFunctor(this, &KyraEngine_HoF::update) {
- KyraEngine_v2::_characterFrameTable = _characterFrameTable;
+KyraEngine_HoF::KyraEngine_HoF(OSystem *system, const GameFlags &flags) : KyraEngine_v2(system, flags, _hofEngineDesc), _updateFunctor(this, &KyraEngine_HoF::update) {
_mouseSHPBuf = 0;
_debugger = 0;
_screen = 0;
diff --git a/engines/kyra/kyra_hof.h b/engines/kyra/kyra_hof.h
index baecdc687a..4035e49ce1 100644
--- a/engines/kyra/kyra_hof.h
+++ b/engines/kyra/kyra_hof.h
@@ -204,6 +204,8 @@ public:
virtual TextDisplayer *text() { return _text; }
int language() const { return _lang; }
protected:
+ static const EngineDesc _hofEngineDesc;
+
// intro/outro
void seq_playSequences(int startSeq, int endSeq = -1);
diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp
index 442601575a..b1b8e7b60f 100644
--- a/engines/kyra/kyra_mr.cpp
+++ b/engines/kyra/kyra_mr.cpp
@@ -41,19 +41,19 @@
namespace Kyra {
-namespace {
-const KyraEngine_v2::EngineDesc mrEngineDesc = {
+const KyraEngine_v2::EngineDesc KyraEngine_MR::_mrEngineDesc = {
+ // Generic shape related
248,
+ KyraEngine_MR::_characterFrameTable,
+ // Scene script
9,
+ // Animation script specific
9
};
-} // end of anonymous namespace
-
-KyraEngine_MR::KyraEngine_MR(OSystem *system, const GameFlags &flags) : KyraEngine_v2(system, flags, mrEngineDesc) {
- KyraEngine_v2::_characterFrameTable = _characterFrameTable;
+KyraEngine_MR::KyraEngine_MR(OSystem *system, const GameFlags &flags) : KyraEngine_v2(system, flags, _mrEngineDesc) {
_soundDigital = 0;
_musicSoundChannel = -1;
_menuAudioFile = "TITLE1.AUD";
diff --git a/engines/kyra/kyra_mr.h b/engines/kyra/kyra_mr.h
index c1496a5ffa..e662c2e824 100644
--- a/engines/kyra/kyra_mr.h
+++ b/engines/kyra/kyra_mr.h
@@ -62,6 +62,8 @@ public:
void playVQA(const char *name);
protected:
+ static const EngineDesc _mrEngineDesc;
+
// --
Screen_MR *_screen;
SoundDigital *_soundDigital;
diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h
index 730366a435..e5d91d61b7 100644
--- a/engines/kyra/kyra_v2.h
+++ b/engines/kyra/kyra_v2.h
@@ -43,6 +43,7 @@ public:
struct EngineDesc {
// Generic shape related
const int itemShapeStart;
+ const uint8 *characterFrameTable;
// Scene script
const int firstAnimSceneScript;
@@ -157,8 +158,6 @@ protected:
virtual int getScale(int x, int y) = 0;
- const uint8 *_characterFrameTable;
-
// Scene
struct SceneDesc {
char filename1[10];
diff --git a/engines/kyra/sequences_v2.cpp b/engines/kyra/sequences_v2.cpp
index 1530ddd3f0..aef510a616 100644
--- a/engines/kyra/sequences_v2.cpp
+++ b/engines/kyra/sequences_v2.cpp
@@ -125,7 +125,7 @@ void KyraEngine_v2::processAnimationScript(int allowSkip, int resetChar) {
update();
}
- _mainCharacter.animFrame = _characterFrameTable[_mainCharacter.facing];
+ _mainCharacter.animFrame = _desc.characterFrameTable[_mainCharacter.facing];
updateCharacterAnim(0);
}