(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!
This commit is contained in:
truelight
2005-01-15 19:06:22 +00:00
parent 732c362dea
commit d275109e79
22 changed files with 1280 additions and 856 deletions

View File

@@ -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;
}