#define VERSION "1.8a" /* variable sizes */ #define SMALLBUFLEN 64 /* small text buffer */ #define BUFLEN 512 /* large text buffer */ /* user interface settings elements */ #define DOUBLECLICKTHRES 450 /* how fast a double click needs to be (in ticks) */ #define CURSORWIDTH 6 /* width of text cursor */ #define FIRSTLET 33 /* first ASCII value for letters */ #define LASTLET 122 /* last ASCII value for letters */ #define OBOXPAGESIZE (4) /* how many lines a pageup/down will scroll the object box */ #define MULTIRAISENUM (10) /* this many presses of { or } will raise/lower a thing to the very bottom/top */ #define LINESELTHRESHOLD (4) /* how close to a link you need to click to select it */ /* graphical elements */ #define SHORTCUTSIZE (10) /* font size (points) for shortcut numbers on buttons */ #define BEZIERQUALITY 50 /* how many sub=lines to use when drawing bezier curves */ #define MAPBOXTEXTHEIGHT 10 /* size of text in mapbox (points) */ #define LINESELHANDLESIZE (5) /* how large the boxes on the ends of a selected link are */ #define OBJSELHANDLEPCT (15) /* what percentage of the selected object's size the selection boxes are */ #define SIDEBARW 100 /* how width the toolbox/mapbox/objectbox are */ #define ERRORFLASHSPEED 5 /* how fast to fade out the statusbar error highlight */ #define INFOFLASHSPEED 2 /* how fast to fade out the statusbar information highlight */ /* defaults */ #define DEFTEXTW 8 /* default text width (in pixels) for new text items */ #define DEFTEXTH 10 /* default text height (in POINTS) for new text items */ #define STATUSH (DEFTEXTH + 4) #define SBSIZE 15 #define DEFSCREENW 900 #define DEFSCREENH 600 /* maximum/minimum values */ #define MINSCREENX 100 #define MINSCREENY 100 #define MAXBUTTONS 18 /* maximum number of toolbox buttons from buttons.dat */ #define MAXOBJTYPES 50 /* maximum amount of different types from objects.dat */ #define MAXCHILDREN 30 /* maximum amount of submaps for any one given map */ #define MAXHISTORY 50 /* maximum amount that we can drill down into a map */ #define MAXLINKS 512 /* maximum number of links between objects each map can contain */ #define MAXMAPS 60 /* maximum number of (sub)maps in a project */ #define MAXOBJECTS 512 /* maximum number of objects each map can contain */ #define MAXPOINTS 20 /* maximum number of points on a line */ #define MAXTEXT 512 /* maximum number of text objects per map */ #define MINLETTERWIDTH 6 /* minimum letter width (pixels) */ #define MINLETTERHEIGHT 6 /* minimum letter width (points) */ #define MAXLETTERWIDTH 100 /* maximum letter width (pixels) */ #define MAXLETTERHEIGHT 100 /* maximum letter width (points) */ #define MAXOBJWIDTH 500 /* maximum object width */ #define MAXOBJHEIGHT 500 /* maximum object height */ #define MINOBJWIDTH 20 /* minimum object width */ #define MINOBJHEIGHT 20 /* minimum object height */ #define MAXFILLSTACK 500000 /* used for flood fill function */ #define OLDMAXVECTORSPERIMAGE (60) /* maximum vectors per image in old version map files */ #define MAXVECTORSPERIMAGE (120) /* maximum vectors per image in current map files */ #define MAXLINESTYLE (4) /* Types of lines (dotted, dashed, etc) */ #define LINESTYLESIZE (10) /* How big each line style array is */ /************************************* * Constants */ /* The SDL_Color.unused item is ORed with the following */ #define USECOLOUR (0x01) /* used as a NULL value for colours */ #define ISFLOW (0x02) /* used to show whether things are traffic flows */ /* map element ("thing") types */ #define T_EMPTY (0) #define T_OBJECT (1) #define T_LINK (2) #define T_TEXT (3) #define T_LINKPOINT (4) #define T_MAP (5) /* vector types */ #define VT_LINE (0) #define VT_BOX (1) #define VT_DOT (2) #define VT_FILL (3) #define VT_ELLIPSE (4) #define VT_POLY (5) #define VT_BEZIER (6) #define VT_ENDPOLY (7) #define VT_SUBOBJ (8) /* boolean flags */ #define TRUE (-1) #define FALSE (0) /* states */ #define S_NONE (0) #define S_OBJMOVING (1) #define S_RESIZING (2) #define S_DRAWLINK (3) #define S_ADDOBJ (4) #define S_LINKMOVING (5) #define S_LINKSRCMOVE (6) #define S_LINKDSTMOVE (7) #define S_ADDTEXT (8) #define S_TYPETEXT (9) #define S_TEXTMOVING (10) #define S_TEXTRESIZING (11) #define S_SAVING (12) #define S_LOADING (13) #define S_LINKPOINTMOVE (14) #define S_FGCOL (15) #define S_MAPNAMING (16) #define S_MATCHSIZE (17) #define S_MATCHX (18) #define S_MATCHY (19) #define S_CREATETELE (20) #define S_REALLYQUIT (21) #define S_FILLCOL (22) #define S_EDITTEXT (23) #define S_CHANGEOBJECT (24) #define S_DRAWFLOW (25) #define S_SEARCH (26) #define S_XSCROLL (27) #define S_YSCROLL (28) /* toolbox buttons */ #define TB_POINTER (0) #define TB_ADDOBJ (1) #define TB_ADDTEXT (2) #define TB_COPY (3) #define TB_PASTE (4) #define TB_GRID (5) #define TB_FGCOL (6) #define TB_FILLCOL (7) #define TB_LINESTYLE (8) #define TB_MATCHSIZE (9) #define TB_MATCHPOS (10) #define TB_FLOW (11) #define TB_DRILLDOWN (12) #define TB_CREATETELE (13) #define TB_DELETEMAP (14) #define TB_NEW (15) #define TB_LOAD (16) #define TB_SAVE (17) /* selection screen values */ #define YES (1) #define NO (0) #define MAYBE (-1) /* Line styles are a 32-bit int split up as follows: */ /* * Unused Arrow Style Thickness (max 5?) * 00000000 00000000 00000000 00000000 */ #define LS_SOLID (0) #define LS_DOTTED (1) #define LS_BIGDASH (2) #define LS_DASHDOT (3) /* arrow positions */ #define AP_NONE (0) #define AP_START (1) #define AP_END (2) #define AP_BOTH (3) /* Special mapbox child values for scroll buttons */ #define C_NONE (-1) #define C_SCROLLUP (-2) #define C_SCROLLDOWN (-3) /* Mouse positions */ #define MP_NONE (0) #define MP_TOOLBOX (1) #define MP_MAPBOXNAME (2) #define MP_MAPBOXCHILDREN (3) #define MP_OBJECTBOX (4)