mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-22 18:02:05 +00:00
apparently printed before cameraMoved() has had the chance to update xstart of virtscr[0]. All this change does is to call cameraMoved() from setCameraAt(). svn-id: r14177
This commit is contained in:
parent
a52cac7069
commit
b0cf75722e
@ -77,11 +77,18 @@ void ScummEngine_v7::setCameraAt(int pos_x, int pos_y) {
|
||||
|
||||
assert(camera._cur.x >= (_screenWidth / 2) && camera._cur.y >= (_screenHeight / 2));
|
||||
|
||||
if ((camera._cur.x != old.x || camera._cur.y != old.y)
|
||||
&& VAR(VAR_SCROLL_SCRIPT)) {
|
||||
VAR(VAR_CAMERA_POS_X) = camera._cur.x;
|
||||
VAR(VAR_CAMERA_POS_Y) = camera._cur.y;
|
||||
runScript(VAR(VAR_SCROLL_SCRIPT), 0, 0, 0);
|
||||
if (camera._cur.x != old.x || camera._cur.y != old.y) {
|
||||
if (VAR(VAR_SCROLL_SCRIPT)) {
|
||||
VAR(VAR_CAMERA_POS_X) = camera._cur.x;
|
||||
VAR(VAR_CAMERA_POS_Y) = camera._cur.y;
|
||||
runScript(VAR(VAR_SCROLL_SCRIPT), 0, 0, 0);
|
||||
}
|
||||
|
||||
// Even though cameraMoved() is called automatically, we may
|
||||
// need to know at once that the camera has moved, or text may
|
||||
// be printed at the wrong coordinates. See bugs #795938 and
|
||||
// #929242
|
||||
cameraMoved();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user