38 if (
x != -1 && t->
x !=
x)
return false;
39 if (
y != -1 && t->
y !=
y)
return false;
40 if (
dir != -1 && t->
dir !=
dir)
return false;
41 if (
map != -1 && t->
map !=
map)
return false;
42 if (
c && t->
c !=
c)
return false;
56 PyObject *args = Py_BuildValue (
"(i, i, i, i, s)",
99 if (s !=
"")
c = (
mapcharacter*) data::characters[s.c_str ()];
Class to write data from a Gzip compressed file.
s_int8 dir
Direction where the character is looking (-1 for any).
#define s_int32
32 bits long signed integer
Class to read data from a Gzip compressed file.
u_int8 Action
What happens if the event occurs - see enum above.
map_event()
Default constructor.
virtual void put_state(ogzstream &out) const
Saves the basic event data (such as the type or script data) to a file.
string get_id()
Returns an unique identifier of the character.
bool get_state(igzstream &)
Loads the basic event date from a file.
s_int32 execute(const event *evnt)
Executes the script associated with this map event.
Baseclass for map enter/leave/action events.
virtual bool get_state(igzstream &in)
Loads the basic event date from a file.
u_int8 Type
Event type - see enum above.
void run(PyObject *args=NULL)
Calls the run () method of this object.
action_event()
Default constructor.
mapcharacter * c
Pointer to the mapcharacter that can launch this event (NULL for any).
s_int32 x
X position (-1 for any).
bool equals(const event *evnt)
Compare two map events for equality.
leave_event()
Default constructor.
py_callback * PyFunc
Python callback that may be executed instead of the script.
py_object * Script
The Python script accociated with this event.
s_int32 map
Useless (for now).
s_int32 y
Y position (-1 for any).
enter_event()
Default constructor.
Functor0 Callback
C++ callback that may be executed when the event gets triggered.
Representation of characters on a landmap.
void callback_func0()
Calls the python function without arguments.
s_int32 do_repeat()
Decrease the event's repeat count and return the number of repeats left.
Declares the different map events.
void put_state(ogzstream &) const
Saves the basic event data (such as the type or script data) to a file.
s_int32 submap
Submap index (-1 for any).