summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game.cpp1
-rw-r--r--src/gui/sell.cpp3
-rw-r--r--src/gui/shop.cpp22
-rw-r--r--src/gui/shop.h1
4 files changed, 3 insertions, 24 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 94abec3a..21c5aa3a 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -766,7 +766,6 @@ void do_parse() {
for (int k = 0; k < n_items; k++) {
sellDialog->addItem(
RFIFOW(4 + 10 * k), RFIFOL(4 + 10 * k + 2));
- //add_sell_item(RFIFOW(4 + 10 * k), RFIFOL(4 + 10 * k + 2));
}
}
else {
diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp
index f807d1c4..4dc210a4 100644
--- a/src/gui/sell.cpp
+++ b/src/gui/sell.cpp
@@ -77,6 +77,9 @@ SellDialog::~SellDialog()
void SellDialog::reset()
{
shopInventory.clear();
+ slider->setValue(0.0);
+ quantityLabel->setCaption("0");
+ quantityLabel->adjustSize();
}
void SellDialog::addItem(short index, int price)
diff --git a/src/gui/shop.cpp b/src/gui/shop.cpp
index c7bf5967..cc9d80ab 100644
--- a/src/gui/shop.cpp
+++ b/src/gui/shop.cpp
@@ -48,28 +48,6 @@ char *shop_list(int index, int *list_size) {
}
}
-void add_sell_item(short index, int price) {
- int id = inventoryWindow->items[index].id;
- ITEM_SHOP *item_shop = (ITEM_SHOP *)malloc(sizeof(ITEM_SHOP));
- if (id >= 501 && id <= 511)
- sprintf(item_shop->name, "%s %i gp", item_db[id-501], price);
- else
- sprintf(item_shop->name, "Unknown item %i gp", price);
- item_shop->price = price;
- item_shop->index = index;
- item_shop->id = id;
- item_shop->quantity = inventoryWindow->items[index].quantity;
- item_shop->next = NULL;
- if (shop == NULL)
- shop = item_shop;
- else {
- ITEM_SHOP *temp = shop;
- while(temp->next)
- temp = temp->next;
- temp->next = item_shop;
- }
-}
-
void close_shop() {
ITEM_SHOP *temp, *next;
temp = shop;
diff --git a/src/gui/shop.h b/src/gui/shop.h
index 2a1af602..c223ef7c 100644
--- a/src/gui/shop.h
+++ b/src/gui/shop.h
@@ -45,7 +45,6 @@ extern char itemCurrenyQ[10];
extern char *item_db[];
char *shop_list(int index, int *list_size);
-void add_sell_item(short index, int price);
void changeQ(void *dp3, int d2);
void close_shop();
short get_item_id(int index);