Freeciv-3.3: /fast/freeciv/nightly/main/common/fc_types.h Source File

Freeciv-3.3

Loading...
Searching...
No Matches
fc_types.h
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 2004 - The Freeciv Project
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
14#ifndef FC__FC_TYPES_H
15#define FC__FC_TYPES_H
16
17#ifdef __cplusplus
18extern "C" {
19#endif /* __cplusplus */
20
21/* utility */
22#include "bitvector.h"
23#include "shared.h"
24
25/* This file serves to reduce the cross-inclusion of header files which
26 * occurs when a type which is defined in one file is needed for a function
27 * definition in another file.
28 *
29 * Nothing in this file should require anything else from the common/
30 * directory! */
31
32#define MAX_NUM_PLAYER_SLOTS 512 /* Used in the network protocol. */
33 /* Must be divisable by 32 or iterations
34 * in savegame2.c needs to be changed */
35#define MAX_NUM_BARBARIANS 12 /* 3, but slots reserved for future use. */
36#define MAX_NUM_PLAYERS MAX_NUM_PLAYER_SLOTS - MAX_NUM_BARBARIANS
37/* Used in the network protocol. */
38#define MAX_NUM_CONNECTIONS (2 * (MAX_NUM_PLAYER_SLOTS))
39/* e.g. unit_types. Used in the network protocol. */
40#define MAX_NUM_ITEMS 200
41#define MAX_NUM_ADVANCES 400 /* Used in the network protocol. */
42#define MAX_NUM_UNITS 300 /* Used in the network protocol. */
43#define MAX_NUM_BUILDINGS 200 /* Used in the network protocol. */
44#define MAX_NUM_TECH_LIST 10 /* Used in the network protocol. */
45#define MAX_NUM_UNIT_LIST 10 /* Used in the network protocol. */
46#define MAX_NUM_BUILDING_LIST 10 /* Used in the network protocol. */
47#define MAX_LEN_VET_SHORT_NAME 8
48/* Used in the network protocol. See diplomat_success_vs_defender() */
49#define MAX_VET_LEVELS 20
50#define MAX_EXTRA_TYPES 250 /* Used in the network protocol. */
51#define MAX_GOODS_TYPES 25
52#define MAX_DISASTER_TYPES 10
53#define MAX_ACHIEVEMENT_TYPES 40
54#define MAX_NUM_ACTION_AUTO_PERFORMERS 11
55#define MAX_NUM_MULTIPLIERS 50
56#define MAX_NUM_LEADERS MAX_NUM_ITEMS /* Used in the network protocol. */
57#define MAX_NUM_NATION_SETS 32 /* Used in the network protocol.
58 * RULESET_NATION_SETS packet may become too big
59 * if increased */
60#define MAX_NUM_NATION_GROUPS 128 /* Used in the network protocol. */
61/* Used in the network protocol -- nation count is a UINT16 */
62#define MAX_NUM_NATIONS MAX_UINT16
63#define MAX_NUM_STARTPOS_NATIONS 1024 /* Used in the network protocol. */
64#define MAX_CALENDAR_FRAGMENTS 52 /* Used in the network protocol. */
65#define MAX_NUM_TECH_CLASSES 16 /* Used in the network protocol. */
66
67/* Changing these will probably break network compatibility. */
68#define MAX_LEN_NAME 48
69#define MAX_LEN_CITYNAME 120
70#define MAX_LEN_MAP_LABEL 64
71#define MAX_LEN_DEMOGRAPHY 16
72#define MAX_LEN_ALLOW_TAKE 16
73#define MAX_LEN_GAME_IDENTIFIER 33
74#define MAX_GRANARY_INIS 24
75#define MAX_LEN_STARTUNIT (20+1)
76#define MAX_LEN_ENUM 64
77
78/* Line breaks after this number of characters; be careful and use only 70 */
79#define LINE_BREAK 70
80
81/* Changing the max radius requires updating network capabilities and results
82 * in incompatible savefiles. */
83#define CITY_MAP_MIN_RADIUS 0
84#define CITY_MAP_DEFAULT_RADIUS 2
85#define CITY_MAP_MAX_RADIUS 5
86
87/* Below size of city tiles array is big enough for radius 5 city */
88 FC_STATIC_ASSERT(CITY_MAP_MAX_RADIUS <= 5, too_many_city_tiles);
89#define MAX_CITY_TILES (91)
90
91#define MAX_CITY_NATIONALITIES (MIN(MAX_NUM_PLAYER_SLOTS, MAX_CITY_SIZE))
92
93/* symbol to flag missing numbers for better debugging */
94#define IDENTITY_NUMBER_ZERO (0)
95
96enum override_bool { OVERRIDE_TRUE, OVERRIDE_FALSE, NO_OVERRIDE };
97
98/* A bitvector for all player slots. Used in the network protocol. */
99 BV_DEFINE(bv_player, MAX_NUM_PLAYER_SLOTS);
100
101/* Changing this breaks network compatibility. */
102 enum output_type_id {
103 O_FOOD, O_SHIELD, O_TRADE, O_GOLD, O_LUXURY, O_SCIENCE, O_LAST
104};
105
106/* Counters related definitions. See common/counters.h */
107/* Used in the network protocol. */
108#define MAX_COUNTERS 20
109
110/* Counters related types. See common/counters.h */
111/* Used in the network protocol. */
112#define SPECENUM_NAME counter_behaviour
113#define SPECENUM_VALUE1 CB_CITY_OWNED_TURNS
114#define SPECENUM_VALUE1NAME "Owned"
115#define SPECENUM_VALUE2 CB_CITY_CELEBRATION_TURNS
116#define SPECENUM_VALUE2NAME "Celebration"
117#define SPECENUM_VALUE3 CB_CITY_DISORDER_TURNS
118#define SPECENUM_VALUE3NAME "Disorder"
119#define SPECENUM_VALUE4 CB_USER
120#define SPECENUM_VALUE4NAME "User"
121
122
123
124#define SPECENUM_COUNT COUNTER_BEHAVIOUR_LAST
125#include "specenum_gen.h"
126
127/* Used in the network protocol. */
128enum counter_target { CTGT_CITY };
129
130/* Changing this enum will break savegame and network compatibility. */
131/* When changing this, also update the list of valid requirement "Activity"
132 * values in doc/README.effects, the list of invalid requirement
133 * "Activity" values in activity_is_valid_in_requirement(),
134 * and default actions list in activity_default_action() */
135#define SPECENUM_NAME unit_activity
136/* Not performing any activity right now */
137#define SPECENUM_VALUE0 ACTIVITY_IDLE
138#define SPECENUM_VALUE0NAME N_("Idle")
139/* Action with the result ACTRES_CULTIVATE */
140#define SPECENUM_VALUE1 ACTIVITY_CULTIVATE
141#define SPECENUM_VALUE1NAME N_("Cultivate")
142/* Action with the result ACTRES_MINE */
143#define SPECENUM_VALUE2 ACTIVITY_MINE
144#define SPECENUM_VALUE2NAME N_("?act:Mine")
145/* Action with the result ACTRES_IRRIGATE */
146#define SPECENUM_VALUE3 ACTIVITY_IRRIGATE
147#define SPECENUM_VALUE3NAME N_("Irrigate")
148/* Has completed ACTIVITY_FORTIFYING */
149#define SPECENUM_VALUE4 ACTIVITY_FORTIFIED
150#define SPECENUM_VALUE4NAME N_("Fortified")
151/* Server side client state (UI) */
152#define SPECENUM_VALUE5 ACTIVITY_SENTRY
153#define SPECENUM_VALUE5NAME "Sentry"
154/* Action with the result ACTRES_PILLAGE */
155#define SPECENUM_VALUE6 ACTIVITY_PILLAGE
156#define SPECENUM_VALUE6NAME N_("Pillage")
157/* AI compatibility. Is not orders' goto. */
158#define SPECENUM_VALUE7 ACTIVITY_GOTO
159#define SPECENUM_VALUE7NAME "Goto"
160/* Server side agent */
161#define SPECENUM_VALUE8 ACTIVITY_EXPLORE
162#define SPECENUM_VALUE8NAME "Explore"
163/* Action with the result ACTRES_TRANSFORM_TERRAIN */
164#define SPECENUM_VALUE9 ACTIVITY_TRANSFORM
165#define SPECENUM_VALUE9NAME N_("Transform")
166/* Action with the result ACTRES_FORTIFY */
167#define SPECENUM_VALUE10 ACTIVITY_FORTIFYING
168#define SPECENUM_VALUE10NAME N_("Fortifying")
169/* Action with the result ACTRES_CLEAN */
170#define SPECENUM_VALUE11 ACTIVITY_CLEAN
171#define SPECENUM_VALUE11NAME N_("Clean")
172/* Action with the result ACTRES_BASE */
173#define SPECENUM_VALUE12 ACTIVITY_BASE
174#define SPECENUM_VALUE12NAME N_("Base")
175/* Action with the result ACTRES_ROAD */
176#define SPECENUM_VALUE13 ACTIVITY_GEN_ROAD
177#define SPECENUM_VALUE13NAME N_("Road")
178/* Action with the result ACTRES_CONVERT */
179#define SPECENUM_VALUE14 ACTIVITY_CONVERT
180#define SPECENUM_VALUE14NAME N_("Convert")
181/* Action with the result ACTRES_PLANT */
182#define SPECENUM_VALUE15 ACTIVITY_PLANT
183#define SPECENUM_VALUE15NAME N_("Plant")
184/* Number of activities */
185#define SPECENUM_COUNT ACTIVITY_LAST
186#include "specenum_gen.h"
187
188/* Values used in the network protocol. */
189/* Update also properties table on actres.c when touching this. */
190#define SPECENUM_NAME action_result
191#define SPECENUM_VALUE0 ACTRES_ESTABLISH_EMBASSY
192#define SPECENUM_VALUE0NAME "Unit Establish Embassy"
193#define SPECENUM_VALUE1 ACTRES_SPY_INVESTIGATE_CITY
194#define SPECENUM_VALUE1NAME "Unit Investigate City"
195#define SPECENUM_VALUE2 ACTRES_SPY_POISON
196#define SPECENUM_VALUE2NAME "Unit Poison City"
197#define SPECENUM_VALUE3 ACTRES_SPY_STEAL_GOLD
198#define SPECENUM_VALUE3NAME "Unit Steal Gold"
199#define SPECENUM_VALUE4 ACTRES_SPY_SABOTAGE_CITY
200#define SPECENUM_VALUE4NAME "Unit Sabotage City"
201#define SPECENUM_VALUE5 ACTRES_SPY_TARGETED_SABOTAGE_CITY
202#define SPECENUM_VALUE5NAME "Unit Targeted Sabotage City"
203#define SPECENUM_VALUE6 ACTRES_SPY_SABOTAGE_CITY_PRODUCTION
204#define SPECENUM_VALUE6NAME "Unit Sabotage City Production"
205#define SPECENUM_VALUE7 ACTRES_SPY_STEAL_TECH
206#define SPECENUM_VALUE7NAME "Unit Steal Tech"
207#define SPECENUM_VALUE8 ACTRES_SPY_TARGETED_STEAL_TECH
208#define SPECENUM_VALUE8NAME "Unit Targeted Steal Tech"
209#define SPECENUM_VALUE9 ACTRES_SPY_INCITE_CITY
210#define SPECENUM_VALUE9NAME "Unit Incite City"
211#define SPECENUM_VALUE10 ACTRES_TRADE_ROUTE
212#define SPECENUM_VALUE10NAME "Unit Establish Trade Route"
213#define SPECENUM_VALUE11 ACTRES_MARKETPLACE
214#define SPECENUM_VALUE11NAME "Unit Enter Marketplace"
215#define SPECENUM_VALUE12 ACTRES_HELP_WONDER
216#define SPECENUM_VALUE12NAME "Unit Help Wonder"
217#define SPECENUM_VALUE13 ACTRES_SPY_BRIBE_UNIT
218#define SPECENUM_VALUE13NAME "Unit Bribe Unit"
219#define SPECENUM_VALUE14 ACTRES_SPY_SABOTAGE_UNIT
220#define SPECENUM_VALUE14NAME "Unit Sabotage Unit"
221#define SPECENUM_VALUE15 ACTRES_CAPTURE_UNITS
222#define SPECENUM_VALUE15NAME "Unit Capture Units"
223#define SPECENUM_VALUE16 ACTRES_FOUND_CITY
224#define SPECENUM_VALUE16NAME "Unit Found City"
225#define SPECENUM_VALUE17 ACTRES_JOIN_CITY
226#define SPECENUM_VALUE17NAME "Unit Join City"
227#define SPECENUM_VALUE18 ACTRES_STEAL_MAPS
228#define SPECENUM_VALUE18NAME "Unit Steal Maps"
229#define SPECENUM_VALUE19 ACTRES_BOMBARD
230#define SPECENUM_VALUE19NAME "Unit Bombard"
231#define SPECENUM_VALUE20 ACTRES_SPY_NUKE
232#define SPECENUM_VALUE20NAME "Unit Suitcase Nuke"
233#define SPECENUM_VALUE21 ACTRES_NUKE
234#define SPECENUM_VALUE21NAME "Unit Nuke"
235#define SPECENUM_VALUE22 ACTRES_NUKE_UNITS
236#define SPECENUM_VALUE22NAME "Unit Nuke Units"
237#define SPECENUM_VALUE23 ACTRES_DESTROY_CITY
238#define SPECENUM_VALUE23NAME "Unit Destroy City"
239#define SPECENUM_VALUE24 ACTRES_EXPEL_UNIT
240#define SPECENUM_VALUE24NAME "Unit Expel Unit"
241#define SPECENUM_VALUE25 ACTRES_DISBAND_UNIT_RECOVER
242#define SPECENUM_VALUE25NAME "Unit Disband Recover"
243#define SPECENUM_VALUE26 ACTRES_DISBAND_UNIT
244#define SPECENUM_VALUE26NAME "Unit Disband"
245#define SPECENUM_VALUE27 ACTRES_HOME_CITY
246#define SPECENUM_VALUE27NAME "Unit Home City"
247#define SPECENUM_VALUE28 ACTRES_UPGRADE_UNIT
248#define SPECENUM_VALUE28NAME "Unit Upgrade"
249#define SPECENUM_VALUE29 ACTRES_PARADROP
250#define SPECENUM_VALUE29NAME "Unit Paradrop"
251#define SPECENUM_VALUE30 ACTRES_AIRLIFT
252#define SPECENUM_VALUE30NAME "Unit Airlift"
253#define SPECENUM_VALUE31 ACTRES_ATTACK
254#define SPECENUM_VALUE31NAME "Unit Attack"
255#define SPECENUM_VALUE32 ACTRES_STRIKE_BUILDING
256#define SPECENUM_VALUE32NAME "Unit Surgical Strike Building"
257#define SPECENUM_VALUE33 ACTRES_STRIKE_PRODUCTION
258#define SPECENUM_VALUE33NAME "Unit Surgical Strike Production"
259#define SPECENUM_VALUE34 ACTRES_CONQUER_CITY
260#define SPECENUM_VALUE34NAME "Unit Conquer City"
261#define SPECENUM_VALUE35 ACTRES_HEAL_UNIT
262#define SPECENUM_VALUE35NAME "Unit Heal Unit"
263#define SPECENUM_VALUE36 ACTRES_TRANSFORM_TERRAIN
264#define SPECENUM_VALUE36NAME "Unit Transform Terrain"
265#define SPECENUM_VALUE37 ACTRES_CULTIVATE
266#define SPECENUM_VALUE37NAME "Unit Cultivate"
267#define SPECENUM_VALUE38 ACTRES_PLANT
268#define SPECENUM_VALUE38NAME "Unit Plant"
269#define SPECENUM_VALUE39 ACTRES_PILLAGE
270#define SPECENUM_VALUE39NAME "Unit Pillage"
271#define SPECENUM_VALUE40 ACTRES_FORTIFY
272#define SPECENUM_VALUE40NAME "Unit Fortify"
273#define SPECENUM_VALUE41 ACTRES_ROAD
274#define SPECENUM_VALUE41NAME "Unit Build Road"
275#define SPECENUM_VALUE42 ACTRES_CONVERT
276#define SPECENUM_VALUE42NAME "Unit Convert"
277#define SPECENUM_VALUE43 ACTRES_BASE
278#define SPECENUM_VALUE43NAME "Unit Build Base"
279#define SPECENUM_VALUE44 ACTRES_MINE
280#define SPECENUM_VALUE44NAME "Unit Build Mine"
281#define SPECENUM_VALUE45 ACTRES_IRRIGATE
282#define SPECENUM_VALUE45NAME "Unit Build Irrigation"
283#define SPECENUM_VALUE46 ACTRES_COLLECT_RANSOM
284#define SPECENUM_VALUE46NAME "Collect Ransom"
285/* TODO: Rearrange action results to get rid of this */
286#define SPECENUM_VALUE47 ACTRES_UNUSED_1
287#define SPECENUM_VALUE47NAME "Unused1"
288#define SPECENUM_VALUE48 ACTRES_TRANSPORT_DEBOARD
289#define SPECENUM_VALUE48NAME "Unit Transport Deboard"
290#define SPECENUM_VALUE49 ACTRES_TRANSPORT_UNLOAD
291#define SPECENUM_VALUE49NAME "Unit Transport Unload"
292#define SPECENUM_VALUE50 ACTRES_TRANSPORT_DISEMBARK
293#define SPECENUM_VALUE50NAME "Unit Transport Disembark"
294#define SPECENUM_VALUE51 ACTRES_TRANSPORT_BOARD
295#define SPECENUM_VALUE51NAME "Unit Transport Board"
296#define SPECENUM_VALUE52 ACTRES_TRANSPORT_EMBARK
297#define SPECENUM_VALUE52NAME "Unit Transport Embark"
298#define SPECENUM_VALUE53 ACTRES_SPY_SPREAD_PLAGUE
299#define SPECENUM_VALUE53NAME "Unit Spread Plague"
300#define SPECENUM_VALUE54 ACTRES_SPY_ATTACK
301#define SPECENUM_VALUE54NAME "Unit Spy Attack"
302#define SPECENUM_VALUE55 ACTRES_CONQUER_EXTRAS
303#define SPECENUM_VALUE55NAME "Unit Conquer Extras"
304#define SPECENUM_VALUE56 ACTRES_HUT_ENTER
305#define SPECENUM_VALUE56NAME "Unit Enter Hut"
306#define SPECENUM_VALUE57 ACTRES_HUT_FRIGHTEN
307#define SPECENUM_VALUE57NAME "Unit Frighten Hut"
308#define SPECENUM_VALUE58 ACTRES_UNIT_MOVE
309#define SPECENUM_VALUE58NAME "Unit Move"
310#define SPECENUM_VALUE59 ACTRES_PARADROP_CONQUER
311#define SPECENUM_VALUE59NAME "Unit Paradrop Conquer"
312#define SPECENUM_VALUE60 ACTRES_HOMELESS
313#define SPECENUM_VALUE60NAME "Unit Make Homeless"
314#define SPECENUM_VALUE61 ACTRES_WIPE_UNITS
315#define SPECENUM_VALUE61NAME "Wipe Units"
316#define SPECENUM_VALUE62 ACTRES_SPY_ESCAPE
317#define SPECENUM_VALUE62NAME "Unit Spy Escape"
318#define SPECENUM_VALUE63 ACTRES_TRANSPORT_LOAD
319#define SPECENUM_VALUE63NAME "Unit Transport Load"
320#define SPECENUM_VALUE64 ACTRES_CLEAN
321#define SPECENUM_VALUE64NAME "Clean"
322/* TODO: Move close to "Move" */
323#define SPECENUM_VALUE65 ACTRES_TELEPORT
324#define SPECENUM_VALUE65NAME "Teleport"
325#define SPECENUM_VALUE66 ACTRES_TELEPORT_CONQUER
326#define SPECENUM_VALUE66NAME "Teleport Conquer"
327/* Hardcoded action that's just controlled by enablers */
328#define SPECENUM_VALUE67 ACTRES_ENABLER_CHECK
329/* All consequences are handled as (ruleset) action data. */
330#define SPECENUM_COUNT ACTRES_LAST
331#include "specenum_gen.h"
332
333#define ACTRES_NONE ACTRES_LAST
334
335/* Used in the network protocol. */
336#define SPECENUM_NAME action_sub_result
337/* Will enter each enterable hut at the target tile */
338#define SPECENUM_VALUE0 ACT_SUB_RES_HUT_ENTER
339#define SPECENUM_VALUE0NAME "Unit Enter Hut"
340/* Will frighten each frightenable hut at the target tile */
341#define SPECENUM_VALUE1 ACT_SUB_RES_HUT_FRIGHTEN
342#define SPECENUM_VALUE1NAME "Unit Frighten Hut"
343/* The actor may load into a transport if it can't survive on its own at the
344 * target tile. */
345#define SPECENUM_VALUE2 ACT_SUB_RES_MAY_EMBARK
346#define SPECENUM_VALUE2NAME "Unit May Embark"
347/* Target units won't be killed by this action. */
348#define SPECENUM_VALUE3 ACT_SUB_RES_NON_LETHAL
349#define SPECENUM_VALUE3NAME "Non Lethal To Target Unit"
350#define SPECENUM_BITVECTOR bv_action_sub_results
351#define SPECENUM_COUNT ACT_SUB_RES_COUNT
352#include "specenum_gen.h"
353
354/* Happens at once, not during turn change. */
355#define ACT_TIME_INSTANTANEOUS (-1)
356
357/* Symbol used to flag no (sub) target of an action or for an activity.
358 * IDENTITY_NUMBER_ZERO can't be used since 0 is a valid identity for
359 * certain (sub) targets. */
360#define NO_TARGET (-1)
361
362/* How "large" a Casus Belli is. */
363#define SPECENUM_NAME casus_belli_range
364/* No one gets a Casus Belli. */
365#define SPECENUM_VALUE0 CBR_NONE
366#define SPECENUM_VALUE0NAME N_("No Casus Belli")
367/* Only the victim player gets a Casus Belli. */
368#define SPECENUM_VALUE1 CBR_VICTIM_ONLY
369#define SPECENUM_VALUE1NAME N_("Victim Casus Belli")
370/* Every other player, including the victim, gets a Casus Belli. */
371#define SPECENUM_VALUE2 CBR_INTERNATIONAL_OUTRAGE
372#define SPECENUM_VALUE2NAME N_("International Outrage")
373#define SPECENUM_COUNT CBR_LAST
374#include "specenum_gen.h"
375
376 enum adv_unit_task { AUT_NONE, AUT_AUTO_WORKER, AUT_BUILD_CITY };
377
378 typedef signed short Continent_id;
379 typedef int Terrain_type_id;
380 typedef int Resource_type_id;
381 typedef int Specialist_type_id;
382 typedef int Impr_type_id;
383 typedef int Tech_type_id;
384 typedef enum output_type_id Output_type_id;
385 typedef enum unit_activity Activity_type_id;
386 typedef int Nation_type_id;
387 typedef int Government_type_id;
388 typedef int Unit_type_id;
389 typedef int Base_type_id;
390 typedef int Road_type_id;
391 typedef int Disaster_type_id;
392 typedef int Multiplier_type_id;
393 typedef int Goods_type_id;
394typedef unsigned char citizens;
395typedef int action_id;
396
397struct advance;
398struct city;
399struct connection;
400struct government;
401struct impr_type;
402struct nation_type;
403struct output_type;
404struct player;
405struct specialist;
406struct terrain;
407struct tile;
408struct unit;
409struct achievement;
410struct action;
411
412
413/* Changing these will break network compatibility.
414 * If changing MAX_NUM_REQS, also update user documentation in README.effects. */
415#define SP_MAX 20
416#define MAX_NUM_REQS 40
417
418#define MAX_NUM_RULESETS 63 /* Used in the network protocol. */
419#define MAX_RULESET_NAME_LENGTH 64 /* Used in the network protocol. */
420#define RULESET_SUFFIX ".serv"
421
422/* Unit Class List, also 32-bit vector? */
423#define UCL_LAST 32 /* Used in the network protocol. */
424typedef int Unit_Class_id;
425
426/* The direction8 gives the 8 possible directions. These may be used in
427 * a number of ways, for instance as an index into the DIR_DX/DIR_DY
428 * arrays. Not all directions may be valid; see is_valid_dir and
429 * is_cardinal_dir. */
430
431/* The DIR8/direction8 naming system is used to avoid conflict with
432 * DIR4/direction4 in client/tilespec.h
433 *
434 * Changing the order of the directions will break network compatibility.
435 *
436 * Some code assumes that the first 4 directions are the reverses of the
437 * last 4 (in no particular order). See client/goto.c and
438 * map.c:opposite_direction(). */
439
440/* Used in the network protocol. */
441#define SPECENUM_NAME direction8
442#define SPECENUM_VALUE0 DIR8_NORTHWEST
443#define SPECENUM_VALUE0NAME "Northwest"
444#define SPECENUM_VALUE1 DIR8_NORTH
445#define SPECENUM_VALUE1NAME "North"
446#define SPECENUM_VALUE2 DIR8_NORTHEAST
447#define SPECENUM_VALUE2NAME "Northeast"
448#define SPECENUM_VALUE3 DIR8_WEST
449#define SPECENUM_VALUE3NAME "West"
450#define SPECENUM_VALUE4 DIR8_EAST
451#define SPECENUM_VALUE4NAME "East"
452#define SPECENUM_VALUE5 DIR8_SOUTHWEST
453#define SPECENUM_VALUE5NAME "Southwest"
454#define SPECENUM_VALUE6 DIR8_SOUTH
455#define SPECENUM_VALUE6NAME "South"
456#define SPECENUM_VALUE7 DIR8_SOUTHEAST
457#define SPECENUM_VALUE7NAME "Southeast"
458#define SPECENUM_INVALID ((enum direction8) (DIR8_SOUTHEAST + 1))
459#include "specenum_gen.h"
460
461/* No direction. Understood as the origin tile that a direction would have
462 * been relative to. */
463#define DIR8_ORIGIN direction8_invalid()
464
465/* Used in the network protocol. */
466#define SPECENUM_NAME free_tech_method
467#define SPECENUM_VALUE0 FTM_GOAL
468#define SPECENUM_VALUE0NAME "Goal"
469#define SPECENUM_VALUE1 FTM_RANDOM
470#define SPECENUM_VALUE1NAME "Random"
471#define SPECENUM_VALUE2 FTM_CHEAPEST
472#define SPECENUM_VALUE2NAME "Cheapest"
473#include "specenum_gen.h"
474
475/* Some code requires compile time value for number of directions, and
476 * cannot use specenum function call direction8_max(). */
477#define DIR8_MAGIC_MAX 8
478
479/* The victim gets a casus belli if EFT_CASUS_BELLI_* is equal to or above
480 * CASUS_BELLI_VICTIM. To change this value you must update the
481 * documentation of each Casus_Belli_* effect in
482 * doc/README.effects, update existing rulesets and add ruleset
483 * compatibility code to server/rscompat.c. */
484#define CASUS_BELLI_VICTIM 1
485/* International outrage: Everyone gets a casus belli if EFT_CASUS_BELLI_*
486 * is equal to or above CASUS_BELLI_OUTRAGE. To change this value you must
487 * update the documentation of each Casus_Belli_* effect in
488 * doc/README.effects, update existing rulesets and add ruleset
489 * compatibility code to server/rscompat.c. */
490#define CASUS_BELLI_OUTRAGE 1000
491
492/* Really in ai.c */
493const char *ai_level_name_update_cb(const char *old);
494
495/* Used in the network protocol. */
496/* server/commands.c must match these */
497#define SPECENUM_NAME ai_level
498#define SPECENUM_VALUE0 AI_LEVEL_RESTRICTED
499#define SPECENUM_VALUE0NAME N_("Restricted")
500#define SPECENUM_VALUE1 AI_LEVEL_NOVICE
501#define SPECENUM_VALUE1NAME N_("Novice")
502#define SPECENUM_VALUE2 AI_LEVEL_EASY
503#define SPECENUM_VALUE2NAME N_("Easy")
504#define SPECENUM_VALUE3 AI_LEVEL_NORMAL
505#define SPECENUM_VALUE3NAME N_("Normal")
506#define SPECENUM_VALUE4 AI_LEVEL_HARD
507#define SPECENUM_VALUE4NAME N_("Hard")
508#define SPECENUM_VALUE5 AI_LEVEL_CHEATING
509#define SPECENUM_VALUE5NAME N_("Cheating")
510
511#ifdef FREECIV_DEBUG
512#define SPECENUM_VALUE6 AI_LEVEL_EXPERIMENTAL
513#define SPECENUM_VALUE6NAME N_("Experimental")
514/* Away must be the last, so ailevel_name() can terminate list
515 * of level names before it. */
516#define SPECENUM_VALUE7 AI_LEVEL_AWAY
517#define SPECENUM_VALUE7NAME N_("Away")
518#else /* FREECIV_DEBUG */
519#define SPECENUM_VALUE6 AI_LEVEL_AWAY
520#define SPECENUM_VALUE6NAME N_("Away")
521#endif /* FREECIV_DEBUG */
522
523#define SPECENUM_COUNT AI_LEVEL_COUNT
524#define SPECENUM_NAME_UPDATER
525#include "specenum_gen.h"
526
527/* pplayer->ai.barbarian_type and nations use this enum. */
528#define SPECENUM_NAME barbarian_type
529#define SPECENUM_VALUE0 NOT_A_BARBARIAN
530#define SPECENUM_VALUE0NAME "None"
531#define SPECENUM_VALUE1 LAND_BARBARIAN
532#define SPECENUM_VALUE1NAME "Land"
533#define SPECENUM_VALUE2 SEA_BARBARIAN
534#define SPECENUM_VALUE2NAME "Sea"
535#define SPECENUM_VALUE3 ANIMAL_BARBARIAN
536#define SPECENUM_VALUE3NAME "Animal"
537#define SPECENUM_VALUE4 LAND_AND_SEA_BARBARIAN
538#define SPECENUM_VALUE4NAME "LandAndSea"
539#include "specenum_gen.h"
540
541/*
542 * CityTile requirement types.
543 *
544 * Used in the network protocol
545 */
546#define SPECENUM_NAME citytile_type
547#define SPECENUM_VALUE0 CITYT_CENTER
548#define SPECENUM_VALUE0NAME "Center"
549#define SPECENUM_VALUE1 CITYT_CLAIMED
550#define SPECENUM_VALUE1NAME "Claimed"
551#define SPECENUM_VALUE2 CITYT_EXTRAS_OWNED
552#define SPECENUM_VALUE2NAME "Extras Owned"
553#define SPECENUM_VALUE3 CITYT_WORKED
554#define SPECENUM_VALUE3NAME "Worked"
555#define SPECENUM_VALUE4 CITYT_SAME_CONTINENT
556#define SPECENUM_VALUE4NAME "Same Continent"
557#define SPECENUM_VALUE5 CITYT_BORDERING_TCLASS_REGION
558#define SPECENUM_VALUE5NAME "Bordering TClass Region"
559#define SPECENUM_COUNT CITYT_LAST
560#include "specenum_gen.h"
561
562/*
563 * CityStatus requirement types.
564 *
565 * Used in the network protocol
566 */
567#define SPECENUM_NAME citystatus_type
568#define SPECENUM_VALUE0 CITYS_OWNED_BY_ORIGINAL
569#define SPECENUM_VALUE0NAME "OwnedByOriginal"
570#define SPECENUM_VALUE1 CITYS_STARVED
571#define SPECENUM_VALUE1NAME "Starved"
572#define SPECENUM_VALUE2 CITYS_DISORDER
573#define SPECENUM_VALUE2NAME "Disorder"
574#define SPECENUM_VALUE3 CITYS_CELEBRATION
575#define SPECENUM_VALUE3NAME "Celebration"
576#define SPECENUM_VALUE4 CITYS_TRANSFERRED
577#define SPECENUM_VALUE4NAME "Transferred"
578#define SPECENUM_COUNT CITYS_LAST
579#include "specenum_gen.h"
580
581/*
582 * PlayerState requirement types.
583 *
584 * Used in the network protocol
585 */
586#define SPECENUM_NAME plrstate_type
587#define SPECENUM_VALUE0 PLRS_BARBARIAN
588#define SPECENUM_VALUE0NAME "Barbarian"
589#define SPECENUM_VALUE1 PLRS_HAS_CAPITAL
590#define SPECENUM_VALUE1NAME "HasCapital"
591#define SPECENUM_COUNT PLRS_LAST
592#include "specenum_gen.h"
593
594/*
595 * UnitState requirement property types.
596 *
597 * Used in the network protocol.
598 */
599#define SPECENUM_NAME ustate_prop
600#define SPECENUM_VALUE0 USP_TRANSPORTED
601#define SPECENUM_VALUE0NAME "Transported"
602#define SPECENUM_VALUE1 USP_LIVABLE_TILE
603#define SPECENUM_VALUE1NAME "OnLivableTile"
604#define SPECENUM_VALUE2 USP_TRANSPORTING
605#define SPECENUM_VALUE2NAME "Transporting"
606#define SPECENUM_VALUE3 USP_HAS_HOME_CITY
607#define SPECENUM_VALUE3NAME "HasHomeCity"
608#define SPECENUM_VALUE4 USP_NATIVE_TILE
609#define SPECENUM_VALUE4NAME "OnNativeTile"
610#define SPECENUM_VALUE5 USP_NATIVE_EXTRA
611#define SPECENUM_VALUE5NAME "InNativeExtra"
612#define SPECENUM_VALUE6 USP_MOVED_THIS_TURN
613#define SPECENUM_VALUE6NAME "MovedThisTurn"
614#define SPECENUM_COUNT USP_COUNT
615#include "specenum_gen.h"
616
617/* Changing these values will break map_init_topology().
618 * Changing the names will break file format compatibility. */
619#define SPECENUM_NAME topo_flag
620#define SPECENUM_BITWISE
621#define SPECENUM_VALUE0 TF_ISO
622#define SPECENUM_VALUE0NAME N_("ISO")
623#define SPECENUM_VALUE1 TF_HEX
624#define SPECENUM_VALUE1NAME N_("Hex")
625#define SPECENUM_VALUE2 TF_OLD_WRAPX
626#define SPECENUM_VALUE2NAME N_("WrapX")
627#define SPECENUM_VALUE3 TF_OLD_WRAPY
628#define SPECENUM_VALUE3NAME N_("WrapY")
629#define TOPO_FLAG_BITS 4
630#include "specenum_gen.h"
631
632#define SPECENUM_NAME wrap_flag
633#define SPECENUM_BITWISE
634#define SPECENUM_VALUE0 WRAP_X
635#define SPECENUM_VALUE0NAME N_("WrapX")
636#define SPECENUM_VALUE1 WRAP_Y
637#define SPECENUM_VALUE1NAME N_("WrapY")
638#define WRAP_FLAG_BITS 2
639#include "specenum_gen.h"
640
641/* Used in the network protocol. */
642#define SPECENUM_NAME impr_genus_id
643#define SPECENUM_VALUE0 IG_GREAT_WONDER
644#define SPECENUM_VALUE0NAME "GreatWonder"
645#define SPECENUM_VALUE1 IG_SMALL_WONDER
646#define SPECENUM_VALUE1NAME "SmallWonder"
647#define SPECENUM_VALUE2 IG_IMPROVEMENT
648#define SPECENUM_VALUE2NAME "Improvement"
649#define SPECENUM_VALUE3 IG_SPECIAL
650#define SPECENUM_VALUE3NAME "Special"
651#define SPECENUM_VALUE4 IG_CONVERT
652#define SPECENUM_VALUE4NAME "Convert"
653#define SPECENUM_COUNT IG_COUNT
654#include "specenum_gen.h"
655
656/* Used in the network protocol. */
657#define SPECENUM_NAME impr_flag_id
658/* Improvement should be visible to others without spying */
659#define SPECENUM_VALUE0 IF_VISIBLE_BY_OTHERS
660#define SPECENUM_VALUE0NAME "VisibleByOthers"
661/* This small wonder is moved to another city if game.savepalace is on. */
662#define SPECENUM_VALUE1 IF_SAVE_SMALL_WONDER
663#define SPECENUM_VALUE1NAME "SaveSmallWonder"
664/* When built, gives gold */
665#define SPECENUM_VALUE2 IF_GOLD
666#define SPECENUM_VALUE2NAME "Gold"
667/* Never destroyed by disasters */
668#define SPECENUM_VALUE3 IF_DISASTER_PROOF
669#define SPECENUM_VALUE3NAME "DisasterProof"
670/* Never destroyed by a surgical strike */
671#define SPECENUM_VALUE4 IF_INDESTRUCTIBLE
672#define SPECENUM_VALUE4NAME "Indestructible"
673#define SPECENUM_VALUE5 IF_USER_FLAG_1
674#define SPECENUM_VALUE6 IF_USER_FLAG_2
675#define SPECENUM_VALUE7 IF_USER_FLAG_3
676#define SPECENUM_VALUE8 IF_USER_FLAG_4
677#define SPECENUM_VALUE9 IF_USER_FLAG_5
678#define SPECENUM_VALUE10 IF_USER_FLAG_6
679#define SPECENUM_VALUE11 IF_USER_FLAG_7
680#define SPECENUM_VALUE12 IF_USER_FLAG_8
681#define SPECENUM_COUNT IF_COUNT
682#define SPECENUM_NAMEOVERRIDE
683#define SPECENUM_BITVECTOR bv_impr_flags
684#include "specenum_gen.h"
685
686#define IF_LAST_USER_FLAG IF_USER_FLAG_8
687#define MAX_NUM_USER_BUILDING_FLAGS (IF_LAST_USER_FLAG - IF_USER_FLAG_1 + 1)
688
689#define SPECENUM_NAME plr_flag_id
690#define SPECENUM_VALUE0 PLRF_AI
691#define SPECENUM_VALUE0NAME "ai"
692#define SPECENUM_VALUE1 PLRF_SCENARIO_RESERVED
693#define SPECENUM_VALUE1NAME "ScenarioReserved"
694/* TRUE if player has ever had a city. */
695#define SPECENUM_VALUE2 PLRF_FIRST_CITY
696#define SPECENUM_VALUE2NAME "FirstCity"
697#define SPECENUM_COUNT PLRF_COUNT
698#define SPECENUM_BITVECTOR bv_plr_flags
699#include "specenum_gen.h"
700
701/* A server setting + its value. */
702typedef int ssetv;
703
704/* Sometimes we don't know (or don't care) if some requirements for effect
705 * are currently fulfilled or not. This enum tells lower level functions
706 * how to handle uncertain requirements.
707 */
708enum req_problem_type {
709 RPT_POSSIBLE, /* We want to know if it is possible that effect is active */
710 RPT_CERTAIN /* We want to know if it is certain that effect is active */
711};
712
713#define REVERSED_RPT(x) \
714 (x == RPT_CERTAIN ? RPT_POSSIBLE : RPT_CERTAIN)
715
716/* Originally in requirements.h, bumped up and revised to unify with
717 * city_production and worklists. Functions remain in requirements.c
718 * Used in the network protocol. */
719 typedef union {
720 struct advance *advance;
721 struct counter *counter;
722 struct government *govern;
723 const struct impr_type *building;
724 struct nation_type *nation;
725 struct nation_type *nationality;
726 struct nation_type *origowner;
727 struct specialist *specialist;
728 struct terrain *terrain;
729 struct unit_class *uclass;
730 const struct unit_type *utype;
731 struct extra_type *extra;
732 struct achievement *achievement;
733 struct nation_group *nationgroup;
734 struct nation_style *style;
735 struct action *action;
736 struct goods_type *good;
737
738 enum ai_level ai_level;
739 enum citytile_type citytile;
740 enum citystatus_type citystatus;
741 enum plrstate_type plrstate;
742 int minsize;
743 int minculture;
744 int minforeignpct;
745 int minyear;
746 int mincalfrag;
747 Output_type_id outputtype;
748 int terrainclass; /* enum terrain_class */
749 int terrainalter; /* enum terrain_alteration */
750 int unitclassflag; /* enum unit_class_flag_id */
751 int unitflag; /* enum unit_flag_id */
752 int terrainflag; /* enum terrain_flag_id */
753 int techflag; /* enum tech_flag_id */
754 int roadflag; /* enum road_flag_id */
755 int extraflag;
756 int diplrel; /* enum diplstate_type or
757 enum diplrel_other */
758 enum ustate_prop unit_state;
759 enum unit_activity activity;
760 enum impr_genus_id impr_genus;
761 enum impr_flag_id impr_flag;
762 enum plr_flag_id plr_flag;
763 int minmoves;
764 int max_tile_units;
765 int minveteran;
766 int min_hit_points;
767 int age;
768 int form_age;
769 int min_techs;
770 int min_cities;
771 int latitude;
772
773 enum topo_flag topo_property;
774 enum wrap_flag wrap_property;
775 ssetv ssetval;
776} universals_u;
777
778/* The kind of universals_u (value_union_type was req_source_type).
779 * Used in the network protocol. */
780#define SPECENUM_NAME universals_n
781#define SPECENUM_VALUE0 VUT_NONE
782#define SPECENUM_VALUE0NAME "None"
783#define SPECENUM_VALUE1 VUT_ADVANCE
784#define SPECENUM_VALUE1NAME "Tech"
785#define SPECENUM_VALUE2 VUT_GOVERNMENT
786#define SPECENUM_VALUE2NAME "Gov"
787#define SPECENUM_VALUE3 VUT_IMPROVEMENT
788#define SPECENUM_VALUE3NAME "Building"
789#define SPECENUM_VALUE4 VUT_TERRAIN
790#define SPECENUM_VALUE4NAME "Terrain"
791#define SPECENUM_VALUE5 VUT_NATION
792#define SPECENUM_VALUE5NAME "Nation"
793#define SPECENUM_VALUE6 VUT_UTYPE
794#define SPECENUM_VALUE6NAME "UnitType"
795#define SPECENUM_VALUE7 VUT_UTFLAG
796#define SPECENUM_VALUE7NAME "UnitFlag"
797#define SPECENUM_VALUE8 VUT_UCLASS
798#define SPECENUM_VALUE8NAME "UnitClass"
799#define SPECENUM_VALUE9 VUT_UCFLAG
800#define SPECENUM_VALUE9NAME "UnitClassFlag"
801#define SPECENUM_VALUE10 VUT_OTYPE
802#define SPECENUM_VALUE10NAME "OutputType"
803#define SPECENUM_VALUE11 VUT_SPECIALIST
804#define SPECENUM_VALUE11NAME "Specialist"
805/* Minimum size: at city range means city size */
806#define SPECENUM_VALUE12 VUT_MINSIZE
807#define SPECENUM_VALUE12NAME "MinSize"
808/* AI level of the player */
809#define SPECENUM_VALUE13 VUT_AI_LEVEL
810#define SPECENUM_VALUE13NAME "AI"
811/* More generic terrain type currently "Land" or "Ocean" */
812#define SPECENUM_VALUE14 VUT_TERRAINCLASS
813#define SPECENUM_VALUE14NAME "TerrainClass"
814#define SPECENUM_VALUE15 VUT_MINYEAR
815#define SPECENUM_VALUE15NAME "MinYear"
816/* Terrain alterations that are possible */
817#define SPECENUM_VALUE16 VUT_TERRAINALTER
818#define SPECENUM_VALUE16NAME "TerrainAlter"
819/* Target tile is used by city. */
820#define SPECENUM_VALUE17 VUT_CITYTILE
821#define SPECENUM_VALUE17NAME "CityTile"
822#define SPECENUM_VALUE18 VUT_GOOD
823#define SPECENUM_VALUE18NAME "Good"
824#define SPECENUM_VALUE19 VUT_TERRFLAG
825#define SPECENUM_VALUE19NAME "TerrainFlag"
826#define SPECENUM_VALUE20 VUT_NATIONALITY
827#define SPECENUM_VALUE20NAME "Nationality"
828#define SPECENUM_VALUE21 VUT_ROADFLAG
829#define SPECENUM_VALUE21NAME "RoadFlag"
830#define SPECENUM_VALUE22 VUT_EXTRA
831#define SPECENUM_VALUE22NAME "Extra"
832#define SPECENUM_VALUE23 VUT_TECHFLAG
833#define SPECENUM_VALUE23NAME "TechFlag"
834#define SPECENUM_VALUE24 VUT_ACHIEVEMENT
835#define SPECENUM_VALUE24NAME "Achievement"
836#define SPECENUM_VALUE25 VUT_DIPLREL
837#define SPECENUM_VALUE25NAME "DiplRel"
838#define SPECENUM_VALUE26 VUT_MAXTILEUNITS
839#define SPECENUM_VALUE26NAME "MaxUnitsOnTile"
840#define SPECENUM_VALUE27 VUT_STYLE
841#define SPECENUM_VALUE27NAME "Style"
842#define SPECENUM_VALUE28 VUT_MINCULTURE
843#define SPECENUM_VALUE28NAME "MinCulture"
844#define SPECENUM_VALUE29 VUT_UNITSTATE
845#define SPECENUM_VALUE29NAME "UnitState"
846#define SPECENUM_VALUE30 VUT_MINMOVES
847#define SPECENUM_VALUE30NAME "MinMoveFrags"
848#define SPECENUM_VALUE31 VUT_MINVETERAN
849#define SPECENUM_VALUE31NAME "MinVeteran"
850#define SPECENUM_VALUE32 VUT_MINHP
851#define SPECENUM_VALUE32NAME "MinHitPoints"
852#define SPECENUM_VALUE33 VUT_AGE
853#define SPECENUM_VALUE33NAME "Age"
854#define SPECENUM_VALUE34 VUT_NATIONGROUP
855#define SPECENUM_VALUE34NAME "NationGroup"
856#define SPECENUM_VALUE35 VUT_TOPO
857#define SPECENUM_VALUE35NAME "Topology"
858#define SPECENUM_VALUE36 VUT_IMPR_GENUS
859#define SPECENUM_VALUE36NAME "BuildingGenus"
860#define SPECENUM_VALUE37 VUT_ACTION
861#define SPECENUM_VALUE37NAME "Action"
862#define SPECENUM_VALUE38 VUT_MINTECHS
863#define SPECENUM_VALUE38NAME "MinTechs"
864#define SPECENUM_VALUE39 VUT_EXTRAFLAG
865#define SPECENUM_VALUE39NAME "ExtraFlag"
866#define SPECENUM_VALUE40 VUT_MINCALFRAG
867#define SPECENUM_VALUE40NAME "MinCalFrag"
868#define SPECENUM_VALUE41 VUT_SERVERSETTING
869#define SPECENUM_VALUE41NAME "ServerSetting"
870#define SPECENUM_VALUE42 VUT_CITYSTATUS
871#define SPECENUM_VALUE42NAME "CityStatus"
872#define SPECENUM_VALUE43 VUT_MINFOREIGNPCT
873#define SPECENUM_VALUE43NAME "MinForeignPct"
874#define SPECENUM_VALUE44 VUT_ACTIVITY
875#define SPECENUM_VALUE44NAME "Activity"
876#define SPECENUM_VALUE45 VUT_DIPLREL_TILE
877#define SPECENUM_VALUE45NAME "DiplRelTile"
878#define SPECENUM_VALUE46 VUT_DIPLREL_TILE_O
879#define SPECENUM_VALUE46NAME "DiplRelTileOther"
880#define SPECENUM_VALUE47 VUT_DIPLREL_UNITANY
881#define SPECENUM_VALUE47NAME "DiplRelUnitAny"
882#define SPECENUM_VALUE48 VUT_DIPLREL_UNITANY_O
883#define SPECENUM_VALUE48NAME "DiplRelUnitAnyOther"
884#define SPECENUM_VALUE49 VUT_MINLATITUDE
885#define SPECENUM_VALUE49NAME "MinLatitude"
886#define SPECENUM_VALUE50 VUT_MAXLATITUDE
887#define SPECENUM_VALUE50NAME "MaxLatitude"
888#define SPECENUM_VALUE51 VUT_COUNTER
889#define SPECENUM_VALUE51NAME "Counter"
890#define SPECENUM_VALUE52 VUT_ORIGINAL_OWNER
891#define SPECENUM_VALUE52NAME "OriginalOwner"
892#define SPECENUM_VALUE53 VUT_IMPR_FLAG
893#define SPECENUM_VALUE53NAME "BuildingFlag"
894#define SPECENUM_VALUE54 VUT_WRAP
895#define SPECENUM_VALUE54NAME "Wrap"
896#define SPECENUM_VALUE55 VUT_PLAYER_FLAG
897#define SPECENUM_VALUE55NAME "PlayerFlag"
898#define SPECENUM_VALUE56 VUT_PLAYER_STATE
899#define SPECENUM_VALUE56NAME "PlayerState"
900#define SPECENUM_VALUE57 VUT_FORM_AGE
901#define SPECENUM_VALUE57NAME "FormAge"
902#define SPECENUM_VALUE58 VUT_MINCITIES
903#define SPECENUM_VALUE58NAME "MinCities"
904
905/* Keep this last. */
906#define SPECENUM_COUNT VUT_COUNT
907#include "specenum_gen.h"
908
909/* Used in the network protocol. */
910 struct universal {
911 universals_u value;
912 enum universals_n kind; /* formerly .type and .is_unit */
913};
914
915/* Used in the network protocol. */
916 BV_DEFINE(bv_extras, MAX_EXTRA_TYPES);
917 BV_DEFINE(bv_max_extras, MAX_EXTRA_TYPES);
918 BV_DEFINE(bv_startpos_nations, MAX_NUM_STARTPOS_NATIONS);
919
920/* Used in the network protocol. */
921#define SPECENUM_NAME gui_type
922/* Used for options which do not belong to any gui. */
923#define SPECENUM_VALUE0 GUI_STUB
924#define SPECENUM_VALUE0NAME "stub"
925/* GUI_GTK2 remains for now for keeping client options alive until
926 * user has migrated them to gtk3-client */
927#define SPECENUM_VALUE1 GUI_GTK2
928#define SPECENUM_VALUE1NAME "gtk2"
929#define SPECENUM_VALUE2 GUI_GTK3
930#define SPECENUM_VALUE2NAME "gtk3"
931#define SPECENUM_VALUE3 GUI_GTK3_22
932#define SPECENUM_VALUE3NAME "gtk3.22"
933#define SPECENUM_VALUE4 GUI_QT
934#define SPECENUM_VALUE4NAME "qt"
935/* GUI_SDL remains for now for keeping client options alive until
936 * user has migrated them to sdl2-client */
937#define SPECENUM_VALUE5 GUI_SDL
938#define SPECENUM_VALUE5NAME "sdl"
939#define SPECENUM_VALUE6 GUI_SDL2
940#define SPECENUM_VALUE6NAME "sdl2"
941#define SPECENUM_VALUE7 GUI_SDL3
942#define SPECENUM_VALUE7NAME "sdl3"
943#define SPECENUM_VALUE8 GUI_WEB
944#define SPECENUM_VALUE8NAME "web"
945#define SPECENUM_VALUE9 GUI_GTK4
946#define SPECENUM_VALUE9NAME "gtk4"
947#define SPECENUM_VALUE10 GUI_GTK5
948#define SPECENUM_VALUE10NAME "gtk4x"
949#include "specenum_gen.h"
950
951/* Used in the network protocol. */
952#define SPECENUM_NAME airlifting_style
953#define SPECENUM_BITWISE
954/* Like classical Freeciv. One unit per turn. */
955#define SPECENUM_ZERO AIRLIFTING_CLASSICAL
956/* Allow airlifting from allied cities. */
957#define SPECENUM_VALUE0 AIRLIFTING_ALLIED_SRC
958/* Allow airlifting to allied cities. */
959#define SPECENUM_VALUE1 AIRLIFTING_ALLIED_DEST
960/* Unlimited units to airlift from the source (but always needs an Airport
961 * or equivalent). */
962#define SPECENUM_VALUE2 AIRLIFTING_UNLIMITED_SRC
963/* Unlimited units to airlift to the destination (doesn't require any
964 * Airport or equivalent). */
965#define SPECENUM_VALUE3 AIRLIFTING_UNLIMITED_DEST
966#include "specenum_gen.h"
967
968/* Used in the network protocol. */
969#define SPECENUM_NAME caravan_bonus_style
970#define SPECENUM_VALUE0 CBS_CLASSIC
971#define SPECENUM_VALUE0NAME "Classic"
972#define SPECENUM_VALUE1 CBS_LOGARITHMIC
973#define SPECENUM_VALUE1NAME "Logarithmic"
974#include "specenum_gen.h"
975
976/* Used in the network protocol. */
977#define SPECENUM_NAME persistent_ready
978#define SPECENUM_VALUE0 PERSISTENTR_DISABLED
979#define SPECENUM_VALUE0NAME "Disabled"
980#define SPECENUM_VALUE1 PERSISTENTR_CONNECTED
981#define SPECENUM_VALUE1NAME "Connected"
982#include "specenum_gen.h"
983
984#define SPECENUM_NAME reveal_map
985#define SPECENUM_BITWISE
986/* Reveal only the area around the first units at the beginning. */
987#define SPECENUM_ZERO REVEAL_MAP_NONE
988/* Reveal the (fogged) map at the beginning of the game. */
989#define SPECENUM_VALUE0 REVEAL_MAP_START
990/* Reveal (and unfog) the map for dead players. */
991#define SPECENUM_VALUE1 REVEAL_MAP_DEAD
992#include "specenum_gen.h"
993
994/* Used in the network protocol. */
995#define SPECENUM_NAME gameloss_style
996#define SPECENUM_BITWISE
997/* Like classical Freeciv. No special effects. */
998#define SPECENUM_ZERO GAMELOSS_STYLE_CLASSICAL
999/* Remaining cities are taken by barbarians. */
1000#define SPECENUM_VALUE0 GAMELOSS_STYLE_BARB
1001#define SPECENUM_VALUE0NAME "Barbarians"
1002/* Try civil war. */
1003#define SPECENUM_VALUE1 GAMELOSS_STYLE_CWAR
1004#define SPECENUM_VALUE1NAME "CivilWar"
1005/* Do some looting */
1006#define SPECENUM_VALUE2 GAMELOSS_STYLE_LOOT
1007#define SPECENUM_VALUE2NAME "Loot"
1008#include "specenum_gen.h"
1009
1010/* Used in the network protocol. */
1011#define SPECENUM_NAME tech_upkeep_style
1012/* No upkeep */
1013#define SPECENUM_VALUE0 TECH_UPKEEP_NONE
1014#define SPECENUM_VALUE0NAME "None"
1015/* Normal tech upkeep */
1016#define SPECENUM_VALUE1 TECH_UPKEEP_BASIC
1017#define SPECENUM_VALUE1NAME "Basic"
1018/* Tech upkeep multiplied by number of cities */
1019#define SPECENUM_VALUE2 TECH_UPKEEP_PER_CITY
1020#define SPECENUM_VALUE2NAME "Cities"
1021#include "specenum_gen.h"
1022
1023/* Used in the network protocol. */
1024#define SPECENUM_NAME trade_revenue_style
1025#define SPECENUM_VALUE0 TRS_CLASSIC
1026#define SPECENUM_VALUE0NAME "Classic"
1027#define SPECENUM_VALUE1 TRS_SIMPLE
1028#define SPECENUM_VALUE1NAME "Simple"
1029#include "specenum_gen.h"
1030
1031/* Used in the network protocol. */
1032/* Numerical values used in savegames */
1033#define SPECENUM_NAME phase_mode_type
1034#define SPECENUM_VALUE0 PMT_CONCURRENT
1035#define SPECENUM_VALUE0NAME "Concurrent"
1036#define SPECENUM_VALUE1 PMT_PLAYERS_ALTERNATE
1037#define SPECENUM_VALUE1NAME "Players Alternate"
1038#define SPECENUM_VALUE2 PMT_TEAMS_ALTERNATE
1039#define SPECENUM_VALUE2NAME "Teams Alternate"
1040#include "specenum_gen.h"
1041
1042/* Phase mode change has changed meaning of the phase numbers */
1043#define PHASE_INVALIDATED -1
1044/* Phase was never known */
1045#define PHASE_UNKNOWN -2
1046
1047/* Used in the network protocol. */
1048 enum borders_mode {
1049 BORDERS_DISABLED = 0,
1050 BORDERS_ENABLED,
1051 BORDERS_SEE_INSIDE,
1052 BORDERS_EXPAND
1053};
1054
1055enum trait_dist_mode {
1056 TDM_FIXED = 0,
1057 TDM_EVEN
1058};
1059
1060/* Used in the network protocol. */
1061 enum diplomacy_mode {
1062 DIPLO_FOR_ALL,
1063 DIPLO_FOR_HUMANS,
1064 DIPLO_FOR_AIS,
1065 DIPLO_NO_AIS,
1066 DIPLO_NO_MIXED,
1067 DIPLO_FOR_TEAMS,
1068 DIPLO_DISABLED,
1069};
1070
1071/* Server setting types. */
1072#define SPECENUM_NAME sset_type
1073#define SPECENUM_VALUE0 SST_BOOL
1074#define SPECENUM_VALUE1 SST_INT
1075#define SPECENUM_VALUE2 SST_STRING
1076#define SPECENUM_VALUE3 SST_ENUM
1077#define SPECENUM_VALUE4 SST_BITWISE
1078#define SPECENUM_COUNT SST_COUNT
1079#include "specenum_gen.h"
1080
1081/* Mark server setting id's. */
1082typedef int server_setting_id;
1083
1084/* Used in the network protocol. */
1085#define SPECENUM_NAME extra_category
1086#define SPECENUM_VALUE0 ECAT_INFRA
1087#define SPECENUM_VALUE0NAME "Infra"
1088#define SPECENUM_VALUE1 ECAT_NATURAL
1089#define SPECENUM_VALUE1NAME "Natural"
1090#define SPECENUM_VALUE2 ECAT_NUISANCE
1091#define SPECENUM_VALUE2NAME "Nuisance"
1092#define SPECENUM_VALUE3 ECAT_BONUS
1093#define SPECENUM_VALUE3NAME "Bonus"
1094#define SPECENUM_VALUE4 ECAT_RESOURCE
1095#define SPECENUM_VALUE4NAME "Resource"
1096#define SPECENUM_COUNT ECAT_COUNT
1097#include "specenum_gen.h"
1098#define ECAT_NONE ECAT_COUNT
1099
1100/* Used in the network protocol.
1101 * When adding new cause types here, consider also adding them to the
1102 * order of pillage preference in get_preferred_pillage() */
1103#define SPECENUM_NAME extra_cause
1104#define SPECENUM_VALUE0 EC_IRRIGATION
1105#define SPECENUM_VALUE0NAME "Irrigation"
1106#define SPECENUM_VALUE1 EC_MINE
1107#define SPECENUM_VALUE1NAME "Mine"
1108#define SPECENUM_VALUE2 EC_ROAD
1109#define SPECENUM_VALUE2NAME "Road"
1110#define SPECENUM_VALUE3 EC_BASE
1111#define SPECENUM_VALUE3NAME "Base"
1112#define SPECENUM_VALUE4 EC_POLLUTION
1113#define SPECENUM_VALUE4NAME "Pollution"
1114#define SPECENUM_VALUE5 EC_FALLOUT
1115#define SPECENUM_VALUE5NAME "Fallout"
1116#define SPECENUM_VALUE6 EC_HUT
1117#define SPECENUM_VALUE6NAME "Hut"
1118#define SPECENUM_VALUE7 EC_APPEARANCE
1119#define SPECENUM_VALUE7NAME "Appear"
1120#define SPECENUM_VALUE8 EC_RESOURCE
1121#define SPECENUM_VALUE8NAME "Resource"
1122#define SPECENUM_COUNT EC_COUNT
1123#define SPECENUM_BITVECTOR bv_causes
1124#include "specenum_gen.h"
1125#define EC_NONE EC_COUNT
1126#define EC_SPECIAL (EC_NONE + 1)
1127#define EC_DEFENSIVE (EC_NONE + 2)
1128#define EC_NATURAL_DEFENSIVE (EC_NONE + 3)
1129#define EC_NOT_AGGRESSIVE (EC_NONE + 4)
1130#define EC_LAST (EC_NONE + 5)
1131
1132/* struct extra_type reserve 16 bits (0-15) for these. */
1133 FC_STATIC_ASSERT(EC_COUNT < 16, extra_causes_over_limit);
1134
1135/* Used in the network protocol. */
1136#define SPECENUM_NAME extra_rmcause
1137#define SPECENUM_VALUE0 ERM_PILLAGE
1138#define SPECENUM_VALUE0NAME "Pillage"
1139#define SPECENUM_VALUE1 ERM_CLEAN
1140#define SPECENUM_VALUE1NAME "Clean"
1141#define SPECENUM_VALUE2 ERM_DISAPPEARANCE
1142#define SPECENUM_VALUE2NAME "Disappear"
1143#define SPECENUM_VALUE3 ERM_ENTER
1144#define SPECENUM_VALUE3NAME "Enter"
1145#define SPECENUM_COUNT ERM_COUNT
1146#define SPECENUM_BITVECTOR bv_rmcauses
1147#include "specenum_gen.h"
1148#define ERM_NONE ERM_COUNT
1149
1150/* struct extra_type reserve 8 bits (0-7) for these. */
1151 FC_STATIC_ASSERT(ERM_COUNT < 8, extra_rmcauses_over_limit);
1152
1153#define SPECENUM_NAME extra_unit_seen_type
1154#define SPECENUM_VALUE0 EUS_NORMAL
1155#define SPECENUM_VALUE0NAME "Normal"
1156#define SPECENUM_VALUE1 EUS_HIDDEN
1157#define SPECENUM_VALUE1NAME "Hidden"
1158#include "specenum_gen.h"
1159
1160/* Used in the network protocol. */
1161#define SPECENUM_NAME achievement_type
1162#define SPECENUM_VALUE0 ACHIEVEMENT_SPACESHIP
1163#define SPECENUM_VALUE0NAME "Spaceship"
1164#define SPECENUM_VALUE1 ACHIEVEMENT_MAP
1165#define SPECENUM_VALUE1NAME "Map_Known"
1166#define SPECENUM_VALUE2 ACHIEVEMENT_MULTICULTURAL
1167#define SPECENUM_VALUE2NAME "Multicultural"
1168#define SPECENUM_VALUE3 ACHIEVEMENT_CULTURED_CITY
1169#define SPECENUM_VALUE3NAME "Cultured_City"
1170#define SPECENUM_VALUE4 ACHIEVEMENT_CULTURED_NATION
1171#define SPECENUM_VALUE4NAME "Cultured_Nation"
1172#define SPECENUM_VALUE5 ACHIEVEMENT_LUCKY
1173#define SPECENUM_VALUE5NAME "Lucky"
1174#define SPECENUM_VALUE6 ACHIEVEMENT_HUTS
1175#define SPECENUM_VALUE6NAME "Huts"
1176#define SPECENUM_VALUE7 ACHIEVEMENT_METROPOLIS
1177#define SPECENUM_VALUE7NAME "Metropolis"
1178#define SPECENUM_VALUE8 ACHIEVEMENT_LITERATE
1179#define SPECENUM_VALUE8NAME "Literate"
1180#define SPECENUM_VALUE9 ACHIEVEMENT_LAND_AHOY
1181#define SPECENUM_VALUE9NAME "Land_Ahoy"
1182#define SPECENUM_VALUE10 ACHIEVEMENT_KILLER
1183#define SPECENUM_VALUE10NAME "Killer"
1184#define SPECENUM_VALUE11 ACHIEVEMENT_RICH
1185#define SPECENUM_VALUE11NAME "Rich"
1186#define SPECENUM_COUNT ACHIEVEMENT_COUNT
1187#include "specenum_gen.h"
1188
1189/* Used in the network protocol. */
1190#define SPECENUM_NAME mood_type
1191#define SPECENUM_VALUE0 MOOD_PEACEFUL
1192#define SPECENUM_VALUE0NAME "Peaceful"
1193#define SPECENUM_VALUE1 MOOD_COMBAT
1194#define SPECENUM_VALUE1NAME "Combat"
1195#define SPECENUM_COUNT MOOD_COUNT
1196#include "specenum_gen.h"
1197
1198/* Used in the network protocol. */
1199#define SPECENUM_NAME action_decision
1200/* Doesn't need the player to decide what action to take. */
1201#define SPECENUM_VALUE0 ACT_DEC_NOTHING
1202#define SPECENUM_VALUE0NAME N_("nothing")
1203/* Wants a decision because of something done to the actor. */
1204#define SPECENUM_VALUE1 ACT_DEC_PASSIVE
1205#define SPECENUM_VALUE1NAME N_("passive")
1206/* Wants a decision because of something the actor did. */
1207#define SPECENUM_VALUE2 ACT_DEC_ACTIVE
1208#define SPECENUM_VALUE2NAME N_("active")
1209#define SPECENUM_COUNT ACT_DEC_COUNT
1210#include "specenum_gen.h"
1211
1212/*
1213 * Action probability
1214 *
1215 * An action probability is the probability that an action will be
1216 * successful under the given circumstances. It is an interval that
1217 * includes the end points. An end point goes from 0% to 100%.
1218 * Alternatively it can signal a special case.
1219 *
1220 * End point values from 0 up to and including 200 should be understood as
1221 * the chance of success measured in half percentage points. In other words:
1222 * The value 3 indicates that the chance is 1.5%. The value 10 indicates
1223 * that the chance is 5%. The probability of a minimum may be rounded down
1224 * to the nearest half percentage point. The probability of a maximum may
1225 * be rounded up to the nearest half percentage point.
1226 *
1227 * Values with a higher minimum than maximum are special case values. All
1228 * special cases should be declared and documented below. An undocumented
1229 * value in this range should be considered a bug. If a special value for
1230 * internal use is needed please avoid the range from and including 0 up
1231 * to and including 255.
1232 *
1233 * [0, 0] ACTPROB_IMPOSSIBLE is another way of saying that the
1234 * probability is 0%. It isn't really a special value since it
1235 * is in range.
1236 *
1237 * [200, 200] ACTPROB_CERTAIN is another way of saying that the probability
1238 * is 100%. It isn't really a special value since it is in range.
1239 *
1240 * [253, 0] ACTPROB_NA indicates that no probability should exist.
1241 *
1242 * [254, 0] ACTPROB_NOT_IMPLEMENTED indicates that support for finding
1243 * this probability currently is missing.
1244 *
1245 * [0, 200] ACTPROB_NOT_KNOWN indicates that the player don't know enough
1246 * to find out. It is caused by the probability depending on a
1247 * rule that depends on game state the player don't have access
1248 * to. It may be possible for the player to later gain access to
1249 * this game state. It isn't really a special value since it is
1250 * in range.
1251 */
1252 struct act_prob {
1253 int min;
1254 int max;
1255};
1256
1257 enum test_result {
1258 TR_SUCCESS,
1259 TR_OTHER_FAILURE,
1260 TR_ALREADY_SOLD
1261};
1262
1263/* Road type compatibility with old specials based roads.
1264 * Used in the network protocol. */
1265enum road_compat { ROCO_ROAD, ROCO_RAILROAD, ROCO_RIVER, ROCO_NONE };
1266
1267/*
1268 * Maximum number of trade routes a city can have in any situation.
1269 * Changing this changes network protocol.
1270 */
1271#define MAX_TRADE_ROUTES 20
1272
1273/* Used in the network protocol. */
1274#define SPECENUM_NAME goods_selection_method
1275#define SPECENUM_VALUE0 GSM_LEAVING
1276#define SPECENUM_VALUE0NAME "Leaving"
1277#define SPECENUM_VALUE1 GSM_ARRIVAL
1278#define SPECENUM_VALUE1NAME "Arrival"
1279#include "specenum_gen.h"
1280
1281 enum victory_condition_type
1282{
1283 VC_SPACERACE = 0,
1284 VC_ALLIED,
1285 VC_CULTURE,
1286 VC_WORLDPEACE
1287};
1288
1289 enum environment_upset_type
1290{
1291 EUT_GLOBAL_WARMING = 0,
1292 EUT_NUCLEAR_WINTER
1293};
1294
1295 enum revolen_type {
1296 REVOLEN_FIXED = 0,
1297 REVOLEN_RANDOM,
1298 REVOLEN_QUICKENING,
1299 REVOLEN_RANDQUICK
1300};
1301
1302 enum happyborders_type {
1303 HB_DISABLED = 0,
1304 HB_NATIONAL,
1305 HB_ALLIANCE
1306};
1307
1308/* Used in network protocol. */
1309 enum spaceship_place_type {
1310 SSHIP_PLACE_STRUCTURAL,
1311 SSHIP_PLACE_FUEL,
1312 SSHIP_PLACE_PROPULSION,
1313 SSHIP_PLACE_HABITATION,
1314 SSHIP_PLACE_LIFE_SUPPORT,
1315 SSHIP_PLACE_SOLAR_PANELS
1316};
1317
1318/* Used in the network protocol. */
1319#define SPECENUM_NAME tech_cost_style
1320#define SPECENUM_VALUE0 TECH_COST_CIV1CIV2
1321#define SPECENUM_VALUE0NAME "Civ I|II"
1322#define SPECENUM_VALUE1 TECH_COST_CLASSIC
1323#define SPECENUM_VALUE1NAME "Classic"
1324#define SPECENUM_VALUE2 TECH_COST_CLASSIC_PRESET
1325#define SPECENUM_VALUE2NAME "Classic+"
1326#define SPECENUM_VALUE3 TECH_COST_EXPERIMENTAL
1327#define SPECENUM_VALUE3NAME "Experimental"
1328#define SPECENUM_VALUE4 TECH_COST_EXPERIMENTAL_PRESET
1329#define SPECENUM_VALUE4NAME "Experimental+"
1330#define SPECENUM_VALUE5 TECH_COST_LINEAR
1331#define SPECENUM_VALUE5NAME "Linear"
1332#include "specenum_gen.h"
1333
1334/* Used in the network protocol. */
1335#define SPECENUM_NAME tech_leakage_style
1336#define SPECENUM_VALUE0 TECH_LEAKAGE_NONE
1337#define SPECENUM_VALUE0NAME "None"
1338#define SPECENUM_VALUE1 TECH_LEAKAGE_EMBASSIES
1339#define SPECENUM_VALUE1NAME "Embassies"
1340#define SPECENUM_VALUE2 TECH_LEAKAGE_PLAYERS
1341#define SPECENUM_VALUE2NAME "All Players"
1342#define SPECENUM_VALUE3 TECH_LEAKAGE_NO_BARBS
1343#define SPECENUM_VALUE3NAME "Normal Players"
1344#include "specenum_gen.h"
1345
1346/* Used in the network protocol. */
1347#define SPECENUM_NAME gold_upkeep_style
1348#define SPECENUM_VALUE0 GOLD_UPKEEP_CITY
1349#define SPECENUM_VALUE0NAME "City"
1350#define SPECENUM_VALUE1 GOLD_UPKEEP_MIXED
1351#define SPECENUM_VALUE1NAME "Mixed"
1352#define SPECENUM_VALUE2 GOLD_UPKEEP_NATION
1353#define SPECENUM_VALUE2NAME "Nation"
1354#include "specenum_gen.h"
1355
1356/* Used in the network protocol. */
1357#define SPECENUM_NAME vision_layer
1358#define SPECENUM_VALUE0 V_MAIN
1359#define SPECENUM_VALUE0NAME "Main"
1360#define SPECENUM_VALUE1 V_INVIS
1361#define SPECENUM_VALUE1NAME "Stealth"
1362#define SPECENUM_VALUE2 V_SUBSURFACE
1363#define SPECENUM_VALUE2NAME "Subsurface"
1364#define SPECENUM_COUNT V_COUNT
1365#include "specenum_gen.h"
1366
1367typedef float adv_want;
1368#define ADV_WANT_PRINTF "%f"
1369
1370/* Used in the network protocol. */
1371#define SPECENUM_NAME setting_default_level
1372#define SPECENUM_VALUE0 SETDEF_INTERNAL
1373#define SPECENUM_VALUE0NAME "Internal"
1374#define SPECENUM_VALUE1 SETDEF_RULESET
1375#define SPECENUM_VALUE1NAME "Ruleset"
1376#define SPECENUM_VALUE2 SETDEF_CHANGED
1377#define SPECENUM_VALUE2NAME "Changed"
1378#include "specenum_gen.h"
1379
1380/* Used in the network protocol. */
1381#define SPECENUM_NAME capital_type
1382#define SPECENUM_VALUE0 CAPITAL_NOT
1383#define SPECENUM_VALUE0NAME "Not"
1384#define SPECENUM_VALUE1 CAPITAL_SECONDARY
1385#define SPECENUM_VALUE1NAME "Secondary"
1386#define SPECENUM_VALUE2 CAPITAL_PRIMARY
1387#define SPECENUM_VALUE2NAME "Primary"
1388#include "specenum_gen.h"
1389
1390/* Used in the network protocol. */
1391#define SPECENUM_NAME wonder_visib_type
1392#define SPECENUM_VALUE0 WV_ALWAYS
1393#define SPECENUM_VALUE0NAME "Always"
1394#define SPECENUM_VALUE1 WV_NEVER
1395#define SPECENUM_VALUE1NAME "Never"
1396#define SPECENUM_VALUE2 WV_EMBASSY
1397#define SPECENUM_VALUE2NAME "Embassy"
1398#include "specenum_gen.h"
1399
1400/* Used in the network protocol. */
1401#define SPECENUM_NAME transp_def_type
1402#define SPECENUM_VALUE0 TDT_ALIGHT
1403#define SPECENUM_VALUE0NAME "Alight"
1404#define SPECENUM_VALUE1 TDT_BLOCKED
1405#define SPECENUM_VALUE1NAME "Blocked"
1406#define SPECENUM_VALUE2 TDT_ALWAYS
1407#define SPECENUM_VALUE2NAME "Always"
1408#include "specenum_gen.h"
1409
1410/* Used in the savegames, by numeric value. */
1411#define SPECENUM_NAME city_acquire_type
1412#define SPECENUM_VALUE0 CACQ_CONQUEST
1413#define SPECENUM_VALUE0NAME "Conquest"
1414#define SPECENUM_VALUE1 CACQ_FOUNDED
1415#define SPECENUM_VALUE1NAME "Founded"
1416#include "specenum_gen.h"
1417
1418#ifdef __cplusplus
1419}
1420#endif /* __cplusplus */
1421
1422#endif /* FC__FC_TYPES_H */
bitvector.h
BV_DEFINE
#define BV_DEFINE(name, bits)
Definition bitvector.h:132
incite_cost
char * incite_cost
Definition comments.c:74
ai_level_name_update_cb
const char * ai_level_name_update_cb(const char *old)
Definition ai.c:374
Road_type_id
int Road_type_id
Definition fc_types.h:388
trait_dist_mode
trait_dist_mode
Definition fc_types.h:1053
TDM_FIXED
@ TDM_FIXED
Definition fc_types.h:1054
TDM_EVEN
@ TDM_EVEN
Definition fc_types.h:1055
Activity_type_id
enum unit_activity Activity_type_id
Definition fc_types.h:383
adv_want
float adv_want
Definition fc_types.h:1365
road_compat
road_compat
Definition fc_types.h:1263
ROCO_RAILROAD
@ ROCO_RAILROAD
Definition fc_types.h:1263
ROCO_NONE
@ ROCO_NONE
Definition fc_types.h:1263
ROCO_RIVER
@ ROCO_RIVER
Definition fc_types.h:1263
ROCO_ROAD
@ ROCO_ROAD
Definition fc_types.h:1263
Goods_type_id
int Goods_type_id
Definition fc_types.h:391
diplomacy_mode
diplomacy_mode
Definition fc_types.h:1059
DIPLO_NO_MIXED
@ DIPLO_NO_MIXED
Definition fc_types.h:1064
DIPLO_FOR_TEAMS
@ DIPLO_FOR_TEAMS
Definition fc_types.h:1065
DIPLO_NO_AIS
@ DIPLO_NO_AIS
Definition fc_types.h:1063
DIPLO_FOR_HUMANS
@ DIPLO_FOR_HUMANS
Definition fc_types.h:1061
DIPLO_FOR_ALL
@ DIPLO_FOR_ALL
Definition fc_types.h:1060
DIPLO_FOR_AIS
@ DIPLO_FOR_AIS
Definition fc_types.h:1062
DIPLO_DISABLED
@ DIPLO_DISABLED
Definition fc_types.h:1066
environment_upset_type
environment_upset_type
Definition fc_types.h:1288
EUT_NUCLEAR_WINTER
@ EUT_NUCLEAR_WINTER
Definition fc_types.h:1290
EUT_GLOBAL_WARMING
@ EUT_GLOBAL_WARMING
Definition fc_types.h:1289
server_setting_id
int server_setting_id
Definition fc_types.h:1080
Tech_type_id
int Tech_type_id
Definition fc_types.h:381
citizens
unsigned char citizens
Definition fc_types.h:392
Impr_type_id
int Impr_type_id
Definition fc_types.h:380
ssetv
int ssetv
Definition fc_types.h:700
req_problem_type
req_problem_type
Definition fc_types.h:706
RPT_CERTAIN
@ RPT_CERTAIN
Definition fc_types.h:708
RPT_POSSIBLE
@ RPT_POSSIBLE
Definition fc_types.h:707
revolen_type
revolen_type
Definition fc_types.h:1293
REVOLEN_RANDOM
@ REVOLEN_RANDOM
Definition fc_types.h:1295
REVOLEN_RANDQUICK
@ REVOLEN_RANDQUICK
Definition fc_types.h:1297
REVOLEN_FIXED
@ REVOLEN_FIXED
Definition fc_types.h:1294
REVOLEN_QUICKENING
@ REVOLEN_QUICKENING
Definition fc_types.h:1296
adv_unit_task
adv_unit_task
Definition fc_types.h:374
AUT_BUILD_CITY
@ AUT_BUILD_CITY
Definition fc_types.h:374
AUT_NONE
@ AUT_NONE
Definition fc_types.h:374
AUT_AUTO_WORKER
@ AUT_AUTO_WORKER
Definition fc_types.h:374
Unit_Class_id
int Unit_Class_id
Definition fc_types.h:422
Nation_type_id
int Nation_type_id
Definition fc_types.h:384
Terrain_type_id
int Terrain_type_id
Definition fc_types.h:377
action_id
int action_id
Definition fc_types.h:393
Specialist_type_id
int Specialist_type_id
Definition fc_types.h:379
Government_type_id
int Government_type_id
Definition fc_types.h:385
test_result
test_result
Definition fc_types.h:1255
TR_ALREADY_SOLD
@ TR_ALREADY_SOLD
Definition fc_types.h:1258
TR_OTHER_FAILURE
@ TR_OTHER_FAILURE
Definition fc_types.h:1257
TR_SUCCESS
@ TR_SUCCESS
Definition fc_types.h:1256
MAX_NUM_PLAYER_SLOTS
#define MAX_NUM_PLAYER_SLOTS
Definition fc_types.h:32
happyborders_type
happyborders_type
Definition fc_types.h:1300
HB_ALLIANCE
@ HB_ALLIANCE
Definition fc_types.h:1303
HB_DISABLED
@ HB_DISABLED
Definition fc_types.h:1301
HB_NATIONAL
@ HB_NATIONAL
Definition fc_types.h:1302
FC_STATIC_ASSERT
FC_STATIC_ASSERT(EC_COUNT< 16, extra_causes_over_limit)
Resource_type_id
int Resource_type_id
Definition fc_types.h:378
MAX_EXTRA_TYPES
#define MAX_EXTRA_TYPES
Definition fc_types.h:50
counter_target
counter_target
Definition fc_types.h:126
CTGT_CITY
@ CTGT_CITY
Definition fc_types.h:126
MAX_NUM_STARTPOS_NATIONS
#define MAX_NUM_STARTPOS_NATIONS
Definition fc_types.h:61
spaceship_place_type
spaceship_place_type
Definition fc_types.h:1307
SSHIP_PLACE_PROPULSION
@ SSHIP_PLACE_PROPULSION
Definition fc_types.h:1310
SSHIP_PLACE_STRUCTURAL
@ SSHIP_PLACE_STRUCTURAL
Definition fc_types.h:1308
SSHIP_PLACE_LIFE_SUPPORT
@ SSHIP_PLACE_LIFE_SUPPORT
Definition fc_types.h:1312
SSHIP_PLACE_SOLAR_PANELS
@ SSHIP_PLACE_SOLAR_PANELS
Definition fc_types.h:1313
SSHIP_PLACE_FUEL
@ SSHIP_PLACE_FUEL
Definition fc_types.h:1309
SSHIP_PLACE_HABITATION
@ SSHIP_PLACE_HABITATION
Definition fc_types.h:1311
CITY_MAP_MAX_RADIUS
#define CITY_MAP_MAX_RADIUS
Definition fc_types.h:83
Unit_type_id
int Unit_type_id
Definition fc_types.h:386
victory_condition_type
victory_condition_type
Definition fc_types.h:1280
VC_SPACERACE
@ VC_SPACERACE
Definition fc_types.h:1281
VC_CULTURE
@ VC_CULTURE
Definition fc_types.h:1283
VC_ALLIED
@ VC_ALLIED
Definition fc_types.h:1282
VC_WORLDPEACE
@ VC_WORLDPEACE
Definition fc_types.h:1284
Disaster_type_id
int Disaster_type_id
Definition fc_types.h:389
output_type_id
output_type_id
Definition fc_types.h:100
O_SHIELD
@ O_SHIELD
Definition fc_types.h:101
O_FOOD
@ O_FOOD
Definition fc_types.h:101
O_TRADE
@ O_TRADE
Definition fc_types.h:101
O_SCIENCE
@ O_SCIENCE
Definition fc_types.h:101
O_LUXURY
@ O_LUXURY
Definition fc_types.h:101
O_GOLD
@ O_GOLD
Definition fc_types.h:101
O_LAST
@ O_LAST
Definition fc_types.h:101
Continent_id
signed short Continent_id
Definition fc_types.h:376
borders_mode
borders_mode
Definition fc_types.h:1046
BORDERS_ENABLED
@ BORDERS_ENABLED
Definition fc_types.h:1048
BORDERS_DISABLED
@ BORDERS_DISABLED
Definition fc_types.h:1047
BORDERS_SEE_INSIDE
@ BORDERS_SEE_INSIDE
Definition fc_types.h:1049
BORDERS_EXPAND
@ BORDERS_EXPAND
Definition fc_types.h:1050
Base_type_id
int Base_type_id
Definition fc_types.h:387
Multiplier_type_id
int Multiplier_type_id
Definition fc_types.h:390
Output_type_id
enum output_type_id Output_type_id
Definition fc_types.h:382
override_bool
override_bool
Definition fc_types.h:94
OVERRIDE_TRUE
@ OVERRIDE_TRUE
Definition fc_types.h:94
NO_OVERRIDE
@ NO_OVERRIDE
Definition fc_types.h:94
OVERRIDE_FALSE
@ OVERRIDE_FALSE
Definition fc_types.h:94
shared.h
specenum_gen.h
achievement
Definition achievements.h:26
act_prob
Definition fc_types.h:1250
act_prob::max
int max
Definition fc_types.h:1252
act_prob::min
int min
Definition fc_types.h:1251
action
Definition actions.h:106
advance
Definition tech.h:124
city
Definition city.h:320
connection
Definition connection.h:136
counter
Definition counters.h:27
extra_type
Definition extras.h:88
goods_type
Definition traderoutes.h:187
government
Definition government.h:52
impr_type
Definition improvement.h:50
nation_group
Definition nation.h:167
nation_style
Definition style.h:22
nation_type
Definition nation.h:98
output_type
Definition city.h:259
player
Definition player.h:249
specialist
Definition specialist.h:29
terrain
Definition terrain.h:75
tile
Definition tile.h:50
unit_class
Definition unittype.h:149
unit_type
Definition unittype.h:507
unit
Definition unit.h:140
universal
Definition fc_types.h:908
universal::kind
enum universals_n kind
Definition fc_types.h:910
universal::value
universals_u value
Definition fc_types.h:909
universals_u
Definition fc_types.h:717