1
0
Fork 0

(svn r2267) - Codechange: Reverted the typedeffing of VehicleType (r2256), since that interfered with the saveload code.

release/0.4.5
matthijs 2005-05-04 22:13:07 +00:00
parent b12c6bac57
commit c85f049f52
3 changed files with 5 additions and 5 deletions

View File

@ -4,14 +4,14 @@
#include "pool.h" #include "pool.h"
#include "order.h" #include "order.h"
typedef enum VehicleTypes{ enum {
VEH_Train = 0x10, VEH_Train = 0x10,
VEH_Road = 0x11, VEH_Road = 0x11,
VEH_Ship = 0x12, VEH_Ship = 0x12,
VEH_Aircraft = 0x13, VEH_Aircraft = 0x13,
VEH_Special = 0x14, VEH_Special = 0x14,
VEH_Disaster = 0x15, VEH_Disaster = 0x15,
} VehicleType; } ;
enum VehStatus { enum VehStatus {
VS_HIDDEN = 1, VS_HIDDEN = 1,
@ -131,7 +131,7 @@ struct WorldSprite {
}; };
struct Vehicle { 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) byte subtype; // subtype (Filled with values from EffectVehicles or TrainSubTypes)(Filled with values from EffectVehicles or TrainSubTypes)
uint16 index; // NOSAVE: Index in vehicle array uint16 index; // NOSAVE: Index in vehicle array

View File

@ -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 subtype = (type != VEH_Aircraft) ? TS_Front_Engine : 2;
int n = 0; int n = 0;

View File

@ -12,7 +12,7 @@ void InitializeVehiclesGuiList(void);
void RebuildVehicleLists(void); void RebuildVehicleLists(void);
void ResortVehicleLists(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); void SortVehicleList(struct vehiclelist_d *vl);
int CDECL GeneralOwnerSorter(const void *a, const void *b); int CDECL GeneralOwnerSorter(const void *a, const void *b);