(svn r18328) -Codechange: Remove last usage of {SETX} from strings.

This commit is contained in:
frosch
2009-11-28 20:15:16 +00:00
parent 8de6e3fcd9
commit ae97bf029c
44 changed files with 92 additions and 88 deletions

View File

@@ -376,6 +376,10 @@ public:
if (cargo_needed_for_growth > 0) {
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_LEFT, y += FONT_HEIGHT_NORMAL, STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH);
bool rtl = _dynlang.text_dir == TD_RTL;
uint cargo_text_left = r.left + WD_FRAMERECT_LEFT + (rtl ? 0 : 20);
uint cargo_text_right = r.right - WD_FRAMERECT_RIGHT - (rtl ? 20 : 0);
CargoID first_food_cargo = CT_INVALID;
StringID food_name = STR_CARGO_PLURAL_FOOD;
CargoID first_water_cargo = CT_INVALID;
@@ -395,20 +399,20 @@ public:
if (first_food_cargo != CT_INVALID && this->town->act_food > 0) {
SetDParam(0, first_food_cargo);
SetDParam(1, this->town->act_food);
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y += FONT_HEIGHT_NORMAL, STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_LAST_MONTH);
DrawString(cargo_text_left, cargo_text_right, y += FONT_HEIGHT_NORMAL, STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_LAST_MONTH);
} else {
SetDParam(0, food_name);
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_LEFT, y += FONT_HEIGHT_NORMAL, STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED);
DrawString(cargo_text_left, cargo_text_right, y += FONT_HEIGHT_NORMAL, STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED);
}
if (cargo_needed_for_growth > 1) {
if (first_water_cargo != CT_INVALID && this->town->act_water > 0) {
SetDParam(0, first_water_cargo);
SetDParam(1, this->town->act_water);
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_LEFT, y += FONT_HEIGHT_NORMAL, STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_LAST_MONTH);
DrawString(cargo_text_left, cargo_text_right, y += FONT_HEIGHT_NORMAL, STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_LAST_MONTH);
} else {
SetDParam(0, water_name);
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_LEFT, y += FONT_HEIGHT_NORMAL, STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED);
DrawString(cargo_text_left, cargo_text_right, y += FONT_HEIGHT_NORMAL, STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED);
}
}
}