Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv29682/src Modified Files: data.c local.c map.c mswindow.c newwin.c option.c socket.c Log Message: Update todo list. Fix typo in changes.txt. Adds new icons/pointers for paradise planets, rather than sharing the same data structures as bronco planets, so that paradise planet bitmaps are always loaded into memory. Which planet bitmaps to use depends on whether it is a paradise server or not. Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.87 retrieving revision 1.88 diff -u -d -r1.87 -r1.88 --- mswindow.c 12 Jun 2007 01:23:18 -0000 1.87 +++ mswindow.c 12 Apr 2008 23:28:29 -0000 1.88 @@ -557,6 +557,12 @@ free (bplanets[i]); for (i = 0; i < MPLANET_VIEWS; i++) free (bmplanets[i]); +#ifdef PARADISE + for (i = 0; i < PARADISE_PLANET_VIEWS; i++) + free (paradise_bplanets[i]); + for (i = 0; i < PARADISE_MPLANET_VIEWS; i++) + free (paradise_bmplanets[i]); +#endif for (i = 0; i < BMP_SHIPEXPL_FRAMES; i++) free (expview[i]); Index: newwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v retrieving revision 1.69 retrieving revision 1.70 diff -u -d -r1.69 -r1.70 --- newwin.c 12 Jun 2007 01:23:18 -0000 1.69 +++ newwin.c 12 Apr 2008 23:28:29 -0000 1.70 @@ -1309,6 +1309,10 @@ int i, k; char *Planlib; char *MPlanlib; +#ifdef PARADISE + char *Paradise_Planlib; + char *Paradise_MPlanlib; +#endif planetBitmap = intDefault ("planetBitmap", planetBitmap); planetBitmapGalaxy = intDefault ("planetBitmapGalaxy", planetBitmapGalaxy); @@ -1319,9 +1323,9 @@ loadparadisethings(); #endif #ifdef PARADISE - Planlib = "bitmaps/paradise/paradise_plan.bmp"; - MPlanlib = "bitmaps/paradise/paradise_mplan.bmp"; -#else + Paradise_Planlib = "bitmaps/paradise/paradise_plan.bmp"; + Paradise_MPlanlib = "bitmaps/paradise/paradise_mplan.bmp"; +#endif switch (planetBitmap) // Case 3 = new color, but we never use Planlib { case 1: @@ -1346,7 +1350,6 @@ MPlanlib = "bitmaps/planlibm/mplan.bmp"; break; } -#endif if (!dynamicBitmaps) /* Only load needed bitmaps */ { @@ -1477,6 +1480,14 @@ base_mplanets = W_StoreBitmap3 (MPlanlib, BMP_MPLANET_WIDTH, BMP_MPLANET_HEIGHT * PLANET_VIEWS, BMP_MPLANET000, mapw, LR_MONOCHROME); +#ifdef PARADISE + paradise_base_planets = + W_StoreBitmap3 (Paradise_Planlib, BMP_PLANET_WIDTH, BMP_PLANET_HEIGHT * PARADISE_PLANET_VIEWS, + BMP_PLANET000, w, LR_MONOCHROME); + paradise_base_mplanets = + W_StoreBitmap3 (Paradise_MPlanlib, BMP_MPLANET_WIDTH, BMP_MPLANET_HEIGHT * PARADISE_PLANET_VIEWS, + BMP_MPLANET000, mapw, LR_MONOCHROME); +#endif for (k = 0; k < PLANET_VIEWS; k++) { @@ -1487,6 +1498,17 @@ W_PointBitmap2 (base_mplanets, 0, k, BMP_MPLANET_WIDTH, BMP_MPLANET_HEIGHT); } +#ifdef PARADISE + for (k = 0; k < PARADISE_PLANET_VIEWS; k++) + { + paradise_bplanets[k] = + W_PointBitmap2 (paradise_base_planets, 0, k, BMP_PLANET_WIDTH, + BMP_PLANET_HEIGHT); + paradise_bmplanets[k] = + W_PointBitmap2 (paradise_base_mplanets, 0, k, BMP_MPLANET_WIDTH, + BMP_MPLANET_HEIGHT); + } +#endif if (colorClient > 0) { Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.108 retrieving revision 1.109 diff -u -d -r1.108 -r1.109 --- local.c 29 Nov 2007 05:29:06 -0000 1.108 +++ local.c 12 Apr 2008 23:28:29 -0000 1.109 @@ -391,7 +391,7 @@ if (p->pl_flags & PLFUEL) i += 1; #ifdef PARADISE - if (p->pl_flags & PLSHIPYARD) + if (paradise && (p->pl_flags & PLSHIPYARD)) { i = 9; /* Base for shipyards */ if (p->pl_flags & PLFUEL) @@ -400,11 +400,21 @@ i += 2; } #endif - return (bplanets[i]); +#ifdef PARADISE + if (paradise) + return (paradise_bplanets[i]); + else +#endif + return (bplanets[i]); } else { - return (bplanets[8]); +#ifdef PARADISE + if (paradise) + return (paradise_bplanets[8]); + else +#endif + return (bplanets[8]); } } Index: option.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/option.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- option.c 29 Jul 2007 01:38:44 -0000 1.51 +++ option.c 12 Apr 2008 23:28:30 -0000 1.52 @@ -776,7 +776,11 @@ RedrawPlayerList (); } /* Let's see if this is our option changed */ - else if (op->op_option == &planetBitmap) + else if (op->op_option == &planetBitmap +#ifdef PARADISE + && !paradise // Paradise bitmaps stay loaded at all times +#endif + ) { if (planetBitmap != 3) // Color planet bitmaps stay loaded at all times { @@ -785,9 +789,6 @@ for (i = 0; i < PLANET_VIEWS; i++) free (bplanets[i]); -#ifdef PARADISE - Planlib = "bitmaps/paradise/paradise_plan.bmp"; -#else switch (planetBitmap) { case 1: @@ -800,7 +801,7 @@ Planlib = "bitmaps/planlibm/plan.bmp"; break; } -#endif + base_planets = W_StoreBitmap3 (Planlib, BMP_PLANET_WIDTH, BMP_PLANET_HEIGHT * 9, BMP_PLANET000, w, LR_MONOCHROME); @@ -813,7 +814,11 @@ redrawall = 1; } - else if (op->op_option == &planetBitmapGalaxy) + else if (op->op_option == &planetBitmapGalaxy +#ifdef PARADISE + && !paradise // Paradise bitmaps stay loaded at all times +#endif + ) { if (planetBitmapGalaxy != 3) // Color planet bitmaps stay loaded at all times { @@ -822,9 +827,6 @@ for (i = 0; i < MPLANET_VIEWS; i++) free (bmplanets[i]); -#ifdef PARADISE - MPlanlib = "bitmaps/paradise/paradise_mplan.bmp"; -#else switch (planetBitmapGalaxy) { case 1: @@ -837,7 +839,7 @@ MPlanlib = "bitmaps/planlibm/mplan.bmp"; break; } -#endif + base_mplanets = W_StoreBitmap3 (MPlanlib, BMP_MPLANET_WIDTH, BMP_MPLANET_HEIGHT * 9, BMP_MPLANET000, mapw, LR_MONOCHROME); Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.102 retrieving revision 1.103 diff -u -d -r1.102 -r1.103 --- data.c 6 Apr 2008 22:41:43 -0000 1.102 +++ data.c 12 Apr 2008 23:28:29 -0000 1.103 @@ -277,6 +277,7 @@ extern double Sin[], Cos[]; #ifdef PARADISE +int paradise = 0; /* is the server a paradise server */ int received_terrain_info = 0; int terrain_x; int terrain_y; @@ -425,6 +426,12 @@ W_Icon base_mplanets; W_Icon bplanets[PLANET_VIEWS]; W_Icon bmplanets[MPLANET_VIEWS]; +#ifdef PARADISE +W_Icon paradise_base_planets; +W_Icon paradise_base_mplanets; +W_Icon paradise_bplanets[PARADISE_PLANET_VIEWS]; +W_Icon paradise_bmplanets[PARADISE_PLANET_VIEWS]; +#endif /* jn - SMARTMACRO */ Index: socket.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- socket.c 6 Apr 2008 22:41:45 -0000 1.38 +++ socket.c 12 Apr 2008 23:28:30 -0000 1.39 @@ -1918,16 +1918,12 @@ { loginAccept = packet->accept; #ifdef PARADISE - if ((packet->pad2 != 69) && (packet->pad3 != 42)) - { - LineToConsole ("Paradise.exe only works on paradise servers, either select a paradise server or use netrek.exe.\n"); - exit (0); - } -#else if ((packet->pad2 == 69) && (packet->pad3 == 42)) - { - LineToConsole ("Netrek.exe only works on non-paradise servers, either select a non-paradise server or use paradise.exe.\n"); - exit (0); + paradise = 1; + else { + /*nshiptypes = 8;*/ + /*nplayers=20;*/ + /*nplanets=40;*/ } #endif if (packet->accept) Index: map.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- map.c 16 Jul 2007 23:44:18 -0000 1.61 +++ map.c 12 Apr 2008 23:28:29 -0000 1.62 @@ -347,7 +347,7 @@ if (p->pl_flags & PLFUEL) i += 1; #ifdef PARADISE - if (p->pl_flags & PLSHIPYARD) + if (paradise && (p->pl_flags & PLSHIPYARD)) { i = 9; /* Base for shipyards */ if (p->pl_flags & PLFUEL) @@ -356,11 +356,21 @@ i += 2; } #endif - return bmplanets[i]; +#ifdef PARADISE + if (paradise) + return (paradise_bmplanets[i]); + else +#endif + return bmplanets[i]; } else { - return (bmplanets[8]); +#ifdef PARADISE + if (paradise) + return (paradise_bmplanets[8]); + else +#endif + return (bmplanets[8]); } }