summaryrefslogtreecommitdiff
path: root/src/town_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-08-26 17:01:17 +0000
committerrubidium <rubidium@openttd.org>2010-08-26 17:01:17 +0000
commitddf1510a23b3124dcdaac5cb8f23ef374da88f71 (patch)
tree7e55ec8e1bcff373eaf7526eefe421ca6fc01fea /src/town_cmd.cpp
parentd3f57f0e4d49482d1cbc1a13dc77b28bcfc82c3d (diff)
downloadopenttd-ddf1510a23b3124dcdaac5cb8f23ef374da88f71.tar.xz
(svn r20627) -Codechange: unify the animation code of station, airport, house and industry tiles
Diffstat (limited to 'src/town_cmd.cpp')
-rw-r--r--src/town_cmd.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index f71768e54..47a858946 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -411,18 +411,12 @@ static void MakeSingleHouseBigger(TileIndex tile)
IncHouseConstructionTick(tile);
if (GetHouseConstructionTick(tile) != 0) return;
- const HouseSpec *hs = HouseSpec::Get(GetHouseType(tile));
-
- /* Check and/or */
- if (HasBit(hs->callback_mask, CBM_HOUSE_CONSTRUCTION_STATE_CHANGE)) {
- uint16 callback_res = GetHouseCallback(CBID_HOUSE_CONSTRUCTION_STATE_CHANGE, 0, 0, GetHouseType(tile), Town::GetByTile(tile), tile);
- if (callback_res != CALLBACK_FAILED) ChangeHouseAnimationFrame(hs->grf_prop.grffile, tile, callback_res);
- }
+ AnimateNewHouseConstruction(tile);
if (IsHouseCompleted(tile)) {
/* Now that construction is complete, we can add the population of the
* building to the town. */
- ChangePopulation(Town::GetByTile(tile), hs->population);
+ ChangePopulation(Town::GetByTile(tile), HouseSpec::Get(GetHouseType(tile))->population);
ResetHouseAge(tile);
}
MarkTileDirtyByTile(tile);