diff options
| author | Paul Gilbert | 2011-02-27 00:16:47 +1100 | 
|---|---|---|
| committer | Paul Gilbert | 2011-02-27 00:16:47 +1100 | 
| commit | 033747ceb560dd4ff4f950499030b173fe532640 (patch) | |
| tree | 1da265b61908b8e78d11003e042b3e37fba4763f | |
| parent | 5a606d86e1349598405189f0cf049223c7c09016 (diff) | |
| download | scummvm-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.cpp | 15 | 
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;  }  | 
