190 |
189 |
191 if (i - w->vscroll.pos < w->vscroll.cap) { |
190 if (i - w->vscroll.pos < w->vscroll.cap) { |
192 SetDParam(1, 6); |
191 SetDParam(1, 6); |
193 |
192 |
194 switch (order->type) { |
193 switch (order->type) { |
|
194 case OT_DUMMY: |
|
195 SetDParam(1, STR_INVALID_ORDER); |
|
196 SetDParam(2, order->dest); |
|
197 break; |
|
198 |
195 case OT_GOTO_STATION: |
199 case OT_GOTO_STATION: |
196 SetDParam(1, StationOrderStrings[order->flags]); |
200 SetDParam(1, StationOrderStrings[order->flags]); |
197 SetDParam(2, order->dest); |
201 SetDParam(2, order->dest); |
198 break; |
202 break; |
199 |
203 |
232 break; |
236 break; |
233 |
237 |
234 default: break; |
238 default: break; |
235 } |
239 } |
236 |
240 |
237 color = (i == WP(w,order_d).sel) ? 0xC : 0x10; |
241 const byte colour = (i == WP(w,order_d).sel) ? 0xC : 0x10; |
238 SetDParam(0, i + 1); |
242 SetDParam(0, i + 1); |
239 if (order->type != OT_DUMMY) { |
243 DrawString(2, y, str, colour); |
240 DrawString(2, y, str, color); |
244 |
241 } else { |
|
242 SetDParam(1, STR_INVALID_ORDER); |
|
243 SetDParam(2, order->dest); |
|
244 DrawString(2, y, str, color); |
|
245 } |
|
246 y += 10; |
245 y += 10; |
247 } |
246 } |
248 |
247 |
249 i++; |
248 i++; |
250 order = order->next; |
249 order = order->next; |
251 } |
250 } |
252 |
251 |
253 if (i - w->vscroll.pos < w->vscroll.cap) { |
252 if (i - w->vscroll.pos < w->vscroll.cap) { |
254 str = shared_orders ? STR_END_OF_SHARED_ORDERS : STR_882A_END_OF_ORDERS; |
253 str = shared_orders ? STR_END_OF_SHARED_ORDERS : STR_882A_END_OF_ORDERS; |
255 color = (i == WP(w,order_d).sel) ? 0xC : 0x10; |
254 const byte colour = (i == WP(w,order_d).sel) ? 0xC : 0x10; |
256 DrawString(2, y, str, color); |
255 DrawString(2, y, str, colour); |
257 } |
256 } |
258 } |
257 } |
259 |
258 |
260 static Order GetOrderCmdFromTile(const Vehicle *v, TileIndex tile) |
259 static Order GetOrderCmdFromTile(const Vehicle *v, TileIndex tile) |
261 { |
260 { |