diff options
author | rubidium <rubidium@openttd.org> | 2007-05-06 15:01:44 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-05-06 15:01:44 +0000 |
commit | 425923c8d20f5295304a091bc23cc85dff63b0cf (patch) | |
tree | dcf6bc8598cc98dbb7b1444a65d5dcefeced2f1c /src/vehicle.cpp | |
parent | 9a893ebe20768fcb4d707738339249d40874575c (diff) | |
download | openttd-425923c8d20f5295304a091bc23cc85dff63b0cf.tar.xz |
(svn r9795) -Codechange: enumify the EngineClass.
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r-- | src/vehicle.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index f8c233184..897fee58d 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -2454,9 +2454,9 @@ const Livery *GetEngineLivery(EngineID engine_type, PlayerID player, EngineID pa scheme = LS_PASSENGER_WAGON_STEAM; } else { switch (RailVehInfo(parent_engine_type)->engclass) { - case 0: scheme = LS_PASSENGER_WAGON_STEAM; break; - case 1: scheme = LS_PASSENGER_WAGON_DIESEL; break; - case 2: scheme = LS_PASSENGER_WAGON_ELECTRIC; break; + case EC_STEAM: scheme = LS_PASSENGER_WAGON_STEAM; break; + case EC_DIESEL: scheme = LS_PASSENGER_WAGON_DIESEL; break; + case EC_ELECTRIC: scheme = LS_PASSENGER_WAGON_ELECTRIC; break; } } } else { @@ -2466,9 +2466,9 @@ const Livery *GetEngineLivery(EngineID engine_type, PlayerID player, EngineID pa bool is_mu = HASBIT(_engine_info[engine_type].misc_flags, EF_RAIL_IS_MU); switch (rvi->engclass) { - case 0: scheme = LS_STEAM; break; - case 1: scheme = is_mu ? LS_DMU : LS_DIESEL; break; - case 2: scheme = is_mu ? LS_EMU : LS_ELECTRIC; break; + case EC_STEAM: scheme = LS_STEAM; break; + case EC_DIESEL: scheme = is_mu ? LS_DMU : LS_DIESEL; break; + case EC_ELECTRIC: scheme = is_mu ? LS_EMU : LS_ELECTRIC; break; } } break; |