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)
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__MAP_TYPES_H
14 #define FC__MAP_TYPES_H
18 #endif /* __cplusplus */
23 /****************************************************************
24 Miscellaneous terrain information
25 *****************************************************************/
26 #define terrain_misc packet_ruleset_terrain_control
28 /* Some types used below. */
31 struct packet_edit_startpos_full
;
36 MAPSIZE_FULLSIZE
= 0, /* Using the number of tiles / 1000. */
37 MAPSIZE_PLAYER
, /* Define the number of (land) tiles per player;
38 * the setting 'landmass' and the number of players
39 * are used to calculate the map size. */
40 MAPSIZE_XYSIZE
/* 'xsize' and 'ysize' are defined. */
53 MAPSTARTPOS_DEFAULT
= 0, /* Generator's choice. */
54 MAPSTARTPOS_SINGLE
, /* One player per continent. */
55 MAPSTARTPOS_2or3
, /* Two on three players per continent. */
56 MAPSTARTPOS_ALL
, /* All players on a single continent. */
57 MAPSTARTPOS_VARIABLE
, /* Depending on size of continents. */
60 #define SPECENUM_NAME team_placement
61 #define SPECENUM_VALUE0 TEAM_PLACEMENT_DISABLED
62 #define SPECENUM_VALUE1 TEAM_PLACEMENT_CLOSEST
63 #define SPECENUM_VALUE2 TEAM_PLACEMENT_CONTINENT
64 #define SPECENUM_VALUE3 TEAM_PLACEMENT_HORIZONTAL
65 #define SPECENUM_VALUE4 TEAM_PLACEMENT_VERTICAL
66 #include "specenum_gen.h"
70 enum direction8 valid_dirs
[8], cardinal_dirs
[8];
71 int num_valid_dirs
, num_cardinal_dirs
;
72 struct iter_index
*iterate_outwards_indices
;
73 int num_iterate_outwards_indices
;
74 int xsize
, ysize
; /* native dimensions */
76 int num_oceans
; /* not updated at the client */
78 struct startpos_hash
*startpos_table
;
82 enum mapsize_type mapsize
; /* how the map size is defined */
83 int size
; /* used to calculate [xy]size */
84 int tilesperplayer
; /* tiles per player; used to calculate size */
89 int huts_absolute
; /* For compatibility conversion from pre-2.6 savegames */
92 enum map_generator generator
;
93 enum map_startpos startpos
;
102 bool ocean_resources
; /* Resources in the middle of the ocean */
105 enum team_placement team_placement
;
108 /* Add client side when needed */
114 #endif /* __cplusplus */
116 #endif /* FC__MAP_H */