Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv30991/include Modified Files: bitmaps.h data.h defs.h sound.h Log Message: This large patch continues the work on allowing resizeable local and map windows. WINSIDE is now history, having been split into TWINSIDE and GWINSIDE. A few WINSIDE based defines were modified. Visible ship range (MAXDISTCLOAK and MAXDISTVIS) were converted to galactic units. The CORNER_DIST variable was renamed to SOUND_MAXRANGE and now goes off of INFORANGE scale rather than WINSIDE scale. This keeps the scaling factor for sounds the same no matter what size tactical is used (sounds fall off to nothing at the same distance as before). New function sound_window_height to calculate size of sound window (trivial really, but makes it so no more editing newwin every time a new option is added to the sound menu). Commented out most of the windows geometry entries in the netrekrc, and updated them to match the new default settings for a normal 500x500 local and 500x500 map window. Reason being, newwin entry routine now does a good job adjusting window sizes to match local and map windows, so let's not have the user worry about changing all the geometries. Ideally users will change tactical and map size, and have program do most of the adjusting for them. On that note, changed a whole bunch of window default geometries to use exact math so windows line up perfectly, and so they all scale proper (compare old message win placements to new ones and you will see the difference). New netrekrc option infoRange to show a box around your ship showing the limit on which server sends weapons data. Box is "smart" and doesn't draw sections that fall outside galaxy bounds. Changed a few dashboard timers to no longer be located based on WINSIDE (that was a mistake in the first place). Dashboards do NOT scale with tactical though, and it will be a MAJOR project to add that ability. The header for docwin is no longer centered on WINSIDE, since the actual docwin size is hard coded to 500x500, made no sense to have header to use WINSIDE in the first place. MOTD window now is fixed at 500 pixels wide, no point in making it wider, cause the text isn't going to extend due to the server limiting its textwidth. A bunch of bitmaps which were never anticipated to scale, now scale. Geno bitmaps now scale to fit map window, and are properly defined in bitmaps.h as to their bitmap size. Team and quit window bitmaps now scale. Index: defs.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/defs.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- defs.h 5 Apr 2007 12:57:22 -0000 1.18 +++ defs.h 6 Apr 2007 06:46:31 -0000 1.19 @@ -27,8 +27,6 @@ #define MAXPLASMA 1 #define PKEY 128 -#define CORNER_DIST (int)(sqrt)(WINSIDE*WINSIDE/2) - #define BORDER 1 /* border width for option * windows */ #define THICKBORDER 3 /* Thicker border for windows */ @@ -66,10 +64,10 @@ * person can go into orbit */ #define PFIREDIST 1500 /* At this range a planet * will shoot at a player */ -#define MAXDISTCLOAK (WINSIDE/7) +#define MAXDISTCLOAK (GWIDTH/7) /* At this range a player can be seen while cloaked */ -#define MAXDISTVIS (WINSIDE/3) +#define MAXDISTVIS (GWIDTH/3) /* At this range a player can be seen while visible (uncloaked) */ Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- data.h 5 Apr 2007 12:57:22 -0000 1.71 +++ data.h 6 Apr 2007 06:46:31 -0000 1.72 @@ -48,8 +48,10 @@ extern struct memory universe; extern struct planet pdata[]; -extern int WINSIDE; /* This used to be a define ... */ -extern int SCALE; /* and so was this ... */ +/* These used to be defines ... */ +extern int TWINSIDE; +extern int GWINSIDE; +extern int SCALE; extern unsigned int oldalert; extern unsigned char oldtourn; @@ -735,4 +737,5 @@ extern int weaponsOnMap; /* draw weapons fire on map */ extern int sortPlanets; /* sort planet list by team and army count */ extern int packetLights; /* show packet send/receive via dashboard */ +extern int infoRange; /* show limit on info with large tactical windows */ #endif /* _h_data */ Index: bitmaps.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/bitmaps.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- bitmaps.h 14 Mar 2007 23:24:05 -0000 1.15 +++ bitmaps.h 6 Apr 2007 06:46:31 -0000 1.16 @@ -109,6 +109,8 @@ #define BMP_CLOAK_HEIGHT 20 #define BMP_TEAM_SELECT_WIDTH 100 #define BMP_TEAM_SELECT_HEIGHT 100 +#define BMP_GENO_WIDTH 500 +#define BMP_GENO_HEIGHT 500 #define BMP_SHIELD_WIDTH 20 #define BMP_SHIELD_HEIGHT 20 #define BMP_STIPPLE_WIDTH 16 Index: sound.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/sound.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- sound.h 18 Mar 2007 01:46:49 -0000 1.19 +++ sound.h 6 Apr 2007 06:46:31 -0000 1.20 @@ -14,6 +14,7 @@ extern void Group_Sound (int type, int channel); extern void ChangeVolume (int vol); extern void Init_Sound (void); +extern int sound_window_height (void); #define SF_EXPLOSIONS 0x001 #define SF_WEAPONS 0x002