diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2004-09-30 15:20:07 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2004-09-30 15:20:07 +0000 |
commit | c3b55b7b987cfe58e0503b44011a32507290a3e4 (patch) | |
tree | 60858db4e0bd000e2559293b3514395d4badd444 /src/gui | |
parent | e5f02f3f50022f35910093b6ca5681cecf86228f (diff) | |
download | mana-c3b55b7b987cfe58e0503b44011a32507290a3e4.tar.gz mana-c3b55b7b987cfe58e0503b44011a32507290a3e4.tar.bz2 mana-c3b55b7b987cfe58e0503b44011a32507290a3e4.tar.xz mana-c3b55b7b987cfe58e0503b44011a32507290a3e4.zip |
*** empty log message ***
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/inventory.cpp | 5 | ||||
-rw-r--r-- | src/gui/inventory.h | 11 | ||||
-rw-r--r-- | src/gui/shop.cpp | 5 |
3 files changed, 14 insertions, 7 deletions
diff --git a/src/gui/inventory.cpp b/src/gui/inventory.cpp index 8d001880..cc330895 100644 --- a/src/gui/inventory.cpp +++ b/src/gui/inventory.cpp @@ -159,7 +159,10 @@ void TmwInventory::draw(BITMAP * buffer) { ypos = inventory_dialog[0].y; if(items[itemX][itemY].flag) //draw the item - masked_blit((BITMAP *)itemset[items[itemX][itemY].itemIDNum].dat, buffer, 0, 0, (xpos+items[itemX][itemY].xpos), (ypos+items[itemX][itemY].ypos), 32, 32); + if(items[itemX][itemY].itemIDNum>=501 && items[itemX][itemY].itemIDNum<=510) + masked_blit((BITMAP *)itemset[items[itemX][itemY].itemIDNum-501].dat, buffer, 0, 0, (xpos+items[itemX][itemY].xpos), (ypos+items[itemX][itemY].ypos), 32, 32); + else + masked_blit((BITMAP *)itemset[0].dat, buffer, 0, 0, (xpos+items[itemX][itemY].xpos), (ypos+items[itemX][itemY].ypos), 32, 32); //the number of that item if(!bigwindow) diff --git a/src/gui/inventory.h b/src/gui/inventory.h index 82a98497..e88094ed 100644 --- a/src/gui/inventory.h +++ b/src/gui/inventory.h @@ -29,10 +29,11 @@ #ifndef _INVENTORY_H #define _INVENTORY_H + #include <allegro.h> -#ifdef WIN32 +/*#ifdef WIN32 #include <winalleg.h> -#endif +#endif*/ #include "../main.h" #include "../game.h" #include "../log.h" @@ -43,7 +44,7 @@ struct itemHolder { // the holder of a item int flag; // don't really know why I use this :) int itemIDNum; // the id of the item int num; // number of items - int xpos,ypos; // where am I? + int xpos, ypos; // where am I? }; @@ -55,12 +56,12 @@ class TmwInventory{ void create(int tempxpos, int tempypos); // create the window void draw(BITMAP *); // draw the window (if areDisplaying != 0 ) - void show(int val); // choose between the show and don't show the window + void show(int val); // choose between showing and not showing the window void toggle() { if(areDisplaying){show(0);}else{show(1);} } //API int addItem(int idnum, int antal); //add a item int rmItem(int idnum); //remove a item - int changeNum(int idnum, int antal); // change nummber of a item + int changeNum(int idnum, int antal); // change number of a item int useItem(int idnum); //END API private: diff --git a/src/gui/shop.cpp b/src/gui/shop.cpp index 84fe279e..530df8f4 100644 --- a/src/gui/shop.cpp +++ b/src/gui/shop.cpp @@ -30,7 +30,10 @@ int n_items; ITEM_SHOP *shop = NULL; -char *item_db[] = { "Candy", "Medical Herb", "Chocolate" }; +char *item_db[] = { + "Candy", "Medical Herb", "Chocolate", "Royal Jam", "Faerie Walnut", + "Cup of wishes", "Magic rope", "Midge mallet", "Flammie drum", "Moogle belt" +}; char *shop_list(int index, int *list_size) { if(index<0) { |