summaryrefslogtreecommitdiff
path: root/src/engine.h
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2007-01-30 11:53:35 +0000
committerbelugas <belugas@openttd.org>2007-01-30 11:53:35 +0000
commite8af755d7fc3b405f64b39cc4216b7fd4a7e9d23 (patch)
treed001f734f6111d6fe12abd4a122d09903325335c /src/engine.h
parent5a9873c3bdb1fd8081f684036e7b82dbbe330fba (diff)
downloadopenttd-e8af755d7fc3b405f64b39cc4216b7fd4a7e9d23.tar.xz
(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.
Diffstat (limited to 'src/engine.h')
-rw-r--r--src/engine.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/engine.h b/src/engine.h
index 375fe1d10..af74bcbab 100644
--- a/src/engine.h
+++ b/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;
@@ -118,11 +124,6 @@ enum {
};
enum {
- RVI_MULTIHEAD = 1,
- RVI_WAGON = 2,
-};
-
-enum {
NUM_VEHICLE_TYPES = 6
};