27 static void fmfill(
int x,
int y,
int c,
int r);
108 const int minx = wrapx ? 0 : 3, maxx =
wld.
map.
xsize - (wrapx ? 0 : 6),
109 miny = wrapy ? 0 : 3, maxy =
wld.
map.
ysize - (wrapy ? 0 : 6);
178 fmfill(xc - x, yc - y, nn, r);
179 fmfill(xc - y, yc - x, nn, r);
180 fmfill(xc + y, yc - x, nn, r);
181 fmfill(xc + x, yc - y, nn, r);
182 fmfill(xc - x, yc + y, nn, r);
183 fmfill(xc - y, yc + x, nn, r);
184 fmfill(xc + y, yc + x, nn, r);
185 fmfill(xc + x, yc + y, nn, r);
189 p += 4 * (x++ - y--) + 10;
198 static void fmfill(
int x,
int y,
int c,
int r)
200 int x_less, x_more, y_less, y_more;
201 struct tile *ptileXY;
202 struct tile *ptileX2Y;
203 struct tile *ptileX1Y;
204 struct tile *ptileXY2;
205 struct tile *ptileXY1;
206 struct tile *ptileX2Y1;
207 struct tile *ptileX2Y2;
208 struct tile *ptileX1Y2;
209 struct tile *ptileX1Y1;
293 ele = ele +
hmap(tile2);
313 bool choose_mountain;
350 choose_mountain =
false;
353 if (choose_mountain) {
358 }
else if (choose_hill) {
375 total_mtns < (landarea *
wld.
map.
server.steepness) / 100 && iter < 50;
381 choose_mountain =
fc_rand(10000) < 10;
382 choose_hill =
fc_rand(10000) < 10;
383 if (choose_mountain) {
388 }
else if (choose_hill) {
396 if (total_mtns >= landarea *
wld.
map.
server.steepness / 100) {
void make_fracture_hmap()
Fracture map generator.
static int local_ave_elevation(struct tile *ptile)
Determine the local average elevation.
void make_fracture_relief()
make_fracture_relief() Goes through a couple of iterations.
static void fmfill(int x, int y, int c, int r)
Assign landmass in 3x3 area increments to avoid "holes" created by the circle algorithm.
static map_landmass * landmass
static void circle_bresenham(int xc, int yc, int r, int nn)
An expanding circle from the fracture point is used to determine the midpoint between fractures.
static map_point * fracture_points
bool area_is_too_flat(struct tile *ptile, int thill, int my_height)
We don't want huge areas of grass/plains, so we put in a hill here and there, where it gets too 'clea...
#define fc_assert_ret_val(condition, val)
struct tile * native_pos_to_tile(const struct civ_map *nmap, int nat_x, int nat_y)
Return the tile for the given native position.
#define square_iterate(nmap, center_tile, radius, tile_itr)
#define square_iterate_end
#define whole_map_iterate(_map, _tile)
#define whole_map_iterate_end
int get_sqsize()
An estimate of the linear (1-dimensional) size of the map.
void map_set_placed(struct tile *ptile)
Mark tile terrain as placed.
bool not_placed(const struct tile *ptile)
Checks if land has not yet been placed on pmap at (x, y)
struct terrain * pick_terrain(enum mapgen_terrain_property target, enum mapgen_terrain_property prefer, enum mapgen_terrain_property avoid)
Pick a terrain based on the target property and a property to avoid.
#define adjust_int_map(int_map, int_map_max)
struct civ_map::@39::@41 server
int count_terrain_class_near_tile(const struct tile *ptile, bool cardinal_only, bool percentage, enum terrain_class tclass)
Return the number of adjacent tiles that have given terrain class (not including ptile itself).
void tile_set_terrain(struct tile *ptile, struct terrain *pterrain)
Set the given terrain at the specified tile.