Make DeleteStaleLinks static
[openttd/fttd.git] / src / order_func.h
blob4813b128a6ab095b91201e5bc1638919144fef25
1 /* $Id$ */
3 /*
4 * This file is part of OpenTTD.
5 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8 */
10 /** @file order_func.h Functions related to orders. */
12 #ifndef ORDER_FUNC_H
13 #define ORDER_FUNC_H
15 #include "order_type.h"
16 #include "vehicle_type.h"
17 #include "company_type.h"
18 #include "gfx_func.h"
20 /* Functions */
21 void RemoveOrderFromAllVehicles(OrderType type, DestinationID destination);
22 void InvalidateVehicleOrder(const Vehicle *v, int data);
23 void CheckOrders(const Vehicle*);
24 void DeleteVehicleOrders(Vehicle *v, bool keep_orderlist = false, bool reset_order_indices = true);
25 bool ProcessOrders(Vehicle *v);
26 bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth = 0, bool pbs_look_ahead = false);
27 VehicleOrderID ProcessConditionalOrder(const Order *order, const Vehicle *v);
28 uint GetOrderDistance(const Order *prev, const Order *cur, const Vehicle *v, int conditional_depth = 0);
30 void DrawOrderString (const Vehicle *v, const Order *order, int order_index,
31 BlitArea *dpi, int y, bool selected, bool timetable,
32 int left, int middle, int right);
34 #define MIN_SERVINT_PERCENT 5
35 #define MAX_SERVINT_PERCENT 90
36 #define MIN_SERVINT_DAYS 30
37 #define MAX_SERVINT_DAYS 800
39 uint16 GetServiceIntervalClamped(uint interval, bool ispercent);
41 #endif /* ORDER_FUNC_H */