diff options
Diffstat (limited to 'engines/sci/graphics/plane32.cpp')
-rw-r--r-- | engines/sci/graphics/plane32.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/engines/sci/graphics/plane32.cpp b/engines/sci/graphics/plane32.cpp index aa629e4081..1cd88d667b 100644 --- a/engines/sci/graphics/plane32.cpp +++ b/engines/sci/graphics/plane32.cpp @@ -194,11 +194,12 @@ void Plane::addPicInternal(const GuiResourceId pictureId, const Common::Point *p _type = transparent ? kPlaneTypeTransparentPicture : kPlaneTypePicture; } -void Plane::addPic(const GuiResourceId pictureId, const Common::Point &position, const bool mirrorX) { - deletePic(pictureId); +GuiResourceId Plane::addPic(const GuiResourceId pictureId, const Common::Point &position, const bool mirrorX, const bool deleteDuplicate) { + if (deleteDuplicate) { + deletePic(pictureId); + } addPicInternal(pictureId, &position, mirrorX); - // NOTE: In SCI engine this method returned the pictureId of the - // plane, but this return value was never used + return _pictureId; } void Plane::changePic() { @@ -247,6 +248,8 @@ void Plane::deleteAllPics() { #pragma mark - #pragma mark Plane - Rendering +extern int splitRects(Common::Rect r, const Common::Rect &other, Common::Rect(&outRects)[4]); + void Plane::breakDrawListByPlanes(DrawList &drawList, const PlaneList &planeList) const { const int nextPlaneIndex = planeList.findIndexByObject(_object) + 1; const PlaneList::size_type planeCount = planeList.size(); |