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

Method plopSRiver

MicropolisCore/src/MicropolisEngine/src/generate.cpp:640–657  ·  view source on GitHub ↗

* Put down a small river diamond-like shape. * @param pos Base coordinate of the blob (top-left position). */

Source from the content-addressed store, hash-verified

638 * @param pos Base coordinate of the blob (top-left position).
639 */
640void Micropolis::plopSRiver(const Position &pos)
641{
642 short x, y;
643 static MapValue SRMatrix[6][6] = {
644 { 0, 0, REDGE, REDGE, 0, 0 },
645 { 0, REDGE, RIVER, RIVER, REDGE, 0 },
646 { REDGE, RIVER, RIVER, RIVER, RIVER, REDGE },
647 { REDGE, RIVER, RIVER, RIVER, RIVER, REDGE },
648 { 0, REDGE, RIVER, RIVER, REDGE, 0 },
649 { 0, 0, REDGE, REDGE, 0, 0 },
650 };
651
652 for (x = 0; x < 6; x++) {
653 for (y = 0; y < 6; y++) {
654 putOnMap(SRMatrix[y][x], pos.posX + x, pos.posY + y);
655 }
656 }
657}
658
659
660void Micropolis::smoothWater()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected