aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/script_v2.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2008-03-19 17:13:31 +0000
committerJohannes Schickel2008-03-19 17:13:31 +0000
commit24fe9e42d765528529d48192bdbd6369e1082c9f (patch)
treeca1b80087d25afab49160fac5c08b2aa00636b68 /engines/kyra/script_v2.cpp
parent2c670730849126f431873ef32b22bca33bfcc8dd (diff)
downloadscummvm-rg350-24fe9e42d765528529d48192bdbd6369e1082c9f.tar.gz
scummvm-rg350-24fe9e42d765528529d48192bdbd6369e1082c9f.tar.bz2
scummvm-rg350-24fe9e42d765528529d48192bdbd6369e1082c9f.zip
- fixed numerous graphics glitches
-> fixed bug in o2_stopSceneAnimation -> fixed bug in KyraEngine_v2::freeSceneAnims svn-id: r31196
Diffstat (limited to 'engines/kyra/script_v2.cpp')
-rw-r--r--engines/kyra/script_v2.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/engines/kyra/script_v2.cpp b/engines/kyra/script_v2.cpp
index 65a4f8cb63..447603e907 100644
--- a/engines/kyra/script_v2.cpp
+++ b/engines/kyra/script_v2.cpp
@@ -1468,11 +1468,6 @@ int KyraEngine_v2::o2_setupSceneAnimation(ScriptState *script) {
obj->height = anim.height;
obj->width2 = obj->height2 = anim.specialSize;
- // be sure we don't have an the object allready in the anim list
- // else we get look ups in some places, the original doesn't do this
- // though
- _animList = deleteAnimListEntry(_animList, obj);
-
_animList = addToAnimListSorted(_animList, obj);
obj->needRefresh = 1;
obj->unk8 = 1;
@@ -1481,8 +1476,8 @@ int KyraEngine_v2::o2_setupSceneAnimation(ScriptState *script) {
int KyraEngine_v2::o2_stopSceneAnimation(ScriptState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_stopSceneAnimation(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1));
- const int index = 1+stackPos(0);
- AnimObj &obj = _animObjects[index];
+ const int index = stackPos(0);
+ AnimObj &obj = _animObjects[1+index];
restorePage3();
obj.shapeIndex3 = 0xFFFF;
obj.animNum = 0xFFFF;
@@ -1491,7 +1486,7 @@ int KyraEngine_v2::o2_stopSceneAnimation(ScriptState *script) {
if (stackPos(1))
refreshAnimObjectsIfNeed();
obj.enabled = false;
- _animList = deleteAnimListEntry(_animList, &_animObjects[index]);
+ _animList = deleteAnimListEntry(_animList, &_animObjects[1+index]);
if (_sceneAnimMovie[index]->opened())
_sceneAnimMovie[index]->close();