# order_func.h

Go to the documentation of this file.

    00001 /* $Id$ */
    00002
    00003 /*
    00004  * This file is part of OpenTTD.
    00005  * 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.
    00006  * 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.
    00007  * 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/>.
    00008  */
    00009
    00012 #ifndef ORDER_FUNC_H
    00013 #define ORDER_FUNC_H
    00014
    00015 #include "order_type.h"
    00016 #include "vehicle_type.h"
    00017 #include "company_type.h"
    00018
    00019 /* Functions */
    00020 void RemoveOrderFromAllVehicles(OrderType type, DestinationID destination);
    00021 void InvalidateVehicleOrder(const Vehicle *v, int data);
    00022 void CheckOrders(const Vehicle*);
    00023 void DeleteVehicleOrders(Vehicle *v, bool keep_orderlist = false, bool reset_order_indices = true);
    00024 bool ProcessOrders(Vehicle *v);
    00025 bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth = 0);
    00026 VehicleOrderID ProcessConditionalOrder(const Order *order, const Vehicle *v);
    00027
    00028 void DrawOrderString(const Vehicle *v, const Order *order, int order_index, int y, bool selected, bool timetable, int left, int middle, int right);
    00029
    00030 #define MIN_SERVINT_PERCENT  5
    00031 #define MAX_SERVINT_PERCENT 90
    00032 #define MIN_SERVINT_DAYS    30
    00033 #define MAX_SERVINT_DAYS   800
    00034
    00035 uint16 GetServiceIntervalClamped(uint interval, CompanyID company_id);
    00036
    00037 #endif /* ORDER_FUNC_H */