aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2017-12-29 19:41:59 -0500
committerPaul Gilbert2017-12-29 19:41:59 -0500
commit1bc519aadcc8df4999aa851eae6dfa98d7e9d929 (patch)
tree9cd8b18882fdc214c0971b81564588f19792d89d
parent4e11d05f7672f75180660402785c2a85500618c7 (diff)
downloadscummvm-rg350-1bc519aadcc8df4999aa851eae6dfa98d7e9d929.tar.gz
scummvm-rg350-1bc519aadcc8df4999aa851eae6dfa98d7e9d929.tar.bz2
scummvm-rg350-1bc519aadcc8df4999aa851eae6dfa98d7e9d929.zip
XEEN: Fix display of given treasure
-rw-r--r--engines/xeen/party.cpp14
-rw-r--r--engines/xeen/resources.cpp2
2 files changed, 8 insertions, 8 deletions
diff --git a/engines/xeen/party.cpp b/engines/xeen/party.cpp
index f279b33f6d..250bc56a7e 100644
--- a/engines/xeen/party.cpp
+++ b/engines/xeen/party.cpp
@@ -574,7 +574,7 @@ void Party::giveTreasure() {
Windows &windows = *_vm->_windows;
Window &w = windows[10];
- if (!_treasure._gold && !_treasure._gems)
+ if (!_treasure._hasItems && !_treasure._gold && !_treasure._gems)
return;
bool monstersPresent = false;
@@ -652,7 +652,7 @@ void Party::giveTreasure() {
Character &c = _activeParty[charIndex];
if (!c._items[(ItemCategory)categoryNum].isFull() && !c.isDisabledOrDead()) {
giveTreasureToCharacter(c, (ItemCategory)categoryNum, itemNum);
- continue;
+ break;
}
}
}
@@ -1100,7 +1100,10 @@ bool Party::giveTake(int takeMode, uint takeVal, int giveMode, uint giveVal, int
break;
case 21: {
int idx;
- if (giveVal < 35) {
+ if (giveVal >= 82) {
+ _questItems[giveVal - 82]++;
+ }
+ if (giveVal < 35 || giveVal >= 82) {
for (idx = 0; idx < 10 && _treasure._weapons[idx]._id; ++idx);
if (idx < 10) {
_treasure._weapons[idx]._id = giveVal;
@@ -1121,16 +1124,13 @@ bool Party::giveTake(int takeMode, uint takeVal, int giveMode, uint giveVal, int
_treasure._hasItems = true;
return false;
}
- } else if (giveVal < 82) {
+ } else {
for (idx = 0; idx < 10 && _treasure._misc[idx]._material; ++idx);
if (idx < 10) {
_treasure._accessories[idx]._material = giveVal - 60;
_treasure._hasItems = true;
return false;
}
- } else {
- _questItems[giveVal - 82]++;
- return false;
}
return true;
}
diff --git a/engines/xeen/resources.cpp b/engines/xeen/resources.cpp
index 7edd920db0..f9b6548404 100644
--- a/engines/xeen/resources.cpp
+++ b/engines/xeen/resources.cpp
@@ -1581,7 +1581,7 @@ const char *const Resources::BACKPACKS_FULL_PRESS_KEY =
"\v007\f12Warning! BackPacks Full!\fd\n"
"Press a Key";
-const char *const Resources::HIT_A_KEY = "\x3l\v120\t000\x4""077\x3""c\f37Hit a key\f'd";
+const char *const Resources::HIT_A_KEY = "\x3l\v120\t000\x4""077\x3""c\f37Hit a key\xC""d";
const char *const Resources::GIVE_TREASURE_FORMATTING =
"\x3l\v060\t000\x4""077\n"