aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Hamm2002-05-20 16:02:29 +0000
committerVincent Hamm2002-05-20 16:02:29 +0000
commit1db4ae7c2f233c1825a9b4719134b39942cd23e3 (patch)
tree644d983e1c8564763b0cde11015fcefaf661212b
parent3da77a05900e51d9ad3f1051b18c2b4d46b631a5 (diff)
downloadscummvm-rg350-1db4ae7c2f233c1825a9b4719134b39942cd23e3.tar.gz
scummvm-rg350-1db4ae7c2f233c1825a9b4719134b39942cd23e3.tar.bz2
scummvm-rg350-1db4ae7c2f233c1825a9b4719134b39942cd23e3.zip
Temp removal of the actor walk script execution to fix dig's walking
svn-id: r4364
-rw-r--r--actor.cpp8
-rw-r--r--object.cpp2
-rw-r--r--script.cpp5
-rw-r--r--scumm.h2
-rw-r--r--scummvm.cpp6
5 files changed, 12 insertions, 11 deletions
diff --git a/actor.cpp b/actor.cpp
index 04f4682b12..bd37a07ef2 100644
--- a/actor.cpp
+++ b/actor.cpp
@@ -624,6 +624,10 @@ void Actor::adjustActorPos()
moving = 0;
cost.animCounter2 = 0;
+ if (_scumm->_features & GF_AFTER_V7) {
+ stopActorMoving();
+ }
+
flags = _scumm->getBoxFlags(walkbox);
if (flags & 7) {
turnToDirection(facing);
@@ -759,12 +763,12 @@ void Actor::startWalkAnim(int cmd, int angle)
if (angle == -1)
angle = facing;
- if (walk_script != 0) {
+/* if (walk_script != 0) {
args[2] = angle;
args[0] = number;
args[1] = cmd;
_scumm->runScript(walk_script, 1, 0, args);
- } else {
+ } else*/ {
switch (cmd) {
case 1: /* start walk */
setActorDirection(angle);
diff --git a/object.cpp b/object.cpp
index be1f948aca..07615e1a8b 100644
--- a/object.cpp
+++ b/object.cpp
@@ -1176,7 +1176,7 @@ void Scumm::enqueueObject(int objectNumber, int objectX, int objectY, int object
eo->areaY = _enqueue_c;
eo->areaWidth = _enqueue_d;
eo->areaHeight = _enqueue_e;
- eo->posX = objectX;
+ eo->posX = objectX + (camera._cur.x & 7);
eo->posY = objectY;
if (objectWidth == 0) {
od = &_objs[getObjectIndex(objectNumber)];
diff --git a/script.cpp b/script.cpp
index 642f608cba..bd951f26e9 100644
--- a/script.cpp
+++ b/script.cpp
@@ -276,7 +276,7 @@ void Scumm::executeScript()
_opcode = fetchScriptByte();
_scriptPointerStart = _scriptPointer;
vm.slot[_currentScript].didexec = 1;
- debug(9, "Script %d: [%X] %s()", vm.slot[_currentScript].number, _opcode, _opcodes_lookup[_opcode]);
+ debug(8, "Script %d: [%X] %s()", vm.slot[_currentScript].number, _opcode, _opcodes_lookup[_opcode]);
op = getOpcode(_opcode);
(this->*op) ();
}
@@ -901,9 +901,6 @@ void Scumm::animateActor(int act, int anim)
cmd = anim / 1000;
dir = anim % 1000;
- /* temporary code */
-// dir = newDirToOldDir(dir);
-
switch (cmd) {
case 2:
a->stopActorMoving();
diff --git a/scumm.h b/scumm.h
index d70fa35a10..287a482f7d 100644
--- a/scumm.h
+++ b/scumm.h
@@ -72,7 +72,7 @@ enum {
ssRunning = 2
};
-extern const uint16 many_direction_tab[18];
+extern const int16 many_direction_tab[18];
extern const int16 many_direction_tab_2[16];
extern const int bit_table[16];
diff --git a/scummvm.cpp b/scummvm.cpp
index 3e8070f7e5..f4ed7f0cc0 100644
--- a/scummvm.cpp
+++ b/scummvm.cpp
@@ -1063,8 +1063,7 @@ int Scumm::numSimpleDirDirections(int dirType)
return dirType ? 8 : 4;
}
-// FIXME - is the value "530" in many_direction_tab really correct? Maybe it should be "289" ?
-const uint16 many_direction_tab[18] = {4, 8, 90-19, 90+19, 270-19, 530, 0, 0, 0, 0, 0+22, 90-18, 90+17, 180-23, 180+22, 270-18, 270+17, 360-23};
+const int16 many_direction_tab[18] = {4, 8, 71, 109, 251, 289, -1, -1, -1, -1, 22, 72, 107, 157, 202, 252, 287, 337};
const int16 many_direction_tab_2[16] = {0, 90, 180, 270, -1, -1, -1, -1, 0, 45, 90, 135, 180, 225, 270, 315};
const int bit_table[16] = {1,2,4,8,0x10,0x20,0x40,0x80,0x100,0x200,0x400,0x800,0x1000,0x2000,0x4000,0x8000};
@@ -1073,7 +1072,7 @@ const int bit_table[16] = {1,2,4,8,0x10,0x20,0x40,0x80,0x100,0x200,0x400,0x800,0
int Scumm::toSimpleDir(int dirType, int dir)
{
int num = dirType ? 8 : 4, i;
- const uint16 *dirtab = &many_direction_tab[dirType * 8 + 2];
+ const int16 *dirtab = &many_direction_tab[dirType * 8 + 2];
for (i = 1; i < num; i++, dirtab++) {
if (dir >= dirtab[0] && dir <= dirtab[1])
return i;
@@ -1087,6 +1086,7 @@ int Scumm::fromSimpleDir(int dirType, int dir)
{
if (!dirType)
dir += dir;
+
return dir * 45;
}