diff options
Diffstat (limited to 'engines/sci/graphics/plane32.cpp')
-rw-r--r-- | engines/sci/graphics/plane32.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/engines/sci/graphics/plane32.cpp b/engines/sci/graphics/plane32.cpp index 175875c414..aa629e4081 100644 --- a/engines/sci/graphics/plane32.cpp +++ b/engines/sci/graphics/plane32.cpp @@ -47,6 +47,7 @@ uint16 Plane::_nextObjectId = 20000; Plane::Plane(const Common::Rect &gameRect, PlanePictureCodes pictureId) : _pictureId(pictureId), _mirrored(false), +_type(kPlaneTypeColored), _back(0), _priorityChanged(0), _object(make_reg(0, _nextObjectId++)), @@ -63,6 +64,7 @@ _gameRect(gameRect) { } Plane::Plane(reg_t object) : +_type(kPlaneTypeColored), _priorityChanged(false), _object(object), _redrawAllCount(g_sci->_gfxFrameout->getScreenCount()), @@ -93,6 +95,7 @@ _moved(0) { Plane::Plane(const Plane &other) : _pictureId(other._pictureId), _mirrored(other._mirrored), +_type(other._type), _back(other._back), _object(other._object), _priority(other._priority), @@ -595,8 +598,10 @@ void Plane::filterDownEraseRects(DrawList &drawList, RectList &eraseList, RectLi Common::Rect outRects[4]; const Common::Rect &r2 = *higherEraseList[i]; int splitCount = splitRects(r2, r, outRects); - while (splitCount--) { - higherEraseList.add(outRects[splitCount]); + if (splitCount > 0) { + while (splitCount--) { + higherEraseList.add(outRects[splitCount]); + } } higherEraseList.erase_at(i); } |