From a79ba2b4f4ef069f9400a18505be8a29da2d0228 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 9 Apr 2011 14:45:13 +1000 Subject: TSAGE: Corrections to palette rotation --- engines/tsage/core.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp index 966eed7902..7a461d2496 100644 --- a/engines/tsage/core.cpp +++ b/engines/tsage/core.cpp @@ -1064,7 +1064,7 @@ void PaletteRotation::signal() { uint32 frameNumber = _globals->_events.getFrameNumber(); if (frameNumber >= _frameNumber) { - _delayCtr -= frameNumber - _frameNumber; + _delayCtr = frameNumber - _frameNumber; _frameNumber = frameNumber; if (_delayCtr < 0) @@ -1078,7 +1078,8 @@ void PaletteRotation::signal() { if (_disabled) return; - bool flag = true; switch (_rotationMode) { + bool flag = true; + switch (_rotationMode) { case -1: if (--_currIndex < _start) { flag = decDuration(); @@ -1119,7 +1120,7 @@ void PaletteRotation::signal() { g_system->getPaletteManager()->setPalette((const byte *)&_palette[_currIndex], _start, count); if (count2) { - g_system->getPaletteManager()->setPalette((const byte *)&_palette[_start], _start, count2); + g_system->getPaletteManager()->setPalette((const byte *)&_palette[_start], _start + count, count2); } } } -- cgit v1.2.3