equal
deleted
inserted
replaced
43 #include "oldpool_func.h" |
43 #include "oldpool_func.h" |
44 #include "sprite.h" |
44 #include "sprite.h" |
45 #include "economy_func.h" |
45 #include "economy_func.h" |
46 #include "station_func.h" |
46 #include "station_func.h" |
47 #include "cheat_func.h" |
47 #include "cheat_func.h" |
|
48 #include "functions.h" |
|
49 #include "animated_tile_func.h" |
|
50 #include "date_func.h" |
48 |
51 |
49 #include "table/strings.h" |
52 #include "table/strings.h" |
50 #include "table/sprites.h" |
53 #include "table/sprites.h" |
51 #include "table/town_land.h" |
54 #include "table/town_land.h" |
52 |
55 |
266 int pos = GetLiftPosition(tile); |
269 int pos = GetLiftPosition(tile); |
267 int dest = GetLiftDestination(tile) * 6; |
270 int dest = GetLiftDestination(tile) * 6; |
268 pos += (pos < dest) ? 1 : -1; |
271 pos += (pos < dest) ? 1 : -1; |
269 SetLiftPosition(tile, pos); |
272 SetLiftPosition(tile, pos); |
270 |
273 |
271 if (pos == dest) HaltLift(tile); |
274 if (pos == dest) { |
|
275 HaltLift(tile); |
|
276 DeleteAnimatedTile(tile); |
|
277 } |
272 |
278 |
273 MarkTileDirtyByTile(tile); |
279 MarkTileDirtyByTile(tile); |
274 } |
280 } |
275 |
281 |
276 /** |
282 /** |
383 |
389 |
384 if (IsHouseCompleted(tile)) { |
390 if (IsHouseCompleted(tile)) { |
385 /* Now that construction is complete, we can add the population of the |
391 /* Now that construction is complete, we can add the population of the |
386 * building to the town. */ |
392 * building to the town. */ |
387 ChangePopulation(GetTownByTile(tile), GetHouseSpecs(GetHouseType(tile))->population); |
393 ChangePopulation(GetTownByTile(tile), GetHouseSpecs(GetHouseType(tile))->population); |
|
394 SetHouseConstructionYear(tile, _cur_year); |
388 } |
395 } |
389 MarkTileDirtyByTile(tile); |
396 MarkTileDirtyByTile(tile); |
390 } |
397 } |
391 |
398 |
392 /** Make the house advances in its construction stages until completion |
399 /** Make the house advances in its construction stages until completion |
1642 DoCommand(tile, 0, 0, DC_EXEC | DC_AUTO | DC_NO_WATER, CMD_LANDSCAPE_CLEAR); |
1649 DoCommand(tile, 0, 0, DC_EXEC | DC_AUTO | DC_NO_WATER, CMD_LANDSCAPE_CLEAR); |
1643 |
1650 |
1644 assert(CmdSucceeded(cc)); |
1651 assert(CmdSucceeded(cc)); |
1645 |
1652 |
1646 MakeHouseTile(tile, tid, counter, stage, type, random_bits); |
1653 MakeHouseTile(tile, tid, counter, stage, type, random_bits); |
|
1654 if (GetHouseSpecs(type)->building_flags & BUILDING_IS_ANIMATED) AddAnimatedTile(tile); |
|
1655 |
|
1656 MarkTileDirtyByTile(tile); |
1647 } |
1657 } |
1648 |
1658 |
1649 |
1659 |
1650 /** |
1660 /** |
1651 * Write house information into the map. For houses > 1 tile, all tiles are marked. |
1661 * Write house information into the map. For houses > 1 tile, all tiles are marked. |