Freeciv-3.2
|
#include <math.h>
#include "log.h"
#include "fcintl.h"
#include "game.h"
#include "map.h"
#include "movement.h"
#include "maphand.h"
#include "mapgen_topology.h"
#include "mapgen_utils.h"
#include "startpos.h"
#include "temperature_map.h"
Go to the source code of this file.
Data Structures | |
struct | islands_data_type |
struct | start_filter_data |
Functions | |
static int | get_tile_value (struct tile *ptile) |
static bool | check_native_area (const struct unit_type *utype, const struct tile *ptile, int min_area) |
static bool | is_valid_start_pos (const struct tile *ptile, const void *dataptr) |
static int | compare_islands (const void *A_, const void *B_) |
static void | initialize_isle_data (void) |
static bool | filter_starters (const struct tile *ptile, const void *data) |
bool | create_start_positions (enum map_startpos mode, struct unit_type *initial_unit) |
Variables | |
static struct islands_data_type * | islands |
static int * | islands_index |
|
static |
Check if number of reachable native tiles is sufficient. Initially given tile is assumed to be native (not checked by this function)
Definition at line 130 of file startpos.c.
Referenced by is_valid_start_pos().
Helper function for qsort
Definition at line 252 of file startpos.c.
Referenced by create_start_positions().
bool create_start_positions | ( | enum map_startpos | mode, |
struct unit_type * | initial_unit | ||
) |
where do the different nations start on the map? well this function tries to spread them out on the different islands.
MAPSTARTPOS_SINGLE: one player per isle. MAPSTARTPOS_2or3: 2 players per isle (maybe one isle with 3). MAPSTARTPOS_ALL: all players in asingle isle. MAPSTARTPOS_VARIABLE: at least 2 player per isle.
Assumes assign_continent_numbers() has already been done! Returns true on success
Definition at line 300 of file startpos.c.
Referenced by map_fractal_generate().
A function that filters for TER_STARTER tiles.
Definition at line 283 of file startpos.c.
Referenced by create_start_positions().
Return an approximation of the goodness of a tile to a civilization.
Definition at line 51 of file startpos.c.
Referenced by create_start_positions().
Initialize islands data.
Definition at line 262 of file startpos.c.
Referenced by create_start_positions().
Return TRUE if tile is a good starting position.
Bad places:
Definition at line 187 of file startpos.c.
Referenced by create_start_positions().
|
static |
Definition at line 45 of file startpos.c.
Referenced by create_start_positions(), initialize_isle_data(), and is_valid_start_pos().
|
static |
Definition at line 46 of file startpos.c.
Referenced by create_start_positions(), initialize_isle_data(), and is_valid_start_pos().