summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilip <philip@philip-linuxlaptop.(none)>2010-11-02 03:56:06 (GMT)
committer Philip <philip@philip-linuxlaptop.(none)>2010-11-02 03:56:06 (GMT)
commit4e46f51bcf8d47fec91e80ededb618b5e220a516 (patch)
tree15aecf929fa0a7b85412c67adef5831c9429c948 /src
parent176ecb11974c2fde3a174afcf14ce9922182b50c (diff)
downloadpowder-4e46f51bcf8d47fec91e80ededb618b5e220a516.zip
powder-4e46f51bcf8d47fec91e80ededb618b5e220a516.tar.gz
changed moving sign code so it doesn't modify the sign itself.
Diffstat (limited to 'src')
-rw-r--r--src/graphics.c2
-rw-r--r--src/interface.c8
-rw-r--r--src/main.c1
3 files changed, 6 insertions, 5 deletions
diff --git a/src/graphics.c b/src/graphics.c
index 39f9595..b403fe3 100644
--- a/src/graphics.c
+++ b/src/graphics.c
@@ -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);
diff --git a/src/interface.c b/src/interface.c
index 2161bcb..e561868 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -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)
diff --git a/src/main.c b/src/main.c
index af9dcc6..59d2600 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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];