(svn r8455) -Codechange: Give a more meaningful name (railveh_type)to member flags of RailVehInfo, as well as changing the code to reflect the fact that it was not a flag but rather a one value only variable. Doing so, some evaluations have been simplified.
-Codechange: Add and use RAILVEH_SINGLEHEAD when railveh_type is set to 0, which was implicit before. -Cleanup: Remove some extraneous parenthesis.
This commit is contained in:
13
src/engine.h
13
src/engine.h
@@ -9,9 +9,15 @@
|
||||
#include "rail.h"
|
||||
#include "sound.h"
|
||||
|
||||
enum RailVehicleTypes {
|
||||
RAILVEH_SINGLEHEAD,
|
||||
RAILVEH_MULTIHEAD,
|
||||
RAILVEH_WAGON,
|
||||
};
|
||||
|
||||
typedef struct RailVehicleInfo {
|
||||
byte image_index;
|
||||
byte flags; /* 1=multihead engine, 2=wagon */
|
||||
RailVehicleTypes railveh_type;
|
||||
byte base_cost;
|
||||
RailTypeByte railtype;
|
||||
uint16 max_speed;
|
||||
@@ -117,11 +123,6 @@ enum {
|
||||
EF_RAIL_IS_MU = 2, ///< Rail vehicle is a multiple-unit (DMU/EMU)
|
||||
};
|
||||
|
||||
enum {
|
||||
RVI_MULTIHEAD = 1,
|
||||
RVI_WAGON = 2,
|
||||
};
|
||||
|
||||
enum {
|
||||
NUM_VEHICLE_TYPES = 6
|
||||
};
|
||||
|
Reference in New Issue
Block a user