aboutsummaryrefslogtreecommitdiff
path: root/engines/tinsel
diff options
context:
space:
mode:
Diffstat (limited to 'engines/tinsel')
-rw-r--r--engines/tinsel/actors.cpp7
-rw-r--r--engines/tinsel/sched.cpp1
2 files changed, 7 insertions, 1 deletions
diff --git a/engines/tinsel/actors.cpp b/engines/tinsel/actors.cpp
index 3577f4e0cc..b6f6259b94 100644
--- a/engines/tinsel/actors.cpp
+++ b/engines/tinsel/actors.cpp
@@ -199,6 +199,10 @@ void RegisterActors(int num) {
void FreeActors() {
free(actorInfo);
actorInfo = NULL;
+ if (TinselV2) {
+ free(zFactors);
+ zFactors = NULL;
+ }
}
/**
@@ -625,7 +629,7 @@ int NextTaggedActor() {
PMOVER pActor;
bool hid;
- do {
+ while (ti < NumActors); {
if (actorInfo[ti].tagged) {
pActor = GetMover(ti+1);
if (pActor)
@@ -637,6 +641,7 @@ int NextTaggedActor() {
return ++ti;
}
}
+ ++ti;
} while (++ti < NumActors);
return 0;
diff --git a/engines/tinsel/sched.cpp b/engines/tinsel/sched.cpp
index 08a68d2d4a..d90312d271 100644
--- a/engines/tinsel/sched.cpp
+++ b/engines/tinsel/sched.cpp
@@ -760,6 +760,7 @@ void GlobalProcesses(uint32 numProcess, byte *pProcess) {
*/
void FreeGlobalProcesses() {
delete[] pGlobalProcess;
+ pGlobalProcess = 0;
numGlobalProcess = 0;
}