Adonthell 0.4
|
Baseclass for map enter/leave/action events. More...
#include <map_event.h>
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). | |
mapcharacter * | c |
Pointer to the mapcharacter that can launch this event (NULL for any). |
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.
map_event::map_event | ( | ) |
Default constructor.
Definition at line 25 of file map_event.cc.
void map_event::put_state | ( | ogzstream & | out | ) | const [virtual] |
Saves the basic event data (such as the type or script data) to a file.
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.
in | file to load the event from. |
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.
evnt | The map event to compare this to. |
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.
evnt | The event that triggered this map event. |
Implements event.
Definition at line 48 of file map_event.cc.
s_int32 map_event::submap |
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.
s_int8 map_event::dir |
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.