[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.88,2.89 script_v6.cpp,1.107,1.108 scummvm.cpp,2.135,2.136
Max Horn
fingolfin at users.sourceforge.net
Sat May 10 15:36:07 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: tools descumm6.cpp,1.98,1.99
- Next message: [Scummvm-cvs-logs] CVS: tools descumm-common.cpp,1.2,1.3 descumm.cpp,1.34,1.35 descumm6.cpp,1.99,1.100 descumm.h,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv4118
Modified Files:
gfx.cpp script_v6.cpp scummvm.cpp
Log Message:
work around some illegal var access' in COMI/V8 - there are more, but I am not always sure if avoiding the access is the proper fix; maybe in some cases we should just define that var for V8 to the proper value?
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.88
retrieving revision 2.89
diff -u -d -r2.88 -r2.89
--- gfx.cpp 10 May 2003 21:49:57 -0000 2.88
+++ gfx.cpp 10 May 2003 22:35:12 -0000 2.89
@@ -2724,8 +2724,9 @@
byte *start, *end;
byte tmp[3];
- if (_features & GF_AFTER_V2) {
+ if (VAR_TIMER == 0xFF) {
// FIXME - no idea if this is right :-/
+ // Needed for both V2 and V8 at this time
valueToAdd = VAR(VAR_TIMER_NEXT);
} else {
valueToAdd = VAR(VAR_TIMER);
Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -d -r1.107 -r1.108
--- script_v6.cpp 10 May 2003 21:49:58 -0000 1.107
+++ script_v6.cpp 10 May 2003 22:35:12 -0000 1.108
@@ -1155,7 +1155,8 @@
void Scumm_v6::o6_getRandomNumber() {
int rnd;
rnd = _rnd.getRandomNumber(pop());
- VAR(VAR_V6_RANDOM_NR) = rnd;
+ if (VAR_V6_RANDOM_NR != 0xFF)
+ VAR(VAR_V6_RANDOM_NR) = rnd;
push(rnd);
}
@@ -1163,7 +1164,8 @@
int max = pop();
int min = pop();
int rnd = _rnd.getRandomNumberRng(min, max);
- VAR(VAR_V6_RANDOM_NR) = rnd;
+ if (VAR_V6_RANDOM_NR != 0xFF)
+ VAR(VAR_V6_RANDOM_NR) = rnd;
push(rnd);
}
Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.135
retrieving revision 2.136
diff -u -d -r2.135 -r2.136
--- scummvm.cpp 10 May 2003 21:49:58 -0000 2.135
+++ scummvm.cpp 10 May 2003 22:35:12 -0000 2.136
@@ -856,8 +856,9 @@
VAR(VAR_TMR_1) += delta;
VAR(VAR_TMR_2) += delta;
VAR(VAR_TMR_3) += delta;
- VAR(VAR_TMR_4) += delta;
}
+ if (VAR_TMR_4 != 0xFF)
+ VAR(VAR_TMR_4) += delta;
if (delta > 15)
delta = 15;
@@ -1066,7 +1067,7 @@
/* show or hide mouse */
_system->show_mouse(_cursor.state > 0);
- if (!(_features & GF_AFTER_V2))
+ if (VAR_TIMER != 0xFF)
VAR(VAR_TIMER) = 0;
return VAR(VAR_TIMER_NEXT);
- Previous message: [Scummvm-cvs-logs] CVS: tools descumm6.cpp,1.98,1.99
- Next message: [Scummvm-cvs-logs] CVS: tools descumm-common.cpp,1.2,1.3 descumm.cpp,1.34,1.35 descumm6.cpp,1.99,1.100 descumm.h,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list