[Scummvm-cvs-logs] CVS: scummvm/scumm camera.cpp,2.25,2.26
Torbjörn Andersson
eriktorbjorn at users.sourceforge.net
Thu Jul 8 03:48:10 CEST 2004
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.229.2.5,1.229.2.6 intern.h,2.138.2.3,2.138.2.4 script_v6.cpp,1.293.2.13,1.293.2.14 script_v8.cpp,2.229.2.3,2.229.2.4 scumm.h,1.369.2.5,1.369.2.6 scummvm.cpp,2.577.2.18,2.577.2.19 sound.cpp,1.320.2.4,1.320.2.5 vars.cpp,1.71.2.3,1.71.2.4
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sky control.cpp,1.71,1.72
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22680
Modified Files:
camera.cpp
Log Message:
Experimental fix for bugs #795938 and #929242. In both cases, text is
apparently printed before cameraMoved() has had the chance to update xstart
of virtscr[0].
All this change does is to call cameraMoved() from setCameraAt().
Index: camera.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/camera.cpp,v
retrieving revision 2.25
retrieving revision 2.26
diff -u -d -r2.25 -r2.26
--- camera.cpp 29 Jun 2004 10:23:15 -0000 2.25
+++ camera.cpp 8 Jul 2004 10:47:44 -0000 2.26
@@ -77,11 +77,18 @@
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();
}
}
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.229.2.5,1.229.2.6 intern.h,2.138.2.3,2.138.2.4 script_v6.cpp,1.293.2.13,1.293.2.14 script_v8.cpp,2.229.2.3,2.229.2.4 scumm.h,1.369.2.5,1.369.2.6 scummvm.cpp,2.577.2.18,2.577.2.19 sound.cpp,1.320.2.4,1.320.2.5 vars.cpp,1.71.2.3,1.71.2.4
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sky control.cpp,1.71,1.72
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list