[Scummvm-cvs-logs] CVS: scummvm/scumm script_v6.cpp,1.315,1.316
Torbj?rn Andersson
eriktorbjorn at users.sourceforge.net
Fri Mar 5 03:31:08 CET 2004
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3862
Modified Files:
script_v6.cpp
Log Message:
We already know the Sam & Max screensavers trigger these assertions so
until someone figures out exactly what to do, let's do something less
drastic. Now if someone requests a pixel outside the known screen, assume
that pixel has colour 0.
Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.315
retrieving revision 1.316
diff -u -d -r1.315 -r1.316
--- script_v6.cpp 2 Mar 2004 06:19:26 -0000 1.315
+++ script_v6.cpp 5 Mar 2004 11:08:29 -0000 1.316
@@ -2681,13 +2681,15 @@
// the virtual mouse coordinates, because that's what used
// everywhere else in the script.
- if (args[1] != -1 && args[2] != -1) {
+ {
VirtScreen *vs = &virtscr[0];
- assert(0 <= args[1] && args[1] < vs->width);
- assert(0 <= args[2] && args[2] < vs->height);
- push(vs->screenPtr[args[1] + args[2] * vs->width]);
- } else
- push(0);
+ if (args[1] < 0 || args[1] >= vs->width || args[2] < 0 || args[2] >= vs->height) {
+ // FIXME: Until we know what to do in this case...
+ warning("o6_kernelGetFunctions:113: asking for pixel (%d, %d) outside of %dx%d screen", args[1], args[2], vs->width, vs->height);
+ push(0);
+ } else
+ push(vs->screenPtr[args[1] + args[2] * vs->width]);
+ }
break;
case 115:
push(getSpecialBox(args[1], args[2]));
More information about the Scummvm-git-logs
mailing list