MCPcopy Create free account
hub / github.com/SimHacker/micropolis / coalSmoke

Method coalSmoke

MicropolisCore/src/MicropolisEngine/src/simulate.cpp:1648–1661  ·  view source on GitHub ↗

* Draw coal smoke tiles around given position (of a coal power plant). * @param pos Center tile of the coal power plant */

Source from the content-addressed store, hash-verified

1646 * @param pos Center tile of the coal power plant
1647 */
1648void Micropolis::coalSmoke(const Position &pos)
1649{
1650 static const short SmTb[4] = {
1651 COALSMOKE1, COALSMOKE2,
1652 COALSMOKE3, COALSMOKE4,
1653 };
1654 static const short dx[4] = { 1, 2, 1, 2 };
1655 static const short dy[4] = { -1, -1, 0, 0 };
1656
1657 for (short x = 0; x < 4; x++) {
1658 map[pos.posX + dx[x]][pos.posY + dy[x]] =
1659 SmTb[x] | ANIMBIT | CONDBIT | PWRBIT | BURNBIT;
1660 }
1661}
1662
1663
1664/**

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected