aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Hesse2006-12-14 19:07:43 +0000
committerSven Hesse2006-12-14 19:07:43 +0000
commiteb012d811072b43a4af475b4e7f069924e2eca10 (patch)
treeb641d4d7bace74e9d7131a8a8243dc93394eb680
parentcf30537765750ac3d9372f4fe396bb12f33686c7 (diff)
downloadscummvm-rg350-eb012d811072b43a4af475b4e7f069924e2eca10.tar.gz
scummvm-rg350-eb012d811072b43a4af475b4e7f069924e2eca10.tar.bz2
scummvm-rg350-eb012d811072b43a4af475b4e7f069924e2eca10.zip
Smashed the wizard's house bug
svn-id: r24850
-rw-r--r--engines/gob/goblin.cpp3
-rw-r--r--engines/gob/inter_v2.cpp4
-rw-r--r--engines/gob/mult.h8
3 files changed, 9 insertions, 6 deletions
diff --git a/engines/gob/goblin.cpp b/engines/gob/goblin.cpp
index b6925d0358..24842b6541 100644
--- a/engines/gob/goblin.cpp
+++ b/engines/gob/goblin.cpp
@@ -2036,6 +2036,9 @@ void Goblin::sub_11984(Mult::Mult_Object *obj) {
animData->field_15--;
}
+ if (animData->frame < framesCount)
+ return;
+
if (animData->field_F != -1) {
animData->frame = 0;
animData->state = animData->field_F;
diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp
index 66ebd8aa05..0c050e9436 100644
--- a/engines/gob/inter_v2.cpp
+++ b/engines/gob/inter_v2.cpp
@@ -1955,8 +1955,8 @@ void Inter_v2::o2_initMult(void) {
for (i = 0; i < _vm->_mult->_objCount; i++) {
_vm->_mult->_objects[i].pPosX = (int32 *)(_vm->_global->_inter_variables + i * 4 + (posXVar / 4) * 4);
_vm->_mult->_objects[i].pPosY = (int32 *)(_vm->_global->_inter_variables + i * 4 + (posYVar / 4) * 4);
- if ((i == 0) || (i == 1))
- warning("=> Goblin %d: %d (%d) (%d)", i, animDataVar + i * 4 * _vm->_global->_inter_animDataSize, (animDataVar + i * 4 * _vm->_global->_inter_animDataSize) / 4, _vm->_global->_inter_animDataSize);
+// if ((i == 0) || (i == 1))
+// warning("=> Goblin %d: %d %d %d %d %d (%d) (%d)", i, i * 4 + (posXVar / 4) * 4, i + (posXVar / 4), i * 4 + (posYVar / 4) * 4, i + (posYVar / 4), animDataVar + i * 4 * _vm->_global->_inter_animDataSize, (animDataVar + i * 4 * _vm->_global->_inter_animDataSize) / 4, _vm->_global->_inter_animDataSize);
_vm->_mult->_objects[i].pAnimData =
(Mult::Mult_AnimData *) (_vm->_global->_inter_variables + animDataVar +
i * 4 * _vm->_global->_inter_animDataSize);
diff --git a/engines/gob/mult.h b/engines/gob/mult.h
index c8adfd3443..a6ed15180a 100644
--- a/engines/gob/mult.h
+++ b/engines/gob/mult.h
@@ -35,9 +35,9 @@ public:
#include "common/pack-start.h" // START STRUCT PACKING
struct Mult_AnimData {
- int8 animation;
+ uint8 animation;
uint8 layer;
- int8 frame;
+ uint8 frame;
int8 animType;
int8 order;
int8 isPaused;
@@ -47,7 +47,7 @@ public:
int8 newLayer;
int8 newAnimation;
byte intersected;
- int8 newCycle;
+ uint8 newCycle;
int8 state; // New in GOB2
int8 nextState; // New in GOB2
int8 field_F; // New in GOB2
@@ -61,7 +61,7 @@ public:
int8 field_17; // New in GOB2
int8 somethingAnimation; // New in GOB2
int8 somethingLayer; // New in GOB2
- int8 somethingFrame; // New in GOB2
+ uint8 somethingFrame; // New in GOB2
};
struct Mult_GobState {