| 55 | + /* Connect the water if a lock would be build on the inclined slope */
| 55 | +// /* Connect the water if a lock would be build on the inclined slope */
|
|---|
| 56 | + Slope slope = GetTileSlope(path->node.tile);
| 56 | +// int height_tile;
|
|---|
| 57 | + if (IsInclinedSlope(slope)) {
| 57 | +// Slope slope = GetTileSlope(path->node.tile, &height_tile);
|
|---|
| 58 | + DiagDirection dir = GetInclinedSlopeDirection(slope);
| 58 | +// if (IsInclinedSlope(slope)) {
|
|---|
| 59 | + int delta_mid = TileOffsByDiagDir(dir);
| 59 | +// DiagDirection dir = GetInclinedSlopeDirection(slope);
|
|---|
| 60 | + int delta = TileOffsByDiagDir(ChangeDiagDir(dir, DIAGDIRDIFF_90RIGHT));
| 60 | +// int delta_mid = TileOffsByDiagDir(dir);
|
|---|
| 61 | + TileIndex tile_upper = path->node.tile + 2 * delta_mid;
| 61 | +// int delta = TileOffsByDiagDir(ChangeDiagDir(dir, DIAGDIRDIFF_90RIGHT));
|
|---|
| 62 | + TileIndex tile_upper_right = tile_upper + delta;
| 62 | +// TileIndex tile_upper = path->node.tile + 2 * delta_mid;
|
|---|
| 63 | + TileIndex tile_upper_right_far = tile_upper_right + delta_mid;
| 63 | +// TileIndex tile_upper_right = tile_upper + delta;
|
|---|
| 64 | + TileIndex tile_upper_left = tile_upper - delta;
| 64 | +// TileIndex tile_upper_right_far = tile_upper_right + delta_mid;
|
|---|
| 65 | + TileIndex tile_upper_left_far = tile_upper_left + delta_mid;
| 65 | +// TileIndex tile_upper_left = tile_upper - delta;
|
|---|
| 66 | + TileIndex tile_lower = path->node.tile - 2 * delta_mid;
| 66 | +// TileIndex tile_upper_left_far = tile_upper_left + delta_mid;
|
|---|
| 67 | + TileIndex tile_lower_right = tile_lower + delta;
| 67 | +// TileIndex tile_lower = path->node.tile - 2 * delta_mid;
|
|---|
| 68 | + TileIndex tile_lower_right_far = tile_lower_right - delta_mid;
| 68 | +// TileIndex tile_lower_right = tile_lower + delta;
|
|---|
| 69 | + TileIndex tile_lower_left = tile_lower - delta;
| 69 | +// TileIndex tile_lower_right_far = tile_lower_right - delta_mid;
|
|---|
| 70 | + TileIndex tile_lower_left_far = tile_lower_left - delta_mid;
| 70 | +// TileIndex tile_lower_left = tile_lower - delta;
|
|---|
| 71 | + TileIndex tiles[] = {tile_upper, tile_upper_right, tile_upper_right_far, tile_upper_left, tile_upper_left_far, tile_lower, tile_lower_right, tile_lower_right_far, tile_lower_left, tile_lower_left_far};
| 71 | +// TileIndex tile_lower_left_far = tile_lower_left - delta_mid;
|
|---|
| 72 | + for (int i = 0; i < lengthof(tiles); i++) {
| 72 | +
|
|---|
| 73 | + if (!IsWaterTile(tiles[i]) && IsTileFlat(tiles[i])) {
| 73 | +// int height_tile_delta;
|
|---|
| 74 | + MakeRiver(tiles[i], Random());
| 74 | +// TileIndex tiles_lower[] = {tile_lower, tile_lower_right, tile_lower_right_far, tile_lower_left, tile_lower_left_far};
|
|---|
| 75 | + /* Remove desert directly around the river tile. */
| 75 | +// for (int i = 0; i < lengthof(tiles_lower); i++) {
|
|---|
| 76 | + CircularTileSearch(&tiles[i], 5, RiverModifyDesertZone, NULL);
| 76 | +// if (!IsWaterTile(tiles_lower[i]) && (GetTileSlope(tiles_lower[i], &height_tile_delta) == SLOPE_FLAT) && height_tile_delta == height_tile) {
|
|---|
| 77 | + }
| 77 | +// MakeRiver(tiles_lower[i], Random());
|
|---|
| 78 | + }
| 78 | +// /* Remove desert directly around the river tile. */
|
|---|
| 79 | + }
| 79 | +// CircularTileSearch(&tiles_lower[i], 5, RiverModifyDesertZone, NULL);
|
|---|
| | | 80 | +// }
|
|---|
| | | 81 | +// }
|
|---|
| | | 82 | +//
|
|---|
| | | 83 | +// TileIndex tiles_upper[] = {tile_upper, tile_upper_right, tile_upper_right_far, tile_upper_left, tile_upper_left_far};
|
|---|
| | | 84 | +// for (int i = 0; i < lengthof(tiles_upper); i++) {
|
|---|
| | | 85 | +// if (!IsWaterTile(tiles_upper[i]) && (GetTileSlope(tiles_upper[i], &height_tile_delta) == SLOPE_FLAT) && height_tile_delta == height_tile + 1) {
|
|---|
| | | 86 | +// MakeRiver(tiles_upper[i], Random());
|
|---|
| | | 87 | +// /* Remove desert directly around the river tile. */
|
|---|
| | | 88 | +// CircularTileSearch(&tiles_upper[i], 5, RiverModifyDesertZone, NULL);
|
|---|
| | | 89 | +// }
|
|---|
| | | 90 | +// }
|
|---|
| | | 91 | +// }
|
|---|
| | | 92 | +
|
|---|