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

Method doRivers

MicropolisCore/src/MicropolisEngine/src/generate.cpp:479–492  ·  view source on GitHub ↗

* Construct rivers. * @param terrainPos Coordinate to start making a river. */

Source from the content-addressed store, hash-verified

477 * @param terrainPos Coordinate to start making a river.
478 */
479void Micropolis::doRivers(const Position &terrainPos)
480{
481 Direction2 riverDir; // Global direction of the river
482 Direction2 terrainDir; // Local direction of the river
483
484 riverDir = (Direction2)(DIR2_NORTH + (getRandom(3) * 2));
485 doBRiver(terrainPos, riverDir, riverDir);
486
487 riverDir = rotate180(riverDir);
488 terrainDir = doBRiver(terrainPos, riverDir, riverDir);
489
490 riverDir = (Direction2)(DIR2_NORTH + (getRandom(3) * 2));
491 doSRiver(terrainPos, riverDir, terrainDir);
492}
493
494
495/**

Callers

nothing calls this directly

Calls 1

rotate180Function · 0.85

Tested by

no test coverage detected