diff options
author | rubidium <rubidium@openttd.org> | 2007-05-06 19:44:22 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-05-06 19:44:22 +0000 |
commit | fe1306ce656d9e33fced2b597bc585a61299d932 (patch) | |
tree | 8f1d3ee951e23d21c44efd4ddb13d719befd7763 | |
parent | ba5563b9e8dd42cb4ed44cc5bd0d674fbedc7274 (diff) | |
download | openttd-fe1306ce656d9e33fced2b597bc585a61299d932.tar.xz |
(svn r9799) -Codechange: separate engine class and engine running cost class (mart3p).
-rw-r--r-- | src/engine.h | 4 | ||||
-rw-r--r-- | src/newgrf.cpp | 12 | ||||
-rw-r--r-- | src/table/engines.h | 259 | ||||
-rw-r--r-- | src/vehicle.cpp | 2 |
4 files changed, 146 insertions, 131 deletions
diff --git a/src/engine.h b/src/engine.h index 7f0d14875..c0fb3d6f8 100644 --- a/src/engine.h +++ b/src/engine.h @@ -20,6 +20,10 @@ enum EngineClass { EC_STEAM, EC_DIESEL, EC_ELECTRIC, + EC_MONORAIL, + EC_MAGLEV, + + EC_INVALID }; struct RailVehicleInfo { diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 45075b65f..b4f741e87 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -312,7 +312,7 @@ static bool RailVehicleChangeInfo(uint engine, int numinfo, int prop, byte **buf uint8 tracktype = grf_load_byte(&buf); switch (tracktype) { - case 0: rvi[i].railtype = rvi[i].engclass == 2 ? RAILTYPE_ELECTRIC : RAILTYPE_RAIL; break; + case 0: rvi[i].railtype = rvi[i].engclass >= 2 ? RAILTYPE_ELECTRIC : RAILTYPE_RAIL; break; case 1: rvi[i].railtype = RAILTYPE_MONO; break; case 2: rvi[i].railtype = RAILTYPE_MAGLEV; break; default: @@ -456,13 +456,15 @@ static bool RailVehicleChangeInfo(uint engine, int numinfo, int prop, byte **buf engclass = EC_DIESEL; } else if (traction <= 0x31) { engclass = EC_ELECTRIC; + } else if (traction <= 0x37) { + engclass = EC_MONORAIL; } else if (traction <= 0x41) { - engclass = EC_ELECTRIC; + engclass = EC_MAGLEV; } else { break; } - if (rvi[i].railtype == RAILTYPE_RAIL && engclass == EC_ELECTRIC) rvi[i].railtype = RAILTYPE_ELECTRIC; - if (rvi[i].railtype == RAILTYPE_ELECTRIC && engclass != EC_ELECTRIC) rvi[i].railtype = RAILTYPE_RAIL; + if (rvi[i].railtype == RAILTYPE_RAIL && engclass >= EC_ELECTRIC) rvi[i].railtype = RAILTYPE_ELECTRIC; + if (rvi[i].railtype == RAILTYPE_ELECTRIC && engclass < EC_ELECTRIC) rvi[i].railtype = RAILTYPE_RAIL; rvi[i].engclass = engclass; } @@ -2986,7 +2988,7 @@ static uint32 GetParamVal(byte param, uint32 *cond_val) uint major = 2; uint minor = 6; uint revision = 0; // special case: 2.0.1 is 2.0.10 - uint build = 1168; + uint build = 1210; return (major << 24) | (minor << 20) | (revision << 16) | build; } diff --git a/src/table/engines.h b/src/table/engines.h index 54af58361..33bdb6245 100644 --- a/src/table/engines.h +++ b/src/table/engines.h @@ -339,20 +339,25 @@ const EngineInfo orig_engine_info[] = { * @param e power (hp) * @param f weight * @param g running_cost_base - * @param h running_cost_class - engclass + * @param h running_cost_class * @param i capacity * @param j cargo_type * @param k ai_rank * @param l railtype + * @param m engclass * Tractive effort coefficient by default is the same as TTDPatch, 0.30*256=76 */ -#define RVI(a, b, c, d, e, f, g, h, i, j, k, l) { a, b, c, {l}, d, e, f, g, h, (EngineClass)h, i, j, k, 0, 0, 0, 0, 76, 0 } +#define RVI(a, b, c, d, e, f, g, h, i, j, k, l, m) { a, b, c, {l}, d, e, f, g, h, m, i, j, k, 0, 0, 0, 0, 76, 0 } #define M RAILVEH_MULTIHEAD #define W RAILVEH_WAGON #define G RAILVEH_SINGLEHEAD -#define S 0 -#define D 1 -#define E 2 +#define S EC_STEAM +#define D EC_DIESEL +#define E EC_ELECTRIC +#define N EC_MONORAIL +#define V EC_MAGLEV +/* Wagons do not have an engine */ +#define I EC_INVALID #define R RAILTYPE_RAIL #define C RAILTYPE_ELECTRIC @@ -360,132 +365,134 @@ const EngineInfo orig_engine_info[] = { #define L RAILTYPE_MAGLEV const RailVehicleInfo orig_rail_vehicle_info[NUM_TRAIN_ENGINES] = { - // image_index max_speed (kph) running_cost_base - // | flags | power (hp) | running_cost_class & engclass - // | | base_cost | weight | | capacity - // | | | | | | | | | cargo_type - // | | | | | | | | | | - RVI( 2, G, 7, 64, 300, 47, 50, S, 0, 0 , 1, R), // 0 - RVI(19, G, 8, 80, 600, 65, 65, D, 0, 0 , 4, R), // 1 - RVI( 2, G, 10, 72, 400, 85, 90, S, 0, 0 , 7, R), // 2 - RVI( 0, G, 15, 96, 900, 130, 130, S, 0, 0 , 19, R), // 3 - RVI( 1, G, 19, 112, 1000, 140, 145, S, 0, 0 , 20, R), // 4 - RVI(12, G, 16, 120, 1400, 95, 125, D, 0, 0 , 30, R), // 5 - RVI(14, G, 20, 152, 2000, 120, 135, D, 0, 0 , 31, R), // 6 - RVI( 3, G, 14, 88, 1100, 145, 130, S, 0, 0 , 19, R), // 7 - RVI( 0, G, 13, 112, 1000, 131, 120, S, 0, 0 , 20, R), // 8 - RVI( 1, G, 19, 128, 1200, 162, 140, S, 0, 0 , 21, R), // 9 - RVI( 0, G, 22, 144, 1600, 170, 130, S, 0, 0 , 22, R), // 10 - RVI( 8, M, 11, 112, 600/2,32/2, 85/2, D, 38, CT_PASSENGERS , 10, R), // 11 - RVI(10, M, 14, 120, 700/2,38/2, 70/2, D, 40, CT_PASSENGERS , 11, R), // 12 - RVI( 4, G, 15, 128, 1250, 72, 95, D, 0, 0 , 30, R), // 13 - RVI( 5, G, 17, 144, 1750, 101, 120, D, 0, 0 , 31, R), // 14 - RVI( 4, G, 18, 160, 2580, 112, 140, D, 0, 0 , 32, R), // 15 - RVI(14, G, 23, 96, 4000, 150, 135, D, 0, 0 , 33, R), // 16 - RVI(12, G, 16, 112, 2400, 120, 105, D, 0, 0 , 34, R), // 17 - RVI(13, G, 30, 112, 6600, 207, 155, D, 0, 0 , 35, R), // 18 - RVI(15, G, 18, 104, 1500, 110, 105, D, 0, 0 , 29, R), // 19 - RVI(16, M, 35, 160, 3500/2,95/2, 205/2, D, 0, 0 , 45, R), // 20 - RVI(18, G, 21, 104, 2200, 120, 145, D, 0, 0 , 32, R), // 21 - RVI( 6, M, 20, 200, 4500/2,70/2, 190/2, D, 4, CT_MAIL , 50, R), // 22 - RVI(20, G, 26, 160, 3600, 84, 180, E, 0, 0 , 40, C), // 23 - RVI(20, G, 30, 176, 5000, 82, 205, E, 0, 0 , 41, C), // 24 - RVI(21, M, 40, 240, 7000/2,90/2, 240/2, E, 0, 0 , 51, C), // 25 - RVI(23, M, 43, 264, 8000/2,95/2, 250/2, E, 0, 0 , 52, C), // 26 - RVI(33, W, 247, 0, 0, 25, 0, 0, 40, CT_PASSENGERS , 0, R), // 27 - RVI(35, W, 228, 0, 0, 21, 0, 0, 30, CT_MAIL , 0, R), // 28 - RVI(34, W, 176, 0, 0, 18, 0, 0, 30, CT_COAL , 0, R), // 29 - RVI(36, W, 200, 0, 0, 24, 0, 0, 30, CT_OIL , 0, R), // 30 - RVI(37, W, 192, 0, 0, 20, 0, 0, 25, CT_LIVESTOCK , 0, R), // 31 - RVI(38, W, 190, 0, 0, 21, 0, 0, 25, CT_GOODS , 0, R), // 32 - RVI(39, W, 182, 0, 0, 19, 0, 0, 30, CT_GRAIN , 0, R), // 33 - RVI(40, W, 181, 0, 0, 16, 0, 0, 30, CT_WOOD , 0, R), // 34 - RVI(41, W, 179, 0, 0, 19, 0, 0, 30, CT_IRON_ORE , 0, R), // 35 - RVI(42, W, 196, 0, 0, 18, 0, 0, 20, CT_STEEL , 0, R), // 36 - RVI(43, W, 255, 0, 0, 30, 0, 0, 20, CT_VALUABLES , 0, R), // 37 - RVI(44, W, 191, 0, 0, 22, 0, 0, 25, CT_FOOD , 0, R), // 38 - RVI(45, W, 196, 0, 0, 18, 0, 0, 20, CT_PAPER , 0, R), // 39 - RVI(46, W, 179, 0, 0, 19, 0, 0, 30, CT_COPPER_ORE , 0, R), // 40 - RVI(47, W, 199, 0, 0, 25, 0, 0, 25, CT_WATER , 0, R), // 41 - RVI(48, W, 182, 0, 0, 18, 0, 0, 25, CT_FRUIT , 0, R), // 42 - RVI(49, W, 185, 0, 0, 19, 0, 0, 21, CT_RUBBER , 0, R), // 43 - RVI(50, W, 176, 0, 0, 19, 0, 0, 30, CT_SUGAR , 0, R), // 44 - RVI(51, W, 178, 0, 0, 20, 0, 0, 30, CT_COTTON_CANDY, 0, R), // 45 - RVI(52, W, 192, 0, 0, 20, 0, 0, 30, CT_TOFFEE , 0, R), // 46 - RVI(53, W, 190, 0, 0, 21, 0, 0, 20, CT_BUBBLES , 0, R), // 47 - RVI(54, W, 182, 0, 0, 24, 0, 0, 25, CT_COLA , 0, R), // 48 - RVI(55, W, 181, 0, 0, 21, 0, 0, 25, CT_CANDY , 0, R), // 49 - RVI(56, W, 183, 0, 0, 21, 0, 0, 20, CT_TOYS , 0, R), // 50 - RVI(57, W, 196, 0, 0, 18, 0, 0, 22, CT_BATTERIES , 0, R), // 51 - RVI(58, W, 193, 0, 0, 18, 0, 0, 25, CT_FIZZY_DRINKS, 0, R), // 52 - RVI(59, W, 191, 0, 0, 18, 0, 0, 30, CT_PLASTIC , 0, R), // 53 - RVI(25, G, 52, 304, 9000, 95, 230, E, 0, 0 , 60, O), // 54 - RVI(26, M, 60, 336, 10000/2,85/2, 240/2, E, 25, CT_PASSENGERS , 62, O), // 55 - RVI(26, G, 53, 320, 5000, 95, 230, E, 0, 0 , 63, O), // 56 - RVI(60, W, 247, 0, 0, 25, 0, 0, 45, CT_PASSENGERS , 0, O), // 57 - RVI(62, W, 228, 0, 0, 21, 0, 0, 35, CT_MAIL , 0, O), // 58 - RVI(61, W, 176, 0, 0, 18, 0, 0, 35, CT_COAL , 0, O), // 59 - RVI(63, W, 200, 0, 0, 24, 0, 0, 35, CT_OIL , 0, O), // 60 - RVI(64, W, 192, 0, 0, 20, 0, 0, 30, CT_LIVESTOCK , 0, O), // 61 - RVI(65, W, 190, 0, 0, 21, 0, 0, 30, CT_GOODS , 0, O), // 62 - RVI(66, W, 182, 0, 0, 19, 0, 0, 35, CT_GRAIN , 0, O), // 63 - RVI(67, W, 181, 0, 0, 16, 0, 0, 35, CT_WOOD , 0, O), // 64 - RVI(68, W, 179, 0, 0, 19, 0, 0, 35, CT_IRON_ORE , 0, O), // 65 - RVI(69, W, 196, 0, 0, 18, 0, 0, 25, CT_STEEL , 0, O), // 66 - RVI(70, W, 255, 0, 0, 30, 0, 0, 25, CT_VALUABLES , 0, O), // 67 - RVI(71, W, 191, 0, 0, 22, 0, 0, 30, CT_FOOD , 0, O), // 68 - RVI(72, W, 196, 0, 0, 18, 0, 0, 25, CT_PAPER , 0, O), // 69 - RVI(73, W, 179, 0, 0, 19, 0, 0, 35, CT_COPPER_ORE , 0, O), // 70 - RVI(47, W, 199, 0, 0, 25, 0, 0, 30, CT_WATER , 0, O), // 71 - RVI(48, W, 182, 0, 0, 18, 0, 0, 30, CT_FRUIT , 0, O), // 72 - RVI(49, W, 185, 0, 0, 19, 0, 0, 26, CT_RUBBER , 0, O), // 73 - RVI(50, W, 176, 0, 0, 19, 0, 0, 35, CT_SUGAR , 0, O), // 74 - RVI(51, W, 178, 0, 0, 20, 0, 0, 35, CT_COTTON_CANDY, 0, O), // 75 - RVI(52, W, 192, 0, 0, 20, 0, 0, 35, CT_TOFFEE , 0, O), // 76 - RVI(53, W, 190, 0, 0, 21, 0, 0, 25, CT_BUBBLES , 0, O), // 77 - RVI(54, W, 182, 0, 0, 24, 0, 0, 30, CT_COLA , 0, O), // 78 - RVI(55, W, 181, 0, 0, 21, 0, 0, 30, CT_CANDY , 0, O), // 79 - RVI(56, W, 183, 0, 0, 21, 0, 0, 25, CT_TOYS , 0, O), // 80 - RVI(57, W, 196, 0, 0, 18, 0, 0, 27, CT_BATTERIES , 0, O), // 81 - RVI(58, W, 193, 0, 0, 18, 0, 0, 30, CT_FIZZY_DRINKS, 0, O), // 82 - RVI(59, W, 191, 0, 0, 18, 0, 0, 35, CT_PLASTIC , 0, O), // 83 - RVI(28, G, 70, 400, 10000, 105, 250, E, 0, 0 , 70, L), // 84 - RVI(29, G, 74, 448, 12000, 120, 253, E, 0, 0 , 71, L), // 85 - RVI(30, G, 82, 480, 15000, 130, 254, E, 0, 0 , 72, L), // 86 - RVI(31, M, 95, 640, 20000/2,150/2,255/2, E, 0, 0 , 73, L), // 87 - RVI(28, G, 70, 480, 10000, 120, 250, E, 0, 0 , 74, L), // 88 - RVI(60, W, 247, 0, 0, 25, 0, 0, 47, CT_PASSENGERS , 0, L), // 89 - RVI(62, W, 228, 0, 0, 21, 0, 0, 37, CT_MAIL , 0, L), // 90 - RVI(61, W, 176, 0, 0, 18, 0, 0, 37, CT_COAL , 0, L), // 91 - RVI(63, W, 200, 0, 0, 24, 0, 0, 37, CT_OIL , 0, L), // 92 - RVI(64, W, 192, 0, 0, 20, 0, 0, 32, CT_LIVESTOCK , 0, L), // 93 - RVI(65, W, 190, 0, 0, 21, 0, 0, 32, CT_GOODS , 0, L), // 94 - RVI(66, W, 182, 0, 0, 19, 0, 0, 37, CT_GRAIN , 0, L), // 95 - RVI(67, W, 181, 0, 0, 16, 0, 0, 37, CT_WOOD , 0, L), // 96 - RVI(68, W, 179, 0, 0, 19, 0, 0, 37, CT_IRON_ORE , 0, L), // 97 - RVI(69, W, 196, 0, 0, 18, 0, 0, 27, CT_STEEL , 0, L), // 98 - RVI(70, W, 255, 0, 0, 30, 0, 0, 27, CT_VALUABLES , 0, L), // 99 - RVI(71, W, 191, 0, 0, 22, 0, 0, 32, CT_FOOD , 0, L), // 100 - RVI(72, W, 196, 0, 0, 18, 0, 0, 27, CT_PAPER , 0, L), // 101 - RVI(73, W, 179, 0, 0, 19, 0, 0, 37, CT_COPPER_ORE , 0, L), // 102 - RVI(47, W, 199, 0, 0, 25, 0, 0, 32, CT_WATER , 0, L), // 103 - RVI(48, W, 182, 0, 0, 18, 0, 0, 32, CT_FRUIT , 0, L), // 104 - RVI(49, W, 185, 0, 0, 19, 0, 0, 28, CT_RUBBER , 0, L), // 105 - RVI(50, W, 176, 0, 0, 19, 0, 0, 37, CT_SUGAR , 0, L), // 106 - RVI(51, W, 178, 0, 0, 20, 0, 0, 37, CT_COTTON_CANDY, 0, L), // 107 - RVI(52, W, 192, 0, 0, 20, 0, 0, 37, CT_TOFFEE , 0, L), // 108 - RVI(53, W, 190, 0, 0, 21, 0, 0, 27, CT_BUBBLES , 0, L), // 109 - RVI(54, W, 182, 0, 0, 24, 0, 0, 32, CT_COLA , 0, L), // 110 - RVI(55, W, 181, 0, 0, 21, 0, 0, 32, CT_CANDY , 0, L), // 111 - RVI(56, W, 183, 0, 0, 21, 0, 0, 27, CT_TOYS , 0, L), // 112 - RVI(57, W, 196, 0, 0, 18, 0, 0, 29, CT_BATTERIES , 0, L), // 113 - RVI(58, W, 193, 0, 0, 18, 0, 0, 32, CT_FIZZY_DRINKS, 0, L), // 114 - RVI(59, W, 191, 0, 0, 18, 0, 0, 37, CT_PLASTIC , 0, L), // 115 + // image_index max_speed (kph) running_cost_base ai_rank + // | flags | power (hp) | running_cost_class | railtype + // | | base_cost | weight | | capacity | | + // | | | | | | | | | cargo_type | | engclass + // | | | | | | | | | | | | | + RVI( 2, G, 7, 64, 300, 47, 50, S, 0, 0 , 1, R, S), // 0 + RVI(19, G, 8, 80, 600, 65, 65, D, 0, 0 , 4, R, D), // 1 + RVI( 2, G, 10, 72, 400, 85, 90, S, 0, 0 , 7, R, S), // 2 + RVI( 0, G, 15, 96, 900, 130, 130, S, 0, 0 , 19, R, S), // 3 + RVI( 1, G, 19, 112, 1000, 140, 145, S, 0, 0 , 20, R, S), // 4 + RVI(12, G, 16, 120, 1400, 95, 125, D, 0, 0 , 30, R, D), // 5 + RVI(14, G, 20, 152, 2000, 120, 135, D, 0, 0 , 31, R, D), // 6 + RVI( 3, G, 14, 88, 1100, 145, 130, S, 0, 0 , 19, R, S), // 7 + RVI( 0, G, 13, 112, 1000, 131, 120, S, 0, 0 , 20, R, S), // 8 + RVI( 1, G, 19, 128, 1200, 162, 140, S, 0, 0 , 21, R, S), // 9 + RVI( 0, G, 22, 144, 1600, 170, 130, S, 0, 0 , 22, R, S), // 10 + RVI( 8, M, 11, 112, 600/2,32/2, 85/2, D, 38, CT_PASSENGERS , 10, R, D), // 11 + RVI(10, M, 14, 120, 700/2,38/2, 70/2, D, 40, CT_PASSENGERS , 11, R, D), // 12 + RVI( 4, G, 15, 128, 1250, 72, 95, D, 0, 0 , 30, R, D), // 13 + RVI( 5, G, 17, 144, 1750, 101, 120, D, 0, 0 , 31, R, D), // 14 + RVI( 4, G, 18, 160, 2580, 112, 140, D, 0, 0 , 32, R, D), // 15 + RVI(14, G, 23, 96, 4000, 150, 135, D, 0, 0 , 33, R, D), // 16 + RVI(12, G, 16, 112, 2400, 120, 105, D, 0, 0 , 34, R, D), // 17 + RVI(13, G, 30, 112, 6600, 207, 155, D, 0, 0 , 35, R, D), // 18 + RVI(15, G, 18, 104, 1500, 110, 105, D, 0, 0 , 29, R, D), // 19 + RVI(16, M, 35, 160, 3500/2,95/2, 205/2, D, 0, 0 , 45, R, D), // 20 + RVI(18, G, 21, 104, 2200, 120, 145, D, 0, 0 , 32, R, D), // 21 + RVI( 6, M, 20, 200, 4500/2,70/2, 190/2, D, 4, CT_MAIL , 50, R, D), // 22 + RVI(20, G, 26, 160, 3600, 84, 180, E, 0, 0 , 40, C, E), // 23 + RVI(20, G, 30, 176, 5000, 82, 205, E, 0, 0 , 41, C, E), // 24 + RVI(21, M, 40, 240, 7000/2,90/2, 240/2, E, 0, 0 , 51, C, E), // 25 + RVI(23, M, 43, 264, 8000/2,95/2, 250/2, E, 0, 0 , 52, C, E), // 26 + RVI(33, W, 247, 0, 0, 25, 0, 0, 40, CT_PASSENGERS , 0, R, I), // 27 + RVI(35, W, 228, 0, 0, 21, 0, 0, 30, CT_MAIL , 0, R, I), // 28 + RVI(34, W, 176, 0, 0, 18, 0, 0, 30, CT_COAL , 0, R, I), // 29 + RVI(36, W, 200, 0, 0, 24, 0, 0, 30, CT_OIL , 0, R, I), // 30 + RVI(37, W, 192, 0, 0, 20, 0, 0, 25, CT_LIVESTOCK , 0, R, I), // 31 + RVI(38, W, 190, 0, 0, 21, 0, 0, 25, CT_GOODS , 0, R, I), // 32 + RVI(39, W, 182, 0, 0, 19, 0, 0, 30, CT_GRAIN , 0, R, I), // 33 + RVI(40, W, 181, 0, 0, 16, 0, 0, 30, CT_WOOD , 0, R, I), // 34 + RVI(41, W, 179, 0, 0, 19, 0, 0, 30, CT_IRON_ORE , 0, R, I), // 35 + RVI(42, W, 196, 0, 0, 18, 0, 0, 20, CT_STEEL , 0, R, I), // 36 + RVI(43, W, 255, 0, 0, 30, 0, 0, 20, CT_VALUABLES , 0, R, I), // 37 + RVI(44, W, 191, 0, 0, 22, 0, 0, 25, CT_FOOD , 0, R, I), // 38 + RVI(45, W, 196, 0, 0, 18, 0, 0, 20, CT_PAPER , 0, R, I), // 39 + RVI(46, W, 179, 0, 0, 19, 0, 0, 30, CT_COPPER_ORE , 0, R, I), // 40 + RVI(47, W, 199, 0, 0, 25, 0, 0, 25, CT_WATER , 0, R, I), // 41 + RVI(48, W, 182, 0, 0, 18, 0, 0, 25, CT_FRUIT , 0, R, I), // 42 + RVI(49, W, 185, 0, 0, 19, 0, 0, 21, CT_RUBBER , 0, R, I), // 43 + RVI(50, W, 176, 0, 0, 19, 0, 0, 30, CT_SUGAR , 0, R, I), // 44 + RVI(51, W, 178, 0, 0, 20, 0, 0, 30, CT_COTTON_CANDY, 0, R, I), // 45 + RVI(52, W, 192, 0, 0, 20, 0, 0, 30, CT_TOFFEE , 0, R, I), // 46 + RVI(53, W, 190, 0, 0, 21, 0, 0, 20, CT_BUBBLES , 0, R, I), // 47 + RVI(54, W, 182, 0, 0, 24, 0, 0, 25, CT_COLA , 0, R, I), // 48 + RVI(55, W, 181, 0, 0, 21, 0, 0, 25, CT_CANDY , 0, R, I), // 49 + RVI(56, W, 183, 0, 0, 21, 0, 0, 20, CT_TOYS , 0, R, I), // 50 + RVI(57, W, 196, 0, 0, 18, 0, 0, 22, CT_BATTERIES , 0, R, I), // 51 + RVI(58, W, 193, 0, 0, 18, 0, 0, 25, CT_FIZZY_DRINKS, 0, R, I), // 52 + RVI(59, W, 191, 0, 0, 18, 0, 0, 30, CT_PLASTIC , 0, R, I), // 53 + RVI(25, G, 52, 304, 9000, 95, 230, E, 0, 0 , 60, O, N), // 54 + RVI(26, M, 60, 336, 10000/2,85/2, 240/2, E, 25, CT_PASSENGERS , 62, O, N), // 55 + RVI(26, G, 53, 320, 5000, 95, 230, E, 0, 0 , 63, O, N), // 56 + RVI(60, W, 247, 0, 0, 25, 0, 0, 45, CT_PASSENGERS , 0, O, I), // 57 + RVI(62, W, 228, 0, 0, 21, 0, 0, 35, CT_MAIL , 0, O, I), // 58 + RVI(61, W, 176, 0, 0, 18, 0, 0, 35, CT_COAL , 0, O, I), // 59 + RVI(63, W, 200, 0, 0, 24, 0, 0, 35, CT_OIL , 0, O, I), // 60 + RVI(64, W, 192, 0, 0, 20, 0, 0, 30, CT_LIVESTOCK , 0, O, I), // 61 + RVI(65, W, 190, 0, 0, 21, 0, 0, 30, CT_GOODS , 0, O, I), // 62 + RVI(66, W, 182, 0, 0, 19, 0, 0, 35, CT_GRAIN , 0, O, I), // 63 + RVI(67, W, 181, 0, 0, 16, 0, 0, 35, CT_WOOD , 0, O, I), // 64 + RVI(68, W, 179, 0, 0, 19, 0, 0, 35, CT_IRON_ORE , 0, O, I), // 65 + RVI(69, W, 196, 0, 0, 18, 0, 0, 25, CT_STEEL , 0, O, I), // 66 + RVI(70, W, 255, 0, 0, 30, 0, 0, 25, CT_VALUABLES , 0, O, I), // 67 + RVI(71, W, 191, 0, 0, 22, 0, 0, 30, CT_FOOD , 0, O, I), // 68 + RVI(72, W, 196, 0, 0, 18, 0, 0, 25, CT_PAPER , 0, O, I), // 69 + RVI(73, W, 179, 0, 0, 19, 0, 0, 35, CT_COPPER_ORE , 0, O, I), // 70 + RVI(47, W, 199, 0, 0, 25, 0, 0, 30, CT_WATER , 0, O, I), // 71 + RVI(48, W, 182, 0, 0, 18, 0, 0, 30, CT_FRUIT , 0, O, I), // 72 + RVI(49, W, 185, 0, 0, 19, 0, 0, 26, CT_RUBBER , 0, O, I), // 73 + RVI(50, W, 176, 0, 0, 19, 0, 0, 35, CT_SUGAR , 0, O, I), // 74 + RVI(51, W, 178, 0, 0, 20, 0, 0, 35, CT_COTTON_CANDY, 0, O, I), // 75 + RVI(52, W, 192, 0, 0, 20, 0, 0, 35, CT_TOFFEE , 0, O, I), // 76 + RVI(53, W, 190, 0, 0, 21, 0, 0, 25, CT_BUBBLES , 0, O, I), // 77 + RVI(54, W, 182, 0, 0, 24, 0, 0, 30, CT_COLA , 0, O, I), // 78 + RVI(55, W, 181, 0, 0, 21, 0, 0, 30, CT_CANDY , 0, O, I), // 79 + RVI(56, W, 183, 0, 0, 21, 0, 0, 25, CT_TOYS , 0, O, I), // 80 + RVI(57, W, 196, 0, 0, 18, 0, 0, 27, CT_BATTERIES , 0, O, I), // 81 + RVI(58, W, 193, 0, 0, 18, 0, 0, 30, CT_FIZZY_DRINKS, 0, O, I), // 82 + RVI(59, W, 191, 0, 0, 18, 0, 0, 35, CT_PLASTIC , 0, O, I), // 83 + RVI(28, G, 70, 400, 10000, 105, 250, E, 0, 0 , 70, L, V), // 84 + RVI(29, G, 74, 448, 12000, 120, 253, E, 0, 0 , 71, L, V), // 85 + RVI(30, G, 82, 480, 15000, 130, 254, E, 0, 0 , 72, L, V), // 86 + RVI(31, M, 95, 640, 20000/2,150/2,255/2, E, 0, 0 , 73, L, V), // 87 + RVI(28, G, 70, 480, 10000, 120, 250, E, 0, 0 , 74, L, V), // 88 + RVI(60, W, 247, 0, 0, 25, 0, 0, 47, CT_PASSENGERS , 0, L, I), // 89 + RVI(62, W, 228, 0, 0, 21, 0, 0, 37, CT_MAIL , 0, L, I), // 90 + RVI(61, W, 176, 0, 0, 18, 0, 0, 37, CT_COAL , 0, L, I), // 91 + RVI(63, W, 200, 0, 0, 24, 0, 0, 37, CT_OIL , 0, L, I), // 92 + RVI(64, W, 192, 0, 0, 20, 0, 0, 32, CT_LIVESTOCK , 0, L, I), // 93 + RVI(65, W, 190, 0, 0, 21, 0, 0, 32, CT_GOODS , 0, L, I), // 94 + RVI(66, W, 182, 0, 0, 19, 0, 0, 37, CT_GRAIN , 0, L, I), // 95 + RVI(67, W, 181, 0, 0, 16, 0, 0, 37, CT_WOOD , 0, L, I), // 96 + RVI(68, W, 179, 0, 0, 19, 0, 0, 37, CT_IRON_ORE , 0, L, I), // 97 + RVI(69, W, 196, 0, 0, 18, 0, 0, 27, CT_STEEL , 0, L, I), // 98 + RVI(70, W, 255, 0, 0, 30, 0, 0, 27, CT_VALUABLES , 0, L, I), // 99 + RVI(71, W, 191, 0, 0, 22, 0, 0, 32, CT_FOOD , 0, L, I), // 100 + RVI(72, W, 196, 0, 0, 18, 0, 0, 27, CT_PAPER , 0, L, I), // 101 + RVI(73, W, 179, 0, 0, 19, 0, 0, 37, CT_COPPER_ORE , 0, L, I), // 102 + RVI(47, W, 199, 0, 0, 25, 0, 0, 32, CT_WATER , 0, L, I), // 103 + RVI(48, W, 182, 0, 0, 18, 0, 0, 32, CT_FRUIT , 0, L, I), // 104 + RVI(49, W, 185, 0, 0, 19, 0, 0, 28, CT_RUBBER , 0, L, I), // 105 + RVI(50, W, 176, 0, 0, 19, 0, 0, 37, CT_SUGAR , 0, L, I), // 106 + RVI(51, W, 178, 0, 0, 20, 0, 0, 37, CT_COTTON_CANDY, 0, L, I), // 107 + RVI(52, W, 192, 0, 0, 20, 0, 0, 37, CT_TOFFEE , 0, L, I), // 108 + RVI(53, W, 190, 0, 0, 21, 0, 0, 27, CT_BUBBLES , 0, L, I), // 109 + RVI(54, W, 182, 0, 0, 24, 0, 0, 32, CT_COLA , 0, L, I), // 110 + RVI(55, W, 181, 0, 0, 21, 0, 0, 32, CT_CANDY , 0, L, I), // 111 + RVI(56, W, 183, 0, 0, 21, 0, 0, 27, CT_TOYS , 0, L, I), // 112 + RVI(57, W, 196, 0, 0, 18, 0, 0, 29, CT_BATTERIES , 0, L, I), // 113 + RVI(58, W, 193, 0, 0, 18, 0, 0, 32, CT_FIZZY_DRINKS, 0, L, I), // 114 + RVI(59, W, 191, 0, 0, 18, 0, 0, 37, CT_PLASTIC , 0, L, I), // 115 }; #undef L #undef O #undef C #undef R +#undef V +#undef N #undef E #undef D #undef S diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 897fee58d..745ca776a 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -2454,6 +2454,7 @@ const Livery *GetEngineLivery(EngineID engine_type, PlayerID player, EngineID pa scheme = LS_PASSENGER_WAGON_STEAM; } else { switch (RailVehInfo(parent_engine_type)->engclass) { + default: NOT_REACHED(); 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; @@ -2466,6 +2467,7 @@ 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) { + default: NOT_REACHED(); 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; |