aboutsummaryrefslogtreecommitdiff
path: root/sword1/menu.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2003-12-28 18:10:18 +0000
committerTorbjörn Andersson2003-12-28 18:10:18 +0000
commitd8b0a3871841b90d3d6dbb1d0f0cf5ddee2b1299 (patch)
treebc66bfffda695fcb7b5cf39825e2272c4271108b /sword1/menu.cpp
parent1efa471292e6ac1321e587af8c59bd09eb98c4f9 (diff)
downloadscummvm-rg350-d8b0a3871841b90d3d6dbb1d0f0cf5ddee2b1299.tar.gz
scummvm-rg350-d8b0a3871841b90d3d6dbb1d0f0cf5ddee2b1299.tar.bz2
scummvm-rg350-d8b0a3871841b90d3d6dbb1d0f0cf5ddee2b1299.zip
When showMenu() redraws the menu, redraw the empty slots as well. This
fixes the "ghost" items left behind when combining two inventory objects in such a way that one of them is used up. svn-id: r12001
Diffstat (limited to 'sword1/menu.cpp')
-rw-r--r--sword1/menu.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/sword1/menu.cpp b/sword1/menu.cpp
index 265209fae3..15f3942e61 100644
--- a/sword1/menu.cpp
+++ b/sword1/menu.cpp
@@ -278,8 +278,12 @@ void SwordMenu::buildMenu(void) {
void SwordMenu::showMenu(uint8 menuType) {
if (menuType == MENU_TOP) {
if (_objectBarStatus == MENU_OPEN) {
- for (uint8 cnt = 0; cnt < _inMenu; cnt++)
- _objects[cnt]->draw();
+ for (uint8 cnt = 0; cnt < 16; cnt++) {
+ if (_objects[cnt])
+ _objects[cnt]->draw();
+ else
+ _screen->showFrame(cnt * 40, 0, 0xffffffff, 0);
+ }
} else if (_objectBarStatus == MENU_CLOSED) {
_objectBarStatus = MENU_OPENING;
_fadeObject = 0;