summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatthijs <matthijs@openttd.org>2005-05-04 22:13:07 +0000
committermatthijs <matthijs@openttd.org>2005-05-04 22:13:07 +0000
commitc85f049f521ca1c7f94fdbccae6657ab2af5451c (patch)
tree43ea8ec92553979bdf703de4fa2ea14523fd6022
parentb12c6bac5787b493b1c5a3a87556a39d921bc2f9 (diff)
downloadopenttd-c85f049f521ca1c7f94fdbccae6657ab2af5451c.tar.xz
(svn r2267) - Codechange: Reverted the typedeffing of VehicleType (r2256), since that interfered with the saveload code.
-rw-r--r--vehicle.h6
-rw-r--r--vehicle_gui.c2
-rw-r--r--vehicle_gui.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/vehicle.h b/vehicle.h
index a53b52932..4302364f2 100644
--- a/vehicle.h
+++ b/vehicle.h
@@ -4,14 +4,14 @@
#include "pool.h"
#include "order.h"
-typedef enum VehicleTypes{
+enum {
VEH_Train = 0x10,
VEH_Road = 0x11,
VEH_Ship = 0x12,
VEH_Aircraft = 0x13,
VEH_Special = 0x14,
VEH_Disaster = 0x15,
-} VehicleType;
+} ;
enum VehStatus {
VS_HIDDEN = 1,
@@ -131,7 +131,7 @@ struct WorldSprite {
};
struct Vehicle {
- VehicleType type; // type, ie roadven,train,ship,aircraft,special
+ byte type; // type, ie roadven,train,ship,aircraft,special
byte subtype; // subtype (Filled with values from EffectVehicles or TrainSubTypes)(Filled with values from EffectVehicles or TrainSubTypes)
uint16 index; // NOSAVE: Index in vehicle array
diff --git a/vehicle_gui.c b/vehicle_gui.c
index 4d6d07420..5832498e8 100644
--- a/vehicle_gui.c
+++ b/vehicle_gui.c
@@ -73,7 +73,7 @@ void ResortVehicleLists(void)
}
}
-void BuildVehicleList(vehiclelist_d *vl, VehicleType type, int owner, int station)
+void BuildVehicleList(vehiclelist_d *vl, int type, int owner, int station)
{
int subtype = (type != VEH_Aircraft) ? TS_Front_Engine : 2;
int n = 0;
diff --git a/vehicle_gui.h b/vehicle_gui.h
index efbd458fd..1af4e0aba 100644
--- a/vehicle_gui.h
+++ b/vehicle_gui.h
@@ -12,7 +12,7 @@ void InitializeVehiclesGuiList(void);
void RebuildVehicleLists(void);
void ResortVehicleLists(void);
-void BuildVehicleList(struct vehiclelist_d *vl, VehicleType type, int owner, int station);
+void BuildVehicleList(struct vehiclelist_d *vl, int type, int owner, int station);
void SortVehicleList(struct vehiclelist_d *vl);
int CDECL GeneralOwnerSorter(const void *a, const void *b);