diff options
author | Martin Kiewitz | 2010-08-10 17:16:38 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-08-10 17:16:38 +0000 |
commit | a201b2e506be4adbacb0b7ffa9d40a94a4842e3e (patch) | |
tree | 56d010a3d40657f96195606a412b46c0f1c7b642 | |
parent | 2db12a1ae7f0dffd4384e71df577a407f2a35f44 (diff) | |
download | scummvm-rg350-a201b2e506be4adbacb0b7ffa9d40a94a4842e3e.tar.gz scummvm-rg350-a201b2e506be4adbacb0b7ffa9d40a94a4842e3e.tar.bz2 scummvm-rg350-a201b2e506be4adbacb0b7ffa9d40a94a4842e3e.zip |
SCI: kAddToPic(list) set fixed priority flag
svn-id: r51954
-rw-r--r-- | engines/sci/graphics/animate.cpp | 17 | ||||
-rw-r--r-- | engines/sci/graphics/animate.h | 1 |
2 files changed, 15 insertions, 3 deletions
diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp index 1e9beab607..913b369790 100644 --- a/engines/sci/graphics/animate.cpp +++ b/engines/sci/graphics/animate.cpp @@ -518,6 +518,19 @@ void GfxAnimate::reAnimate(Common::Rect rect) { } } +void GfxAnimate::preprocessAddToPicList() { + AnimateList::iterator it; + const AnimateList::iterator end = _list.end(); + + for (it = _list.begin(); it != end; ++it) { + if (it->priority == -1) + it->priority = _ports->kernelCoordinateToPriority(it->y); + + // Do not allow priority to get changed by fill() + it->signal |= kSignalFixedPriority; + } +} + void GfxAnimate::addToPicDrawCels() { reg_t curObject; GfxView *view = NULL; @@ -527,9 +540,6 @@ void GfxAnimate::addToPicDrawCels() { for (it = _list.begin(); it != end; ++it) { curObject = it->object; - if (it->priority == -1) - it->priority = _ports->kernelCoordinateToPriority(it->y); - // Get the corresponding view view = _cache->getView(it->viewId); @@ -687,6 +697,7 @@ void GfxAnimate::kernelAddToPicList(reg_t listReference, int argc, reg_t *argv) error("kAddToPic called with non-list as parameter"); makeSortedList(list); + preprocessAddToPicList(); fill(tempPicNotValid); addToPicDrawCels(); diff --git a/engines/sci/graphics/animate.h b/engines/sci/graphics/animate.h index 7e82187eed..c2101e5384 100644 --- a/engines/sci/graphics/animate.h +++ b/engines/sci/graphics/animate.h @@ -100,6 +100,7 @@ public: void updateScreen(byte oldPicNotValid); void restoreAndDelete(int argc, reg_t *argv); void reAnimate(Common::Rect rect); + void preprocessAddToPicList(); void addToPicDrawCels(); void addToPicDrawView(GuiResourceId viewId, int16 loopNo, int16 celNo, int16 leftPos, int16 topPos, int16 priority, int16 control); |