aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMax Horn2006-04-23 19:41:54 +0000
committerMax Horn2006-04-23 19:41:54 +0000
commitb2befd795174c76f5d1136f838eb585ce1d34aa7 (patch)
treed25f4b74ec2aec3024b959ebfc74447827b502cc /engines
parentd68f95b3be82fe0048b6ba72f70b80887214a0e6 (diff)
downloadscummvm-rg350-b2befd795174c76f5d1136f838eb585ce1d34aa7.tar.gz
scummvm-rg350-b2befd795174c76f5d1136f838eb585ce1d34aa7.tar.bz2
scummvm-rg350-b2befd795174c76f5d1136f838eb585ce1d34aa7.zip
Moved _heTimers to ScummEngine_v60he
svn-id: r22116
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/he/intern_he.h7
-rw-r--r--engines/scumm/he/sound_he.cpp2
-rw-r--r--engines/scumm/he/sound_he.h6
-rw-r--r--engines/scumm/scumm.cpp10
-rw-r--r--engines/scumm/scumm.h4
5 files changed, 20 insertions, 9 deletions
diff --git a/engines/scumm/he/intern_he.h b/engines/scumm/he/intern_he.h
index dc906a654c..9cba1d1b1b 100644
--- a/engines/scumm/he/intern_he.h
+++ b/engines/scumm/he/intern_he.h
@@ -48,10 +48,15 @@ protected:
const OpcodeEntryv60he *_opcodesv60he;
+public:
Common::File _hFileTable[17];
+ int _heTimers[16];
+ int getHETimer(int timer);
+ void setHETimer(int timer);
+
public:
- ScummEngine_v60he(OSystem *syst, const DetectorResult &dr) : ScummEngine_v6(syst, dr) {}
+ ScummEngine_v60he(OSystem *syst, const DetectorResult &dr);
virtual void scummInit();
diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp
index e1bb5095c4..4ad1d4884b 100644
--- a/engines/scumm/he/sound_he.cpp
+++ b/engines/scumm/he/sound_he.cpp
@@ -27,6 +27,7 @@
#include "scumm/imuse/imuse.h"
#include "scumm/scumm.h"
#include "scumm/he/sound_he.h"
+#include "scumm/he/intern_he.h"
#include "scumm/util.h"
#include "common/config-manager.h"
@@ -48,6 +49,7 @@ namespace Scumm {
SoundHE::SoundHE(ScummEngine *parent)
:
Sound(parent),
+ _vm((ScummEngine_v60he *)parent),
_heMusic(0),
_heMusicTracks(0) {
diff --git a/engines/scumm/he/sound_he.h b/engines/scumm/he/sound_he.h
index 033637590d..1beae1ab43 100644
--- a/engines/scumm/he/sound_he.h
+++ b/engines/scumm/he/sound_he.h
@@ -27,9 +27,13 @@
namespace Scumm {
+class ScummEngine_v60he;
+
class SoundHE : public Sound {
protected:
- struct HEMusic{
+ ScummEngine_v60he *_vm;
+
+ struct HEMusic {
int32 id;
int32 offset;
int32 size;
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index a8adf73a49..a8a9fbfe30 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -428,7 +428,6 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
_actorClipOverride.right = 640;
_skipDrawObject = 0;
- memset(_heTimers, 0, sizeof(_heTimers));
memset(_akosQueue, 0, sizeof(_akosQueue));
_akosQueuePos = 0;
@@ -798,6 +797,11 @@ ScummEngine_v6::ScummEngine_v6(OSystem *syst, const DetectorResult &dr)
VAR_TIMEDATE_SECOND = 0xFF;
}
+ScummEngine_v60he::ScummEngine_v60he(OSystem *syst, const DetectorResult &dr)
+ : ScummEngine_v6(syst, dr) {
+ memset(_heTimers, 0, sizeof(_heTimers));
+}
+
#ifndef DISABLE_HE
ScummEngine_v70he::ScummEngine_v70he(OSystem *syst, const DetectorResult &dr)
: ScummEngine_v60he(syst, dr) {
@@ -1894,13 +1898,13 @@ load_game:
#pragma mark --- SCUMM ---
#pragma mark -
-int ScummEngine::getHETimer(int timer) {
+int ScummEngine_v60he::getHETimer(int timer) {
checkRange(15, 1, timer, "getHETimer: Timer out of range(%d)");
int time = _system->getMillis() - _heTimers[timer];
return time;
}
-void ScummEngine::setHETimer(int timer) {
+void ScummEngine_v60he::setHETimer(int timer) {
checkRange(15, 1, timer, "setHETimer: Timer out of range(%d)");
_heTimers[timer] = _system->getMillis();
}
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h
index dbf8154675..e50913dc13 100644
--- a/engines/scumm/scumm.h
+++ b/engines/scumm/scumm.h
@@ -1127,10 +1127,6 @@ public:
byte _HEV7ActorPalette[256];
uint8 *_hePalettes;
- int _heTimers[16];
- int getHETimer(int timer);
- void setHETimer(int timer);
-
protected:
int _shadowPaletteSize;
byte _currentPalette[3 * 256];