mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-01 08:23:15 +00:00
ASYLUM: fix Actor::isOnScreen()
This commit is contained in:
parent
27f69f5a32
commit
f60246580b
@ -3736,9 +3736,9 @@ void Actor::setVisible(bool value) {
|
||||
}
|
||||
|
||||
bool Actor::isOnScreen() {
|
||||
Common::Rect scene(getWorld()->yTop, getWorld()->xLeft, getWorld()->yTop + 480, getWorld()->xLeft + 640);
|
||||
Common::Rect scene(getWorld()->xLeft, getWorld()->yTop, getWorld()->xLeft + 640, getWorld()->yTop + 480);
|
||||
Common::Rect actor(_boundingRect);
|
||||
actor.moveTo(_point1.x, _point1.y);
|
||||
actor.translate(_point1.x, _point1.y);
|
||||
|
||||
return isVisible() && scene.intersects(actor);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user