From 7cafdf3b0bc441586929be57ace0e9510f454381 Mon Sep 17 00:00:00 2001 From: truelight Date: Sat, 15 Jan 2005 19:06:22 +0000 Subject: (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! --- aircraft_gui.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'aircraft_gui.c') 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; } -- cgit v1.2.3-70-g09d2