aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/script.cpp
diff options
context:
space:
mode:
authorDenis Kasak2009-08-12 07:34:31 +0000
committerDenis Kasak2009-08-12 07:34:31 +0000
commit8ca10ac3b0527e51a0f72a60e5249525a2746e1c (patch)
tree8a23beb2ae0d53e1572f65da4c1dee4d3263d1a1 /engines/draci/script.cpp
parentc57515b5f868d5c79d4ec9176c9f0c92cac9b454 (diff)
downloadscummvm-rg350-8ca10ac3b0527e51a0f72a60e5249525a2746e1c.tar.gz
scummvm-rg350-8ca10ac3b0527e51a0f72a60e5249525a2746e1c.tar.bz2
scummvm-rg350-8ca10ac3b0527e51a0f72a60e5249525a2746e1c.zip
Fixed dialogues logic (some indexes were calculated erroneously +/- 1).
svn-id: r43312
Diffstat (limited to 'engines/draci/script.cpp')
-rw-r--r--engines/draci/script.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/draci/script.cpp b/engines/draci/script.cpp
index f526bdc874..26d0a666ba 100644
--- a/engines/draci/script.cpp
+++ b/engines/draci/script.cpp
@@ -223,15 +223,20 @@ int Script::funcAtBegin(int yesno) {
}
int Script::funcLastBlock(int blockID) {
+ blockID -= 1;
return _vm->_game->_lastBlock == blockID;
}
int Script::funcBlockVar(int blockID) {
+ blockID -= 1;
+
return _vm->_game->_dialogueVars[_vm->_game->_dialogueOffsets[_vm->_game->_currentDialogue] + blockID];
}
int Script::funcHasBeen(int blockID) {
+ blockID -= 1;
+
return _vm->_game->_dialogueVars[_vm->_game->_dialogueOffsets[_vm->_game->_currentDialogue] + blockID] > 0;
}
@@ -692,7 +697,7 @@ void Script::resetDialogueFrom(Common::Queue<int> &params) {
}
void Script::resetBlock(Common::Queue<int> &params) {
- int blockID = params.pop();
+ int blockID = params.pop() - 1;
_vm->_game->_dialogueVars[_vm->_game->_dialogueOffsets[_vm->_game->_currentDialogue]+blockID] = 0;
}