diff options
author | Travis Howell | 2005-04-29 01:36:30 +0000 |
---|---|---|
committer | Travis Howell | 2005-04-29 01:36:30 +0000 |
commit | 2f262b3c3e4425a7851f02aa3e712c1401505e79 (patch) | |
tree | 9b9af15a1359fea13b76eb616d254dab728bd25c /scumm | |
parent | 4b4242e97316ff1959279d630533366c71219b2a (diff) | |
download | scummvm-rg350-2f262b3c3e4425a7851f02aa3e712c1401505e79.tar.gz scummvm-rg350-2f262b3c3e4425a7851f02aa3e712c1401505e79.tar.bz2 scummvm-rg350-2f262b3c3e4425a7851f02aa3e712c1401505e79.zip |
Add HE90 version of processActors().
Add HE71 class, for HE71+ specifics.
svn-id: r17859
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/actor.cpp | 39 | ||||
-rw-r--r-- | scumm/gfx.cpp | 7 | ||||
-rw-r--r-- | scumm/intern.h | 23 | ||||
-rw-r--r-- | scumm/scumm.cpp | 6 |
4 files changed, 41 insertions, 34 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp index 24e74ec8cb..ea761c538d 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -1016,30 +1016,31 @@ void ScummEngine::processActors() { akos_processQueue(); } -void ScummEngine_v70he::processActors() { - // TODO: The HE 90 stuff should be moved to a new method, too, - // if possible (ScummEngine_v90he::processActors). - if (_heversion >= 71) { - preProcessAuxQueue(); - } - if (_heversion >= 90) { - ((ScummEngine_v90he *)this)->spritesMarkDirty(0); - ((ScummEngine_v90he *)this)->spritesProcessWiz(true); - } +void ScummEngine_v71he::processActors() { + preProcessAuxQueue(); if (!_skipProcessActors) ScummEngine::processActors(); - if (_heversion >= 71) { - postProcessAuxQueue(); - } - if (_heversion >= 90) { - ((ScummEngine_v90he *)this)->spritesMarkDirty(1); - ((ScummEngine_v90he *)this)->spritesProcessWiz(false); - } + postProcessAuxQueue(); } +void ScummEngine_v90he::processActors() { + preProcessAuxQueue(); + + spritesMarkDirty(0); + spritesProcessWiz(true); + + if (!_skipProcessActors) + ScummEngine::processActors(); + + postProcessAuxQueue(); + + spritesMarkDirty(1); + spritesProcessWiz(false); +} + // Used in Scumm v8, to allow the verb coin to be drawn over the inventory // chest. I'm assuming that draw order won't matter here. void ScummEngine::processUpperActors() { @@ -1969,7 +1970,7 @@ bool Actor::isTalkConditionSet(int slot) const { return (_heCondMask & (1 << (slot - 1))) != 0; } -void ScummEngine_v70he::preProcessAuxQueue() { +void ScummEngine_v71he::preProcessAuxQueue() { if (!_skipProcessActors) { for (int i = 0; i < _auxBlocksNum; ++i) { AuxBlock *ab = &_auxBlocks[i]; @@ -1982,7 +1983,7 @@ void ScummEngine_v70he::preProcessAuxQueue() { _auxBlocksNum = 0; } -void ScummEngine_v70he::postProcessAuxQueue() { +void ScummEngine_v71he::postProcessAuxQueue() { if (!_skipProcessActors) { for (int i = 0; i < _auxEntriesNum; ++i) { AuxEntry *ae = &_auxEntries[i]; diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index 46e94b626d..14031f2898 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -798,12 +798,7 @@ void ScummEngine::redrawBGAreas() { _bgNeedsRedraw = false; } -void ScummEngine_v70he::redrawBGAreas() { - if (_heversion == 70) { - ScummEngine::redrawBGAreas(); - return; - } - +void ScummEngine_v71he::redrawBGAreas() { if (camera._cur.x != camera._last.x && _charset->_hasMask) stopTalk(); diff --git a/scumm/intern.h b/scumm/intern.h index c55661793f..41b101f678 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -758,12 +758,6 @@ protected: virtual void readGlobalObjects(); virtual void readIndexBlock(uint32 blocktype, uint32 itemsize); - virtual void redrawBGAreas(); - - virtual void processActors(); - void preProcessAuxQueue(); - void postProcessAuxQueue(); - int getStringCharWidth(byte chr); virtual int setupStringArray(int size); void appendSubstring(int dst, int src, int len2, int len); @@ -798,7 +792,20 @@ protected: byte VAR_NUM_SOUND_CHANNELS; }; -class ScummEngine_v72he : public ScummEngine_v70he { +class ScummEngine_v71he : public ScummEngine_v70he { +public: + ScummEngine_v71he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16]) : ScummEngine_v70he(detector, syst, gs, md5sum) {} + +protected: + virtual void redrawBGAreas(); + + virtual void processActors(); + void preProcessAuxQueue(); + void postProcessAuxQueue(); + +}; + +class ScummEngine_v72he : public ScummEngine_v71he { protected: typedef void (ScummEngine_v72he::*OpcodeProcV72he)(); struct OpcodeEntryV72he { @@ -1049,6 +1056,8 @@ protected: virtual void readMAXS(int blockSize); + virtual void processActors(); + void createWizEmptyImage(const WizParameters *params); void fillWizRect(const WizParameters *params); void fillWizParallelogram(const WizParameters *params); diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index ebc720f800..9ac888760f 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -1276,7 +1276,7 @@ ScummEngine_v70he::~ScummEngine_v70he() { } ScummEngine_v72he::ScummEngine_v72he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16]) - : ScummEngine_v70he(detector, syst, gs, md5sum) { + : ScummEngine_v71he(detector, syst, gs, md5sum) { VAR_NUM_ACTIVE_SOUND_CHANNELS = 0xFF; VAR_NUM_ROOMS = 0xFF; @@ -2762,9 +2762,9 @@ Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) { case 99: engine = new ScummEngine_v99he(detector, syst, game, md5sum); break; - case 90: case 98: case 95: + case 90: engine = new ScummEngine_v90he(detector, syst, game, md5sum); break; case 80: @@ -2774,6 +2774,8 @@ Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) { engine = new ScummEngine_v72he(detector, syst, game, md5sum); break; case 71: + engine = new ScummEngine_v71he(detector, syst, game, md5sum); + break; case 70: engine = new ScummEngine_v70he(detector, syst, game, md5sum); break; |