aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen
diff options
context:
space:
mode:
authorPaul Gilbert2018-04-21 07:26:52 -0400
committerPaul Gilbert2018-04-21 07:26:52 -0400
commit0aeecb6c336ae5f97aee940165fdff8a55bdcdba (patch)
tree594f2c8cdb3e56725c958a726b72fe6278c9ec9f /engines/xeen
parentea524fa7928813585f666d2f64e57253c464bb60 (diff)
downloadscummvm-rg350-0aeecb6c336ae5f97aee940165fdff8a55bdcdba.tar.gz
scummvm-rg350-0aeecb6c336ae5f97aee940165fdff8a55bdcdba.tar.bz2
scummvm-rg350-0aeecb6c336ae5f97aee940165fdff8a55bdcdba.zip
XEEN: Swords changes for game flags array
Diffstat (limited to 'engines/xeen')
-rw-r--r--engines/xeen/dialogs/dialogs_quests.cpp2
-rw-r--r--engines/xeen/interface.cpp2
-rw-r--r--engines/xeen/party.cpp6
-rw-r--r--engines/xeen/scripts.cpp4
4 files changed, 8 insertions, 6 deletions
diff --git a/engines/xeen/dialogs/dialogs_quests.cpp b/engines/xeen/dialogs/dialogs_quests.cpp
index 31d0bdf8d3..ebf15e9c6c 100644
--- a/engines/xeen/dialogs/dialogs_quests.cpp
+++ b/engines/xeen/dialogs/dialogs_quests.cpp
@@ -157,7 +157,7 @@ void Quests::execute() {
break;
case AUTO_NOTES: {
- int count = _vm->getGameID() == GType_Swords ? 49 : MAX_DIALOG_LINES;
+ count = _vm->getGameID() == GType_Swords ? 49 : MAX_DIALOG_LINES;
for (int idx = 0; idx < count; ++idx)
lines[idx] = "";
diff --git a/engines/xeen/interface.cpp b/engines/xeen/interface.cpp
index e986b9f2c1..cf44a602c9 100644
--- a/engines/xeen/interface.cpp
+++ b/engines/xeen/interface.cpp
@@ -654,7 +654,7 @@ void Interface::doStepCode() {
break;
}
- if (_vm->_files->_ccNum && party._gameFlags[1][118]) {
+ if (_vm->getGameID() != GType_Swords && _vm->_files->_ccNum && party._gameFlags[1][118]) {
_falling = FALL_NONE;
} else {
if (_falling != FALL_NONE)
diff --git a/engines/xeen/party.cpp b/engines/xeen/party.cpp
index b6ac558712..94ba964428 100644
--- a/engines/xeen/party.cpp
+++ b/engines/xeen/party.cpp
@@ -922,7 +922,8 @@ bool Party::giveTake(int takeMode, uint takeVal, int giveMode, uint giveVal, int
break;
}
case 20:
- _gameFlags[files._ccNum][takeVal] = false;
+ assert(takeVal < 256);
+ _gameFlags[_vm->getGameID() == GType_Swords ? 0 : files._ccNum][takeVal] = false;
break;
case 21: {
const uint WEAPONS_END = _vm->getGameID() != GType_Swords ? 35 : 41;
@@ -1187,7 +1188,8 @@ bool Party::giveTake(int takeMode, uint takeVal, int giveMode, uint giveVal, int
break;
}
case 20:
- _gameFlags[files._ccNum][giveVal] = true;
+ assert(giveVal < 256);
+ _gameFlags[_vm->getGameID() == GType_Swords ? 0 : files._ccNum][giveVal] = true;
break;
case 21: {
const uint WEAPONS_END = _vm->getGameID() != GType_Swords ? 35 : 41;
diff --git a/engines/xeen/scripts.cpp b/engines/xeen/scripts.cpp
index a354bc1a29..22f65fdc24 100644
--- a/engines/xeen/scripts.cpp
+++ b/engines/xeen/scripts.cpp
@@ -1589,9 +1589,9 @@ bool Scripts::ifProc(int action, uint32 val, int mode, int charIndex) {
break;
}
case 20:
- if (files._ccNum)
+ assert(val < 256);
+ if (files._ccNum && _vm->getGameID() != GType_Swords)
val += 256;
- assert(val < 512);
v = party._gameFlags[val / 256][val % 256] ? val : 0xffffffff;
break;
case 21: {