(svn r20627) -Codechange: unify the animation code of station, airport, house and industry tiles
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user