diff options
author | Paul Gilbert | 2011-04-18 20:37:24 +1000 |
---|---|---|
committer | Paul Gilbert | 2011-04-18 20:37:24 +1000 |
commit | 962d8481969150e591f9fc28e60b0dbee2b44c52 (patch) | |
tree | aef2c6fef0eda714ae3dce8df1256be9092e05f4 /engines/tsage | |
parent | 26501fb46c86ad5473a6258359dc30bd1c1d92f1 (diff) | |
download | scummvm-rg350-962d8481969150e591f9fc28e60b0dbee2b44c52.tar.gz scummvm-rg350-962d8481969150e591f9fc28e60b0dbee2b44c52.tar.bz2 scummvm-rg350-962d8481969150e591f9fc28e60b0dbee2b44c52.zip |
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.
Diffstat (limited to 'engines/tsage')
-rw-r--r-- | engines/tsage/dialogs.cpp | 30 | ||||
-rw-r--r-- | 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<InvObject *>::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<InvObject *>::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<InvObject *>::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<GfxInvImage> _images; GfxButton _btnOk, _btnLook; public: - InventoryDialog(bool allFlag = false); + InventoryDialog(); virtual ~InventoryDialog() {} void execute(); - static void show(bool allFlag = false); + static void show(); }; /*--------------------------------------------------------------------------*/ |