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/vehicle_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/vehicle_gui.cpp')
-rw-r--r-- | src/vehicle_gui.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 76fa24b50..6c92677d1 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -28,6 +28,7 @@ #include "roadveh.h" #include "depot.h" #include "helpers.hpp" +#include "cargotype.h" typedef struct Sorting { Listing aircraft; @@ -304,7 +305,7 @@ static RefitOption *DrawVehicleRefitWindow(const RefitList *list, int sel, uint if (i >= pos && i < pos + rows) { /* Draw the cargo name */ - int last_x = DrawString(2, y, _cargoc.names_s[refit[i].cargo], colour); + int last_x = DrawString(2, y, GetCargo(refit[i].cargo)->name, colour); /* If the callback succeeded, draw the cargo suffix */ if (refit[i].value != CALLBACK_FAILED) { @@ -521,7 +522,7 @@ uint ShowRefitOptionsList(int x, int y, uint w, EngineID engine) for (cid = 0; cmask != 0; cmask >>= 1, cid++) { if (!HASBIT(cmask, 0)) continue; - b = InlineString(b, _cargoc.names_s[_local_cargo_id_ctype[cid]]); + b = InlineString(b, GetCargo(_local_cargo_id_ctype[cid])->name); if (cmask > 1) b = strecpy(b, ", ", lastof(_userstring)); } } |