equal
deleted
inserted
replaced
7 #include "table/train_cmd.h" |
7 #include "table/train_cmd.h" |
8 #include "gfx.h" |
8 #include "gfx.h" |
9 #include "news.h" |
9 #include "news.h" |
10 #include "engine.h" |
10 #include "engine.h" |
11 #include "player.h" |
11 #include "player.h" |
12 |
12 #include "sound.h" |
13 |
13 |
14 #define is_firsthead_sprite(spritenum) \ |
14 #define is_firsthead_sprite(spritenum) \ |
15 (is_custom_sprite(spritenum) \ |
15 (is_custom_sprite(spritenum) \ |
16 ? is_custom_firsthead_sprite(spritenum) \ |
16 ? is_custom_firsthead_sprite(spritenum) \ |
17 : _engine_sprite_add[spritenum] == 0) |
17 : _engine_sprite_add[spritenum] == 0) |
1239 { |
1239 { |
1240 static const byte sfx[3] = { 0x2, 0x8, 0x8 }; |
1240 static const byte sfx[3] = { 0x2, 0x8, 0x8 }; |
1241 int engtype = v->engine_type; |
1241 int engtype = v->engine_type; |
1242 |
1242 |
1243 switch (_engines[engtype].railtype) { |
1243 switch (_engines[engtype].railtype) { |
1244 case 0: SndPlayVehicleFx(sfx[_rail_vehicle_info[engtype].engclass], v); break; |
1244 case 0: |
1245 case 1: SndPlayVehicleFx(0x41, v); break; |
1245 SndPlayVehicleFx(sfx[_rail_vehicle_info[engtype].engclass], v); |
1246 case 2: SndPlayVehicleFx(0x47, v); break; |
1246 break; |
|
1247 case 1: |
|
1248 SndPlayVehicleFx(SND_47_MAGLEV_2, v); |
|
1249 break; |
|
1250 case 2: |
|
1251 SndPlayVehicleFx(SND_41_MAGLEV, v); |
|
1252 break; |
1247 } |
1253 } |
1248 } |
1254 } |
1249 |
1255 |
1250 static bool CheckTrainStayInDepot(Vehicle *v) |
1256 static bool CheckTrainStayInDepot(Vehicle *v) |
1251 { |
1257 { |