[Scummvm-git-logs] scummvm master -> ab7c0d38cb34038f22ef91f46643d940bf771c62
dreammaster
dreammaster at scummvm.org
Sat Nov 25 14:45:49 CET 2017
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
ab7c0d38cb XEEN: Fix for Items dialog item glyphs and crash exiting dialog
Commit: ab7c0d38cb34038f22ef91f46643d940bf771c62
https://github.com/scummvm/scummvm/commit/ab7c0d38cb34038f22ef91f46643d940bf771c62
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-11-25T08:45:40-05:00
Commit Message:
XEEN: Fix for Items dialog item glyphs and crash exiting dialog
Changed paths:
engines/xeen/dialogs_items.cpp
diff --git a/engines/xeen/dialogs_items.cpp b/engines/xeen/dialogs_items.cpp
index 5cc8181..ffd41d5 100644
--- a/engines/xeen/dialogs_items.cpp
+++ b/engines/xeen/dialogs_items.cpp
@@ -62,7 +62,7 @@ Character *ItemsDialog::execute(Character *c, ItemsMode mode) {
screen._windows[30].open();
enum { REDRAW_NONE, REDRAW_TEXT, REDRAW_FULL } redrawFlag = REDRAW_FULL;
- while (!_vm->shouldQuit()) {
+ for (;;) {
if (redrawFlag == REDRAW_FULL) {
if ((mode != ITEMMODE_CHAR_INFO || category != CATEGORY_MISC) && mode != ITEMMODE_ENCHANT
&& mode != ITEMMODE_RECHARGE && mode != ITEMMODE_TO_GOLD) {
@@ -135,8 +135,10 @@ Character *ItemsDialog::execute(Character *c, ItemsMode mode) {
}
for (int idx = 0; idx < INV_ITEMS_TOTAL; ++idx) {
- _itemsDrawList[idx]._x = 8;
- _itemsDrawList[idx]._y = 18 + idx * 9;
+ DrawStruct &ds = _itemsDrawList[idx];
+ ds._sprites = nullptr;
+ ds._x = 8;
+ ds._y = 18 + idx * 9;
switch (category) {
case CATEGORY_WEAPON:
@@ -161,13 +163,12 @@ Character *ItemsDialog::execute(Character *c, ItemsMode mode) {
));
}
- DrawStruct &ds = _itemsDrawList[idx];
ds._sprites = &_equipSprites;
if (c->_weapons.passRestrictions(i._id, true))
ds._frame = i._frame;
else
ds._frame = 14;
- } else if (_itemsDrawList[idx]._sprites == nullptr) {
+ } else if (ds._sprites == nullptr) {
lines.push_back(Res.NO_ITEMS_AVAILABLE);
}
break;
@@ -175,7 +176,6 @@ Character *ItemsDialog::execute(Character *c, ItemsMode mode) {
case CATEGORY_MISC: {
XeenItem &i = c->_misc[idx];
- _itemsDrawList[idx]._sprites = nullptr;
if (i._material == 0) {
// No item
@@ -319,6 +319,7 @@ Character *ItemsDialog::execute(Character *c, ItemsMode mode) {
if (_buttonValue == Common::KEYCODE_ESCAPE) {
if (mode == ITEMMODE_8)
continue;
+ c = startingChar;
break;
}
More information about the Scummvm-git-logs
mailing list