diff --git a/Makefile.freebsd b/Makefile.freebsd index 7629103..f5918db 100644 --- a/Makefile.freebsd +++ b/Makefile.freebsd @@ -2,9 +2,9 @@ netmapr: netmapr.c constants.h netmapr.h Makefile gcc -Wall -g netmapr.c -onetmapr `sdl11-config --libs --cflags` -L/usr/X11R6/lib -lX11 -lpthread -lXext -lSDL_ttf install: netmapr - install -C -D -o root -m 755 netmapr /usr/local/bin/netmapr + install -C -o root -m 755 netmapr /usr/local/bin/netmapr ln -f /usr/local/bin/netmapr /usr/local/bin/netmapr-viewer - install -C -D -o root -m 644 buttons.dat /usr/local/share/netmapr/buttons.dat - install -C -D -o root -m 644 objects.dat /usr/local/share/netmapr/objects.dat - install -C -D -o root -m 644 verdana.ttf /usr/local/share/netmapr/verdana.ttf - install -C -D -o root -m 644 icon.bmp /usr/local/share/netmapr/icon.bmp + install -C -o root -m 644 buttons.dat /usr/local/share/netmapr/buttons.dat + install -C -o root -m 644 objects.dat /usr/local/share/netmapr/objects.dat + install -C -o root -m 644 verdana.ttf /usr/local/share/netmapr/verdana.ttf + install -C -o root -m 644 icon.bmp /usr/local/share/netmapr/icon.bmp diff --git a/constants.h b/constants.h index 605e00b..fac5a58 100644 --- a/constants.h +++ b/constants.h @@ -1,4 +1,4 @@ -#define VERSION "1.2" +#define VERSION "1.2a" #define BUFLEN 512 diff --git a/netmapr-small.jpg b/netmapr-small.jpg index 425041c..77538c4 100644 Binary files a/netmapr-small.jpg and b/netmapr-small.jpg differ diff --git a/netmapr.c b/netmapr.c index 6071e68..4e89ba2 100644 --- a/netmapr.c +++ b/netmapr.c @@ -65,6 +65,9 @@ int copytype = T_MAP; int grid = TRUE; int gridsize = 10; +int gridsizelist[] = {5, 10, 15, 20}; +int gridsizeindex = 1; +int gridsizenum = 4; SDL_Color gridcol = {0, 0, 0, 0 }; int matchtype = 0; @@ -1449,7 +1452,7 @@ int main (int argc, char **argv) { } } } - if (c == 'g') { /* toggle gridsize */ + if (c == 'g') { /* toggle snap-to-grid */ if (grid) { grid = FALSE; strcpy(statustext, "Grid mode disabled."); @@ -1459,6 +1462,14 @@ int main (int argc, char **argv) { } drawmap(); } + if (c == ';') { /* change gridsize */ + if (++gridsizeindex >= gridsizenum) { + gridsizeindex = 0; + } + gridsize = gridsizelist[gridsizeindex]; + sprintf(statustext, "Grid size set to %d.", gridsize); + drawmap(); + } if (c == 'c') { /* copy */ if (map[curmap].selecteditem == -1) { /* copy entire map */ diff --git a/netmapr.jpg b/netmapr.jpg index e1051e8..962013b 100755 Binary files a/netmapr.jpg and b/netmapr.jpg differ