summaryrefslogtreecommitdiff
path: root/vehicle_gui.h
diff options
context:
space:
mode:
authormatthijs <matthijs@openttd.org>2005-05-02 23:59:11 +0000
committermatthijs <matthijs@openttd.org>2005-05-02 23:59:11 +0000
commit6eb094c72622b39bceff8293c3446e57d21c62f0 (patch)
treecad8daa1ee5542d4e8fefcbf2e2825e3f35fdb47 /vehicle_gui.h
parent2ab5eee78b495ec73049c8446a0ed37ab4ff0920 (diff)
downloadopenttd-6eb094c72622b39bceff8293c3446e57d21c62f0.tar.xz
(svn r2256) - Fix: Trains cannot find a depot when they are in a tunnel. (glx)
- Add: GetVehicleTrackdir() helper function. - Codechange: Moved SortStruct from vehicle_gui.h to ttd.h, so the dependency from vehicle.h on vehicle_gui.h could be removed. - Codechange: Typedeffed the VehicleTypes struct so it can be used as the type for Vehicle.type instead of "byte". - Codechange: Removed prototype for VehicleSorter(), which had no implementation anymore and was never called.
Diffstat (limited to 'vehicle_gui.h')
-rw-r--r--vehicle_gui.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/vehicle_gui.h b/vehicle_gui.h
index 487653b88..efbd458fd 100644
--- a/vehicle_gui.h
+++ b/vehicle_gui.h
@@ -1,6 +1,8 @@
#ifndef VEHICLE_GUI_H
#define VEHICLE_GUI_H
+#include "vehicle.h"
+
struct vehiclelist_d;
void DrawVehicleProfitButton(Vehicle *v, int x, int y);
@@ -10,16 +12,10 @@ void InitializeVehiclesGuiList(void);
void RebuildVehicleLists(void);
void ResortVehicleLists(void);
-void BuildVehicleList(struct vehiclelist_d *vl, int type, int owner, int station);
+void BuildVehicleList(struct vehiclelist_d *vl, VehicleType type, int owner, int station);
void SortVehicleList(struct vehiclelist_d *vl);
-typedef struct SortStruct { // store owner through sorting process
- uint32 index;
- byte owner;
-} SortStruct;
-
int CDECL GeneralOwnerSorter(const void *a, const void *b);
-void VehicleSorter(SortStruct *firstelement, uint32 n, uint16 size);
VARDEF uint32 _internal_name_sorter_id; // internal StringID for default vehicle-names
VARDEF uint32 _last_vehicle_idx; // cached index to hopefully speed up name-sorting
VARDEF bool _internal_sort_order; // descending/ascending