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

Method plopBRiver

MicropolisCore/src/MicropolisEngine/src/generate.cpp:613–633  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

611 * @param pos Base coordinate of the blob (top-left position).
612 */
613void Micropolis::plopBRiver(const Position &pos)
614{
615 short x, y;
616 static MapValue BRMatrix[9][9] = {
617 { 0, 0, 0, REDGE, REDGE, REDGE, 0, 0, 0 },
618 { 0, 0, REDGE, RIVER, RIVER, RIVER, REDGE, 0, 0 },
619 { 0, REDGE, RIVER, RIVER, RIVER, RIVER, RIVER, REDGE, 0 },
620 { REDGE, RIVER, RIVER, RIVER, RIVER, RIVER, RIVER, RIVER, REDGE },
621 { REDGE, RIVER, RIVER, RIVER, CHANNEL, RIVER, RIVER, RIVER, REDGE },
622 { REDGE, RIVER, RIVER, RIVER, RIVER, RIVER, RIVER, RIVER, REDGE },
623 { 0, REDGE, RIVER, RIVER, RIVER, RIVER, RIVER, REDGE, 0 },
624 { 0, 0, REDGE, RIVER, RIVER, RIVER, REDGE, 0, 0 },
625 { 0, 0, 0, REDGE, REDGE, REDGE, 0, 0, 0 },
626 };
627
628 for (x = 0; x < 9; x++) {
629 for (y = 0; y < 9; y++) {
630 putOnMap(BRMatrix[y][x], pos.posX + x, pos.posY + y);
631 }
632 }
633}
634
635
636/**

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected