summaryrefslogtreecommitdiff
path: root/vehicle.h
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2006-09-24 15:01:02 +0000
committerbjarni <bjarni@openttd.org>2006-09-24 15:01:02 +0000
commit8f4a4a81da0e11db1cf1947d393eb12344edfbc9 (patch)
tree680aa98cd17642b6eb9f646e79fac71932347f3c /vehicle.h
parent1c56a5ae0fefac5636a7f93c3bed9285fca558d8 (diff)
downloadopenttd-8f4a4a81da0e11db1cf1947d393eb12344edfbc9.tar.xz
(svn r6503) -Codechange: added a function to tell what vehicles a depot contains
This will ensure that you can always get the same list when checking for vehicles in a depot (no need to duplicate code for each place, that needs such a list) Since the vehicles are only looped once for each redraw, drawing speed is around twice as fast (measured to be 114%-121% faster depending on the number of vehicles in the game)
Diffstat (limited to 'vehicle.h')
-rw-r--r--vehicle.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/vehicle.h b/vehicle.h
index 2efd39b04..67961c468 100644
--- a/vehicle.h
+++ b/vehicle.h
@@ -317,6 +317,7 @@ int CheckTrainStoppedInDepot(const Vehicle *v);
bool VehicleNeedsService(const Vehicle *v);
uint GenerateVehicleSortList(const Vehicle** sort_list, byte type, PlayerID owner, StationID station, OrderID order, uint16 window_type);
+void BuildDepotVehicleList(byte type, TileIndex tile, Vehicle ***engine_list, uint16 *engine_list_length, uint16 *engine_count, Vehicle ***wagon_list, uint16 *wagon_list_length, uint16 *wagon_count);
int32 SendAllVehiclesToDepot(byte type, uint32 flags, bool service, PlayerID owner, uint16 vlw_flag, uint32 id);
/* Flags to add to p2 for goto depot commands */