--- deliantra/server/include/map.h 2007/06/07 19:12:22 1.77
+++ deliantra/server/include/map.h 2007/08/24 00:26:10 1.84
@@ -1,23 +1,22 @@
/*
- * This file is part of Crossfire TRT, the Multiplayer Online Role Playing Game.
+ * This file is part of Crossfire TRT, the Roguelike Realtime MORPG.
*
* Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Crossfire TRT team
* Copyright (©) 2002-2005,2007 Mark Wedel & Crossfire Development Team
* Copyright (©) 1992,2007 Frank Tore Johansen
*
- * Crossfire TRT is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
+ * Crossfire TRT is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License along
- * with Crossfire TRT; if not, write to the Free Software Foundation, Inc. 51
- * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
* The authors can be reached via e-mail to
*/
@@ -32,6 +31,7 @@
#include
+#include "region.h"
#include "cfperl.h"
/* We set this size - this is to make magic map work properly on
@@ -189,12 +189,12 @@
sint32 ACC (RW, width), ACC (RW, height); /* Width and height of map. */
struct mapspace *spaces; /* Array of spaces on this map */
uint8 *regions; /* region index per mapspace, if != 0 */
- struct region **regionmap; /* index to region */
+ region_ptr *regionmap; /* index to region */
tstamp ACC (RW, last_access); /* last time this map was accessed somehow */
shstr ACC (RW, name); /* Name of map as given by its creator */
- struct region *ACC (RW, default_region); /* What jurisdiction in the game world this map is ruled by
+ region_ptr ACC (RW, default_region); /* What jurisdiction in the game world this map is ruled by
* points to the struct containing all the properties of
* the region */
double ACC (RW, reset_time);
@@ -214,7 +214,6 @@
sint16 players; /* How many players are on this map right now */
uint16 ACC (RW, difficulty); /* What level the player should be to play here */
- bool ACC (RW, active); // wether this map is active or not
bool ACC (RW, per_player);
bool ACC (RW, per_party);
bool ACC (RW, outdoor); /* True if an outdoor map */
@@ -260,6 +259,8 @@
MTH void set_darkness_map ();
MTH int estimate_difficulty () const;
+ MTH void play_sound (faceidx sound, int x, int y) const;
+
// set the given flag on all objects in the map
MTH void set_object_flag (int flag, int value = 1);
@@ -300,6 +301,8 @@
MTH void touch () { last_access = runtime; }
+ MTH bool tile_available (int dir, bool load = true);
+
// find the map that is at coordinate x|y relative to this map
// TODO: need a better way than passing by reference
// TODO: make perl interface
@@ -320,7 +323,7 @@
void make_map_floor (char **layout, char *floorstyle, random_map_params *RP);
bool generate_random_map (random_map_params *RP);
- static maptile *find_async (const char *path, maptile *original = 0);//PERL
+ static maptile *find_async (const char *path, maptile *original = 0, bool load = true);//PERL
static maptile *find_sync (const char *path, maptile *original = 0);//PERL
static maptile *find_style_sync (const char *dir, const char *file = 0);//PERL
MTH object *pick_random_object () const;