[an error occurred while processing this directive]
[<a href="index.shtml">Package Index</a></code> | <a href="index_std.shtml">Mudlib Index</a></code> | <a href="index_eff.shtml">Effect Index</a></code>]<br><h2>File /obj/handlers/world_map.c</h2>
This is the handler to help control the world map.  It co-ordinates
all the terrains connecting themselves together.  All terrains are
rectangular.<p>Written by Pinkfish<p>Started Fri Mar 22 16:58:35 PST 2002
<h2>Includes</h2>
This class includes the following files /include/terrain_map.h<h2>Class Index</h2>
<ul><li><a href="#class_region">region</a>
</ul><h2>Method index</h2>
<ul>
<li><a href="#add_feature">add_feature</a>(string)<br/>
This method adds a feature into the world map.
<li><a href="#add_terrain">add_terrain</a>(string, int, int, int, int)<br/>
This method adds the specified terrain to the world map.
<li><a href="#find_room_at">find_room_at</a>(int, int)<br/>
This method finds the specific room at the specific location
<li><a href="#find_terrain_at">find_terrain_at</a>(int, int)<br/>
This method finds the terrain at the specific location.
<li><a href="#generate_blocking">generate_blocking</a>(int, int, string *, string *, string *)<li><a href="#query_blocking_template">query_blocking_template</a>(int, int, int)<br/>
Find the template to use for the area blocked by an obstacle.
<li><a href="#query_features_at">query_features_at</a>(int, int)<br/>
This method returns the list of all the features available at the
specific location.
<li><a href="#query_features_in_region">query_features_in_region</a>(int, int, int, int)<br/>
This method finds all the features inside the specified region.
<li><a href="#query_map_template">query_map_template</a>(int)<br/>
This method returns the template for the specific size of the
map.
<li><a href="#remove_feature">remove_feature</a>(string)<br/>
This method removes a feature from the world map.
</ul>
<h2>Public Functions</h2>
These are functions that everyone can access.<p>
<dl>
<dt class="autodocfuncname"><a name="add_feature">
add_feature</a><pre class="autodocfuncdef">
void add_feature(string feature)
</pre><dd><br />
This method adds a feature into the world map.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
feature - the feature to add
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="add_terrain">
add_terrain</a><pre class="autodocfuncdef">
int add_terrain(string path,
                int x1,
                int y1,
                int x2,
                int y2)
</pre><dd><br />
This method adds the specified terrain to the world map.
<br />

<dt class="autodocfuncname"><a name="find_room_at">
find_room_at</a><pre class="autodocfuncdef">
string find_room_at(int x,
                    int y)
</pre><dd><br />
This method finds the specific room at the specific location<br />
<br /><dl>
<dd><b>Parameters:</b><br />
x - the x co-ordinate<br />
y - the y co-ordinate<br />
<br />
<dd><b>Returns:</b>
<br />the path to the room
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="find_terrain_at">
find_terrain_at</a><pre class="autodocfuncdef">
string find_terrain_at(int x,
                       int y)
</pre><dd><br />
This method finds the terrain at the specific location.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
x - the x co-ordinate<br />
y - the y co-ordinate<br />
<br />
<dd><b>Returns:</b>
<br />the path to the terrain
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="generate_blocking">
generate_blocking</a><pre class="autodocfuncdef">
mixed * generate_blocking(int x,
                          int y,
                          string * start,
                          string * straight,
                          string * diagonal)
</pre>
<dt class="autodocfuncname"><a name="query_blocking_template">
query_blocking_template</a><pre class="autodocfuncdef">
string * query_blocking_template(int x,
                                 int y,
                                 int type)
</pre><dd><br />
Find the template to use for the area blocked by an obstacle.
This will do nifty template fitting stuff for obstacles.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
x - the x co-ordinate of the blockage<br />
y - the y co-ordinate of the blockage<br />
type - the type is 0 for normal, 1 for straight, 2 for diagonal
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_features_at">
query_features_at</a><pre class="autodocfuncdef">
string * query_features_at(int x,
                           int y)
</pre><dd><br />
This method returns the list of all the features available at the
specific location.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
x - the x position<br />
y - the y position<br />
<br />
<dd><b>Returns:</b>
<br />the features at the location
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_features_in_region">
query_features_in_region</a><pre class="autodocfuncdef">
string * query_features_in_region(int x1_orig,
                                  int y1_orig,
                                  int x2_orig,
                                  int y2_orig)
</pre><dd><br />
This method finds all the features inside the specified region.  This
is quite expensive in terms of evaluation cost, so do not try and call
this too much.  Cache the results if possible.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
x1 - the top x location<br />
y1 - the top y location<br />
x2 - the bottom x location<br />
y2 - the bottom y location<br />
<br />
<dd><b>Returns:</b>
<br />the features in the region
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_map_template">
query_map_template</a><pre class="autodocfuncdef">
mixed * query_map_template(int size)
</pre><dd><br />
This method returns the template for the specific size of the
map.  This is for visibility considerations.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
size - the size of the template<br />
<br />
<dd><b>Returns:</b>
<br />the template
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="remove_feature">
remove_feature</a><pre class="autodocfuncdef">
void remove_feature(string feature)
</pre><dd><br />
This method removes a feature from the world map.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
feature - the feature to remove
<br />
<br />
<br /></dl>

</dl>
<h2>Classes</h2>
These are nice data types for dealing with...  Data!<p>
<ul>
<li><a name="class_region">
region</a><pre>
class region {
               mixed * terrains;
               string * features;
               int last_touched;
}

</pre>
</ul>
[an error occurred while processing this directive]

