From 64f6839816221873b9a5327fe038533a7d3b8a98 Mon Sep 17 00:00:00 2001 From: ludde Date: Sat, 16 Jul 2005 20:58:04 +0000 Subject: (svn r2594) Fix: [strgen] Misc updates to the string system. - Renamed the plural command to "P" instead of "PLURAL". Now write something like this to append an s on plural: {P "" s}. (You can optionally still add an argument index to explicitly specifiy which number that's used) - Removed the pluralized cargo strings from the string files. The new method is to use the plural specifier {P} - Added support for genders. First add "##gender der das die" on top, then use {G=der} on a cargoname/industry to set the gender, and to switch between genders do something like {G neu neu neue} {STRING} - Updated the swedish/english translation with P strings. --- industry_gui.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'industry_gui.c') diff --git a/industry_gui.c b/industry_gui.c index 6c98343fc..7a8743807 100644 --- a/industry_gui.c +++ b/industry_gui.c @@ -301,8 +301,8 @@ static void IndustryViewWndProc(Window *w, WindowEvent *e) if (i->produced_cargo[0] != CT_INVALID) { DrawString(2, 117, STR_482A_PRODUCTION_LAST_MONTH, 0); + SetDParam(0, _cargoc.names_long[i->produced_cargo[0]]); SetDParam(1, i->total_production[0]); - SetDParam(0, _cargoc.names_long_s[i->produced_cargo[0]] + ((i->total_production[0]!=1)<<5)); SetDParam(2, i->pct_transported[0] * 100 >> 8); DrawString(4 + (NEED_ALTERB ? 30 : 0), 127, STR_482B_TRANSPORTED, 0); @@ -311,8 +311,8 @@ static void IndustryViewWndProc(Window *w, WindowEvent *e) DrawArrowButtons(5, 127, (WP(w,vp2_d).data_2 == 1 ? WP(w,vp2_d).data_3 : 0)); if (i->produced_cargo[1] != CT_INVALID) { + SetDParam(0, _cargoc.names_long[i->produced_cargo[1]]); SetDParam(1, i->total_production[1]); - SetDParam(0, _cargoc.names_long_s[i->produced_cargo[1]] + ((i->total_production[1]!=1)<<5)); SetDParam(2, i->pct_transported[1] * 100 >> 8); DrawString(4 + (NEED_ALTERB ? 30 : 0), 137, STR_482B_TRANSPORTED, 0); // Let's put out those buttons.. @@ -586,12 +586,12 @@ static void IndustryDirectoryWndProc(Window *w, WindowEvent *e) i = GetIndustry(_industry_sort[p]); SetDParam(0, i->index); if (i->produced_cargo[0] != 0xFF) { + SetDParam(1, _cargoc.names_long[i->produced_cargo[0]]); SetDParam(2, i->total_production[0]); - SetDParam(1, _cargoc.names_long_s[i->produced_cargo[0]] + ((i->total_production[0]!=1)<<5)); if (i->produced_cargo[1] != 0xFF) { + SetDParam(3, _cargoc.names_long[i->produced_cargo[1]]); SetDParam(4, i->total_production[1]); - SetDParam(3, _cargoc.names_long_s[i->produced_cargo[1]] + ((i->total_production[1]!=1)<<5)); SetDParam(5, i->pct_transported[0] * 100 >> 8); SetDParam(6, i->pct_transported[1] * 100 >> 8); DrawString(4, 28+n*10, STR_INDUSTRYDIR_ITEM_TWO, 0); -- cgit v1.2.3-70-g09d2