diff options
author | Colin Snover | 2016-06-18 20:48:10 -0500 |
---|---|---|
committer | Colin Snover | 2016-06-21 08:14:12 -0500 |
commit | a613a27b44eae68650eb9150ea146dff9befea28 (patch) | |
tree | 0aacbadabc6013a1ed45b234e14d71d9f6ea09f1 /engines/sci/graphics/frameout.cpp | |
parent | 94328f0ec8baa96947c5b82c63bdd298ba44981d (diff) | |
download | scummvm-rg350-a613a27b44eae68650eb9150ea146dff9befea28.tar.gz scummvm-rg350-a613a27b44eae68650eb9150ea146dff9befea28.tar.bz2 scummvm-rg350-a613a27b44eae68650eb9150ea146dff9befea28.zip |
SCI32: Implement line drawing (kAddLine/kUpdateLine/kRemoveLine)
This line drawing code lives in a remodelled GfxPaint32 class
that is totally separate from GfxPaint16.
Diffstat (limited to 'engines/sci/graphics/frameout.cpp')
-rw-r--r-- | engines/sci/graphics/frameout.cpp | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 2d44e38390..51a666e83e 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -259,6 +259,22 @@ void GfxFrameout::syncWithScripts(bool addElements) { #pragma mark - #pragma mark Screen items +void GfxFrameout::deleteScreenItem(ScreenItem *screenItem, Plane *plane) { + if (screenItem->_created == 0) { + screenItem->_created = 0; + screenItem->_updated = 0; + screenItem->_deleted = getScreenCount(); + } else { + plane->_screenItemList.erase(screenItem); + plane->_screenItemList.pack(); + } +} + +void GfxFrameout::deleteScreenItem(ScreenItem *screenItem, const reg_t planeObject) { + Plane *plane = _planes.findByObject(planeObject); + deleteScreenItem(screenItem, plane); +} + void GfxFrameout::kernelAddScreenItem(const reg_t object) { // The "fred" object is used to test graphics performance; // it is impacted by framerate throttling, so disable the @@ -335,14 +351,7 @@ void GfxFrameout::kernelDeleteScreenItem(const reg_t object) { return; } - if (screenItem->_created == 0) { - screenItem->_created = 0; - screenItem->_updated = 0; - screenItem->_deleted = getScreenCount(); - } else { - plane->_screenItemList.erase(screenItem); - plane->_screenItemList.pack(); - } + deleteScreenItem(screenItem, plane); } #pragma mark - |