diff options
author | whiterandrek | 2018-04-02 10:18:58 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2018-06-28 23:51:32 +0200 |
commit | f6d620f6831cb3605d621ec107fd8c4ae5722154 (patch) | |
tree | bea0a2b1a1fd4924a83303995c5c96006c0f1f00 /engines/pink | |
parent | 49d5ea28c023a43f7d1444b55ac8c06df9966128 (diff) | |
download | scummvm-rg350-f6d620f6831cb3605d621ec107fd8c4ae5722154.tar.gz scummvm-rg350-f6d620f6831cb3605d621ec107fd8c4ae5722154.tar.bz2 scummvm-rg350-f6d620f6831cb3605d621ec107fd8c4ae5722154.zip |
PINK: fixed finding actor on screen
Diffstat (limited to 'engines/pink')
-rw-r--r-- | engines/pink/director.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/pink/director.cpp b/engines/pink/director.cpp index 3fa149e535..455690ec5b 100644 --- a/engines/pink/director.cpp +++ b/engines/pink/director.cpp @@ -118,8 +118,10 @@ void Director::clear() { Actor *Director::getActorByPoint(Common::Point point) { for (int i = _sprites.size() - 1; i > 0; --i) { CelDecoder *decoder = _sprites[i]->getDecoder(); - if (decoder->getRectangle().contains(point) && - *(byte*)decoder->getCurrentFrame()->getBasePtr(640 - point.x, 480 - point.y) + const Graphics::Surface *frame = decoder->getCurrentFrame(); + Common::Rect &rect = decoder->getRectangle(); + if (rect.contains(point) && + *(byte*)frame->getBasePtr(point.x - rect.left, point.y - rect.top) != decoder->getTransparentColourIndex()) return _sprites[i]->getActor(); } |