changed moving sign code so it doesn't modify the sign itself.
This commit is contained in:
parent
176ecb1197
commit
4e46f51bcf
@ -90,7 +90,7 @@ extern int death;
|
||||
|
||||
struct sign
|
||||
{
|
||||
int x,y,ju,m;
|
||||
int x,y,ju;
|
||||
char text[256];
|
||||
};
|
||||
typedef struct sign sign;
|
||||
@ -103,6 +103,7 @@ struct stamp
|
||||
};
|
||||
typedef struct stamp stamp;
|
||||
|
||||
int MSIGN;
|
||||
extern sign signs[MAXSIGNS];
|
||||
extern stamp stamps[STAMP_MAX];
|
||||
extern int stamp_count;
|
||||
|
@ -2237,7 +2237,7 @@ void render_signs(pixel *vid_buf)
|
||||
x+=dx;
|
||||
y+=dy;
|
||||
}
|
||||
if(signs[i].m==1)
|
||||
if(MSIGN==i)
|
||||
{
|
||||
bq = b;
|
||||
b = SDL_GetMouseState(&mx, &my);
|
||||
|
@ -97,7 +97,7 @@ void get_sign_pos(int i, int *x0, int *y0, int *w, int *h)
|
||||
|
||||
void add_sign_ui(pixel *vid_buf, int mx, int my)
|
||||
{
|
||||
int i, w, h, x, y, nm=0, ju,movesign = 0;
|
||||
int i, w, h, x, y, nm=0, ju;
|
||||
int x0=(XRES-192)/2,y0=(YRES-80)/2,b=1,bq;
|
||||
ui_edit ed;
|
||||
|
||||
@ -105,9 +105,9 @@ void add_sign_ui(pixel *vid_buf, int mx, int my)
|
||||
for(i=0; i<MAXSIGNS; i++)
|
||||
if(signs[i].text[0])
|
||||
{
|
||||
if(signs[i].m == 1)
|
||||
if(i == MSIGN)
|
||||
{
|
||||
signs[i].m = 0;
|
||||
MSIGN = -1;
|
||||
return;
|
||||
}
|
||||
get_sign_pos(i, &x, &y, &w, &h);
|
||||
@ -197,7 +197,7 @@ void add_sign_ui(pixel *vid_buf, int mx, int my)
|
||||
|
||||
if(b && !bq && mx>=x0+104 && mx<=x0+130 && my>=y0+42 && my<=y0+59)
|
||||
{
|
||||
signs[i].m = 1;
|
||||
MSIGN = i;
|
||||
break;
|
||||
}
|
||||
if(b && !bq && mx>=x0+9 && mx<x0+23 && my>=y0+22 && my<y0+36)
|
||||
|
@ -101,6 +101,7 @@ int legacy_enable = 0; //Used to disable new features such as heat, will be set
|
||||
int death = 0, framerender = 0;
|
||||
int amd = 1;
|
||||
int FPSB = 0;
|
||||
int MSIGN =-1;
|
||||
|
||||
sign signs[MAXSIGNS];
|
||||
|
||||
|
Reference in New Issue
Block a user