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 */
20 /****************************************************************
21 Miscellaneous terrain information
22 *****************************************************************/
23 #define terrain_misc packet_ruleset_terrain_control
25 /* Some types used below. */
28 struct packet_edit_startpos_full
;
33 MAPSIZE_FULLSIZE
= 0, /* Using the number of tiles / 1000. */
34 MAPSIZE_PLAYER
, /* Define the number of (land) tiles per player;
35 * the setting 'landmass' and the number of players
36 * are used to calculate the map size. */
37 MAPSIZE_XYSIZE
/* 'xsize' and 'ysize' are defined. */
49 MAPSTARTPOS_DEFAULT
= 0, /* Generator's choice. */
50 MAPSTARTPOS_SINGLE
, /* One player per continent. */
51 MAPSTARTPOS_2or3
, /* Two on three players per continent. */
52 MAPSTARTPOS_ALL
, /* All players on a single continent. */
53 MAPSTARTPOS_VARIABLE
, /* Depending on size of continents. */
56 #define SPECENUM_NAME team_placement
57 #define SPECENUM_VALUE0 TEAM_PLACEMENT_DISABLED
58 #define SPECENUM_VALUE1 TEAM_PLACEMENT_CLOSEST
59 #define SPECENUM_VALUE2 TEAM_PLACEMENT_CONTINENT
60 #define SPECENUM_VALUE3 TEAM_PLACEMENT_HORIZONTAL
61 #define SPECENUM_VALUE4 TEAM_PLACEMENT_VERTICAL
62 #include "specenum_gen.h"
66 enum direction8 valid_dirs
[8], cardinal_dirs
[8];
67 int num_valid_dirs
, num_cardinal_dirs
;
68 struct iter_index
*iterate_outwards_indices
;
69 int num_iterate_outwards_indices
;
70 int xsize
, ysize
; /* native dimensions */
72 int num_oceans
; /* not updated at the client */
74 struct startpos_hash
*startpos_table
;
78 enum mapsize_type mapsize
; /* how the map size is defined */
79 int size
; /* used to calculate [xy]size */
80 int tilesperplayer
; /* tiles per player; used to calculate size */
85 int huts_absolute
; /* For compatibility conversion from pre-2.6 savegames */
88 enum map_generator generator
;
89 enum map_startpos startpos
;
98 bool ocean_resources
; /* Resources in the middle of the ocean */
101 enum team_placement team_placement
;
104 /* Add client side when needed */
110 #endif /* __cplusplus */
112 #endif /* FC__MAP_H */