summaryrefslogtreecommitdiff
path: root/src/newgrf_house.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-04-21 11:29:01 +0000
committerrubidium <rubidium@openttd.org>2008-04-21 11:29:01 +0000
commita40bba8bace426b961d31f5b0362629044c0766e (patch)
tree05dfb2564e3487afc402523c5fbe4b764fc97d54 /src/newgrf_house.cpp
parent2a779a5e100be9133e21b5645d90d0d390af9ecd (diff)
downloadopenttd-a40bba8bace426b961d31f5b0362629044c0766e.tar.xz
(svn r12817) -Feature: the ability to play NewGRF sounds for industries and stations.
Diffstat (limited to 'src/newgrf_house.cpp')
-rw-r--r--src/newgrf_house.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp
index b64537bea..15db58ffd 100644
--- a/src/newgrf_house.cpp
+++ b/src/newgrf_house.cpp
@@ -430,7 +430,7 @@ void AnimateNewHouseTile(TileIndex tile)
/* If the lower 7 bits of the upper byte of the callback
* result are not empty, it is a sound effect. */
- if (GB(callback_res, 8, 7) != 0) PlayHouseSound(GB(callback_res, 8, 7), tile);
+ if (GB(callback_res, 8, 7) != 0) PlayTileSound(hs->grffile, GB(callback_res, 8, 7), tile);
}
}
@@ -450,7 +450,7 @@ void AnimateNewHouseTile(TileIndex tile)
MarkTileDirtyByTile(tile);
}
-void ChangeHouseAnimationFrame(TileIndex tile, uint16 callback_result)
+void ChangeHouseAnimationFrame(const GRFFile *file, TileIndex tile, uint16 callback_result)
{
switch (callback_result & 0xFF) {
case 0xFD: /* Do nothing. */ break;
@@ -463,7 +463,7 @@ void ChangeHouseAnimationFrame(TileIndex tile, uint16 callback_result)
}
/* If the lower 7 bits of the upper byte of the callback
* result are not empty, it is a sound effect. */
- if (GB(callback_result, 8, 7) != 0) PlayHouseSound(GB(callback_result, 8, 7), tile);
+ if (GB(callback_result, 8, 7) != 0) PlayTileSound(file, GB(callback_result, 8, 7), tile);
}
bool CanDeleteHouse(TileIndex tile)
@@ -491,7 +491,7 @@ static void AnimationControl(TileIndex tile, uint16 random_bits)
uint32 param = (hs->extra_flags & SYNCHRONISED_CALLBACK_1B) ? (GB(Random(), 0, 16) | random_bits << 16) : Random();
uint16 callback_res = GetHouseCallback(CBID_HOUSE_ANIMATION_START_STOP, param, 0, GetHouseType(tile), GetTownByTile(tile), tile);
- if (callback_res != CALLBACK_FAILED) ChangeHouseAnimationFrame(tile, callback_res);
+ if (callback_res != CALLBACK_FAILED) ChangeHouseAnimationFrame(hs->grffile, tile, callback_res);
}
}