diff options
author | peter1138 <peter1138@openttd.org> | 2007-02-20 22:09:21 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2007-02-20 22:09:21 +0000 |
commit | ef2daa5060e251834e82df1ba3e081579ff84f2f (patch) | |
tree | 9caff20858ac3f06265e4f69d54b9cdb03a47004 /src/misc_gui.cpp | |
parent | 6621beb126c4bf1481b9d7826f3efd10c2bb8308 (diff) | |
download | openttd-ef2daa5060e251834e82df1ba3e081579ff84f2f.tar.xz |
(svn r8826) -Codechange: Replace _cargoc's separate arrays with a regular struct array (with accessor) and implement new initialization method using cargo labels.
Diffstat (limited to 'src/misc_gui.cpp')
-rw-r--r-- | src/misc_gui.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index c3f4dbf86..ccf6734b6 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -30,6 +30,7 @@ #include "tgp.h" #include "settings.h" #include "date.h" +#include "cargotype.h" #include "fios.h" /* Variables to display file lists */ @@ -153,10 +154,10 @@ static void Place_LandInfo(TileIndex tile) /* If the accepted value is less than 8, show it in 1/8:ths */ if (ac[i] < 8) { SetDParam(0, ac[i]); - SetDParam(1, _cargoc.names_s[i]); + SetDParam(1, GetCargo(i)->name); p = GetString(p, STR_01D1_8, lastof(_landinfo_data[5])); } else { - p = GetString(p, _cargoc.names_s[i], lastof(_landinfo_data[5])); + p = GetString(p, GetCargo(i)->name, lastof(_landinfo_data[5])); } } } @@ -740,7 +741,7 @@ static void DrawStationCoverageText(const AcceptedCargo accepts, *b++ = ','; *b++ = ' '; } - b = InlineString(b, _cargoc.names_s[i]); + b = InlineString(b, GetCargo(i)->name); } } |