aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/tsage/dialogs.cpp30
-rw-r--r--engines/tsage/dialogs.h4
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();
};
/*--------------------------------------------------------------------------*/