aboutsummaryrefslogtreecommitdiff
path: root/engines/illusions/duckman
diff options
context:
space:
mode:
authorjohndoe1232015-11-19 14:56:16 +0100
committerEugene Sandulenko2018-07-20 06:43:33 +0000
commit601c6f408210344c73dcf4f3bab34b493132387a (patch)
tree10d3952aaf9f474bcac2c4bed96b9755c9056e38 /engines/illusions/duckman
parent8b48f2f63f5cc21d864c3e960ce307b50286b64b (diff)
downloadscummvm-rg350-601c6f408210344c73dcf4f3bab34b493132387a.tar.gz
scummvm-rg350-601c6f408210344c73dcf4f3bab34b493132387a.tar.bz2
scummvm-rg350-601c6f408210344c73dcf4f3bab34b493132387a.zip
ILLUSIONS: Terminate update functions on scene exit; fix bugs and use constants
Diffstat (limited to 'engines/illusions/duckman')
-rw-r--r--engines/illusions/duckman/illusions_duckman.cpp6
-rw-r--r--engines/illusions/duckman/propertytimers.cpp8
2 files changed, 7 insertions, 7 deletions
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;
}