diff options
author | truelight <truelight@openttd.org> | 2005-01-15 19:06:22 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2005-01-15 19:06:22 +0000 |
commit | d275109e79c191dde34b71f07e5a39cfeb11fba7 (patch) | |
tree | 86e7a6e69dee1414ae1e88cfceffd93f1b28ded2 /aircraft_gui.c | |
parent | 732c362deaaa9b6a817a2e82c45d88e33f8f1e90 (diff) | |
download | openttd-d275109e79c191dde34b71f07e5a39cfeb11fba7.tar.xz |
(svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic.
-Codechange: renamed all 'schedule' stuff to 'order(list)'
-Codechange: moved all order-stuff to order_cmd.c / order.h
-Codechange: vehicles that share orders are now linked to eachother
with next_shared/prev_shared in Vehicle
Developers: please use AssignOrder to assign data to an order. If not,
you _WILL_ make the save-routine to assert!
Diffstat (limited to 'aircraft_gui.c')
-rw-r--r-- | aircraft_gui.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/aircraft_gui.c b/aircraft_gui.c index a2f6fd79c..31a081f27 100644 --- a/aircraft_gui.c +++ b/aircraft_gui.c @@ -920,16 +920,13 @@ void ShowAircraftDepotWindow(uint tile) } } -static void DrawSmallSchedule(Vehicle *v, int x, int y) { - const Order *sched; - int sel; - Order ord; - int i = 0; +static void DrawSmallOrderList(Vehicle *v, int x, int y) { + const Order *order; + int sel, i = 0; - sched = v->schedule_ptr; sel = v->cur_order_index; - while ((ord = *sched++).type != OT_NOTHING) { + FOR_VEHICLE_ORDERS(v, order) { if (sel == 0) { _stringwidth_base = 0xE0; DoDrawString( "\xAF", x-6, y, 16); @@ -937,8 +934,8 @@ static void DrawSmallSchedule(Vehicle *v, int x, int y) { } sel--; - if (ord.type == OT_GOTO_STATION) { - SetDParam(0, ord.station); + if (order->type == OT_GOTO_STATION) { + SetDParam(0, order->station); DrawString(x, y, STR_A036, 0); y += 6; @@ -1052,7 +1049,7 @@ static void PlayerAircraftWndProc(Window *w, WindowEvent *e) DrawString(x + 19, y, STR_01AB, 0); } - DrawSmallSchedule(v, x + 136, y); + DrawSmallOrderList(v, x + 136, y); y += PLY_WND_PRC__SIZE_OF_ROW_BIG; } |