Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs16:/tmp/cvs-serv22675/include Modified Files: data.h defs.h proto.h wlib.h Log Message: This patch begins the work on making the game work when font size changes. Added new font W_SmallFont which will always be the traditional 6x10 pixel font. Not used currently, but for applications that require a small font regardless of regular font size, will use this. Fontsize is now a proper global variable and the ability to change it via netrekrc is now made aware to user via netrekrc entry. Restored xtrekrc and motdwin (aka entry window) to follow TWINSIDE as it seems the right thing to do, people expect tactical window and entry window to be same size. Removed debug statement in phasers I left in on accident. Centered planet names and army count on global map, so they scale properly with font size. Moved handy MIN function to global defs file. Added functions for determining size of stats window width and height for initial window creation. Main title bar is now on by default (most people agreed it should be on, deferring to their opinion). Fixed a ton of places where entry window was not scaling properly to text height. Team and quit windows will now remap properly if entry window is moved/resized. Fixed ping stats and stat window widths so that slider bars are never lost if font size is increased greatly. Index: wlib.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/wlib.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- wlib.h 11 Apr 2007 23:06:31 -0000 1.12 +++ wlib.h 13 Apr 2007 07:12:21 -0000 1.13 @@ -52,7 +52,7 @@ typedef char *W_Font; typedef int W_Color; -extern W_Font W_BigFont, W_RegularFont, W_UnderlineFont, W_HighlightFont, +extern W_Font W_BigFont, W_SmallFont, W_RegularFont, W_UnderlineFont, W_HighlightFont, W_IndyFont; extern W_Color W_White, W_Black, W_Red, W_Green, W_Yellow, W_Cyan, W_Grey; extern W_Color W_God, W_Ind, W_Fed, W_Rom, W_Kli, W_Ori; Index: defs.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/defs.h,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- defs.h 11 Apr 2007 23:06:31 -0000 1.22 +++ defs.h 13 Apr 2007 07:12:20 -0000 1.23 @@ -162,6 +162,7 @@ #ifndef MAX #define MAX(a,b) ((a) > (b) ? (a) : (b)) #endif +#define MIN(a,b) ((a) < (b) ? (a) : (b)) #define myPlasmaTorp(t) (me->p_no == (t)->pt_owner) #define myTorp(t) (me->p_no == (t)->t_owner) Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.75 retrieving revision 1.76 diff -u -d -r1.75 -r1.76 --- data.h 11 Apr 2007 23:06:31 -0000 1.75 +++ data.h 13 Apr 2007 07:12:20 -0000 1.76 @@ -641,6 +641,7 @@ extern int redrawall; /* Erase and redraw the galactic? */ extern int autoQuit; +extern int fontSize; extern int forceDisplay; extern int forceMono; extern int metaType; Index: proto.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/proto.h,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- proto.h 10 Apr 2007 00:44:02 -0000 1.48 +++ proto.h 13 Apr 2007 07:12:21 -0000 1.49 @@ -1172,6 +1172,8 @@ /******************************************************************************/ /*** stats.c /******************************************************************************/ + int StatsHeight (void); + int StatsWidth (void); void initStats (); void redrawStats (); void updateStats ();