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) {
|
||||
o = objat(event.button.x, event.button.y);
|
||||
if (o == -1) {
|
||||
o = linkat(event.button.x, event.button.y);
|
||||
o = getlinkat(event.button.x, event.button.y);
|
||||
if (o != -1) {
|
||||
clickedtype = T_LINK;
|
||||
}
|
||||
|
@ -1284,7 +1284,7 @@ int main (int argc, char **argv) {
|
|||
changestate(S_NONE);
|
||||
} else if (state == S_NONE) {
|
||||
/* 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) {
|
||||
addlinkpoint(o, event.button.x+screenx, event.button.y+screeny);
|
||||
/* select the link */
|
||||
|
@ -6028,7 +6028,7 @@ int linelen(int x1,int y1,int x2,int y2) {
|
|||
return numpixels;
|
||||
}
|
||||
|
||||
int linkat(int x, int y) {
|
||||
int getlinkat(int x, int y) {
|
||||
int i;
|
||||
for (i = 0; i < map[curmap].numlinks; i++) {
|
||||
/* is (x,y) on the line? */
|
||||
|
|
Loading…
Reference in New Issue