aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFlorian Kagerer2008-02-17 21:58:46 +0000
committerFlorian Kagerer2008-02-17 21:58:46 +0000
commit2032965063c0f278d132ff10019bd2a25b4d7f5d (patch)
treee17927bf257f56eaec1921f8b056f53eaa083507 /engines
parentd2513eb5f5b45bb8d8d466cb06ba9ab9ee7880bd (diff)
downloadscummvm-rg350-2032965063c0f278d132ff10019bd2a25b4d7f5d.tar.gz
scummvm-rg350-2032965063c0f278d132ff10019bd2a25b4d7f5d.tar.bz2
scummvm-rg350-2032965063c0f278d132ff10019bd2a25b4d7f5d.zip
scripting bug fix (npc scene startup scripts were executed twice)
svn-id: r30899
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/kyra_v2.h1
-rw-r--r--engines/kyra/script_v2.cpp5
-rw-r--r--engines/kyra/text_v2.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h
index f35efa1d8d..675947d2e7 100644
--- a/engines/kyra/kyra_v2.h
+++ b/engines/kyra/kyra_v2.h
@@ -666,7 +666,6 @@ protected:
int _npcTalkDlgIndex;
uint8 _newSceneDlgState[32];
int8 **_conversationState;
- uint8 _npcTalkUNK;
uint8 *_dlgBuffer;
// tim sequence
diff --git a/engines/kyra/script_v2.cpp b/engines/kyra/script_v2.cpp
index 587115551d..6f7d5a91f9 100644
--- a/engines/kyra/script_v2.cpp
+++ b/engines/kyra/script_v2.cpp
@@ -455,9 +455,10 @@ int KyraEngine_v2::o2_enterNewSceneEx(ScriptState *script) {
debugC(3, kDebugLevelScriptFuncs, "o2_enterNewSceneEx(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0),
stackPos(1), stackPos(2), stackPos(3), stackPos(4));
- enterNewScene(stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4));
+ int skipNpcScript = stackPos(3);
+ enterNewScene(stackPos(0), stackPos(1), stackPos(2), skipNpcScript, stackPos(4));
- if (!stackPos(3))
+ if (!skipNpcScript)
runSceneScript4(0);
_unk5 = 1;
diff --git a/engines/kyra/text_v2.cpp b/engines/kyra/text_v2.cpp
index 5857fdae66..c5252d78aa 100644
--- a/engines/kyra/text_v2.cpp
+++ b/engines/kyra/text_v2.cpp
@@ -642,7 +642,7 @@ void KyraEngine_v2::setNewDlgIndex(int dlgIndex) {
memset(_newSceneDlgState, 0, 32);
for (int i = 0; i < 19; i++)
memset(_conversationState[i], -1, 14);
- _npcTalkUNK = 0;
+ _unkFlag1 = false;
_mainCharacter.dlgIndex = dlgIndex;
}