aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2011-02-27 00:16:47 +1100
committerPaul Gilbert2011-02-27 00:16:47 +1100
commit033747ceb560dd4ff4f950499030b173fe532640 (patch)
tree1da265b61908b8e78d11003e042b3e37fba4763f
parent5a606d86e1349598405189f0cf049223c7c09016 (diff)
downloadscummvm-rg350-033747ceb560dd4ff4f950499030b173fe532640.tar.gz
scummvm-rg350-033747ceb560dd4ff4f950499030b173fe532640.tar.bz2
scummvm-rg350-033747ceb560dd4ff4f950499030b173fe532640.zip
TSAGE: Bugfix to enable palette rotation
-rw-r--r--engines/tsage/core.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index 49ff32e35c..620d932784 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -1045,21 +1045,21 @@ void PaletteRotation::signal() {
bool flag = true;
switch (_rotationMode) {
- case 0:
+ case -1:
if (--_currIndex < _start) {
flag = decDuration();
if (flag)
_currIndex = _end - 1;
}
break;
- case 2:
+ case 1:
if (++_currIndex >= _end) {
flag = decDuration();
if (flag)
_currIndex = _start;
}
break;
- case 3:
+ case 2:
if (++_currIndex >= _end) {
flag = decDuration();
if (flag) {
@@ -1068,7 +1068,7 @@ void PaletteRotation::signal() {
}
}
break;
- case 4:
+ case 3:
if (--_currIndex < _start) {
flag = decDuration();
if (flag) {
@@ -1114,9 +1114,9 @@ void PaletteRotation::set(ScenePalette *palette, int start, int end, int rotatio
_end = end + 1;
_rotationMode = rotationMode;
- switch (_rotationMode + 1) {
- case 0:
- case 4:
+ switch (_rotationMode) {
+ case -1:
+ case 3:
_currIndex = _end;
break;
default:
@@ -1284,6 +1284,7 @@ PaletteRotation *ScenePalette::addRotation(int start, int end, int rotationMode,
duration <<= 1;
obj->set(this, start, end, rotationMode, duration, action);
+ _listeners.push_back(obj);
return obj;
}