aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorRobert Crossfield2012-01-26 18:38:38 +1100
committerTobias Gunkel2012-02-11 08:29:26 +0100
commit5b4b606a5879ddcbeb43d3c846bdf40f2d864bed (patch)
treec57ef41f0ffd24b6877ce4b1215ff427ca0fd3b5 /engines/scumm
parent08e3866395326faee0e64e2e92097f85418980f3 (diff)
downloadscummvm-rg350-5b4b606a5879ddcbeb43d3c846bdf40f2d864bed.tar.gz
scummvm-rg350-5b4b606a5879ddcbeb43d3c846bdf40f2d864bed.tar.bz2
scummvm-rg350-5b4b606a5879ddcbeb43d3c846bdf40f2d864bed.zip
SCUMM: Remove the setCmdFromDirection function
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/actor.cpp21
-rw-r--r--engines/scumm/actor.h1
2 files changed, 6 insertions, 16 deletions
diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp
index 89e4133ade..f5c17078da 100644
--- a/engines/scumm/actor.cpp
+++ b/engines/scumm/actor.cpp
@@ -563,7 +563,7 @@ void Actor_v2::walkActor() {
if( _vm->_game.version == 0 )
if( _moving == 0 )
- ((ActorC64*)this)->setCmdFromDirection( newDirToOldDir(new_dir) );
+ setDirection( new_dir );
return;
}
@@ -885,18 +885,11 @@ void Actor::setDirection(int direction) {
_needRedraw = true;
}
-void ActorC64::setDirection(int cmd) {
-
- setCmdFromDirection( newDirToOldDir( cmd ) );
-
-}
-
-// based on 0x2BCA, doesn't match disassembly because 'oldDir' variable
-// is not the same value as stored in the original interpreter
-int ActorC64::setCmdFromDirection(int direction) {
+void ActorC64::setDirection(int direction) {
+ int dir = newDirToOldDir( direction );
int res = 0;
- switch (direction) {
+ switch (dir) {
case 0:
res = 4; // Left
break;
@@ -917,8 +910,6 @@ int ActorC64::setCmdFromDirection(int direction) {
_animFrameRepeat = -1;
animateActor(res);
animateCostume();
-
- return res;
}
void Actor::faceToObject(int obj) {
@@ -950,7 +941,7 @@ void Actor::turnToDirection(int newdir) {
}
if (_vm->_game.version == 0)
- ((ActorC64*)this)->setCmdFromDirection( newDirToOldDir(newdir) );
+ setDirection( newdir );
}
@@ -1885,7 +1876,7 @@ void ActorC64::startAnimActor(int f) {
}
if( f == _standFrame )
- setCmdFromDirection( newDirToOldDir(_facing) );
+ setDirection( _facing );
else
animateActor( newDirToOldDir(_facing) );
}
diff --git a/engines/scumm/actor.h b/engines/scumm/actor.h
index a93b75c6e7..d3271f4eaa 100644
--- a/engines/scumm/actor.h
+++ b/engines/scumm/actor.h
@@ -386,7 +386,6 @@ public:
void speakCheck();
virtual void setDirection(int direction);
- int setCmdFromDirection(int direction);
void startAnimActor(int f);
// Used by the save/load system: