diff options
author | Max Horn | 2005-04-28 00:45:06 +0000 |
---|---|---|
committer | Max Horn | 2005-04-28 00:45:06 +0000 |
commit | 5109e82c35c027c5ab695e54666476b04734c786 (patch) | |
tree | 59eda6e60e7098a5e6104ee3f9056cdf22161151 /scumm/actor.cpp | |
parent | 3ee1fe9b579dc3e822d3e1103addc2d6516fe06a (diff) | |
download | scummvm-rg350-5109e82c35c027c5ab695e54666476b04734c786.tar.gz scummvm-rg350-5109e82c35c027c5ab695e54666476b04734c786.tar.bz2 scummvm-rg350-5109e82c35c027c5ab695e54666476b04734c786.zip |
Refactor HE actor post/pre-processing code a bit (some more cleanup for HE90 could probably be done, but I'll leave that to the HE folks for now :-)
svn-id: r17847
Diffstat (limited to 'scumm/actor.cpp')
-rw-r--r-- | scumm/actor.cpp | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp index 291b8697ea..7f797e9309 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -27,6 +27,7 @@ #include "scumm/boxes.h" #include "scumm/charset.h" #include "scumm/costume.h" +#include "scumm/intern.h" #include "scumm/object.h" #include "scumm/resource.h" #include "scumm/saveload.h" @@ -976,9 +977,6 @@ static int compareDrawOrder(const void* a, const void* b) } void ScummEngine::processActors() { - if (_skipProcessActors) - return; - int numactors = 0; // TODO : put this actors as a member array. It never has to grow or shrink @@ -1018,6 +1016,30 @@ 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); + } + + if (!_skipProcessActors) + ScummEngine::processActors(); + + if (_heversion >= 71) { + postProcessAuxQueue(); + } + if (_heversion >= 90) { + ((ScummEngine_v90he *)this)->spritesMarkDirty(1); + ((ScummEngine_v90he *)this)->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() { @@ -1943,7 +1965,7 @@ bool Actor::isTalkConditionSet(int slot) const { return (_heCondMask & (1 << (slot - 1))) != 0; } -void ScummEngine::preProcessAuxQueue() { +void ScummEngine_v70he::preProcessAuxQueue() { if (!_skipProcessActors) { for (int i = 0; i < _auxBlocksNum; ++i) { AuxBlock *ab = &_auxBlocks[i]; @@ -1956,7 +1978,7 @@ void ScummEngine::preProcessAuxQueue() { _auxBlocksNum = 0; } -void ScummEngine::postProcessAuxQueue() { +void ScummEngine_v70he::postProcessAuxQueue() { if (!_skipProcessActors) { for (int i = 0; i < _auxEntriesNum; ++i) { AuxEntry *ae = &_auxEntries[i]; |