diff options
author | ludde <ludde@openttd.org> | 2005-07-15 18:30:13 +0000 |
---|---|---|
committer | ludde <ludde@openttd.org> | 2005-07-15 18:30:13 +0000 |
commit | dc3ca73bd5f514c8eb8c05a0e05d149586dd5c6b (patch) | |
tree | 77cbbb71361c4ceb1306dc06c65b6364221d6c2f /station_gui.c | |
parent | 843670cfdfed91a4f3b64c7e37781ab5a5cb5f6f (diff) | |
download | openttd-dc3ca73bd5f514c8eb8c05a0e05d149586dd5c6b.tar.xz |
(svn r2580) Change: Added {INDUSTRY} command for printing industry names instead of the old {TOWN} {STRING} way.
- The formatting of the industry name can be controlled with the string STR_INDUSTRY_FORMAT.
Change: Changed several occurences of {STRING1} into {TOWN} to get rid of townnametype being used directly.
Diffstat (limited to 'station_gui.c')
-rw-r--r-- | station_gui.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/station_gui.c b/station_gui.c index a17f3a095..50c4c7e3e 100644 --- a/station_gui.c +++ b/station_gui.c @@ -55,21 +55,17 @@ static uint16 _last_station_idx; static int CDECL StationNameSorter(const void *a, const void *b) { char buf1[64]; - Station *st; + int32 argv[1]; const SortStruct *cmp1 = (const SortStruct*)a; const SortStruct *cmp2 = (const SortStruct*)b; - st = GetStation(cmp1->index); - SetDParam(0, st->town->townnametype); - SetDParam(1, st->town->townnameparts); - GetString(buf1, st->string_id); + argv[0] = cmp1->index; + GetStringWithArgs(buf1, STR_STATION, argv); if ( cmp2->index != _last_station_idx) { _last_station_idx = cmp2->index; - st = GetStation(cmp2->index); - SetDParam(0, st->town->townnametype); - SetDParam(1, st->town->townnameparts); - GetString(_bufcache, st->string_id); + argv[0] = cmp2->index; + GetStringWithArgs(_bufcache, STR_STATION, argv); } return strcmp(buf1, _bufcache); // sort by name @@ -466,10 +462,8 @@ static void StationViewWndProc(Window *w, WindowEvent *e) break; case 9: { - Station *st = GetStation(w->window_number); - SetDParam(0, st->town->townnametype); - SetDParam(1, st->town->townnameparts); - ShowQueryString(st->string_id, STR_3030_RENAME_STATION_LOADING, 31, 180, w->window_class, w->window_number); + SetDParam(0, w->window_number); + ShowQueryString(STR_STATION, STR_3030_RENAME_STATION_LOADING, 31, 180, w->window_class, w->window_number); } break; case 10: { /* Show a list of scheduled trains to this station */ |