summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2004-12-26 16:12:09 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2004-12-26 16:12:09 +0000
commit251031b790ebc5cd677315174d4e46bc4e287718 (patch)
tree0f810a515bd5390f771d0dc41cd2e59e9914732d /src/game.cpp
parent87bee54dede4d9d80731a01bd8c4e9384e047e58 (diff)
downloadmana-251031b790ebc5cd677315174d4e46bc4e287718.tar.gz
mana-251031b790ebc5cd677315174d4e46bc4e287718.tar.bz2
mana-251031b790ebc5cd677315174d4e46bc4e287718.tar.xz
mana-251031b790ebc5cd677315174d4e46bc4e287718.zip
Ported buy dialog, which could still use visual improvement, and added
\|-`~ to the fixed font.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 37162409..64336157 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -734,17 +734,19 @@ void do_parse() {
break;
// Buy/Sell dialog
case 0x00c4:
- //if(show_npc_dialog==0) {
- show_npc_dialog = 2;
- current_npc = RFIFOL(2);
- //}
+ buyDialog->setVisible(false);
+ show_npc_dialog = 2;
+ current_npc = RFIFOL(2);
break;
// Buy dialog
case 0x00c6:
- n_items = (len-4)/11;
- show_npc_dialog = 3;
- for(int k=0;k<n_items;k++)
- add_buy_item(RFIFOW(4+11*k+9), RFIFOL(4+11*k));
+ n_items = (len - 4) / 11;
+ buyDialog->reset();
+ buyDialog->setMoney(char_info->gp);
+ buyDialog->setVisible(true);
+ for (int k = 0; k < n_items; k++) {
+ buyDialog->addItem(RFIFOW(4 + 11 * k + 9), RFIFOL(4 + 11 * k));
+ }
break;
// Sell dialog
case 0x00c7: