aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTravis Howell2004-07-05 06:25:01 +0000
committerTravis Howell2004-07-05 06:25:01 +0000
commit40fa690de06716055b93f2a0dae49f6d889aa6f6 (patch)
tree7bcaf51adf0469c665ef86c89840d0633257d42c /scumm
parent510d9c847f31c0a7c5f69c7b0487da4d53eab671 (diff)
downloadscummvm-rg350-40fa690de06716055b93f2a0dae49f6d889aa6f6.tar.gz
scummvm-rg350-40fa690de06716055b93f2a0dae49f6d889aa6f6.tar.bz2
scummvm-rg350-40fa690de06716055b93f2a0dae49f6d889aa6f6.zip
Merge into new function.
svn-id: r14170
Diffstat (limited to 'scumm')
-rw-r--r--scumm/actor.cpp11
-rw-r--r--scumm/script_v6.cpp22
-rw-r--r--scumm/scumm.h1
3 files changed, 15 insertions, 19 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index 280d7338a5..60d577daee 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -806,6 +806,17 @@ void ScummEngine::setTalkingActor(int value) {
VAR(VAR_TALK_ACTOR) = value;
}
+void ScummEngine::putActors() {
+ Actor *a;
+ int i;
+
+ for (i = 1; i < _numActors; i++) {
+ a = &_actors[i];
+ if (a && a->isInCurrentRoom())
+ a->putActor(a->_pos.x, a->_pos.y, a->room);
+ }
+}
+
void ScummEngine::showActors() {
int i;
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp
index 551de8a685..813fd25709 100644
--- a/scumm/script_v6.cpp
+++ b/scumm/script_v6.cpp
@@ -1465,18 +1465,9 @@ void ScummEngine_v6::o6_setBoxFlags() {
}
void ScummEngine_v6::o6_createBoxMatrix() {
- int i;
- Actor *a;
-
createBoxMatrix();
- if ((_gameId == GID_DIG) || (_gameId == GID_CMI)) {
- for (i = 1; i < _numActors; i++) {
- a = &_actors[i];
- if (a && a->isInCurrentRoom())
- a->putActor(a->_pos.x, a->_pos.y, _currentRoom);
- }
- }
+ putActors();
}
void ScummEngine_v6::o6_resourceRoutines() {
@@ -3145,15 +3136,8 @@ void ScummEngine_v6::o6_setBoxSet() {
assert(matrix);
memcpy(matrix, boxm, mboxSize);
- if (_version == 7) {
- Actor *a;
-
- for (i = 1; i < _numActors; i++) {
- a = &_actors[i];
- if (a && a->isInCurrentRoom())
- a->putActor(a->_pos.x, a->_pos.y, _currentRoom);
- }
- }
+ if (_version == 7)
+ putActors();
}
void ScummEngine_v6::decodeParseString(int m, int n) {
diff --git a/scumm/scumm.h b/scumm/scumm.h
index 50e8cc8d3b..052cfa0a86 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -794,6 +794,7 @@ protected:
void walkActors();
void playActorSounds();
void setActorRedrawFlags();
+ void putActors();
void showActors();
void resetActorBgs();
void processActors();