aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe
diff options
context:
space:
mode:
authorEugene Sandulenko2014-01-03 01:14:16 +0200
committerEugene Sandulenko2014-01-03 01:14:16 +0200
commite7b0316d8b6f3813e6a9da83e330ade55f8d1cda (patch)
tree399f4c40297527fab765f6529d44de325355d25e /engines/fullpipe
parent979cf9ffd7ca12ddc33ef89acfd008bb445884a9 (diff)
downloadscummvm-rg350-e7b0316d8b6f3813e6a9da83e330ade55f8d1cda.tar.gz
scummvm-rg350-e7b0316d8b6f3813e6a9da83e330ade55f8d1cda.tar.bz2
scummvm-rg350-e7b0316d8b6f3813e6a9da83e330ade55f8d1cda.zip
FULLPIPE: Fix flicker in scenes. Woo hoo!
Diffstat (limited to 'engines/fullpipe')
-rw-r--r--engines/fullpipe/scene.cpp15
-rw-r--r--engines/fullpipe/scene.h2
2 files changed, 12 insertions, 5 deletions
diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp
index 008983b31d..928bd5cf2e 100644
--- a/engines/fullpipe/scene.cpp
+++ b/engines/fullpipe/scene.cpp
@@ -442,8 +442,16 @@ bool Scene::compareObjPriority(const void *p1, const void *p2) {
return false;
}
-void Scene::objectList_sortByPriority(PtrList &list) {
- Common::sort(list.begin(), list.end(), Scene::compareObjPriority);
+void Scene::objectList_sortByPriority(PtrList &list, bool skipFirst) {
+ if (skipFirst) {
+ PtrList::iterator s = list.begin();
+
+ ++s;
+
+ Common::sort(s, list.end(), Scene::compareObjPriority);
+ } else {
+ Common::sort(list.begin(), list.end(), Scene::compareObjPriority);
+ }
}
void Scene::draw() {
@@ -526,7 +534,6 @@ void Scene::updateScrolling2() {
((PictureObject *)_picObjList[0])->getDimensions(&point);
int flags = ((PictureObject *)_picObjList[0])->_flags;
- warning("flags: %d %d %d %d", flags & 2, flags & 0x20, point.x, point.y);
if (g_fp->_sceneRect.left < 0 && !(flags & 2))
offsetX = -g_fp->_sceneRect.left;
@@ -609,7 +616,7 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) {
debug(8, "Scene::drawContent(>%d, <%d, %d)", minPri, maxPri, drawBg);
if (_picObjList.size() > 2) { // We need to z-sort them
- objectList_sortByPriority(_picObjList);
+ objectList_sortByPriority(_picObjList, true);
}
if (minPri == -1 && _picObjList.size())
diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h
index db0da5db31..b8defe2d06 100644
--- a/engines/fullpipe/scene.h
+++ b/engines/fullpipe/scene.h
@@ -79,7 +79,7 @@ class Scene : public Background {
private:
static bool compareObjPriority(const void *p1, const void *p2);
- void objectList_sortByPriority(PtrList &list);
+ void objectList_sortByPriority(PtrList &list, bool skipFirst = false);
};
class SceneTag : public CObject {