![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
#include <QBitArray>#include <cmath>#include "fcintl.h"#include "log.h"#include "game.h"#include "map.h"#include "movement.h"#include "maphand.h"#include "mapgen_utils.h"#include "startpos.h"#include "temperature_map.h"
Include dependency graph for startpos.cpp:Go to the source code of this file.
Classes | |
| struct | islands_data_type |
| struct | start_filter_data |
Functions | |
| static int | get_tile_value (struct tile *ptile) |
| Return an approximation of the goodness of a tile to a civilization. More... | |
| static bool | check_native_area (const struct unit_type *utype, const struct tile *ptile, int min_area) |
| Check if number of reachable native tiles is sufficient. More... | |
| static bool | is_valid_start_pos (const struct tile *ptile, const void *dataptr) |
| Return TRUE if (x,y) is a good starting position. More... | |
| static int | compare_islands (const void *A_, const void *B_) |
| Helper function for qsort. More... | |
| static void | initialize_isle_data () |
| Initialize islands data. More... | |
| static bool | filter_starters (const struct tile *ptile, const void *data) |
| A function that filters for TER_STARTER tiles. More... | |
| 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. More... | |
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 136 of file startpos.cpp.
Referenced by is_valid_start_pos().
|
static |
Helper function for qsort.
Definition at line 261 of file startpos.cpp.
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 310 of file startpos.cpp.
Referenced by map_generate().
|
static |
A function that filters for TER_STARTER tiles.
Definition at line 293 of file startpos.cpp.
Referenced by create_start_positions().
|
static |
Return an approximation of the goodness of a tile to a civilization.
Definition at line 47 of file startpos.cpp.
Referenced by create_start_positions().
|
static |
Initialize islands data.
Definition at line 274 of file startpos.cpp.
Referenced by create_start_positions().
|
static |
Return TRUE if (x,y) is a good starting position.
Bad places:
Definition at line 192 of file startpos.cpp.
Referenced by create_start_positions().
|
static |
Definition at line 41 of file startpos.cpp.
Referenced by create_start_positions(), initialize_isle_data(), and is_valid_start_pos().
|
static |
Definition at line 42 of file startpos.cpp.
Referenced by create_start_positions(), initialize_isle_data(), and is_valid_start_pos().