(svn r3059) Use bitfields to encode railtype and climates of engines instead of manual shifting/anding
This commit is contained in:
3
engine.h
3
engine.h
@@ -70,7 +70,8 @@ typedef struct EngineInfo {
|
||||
byte unk2; ///< Carriages have the highest bit set in this one
|
||||
byte lifelength;
|
||||
byte base_life;
|
||||
byte railtype_climates; ///< contains the railtype in the lower four bits, and a mask to the climates where the vehicle is available in the upper four
|
||||
byte railtype:4;
|
||||
byte climates:4;
|
||||
} EngineInfo;
|
||||
|
||||
typedef struct Engine {
|
||||
|
Reference in New Issue
Block a user