diff options
author | Colin Snover | 2016-03-10 14:05:27 -0600 |
---|---|---|
committer | Colin Snover | 2016-03-10 14:16:56 -0600 |
commit | 4a16ebc970bfe1eae948b5d59accc321b092db8c (patch) | |
tree | e686fe900fe88ddd914cfaba18bbc49edd87c19b /engines/sci/graphics/frameout.cpp | |
parent | eac416f480ca5d08a6117b15e78ef906a0135c91 (diff) | |
download | scummvm-rg350-4a16ebc970bfe1eae948b5d59accc321b092db8c.tar.gz scummvm-rg350-4a16ebc970bfe1eae948b5d59accc321b092db8c.tar.bz2 scummvm-rg350-4a16ebc970bfe1eae948b5d59accc321b092db8c.zip |
SCI32: Implement kSetNowSeen
Diffstat (limited to 'engines/sci/graphics/frameout.cpp')
-rw-r--r-- | engines/sci/graphics/frameout.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 655e59de00..78e61b9e34 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -2028,6 +2028,26 @@ bool GfxFrameout::isOnMe(const ScreenItem &screenItem, const Plane &plane, const return true; } +void GfxFrameout::kernelSetNowSeen(const reg_t screenItemObject) const { + const reg_t planeObject = readSelector(_segMan, screenItemObject, SELECTOR(plane)); + + Plane *plane = _planes.findByObject(planeObject); + if (plane == nullptr) { + error("Plane %04x:%04x not found", PRINT_REG(planeObject)); + } + + ScreenItem *screenItem = plane->_screenItemList.findByObject(screenItemObject); + if (screenItem == nullptr) { + error("Screen item %04x:%04x not found", PRINT_REG(screenItemObject)); + } + + Common::Rect result = screenItem->getNowSeenRect(*plane); + writeSelectorValue(_segMan, screenItemObject, SELECTOR(nsLeft), result.left); + writeSelectorValue(_segMan, screenItemObject, SELECTOR(nsTop), result.top); + writeSelectorValue(_segMan, screenItemObject, SELECTOR(nsRight), result.right - 1); + writeSelectorValue(_segMan, screenItemObject, SELECTOR(nsBottom), result.bottom - 1); +} + #pragma mark - #pragma mark Debugging |