mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-05 06:00:33 -04:00
fix glitch in inventory and interface
This commit is contained in:
parent
9013f1038a
commit
3cc7c14064
2 changed files with 5 additions and 5 deletions
|
@ -1486,8 +1486,9 @@ int smlouvat_prodej(int cena,int ponuka,int posledni,int puvod,int pocet)
|
|||
|
||||
if (ponuka==0) return 0;
|
||||
if (ponuka<=cena) return 0;
|
||||
if (posledni!=0) if (ponuka>=posledni || ponuka>min) return 1;
|
||||
if (p_ok>r_ok) return 0;
|
||||
if (ponuka <= min && (posledni==0 || ponuka<posledni)) {
|
||||
if (p_ok>r_ok) return 0;
|
||||
}
|
||||
if (p_ok>75) return 2;
|
||||
if (p_ok>50) return 3;
|
||||
if (p_ok>25) return 4;
|
||||
|
@ -1544,7 +1545,7 @@ THAGGLERESULT smlouvat_dlg(int cena,int puvod,int pocet,int posledni, int money,
|
|||
define(-1,150,15,100,13,0,label,int2ascii(cena,buffer,10));
|
||||
set_font(H_FBOLD,MSG_COLOR1);
|
||||
define(-1,10,30,1,1,0,label,texty[238]);
|
||||
define(10,150,30,100,13,0,input_line,8,0,0,"");property(def_border(5,BAR_COLOR),NULL,NULL,0);set_default("");
|
||||
define(10,150,30,100,13,0,input_line,7,0,0,"");property(def_border(5,BAR_COLOR),NULL,NULL,0);set_default("");
|
||||
on_control_event(smlouvat_enter);
|
||||
define(20,20,20,80,20,2,button,texty[239]);property(def_border(5,BAR_COLOR),NULL,NULL,BAR_COLOR);on_control_change(terminate_gui);
|
||||
define(30,110,20,80,20,2,button,texty[230]);property(def_border(5,BAR_COLOR),NULL,NULL,BAR_COLOR);on_control_change(terminate_gui);
|
||||
|
|
|
@ -2494,7 +2494,6 @@ static int shop_sector;
|
|||
T_CLK_MAP clk_shop[]=
|
||||
{
|
||||
{-1,54,378,497,479,shop_change_player,2+8,-1},
|
||||
{-1,0,0,639,479,_exit_shop,8,-1},
|
||||
{-1,INV_X,INV_Y,INV_X+INV_XS*6,INV_Y+INV_YS*5,shop_bag_click,MS_EVENT_MOUSE_LPRESS,-1},
|
||||
{1,2+BUYBOX_X,39+BUYBOX_Y,22+BUYBOX_X,76+BUYBOX_Y,shop_block_click,2,H_MS_DEFAULT},
|
||||
{2,246+BUYBOX_X,39+BUYBOX_Y,266+BUYBOX_X,76+BUYBOX_Y,shop_block_click,2,H_MS_DEFAULT},
|
||||
|
@ -2503,6 +2502,7 @@ T_CLK_MAP clk_shop[]=
|
|||
{-1,337,0,357,14,go_map,2,H_MS_DEFAULT},
|
||||
{-1,87,0,142,14,game_setup,2,H_MS_DEFAULT},
|
||||
{-1,30,0,85,14,konec,2,H_MS_DEFAULT},
|
||||
{-1,0,0,639,479,_exit_shop,8,-1},
|
||||
};
|
||||
|
||||
static void shop_mouse_event(EVENT_MSG *msg,void **unused)
|
||||
|
@ -3207,7 +3207,6 @@ char _exit_shop(int id, int xa, int ya,int xr,int yr)
|
|||
{
|
||||
xr,yr,xa,ya,id;
|
||||
SEND_LOG("(SHOP) Exiting shop...");
|
||||
memset(shp_item_map, 0, sizeof(shp_item_map));
|
||||
if (cur_owner==-1)
|
||||
{
|
||||
free(picked_item);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue