summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-04-26 14:52:56 +0000
committerrubidium <rubidium@openttd.org>2009-04-26 14:52:56 +0000
commit53887e07bb8a6f815f48daffc3ac106496b2e694 (patch)
tree46b1264b6cbd4a5187e9361bab01ae4418503f56 /src
parentc21062a728fa37bb319c38b627d56f38150328f1 (diff)
downloadopenttd-53887e07bb8a6f815f48daffc3ac106496b2e694.tar.xz
(svn r16160) -Codechange: remove the need for explicit TC_FROMSTRING for DrawString.
Diffstat (limited to 'src')
-rw-r--r--src/ai/ai_gui.cpp2
-rw-r--r--src/aircraft_gui.cpp8
-rw-r--r--src/airport_gui.cpp2
-rw-r--r--src/build_vehicle_gui.cpp46
-rw-r--r--src/cheat_gui.cpp2
-rw-r--r--src/company_gui.cpp28
-rw-r--r--src/depot_gui.cpp4
-rw-r--r--src/gfx_func.h4
-rw-r--r--src/graph_gui.cpp14
-rw-r--r--src/industry_gui.cpp18
-rw-r--r--src/misc_gui.cpp2
-rw-r--r--src/music_gui.cpp8
-rw-r--r--src/news_gui.cpp4
-rw-r--r--src/roadveh_gui.cpp10
-rw-r--r--src/settings_gui.cpp6
-rw-r--r--src/ship_gui.cpp8
-rw-r--r--src/signs_gui.cpp2
-rw-r--r--src/smallmap_gui.cpp2
-rw-r--r--src/station_gui.cpp14
-rw-r--r--src/subsidy_gui.cpp12
-rw-r--r--src/town_gui.cpp28
-rw-r--r--src/train_gui.cpp10
-rw-r--r--src/vehicle_gui.cpp22
-rw-r--r--src/widget.cpp4
24 files changed, 130 insertions, 130 deletions
diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp
index ff0aa7919..727e7ab45 100644
--- a/src/ai/ai_gui.cpp
+++ b/src/ai/ai_gui.cpp
@@ -523,7 +523,7 @@ struct AIConfigWindow : public Window {
byte max_competitors = _settings_newgame.difficulty.max_no_competitors;
DrawArrowButtons(10, 18, COLOUR_YELLOW, this->clicked_button ? 1 + !!this->clicked_increase : 0, max_competitors > 0, max_competitors < MAX_COMPANIES - 1);
SetDParam(0, _settings_newgame.difficulty.max_no_competitors);
- DrawString(36, this->widget[AIC_WIDGET_BACKGROUND].right, 18, STR_DIFFICULTY_LEVEL_SETTING_MAXIMUM_NO_COMPETITORS, TC_FROMSTRING);
+ DrawString(36, this->widget[AIC_WIDGET_BACKGROUND].right, 18, STR_DIFFICULTY_LEVEL_SETTING_MAXIMUM_NO_COMPETITORS);
int y = this->widget[AIC_WIDGET_LIST].top;
for (int i = this->vscroll.pos; i < this->vscroll.pos + this->vscroll.cap && i < MAX_COMPANIES; i++) {
diff --git a/src/aircraft_gui.cpp b/src/aircraft_gui.cpp
index 6ddce7723..5cbe97773 100644
--- a/src/aircraft_gui.cpp
+++ b/src/aircraft_gui.cpp
@@ -32,14 +32,14 @@ void DrawAircraftDetails(const Vehicle *v, int left, int right, int y)
SetDParam(0, u->engine_type);
SetDParam(1, u->build_year);
SetDParam(2, u->value);
- DrawString(left, right, y, STR_VEHICLE_INFO_BUILT_VALUE, TC_FROMSTRING);
+ DrawString(left, right, y, STR_VEHICLE_INFO_BUILT_VALUE);
SetDParam(0, u->cargo_type);
SetDParam(1, u->cargo_cap);
SetDParam(2, u->Next()->cargo_type);
SetDParam(3, u->Next()->cargo_cap);
SetDParam(4, GetCargoSubtypeText(u));
- DrawString(left, right, y + 10, (u->Next()->cargo_cap != 0) ? STR_VEHICLE_INFO_CAPACITY_CAPACITY : STR_VEHICLE_INFO_CAPACITY, TC_FROMSTRING);
+ DrawString(left, right, y + 10, (u->Next()->cargo_cap != 0) ? STR_VEHICLE_INFO_CAPACITY_CAPACITY : STR_VEHICLE_INFO_CAPACITY);
}
if (u->cargo_cap != 0) {
@@ -51,14 +51,14 @@ void DrawAircraftDetails(const Vehicle *v, int left, int right, int y)
SetDParam(0, u->cargo_type);
SetDParam(1, cargo_count);
SetDParam(2, u->cargo.Source());
- DrawString(left, right, y + 21 + y_offset, STR_VEHICLE_DETAILS_CARGO_FROM, TC_FROMSTRING);
+ DrawString(left, right, y + 21 + y_offset, STR_VEHICLE_DETAILS_CARGO_FROM);
feeder_share += u->cargo.FeederShare();
}
}
}
SetDParam(0, feeder_share);
- DrawString(left, right, y + 33 + y_offset, STR_FEEDER_CARGO_VALUE, TC_FROMSTRING);
+ DrawString(left, right, y + 33 + y_offset, STR_FEEDER_CARGO_VALUE);
}
diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp
index 07afbe28e..877d234f9 100644
--- a/src/airport_gui.cpp
+++ b/src/airport_gui.cpp
@@ -253,7 +253,7 @@ public:
if (_settings_game.economy.station_noise_level) {
/* show the noise of the selected airport */
SetDParam(0, airport->noise_level);
- DrawString(2, this->width - 2, 206, STR_STATION_NOISE, TC_FROMSTRING);
+ DrawString(2, this->width - 2, 206, STR_STATION_NOISE);
y_noise_offset = 10;
}
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp
index 9af40e53d..962751635 100644
--- a/src/build_vehicle_gui.cpp
+++ b/src/build_vehicle_gui.cpp
@@ -418,7 +418,7 @@ static int DrawCargoCapacityInfo(int left, int right, int y, EngineID engine, Ve
SetDParam(0, c);
SetDParam(1, cap[c]);
SetDParam(2, refittable ? STR_REFITTABLE : STR_EMPTY);
- DrawString(left, right, y, STR_PURCHASE_INFO_CAPACITY, TC_FROMSTRING);
+ DrawString(left, right, y, STR_PURCHASE_INFO_CAPACITY);
y += FONT_HEIGHT_NORMAL;
/* Only show as refittable once */
@@ -435,7 +435,7 @@ static int DrawRailWagonPurchaseInfo(int left, int right, int y, EngineID engine
/* Purchase cost */
SetDParam(0, e->GetCost());
- DrawString(left, right, y, STR_PURCHASE_INFO_COST, TC_FROMSTRING);
+ DrawString(left, right, y, STR_PURCHASE_INFO_COST);
y += FONT_HEIGHT_NORMAL;
/* Wagon weight - (including cargo) */
@@ -443,7 +443,7 @@ static int DrawRailWagonPurchaseInfo(int left, int right, int y, EngineID engine
SetDParam(0, weight);
uint cargo_weight = (e->CanCarryCargo() ? GetCargo(e->GetDefaultCargoType())->weight * e->GetDisplayDefaultCapacity() >> 4 : 0);
SetDParam(1, cargo_weight + weight);
- DrawString(left, right, y, STR_PURCHASE_INFO_WEIGHT_CWEIGHT, TC_FROMSTRING);
+ DrawString(left, right, y, STR_PURCHASE_INFO_WEIGHT_CWEIGHT);
y += FONT_HEIGHT_NORMAL;
/* Wagon speed limit, displayed if above zero */
@@ -451,7 +451,7 @@ static int DrawRailWagonPurchaseInfo(int left, int right, int y, EngineID engine
uint max_speed = e->GetDisplayMaxSpeed();
if (max_speed > 0) {
SetDParam(0, max_speed);
- DrawString(left, right, y, STR_PURCHASE_INFO_SPEED, TC_FROMSTRING);
+ DrawString(left, right, y, STR_PURCHASE_INFO_SPEED);
y += FONT_HEIGHT_NORMAL;
}
}
@@ -459,7 +459,7 @@ static int DrawRailWagonPurchaseInfo(int left, int right, int y, EngineID engine
/* Running cost */
if (rvi->running_cost_class != 0xFF) {
SetDParam(0, e->GetRunningCost());
- DrawString(left, right, y, STR_PURCHASE_INFO_RUNNINGCOST, TC_FROMSTRING);
+ DrawString(left, right, y, STR_PURCHASE_INFO_RUNNINGCOST);
y += FONT_HEIGHT_NORMAL;
}
@@ -474,26 +474,26 @@ static int DrawRailEnginePurchaseInfo(int left, int right, int y, EngineID engin
/* Purchase Cost - Engine weight */
SetDParam(0, e->GetCost());
SetDParam(1, e->GetDisplayWeight());
- DrawString(left, right, y, STR_PURCHASE_INFO_COST_WEIGHT, TC_FROMSTRING);
+ DrawString(left, right, y, STR_PURCHASE_INFO_COST_WEIGHT);
y += FONT_HEIGHT_NORMAL;
/* Max speed - Engine power */
SetDParam(0, e->GetDisplayMaxSpeed());
SetDParam(1, e->GetPower());
- DrawString(left, right, y, STR_PURCHASE_INFO_SPEED_POWER, TC_FROMSTRING);
+ DrawString(left, right, y, STR_PURCHASE_INFO_SPEED_POWER);
y += FONT_HEIGHT_NORMAL;
/* Max tractive effort - not applicable if old acceleration or maglev */
if (_settings_game.vehicle.train_acceleration_model != TAM_ORIGINAL && rvi->railtype != RAILTYPE_MAGLEV) {
SetDParam(0, e->GetDisplayMaxTractiveEffort());
- DrawString(left, right, y, STR_PURCHASE_INFO_MAX_TE, TC_FROMSTRING);
+ DrawString(left, right, y, STR_PURCHASE_INFO_MAX_TE);
y += FONT_HEIGHT_NORMAL;
}
/* Running cost */
if (rvi->running_cost_class != 0xFF) {
SetDParam(0, e->GetRunningCost());
- DrawString(left, right, y, STR_PURCHASE_INFO_RUNNINGCOST, TC_FROMSTRING);
+ DrawString(left, right, y, STR_PURCHASE_INFO_RUNNINGCOST);
y += FONT_HEIGHT_NORMAL;
}
@@ -501,7 +501,7 @@ static int DrawRailEnginePurchaseInfo(int left, int right, int y, EngineID engin
if (rvi->pow_wag_power != 0) {
SetDParam(0, rvi->pow_wag_power);
SetDParam(1, rvi->pow_wag_weight);
- DrawString(left, right, y, STR_PURCHASE_INFO_PWAGPOWER_PWAGWEIGHT, TC_FROMSTRING);
+ DrawString(left, right, y, STR_PURCHASE_INFO_PWAGPOWER_PWAGWEIGHT);
y += FONT_HEIGHT_NORMAL;
};
@@ -516,12 +516,12 @@ static int DrawRoadVehPurchaseInfo(int left, int right, int y, EngineID engine_n
/* Purchase cost - Max speed */
SetDParam(0, e->GetCost());
SetDParam(1, e->GetDisplayMaxSpeed());
- DrawString(left, right, y, STR_PURCHASE_INFO_COST_SPEED, TC_FROMSTRING);
+ DrawString(left, right, y, STR_PURCHASE_INFO_COST_SPEED);
y += FONT_HEIGHT_NORMAL;
/* Running cost */
SetDParam(0, e->GetRunningCost());
- DrawString(left, right, y, STR_PURCHASE_INFO_RUNNINGCOST, TC_FROMSTRING);
+ DrawString(left, right, y, STR_PURCHASE_INFO_RUNNINGCOST);
y += FONT_HEIGHT_NORMAL;
return y;
@@ -535,19 +535,19 @@ static int DrawShipPurchaseInfo(int left, int right, int y, EngineID engine_numb
/* Purchase cost - Max speed */
SetDParam(0, e->GetCost());
SetDParam(1, e->GetDisplayMaxSpeed());
- DrawString(left, right, y, STR_PURCHASE_INFO_COST_SPEED, TC_FROMSTRING);
+ DrawString(left, right, y, STR_PURCHASE_INFO_COST_SPEED);
y += FONT_HEIGHT_NORMAL;
/* Cargo type + capacity */
SetDParam(0, e->GetDefaultCargoType());
SetDParam(1, e->GetDisplayDefaultCapacity());
SetDParam(2, refittable ? STR_REFITTABLE : STR_EMPTY);
- DrawString(left, right, y, STR_PURCHASE_INFO_CAPACITY, TC_FROMSTRING);
+ DrawString(left, right, y, STR_PURCHASE_INFO_CAPACITY);
y += FONT_HEIGHT_NORMAL;
/* Running cost */
SetDParam(0, e->GetRunningCost());
- DrawString(left, right, y, STR_PURCHASE_INFO_RUNNINGCOST, TC_FROMSTRING);
+ DrawString(left, right, y, STR_PURCHASE_INFO_RUNNINGCOST);
y += FONT_HEIGHT_NORMAL;
return y;
@@ -562,7 +562,7 @@ static int DrawAircraftPurchaseInfo(int left, int right, int y, EngineID engine_
/* Purchase cost - Max speed */
SetDParam(0, e->GetCost());
SetDParam(1, e->GetDisplayMaxSpeed());
- DrawString(left, right, y, STR_PURCHASE_INFO_COST_SPEED, TC_FROMSTRING);
+ DrawString(left, right, y, STR_PURCHASE_INFO_COST_SPEED);
y += FONT_HEIGHT_NORMAL;
/* Cargo capacity */
@@ -571,20 +571,20 @@ static int DrawAircraftPurchaseInfo(int left, int right, int y, EngineID engine_
SetDParam(1, e->GetDisplayDefaultCapacity());
SetDParam(2, CT_MAIL);
SetDParam(3, avi->mail_capacity);
- DrawString(left, right, y, STR_PURCHASE_INFO_AIRCRAFT_CAPACITY, TC_FROMSTRING);
+ DrawString(left, right, y, STR_PURCHASE_INFO_AIRCRAFT_CAPACITY);
} else {
/* Note, if the default capacity is selected by the refit capacity
* callback, then the capacity shown is likely to be incorrect. */
SetDParam(0, cargo);
SetDParam(1, e->GetDisplayDefaultCapacity());
SetDParam(2, refittable ? STR_REFITTABLE : STR_EMPTY);
- DrawString(left, right, y, STR_PURCHASE_INFO_CAPACITY, TC_FROMSTRING);
+ DrawString(left, right, y, STR_PURCHASE_INFO_CAPACITY);
}
y += FONT_HEIGHT_NORMAL;
/* Running cost */
SetDParam(0, e->GetRunningCost());
- DrawString(left, right, y, STR_PURCHASE_INFO_RUNNINGCOST, TC_FROMSTRING);
+ DrawString(left, right, y, STR_PURCHASE_INFO_RUNNINGCOST);
y += FONT_HEIGHT_NORMAL;
return y;
@@ -619,7 +619,7 @@ int DrawVehiclePurchaseInfo(int left, int right, int y, EngineID engine_number)
if (new_y == y) {
SetDParam(0, CT_INVALID);
SetDParam(2, STR_EMPTY);
- DrawString(left, right, y, STR_PURCHASE_INFO_CAPACITY, TC_FROMSTRING);
+ DrawString(left, right, y, STR_PURCHASE_INFO_CAPACITY);
y += FONT_HEIGHT_NORMAL;
} else {
y = new_y;
@@ -635,7 +635,7 @@ int DrawVehiclePurchaseInfo(int left, int right, int y, EngineID engine_number)
if (new_y == y) {
SetDParam(0, CT_INVALID);
SetDParam(2, STR_EMPTY);
- DrawString(left, right, y, STR_PURCHASE_INFO_CAPACITY, TC_FROMSTRING);
+ DrawString(left, right, y, STR_PURCHASE_INFO_CAPACITY);
y += FONT_HEIGHT_NORMAL;
} else {
y = new_y;
@@ -655,12 +655,12 @@ int DrawVehiclePurchaseInfo(int left, int right, int y, EngineID engine_number)
/* Design date - Life length */
SetDParam(0, ymd.year);
SetDParam(1, e->lifelength);
- DrawString(left, right, y, STR_PURCHASE_INFO_DESIGNED_LIFE, TC_FROMSTRING);
+ DrawString(left, right, y, STR_PURCHASE_INFO_DESIGNED_LIFE);
y += FONT_HEIGHT_NORMAL;
/* Reliability */
SetDParam(0, e->reliability * 100 >> 16);
- DrawString(left, right, y, STR_PURCHASE_INFO_RELIABILITY, TC_FROMSTRING);
+ DrawString(left, right, y, STR_PURCHASE_INFO_RELIABILITY);
y += FONT_HEIGHT_NORMAL;
}
diff --git a/src/cheat_gui.cpp b/src/cheat_gui.cpp
index d63aaf2be..def295b20 100644
--- a/src/cheat_gui.cpp
+++ b/src/cheat_gui.cpp
@@ -193,7 +193,7 @@ struct CheatWindow : Window {
} break;
}
- DrawString(50, this->width, y + 1, ce->str, TC_FROMSTRING);
+ DrawString(50, this->width, y + 1, ce->str);
y += 12;
}
diff --git a/src/company_gui.cpp b/src/company_gui.cpp
index 529fe2cd5..3d05b9782 100644
--- a/src/company_gui.cpp
+++ b/src/company_gui.cpp
@@ -122,7 +122,7 @@ static void DrawCompanyEconomyStats(const Company *c, bool small, const Widget *
DrawString(w->left + 2, w->right - 2, y, STR_FINANCES_TOTAL_CAPTION, TC_FROMSTRING, SA_RIGHT);
y += 20;
} else {
- DrawString(w->left + 2, w->right - 2, y, STR_FINANCES_SECTION_CONSTRUCTION + et, TC_FROMSTRING);
+ DrawString(w->left + 2, w->right - 2, y, STR_FINANCES_SECTION_CONSTRUCTION + et);
y += 10;
}
}
@@ -185,18 +185,18 @@ static void DrawCompanyEconomyStats(const Company *c, bool small, const Widget *
/* draw max loan aligned to loan below (y += 10) */
SetDParam(0, _economy.max_loan);
- DrawString(widget[CFW_TOTAL_MAXLOAN].left, widget[CFW_TOTAL_MAXLOAN].right, y + 10, STR_MAX_LOAN, TC_FROMSTRING);
+ DrawString(widget[CFW_TOTAL_MAXLOAN].left, widget[CFW_TOTAL_MAXLOAN].right, y + 10, STR_MAX_LOAN);
} else {
y = 15;
}
- DrawString(widget[CFW_TOTAL_LABELS].left, widget[CFW_TOTAL_LABELS].right, y, STR_FINANCES_BANK_BALANCE_TITLE, TC_FROMSTRING);
+ DrawString(widget[CFW_TOTAL_LABELS].left, widget[CFW_TOTAL_LABELS].right, y, STR_FINANCES_BANK_BALANCE_TITLE);
SetDParam(0, c->money);
DrawString(widget[CFW_TOTAL_VALUES].left, widget[CFW_TOTAL_VALUES].right, y, STR_FINANCES_TOTAL_CURRENCY, TC_FROMSTRING, SA_RIGHT);
y += 10;
- DrawString(widget[CFW_TOTAL_LABELS].left, widget[CFW_TOTAL_LABELS].right, y, STR_FINANCES_LOAN_TITLE, TC_FROMSTRING);
+ DrawString(widget[CFW_TOTAL_LABELS].left, widget[CFW_TOTAL_LABELS].right, y, STR_FINANCES_LOAN_TITLE);
SetDParam(0, c->current_loan);
DrawString(widget[CFW_TOTAL_VALUES].left, widget[CFW_TOTAL_VALUES].right, y, STR_FINANCES_TOTAL_CURRENCY, TC_FROMSTRING, SA_RIGHT);
@@ -1430,7 +1430,7 @@ static void DrawCompanyVehiclesAmount(CompanyID company, int right)
uint air = 0;
uint ship = 0;
- DrawString(x, right, y, STR_COMPANY_VIEW_VEHICLES_TITLE, TC_FROMSTRING);
+ DrawString(x, right, y, STR_COMPANY_VIEW_VEHICLES_TITLE);
FOR_ALL_VEHICLES(v) {
if (v->owner == company) {
@@ -1445,29 +1445,29 @@ static void DrawCompanyVehiclesAmount(CompanyID company, int right)
}
if (train + road + air + ship == 0) {
- DrawString(x + 70, right, y, STR_COMPANY_VIEW_VEHICLES_NONE, TC_FROMSTRING);
+ DrawString(x + 70, right, y, STR_COMPANY_VIEW_VEHICLES_NONE);
} else {
if (train != 0) {
SetDParam(0, train);
- DrawString(x + 70, right, y, STR_TRAINS, TC_FROMSTRING);
+ DrawString(x + 70, right, y, STR_TRAINS);
y += 10;
}
if (road != 0) {
SetDParam(0, road);
- DrawString(x + 70, right, y, STR_ROAD_VEHICLES, TC_FROMSTRING);
+ DrawString(x + 70, right, y, STR_ROAD_VEHICLES);
y += 10;
}
if (air != 0) {
SetDParam(0, air);
- DrawString(x + 70, right, y, STR_AIRCRAFT, TC_FROMSTRING);
+ DrawString(x + 70, right, y, STR_AIRCRAFT);
y += 10;
}
if (ship != 0) {
SetDParam(0, ship);
- DrawString(x + 70, right, y, STR_SHIPS, TC_FROMSTRING);
+ DrawString(x + 70, right, y, STR_SHIPS);
}
}
}
@@ -1496,7 +1496,7 @@ static void DrawCompanyOwnerText(const Company *c)
SetDParam(0, amt * 25);
SetDParam(1, c2->index);
- DrawString(120, 359, (num++) * height + 116, STR_COMPANY_VIEW_SHARES_OWNED_BY, TC_FROMSTRING);
+ DrawString(120, 359, (num++) * height + 116, STR_COMPANY_VIEW_SHARES_OWNED_BY);
}
}
}
@@ -1572,10 +1572,10 @@ struct CompanyWindow : Window
/* "Inaugurated:" */
SetDParam(0, c->inaugurated_year);
- DrawString(110, this->width, 23, STR_COMPANY_VIEW_INAUGURATED_TITLE, TC_FROMSTRING);
+ DrawString(110, this->width, 23, STR_COMPANY_VIEW_INAUGURATED_TITLE);
/* "Colour scheme:" */
- DrawString(110, this->width, 43, STR_COMPANY_VIEW_COLOUR_SCHEME_TITLE, TC_FROMSTRING);
+ DrawString(110, this->width, 43, STR_COMPANY_VIEW_COLOUR_SCHEME_TITLE);
/* Draw company-colour bus */
DrawSprite(SPR_VEH_BUS_SW_VIEW, COMPANY_SPRITE_COLOUR(c->index), 215, 44);
@@ -1584,7 +1584,7 @@ struct CompanyWindow : Window
/* "Company value:" */
SetDParam(0, CalculateCompanyValue(c));
- DrawString(110, this->width, 106, STR_COMPANY_VIEW_COMPANY_VALUE, TC_FROMSTRING);
+ DrawString(110, this->width, 106, STR_COMPANY_VIEW_COMPANY_VALUE);
/* Shares list */
DrawCompanyOwnerText(c);
diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp
index 9c1d62c9b..3525c1909 100644
--- a/src/depot_gui.cpp
+++ b/src/depot_gui.cpp
@@ -297,7 +297,7 @@ struct DepotWindow : Window {
DrawSprite((v->vehstatus & VS_STOPPED) ? SPR_FLAG_VEH_STOPPED : SPR_FLAG_VEH_RUNNING, PAL_NONE, x + diff_x, y + diff_y);
SetDParam(0, v->unitnumber);
- DrawString(x, this->widget[DEPOT_WIDGET_MATRIX].right - 1, y + 2, (uint16)(v->max_age - DAYS_IN_LEAP_YEAR) >= v->age ? STR_BLACK_COMMA : STR_RED_COMMA, TC_FROMSTRING);
+ DrawString(x, this->widget[DEPOT_WIDGET_MATRIX].right - 1, y + 2, (uint16)(v->max_age - DAYS_IN_LEAP_YEAR) >= v->age ? STR_BLACK_COMMA : STR_RED_COMMA);
}
void DrawDepotWindow(Window *w)
@@ -369,7 +369,7 @@ struct DepotWindow : Window {
const Vehicle *u;
DrawTrainImage(v, x + 50, y, this->sel, this->hscroll.cap - 29, 0);
- DrawString(x, this->widget[DEPOT_WIDGET_MATRIX].right - 1, y + 2, STR_DEPOT_NO_ENGINE, TC_FROMSTRING);
+ DrawString(x, this->widget[DEPOT_WIDGET_MATRIX].right - 1, y + 2, STR_DEPOT_NO_ENGINE);
/* Draw the train counter */
i = 0;
diff --git a/src/gfx_func.h b/src/gfx_func.h
index 7354a9f7e..1831f5696 100644
--- a/src/gfx_func.h
+++ b/src/gfx_func.h
@@ -95,8 +95,8 @@ enum StringAlignment {
};
DECLARE_ENUM_AS_BIT_SET(StringAlignment);
-int DrawString(int left, int right, int top, const char *str, TextColour colour, StringAlignment align = SA_LEFT, bool underline = false);
-int DrawString(int left, int right, int top, StringID str, TextColour colour, StringAlignment align = SA_LEFT, bool underline = false);
+int DrawString(int left, int right, int top, const char *str, TextColour colour = TC_FROMSTRING, StringAlignment align = SA_LEFT, bool underline = false);
+int DrawString(int left, int right, int top, StringID str, TextColour colour = TC_FROMSTRING, StringAlignment align = SA_LEFT, bool underline = false);
int DrawStringMultiLine(int left, int right, int top, int bottom, StringID str, TextColour colour = TC_FROMSTRING, StringAlignment align = SA_LEFT, bool underline = false);
void DrawCharCentered(uint32 c, int x, int y, TextColour colour);
diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp
index 157363b89..cc0d80033 100644
--- a/src/graph_gui.cpp
+++ b/src/graph_gui.cpp
@@ -788,7 +788,7 @@ struct PaymentRatesGraphWindow : BaseGraphWindow {
GfxFillRect(x + clk_dif, y + clk_dif, x + 8 + clk_dif, y + 5 + clk_dif, 0);
GfxFillRect(x + 1 + clk_dif, y + 1 + clk_dif, x + 7 + clk_dif, y + 4 + clk_dif, cs->legend_colour);
SetDParam(0, cs->name);
- DrawString(x + 14 + clk_dif, this->width, y + clk_dif, STR_GRAPH_CARGO_PAYMENT_CARGO, TC_FROMSTRING);
+ DrawString(x + 14 + clk_dif, this->width, y + clk_dif, STR_GRAPH_CARGO_PAYMENT_CARGO);
y += 8;
}
@@ -803,8 +803,8 @@ struct PaymentRatesGraphWindow : BaseGraphWindow {
this->DrawGraph();
- DrawString(2 + 46, this->width, 24 + this->gd_height + 7, STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL, TC_FROMSTRING);
- DrawString(2 + 84, this->width, 24 - 9, STR_GRAPH_CARGO_PAYMENT_RATES_TITLE, TC_FROMSTRING);
+ DrawString(2 + 46, this->width, 24 + this->gd_height + 7, STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL);
+ DrawString(2 + 84, this->width, 24 - 9, STR_GRAPH_CARGO_PAYMENT_RATES_TITLE);
}
virtual void OnClick(Point pt, int widget)
@@ -931,7 +931,7 @@ public:
SetDParam(2, c->index);
SetDParam(3, GetPerformanceTitleFromValue(c->old_economy[1].performance_history));
- DrawString(2, this->width, 15 + i * 10, i == 0 ? STR_COMPANY_LEAGUE_FIRST : STR_COMPANY_LEAGUE_OTHER, TC_FROMSTRING);
+ DrawString(2, this->width, 15 + i * 10, i == 0 ? STR_COMPANY_LEAGUE_FIRST : STR_COMPANY_LEAGUE_OTHER);
DrawCompanyIcon(c->index, 27, 16 + i * 10);
}
}
@@ -1119,7 +1119,7 @@ struct PerformanceRatingDetailWindow : Window {
total_score += score;
}
- DrawString(7, 107, y, STR_PERFORMANCE_DETAIL_VEHICLES + i, TC_FROMSTRING);
+ DrawString(7, 107, y, STR_PERFORMANCE_DETAIL_VEHICLES + i);
/* Draw the score */
SetDParam(0, score);
@@ -1158,10 +1158,10 @@ struct PerformanceRatingDetailWindow : Window {
case SCORE_MAX_INCOME:
case SCORE_MONEY:
case SCORE_LOAN:
- DrawString(167, this->width, y, STR_PERFORMANCE_DETAIL_AMOUNT_CURRENCY, TC_FROMSTRING);
+ DrawString(167, this->width, y, STR_PERFORMANCE_DETAIL_AMOUNT_CURRENCY);
break;
default:
- DrawString(167, this->width, y, STR_PERFORMANCE_DETAIL_AMOUNT_INT, TC_FROMSTRING);
+ DrawString(167, this->width, y, STR_PERFORMANCE_DETAIL_AMOUNT_INT);
}
}
}
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp
index 464590fc3..2ec8a1636 100644
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -249,7 +249,7 @@ public:
if (_game_mode != GM_EDITOR) {
SetDParam(0, indsp->GetConstructionCost());
- DrawString(x_str, right, y_str, STR_INDUSTRY_BUILD_COST, TC_FROMSTRING);
+ DrawString(x_str, right, y_str, STR_INDUSTRY_BUILD_COST);
y_str += 11;
}
@@ -264,7 +264,7 @@ public:
SetDParam(p++, GetCargo(indsp->accepts_cargo[j])->name);
SetDParam(p++, GetCargoSuffix(j, CST_FUND, NULL, this->selected_type, indsp));
}
- DrawString(x_str, right, y_str, str, TC_FROMSTRING);
+ DrawString(x_str, right, y_str, str);
y_str += 11;
/* Draw the produced cargos, if any. Otherwhise, will print "Nothing" */
@@ -278,7 +278,7 @@ public:
SetDParam(p++, GetCargo(indsp->produced_cargo[j])->name);
SetDParam(p++, GetCargoSuffix(j + 3, CST_FUND, NULL, this->selected_type, indsp));
}
- DrawString(x_str, right, y_str, str, TC_FROMSTRING);
+ DrawString(x_str, right, y_str, str);
y_str += 11;
/* Get the additional purchase info text, if it has not already been */
@@ -505,14 +505,14 @@ public:
if (i->accepts_cargo[j] == CT_INVALID) continue;
has_accept = true;
if (first) {
- DrawString(2, this->widget[IVW_INFO].right, y, STR_INDUSTRY_VIEW_WAITING_FOR_PROCESSING, TC_FROMSTRING);
+ DrawString(2, this->widget[IVW_INFO].right, y, STR_INDUSTRY_VIEW_WAITING_FOR_PROCESSING);
y += 10;
first = false;
}
SetDParam(0, i->accepts_cargo[j]);
SetDParam(1, i->incoming_cargo_waiting[j]);
SetDParam(2, GetCargoSuffix(j, CST_VIEW, i, i->type, ind));
- DrawString(4, this->widget[IVW_INFO].right, y, STR_INDUSTRY_VIEW_WAITING_STOCKPILE_CARGO, TC_FROMSTRING);
+ DrawString(4, this->widget[IVW_INFO].right, y, STR_INDUSTRY_VIEW_WAITING_STOCKPILE_CARGO);
y += 10;
}
} else {
@@ -526,7 +526,7 @@ public:
SetDParam(p++, GetCargoSuffix(j, CST_VIEW, i, i->type, ind));
}
if (has_accept) {
- DrawString(2, this->widget[IVW_INFO].right, y, str, TC_FROMSTRING);
+ DrawString(2, this->widget[IVW_INFO].right, y, str);
y += 10;
}
}
@@ -536,7 +536,7 @@ public:
if (i->produced_cargo[j] == CT_INVALID) continue;
if (first) {
if (has_accept) y += 10;
- DrawString(2, this->widget[IVW_INFO].right, y, STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE, TC_FROMSTRING);
+ DrawString(2, this->widget[IVW_INFO].right, y, STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE);
y += 10;
this->production_offset_y = y;
first = false;
@@ -548,7 +548,7 @@ public:
SetDParam(3, i->last_month_pct_transported[j] * 100 >> 8);
uint x = 4 + (IsProductionAlterable(i) ? 30 : 0);
- DrawString(x, this->widget[IVW_INFO].right, y, STR_INDUSTRY_VIEW_TRANSPORTED, TC_FROMSTRING);
+ DrawString(x, this->widget[IVW_INFO].right, y, STR_INDUSTRY_VIEW_TRANSPORTED);
/* Let's put out those buttons.. */
if (IsProductionAlterable(i)) {
DrawArrowButtons(5, y, COLOUR_YELLOW, (this->clicked_line == j + 1) ? this->clicked_button : 0,
@@ -966,7 +966,7 @@ public:
/* Drawing the right string */
StringID str = STR_INDUSTRYDIR_ITEM_NOPROD;
if (p != 1) str = (p == 5) ? STR_INDUSTRYDIR_ITEM : STR_INDUSTRYDIR_ITEM_TWO;
- DrawString(4, this->widget[IDW_INDUSTRY_LIST].right, y, str, TC_FROMSTRING);
+ DrawString(4, this->widget[IDW_INDUSTRY_LIST].right, y, str);
y += 10;
}
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp
index 6be80da6e..a25a7c848 100644
--- a/src/misc_gui.cpp
+++ b/src/misc_gui.cpp
@@ -1478,7 +1478,7 @@ static void DrawFiosTexts(int left, int right)
}
if (str != STR_ERROR_UNABLE_TO_READ_DRIVE) SetDParam(0, tot);
- DrawString(left + 2, right - 2, 37, str, TC_FROMSTRING);
+ DrawString(left + 2, right - 2, 37, str);
DrawString(left + 2, right - 2, 27, path, TC_BLACK);
}
diff --git a/src/music_gui.cpp b/src/music_gui.cpp
index f515af807..5103f7128 100644
--- a/src/music_gui.cpp
+++ b/src/music_gui.cpp
@@ -233,7 +233,7 @@ struct MusicTrackSelectionWindow : public Window {
SetDParam(0, i);
SetDParam(2, i);
SetDParam(1, SPECSTR_SONGNAME);
- DrawString(this->widget[MTSW_LIST_LEFT].left + 2, this->widget[MTSW_LIST_LEFT].right - 2, 23 + (i - 1) * 6, (i < 10) ? STR_PLAYLIST_TRACK_SINGLE_DIGIT : STR_PLAYLIST_TRACK_DOUBLE_DIGIT, TC_FROMSTRING);
+ DrawString(this->widget[MTSW_LIST_LEFT].left + 2, this->widget[MTSW_LIST_LEFT].right - 2, 23 + (i - 1) * 6, (i < 10) ? STR_PLAYLIST_TRACK_SINGLE_DIGIT : STR_PLAYLIST_TRACK_DOUBLE_DIGIT);
}
for (uint i = 0; i != 6; i++) {
@@ -251,7 +251,7 @@ struct MusicTrackSelectionWindow : public Window {
SetDParam(0, i);
SetDParam(1, SPECSTR_SONGNAME);
SetDParam(2, i);
- DrawString(this->widget[MTSW_LIST_RIGHT].left + 2, this->widget[MTSW_LIST_RIGHT].right - 2, y, (i < 10) ? STR_PLAYLIST_TRACK_SINGLE_DIGIT : STR_PLAYLIST_TRACK_DOUBLE_DIGIT, TC_FROMSTRING);
+ DrawString(this->widget[MTSW_LIST_RIGHT].left + 2, this->widget[MTSW_LIST_RIGHT].right - 2, y, (i < 10) ? STR_PLAYLIST_TRACK_SINGLE_DIGIT : STR_PLAYLIST_TRACK_DOUBLE_DIGIT);
y += 6;
}
}
@@ -441,7 +441,7 @@ struct MusicWindow : public Window {
SetDParam(0, _music_wnd_cursong);
str = (_music_wnd_cursong < 10) ? STR_MUSIC_TRACK_SINGLE_DIGIT : STR_MUSIC_TRACK_DOUBLE_DIGIT;
}
- DrawString(this->widget[MW_INFO].left + 3, this->widget[MW_INFO].right - 3, 46, str, TC_FROMSTRING);
+ DrawString(this->widget[MW_INFO].left + 3, this->widget[MW_INFO].right - 3, 46, str);
str = STR_MUSIC_TITLE_NONE;
if (_song_is_active != 0 && _music_wnd_cursong != 0) {
@@ -451,7 +451,7 @@ struct MusicWindow : public Window {
}
DrawString(this->widget[MW_INFO].left, this->widget[MW_INFO].right, 46, str, TC_FROMSTRING, SA_CENTER);
- DrawString(this->widget[MW_INFO].left + 1, this->widget[MW_INFO].right, 38, STR_MUSIC_TRACK_XTITLE, TC_FROMSTRING);
+ DrawString(this->widget[MW_INFO].left + 1, this->widget[MW_INFO].right, 38, STR_MUSIC_TRACK_XTITLE);
for (uint i = 0; i != 6; i++) {
DrawString(this->widget[i + MW_ALL].left, this->widget[i + MW_ALL].right, 59, STR_MUSIC_PLAYLIST_ALL + i, msf.playlist == i ? TC_WHITE : TC_BLACK, SA_CENTER);
diff --git a/src/news_gui.cpp b/src/news_gui.cpp
index 27386043d..ba34b2f94 100644
--- a/src/news_gui.cpp
+++ b/src/news_gui.cpp
@@ -184,7 +184,7 @@ struct NewsWindow : Window {
GfxFillRect(left, top, right, top, 0xD7);
GfxFillRect(left, bottom, right, bottom, 0xD7);
- DrawString(left + 2, right - 2, top + 1, STR_SILVER_CROSS, TC_FROMSTRING);
+ DrawString(left + 2, right - 2, top + 1, STR_SILVER_CROSS);
}
virtual void OnPaint()
@@ -201,7 +201,7 @@ struct NewsWindow : Window {
break;
}
- DrawString(2, this->width - 1, 1, STR_SILVER_CROSS, TC_FROMSTRING);
+ DrawString(2, this->width - 1, 1, STR_SILVER_CROSS);
SetDParam(0, this->ni->date);
DrawString(2, this->width - 1, 1, STR_DATE_LONG_SMALL, TC_FROMSTRING, SA_RIGHT);
diff --git a/src/roadveh_gui.cpp b/src/roadveh_gui.cpp
index 64eef9fc3..61db89ea3 100644
--- a/src/roadveh_gui.cpp
+++ b/src/roadveh_gui.cpp
@@ -31,7 +31,7 @@ void DrawRoadVehDetails(const Vehicle *v, int left, int right, int y)
SetDParam(0, v->engine_type);
SetDParam(1, v->build_year);
SetDParam(2, v->value);
- DrawString(left, right, y + y_offset, STR_VEHICLE_INFO_BUILT_VALUE, TC_FROMSTRING);
+ DrawString(left, right, y + y_offset, STR_VEHICLE_INFO_BUILT_VALUE);
if (RoadVehHasArticPart(v)) {
AcceptedCargo max_cargo;
@@ -86,7 +86,7 @@ void DrawRoadVehDetails(const Vehicle *v, int left, int right, int y)
str = STR_VEHICLE_DETAILS_CARGO_FROM;
feeder_share += u->cargo.FeederShare();
}
- DrawString(left, right, y + 21 + y_offset, str, TC_FROMSTRING);
+ DrawString(left, right, y + 21 + y_offset, str);
y_offset += 11;
}
@@ -96,7 +96,7 @@ void DrawRoadVehDetails(const Vehicle *v, int left, int right, int y)
SetDParam(0, v->cargo_type);
SetDParam(1, v->cargo_cap);
SetDParam(4, GetCargoSubtypeText(v));
- DrawString(left, right, y + 10 + y_offset, STR_VEHICLE_INFO_CAPACITY, TC_FROMSTRING);
+ DrawString(left, right, y + 10 + y_offset, STR_VEHICLE_INFO_CAPACITY);
str = STR_VEHICLE_DETAILS_CARGO_EMPTY;
if (!v->cargo.Empty()) {
@@ -106,12 +106,12 @@ void DrawRoadVehDetails(const Vehicle *v, int left, int right, int y)
str = STR_VEHICLE_DETAILS_CARGO_FROM;
feeder_share += v->cargo.FeederShare();
}
- DrawString(left, right, y + 21 + y_offset, str, TC_FROMSTRING);
+ DrawString(left, right, y + 21 + y_offset, str);
}
/* Draw Transfer credits text */
SetDParam(0, feeder_share);
- DrawString(left, right, y + 33 + y_offset, STR_FEEDER_CARGO_VALUE, TC_FROMSTRING);
+ DrawString(left, right, y + 33 + y_offset, STR_FEEDER_CARGO_VALUE);
}
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp
index e3adb86b4..0a7da6f1d 100644
--- a/src/settings_gui.cpp
+++ b/src/settings_gui.cpp
@@ -567,7 +567,7 @@ public:
value += sdb->str;
SetDParam(0, value);
- DrawString(30, this->width, y, str, TC_FROMSTRING);
+ DrawString(30, this->width, y, str);
y += GAMEDIFF_WND_ROWSIZE + 2; // space items apart a bit
str++;
@@ -941,7 +941,7 @@ uint SettingEntry::Draw(GameSettings *settings_ptr, int base_x, int base_y, int
case SEF_SUBTREE_KIND:
if (cur_row >= first_row) {
DrawSprite((this->d.sub.folded ? SPR_CIRCLE_FOLDED : SPR_CIRCLE_UNFOLDED), PAL_NONE, x, y);
- DrawString(x + 12, max_x, y, this->d.sub.title, TC_FROMSTRING);
+ DrawString(x + 12, max_x, y, this->d.sub.title);
}
cur_row++;
if (!this->d.sub.folded) {
@@ -1008,7 +1008,7 @@ void SettingEntry::DrawSetting(GameSettings *settings_ptr, const SettingDesc *sd
SetDParam(1, value);
}
}
- DrawString(x + 25, max_x, y, (sdb->str) + disabled, TC_FROMSTRING);
+ DrawString(x + 25, max_x, y, (sdb->str) + disabled);
}
diff --git a/src/ship_gui.cpp b/src/ship_gui.cpp
index 2e2c75ba1..cd3703fac 100644
--- a/src/ship_gui.cpp
+++ b/src/ship_gui.cpp
@@ -47,12 +47,12 @@ void DrawShipDetails(const Vehicle *v, int left, int right, int y)
SetDParam(0, v->engine_type);
SetDParam(1, v->build_year);
SetDParam(2, v->value);
- DrawString(left, right, y, STR_VEHICLE_INFO_BUILT_VALUE, TC_FROMSTRING);
+ DrawString(left, right, y, STR_VEHICLE_INFO_BUILT_VALUE);
SetDParam(0, v->cargo_type);
SetDParam(1, v->cargo_cap);
SetDParam(4, GetCargoSubtypeText(v));
- DrawString(left, right, y + 10, STR_VEHICLE_INFO_CAPACITY, TC_FROMSTRING);
+ DrawString(left, right, y + 10, STR_VEHICLE_INFO_CAPACITY);
StringID str = STR_VEHICLE_DETAILS_CARGO_EMPTY;
if (!v->cargo.Empty()) {
@@ -61,9 +61,9 @@ void DrawShipDetails(const Vehicle *v, int left, int right, int y)
SetDParam(2, v->cargo.Source());
str = STR_VEHICLE_DETAILS_CARGO_FROM;
}
- DrawString(left, right, y + 21, str, TC_FROMSTRING);
+ DrawString(left, right, y + 21, str);
/* Draw Transfer credits text */
SetDParam(0, v->cargo.FeederShare());
- DrawString(left, right, y + 33, STR_FEEDER_CARGO_VALUE, TC_FROMSTRING);
+ DrawString(left, right, y + 33, STR_FEEDER_CARGO_VALUE);
}
diff --git a/src/signs_gui.cpp b/src/signs_gui.cpp
index 5ee808f11..e9f1c85d9 100644
--- a/src/signs_gui.cpp
+++ b/src/signs_gui.cpp
@@ -106,7 +106,7 @@ struct SignListWindow : Window, SignList {
/* No signs? */
int y = this->widget[SLW_LIST].top + 2; // offset from top of widget
if (this->vscroll.count == 0) {
- DrawString(this->widget[SLW_LIST].left + 2, this->widget[SLW_LIST].right, y, STR_STATION_LIST_NONE, TC_FROMSTRING);
+ DrawString(this->widget[SLW_LIST].left + 2, this->widget[SLW_LIST].right, y, STR_STATION_LIST_NONE);
return;
}
diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp
index 2ec595ba5..2dbb03fe7 100644
--- a/src/smallmap_gui.cpp
+++ b/src/smallmap_gui.cpp
@@ -865,7 +865,7 @@ public:
} else {
/* Anything that is not an industry is using normal process */
GfxFillRect(x, y + 1, x + 8, y + 5, 0);
- DrawString(x + 11, x + COLUMN_WIDTH - 1, y, tbl->legend, TC_FROMSTRING);
+ DrawString(x + 11, x + COLUMN_WIDTH - 1, y, tbl->legend);
}
GfxFillRect(x + 1, y + 2, x + 7, y + 4, tbl->colour); // legend colour
diff --git a/src/station_gui.cpp b/src/station_gui.cpp
index 6582f6523..745046c74 100644
--- a/src/station_gui.cpp
+++ b/src/station_gui.cpp
@@ -366,7 +366,7 @@ public:
DrawString(71 + cg_ofst, 71 + cg_ofst + 12, y + cg_ofst, STR_ABBREV_ALL, TC_BLACK);
if (this->vscroll.count == 0) { // company has no stations
- DrawString(xb, this->width, 40, STR_STATION_LIST_NONE, TC_FROMSTRING);
+ DrawString(xb, this->width, 40, STR_STATION_LIST_NONE);
return;
}
@@ -385,7 +385,7 @@ public:
SetDParam(0, st->index);
SetDParam(1, st->facilities);
- x = DrawString(xb, this->widget[SLW_LIST].right, y, STR_STATION_LIST_STATION, TC_FROMSTRING) + 5;
+ x = DrawString(xb, this->widget[SLW_LIST].right, y, STR_STATION_LIST_STATION) + 5;
/* show cargo waiting and station ratings */
for (CargoID j = 0; j < NUM_CARGO; j++) {
@@ -821,7 +821,7 @@ struct StationViewWindow : public Window {
if (!st->goods[i].cargo.Empty()) str = STR_EMPTY;
}
SetDParam(0, str);
- DrawString(x, this->widget[SVW_WAITING].right - 2, y, STR_STATION_VIEW_WAITING_TITLE, TC_FROMSTRING);
+ DrawString(x, this->widget[SVW_WAITING].right - 2, y, STR_STATION_VIEW_WAITING_TITLE);
y += 10;
}
@@ -886,7 +886,7 @@ struct StationViewWindow : public Window {
} else { // extended window with list of cargo ratings
y = this->widget[SVW_RATINGLIST].top + 1;
- DrawString(this->widget[SVW_ACCEPTLIST].left + 2, this->widget[SVW_ACCEPTLIST].right - 2, y, STR_STATION_VIEW_CARGO_RATINGS_TITLE, TC_FROMSTRING);
+ DrawString(this->widget[SVW_ACCEPTLIST].left + 2, this->widget[SVW_ACCEPTLIST].right - 2, y, STR_STATION_VIEW_CARGO_RATINGS_TITLE);
y += 10;
for (CargoID i = 0; i < NUM_CARGO; i++) {
@@ -899,7 +899,7 @@ struct StationViewWindow : public Window {
SetDParam(0, cs->name);
SetDParam(2, ge->rating * 101 >> 8);
SetDParam(1, STR_CARGO_RATING_APPALLING + (ge->rating >> 5));
- DrawString(this->widget[SVW_ACCEPTLIST].left + 8, this->widget[SVW_ACCEPTLIST].right - 2, y, STR_STATION_VIEW_CARGO_RATING, TC_FROMSTRING);
+ DrawString(this->widget[SVW_ACCEPTLIST].left + 8, this->widget[SVW_ACCEPTLIST].right - 2, y, STR_STATION_VIEW_CARGO_RATING);
y += 10;
}
}
@@ -1161,7 +1161,7 @@ struct SelectStationWindow : Window {
uint y = 17;
if (this->vscroll.pos == 0) {
- DrawString(3, this->widget[JSW_PANEL].right - 2, y, STR_CREATE_SPLITTED_STATION, TC_FROMSTRING);
+ DrawString(3, this->widget[JSW_PANEL].right - 2, y, STR_CREATE_SPLITTED_STATION);
y += 10;
}
@@ -1172,7 +1172,7 @@ struct SelectStationWindow : Window {
const Station *st = GetStation(_stations_nearby_list[i - 1]);
SetDParam(0, st->index);
SetDParam(1, st->facilities);
- DrawString(3, this->widget[JSW_PANEL].right - 2, y, STR_STATION_LIST_STATION, TC_FROMSTRING);
+ DrawString(3, this->widget[JSW_PANEL].right - 2, y, STR_STATION_LIST_STATION);
}
}
diff --git a/src/subsidy_gui.cpp b/src/subsidy_gui.cpp
index d7a517a22..298592522 100644
--- a/src/subsidy_gui.cpp
+++ b/src/subsidy_gui.cpp
@@ -122,7 +122,7 @@ struct SubsidyListWindow : Window {
int x = this->widget[SLW_PANEL].left + 1;
/* Section for drawing the offered subisidies */
- DrawString(x, right, y, STR_SUBSIDIES_OFFERED_TITLE, TC_FROMSTRING);
+ DrawString(x, right, y, STR_SUBSIDIES_OFFERED_TITLE);
y += FONT_HEIGHT_NORMAL;
uint num = 0;
@@ -131,7 +131,7 @@ struct SubsidyListWindow : Window {
/* Displays the two offered towns */
SetupSubsidyDecodeParam(s, 1);
SetDParam(7, _date - ymd.day + 384 - s->age * 32);
- DrawString(x + 2, right - 2, y, STR_SUBSIDIES_OFFERED_FROM_TO, TC_FROMSTRING);
+ DrawString(x + 2, right - 2, y, STR_SUBSIDIES_OFFERED_FROM_TO);
y += FONT_HEIGHT_NORMAL;
num++;
@@ -139,12 +139,12 @@ struct SubsidyListWindow : Window {
}
if (num == 0) {
- DrawString(x + 2, right - 2, y, STR_SUBSIDIES_NONE, TC_FROMSTRING);
+ DrawString(x + 2, right - 2, y, STR_SUBSIDIES_NONE);
y += FONT_HEIGHT_NORMAL;
}
/* Section for drawing the already granted subisidies */
- DrawString(x, right, y + 1, STR_SUBSIDIES_SUBSIDISED_TITLE, TC_FROMSTRING);
+ DrawString(x, right, y + 1, STR_SUBSIDIES_SUBSIDISED_TITLE);
y += FONT_HEIGHT_NORMAL;
num = 0;
@@ -155,14 +155,14 @@ struct SubsidyListWindow : Window {
SetDParam(4, _date - ymd.day + 768 - s->age * 32);
/* Displays the two connected stations */
- DrawString(x + 2, right - 2, y, STR_SUBSIDIES_SUBSIDISED_FROM_TO, TC_FROMSTRING);
+ DrawString(x + 2, right - 2, y, STR_SUBSIDIES_SUBSIDISED_FROM_TO);
y += FONT_HEIGHT_NORMAL;
num++;
}
}
- if (num == 0) DrawString(x + 2, right - 2, y, STR_SUBSIDIES_NONE, TC_FROMSTRING);
+ if (num == 0) DrawString(x + 2, right - 2, y, STR_SUBSIDIES_NONE);
}
};
diff --git a/src/town_gui.cpp b/src/town_gui.cpp
index 7eea11e62..dab990824 100644
--- a/src/town_gui.cpp
+++ b/src/town_gui.cpp
@@ -124,7 +124,7 @@ public:
int y = this->widget[TWA_RATING_INFO].top + 1;
- DrawString(this->widget[TWA_RATING_INFO].left + 2, this->widget[TWA_RATING_INFO].right - 2, y, STR_LOCAL_AUTHORITY_COMPANY_RATINGS, TC_FROMSTRING);
+ DrawString(this->widget[TWA_RATING_INFO].left + 2, this->widget[TWA_RATING_INFO].right - 2, y, STR_LOCAL_AUTHORITY_COMPANY_RATINGS);
y += 10;
/* Draw list of companies */
@@ -152,7 +152,7 @@ public:
DrawSprite(SPR_BLOT, PALETTE_TO_RED, 18, y);
}
- DrawString(this->widget[TWA_RATING_INFO].left + 28, this->widget[TWA_RATING_INFO].right - 2, y, STR_LOCAL_AUTHORITY_COMPANY_RATING, TC_FROMSTRING);
+ DrawString(this->widget[TWA_RATING_INFO].left + 28, this->widget[TWA_RATING_INFO].right - 2, y, STR_LOCAL_AUTHORITY_COMPANY_RATING);
y += 10;
}
}
@@ -168,7 +168,7 @@ public:
int pos = this->vscroll.pos;
if (--pos < 0) {
- DrawString(this->widget[TWA_COMMAND_LIST].left + 2, this->widget[TWA_COMMAND_LIST].right - 2, y, STR_LOCAL_AUTHORITY_ACTIONS_TITLE, TC_FROMSTRING);
+ DrawString(this->widget[TWA_COMMAND_LIST].left + 2, this->widget[TWA_COMMAND_LIST].right - 2, y, STR_LOCAL_AUTHORITY_ACTIONS_TITLE);
y += 10;
}
@@ -302,15 +302,15 @@ public:
SetDParam(0, this->town->population);
SetDParam(1, this->town->num_houses);
- DrawString(2, this->width - 2, y, STR_TOWN_VIEW_POPULATION_HOUSES, TC_FROMSTRING);
+ DrawString(2, this->width - 2, y, STR_TOWN_VIEW_POPULATION_HOUSES);
SetDParam(0, this->town->act_pass);
SetDParam(1, this->town->max_pass);
- DrawString(2, this->width - 2, y += 10, STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX, TC_FROMSTRING);
+ DrawString(2, this->width - 2, y += 10, STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX);
SetDParam(0, this->town->act_mail);
SetDParam(1, this->town->max_mail);
- DrawString(2, this->width - 2, y += 10, STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX, TC_FROMSTRING);
+ DrawString(2, this->width - 2, y += 10, STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX);
uint cargo_needed_for_growth = 0;
switch (_settings_game.game_creation.landscape) {
@@ -326,7 +326,7 @@ public:
}
if (cargo_needed_for_growth > 0) {
- DrawString(2, this->width - 2, y += 10, STR_CARGO_FOR_TOWNGROWTH, TC_FROMSTRING);
+ DrawString(2, this->width - 2, y += 10, STR_CARGO_FOR_TOWNGROWTH);
CargoID first_food_cargo = CT_INVALID;
StringID food_name = STR_CARGO_PLURAL_FOOD;
@@ -347,20 +347,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(2, this->width - 2, y += 10, STR_CARGO_FOR_TOWNGROWTH_LAST_MONTH, TC_FROMSTRING);
+ DrawString(2, this->width - 2, y += 10, STR_CARGO_FOR_TOWNGROWTH_LAST_MONTH);
} else {
SetDParam(0, food_name);
- DrawString(2, this->width - 2, y += 10, STR_CARGO_FOR_TOWNGROWTH_REQUIRED, TC_FROMSTRING);
+ DrawString(2, this->width - 2, y += 10, STR_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(2, this->width - 2, y += 10, STR_CARGO_FOR_TOWNGROWTH_LAST_MONTH, TC_FROMSTRING);
+ DrawString(2, this->width - 2, y += 10, STR_CARGO_FOR_TOWNGROWTH_LAST_MONTH);
} else {
SetDParam(0, water_name);
- DrawString(2, this->width - 2, y += 10, STR_CARGO_FOR_TOWNGROWTH_REQUIRED, TC_FROMSTRING);
+ DrawString(2, this->width - 2, y += 10, STR_CARGO_FOR_TOWNGROWTH_REQUIRED);
}
}
}
@@ -371,7 +371,7 @@ public:
if (_settings_game.economy.station_noise_level) {
SetDParam(0, this->town->noise_reached);
SetDParam(1, this->town->MaxTownNoise());
- DrawString(2, this->width - 2, y += 10, STR_NOISE_IN_TOWN, TC_FROMSTRING);
+ DrawString(2, this->width - 2, y += 10, STR_NOISE_IN_TOWN);
}
}
@@ -639,7 +639,7 @@ public:
SetDParam(0, t->index);
SetDParam(1, t->population);
- DrawString(2, this->width - 2, y, STR_TOWN_DIRECTORY_TOWN, TC_FROMSTRING);
+ DrawString(2, this->width - 2, y, STR_TOWN_DIRECTORY_TOWN);
y += 10;
i++;
@@ -647,7 +647,7 @@ public:
}
SetDParam(0, GetWorldPopulation());
- DrawString(3, this->width - 3, this->height - 12 + 2, STR_TOWN_POPULATION, TC_FROMSTRING);
+ DrawString(3, this->width - 3, this->height - 12 + 2, STR_TOWN_POPULATION);
}
}
diff --git a/src/train_gui.cpp b/src/train_gui.cpp
index a99a49c10..717bee165 100644
--- a/src/train_gui.cpp
+++ b/src/train_gui.cpp
@@ -130,7 +130,7 @@ static void TrainDetailsCargoTab(const Vehicle *v, int left, int right, int y)
SetDParam(3, _settings_game.vehicle.freight_trains);
str = FreightWagonMult(v->cargo_type) > 1 ? STR_VEHICLE_DETAILS_CARGO_FROM_MULT : STR_VEHICLE_DETAILS_CARGO_FROM;
}
- DrawString(left, right, y, str, TC_FROMSTRING);
+ DrawString(left, right, y, str);
}
}
@@ -171,7 +171,7 @@ static void TrainDetailsCapacityTab(const Vehicle *v, int left, int right, int y
SetDParam(1, v->cargo_cap);
SetDParam(4, GetCargoSubtypeText(v));
SetDParam(5, _settings_game.vehicle.freight_trains);
- DrawString(left, right, y, FreightWagonMult(v->cargo_type) > 1 ? STR_VEHICLE_INFO_CAPACITY_MULT : STR_VEHICLE_INFO_CAPACITY, TC_FROMSTRING);
+ DrawString(left, right, y, FreightWagonMult(v->cargo_type) > 1 ? STR_VEHICLE_INFO_CAPACITY_MULT : STR_VEHICLE_INFO_CAPACITY);
}
}
@@ -271,7 +271,7 @@ void DrawTrainDetails(const Vehicle *v, int left, int right, int y, int vscroll_
}
/* draw total cargo tab */
- DrawString(left, right, y + 2, STR_TOTAL_CAPACITY_TEXT, TC_FROMSTRING);
+ DrawString(left, right, y + 2, STR_TOTAL_CAPACITY_TEXT);
for (CargoID i = 0; i < NUM_CARGO; i++) {
if (max_cargo[i] > 0 && --vscroll_pos < 0 && vscroll_pos > -vscroll_cap) {
y += 14;
@@ -280,10 +280,10 @@ void DrawTrainDetails(const Vehicle *v, int left, int right, int y, int vscroll_
SetDParam(2, i); // {SHORTCARGO} #1
SetDParam(3, max_cargo[i]); // {SHORTCARGO} #2
SetDParam(4, _settings_game.vehicle.freight_trains);
- DrawString(left, right, y + 2, FreightWagonMult(i) > 1 ? STR_TOTAL_CAPACITY_MULT : STR_TOTAL_CAPACITY, TC_FROMSTRING);
+ DrawString(left, right, y + 2, FreightWagonMult(i) > 1 ? STR_TOTAL_CAPACITY_MULT : STR_TOTAL_CAPACITY);
}
}
SetDParam(0, feeder_share);
- DrawString(left, right, y + 15, STR_FEEDER_CARGO_VALUE, TC_FROMSTRING);
+ DrawString(left, right, y + 15, STR_FEEDER_CARGO_VALUE);
}
}
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index a9cceb76d..d1f97078e 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -364,7 +364,7 @@ struct RefitWindow : public Window {
SetDParam(0, this->cargo->cargo);
SetDParam(1, _returned_refit_capacity);
SetDParam(2, cost.GetCost());
- DrawStringMultiLine(2, this->width - 2, this->widget[VRW_INFOPANEL].top + 1, this->widget[VRW_INFOPANEL].bottom, STR_REFIT_NEW_CAPACITY_COST_OF_REFIT, TC_FROMSTRING);
+ DrawStringMultiLine(2, this->width - 2, this->widget[VRW_INFOPANEL].top + 1, this->widget[VRW_INFOPANEL].bottom, STR_REFIT_NEW_CAPACITY_COST_OF_REFIT);
}
}
}
@@ -799,7 +799,7 @@ static void DrawSmallOrderList(const Vehicle *v, int left, int right, int y)
if (v->type == VEH_SHIP && GetStation(order->GetDestination())->IsBuoy()) continue;
SetDParam(0, order->GetDestination());
- DrawString(left, right, y, STR_ORDER_STATION_SMALL, TC_FROMSTRING);
+ DrawString(left, right, y, STR_ORDER_STATION_SMALL);
y += 6;
if (++i == 4) break;
@@ -835,12 +835,12 @@ void BaseVehicleListWindow::DrawVehicleListItems(int x, VehicleID selected_vehic
SetDParam(1, v->GetDisplayProfitLastYear());
DrawVehicleImage(v, x + 19, y + 6, selected_vehicle, this->widget[VLW_WIDGET_LIST].right - this->widget[VLW_WIDGET_LIST].left - 20, 0);
- DrawString(x + 19, this->widget[VLW_WIDGET_LIST].right, y + this->resize.step_height - 8, STR_VEHICLE_LIST_PROFIT_THIS_YEAR_LAST_YEAR, TC_FROMSTRING);
+ DrawString(x + 19, this->widget[VLW_WIDGET_LIST].right, y + this->resize.step_height - 8, STR_VEHICLE_LIST_PROFIT_THIS_YEAR_LAST_YEAR);
if (v->name != NULL) {
/* The vehicle got a name so we will print it */
SetDParam(0, v->index);
- DrawString(x + 19, this->widget[VLW_WIDGET_LIST].right, y, STR_VEHICLE_NAME_SMALL, TC_FROMSTRING);
+ DrawString(x + 19, this->widget[VLW_WIDGET_LIST].right, y, STR_VEHICLE_NAME_SMALL);
} else if (v->group_id != DEFAULT_GROUP) {
/* The vehicle has no name, but is member of a group, so print group name */
SetDParam(0, v->group_id);
@@ -856,7 +856,7 @@ void BaseVehicleListWindow::DrawVehicleListItems(int x, VehicleID selected_vehic
}
SetDParam(0, v->unitnumber);
- DrawString(x, this->widget[VLW_WIDGET_LIST].right, y + 2, str, TC_FROMSTRING);
+ DrawString(x, this->widget[VLW_WIDGET_LIST].right, y + 2, str);
DrawVehicleProfitButton(v, x, y + 13);
@@ -1473,7 +1473,7 @@ struct VehicleDetailsWindow : Window {
SetDParam(0, (v->age + DAYS_IN_YEAR < v->max_age) ? STR_AGE : STR_AGE_RED);
SetDParam(2, v->max_age / DAYS_IN_LEAP_YEAR);
SetDParam(3, v->GetDisplayRunningCost());
- DrawString(2, this->width - 2, 15, STR_VEHICLE_INFO_AGE_RUNNING_COST_YR, TC_FROMSTRING);
+ DrawString(2, this->width - 2, 15, STR_VEHICLE_INFO_AGE_RUNNING_COST_YR);
/* Draw max speed */
switch (v->type) {
@@ -1484,14 +1484,14 @@ struct VehicleDetailsWindow : Window {
SetDParam(3, v->u.rail.cached_max_te / 1000);
DrawString(2, this->width - 2, 25, (_settings_game.vehicle.train_acceleration_model != TAM_ORIGINAL && v->u.rail.railtype != RAILTYPE_MAGLEV) ?
STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE :
- STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED, TC_FROMSTRING);
+ STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED);
break;
case VEH_ROAD:
case VEH_SHIP:
case VEH_AIRCRAFT:
SetDParam(0, v->GetDisplayMaxSpeed());
- DrawString(2, this->width - 2, 25, STR_VEHICLE_INFO_MAX_SPEED, TC_FROMSTRING);
+ DrawString(2, this->width - 2, 25, STR_VEHICLE_INFO_MAX_SPEED);
break;
default: NOT_REACHED();
@@ -1500,17 +1500,17 @@ struct VehicleDetailsWindow : Window {
/* Draw profit */
SetDParam(0, v->GetDisplayProfitThisYear());
SetDParam(1, v->GetDisplayProfitLastYear());
- DrawString(2, this->width - 2, 35, STR_VEHICLE_INFO_PROFIT_THIS_YEAR_LAST_YEAR, TC_FROMSTRING);
+ DrawString(2, this->width - 2, 35, STR_VEHICLE_INFO_PROFIT_THIS_YEAR_LAST_YEAR);
/* Draw breakdown & reliability */
SetDParam(0, v->reliability * 100 >> 16);
SetDParam(1, v->breakdowns_since_last_service);
- DrawString(2, this->width - 2, 45, STR_VEHICLE_INFO_RELIABILITY_BREAKDOWNS, TC_FROMSTRING);
+ DrawString(2, this->width - 2, 45, STR_VEHICLE_INFO_RELIABILITY_BREAKDOWNS);
/* Draw service interval text */
SetDParam(0, v->service_interval);
SetDParam(1, v->date_of_last_service);
- DrawString(13, this->width - 2, this->height - (v->type != VEH_TRAIN ? 11 : 23), _settings_game.vehicle.servint_ispercent ? STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT : STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS, TC_FROMSTRING);
+ DrawString(13, this->width - 2, this->height - (v->type != VEH_TRAIN ? 11 : 23), _settings_game.vehicle.servint_ispercent ? STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT : STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS);
switch (v->type) {
case VEH_TRAIN:
diff --git a/src/widget.cpp b/src/widget.cpp
index ed11aaf57..a861a0d44 100644
--- a/src/widget.cpp
+++ b/src/widget.cpp
@@ -267,7 +267,7 @@ void Window::DrawWidgets() const
const StringID str = wi->data;
DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->colour, FR_LOWERED | FR_DARKENED);
- if (str != STR_NULL) DrawString(r.left + 2, r.right - 2, r.top + 1, str, TC_FROMSTRING);
+ if (str != STR_NULL) DrawString(r.left + 2, r.right - 2, r.top + 1, str);
break;
}
@@ -411,7 +411,7 @@ void Window::DrawWidgets() const
const StringID str = wi->data;
int x2 = r.left; // by default the left side is the left side of the widget
- if (str != STR_NULL) x2 = DrawString(r.left + 6, r.right - 6, r.top, str, TC_FROMSTRING);
+ if (str != STR_NULL) x2 = DrawString(r.left + 6, r.right - 6, r.top, str);
int c1 = _colour_gradient[wi->colour][3];
int c2 = _colour_gradient[wi->colour][7];