diff options
Diffstat (limited to 'engines/sci')
| -rw-r--r-- | engines/sci/graphics/palette.cpp | 13 | ||||
| -rw-r--r-- | engines/sci/graphics/palette.h | 4 | 
2 files changed, 9 insertions, 8 deletions
diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp index 8af6b597d6..fbf3433c29 100644 --- a/engines/sci/graphics/palette.cpp +++ b/engines/sci/graphics/palette.cpp @@ -464,14 +464,14 @@ void GfxPalette::kernelAssertPalette(GuiResourceId resourceId) {  // Saving/restoring  //         need to save start and target-palette, when palVaryOn = true -void GfxPalette::startPalVary(uint16 paletteId, uint16 ticks) { -	kernelSetFromResource(paletteId, true); +void GfxPalette::startPalVary(GuiResourceId resourceId, uint16 ticks) { +	kernelSetFromResource(resourceId, true);  	return; -	if (_palVaryId >= 0)	// another palvary is taking place, return +	if (_palVaryResourceId >= 0)	// another palvary is taking place, return  		return; -	_palVaryId = paletteId; +	_palVaryResourceId = resourceId;  	_palVaryStart = g_system->getMillis();  	_palVaryEnd = _palVaryStart + ticks * 1000 / 60;  	g_sci->getTimerManager()->installTimerProc(&palVaryCallback, 1000000 / 60, this); @@ -486,10 +486,11 @@ void GfxPalette::togglePalVary(bool pause) {  void GfxPalette::stopPalVary() {  	g_sci->getTimerManager()->removeTimerProc(&palVaryCallback); -	_palVaryId = -1;	// invalidate the target palette  	// HACK: just set the target palette -	kernelSetFromResource(_palVaryId, true); +	kernelSetFromResource(_palVaryResourceId, true); + +	_palVaryResourceId = -1;	// invalidate the target palette  }  void GfxPalette::palVaryCallback(void *refCon) { diff --git a/engines/sci/graphics/palette.h b/engines/sci/graphics/palette.h index fead340090..265f36ad54 100644 --- a/engines/sci/graphics/palette.h +++ b/engines/sci/graphics/palette.h @@ -60,7 +60,7 @@ public:  	void kernelAnimateSet();  	void kernelAssertPalette(GuiResourceId resourceId); -	void startPalVary(uint16 paletteId, uint16 ticks); +	void startPalVary(GuiResourceId resourceId, uint16 ticks);  	void togglePalVary(bool pause);  	void stopPalVary(); @@ -72,7 +72,7 @@ private:  	GfxScreen *_screen;  	ResourceManager *_resMan; -	int16 _palVaryId; +	GuiResourceId _palVaryResourceId;  	uint32 _palVaryStart;  	uint32 _palVaryEnd;  | 
