aboutsummaryrefslogtreecommitdiff
path: root/engines/gob
diff options
context:
space:
mode:
authorSven Hesse2007-04-09 15:40:10 +0000
committerSven Hesse2007-04-09 15:40:10 +0000
commit293be0bfa4101c40ac8530e5937593e6df73ad59 (patch)
treeea042787da97354dd1856570a62cf1427c938733 /engines/gob
parent0d99a362e9323da21081da4719359ead62ce45d4 (diff)
downloadscummvm-rg350-293be0bfa4101c40ac8530e5937593e6df73ad59.tar.gz
scummvm-rg350-293be0bfa4101c40ac8530e5937593e6df73ad59.tar.bz2
scummvm-rg350-293be0bfa4101c40ac8530e5937593e6df73ad59.zip
Small glitch/different goblin handling fix for Gob3
svn-id: r26436
Diffstat (limited to 'engines/gob')
-rw-r--r--engines/gob/goblin.h3
-rw-r--r--engines/gob/goblin_v2.cpp3
-rw-r--r--engines/gob/goblin_v3.cpp21
3 files changed, 24 insertions, 3 deletions
diff --git a/engines/gob/goblin.h b/engines/gob/goblin.h
index 7a698ced20..f8bddff332 100644
--- a/engines/gob/goblin.h
+++ b/engines/gob/goblin.h
@@ -302,6 +302,9 @@ protected:
class Goblin_v3 : public Goblin_v2 {
public:
+ virtual void placeObject(Gob_Object * objDesc, char animated,
+ int16 index, int16 x, int16 y, int16 state);
+
Goblin_v3(GobEngine *vm);
virtual ~Goblin_v3() {};
diff --git a/engines/gob/goblin_v2.cpp b/engines/gob/goblin_v2.cpp
index caa473464c..29401837a7 100644
--- a/engines/gob/goblin_v2.cpp
+++ b/engines/gob/goblin_v2.cpp
@@ -426,9 +426,6 @@ void Goblin_v2::moveAdvance(Mult::Mult_Object *obj, Gob_Object *gobDesc,
}
if (animData->frame >= framesCount) {
- if (animData->nextState == -1) // TODO: This should never happen
- return;
-
state = animData->nextState;
animation = obj->goblinStates[state][0].animation;
layer = obj->goblinStates[state][0].layer;
diff --git a/engines/gob/goblin_v3.cpp b/engines/gob/goblin_v3.cpp
index 6c250ef396..1a3a34fcec 100644
--- a/engines/gob/goblin_v3.cpp
+++ b/engines/gob/goblin_v3.cpp
@@ -107,4 +107,25 @@ void Goblin_v3::advMovement(Mult::Mult_Object *obj, int8 state) {
}
}
+void Goblin_v3::placeObject(Gob_Object *objDesc, char animated,
+ int16 index, int16 x, int16 y, int16 state) {
+
+ Mult::Mult_Object &obj = _vm->_mult->_objects[index];
+ Mult::Mult_AnimData &objAnim = *(obj.pAnimData);
+
+ if ((state != -1) && (obj.goblinStates[state] != 0)) {
+ if (state == 8)
+ objAnim.curLookDir = 0;
+ else if (state == 9)
+ objAnim.curLookDir = 4;
+ else if (state == 28)
+ objAnim.curLookDir = 6;
+ else if (state == 29)
+ objAnim.curLookDir = 2;
+ }
+
+ Goblin_v2::placeObject(objDesc, animated, index, x, y, state);
+
+}
+
} // End of namespace Gob