[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 /global/start_position.c</h2>
This file contains all the start position related code.  It sets up
and controls the start location of the player.  This was split off from
the main player code by Pinkfish in April 1998.<p><b>See also:</b><br><a href="global.player.c.shtml">/global/player.c</a><p>Written by Pinkfish
<h2>Inherits</h2>
This class inherits the following classes <a href="std.basic.virtual_quit_control.c.shtml">/std/basic/virtual_quit_control.c</a><h2>Includes</h2>
This class includes the following files <a href="include.config.h.shtml">/include/config.h</a> and <a href="include.playerinfo.h.shtml">/include/playerinfo.h</a><h2>Method index</h2>
<dl><ul>
<li><a href="#add_start">add_start</a>(string, string)<br/>
This method will add a new start location to the player.
<li><a href="#check_last_pos">check_last_pos</a>()<br/>
This method figured out what the last saved position was and sets it
on the player.
<li><a href="#inform_entered_game">inform_entered_game</a>()<br/>
This method handles informing people that the player has entered the
game.
<li><a href="#inform_reconnect_game">inform_reconnect_game</a>()<br/>
THis method is called to inform people that someone has just reconnected.
<li><a href="#move_to_start_pos">move_to_start_pos</a>()<br/>
This method moves the player to the last saved position.
<li><a href="#query_last_pos">query_last_pos</a>()<br/>
This method returns the last saved position of the player.
<li><a href="#query_saved_co_ords">query_saved_co_ords</a>()<br/>
This method returns the co-ordinates of the room in which the player
last saved.
<li><a href="#query_start_pos">query_start_pos</a>()<br/>
This method returns the starting location of the player.
<li><a href="#query_starts">query_starts</a>()<br/>
This method returns the current array of possible start positions on
the player.
<li><a href="#remove_start">remove_start</a>(string)<br/>
This method will remove a start location from the player.
<li><a href="#reset_starts">reset_starts</a>()<br/>
This method resets the start locations back to an empty array.
<li><a href="#set_last_pos">set_last_pos</a>(string)<br/>
This method sets the current start location.
<li><a href="#set_start_location">set_start_location</a>(string)<br/>
This method sets the start location of the player.
</ul><h2>Public Functions</h2>
These are functions that everyone can access.<p>
.<ul><a name="add_start">
add_start</a><pre>
void add_start(string start_file,
               string start_desc)
</pre></br>
This method will add a new start location to the player.  The
description will be used in the starts command.
<br/><ul>
<li><b>Parameters:</b>
<br/>start_file - the file name of the start location
<br/>start_desc - the description of the start location
<li><b>See also:</b>
<br/><a href="#query_start_pos">query_start_pos()</a>, <a href="#reset_starts">reset_starts() </a>, <a href="#remove_start">remove_start()</a>, <a href="#query_starts">query_starts()</a> and <a href="#set_start_location">set_start_location()</a><li><b>Example:</b>
<br/><pre>// NB: This should be done with a define :)
player->add_start("/d/am/am/mendeddrum", "the mended drum");
</pre></dl>

<ul><a name="check_last_pos">
check_last_pos</a><pre>
void check_last_pos()
</pre></br>
This method figured out what the last saved position was and sets it
on the player.  This basicly sets the last saved postion.
<br/><ul>
<li><b>See also:</b>
<br/><a href="#query_last_pos">query_last_pos()
</a></dl>

<ul><a name="inform_reconnect_game">
inform_reconnect_game</a><pre>
void inform_reconnect_game()
</pre></br>
THis method is called to inform people that someone has just reconnected.


<ul><a name="query_last_pos">
query_last_pos</a><pre>
string query_last_pos()
</pre></br>
This method returns the last saved position of the player.
<br/><ul>
<li><b>Returns:</b>
<br/>the last saved position

</dl>

<ul><a name="query_saved_co_ords">
query_saved_co_ords</a><pre>
int * query_saved_co_ords()
</pre></br>
This method returns the co-ordinates of the room in which the player
last saved.
<br/><ul>
<li><b>Returns:</b>
<br/>the last saved co-ordinates

<li><b>See also:</b>
<br/><a href="#check_last_pos">check_last_pos()</a>, <a href="#move_to_start">move_to_start()</a> and <a href="#query_start_pos">query_start_pos()</a></dl>

<ul><a name="query_start_pos">
query_start_pos</a><pre>
string query_start_pos()
</pre></br>
This method returns the starting location of the player.  This the
location they will start at if the saved position does not work
for some reason.
<br/><ul>
<li><b>Returns:</b>
<br/>the start position to use
<li><b>See also:</b>
<br/><a href="#query_starts">query_starts()</a>, <a href="#add_start">add_start()</a>, <a href="#remove_start">remove_start()</a>, <a href="#reset_starts">reset_starts()</a> and <a href="#set_start_location">set_start_location()
</a></dl>

<ul><a name="query_starts">
query_starts</a><pre>
string * query_starts()
</pre></br>
This method returns the current array of possible start positions on
the player.
<br/><ul>
<li><b>Returns:</b>
<br/>the array of possible start locations
<li><b>See also:</b>
<br/><a href="#query_start_pos">query_start_pos()</a>, <a href="#add_start">add_start()</a>, <a href="#remove_start">remove_start()</a>, <a href="#reset_starts">reset_starts()</a> and <a href="#set_start_location">set_start_location()
</a></dl>

<ul><a name="remove_start">
remove_start</a><pre>
void remove_start(string start_file)
</pre></br>
This method will remove a start location from the player.
<br/><ul>
<li><b>Parameters:</b>
<br/>start_file - the file name of the location to remove
<li><b>See also:</b>
<br/><a href="#query_start_pos">query_start_pos()</a>, <a href="#reset_starts">reset_starts()</a>, <a href="#add_start">add_start()</a>, <a href="#query_starts">query_starts()</a> and <a href="#set_start_location">set_start_location()</a><li><b>Example:</b>
<br/><pre>// NB: This should be done with a define :)
player->remove_start("/d/am/am/mendeddrum");
</pre></dl>

<ul><a name="reset_starts">
reset_starts</a><pre>
void reset_starts()
</pre></br>
This method resets the start locations back to an empty array.
<br/><ul>
<li><b>See also:</b>
<br/><a href="#query_start_pos">query_start_pos()</a>, <a href="#add_start">add_start()</a>, <a href="#remove_start">remove_start()</a>, <a href="#query_starts">query_starts()</a> and <a href="#set_start_location">set_start_location()
</a></dl>

<ul><a name="set_start_location">
set_start_location</a><pre>
void set_start_location(string start_file)
</pre></br>
This method sets the start location of the player.
<br/><ul>
<li><b>Parameters:</b>
<br/>start_file - the start location to set
<li><b>See also:</b>
<br/><a href="#query_start_pos">query_start_pos()</a>, <a href="#reset_starts">reset_starts()</a>, <a href="#remove_start">remove_start()</a>, <a href="#query_starts">query_starts()</a> and <a href="#add_start">add_start()</a><li><b>Example:</b>
<br/><pre>// NB: This should be done with a define :)
player->set_start_location("/d/am/am/mendeddrum");
</pre></dl>


<h2>Protected Functions</h2>
These are functions that only objects inheriting the class can access.<p>
<ul><a name="inform_entered_game">
inform_entered_game</a><pre>
void inform_entered_game()
</pre></br>
This method handles informing people that the player has entered the
game.
<br/><ul>
<li><b>See also:</b>
<br/><a href="#move_to_start_pos">move_to_start_pos()
</a></dl>

<ul><a name="move_to_start_pos">
move_to_start_pos</a><pre>
void move_to_start_pos()
</pre></br>
This method moves the player to the last saved position.  This should
only be called in the startup sequence.  If the last location could
not be loaded, the the start position will be used.
<br/><ul>
<li><b>See also:</b>
<br/><a href="#query_last_pos">query_last_pos()</a> and <a href="#quert_start_pos">quert_start_pos()
</a></dl>

<ul><a name="set_last_pos">
set_last_pos</a><pre>
void set_last_pos(string pos)
</pre></br>
This method sets the current start location.
<br/><ul>
<li><b>Parameters:</b>
<br/>last_pos - the start location

</dl>


[an error occurred while processing this directive]

