Crossfire Server, Branches 1.12  R18729
random_map.h
Go to the documentation of this file.
1 /*
2  * static char *rcsid_map_c =
3  * "$Id: random_map.h 11578 2009-02-23 22:02:27Z lalo $";
4  */
5 
6 /*
7  CrossFire, A Multiplayer game for X-windows
8 
9  Copyright (C) 2001 Mark Wedel & Crossfire Development Team
10  Copyright (C) 1992 Frank Tore Johansen
11 
12  This program is free software; you can redistribute it and/or modify
13  it under the terms of the GNU General Public License as published by
14  the Free Software Foundation; either version 2 of the License, or
15  (at your option) any later version.
16 
17  This program is distributed in the hope that it will be useful,
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  GNU General Public License for more details.
21 
22  You should have received a copy of the GNU General Public License
23  along with this program; if not, write to the Free Software
24  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 
26  The authors can be reached via e-mail at crossfire-devel@real-time.com
27 */
28 
34 #ifndef RANDOM_MAP_H
35 #define RANDOM_MAP_H
36 
37 #define RM_SIZE 512
38 
42 typedef struct RMParms {
58 
59  int Xsize;
60  int Ysize;
61  int expand2x;
65  int symmetry;
73  int origin_y;
74  int origin_x;
77  long unsigned int total_map_hp;
80  struct regiondef *region;
82 } RMParms;
83 
84 int load_parameters(FILE *fp, int bufstate, RMParms *RP);
85 
90 #define ONION_LAYOUT 1
91 #define MAZE_LAYOUT 2
92 #define SPIRAL_LAYOUT 3
93 #define ROGUELIKE_LAYOUT 4
94 #define SNAKE_LAYOUT 5
95 #define SQUARE_SPIRAL_LAYOUT 6
96 #define NROFLAYOUTS 6
97 
106 #define OPT_RANDOM 0
107 #define OPT_CENTERED 1
108 #define OPT_LINEAR 2
109 #define OPT_BOTTOM_C 4
110 #define OPT_BOTTOM_R 8
111 #define OPT_IRR_SPACE 16
112 #define OPT_WALL_OFF 32
113 #define OPT_WALLS_ONLY 64
114 #define OPT_NO_DOORS 256
116 
117 
123 #define RANDOM_SYM 0
124 #define NO_SYM 1
125 #define X_SYM 2
126 #define Y_SYM 3
127 #define XY_SYM 4
129 
130 
131 #define MIN_RANDOM_MAP_SIZE 10
132 
136 #define BC_RANDOM(x) ((int) ((RANDOM()%(x)+RANDOM()%(x)+RANDOM()%(x))/3.))
137 
138 int set_random_map_variable(RMParms *rp, const char *buf);
139 
140 #endif
char final_exit_archetype[RM_SIZE]
Definition: random_map.h:53
int decoroptions
Definition: random_map.h:71
char floorstyle[RM_SIZE]
Definition: random_map.h:45
char final_map[RM_SIZE]
Definition: random_map.h:52
char exit_on_final_map[RM_SIZE]
Definition: random_map.h:56
int difficulty_given
Definition: random_map.h:67
char doorstyle[RM_SIZE]
Definition: random_map.h:49
#define RM_SIZE
Definition: random_map.h:37
int random_seed
Definition: random_map.h:75
struct RMParms RMParms
int multiple_floors
Definition: random_map.h:81
int expand2x
Definition: random_map.h:61
int map_layout_style
Definition: random_map.h:76
int layoutoptions2
Definition: random_map.h:63
int symmetry
Definition: random_map.h:65
long unsigned int total_map_hp
Definition: random_map.h:77
char monsterstyle[RM_SIZE]
Definition: random_map.h:46
Definition: map.h:297
int layoutoptions1
Definition: random_map.h:62
int orientation
Definition: random_map.h:72
int treasureoptions
Definition: random_map.h:78
char dungeon_name[RM_SIZE]
Definition: random_map.h:57
int dungeon_level
Definition: random_map.h:69
char exitstyle[RM_SIZE]
Definition: random_map.h:54
int layoutoptions3
Definition: random_map.h:64
char layoutstyle[RM_SIZE]
Definition: random_map.h:48
int symmetry_used
Definition: random_map.h:79
int Ysize
Definition: random_map.h:60
int Xsize
Definition: random_map.h:59
char origin_map[RM_SIZE]
Definition: random_map.h:51
char wall_name[RM_SIZE]
Definition: random_map.h:44
float difficulty_increase
Definition: random_map.h:68
int load_parameters(FILE *fp, int bufstate, RMParms *RP)
int set_random_map_variable(RMParms *rp, const char *buf)
int origin_y
Definition: random_map.h:73
int dungeon_depth
Definition: random_map.h:70
char this_map[RM_SIZE]
Definition: random_map.h:55
struct regiondef * region
Definition: random_map.h:80
int difficulty
Definition: random_map.h:66
char treasurestyle[RM_SIZE]
Definition: random_map.h:47
char decorstyle[RM_SIZE]
Definition: random_map.h:50
int origin_x
Definition: random_map.h:74
char wallstyle[RM_SIZE]
Definition: random_map.h:43