Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23390/src Modified Files: data.c defaults.c local.c map.c mswindow.c option.c Log Message: Added "planetHighlighting: on/(off)" to draw a circle around the galaxy planet in the color of the team owner, and a 2nd white circle if planet has more than 4 armies. Mostly useful for new planets to easier tell race owner, and army status at a quick glance. Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- mswindow.c 6 Jun 2006 08:23:06 -0000 1.32 +++ mswindow.c 6 Jun 2006 19:50:39 -0000 1.33 @@ -3309,6 +3309,7 @@ int x, int y, int r, + int highlight, W_Color color) { DBHEADER_VOID; @@ -3321,11 +3322,16 @@ SelectPalette (hdc, NetrekPalette, FALSE); RealizePalette (hdc); } + SelectObject (hdc, colortable[color].pen); SelectObject (hdc, GetStockObject (NULL_BRUSH)); Ellipse (hdc, x - r, y - r, x + r, y + r); - + if (highlight) // Add extra white circle + { + SelectObject (hdc, colortable[W_White].pen); + Ellipse (hdc, x - r - 1, y - r - 1, x + r + 1, y + r + 1); + } if (!sdb || !doubleBuffering || !ingame) ReleaseDC (win->hwnd, hdc); } Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- local.c 3 Jun 2006 21:52:11 -0000 1.39 +++ local.c 6 Jun 2006 19:50:39 -0000 1.40 @@ -364,7 +364,7 @@ else // This should never be called planet_bits = planet_rock1; } - else if (p->pl_flags & PLCORE) // Not functional yet due to server + else if (p->pl_flags & PLCORE) { if (p->pl_flags & PLAGRI) planet_bits = planet_agri1; @@ -1112,7 +1112,7 @@ { if (myPlayer(j) || isObsLockPlayer(j)) { - W_WriteCircle(w, WINSIDE/2, WINSIDE/2, DETDIST/SCALE, W_Red); + W_WriteCircle(w, WINSIDE/2, WINSIDE/2, DETDIST/SCALE, 0, W_Red); clearzone[0][clearcount] = WINSIDE/2 - (DETDIST/SCALE); clearzone[1][clearcount] = WINSIDE/2 - (DETDIST/SCALE); clearzone[2][clearcount] = 2*DETDIST/SCALE; Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- defaults.c 2 Jun 2006 21:06:55 -0000 1.23 +++ defaults.c 6 Jun 2006 19:50:39 -0000 1.24 @@ -380,6 +380,12 @@ NULL } }, + {"planetHighlighting", &planetHighlighting, RC_BOOL, + { + "Highlight galactic planets by race and army status", + NULL + } + }, {"playerListHack", &playerListHack, RC_BOOL, { "Suppose that players with letter greater than \'f\' are observers", Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- data.c 6 Jun 2006 08:23:06 -0000 1.33 +++ data.c 6 Jun 2006 19:50:39 -0000 1.34 @@ -108,6 +108,7 @@ int planetBitmap = 0; int planetBitmapGalaxy = 0; +int planetHighlighting = 0; int rotatePlanets = 1; int logging = 0; Index: option.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/option.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- option.c 2 Jun 2006 21:06:55 -0000 1.21 +++ option.c 6 Jun 2006 19:50:39 -0000 1.22 @@ -279,6 +279,7 @@ {1, "Page %d (click to change)", &MenuPage, 0, 0, 0, NULL, &Menus_Range}, {1, "", &planetBitmap, 0, 0, 0, planetbitmapmess, &planetbitmaprange}, {1, "", &planetBitmapGalaxy, 0, 0, 0, planetbitmapgalaxymess, &planetbitmapgalaxyrange}, + {1, "highlight planets", &planetHighlighting, 0, 0, 0, NULL, NULL}, {1, "rotate planets (new planets only)", &rotatePlanets, 0, 0, 0, NULL, NULL}, {1, "show planet names on local", &showPlanetNames, 0, 0, 0, NULL, NULL}, {1, "show army count on orbit", &showArmy, 0, 0, 0, NULL, NULL}, @@ -875,7 +876,7 @@ /* Actions to be taken when certain options are selected. * (Yes, this is a hack). */ - if (op->op_option == &showPlanetOwner) + if (op->op_option == &showPlanetOwner || op->op_option == &planetHighlighting) redrawall = 1; #ifdef HOCKEY_LINES else if (op->op_option == &showHockeyLinesMap) Index: map.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- map.c 2 Jun 2006 21:06:55 -0000 1.17 +++ map.c 6 Jun 2006 19:50:39 -0000 1.18 @@ -310,7 +310,7 @@ else // This should never be called mplanet_bits = mplanet_rock1; } - else if (p->pl_flags & PLCORE) // Not functional yet due to server + else if (p->pl_flags & PLCORE) { if (p->pl_flags & PLAGRI) mplanet_bits = mplanet_agri1; @@ -545,10 +545,14 @@ W_WriteBitmap (dx - (BMP_MPLANET_WIDTH / 2), dy - (BMP_MPLANET_HEIGHT / 2), planetmBitmap (l), planetColor (l), mapw); + } #ifdef BEEPLITE } #endif + if (planetHighlighting) /* Draw halo */ + W_WriteCircle(mapw, dx, dy, BMP_MPLANET_WIDTH / 2, + l->pl_armies > 4 ? 1 : 0, planetColor(l)); if ((l->pl_flags & PLAGRI) && (l->pl_info & me->p_team)) {