aboutsummaryrefslogtreecommitdiff
path: root/scumm/actor.cpp
diff options
context:
space:
mode:
authorMax Horn2002-12-25 00:31:39 +0000
committerMax Horn2002-12-25 00:31:39 +0000
commit7cb69f7fa2f17eca5a1ad08162ce9e5e5a2cb5e4 (patch)
treed1984c88e6f5cfc130335270c30db27f9a584673 /scumm/actor.cpp
parent702de7424c1c49ab99494fa5ac0c0268ce1369a0 (diff)
downloadscummvm-rg350-7cb69f7fa2f17eca5a1ad08162ce9e5e5a2cb5e4.tar.gz
scummvm-rg350-7cb69f7fa2f17eca5a1ad08162ce9e5e5a2cb5e4.tar.bz2
scummvm-rg350-7cb69f7fa2f17eca5a1ad08162ce9e5e5a2cb5e4.zip
allow array dynamically to make VC happy
svn-id: r6107
Diffstat (limited to 'scumm/actor.cpp')
-rw-r--r--scumm/actor.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index b0793ae0b2..529a688f43 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -848,17 +848,21 @@ void Scumm::playActorSounds()
void Scumm::processActors()
{
int i;
- Actor *actors[NUM_ACTORS], *a, **ac, **ac2, *tmp, **end;
+ Actor **actors, *a, **ac, **ac2, *tmp, **end;
int numactors = 0;
+ actors = new Actor*[NUM_ACTORS];
+
// Make a list of all actors in this room
for (i = 1; i < NUM_ACTORS; i++) {
a = derefActor(i);
if (a->isInCurrentRoom())
actors[numactors++] = a;
}
- if (!numactors)
+ if (!numactors) {
+ delete [] actors;
return;
+ }
end = actors + numactors;
@@ -883,6 +887,8 @@ void Scumm::processActors()
CHECK_HEAP a->animateCostume();
}
}
+
+ delete [] actors;
}
void Actor::drawActorCostume()