Crossfire Server, Branch 1.12
R12190
|
00001 /* 00002 * static char *rcsid_map_c = 00003 * "$Id: random_map.h 11578 2009-02-23 22:02:27Z lalo $"; 00004 */ 00005 00006 /* 00007 CrossFire, A Multiplayer game for X-windows 00008 00009 Copyright (C) 2001 Mark Wedel & Crossfire Development Team 00010 Copyright (C) 1992 Frank Tore Johansen 00011 00012 This program is free software; you can redistribute it and/or modify 00013 it under the terms of the GNU General Public License as published by 00014 the Free Software Foundation; either version 2 of the License, or 00015 (at your option) any later version. 00016 00017 This program is distributed in the hope that it will be useful, 00018 but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 GNU General Public License for more details. 00021 00022 You should have received a copy of the GNU General Public License 00023 along with this program; if not, write to the Free Software 00024 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00025 00026 The authors can be reached via e-mail at crossfire-devel@real-time.com 00027 */ 00028 00034 #ifndef RANDOM_MAP_H 00035 #define RANDOM_MAP_H 00036 00037 #define RM_SIZE 512 00038 00042 typedef struct RMParms { 00043 char wallstyle[RM_SIZE]; 00044 char wall_name[RM_SIZE]; 00045 char floorstyle[RM_SIZE]; 00046 char monsterstyle[RM_SIZE]; 00047 char treasurestyle[RM_SIZE]; 00048 char layoutstyle[RM_SIZE]; 00049 char doorstyle[RM_SIZE]; 00050 char decorstyle[RM_SIZE]; 00051 char origin_map[RM_SIZE]; 00052 char final_map[RM_SIZE]; 00053 char final_exit_archetype[RM_SIZE]; 00054 char exitstyle[RM_SIZE]; 00055 char this_map[RM_SIZE]; 00056 char exit_on_final_map[RM_SIZE]; 00057 char dungeon_name[RM_SIZE]; 00058 00059 int Xsize; 00060 int Ysize; 00061 int expand2x; 00062 int layoutoptions1; 00063 int layoutoptions2; 00064 int layoutoptions3; 00065 int symmetry; 00066 int difficulty; 00067 int difficulty_given; 00068 float difficulty_increase; 00069 int dungeon_level; 00070 int dungeon_depth; 00071 int decoroptions; 00072 int orientation; 00073 int origin_y; 00074 int origin_x; 00075 int random_seed; 00076 int map_layout_style; 00077 long unsigned int total_map_hp; 00078 int treasureoptions; 00079 int symmetry_used; 00080 struct regiondef *region; 00081 int multiple_floors; 00082 } RMParms; 00083 00084 int load_parameters(FILE *fp, int bufstate, RMParms *RP); 00085 00090 #define ONION_LAYOUT 1 00091 #define MAZE_LAYOUT 2 00092 #define SPIRAL_LAYOUT 3 00093 #define ROGUELIKE_LAYOUT 4 00094 #define SNAKE_LAYOUT 5 00095 #define SQUARE_SPIRAL_LAYOUT 6 00096 #define NROFLAYOUTS 6 00097 00106 #define OPT_RANDOM 0 00107 #define OPT_CENTERED 1 00108 #define OPT_LINEAR 2 00109 #define OPT_BOTTOM_C 4 00110 #define OPT_BOTTOM_R 8 00111 #define OPT_IRR_SPACE 16 00112 #define OPT_WALL_OFF 32 00113 #define OPT_WALLS_ONLY 64 00114 #define OPT_NO_DOORS 256 00116 00117 00123 #define RANDOM_SYM 0 00124 #define NO_SYM 1 00125 #define X_SYM 2 00126 #define Y_SYM 3 00127 #define XY_SYM 4 00129 00130 00131 #define MIN_RANDOM_MAP_SIZE 10 00132 00136 #define BC_RANDOM(x) ((int) ((RANDOM()%(x)+RANDOM()%(x)+RANDOM()%(x))/3.)) 00137 00138 int set_random_map_variable(RMParms *rp, const char *buf); 00139 00140 #endif