--- deliantra/server/include/map.h 2007/06/07 19:12:22 1.77
+++ deliantra/server/include/map.h 2007/08/01 01:53:13 1.81
@@ -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);
@@ -260,6 +260,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);
@@ -374,5 +376,12 @@
return map->at (x, y);
}
+inline void
+object::play_sound (faceidx sound) const
+{
+ if (map && sound)
+ map->play_sound (sound, x, y);
+}
+
#endif