--- deliantra/server/include/map.h 2007/07/01 05:00:18 1.78 +++ deliantra/server/include/map.h 2007/08/24 00:26:10 1.84 @@ -31,6 +31,7 @@ #include +#include "region.h" #include "cfperl.h" /* We set this size - this is to make magic map work properly on @@ -188,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); @@ -213,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 */ @@ -259,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); @@ -299,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 @@ -319,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;