map_event Class Reference

Baseclass for map enter/leave/action events. More...

#include <map_event.h>

Inheritance diagram for map_event:

Inheritance graph
[legend]
Collaboration diagram for map_event:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 map_event ()
 Default constructor.
void put_state (ogzstream &) const
 Saves the basic event data (such as the type or script data) to a file.
bool get_state (igzstream &)
 Loads the basic event date from a file.
bool equals (const event *evnt)
 Compare two map events for equality.
s_int32 execute (const event *evnt)
 Executes the script associated with this map event.

Public Attributes

s_int32 submap
 Submap index (-1 for any).
s_int32 x
 X position (-1 for any).
s_int32 y
 Y position (-1 for any).
s_int8 dir
 Direction where the character is looking (-1 for any).
s_int32 map
 Useless (for now).
mapcharacterc
 Pointer to the mapcharacter that can launch this event (NULL for any).


Detailed Description

Baseclass for map enter/leave/action events.

The event will be launched if all the member's data matches.

Definition at line 32 of file map_event.h.


Constructor & Destructor Documentation

map_event::map_event (  ) 

Default constructor.

Definition at line 25 of file map_event.cc.


Member Function Documentation

void map_event::put_state ( ogzstream out  )  const [virtual]

Saves the basic event data (such as the type or script data) to a file.

Parameters:
out file where to save the event.

Reimplemented from event.

Definition at line 106 of file map_event.cc.

bool map_event::get_state ( igzstream f  )  [virtual]

Loads the basic event date from a file.

Parameters:
in file to load the event from.
Returns:
true if the event could be loaded, false otherwise

Reimplemented from event.

Definition at line 84 of file map_event.cc.

bool map_event::equals ( const event evnt  )  [virtual]

Compare two map events for equality.

Parameters:
evnt The map event to compare this to.
Returns:
True if the two events equal, false otherwise.

Implements event.

Definition at line 32 of file map_event.cc.

s_int32 map_event::execute ( const event evnt  )  [virtual]

Executes the script associated with this map event.

If the event does not repeat it is removed from the event handler.

Parameters:
evnt The event that triggered this map event.
Returns:
The number of times the event needs to be repeated.

Implements event.

Definition at line 48 of file map_event.cc.


Member Data Documentation

Submap index (-1 for any).

Definition at line 59 of file map_event.h.

s_int32 map_event::x

X position (-1 for any).

Definition at line 64 of file map_event.h.

s_int32 map_event::y

Y position (-1 for any).

Definition at line 69 of file map_event.h.

Direction where the character is looking (-1 for any).

Definition at line 74 of file map_event.h.

s_int32 map_event::map

Useless (for now).

Definition at line 79 of file map_event.h.

Pointer to the mapcharacter that can launch this event (NULL for any).

Definition at line 84 of file map_event.h.


The documentation for this class was generated from the following files:

Generated on Wed Jun 18 16:52:54 2008 for Adonthell by  doxygen 1.5.6