From fe0a7699415477f605906361d9b369d006450a35 Mon Sep 17 00:00:00 2001 From: Rob Pearce Date: Wed, 21 Jul 2010 22:33:25 +0000 Subject: [PATCH] Modified readme file to include windows environment variable Took out optimisation as it breaks on 64 bit systems --- CHANGELOG | 9 +++++++++ Makefile.linux | 2 +- README.txt | 12 +++++------- constants.h | 2 +- netmapr.c | 12 +++++++++--- objects.dat | 22 ++++++++++++++++++++++ 6 files changed, 47 insertions(+), 12 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 1b75300..b22a9bd 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,15 @@ Ideas for future versions: Solaris (and possibly other platforms) - Perhaps change to SVG for objects +Version 1.9c +- Added two new objects for flowcharting: Trianle and Rounded Rectangle +- Fixed bugs with missing screen updates when scrolling object box +- Fixed bug where clicking bottom row of objects would scroll map instead + +Version 1.9b +More windows fixed. +Added Makefile.linux64 (same as .linux but removes optimisation). + Version 1.9a: Fixed crash when using buttons to save/load. diff --git a/Makefile.linux b/Makefile.linux index 3aa3d3d..f4c8782 100644 --- a/Makefile.linux +++ b/Makefile.linux @@ -1,5 +1,5 @@ netmapr: netmapr.c constants.h netmapr.h Makefile - gcc -Wall -O2 -g netmapr.c savepng.c -onetmapr `sdl-config --libs --cflags` -L/usr/X11R6/lib -lX11 -lpthread -lSDL_ttf -lpng + gcc -Wall -g netmapr.c savepng.c -onetmapr `sdl-config --libs --cflags` -L/usr/X11R6/lib -lX11 -lpthread -lSDL_ttf -lpng ln -f netmapr netmapr-viewer install: netmapr diff --git a/README.txt b/README.txt index 43d7e88..4888026 100644 --- a/README.txt +++ b/README.txt @@ -1,13 +1,11 @@ IMPORTANT: -Due to a bug in the versions 0.98 and below of netmapr, the map file -format has slightly changed. To correct this, simply compile the "convert" -program (included in the distribution) then use: +On windows sytems, you need to set an environment variable to tell netmapr where to find its data files. If you don't do this, you will not be able to open netmapr diagrams directly. -./convert old_mapfile.map new_mapfile.map +The variable required is: + +Name: NETMAPRDIR +Value: C:\path\to\netmapr\directoy -to convert your old diagrams to the new format. -An option for XML diagrams is planned for future versions of netmapr to -avoid future issues of this type. diff --git a/constants.h b/constants.h index fcb3743..04e6475 100644 --- a/constants.h +++ b/constants.h @@ -1,4 +1,4 @@ -#define VERSION "1.9a" +#define VERSION "1.9c" /* variable sizes */ #define SMALLBUFLEN 64 /* small text buffer */ diff --git a/netmapr.c b/netmapr.c index 07bf1e0..da05a8a 100644 --- a/netmapr.c +++ b/netmapr.c @@ -904,6 +904,7 @@ int main (int argc, char **argv) { drawstatusbar(); drawobox(); + SDL_UpdateRect(screen, obox.x, obox.y, obox.width,obox.height); } else if (isongoback(event.button.x, event.button.y)) { /* go back */ goback(); @@ -2031,6 +2032,7 @@ int main (int argc, char **argv) { sprintf(statustext,"Object type shortcut #%d ('%s') selected.\n",onum, objtype[map[curmap].selectedtype].name); drawstatusbar(); drawobox(); + SDL_UpdateRect(screen, obox.x, obox.y, obox.width,obox.height); } } if (c2 == SDLK_BACKSPACE) { @@ -4883,8 +4885,9 @@ void drawobox(void) { //SDL_UpdateRect(screen, x, y, obox.gridsize+1,obox.gridsize+1); - //SDL_UpdateRect(screen,obox.x, obox.y, obox.width-1, obox.height+5); - SDL_Flip(screen); + // xxx remove + //SDL_Flip(screen); + SDL_UpdateRect(screen,obox.x, obox.y, obox.width-1, obox.height+5); } void drawscreen(void){ @@ -7577,7 +7580,9 @@ int isontoolbox(int x, int y) { int isonxscrollbar(int x, int y) { if ((y >= (screen->h - STATUSH - SBSIZE)) && (y < (screen->h - STATUSH))) { - return TRUE; + if (x <= toolbox.x) { + return TRUE; + } } return FALSE; @@ -8031,6 +8036,7 @@ void scrollobox(int amt) { obox.pos+= amt; drawobox(); } + SDL_UpdateRect(screen, obox.x, obox.y, obox.width,obox.height); } diff --git a/objects.dat b/objects.dat index 5a317f6..6975d45 100644 --- a/objects.dat +++ b/objects.dat @@ -602,3 +602,25 @@ subobj 0 90 128 circle 100 85 25 25 0 0 0 endsub end +# Flowcharting triangle for Pat +object triangle 200 100 +poly 0 0 0 p 0 99 199 99 100 0 0 99 f 255 0 0 +end +# Flowcharting rectangle for Pat +object roundrect 200 100 +# circle on left +subobj 255 0 0 +circle 25 50 24 49 0 0 0 +endsub +# circle on right +subobj 255 0 0 +circle 175 50 24 49 0 0 0 +endsub +box 25 0 175 99 255 0 0 255 0 0 +line 25 0 175 0 0 0 0 +line 25 99 175 99 0 0 0 +end +# Flowcharting diamond for Pat +object diamond 200 200 +poly 0 0 0 p 0 100 100 0 199 100 100 199 0 100 f 255 0 0 +end