diff options
author | Matthew Hoops | 2012-03-20 14:50:06 -0400 |
---|---|---|
committer | Matthew Hoops | 2012-03-20 14:50:06 -0400 |
commit | b2c29410b9e66566ee5c9faad79b58696a6f3095 (patch) | |
tree | 279f81d54e416058e7c552b1e97516dd21ad1c8b /engines/pegasus/neighborhood/mars/spacejunk.cpp | |
parent | 71756bdf4eae5ba9cc3f329b85e894f04640aaef (diff) | |
download | scummvm-rg350-b2c29410b9e66566ee5c9faad79b58696a6f3095.tar.gz scummvm-rg350-b2c29410b9e66566ee5c9faad79b58696a6f3095.tar.bz2 scummvm-rg350-b2c29410b9e66566ee5c9faad79b58696a6f3095.zip |
PEGASUS: Add some more protection about junk flying off-screen
Diffstat (limited to 'engines/pegasus/neighborhood/mars/spacejunk.cpp')
-rwxr-xr-x | engines/pegasus/neighborhood/mars/spacejunk.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/pegasus/neighborhood/mars/spacejunk.cpp b/engines/pegasus/neighborhood/mars/spacejunk.cpp index 9f34c21461..ac8b1a23cc 100755 --- a/engines/pegasus/neighborhood/mars/spacejunk.cpp +++ b/engines/pegasus/neighborhood/mars/spacejunk.cpp @@ -80,7 +80,7 @@ void SpaceJunk::setCenter(const CoordType centerX, const CoordType centerY) { Common::Rect r; getBounds(r); - r.moveTo(CLIP<int>(centerX - (r.width() >> 1), 0, 640), CLIP<int>(centerY - (r.height() >> 1), 0, 480)); + r.moveTo(CLIP<int>(centerX - (r.width() >> 1), 0, 640 - r.width()), CLIP<int>(centerY - (r.height() >> 1), 0, 480 - r.height())); setBounds(r); } |