Fixed linkat bug
This commit is contained in:
parent
47e1c9cd7b
commit
47dd570d84
|
@ -527,7 +527,7 @@ int main (int argc, char **argv) {
|
||||||
if (o == -1) {
|
if (o == -1) {
|
||||||
o = objat(event.button.x, event.button.y);
|
o = objat(event.button.x, event.button.y);
|
||||||
if (o == -1) {
|
if (o == -1) {
|
||||||
o = linkat(event.button.x, event.button.y);
|
o = getlinkat(event.button.x, event.button.y);
|
||||||
if (o != -1) {
|
if (o != -1) {
|
||||||
clickedtype = T_LINK;
|
clickedtype = T_LINK;
|
||||||
}
|
}
|
||||||
|
@ -1284,7 +1284,7 @@ int main (int argc, char **argv) {
|
||||||
changestate(S_NONE);
|
changestate(S_NONE);
|
||||||
} else if (state == S_NONE) {
|
} else if (state == S_NONE) {
|
||||||
/* are we on a link? if so, add a point to it */
|
/* are we on a link? if so, add a point to it */
|
||||||
o = linkat(event.button.x + screenx, event.button.y + screeny);
|
o = getlinkat(event.button.x + screenx, event.button.y + screeny);
|
||||||
if (o != -1) {
|
if (o != -1) {
|
||||||
addlinkpoint(o, event.button.x+screenx, event.button.y+screeny);
|
addlinkpoint(o, event.button.x+screenx, event.button.y+screeny);
|
||||||
/* select the link */
|
/* select the link */
|
||||||
|
@ -6028,7 +6028,7 @@ int linelen(int x1,int y1,int x2,int y2) {
|
||||||
return numpixels;
|
return numpixels;
|
||||||
}
|
}
|
||||||
|
|
||||||
int linkat(int x, int y) {
|
int getlinkat(int x, int y) {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < map[curmap].numlinks; i++) {
|
for (i = 0; i < map[curmap].numlinks; i++) {
|
||||||
/* is (x,y) on the line? */
|
/* is (x,y) on the line? */
|
||||||
|
|
|
@ -255,7 +255,7 @@ void drawyn(char *prompt);
|
||||||
int getyn(int x, int y);
|
int getyn(int x, int y);
|
||||||
void goback(void);
|
void goback(void);
|
||||||
int linelen(int x1,int y1,int x2,int y2);
|
int linelen(int x1,int y1,int x2,int y2);
|
||||||
int linkat(int x, int y);
|
int getlinkat(int x, int y);
|
||||||
int loadmap(void);
|
int loadmap(void);
|
||||||
void lowerselected(int amt);
|
void lowerselected(int amt);
|
||||||
int objat(int x, int y);
|
int objat(int x, int y);
|
||||||
|
|
Loading…
Reference in New Issue