sound.c
changeset 3645 7f950533d510
parent 3421 7968a4b5ff0a
child 3716 8aa18b3fe5e7
equal deleted inserted replaced
3644:7c9a6a91873b 3645:7f950533d510
   205 
   205 
   206 }
   206 }
   207 
   207 
   208 void SndPlayTileFx(SoundFx sound, TileIndex tile)
   208 void SndPlayTileFx(SoundFx sound, TileIndex tile)
   209 {
   209 {
   210 	/* emits sound from center (+ 8) of the tile */
   210 	/* emits sound from center of the tile */
   211 	int x = TileX(tile) * TILE_SIZE + 8;
   211 	int x = TileX(tile) * TILE_SIZE + TILE_SIZE / 2;
   212 	int y = TileY(tile) * TILE_SIZE + 8;
   212 	int y = TileY(tile) * TILE_SIZE + TILE_SIZE / 2;
   213 	Point pt = RemapCoords(x, y, GetSlopeZ(x, y));
   213 	Point pt = RemapCoords(x, y, GetSlopeZ(x, y));
   214 	SndPlayScreenCoordFx(sound, pt.x, pt.y);
   214 	SndPlayScreenCoordFx(sound, pt.x, pt.y);
   215 }
   215 }
   216 
   216 
   217 void SndPlayVehicleFx(SoundFx sound, const Vehicle *v)
   217 void SndPlayVehicleFx(SoundFx sound, const Vehicle *v)