* Put \a mChar onto the map at position \a xLoc, \a yLoc if possible. * @param mChar Map value to put ont the map. * @param xLoc Horizontal position at the map to put \a mChar. * @param yLoc Vertical position at the map to put \a mChar. */
| 581 | * @param yLoc Vertical position at the map to put \a mChar. |
| 582 | */ |
| 583 | void Micropolis::putOnMap(MapValue mChar, short xLoc, short yLoc) |
| 584 | { |
| 585 | if (mChar == 0) { |
| 586 | return; |
| 587 | } |
| 588 | |
| 589 | if (!testBounds(xLoc, yLoc)) { |
| 590 | return; |
| 591 | } |
| 592 | |
| 593 | MapValue temp = map[xLoc][yLoc]; |
| 594 | |
| 595 | if (temp != DIRT) { |
| 596 | temp = temp & LOMASK; |
| 597 | if (temp == RIVER) { |
| 598 | if (mChar != CHANNEL) { |
| 599 | return; |
| 600 | } |
| 601 | } |
| 602 | if (temp == CHANNEL) { |
| 603 | return; |
| 604 | } |
| 605 | } |
| 606 | map[xLoc][yLoc] = mChar; |
| 607 | } |
| 608 | |
| 609 | /** |
| 610 | * Put down a big river diamond-like shape. |
nothing calls this directly
no test coverage detected