From 601c6f408210344c73dcf4f3bab34b493132387a Mon Sep 17 00:00:00 2001 From: johndoe123 Date: Thu, 19 Nov 2015 14:56:16 +0100 Subject: ILLUSIONS: Terminate update functions on scene exit; fix bugs and use constants --- engines/illusions/duckman/illusions_duckman.cpp | 6 +++--- engines/illusions/duckman/propertytimers.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'engines/illusions/duckman') diff --git a/engines/illusions/duckman/illusions_duckman.cpp b/engines/illusions/duckman/illusions_duckman.cpp index 86cd068f22..ed165f0c16 100644 --- a/engines/illusions/duckman/illusions_duckman.cpp +++ b/engines/illusions/duckman/illusions_duckman.cpp @@ -251,7 +251,7 @@ void IllusionsEngine_Duckman::initUpdateFunctions() { int IllusionsEngine_Duckman::updateScript(uint flags) { // TODO Some more stuff _threads->updateThreads(); - return 1; + return kUFNext; } void IllusionsEngine_Duckman::startScreenShaker(uint pointsCount, uint32 duration, const ScreenShakerPoint *points, uint32 threadId) { @@ -589,7 +589,7 @@ void IllusionsEngine_Duckman::startCursorHoldingObject(uint32 objectId, uint32 s _cursor._sequenceId2 = sequenceId; _cursor._actorIndex = 7; _cursor._savedActorIndex = 7; - _cursor._field14[_cursor._actorIndex - 1] = true; + _cursor._field14[6] = true; _cursor._control->startSequenceActor(sequenceId, 2, 0); setCursorActorIndex(_cursor._actorIndex, 1, 0); _cursor._currOverlappedControl = 0; @@ -776,7 +776,7 @@ void IllusionsEngine_Duckman::dumpActiveScenes(uint32 sceneId, uint32 threadId) } void IllusionsEngine_Duckman::dumpCurrSceneFiles(uint32 sceneId, uint32 threadId) { - // TODO UpdateFunctions_disableBySceneId(sceneId); + _updateFunctions->terminateByScene(sceneId); _threads->terminateActiveThreads(threadId); _threads->terminateThreadsBySceneId(sceneId, threadId); _controls->destroyActiveControls(); diff --git a/engines/illusions/duckman/propertytimers.cpp b/engines/illusions/duckman/propertytimers.cpp index 60e58866b2..47d8cb47c4 100644 --- a/engines/illusions/duckman/propertytimers.cpp +++ b/engines/illusions/duckman/propertytimers.cpp @@ -81,7 +81,7 @@ bool PropertyTimers::findPropertyTimer(uint32 propertyId, PropertyTimer *&proper } int PropertyTimers::updatePropertyTimers(uint flags) { - int result = 1; + int result = kUFNext; uint32 currTime = getCurrentTime(); if (_vm->_pauseCtr <= 0) { if (_propertyTimersPaused) { @@ -95,7 +95,7 @@ int PropertyTimers::updatePropertyTimers(uint flags) { if (flags & 1) { _propertyTimersActive = false; _propertyTimersPaused = false; - result = 2; + result = kUFTerminate; } else { bool timersActive = false; for (uint i = 0; i < kPropertyTimersCount; ++i) { @@ -110,7 +110,7 @@ int PropertyTimers::updatePropertyTimers(uint flags) { if (!timersActive) { _propertyTimersActive = false; _propertyTimersPaused = false; - result = 2; + result = kUFTerminate; } } } else { @@ -121,7 +121,7 @@ int PropertyTimers::updatePropertyTimers(uint flags) { } _propertyTimersPaused = true; } - result = 1; + result = kUFNext; } return result; } -- cgit v1.2.3