From 962d8481969150e591f9fc28e60b0dbee2b44c52 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 18 Apr 2011 20:37:24 +1000 Subject: TSAGE: Removed InventoryDialog allFlag parameter. This was intended to be used to simultaneously support the cheat mode dialog with all the inventory items. But that is going to need to be implemented as a completely separate dialog. --- engines/tsage/dialogs.cpp | 30 ++++++++++++++---------------- engines/tsage/dialogs.h | 4 ++-- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/engines/tsage/dialogs.cpp b/engines/tsage/dialogs.cpp index 0778ea8b2b..21970cee24 100644 --- a/engines/tsage/dialogs.cpp +++ b/engines/tsage/dialogs.cpp @@ -379,36 +379,34 @@ bool GfxInvImage::process(Event &event) { /*--------------------------------------------------------------------------*/ -void InventoryDialog::show(bool allFlag) { - if (!allFlag) { - // Determine how many items are in the player's inventory - int itemCount = 0; - SynchronisedList::iterator i; - for (i = _globals->_inventory._itemList.begin(); i != _globals->_inventory._itemList.end(); ++i) { - if ((*i)->inInventory()) - ++itemCount; - } +void InventoryDialog::show() { + // Determine how many items are in the player's inventory + int itemCount = 0; + SynchronisedList::iterator i; + for (i = _globals->_inventory._itemList.begin(); i != _globals->_inventory._itemList.end(); ++i) { + if ((*i)->inInventory()) + ++itemCount; + } - if (itemCount == 0) { - MessageDialog::show(INV_EMPTY_MSG, OK_BTN_STRING); - return; - } + if (itemCount == 0) { + MessageDialog::show(INV_EMPTY_MSG, OK_BTN_STRING); + return; } - InventoryDialog *dlg = new InventoryDialog(allFlag); + InventoryDialog *dlg = new InventoryDialog(); dlg->draw(); dlg->execute(); delete dlg; } -InventoryDialog::InventoryDialog(bool allFlag) { +InventoryDialog::InventoryDialog() { // Determine the maximum size of the image of any item in the player's inventory int imgWidth = 0, imgHeight = 0; SynchronisedList::iterator i; for (i = _globals->_inventory._itemList.begin(); i != _globals->_inventory._itemList.end(); ++i) { InvObject *invObject = *i; - if (allFlag || invObject->inInventory()) { + if (invObject->inInventory()) { // Get the image for the item GfxSurface itemSurface = surfaceFromRes(invObject->_displayResNum, invObject->_rlbNum, invObject->_cursorNum); diff --git a/engines/tsage/dialogs.h b/engines/tsage/dialogs.h index 8e766372b4..d7828526eb 100644 --- a/engines/tsage/dialogs.h +++ b/engines/tsage/dialogs.h @@ -108,11 +108,11 @@ private: Common::Array _images; GfxButton _btnOk, _btnLook; public: - InventoryDialog(bool allFlag = false); + InventoryDialog(); virtual ~InventoryDialog() {} void execute(); - static void show(bool allFlag = false); + static void show(); }; /*--------------------------------------------------------------------------*/ -- cgit v1.2.3