[Freeciv-Dev] don't show "999" as the city turns to build (PR#1283)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
jdorje@xxxxxxxxxxxxxxxxxxxxx writes:
> The attached patch is a rewrite of a patch I submitted about a year ago.
> It was more-or-less ignored at the time, but recently a friend
> mentioned to me how much this bugged him as well, so I've brought it
> back out.
>
> The game shows "999" as the turns to build for production that will
> never finish. This has always annoyed me. This patch corrects that for
> the city descriptions in the mapview only. It takes out all of the
> identical code to assemble the mapview production description, and puts
> that into a function get_city_mapview_production() in
> mapview_common.[ch]. (Thus, it consolidates code overall.) It also
> special-cases the "999" that is returned, and prints a "-" in place of
> the number. (I had originally put "never" here instead of "-", but
> CivIII uses "-" so I figure that's just as good.)
>
> I've made changes to all GUI's, but I've only tested GTK and XAW, naturally.
>
> Finally, note this only changes the mapview, not the city dialog. These
> are pretty much completely separate, and the city dialog will probably
> be a bit more difficult since it varies between GUIs.
Tested on win32. A minor bug:
--- client/gui-win32/mapview.c~ Mon Feb 25 21:52:05 2002
+++ client/gui-win32/mapview.c Mon Feb 25 21:54:42 2002
@@ -893,7 +893,7 @@
if (draw_city_productions && (pcity->owner==game.player_idx)) {
RECT rc;
- get_city_mapview_production(pcity, buffer, sizeof(buffer);
+ get_city_mapview_production(pcity, buffer, sizeof(buffer));
DrawText(hdc,buffer,strlen(buffer),&rc,DT_CALCRECT);
rc.left=canvas_x+NORMAL_TILE_WIDTH/2-10;
Greetings
Andreas Kemnade
|
|