more v2 var access fixes

svn-id: r7395
This commit is contained in:
Max Horn 2003-05-08 20:37:06 +00:00
parent 0461222181
commit 6d2c0de5f2
2 changed files with 12 additions and 5 deletions

View File

@ -2759,9 +2759,14 @@ void Scumm::cyclePalette() {
byte *start, *end;
byte tmp[3];
valueToAdd = VAR(VAR_TIMER);
if (valueToAdd < VAR(VAR_TIMER_NEXT))
if (_features & GF_AFTER_V2) {
// FIXME - no idea if this is right :-/
valueToAdd = VAR(VAR_TIMER_NEXT);
} else {
valueToAdd = VAR(VAR_TIMER);
if (valueToAdd < VAR(VAR_TIMER_NEXT))
valueToAdd = VAR(VAR_TIMER_NEXT);
}
if (!_colorCycle) // FIXME
return;

View File

@ -878,9 +878,11 @@ int Scumm::scummLoop(int delta) {
VAR(VAR_HAVE_MSG) = (_haveMsg == 0xFE) ? 0xFF : _haveMsg;
VAR(VAR_VIRT_MOUSE_X) = _virtual_mouse_x;
VAR(VAR_VIRT_MOUSE_Y) = _virtual_mouse_y;
VAR(VAR_MOUSE_X) = mouse.x;
VAR(VAR_MOUSE_Y) = mouse.y;
VAR(VAR_DEBUGMODE) = _debugMode;
if (!(_features & GF_AFTER_V2)) {
VAR(VAR_MOUSE_X) = mouse.x;
VAR(VAR_MOUSE_Y) = mouse.y;
VAR(VAR_DEBUGMODE) = _debugMode;
}
if (_features & GF_AUDIOTRACKS) {
// Covered automatically by the Sound class