mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-16 03:06:45 -04:00
fix lot of gcc reported issues
This commit is contained in:
parent
669f72908e
commit
b6c5658b48
20 changed files with 493 additions and 334 deletions
|
@ -40,7 +40,7 @@ CTL3D *def_border(int btype,int color)
|
|||
highlight(&ctl,color);
|
||||
switch (btype)
|
||||
{
|
||||
case 0:ctl.bsize=0;
|
||||
case 0:ctl.bsize=0;break;
|
||||
case 1:ctl.light=color;ctl.shadow=color;ctl.bsize=1;break;
|
||||
case 2:ctl.bsize=2;ctl.ctldef=0;break;
|
||||
case 3:ctl.bsize=2;ctl.ctldef=3;break;
|
||||
|
@ -782,8 +782,8 @@ void input_line_event(EVENT_MSG *msg,OBJREC *o)
|
|||
case 'M':if (cursor<slen) cursor++;break;
|
||||
case 'K':if (cursor>0) cursor--;break;
|
||||
case 'S':if (cursor<slen) strcpy(&c[cursor],&c[cursor+1]);slen--;break;
|
||||
case 'G':cursor=0;
|
||||
case 'O':cursor=slen;
|
||||
case 'G':cursor=0;break;
|
||||
case 'O':cursor=slen;break;
|
||||
}
|
||||
else
|
||||
if (key)
|
||||
|
@ -1079,7 +1079,8 @@ void scroll_bar_h_draw(int x1,int y1,int x2,int y2,OBJREC *o)
|
|||
valsize=p->maxvalue-p->minvalue;
|
||||
wsize=x2-x1;
|
||||
barsize=wsize*p->parview/valsize;
|
||||
if (barsize>wsize) barsize=wsize;if (barsize<2) barsize=2;
|
||||
if (barsize>wsize) barsize=wsize;
|
||||
if (barsize<2) barsize=2;
|
||||
wsize-=barsize;
|
||||
curcolor=p->bgcolor;
|
||||
bar32(x1,y1,x2,y2);
|
||||
|
|
|
@ -320,6 +320,9 @@ void put_picture(word x,word y,void *p)
|
|||
word xss=xs;
|
||||
word yss=ys;
|
||||
|
||||
if (x > DxGetResX() || y > DxGetResY()) return;
|
||||
|
||||
|
||||
if (x+xss>=DxGetResX()) xss=DxGetResX()-x;
|
||||
if (y+yss>=DxGetResY()) yss=DxGetResY()-y;
|
||||
|
||||
|
@ -387,6 +390,7 @@ void get_picture(word x,word y,word xs,word ys,void *p)
|
|||
word *data=p;
|
||||
word xss=xs;
|
||||
word yss=ys;
|
||||
if (x > DxGetResX() || y > DxGetResY()) return;
|
||||
|
||||
if (x+xss>=DxGetResX()) xss=DxGetResX()-x;
|
||||
if (y+yss>=DxGetResY()) yss=DxGetResY()-y;
|
||||
|
|
|
@ -275,7 +275,6 @@ void heap_error(size_t size) //heap system
|
|||
char repeat=0,did=0;
|
||||
THANDLE_DATA *lastblock=NULL;
|
||||
char *last_free=NULL;
|
||||
int num;
|
||||
do
|
||||
{
|
||||
maxcounter=0;
|
||||
|
@ -295,14 +294,13 @@ void heap_error(size_t size) //heap system
|
|||
if (last_free!=NULL)
|
||||
{
|
||||
d=(char *)h->blockdata-last_free;
|
||||
if (d<max) sh=h,max=d,did=1,num=i*BK_MINOR_HANDLES+j;
|
||||
if (d<max) sh=h,max=d,did=1;
|
||||
}
|
||||
else if (c>maxcounter)
|
||||
{
|
||||
maxcounter=c;
|
||||
sh=h;
|
||||
did=1;
|
||||
num=i*BK_MINOR_HANDLES+j;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -259,6 +259,7 @@ void string_list_event(EVENT_MSG *msg,OBJREC *o)
|
|||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case E_LOST_FOCUS:clicked=0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue