Adonthell
0.4
|
This class keeps track of map events, i.e. More...
#include <map_event_handler.h>
Public Member Functions | |
void | register_event (event *evnt) |
Register a map event with the event handler. More... | |
void | remove_event (event *evnt) |
Removes the given event from the event handler. More... | |
void | raise_event (const event *evnt) |
Raise one or more events in case the given 'trigger' matches. More... | |
![]() | |
virtual | ~event_handler_base () |
Destructor. More... | |
This class keeps track of map events, i.e.
events that are raised when a character enters or leaves a tile, or initiates an action.
Definition at line 34 of file map_event_handler.h.
|
virtual |
Register a map event with the event handler.
The event needs to be removed before it can be safely deleted.
evnt | Pointer to the event to be registered. |
Implements event_handler_base.
Definition at line 61 of file map_event_handler.cc.
|
virtual |
Removes the given event from the event handler.
Once it is no longer needed, it can be freed.
evnt | Pointer to the event to be removed. |
Implements event_handler_base.
Definition at line 49 of file map_event_handler.cc.
|
virtual |
Raise one or more events in case the given 'trigger' matches.
Unless they need to be repeated, they are removed from the event-vector.
evnt | A map_event structure. |
Implements event_handler_base.
Definition at line 29 of file map_event_handler.cc.