Fixed linkat bug

This commit is contained in:
Rob Pearce 2009-07-28 01:39:15 +00:00
parent 47e1c9cd7b
commit 47dd570d84
2 changed files with 4 additions and 4 deletions

View File

@ -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? */

View File

@ -255,7 +255,7 @@ void drawyn(char *prompt);
int getyn(int x, int y);
void goback(void);
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);
void lowerselected(int amt);
int objat(int x, int y);