SHERLOCK: Sprite positioning fixes
This commit is contained in:
parent
fc7f8024be
commit
b280d72ab8
4 changed files with 14 additions and 7 deletions
|
@ -613,7 +613,7 @@ void Object::checkObject(Object &o) {
|
|||
if (pt.y > 128)
|
||||
pt.y = (pt.y - 128) * -1;
|
||||
else
|
||||
pt.y;
|
||||
pt.y--;
|
||||
|
||||
_delta = pt;
|
||||
_frameNumber += 2;
|
||||
|
|
|
@ -1330,7 +1330,8 @@ void Scene::doBgAnim() {
|
|||
));
|
||||
} else {
|
||||
screen.flushImage(people[AL]._imageFrame,
|
||||
Common::Point(people[AL]._position.x / 100, people[AL]._position.y / 100),
|
||||
Common::Point(people[AL]._position.x / 100,
|
||||
people[AL]._position.y / 100 - people[AL].frameHeight()),
|
||||
&people[AL]._oldPosition.x, &people[AL]._oldPosition.y,
|
||||
&people[AL]._oldSize.x, &people[AL]._oldSize.y);
|
||||
}
|
||||
|
@ -1370,8 +1371,10 @@ void Scene::doBgAnim() {
|
|||
screen.slamArea(o._position.x, o._position.y, o._oldSize.x, o._oldSize.y);
|
||||
screen.slamArea(o._oldPosition.x, o._oldPosition.y, o._oldSize.x, o._oldSize.y);
|
||||
} else if (o._type == HIDE_SHAPE) {
|
||||
// Hiding shape, so flush it out and mark it as hidden
|
||||
screen.flushImage(o._imageFrame, o._position,
|
||||
&o._oldPosition.x, &o._oldPosition.y, &o._oldSize.x, &o._oldSize.y);
|
||||
o._type = HIDDEN;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -287,8 +287,12 @@ void Screen::flushImage(ImageFrame *frame, const Common::Point &pt,
|
|||
|
||||
// See if the areas of the old and new overlap, and if so combine the areas
|
||||
if (newBounds.intersects(oldBounds)) {
|
||||
newBounds.extend(oldBounds);
|
||||
slamRect(newBounds);
|
||||
Common::Rect mergedBounds = newBounds;
|
||||
mergedBounds.extend(oldBounds);
|
||||
mergedBounds.right += 1;
|
||||
mergedBounds.bottom += 1;
|
||||
|
||||
slamRect(mergedBounds);
|
||||
} else {
|
||||
// The two areas are independent, so copy them both
|
||||
slamRect(newBounds);
|
||||
|
|
|
@ -176,7 +176,7 @@ void UserInterface::handleInput() {
|
|||
_help = _oldHelp;
|
||||
}
|
||||
|
||||
if (_bgFound != _oldBgFound) {
|
||||
if (_bgFound != _oldBgFound || _oldBgFound == -1) {
|
||||
_infoFlag = true;
|
||||
clearInfo();
|
||||
|
||||
|
@ -438,8 +438,8 @@ void UserInterface::toggleButton(int num) {
|
|||
*/
|
||||
void UserInterface::clearInfo() {
|
||||
if (_infoFlag) {
|
||||
_vm->_screen->bar(Common::Rect(16, INFO_LINE, SHERLOCK_SCREEN_WIDTH - 20,
|
||||
INFO_LINE + 9), INFO_BLACK);
|
||||
_vm->_screen->bar(Common::Rect(16, INFO_LINE, SHERLOCK_SCREEN_WIDTH - 19,
|
||||
INFO_LINE + 10), INFO_BLACK);
|
||||
_infoFlag = false;
|
||||
_oldLook = -1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue