diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2004-10-02 16:58:44 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2004-10-02 16:58:44 +0000 |
commit | ea9055acb5f76e73cec3c841a17ede059fa092a7 (patch) | |
tree | 9872e794d2ddf1fcb776c8aaa6216fee64f7f145 | |
parent | 91fbf564fe4a28a93122d6a8a6a1df9d119dce91 (diff) | |
download | mana-ea9055acb5f76e73cec3c841a17ede059fa092a7.tar.gz mana-ea9055acb5f76e73cec3c841a17ede059fa092a7.tar.bz2 mana-ea9055acb5f76e73cec3c841a17ede059fa092a7.tar.xz mana-ea9055acb5f76e73cec3c841a17ede059fa092a7.zip |
*** empty log message ***
-rw-r--r-- | src/game.cpp | 4 | ||||
-rw-r--r-- | src/graphic/graphic.cpp | 4 | ||||
-rw-r--r-- | src/gui/gui.cpp | 8 |
3 files changed, 11 insertions, 5 deletions
diff --git a/src/game.cpp b/src/game.cpp index 52f8e5c4..834d475b 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -298,7 +298,7 @@ int get_packet_length(short id) { void do_parse() { unsigned short id; char *temp; - char direction; + //char direction; NODE *node = NULL; int len; @@ -689,7 +689,7 @@ void do_parse() { break; case 0x0119: sprintf(pkt_nfo, "%i %i %i %i", RFIFOL(2), RFIFOW(6), RFIFOW(8), RFIFOW(10)); - alert(pkt_nfo,"","","","",0,0); + //alert(pkt_nfo,"","","","",0,0); break; // Manage non implemented packets default: diff --git a/src/graphic/graphic.cpp b/src/graphic/graphic.cpp index 027723cf..4840e0a9 100644 --- a/src/graphic/graphic.cpp +++ b/src/graphic/graphic.cpp @@ -311,9 +311,9 @@ void do_graphic(void) { close_shop(); } break; - case 4: + case 4: + sell_dialog[3].d1 = get_item_quantity(sell_dialog[4].d1); dialog_message(sell_dialog, MSG_DRAW, 0, 0); - sell_dialog[3].d1 = get_item_quantity(sell_dialog[4].d1); if(!gui_update(sell_player)) { show_npc_dialog = shutdown_dialog(sell_player); diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 022d0ece..41c0ca41 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -22,6 +22,7 @@ */ #include "gui.h" +#include "../log.h" #include "allegro/internal/aintern.h" #include <math.h> #include <alfont.h> @@ -128,6 +129,7 @@ void loadSliderSkin() { int tokenCount; gui__repository[GUI_BMP_OFS_SLIDER] = (BITMAP *)gui_gfx[8].dat; + if(!gui__repository[GUI_BMP_OFS_SLIDER])alert("","","","","",0,0); tokens = get_config_argv("slider", "slider_h", &tokenCount); x = atoi(tokens[0]); y = atoi(tokens[1]); @@ -531,7 +533,7 @@ int tmw_slider_proc(int msg, DIALOG *d, int c) { if (msg == MSG_DRAW) { if (d->w >= d->h) { - rectfill(gui_bitmap, d->x, d->y, d->x + d->w, d->y+d->h, d->bg); + //rectfill(gui_bitmap, d->x, d->y, d->x + d->w, d->y+d->h, d->bg); /* horiz */ x = d->x; y = d->y + (d->h- gui_skin.slider.hSlider[0]->h)/2; @@ -547,8 +549,12 @@ int tmw_slider_proc(int msg, DIALOG *d, int c) { x+=w; masked_blit(gui_skin.slider.hSlider[2], gui_bitmap, 0, 0, x, y, gui_skin.slider.hSlider[2]->w, gui_skin.slider.hSlider[2]->h); + if(d->d1==0)d->d1=1; // Fix by 0 division + x = d->x + ((d->w-gui_skin.slider.hGrip->w) * d->d2)/d->d1; y = d->y + (d->h - gui_skin.slider.hGrip->h)/2; + if(!gui_bitmap)error("gui_bitmap"); + if(!gui_skin.slider.hGrip)error("hGrip"); masked_blit(gui_skin.slider.hGrip, gui_bitmap, 0, 0, x, y, gui_skin.slider.hGrip->w, gui_skin.slider.hGrip->h); } else { rectfill(gui_bitmap, d->x, d->y, d->x + d->w, d->y+d->h, d->bg); |