(svn r26653) [1.4] -Backport from trunk:

- Fix: Incorrect usage of string commands in the base language [FS#6037] (r26642, r26640, r26639, r26632)
This commit is contained in:
frosch
2014-06-17 19:14:59 +00:00
committed by Sergii Pylypenko
parent b702e94d70
commit 4548230987
7 changed files with 29 additions and 46 deletions

View File

@@ -117,12 +117,10 @@ static int CDECL IndustryTypeNameSorter(const IndustryType *a, const IndustryTyp
static char industry_name[2][64];
const IndustrySpec *indsp1 = GetIndustrySpec(*a);
SetDParam(0, indsp1->name);
GetString(industry_name[0], STR_JUST_STRING, lastof(industry_name[0]));
GetString(industry_name[0], indsp1->name, lastof(industry_name[0]));
const IndustrySpec *indsp2 = GetIndustrySpec(*b);
SetDParam(0, indsp2->name);
GetString(industry_name[1], STR_JUST_STRING, lastof(industry_name[1]));
GetString(industry_name[1], indsp2->name, lastof(industry_name[1]));
int r = strnatcmp(industry_name[0], industry_name[1]); // Sort by name (natural sorting).
@@ -1689,8 +1687,7 @@ struct CargoesField {
ypos += (normal_height - FONT_HEIGHT_NORMAL) / 2;
if (this->u.industry.ind_type < NUM_INDUSTRYTYPES) {
const IndustrySpec *indsp = GetIndustrySpec(this->u.industry.ind_type);
SetDParam(0, indsp->name);
DrawString(xpos, xpos2, ypos, STR_JUST_STRING, TC_WHITE, SA_HOR_CENTER);
DrawString(xpos, xpos2, ypos, indsp->name, TC_WHITE, SA_HOR_CENTER);
/* Draw the industry legend. */
int blob_left, blob_right;