ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/map.h
(Generate patch)

Comparing deliantra/server/include/map.h (file contents):
Revision 1.72 by root, Mon Mar 12 01:13:10 2007 UTC vs.
Revision 1.76 by root, Mon May 28 21:15:56 2007 UTC

1/* 1/*
2 * CrossFire, A Multiplayer game for X-windows 2 * This file is part of Crossfire TRT, the Multiplayer Online Role Playing Game.
3 * 3 *
4 * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team 4 * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Crossfire TRT team
5 * Copyright (C) 2002-2005 Mark Wedel & Crossfire Development Team 5 * Copyright (©) 2002-2005,2007 Mark Wedel & Crossfire Development Team
6 * Copyright (C) 1992 Frank Tore Johansen 6 * Copyright (©) 1992,2007 Frank Tore Johansen
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * Crossfire TRT is free software; you can redistribute it and/or modify it
9 * it under the terms of the GNU General Public License as published by 9 * under the terms of the GNU General Public License as published by the Free
10 * the Free Software Foundation; either version 2 of the License, or 10 * Software Foundation; either version 2 of the License, or (at your option)
11 * (at your option) any later version. 11 * any later version.
12 * 12 *
13 * This program is distributed in the hope that it will be useful, 13 * This program is distributed in the hope that it will be useful, but
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 * GNU General Public License for more details. 16 * for more details.
17 * 17 *
18 * You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License along
19 * along with this program; if not, write to the Free Software 19 * with Crossfire TRT; if not, write to the Free Software Foundation, Inc. 51
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 * 21 *
22 * The authors can be reached via e-mail at crossfire@schmorp.de 22 * The authors can be reached via e-mail to <crossfire@schmorp.de>
23 */ 23 */
24 24
25/* 25/*
26 * The maptile is allocated each time a new map is opened. 26 * The maptile is allocated each time a new map is opened.
27 * It contains pointers (very indirectly) to all objects on the map. 27 * It contains pointers (very indirectly) to all objects on the map.
155 } 155 }
156 156
157 // return the item volume on this mapspace in cm³ 157 // return the item volume on this mapspace in cm³
158 uint64 volume () const; 158 uint64 volume () const;
159}; 159};
160
161/*
162 * Each map is in a given region of the game world and links to a region definiton, so
163 * they have to appear here in the headers, before the mapdef
164 */
165INTERFACE_CLASS (region)
166struct region : zero_initialised
167{
168 shstr ACC (RW, name); /* Shortend name of the region as maps refer to it */
169 region *ACC (RW, parent); /*
170 * Pointer to the region that is a parent of the current
171 * region, if a value isn't defined in the current region
172 * we traverse this series of pointers until it is.
173 */
174 shstr ACC (RW, longname); /* Official title of the region, this might be defined
175 * to be the same as name*/
176 shstr ACC (RW, msg); /* the description of the region */
177 shstr ACC (RW, jailmap); /*where a player that is arrested in this region should be imprisoned. */
178 int ACC (RW, index);
179 uint32 ACC (RW, counter); /* A generic counter for holding temporary data. */
180 sint16 ACC (RW, jailx), ACC (RW, jaily); /* The coodinates in jailmap to which the player should be sent. */
181 bool ACC (RW, fallback); /* whether, in the event of a region not existing,
182 * this should be the one we fall back on as the default */
183
184 static region *default_region ();
185 static region *find (const char *name);
186 static region *find_fuzzy (const char *name);
187 static region *read (object_thawer &f);
188};
189
190typedef object_vector<region, &region::index> regionvec;
191
192extern regionvec regions;
193
194#define for_all_regions(var) \
195 for (unsigned _i = 0; _i < regions.size (); ++_i) \
196 declvar (region *, var, regions [_i])
197 160
198struct shopitems : zero_initialised 161struct shopitems : zero_initialised
199{ 162{
200 const char *name; /* name of the item in question, null if it is the default item */ 163 const char *name; /* name of the item in question, null if it is the default item */
201 const char *name_pl; /* plural name */ 164 const char *name_pl; /* plural name */
248 * be loaded before used. The map,omap and map_ob 211 * be loaded before used. The map,omap and map_ob
249 * arrays will be allocated when the map is loaded */ 212 * arrays will be allocated when the map is loaded */
250 sint16 players; /* How many players are on this map right now */ 213 sint16 players; /* How many players are on this map right now */
251 uint16 ACC (RW, difficulty); /* What level the player should be to play here */ 214 uint16 ACC (RW, difficulty); /* What level the player should be to play here */
252 215
216 bool ACC (RW, active); // wether this map is active or not
253 bool ACC (RW, per_player); 217 bool ACC (RW, per_player);
254 bool ACC (RW, per_party); 218 bool ACC (RW, per_party);
255 bool ACC (RW, outdoor); /* True if an outdoor map */ 219 bool ACC (RW, outdoor); /* True if an outdoor map */
256 bool ACC (RW, nodrop); /* avoid dropping anything on this map */ 220 bool ACC (RW, nodrop); /* avoid dropping anything on this map */
257 uint8 ACC (RW, darkness); /* indicates level of darkness of map */ 221 uint8 ACC (RW, darkness); /* indicates level of darkness of map */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines