(svn r3059) Use bitfields to encode railtype and climates of engines instead of manual shifting/anding

This commit is contained in:
tron
2005-10-18 11:23:58 +00:00
parent a85d68ed57
commit 24253c17cc
5 changed files with 9 additions and 10 deletions

View File

@@ -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 {