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?

svn-id: r7425
This commit is contained in:
Max Horn 2003-05-10 22:35:12 +00:00
parent f412952667
commit 5be0ce7adc
3 changed files with 9 additions and 5 deletions

View file

@ -1155,7 +1155,8 @@ void Scumm_v6::o6_loadRoomWithEgo() {
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 @@ void Scumm_v6::o6_getRandomNumberRange() {
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);
}