Freeciv-3.1: /fast/freeciv/nightly/S3_1/common/terrain.h Source File

Freeciv-3.1

Loading...
Searching...
No Matches
terrain.h
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13#ifndef FC__TERRAIN_H
14#define FC__TERRAIN_H
15
16#ifdef __cplusplus
17extern "C" {
18#endif /* __cplusplus */
19
20/* utility */
21#include "bitvector.h"
22#include "shared.h"
23
24/* common */
25#include "fc_types.h"
26#include "name_translation.h"
27#include "unittype.h"
28
29struct base_type;
30struct strvec; /* Actually defined in "utility/string_vector.h". */
31struct rgbcolor;
32
33/* Used in the network protocol. */
34 enum special_river_move {
35 RMV_NORMAL = 0,
36 RMV_FAST_STRICT = 1,
37 RMV_FAST_RELAXED = 2,
38 RMV_FAST_ALWAYS = 3,
39};
40
41/* === */
42
43 struct resource_type {
44
45 char id_old_save; /* Single-character identifier used in old savegames. */
46#define RESOURCE_NULL_IDENTIFIER '\0'
47#define RESOURCE_NONE_IDENTIFIER ' '
48
49 int output[O_LAST]; /* Amount added by this resource. */
50
51 struct extra_type *self;
52};
53
54/* === */
55
56#define T_NONE (NULL) /* A special flag meaning no terrain type. */
57#define T_UNKNOWN (NULL) /* An unknown terrain. */
58
59/* The first terrain value. */
60#define T_FIRST 0
61
62/* A hard limit on the number of terrains; useful for static arrays.
63 * Used in the network protocol. */
64#define MAX_NUM_TERRAINS (96)
65/* Reflect reality; but theoretically could be larger than terrains!
66 * Used in the network protocol. */
67#define MAX_RESOURCE_TYPES (MAX_NUM_TERRAINS / 2)
68
69/* Used in the network protocol. */
70#define SPECENUM_NAME terrain_class
71#define SPECENUM_VALUE0 TC_LAND
72/* TRANS: terrain class: used adjectivally */
73#define SPECENUM_VALUE0NAME N_("Land")
74#define SPECENUM_VALUE1 TC_OCEAN
75/* TRANS: terrain class: used adjectivally */
76#define SPECENUM_VALUE1NAME N_("Oceanic")
77#define SPECENUM_COUNT TC_COUNT
78#include "specenum_gen.h"
79
80/* Types of alterations available to terrain.
81 * This enum is only used in the effects system; the relevant information
82 * is encoded in other members of the terrain structure.
83 *
84 * Used in the network protocol. */
85#define SPECENUM_NAME terrain_alteration
86/* Can build irrigation without changing terrain */
87#define SPECENUM_VALUE0 TA_CAN_IRRIGATE
88/* TRANS: this and following strings may rarely be presented to the player
89 * in ruleset help text, to denote the set of terrains which can be altered
90 * in a particular way */
91#define SPECENUM_VALUE0NAME N_("CanIrrigate")
92/* Can build mine without changing terrain */
93#define SPECENUM_VALUE1 TA_CAN_MINE
94#define SPECENUM_VALUE1NAME N_("CanMine")
95/* Can build roads and/or railroads */
96#define SPECENUM_VALUE2 TA_CAN_ROAD
97#define SPECENUM_VALUE2NAME N_("CanRoad")
98#define SPECENUM_COUNT TA_COUNT
99#include "specenum_gen.h"
100
101/* Used in the network protocol. */
102#define SPECENUM_NAME terrain_flag_id
103/* No barbarians summoned on this terrain. */
104#define SPECENUM_VALUE0 TER_NO_BARBS
105/* TRANS: this and following strings are 'terrain flags', which may rarely
106 * be presented to the player in ruleset help text */
107#define SPECENUM_VALUE0NAME N_("NoBarbs")
108/* No cities on this terrain. */
109#define SPECENUM_VALUE1 TER_NO_CITIES
110#define SPECENUM_VALUE1NAME N_("NoCities")
111/* Players will start on this terrain type. */
112#define SPECENUM_VALUE2 TER_STARTER
113#define SPECENUM_VALUE2NAME N_("Starter")
114/* Terrains with this type can have road with "River" flag on them. */
115#define SPECENUM_VALUE3 TER_CAN_HAVE_RIVER
116#define SPECENUM_VALUE3NAME N_("CanHaveRiver")
117/*this tile is not safe as coast, (all ocean / ice) */
118#define SPECENUM_VALUE4 TER_UNSAFE_COAST
119#define SPECENUM_VALUE4NAME N_("UnsafeCoast")
120/* Fresh water terrain */
121#define SPECENUM_VALUE5 TER_FRESHWATER
122#define SPECENUM_VALUE5NAME N_("FreshWater")
123/* Map generator does not place this terrain */
124#define SPECENUM_VALUE6 TER_NOT_GENERATED
125#define SPECENUM_VALUE6NAME N_("NotGenerated")
126/* Units on this terrain are not generating or subject to zoc */
127#define SPECENUM_VALUE7 TER_NO_ZOC
128#define SPECENUM_VALUE7NAME N_("NoZoc")
129/* Ice-covered terrain (affects minimap) */
130#define SPECENUM_VALUE8 TER_FROZEN
131#define SPECENUM_VALUE8NAME N_("Frozen")
132#define SPECENUM_VALUE9 TER_USER_1
133#define SPECENUM_VALUE10 TER_USER_2
134#define SPECENUM_VALUE11 TER_USER_3
135#define SPECENUM_VALUE12 TER_USER_4
136#define SPECENUM_VALUE13 TER_USER_5
137#define SPECENUM_VALUE14 TER_USER_6
138#define SPECENUM_VALUE15 TER_USER_7
139#define SPECENUM_VALUE16 TER_USER_8
140#define SPECENUM_VALUE17 TER_USER_9
141#define SPECENUM_VALUE18 TER_USER_LAST
142#define SPECENUM_NAMEOVERRIDE
143#define SPECENUM_BITVECTOR bv_terrain_flags
144#include "specenum_gen.h"
145
146#define MAX_NUM_USER_TER_FLAGS (TER_USER_LAST - TER_USER_1 + 1)
147
148#define SPECENUM_NAME mapgen_terrain_property
149#define SPECENUM_VALUE0 MG_MOUNTAINOUS
150#define SPECENUM_VALUE0NAME "mountainous"
151#define SPECENUM_VALUE1 MG_GREEN
152#define SPECENUM_VALUE1NAME "green"
153#define SPECENUM_VALUE2 MG_FOLIAGE
154#define SPECENUM_VALUE2NAME "foliage"
155#define SPECENUM_VALUE3 MG_TROPICAL
156#define SPECENUM_VALUE3NAME "tropical"
157#define SPECENUM_VALUE4 MG_TEMPERATE
158#define SPECENUM_VALUE4NAME "temperate"
159#define SPECENUM_VALUE5 MG_COLD
160#define SPECENUM_VALUE5NAME "cold"
161#define SPECENUM_VALUE6 MG_FROZEN
162#define SPECENUM_VALUE6NAME "frozen"
163#define SPECENUM_VALUE7 MG_WET
164#define SPECENUM_VALUE7NAME "wet"
165#define SPECENUM_VALUE8 MG_DRY
166#define SPECENUM_VALUE8NAME "dry"
167#define SPECENUM_VALUE9 MG_OCEAN_DEPTH
168#define SPECENUM_VALUE9NAME "ocean_depth"
169#define SPECENUM_COUNT MG_COUNT
170#include "specenum_gen.h"
171
172/*
173 * This struct gives data about each terrain type. There are many ways
174 * it could be extended.
175 */
176 struct terrain {
177 int item_number;
178 struct name_translation name;
179 bool ruledit_disabled; /* Does not really exist - hole in terrain array */
180 void *ruledit_dlg;
181 char graphic_str[MAX_LEN_NAME]; /* add tile_ prefix */
182 char graphic_alt[MAX_LEN_NAME];
183
184 char identifier; /* Single-character identifier used in games saved. */
185 char identifier_load; /* Single-character identifier that was used in the savegame
186 * loaded. */
187
188#define TERRAIN_UNKNOWN_IDENTIFIER 'u'
189
190 enum terrain_class tclass;
191
192 int movement_cost; /* whole MP, not scaled by SINGLE_MOVE */
193 int defense_bonus; /* % defense bonus - defaults to zero */
194
195 int output[O_LAST];
196
197 struct extra_type **resources; /* NULL-terminated */
198
199 int road_output_incr_pct[O_LAST];
200 int base_time;
201 int road_time;
202
203 struct terrain *cultivate_result;
204 int cultivate_time;
205
206 struct terrain *plant_result;
207 int plant_time;
208
209 int irrigation_food_incr;
210 int irrigation_time;
211
212 int mining_shield_incr;
213 int mining_time;
214
215 int placing_time;
216
217 struct terrain *transform_result;
218 int transform_time;
219 int clean_pollution_time;
220 int clean_fallout_time;
221 int pillage_time;
222
223 const struct unit_type *animal;
224
225 /* May be NULL if the transformation is impossible. */
226 struct terrain *warmer_wetter_result, *warmer_drier_result;
227 struct terrain *cooler_wetter_result, *cooler_drier_result;
228
229 /* These are special properties of the terrain used by mapgen. If a tile
230 * has a property, then the value gives the weighted amount of tiles that
231 * will be assigned this terrain.
232 *
233 * For instance if mountains have 70 and hills have 30 of MG_MOUNTAINOUS
234 * then 70% of 'mountainous' tiles will be given mountains.
235 *
236 * Ocean_depth is different. Instead of a percentage, the depth of the
237 * tile in the range 0 (never chosen) to 100 (deepest) is used.
238 */
239 int property[MG_COUNT];
240#define TERRAIN_OCEAN_DEPTH_MINIMUM (1)
241#define TERRAIN_OCEAN_DEPTH_MAXIMUM (100)
242
243 bv_unit_classes native_to;
244
245 bv_terrain_flags flags;
246
247 struct rgbcolor *rgb;
248
249 struct strvec *helptext;
250};
251
252/* General terrain accessor functions. */
253 Terrain_type_id terrain_count(void);
254 Terrain_type_id terrain_index(const struct terrain *pterrain);
255 Terrain_type_id terrain_number(const struct terrain *pterrain);
256
257struct terrain *terrain_by_number(const Terrain_type_id type);
258
259struct terrain *terrain_by_identifier(const char identifier);
260struct terrain *terrain_by_rule_name(const char *name);
261struct terrain *terrain_by_translated_name(const char *name);
262struct terrain *rand_terrain_by_flag(enum terrain_flag_id flag);
263
264char terrain_identifier(const struct terrain *pterrain);
265const char *terrain_rule_name(const struct terrain *pterrain);
266const char *terrain_name_translation(const struct terrain *pterrain);
267
268/* Functions to operate on a terrain flag. */
269#define terrain_has_flag(terr, flag) BV_ISSET((terr)->flags, flag)
270
271bool is_terrain_flag_card_near(const struct civ_map *nmap,
272 const struct tile *ptile,
273 enum terrain_flag_id flag);
274bool is_terrain_flag_near_tile(const struct civ_map *nmap,
275 const struct tile *ptile,
276 enum terrain_flag_id flag);
277int count_terrain_flag_near_tile(const struct civ_map *nmap,
278 const struct tile *ptile,
279 bool cardinal_only, bool percentage,
280 enum terrain_flag_id flag);
281void user_terrain_flags_init(void);
282void user_terrain_flags_free(void);
283void set_user_terrain_flag_name(enum terrain_flag_id id, const char *name, const char *helptxt);
284const char *terrain_flag_helptxt(enum terrain_flag_id id);
285
286/* Terrain-specific functions. */
287#define is_ocean(pterrain) ((pterrain) != T_UNKNOWN \
288 && terrain_type_terrain_class(pterrain) == TC_OCEAN)
289#define is_ocean_tile(ptile) \
290 is_ocean(tile_terrain(ptile))
291
292bool terrain_has_resource(const struct terrain *pterrain,
293 const struct extra_type *presource);
294
295/* Functions to operate on a general terrain type. */
296bool is_terrain_card_near(const struct civ_map *nmap,
297 const struct tile *ptile,
298 const struct terrain *pterrain,
299 bool check_self);
300bool is_terrain_near_tile(const struct civ_map *nmap,
301 const struct tile *ptile,
302 const struct terrain *pterrain,
303 bool check_self);
304int count_terrain_property_near_tile(const struct civ_map *nmap,
305 const struct tile *ptile,
306 bool cardinal_only, bool percentage,
307 enum mapgen_terrain_property prop);
308
309bool is_resource_card_near(const struct civ_map *nmap,
310 const struct tile *ptile,
311 const struct extra_type *pres,
312 bool check_self);
313bool is_resource_near_tile(const struct civ_map *nmap,
314 const struct tile *ptile,
315 const struct extra_type *pres,
316 bool check_self);
317
318struct resource_type *resource_type_init(struct extra_type *pextra);
319void resource_types_free(void);
320
321struct extra_type *resource_extra_get(const struct resource_type *presource);
322
323/* Special helper functions */
324const char *get_infrastructure_text(bv_extras extras);
325struct extra_type *get_preferred_pillage(bv_extras extras);
326
327int terrain_extra_build_time(const struct terrain *pterrain,
328 enum unit_activity activity,
329 const struct extra_type *tgt);
330int terrain_extra_removal_time(const struct terrain *pterrain,
331 enum unit_activity activity,
332 const struct extra_type *tgt);
333
334/* Functions to operate on a terrain class. */
335const char *terrain_class_name_translation(enum terrain_class tclass);
336
337enum terrain_class terrain_type_terrain_class(const struct terrain *pterrain);
338bool is_terrain_class_card_near(const struct civ_map *nmap,
339 const struct tile *ptile, enum terrain_class tclass);
340bool is_terrain_class_near_tile(const struct civ_map *nmap,
341 const struct tile *ptile, enum terrain_class tclass);
342int count_terrain_class_near_tile(const struct civ_map *nmap,
343 const struct tile *ptile,
344 bool cardinal_only, bool percentage,
345 enum terrain_class tclass);
346
347/* Functions to deal with possible terrain alterations. */
348bool terrain_can_support_alteration(const struct terrain *pterrain,
349 enum terrain_alteration talter);
350
351/* Initialization and iteration */
352void terrains_init(void);
353void terrains_free(void);
354
355struct terrain *terrain_array_first(void);
356const struct terrain *terrain_array_last(void);
357
358#define terrain_type_iterate(_p) \
359{ \
360 struct terrain *_p = terrain_array_first(); \
361 if (NULL != _p) { \
362 for (; _p <= terrain_array_last(); _p++) {
363
364#define terrain_type_iterate_end \
365 } \
366 } \
367}
368
369#define terrain_re_active_iterate(_p) \
370 terrain_type_iterate(_p) { \
371 if (!_p->ruledit_disabled) {
372
373#define terrain_re_active_iterate_end \
374 } \
375 } terrain_type_iterate_end;
376
377#ifdef __cplusplus
378}
379#endif /* __cplusplus */
380
381#endif /* FC__TERRAIN_H */
bitvector.h
extras
static struct extra_type extras[MAX_EXTRA_TYPES]
Definition extras.c:31
fc_types.h
Terrain_type_id
int Terrain_type_id
Definition fc_types.h:343
MAX_LEN_NAME
#define MAX_LEN_NAME
Definition fc_types.h:66
O_LAST
@ O_LAST
Definition fc_types.h:91
type
GType type
Definition repodlgs.c:1312
name
const char * name
Definition inputfile.c:127
name_translation.h
shared.h
specenum_gen.h
base_type
Definition base.h:41
civ_map
Definition map_types.h:71
extra_type
Definition extras.h:85
name_translation
Definition name_translation.h:35
resource_type
Definition terrain.h:43
resource_type::self
struct extra_type * self
Definition terrain.h:51
resource_type::id_old_save
char id_old_save
Definition terrain.h:45
resource_type::output
int output[O_LAST]
Definition terrain.h:49
rgbcolor
Definition rgbcolor.h:33
strvec
Definition string_vector.c:29
terrain
Definition terrain.h:176
terrain::cultivate_result
struct terrain * cultivate_result
Definition terrain.h:203
terrain::placing_time
int placing_time
Definition terrain.h:215
terrain::cooler_wetter_result
struct terrain * cooler_wetter_result
Definition terrain.h:227
terrain::resources
struct extra_type ** resources
Definition terrain.h:197
terrain::cooler_drier_result
struct terrain * cooler_drier_result
Definition terrain.h:227
terrain::item_number
int item_number
Definition terrain.h:177
terrain::helptext
struct strvec * helptext
Definition terrain.h:249
terrain::warmer_wetter_result
struct terrain * warmer_wetter_result
Definition terrain.h:226
terrain::flags
bv_terrain_flags flags
Definition terrain.h:245
terrain::native_to
bv_unit_classes native_to
Definition terrain.h:243
terrain::road_time
int road_time
Definition terrain.h:201
terrain::name
struct name_translation name
Definition terrain.h:178
terrain::plant_time
int plant_time
Definition terrain.h:207
terrain::plant_result
struct terrain * plant_result
Definition terrain.h:206
terrain::irrigation_food_incr
int irrigation_food_incr
Definition terrain.h:209
terrain::clean_fallout_time
int clean_fallout_time
Definition terrain.h:220
terrain::warmer_drier_result
struct terrain * warmer_drier_result
Definition terrain.h:226
terrain::defense_bonus
int defense_bonus
Definition terrain.h:193
terrain::cultivate_time
int cultivate_time
Definition terrain.h:204
terrain::movement_cost
int movement_cost
Definition terrain.h:192
terrain::animal
const struct unit_type * animal
Definition terrain.h:223
terrain::pillage_time
int pillage_time
Definition terrain.h:221
terrain::output
int output[O_LAST]
Definition terrain.h:195
terrain::transform_time
int transform_time
Definition terrain.h:218
terrain::graphic_alt
char graphic_alt[MAX_LEN_NAME]
Definition terrain.h:182
terrain::mining_time
int mining_time
Definition terrain.h:213
terrain::identifier_load
char identifier_load
Definition terrain.h:185
terrain::rgb
struct rgbcolor * rgb
Definition terrain.h:247
terrain::clean_pollution_time
int clean_pollution_time
Definition terrain.h:219
terrain::graphic_str
char graphic_str[MAX_LEN_NAME]
Definition terrain.h:181
terrain::tclass
enum terrain_class tclass
Definition terrain.h:190
terrain::road_output_incr_pct
int road_output_incr_pct[O_LAST]
Definition terrain.h:199
terrain::transform_result
struct terrain * transform_result
Definition terrain.h:217
terrain::irrigation_time
int irrigation_time
Definition terrain.h:210
terrain::base_time
int base_time
Definition terrain.h:200
terrain::mining_shield_incr
int mining_shield_incr
Definition terrain.h:212
terrain::ruledit_dlg
void * ruledit_dlg
Definition terrain.h:180
terrain::identifier
char identifier
Definition terrain.h:184
terrain::ruledit_disabled
bool ruledit_disabled
Definition terrain.h:179
tile
Definition tile.h:49
unit_type
Definition unittype.h:481
terrain_extra_removal_time
int terrain_extra_removal_time(const struct terrain *pterrain, enum unit_activity activity, const struct extra_type *tgt)
Definition terrain.c:718
user_terrain_flags_init
void user_terrain_flags_init(void)
Definition terrain.c:752
terrains_free
void terrains_free(void)
Definition terrain.c:59
terrain_by_rule_name
struct terrain * terrain_by_rule_name(const char *name)
Definition terrain.c:174
is_terrain_class_near_tile
bool is_terrain_class_near_tile(const struct civ_map *nmap, const struct tile *ptile, enum terrain_class tclass)
Definition terrain.c:600
terrain_identifier
char terrain_identifier(const struct terrain *pterrain)
Definition terrain.c:114
terrain_count
Terrain_type_id terrain_count(void)
Definition terrain.c:106
terrains_init
void terrains_init(void)
Definition terrain.c:42
resource_extra_get
struct extra_type * resource_extra_get(const struct resource_type *presource)
Definition terrain.c:284
terrain_can_support_alteration
bool terrain_can_support_alteration(const struct terrain *pterrain, enum terrain_alteration talter)
Definition terrain.c:661
count_terrain_class_near_tile
int count_terrain_class_near_tile(const struct civ_map *nmap, const struct tile *ptile, bool cardinal_only, bool percentage, enum terrain_class tclass)
Definition terrain.c:621
is_terrain_class_card_near
bool is_terrain_class_card_near(const struct civ_map *nmap, const struct tile *ptile, enum terrain_class tclass)
Definition terrain.c:579
terrain_by_translated_name
struct terrain * terrain_by_translated_name(const char *name)
Definition terrain.c:190
terrain_class_name_translation
const char * terrain_class_name_translation(enum terrain_class tclass)
Definition terrain.c:649
count_terrain_flag_near_tile
int count_terrain_flag_near_tile(const struct civ_map *nmap, const struct tile *ptile, bool cardinal_only, bool percentage, enum terrain_flag_id flag)
Definition terrain.c:466
get_infrastructure_text
const char * get_infrastructure_text(bv_extras extras)
Definition terrain.c:496
terrain_index
Terrain_type_id terrain_index(const struct terrain *pterrain)
Definition terrain.c:126
is_resource_card_near
bool is_resource_card_near(const struct civ_map *nmap, const struct tile *ptile, const struct extra_type *pres, bool check_self)
Definition terrain.c:383
terrain_name_translation
const char * terrain_name_translation(const struct terrain *pterrain)
Definition terrain.c:226
terrain_array_first
struct terrain * terrain_array_first(void)
Definition terrain.c:84
rand_terrain_by_flag
struct terrain * rand_terrain_by_flag(enum terrain_flag_id flag)
Definition terrain.c:205
terrain_by_number
struct terrain * terrain_by_number(const Terrain_type_id type)
Definition terrain.c:144
is_terrain_card_near
bool is_terrain_card_near(const struct civ_map *nmap, const struct tile *ptile, const struct terrain *pterrain, bool check_self)
Definition terrain.c:315
terrain_rule_name
const char * terrain_rule_name(const struct terrain *pterrain)
Definition terrain.c:235
is_resource_near_tile
bool is_resource_near_tile(const struct civ_map *nmap, const struct tile *ptile, const struct extra_type *pres, bool check_self)
Definition terrain.c:404
resource_types_free
void resource_types_free(void)
Definition terrain.c:276
user_terrain_flags_free
void user_terrain_flags_free(void)
Definition terrain.c:764
terrain_type_terrain_class
enum terrain_class terrain_type_terrain_class(const struct terrain *pterrain)
Definition terrain.c:570
terrain_flag_helptxt
const char * terrain_flag_helptxt(enum terrain_flag_id id)
Definition terrain.c:817
terrain_has_resource
bool terrain_has_resource(const struct terrain *pterrain, const struct extra_type *presource)
Definition terrain.c:243
resource_type_init
struct resource_type * resource_type_init(struct extra_type *pextra)
Definition terrain.c:260
is_terrain_flag_near_tile
bool is_terrain_flag_near_tile(const struct civ_map *nmap, const struct tile *ptile, enum terrain_flag_id flag)
Definition terrain.c:446
get_preferred_pillage
struct extra_type * get_preferred_pillage(bv_extras extras)
Definition terrain.c:538
set_user_terrain_flag_name
void set_user_terrain_flag_name(enum terrain_flag_id id, const char *name, const char *helptxt)
Definition terrain.c:776
terrain_array_last
const struct terrain * terrain_array_last(void)
Definition terrain.c:95
terrain_extra_build_time
int terrain_extra_build_time(const struct terrain *pterrain, enum unit_activity activity, const struct extra_type *tgt)
Definition terrain.c:682
terrain_number
Terrain_type_id terrain_number(const struct terrain *pterrain)
Definition terrain.c:135
terrain_by_identifier
struct terrain * terrain_by_identifier(const char identifier)
Definition terrain.c:157
is_terrain_flag_card_near
bool is_terrain_flag_card_near(const struct civ_map *nmap, const struct tile *ptile, enum terrain_flag_id flag)
Definition terrain.c:426
special_river_move
special_river_move
Definition terrain.h:34
RMV_NORMAL
@ RMV_NORMAL
Definition terrain.h:35
RMV_FAST_RELAXED
@ RMV_FAST_RELAXED
Definition terrain.h:37
RMV_FAST_STRICT
@ RMV_FAST_STRICT
Definition terrain.h:36
RMV_FAST_ALWAYS
@ RMV_FAST_ALWAYS
Definition terrain.h:38
count_terrain_property_near_tile
int count_terrain_property_near_tile(const struct civ_map *nmap, const struct tile *ptile, bool cardinal_only, bool percentage, enum mapgen_terrain_property prop)
Definition terrain.c:357
is_terrain_near_tile
bool is_terrain_near_tile(const struct civ_map *nmap, const struct tile *ptile, const struct terrain *pterrain, bool check_self)
Definition terrain.c:336
unittype.h