<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39405 >
> [wsimpson - Mo 02. Jul 2007, 23:20:27]:
>
> That turned out to be relatively easy to fix. Send more reports!
>
> Committed S2_1 release 13041.
>
>
Some pointer-to-integer conversion warnings are left. Patch attached.
Index: client/gui-sdl/citydlg.c
===================================================================
--- client/gui-sdl/citydlg.c (Revision 13041)
+++ client/gui-sdl/citydlg.c (Arbeitskopie)
@@ -3213,8 +3213,6 @@
dest.x += pBuf2->w + adj_size(5);
} else {
- struct impr_type *pImpr =
- improvement_by_number(pCity->production.value);
if (improvement_has_flag(pCity->production.value, IF_GOLD)) {
@@ -3240,7 +3238,7 @@
}
- copy_chars_to_string16(pStr, improvement_name_translation(pImpr));
+ copy_chars_to_string16(pStr, improvement_name_translation(pCity->production.value));
pBuf = create_text_surf_from_str16(pStr);
pBuf2 = get_building_surface(pCity->production.value);
Index: client/gui-sdl/mapview.c
===================================================================
--- client/gui-sdl/mapview.c (Revision 13041)
+++ client/gui-sdl/mapview.c (Arbeitskopie)
@@ -815,7 +815,7 @@
if (pOwner && pOwner != game.player_ptr) {
/* TRANS: (<nation>,<diplomatic_state>)" */
cat_snprintf(buffer, sizeof(buffer), _("\n(%s,%s)"),
- nation_name_translation(nation_of_city(pOwner)),
+ nation_name_for_player(pOwner),
diplo_city_adjectives[game.player_ptr->
diplstates[pOwner->player_no].type]);
}
Index: client/gui-sdl/cityrep.c
===================================================================
--- client/gui-sdl/cityrep.c (Revision 13041)
+++ client/gui-sdl/cityrep.c (Arbeitskopie)
@@ -496,10 +496,9 @@
togrow = unit_build_shield_cost(pUnitType);
pName = utype_name_translation(pUnitType);
} else {
- struct impr_type *pImprv = improvement_by_number(pCity->production.value);
pLogo = ResizeSurface(get_building_surface(pCity->production.value), adj_size(36), adj_size(24), 1);
togrow = impr_build_shield_cost(pCity->production.value);
- pName = improvement_name_translation(pImprv);
+ pName = improvement_name_translation(pCity->production.value);
}
if(!worklist_is_empty(&(pCity->worklist))) {
@@ -1015,10 +1014,9 @@
togrow = unit_build_shield_cost(pUnitType);
pName = utype_name_translation(pUnitType);
} else {
- struct impr_type *pImprv = improvement_by_number(pCity->production.value);
pLogo = ResizeSurface(get_building_surface(pCity->production.value), adj_size(36), adj_size(24), 1);
togrow = impr_build_shield_cost(pCity->production.value);
- pName = improvement_name_translation(pImprv);
+ pName = improvement_name_translation(pCity->production.value);
}
if(!worklist_is_empty(&(pCity->worklist))) {
Index: client/gui-sdl/wldlg.c
===================================================================
--- client/gui-sdl/wldlg.c (Revision 13041)
+++ client/gui-sdl/wldlg.c (Arbeitskopie)
@@ -989,7 +989,6 @@
SDL_Rect dst;
char cBuf[128];
struct unit_type *pUnit = NULL;
- struct impr_type *pImpr = NULL;
char *state = NULL;
bool advanced_tech;
bool can_build, can_eventually_build;
@@ -1323,11 +1322,9 @@
if ((advanced_tech && can_eventually_build) ||
(!advanced_tech && can_build)) {
- pImpr = improvement_by_number(imp);
-
pIcon = crop_rect_from_surface(pMain, NULL);
- my_snprintf(cBuf, sizeof(cBuf), "%s", improvement_name_translation(pImpr));
+ my_snprintf(cBuf, sizeof(cBuf), "%s", improvement_name_translation(imp));
copy_chars_to_string16(pStr, cBuf);
pStr->style |= TTF_STYLE_BOLD;
pText_Name = create_text_surf_smaller_that_w(pStr, pIcon->w - 4);
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev