![]() |
naev 0.12.5
|
Handles internal events. More...
#include "event.h"#include "array.h"#include "cond.h"#include "conf.h"#include "hook.h"#include "land.h"#include "log.h"#include "ndata.h"#include "nlua.h"#include "nlua_bkg.h"#include "nlua_camera.h"#include "nlua_evt.h"#include "nlua_hook.h"#include "nlua_music.h"#include "nlua_tex.h"#include "nlua_tk.h"#include "npc.h"#include "nxml.h"#include "nxml_lua.h"#include "player.h"#include "rng.h"
Go to the source code of this file.
Data Structures | |
| struct | EventData |
| Event data structure. More... | |
Macros | |
| #define | XML_EVENT_ID "Events" |
| #define | XML_EVENT_TAG "event" |
| #define | EVENT_FLAG_UNIQUE ( 1 << 0 ) |
| #define | MELEMENT(o, s) |
Functions | |
| static unsigned int | event_genID (void) |
| Generates a new event ID. | |
| static int | event_cmp (const void *a, const void *b) |
| static int | event_parseFile (const char *file, EventData *temp) |
| Parses an event file. | |
| static int | event_parseXML (EventData *temp, const xmlNodePtr parent) |
| Loads up an event from an XML node. | |
| static void | event_freeData (EventData *event) |
| Frees an EventData structure. | |
| static int | event_create (int dataid, unsigned int *id) |
| Creates an event. | |
| int | events_saveActive (xmlTextWriterPtr writer) |
| Saves the player's active events. | |
| int | events_loadActive (xmlNodePtr parent) |
| Loads the player's active events from a save. | |
| static int | events_parseActive (xmlNodePtr parent) |
| Parses the actual individual event nodes. | |
| Event_t * | event_get (unsigned int eventid) |
| Gets an event. | |
| int | event_start (const char *name, unsigned int *id) |
| Starts an event. | |
| const char * | event_getData (unsigned int eventid) |
| Gets the name of the event data. | |
| int | event_isUnique (unsigned int eventid) |
| Checks to see if an event is unique. | |
| static void | event_cleanup (Event_t *ev) |
| Cleans up an event. | |
| void | event_remove (unsigned int eventid) |
| Removes an event by ID. | |
| int | event_save (unsigned int eventid) |
| Checks to see if an event should be saved. | |
| int | event_alreadyRunning (int data) |
| Check to see if an event is already running. | |
| void | events_trigger (EventTrigger_t trigger) |
| Runs all the events matching a trigger. | |
| int | events_load (void) |
| Loads all the events. | |
| void | events_cleanup (void) |
| Cleans up and removes active events. | |
| void | events_exit (void) |
| Exits the event subsystem. | |
| int | event_dataID (const char *evdata) |
| Gets the event data id from name. | |
| const char * | event_dataName (int dataid) |
| Gets the event data name from id. | |
| void | event_activateClaims (void) |
| Activates all the active event claims. | |
| int | event_testClaims (unsigned int eventid, int sys) |
| Tests to see if an event has claimed a system. | |
| void | event_checkValidity (void) |
| Checks the event validity and cleans up after them. | |
| int | event_reload (const char *name) |
| void | event_toLuaTable (lua_State *L, int eventid) |
Variables | |
| static EventData * | event_data = NULL |
| static unsigned int | event_genid = 0 |
| static Event_t * | event_active = NULL |
Handles internal events.
Events are a lot like events except the player has no control over when or how they happen. They can simple do something simple or actually lead up to and open an entire set of events.
Definition in file event.c.
| #define MELEMENT | ( | o, | |
| s ) |
| void event_activateClaims | ( | void | ) |
| int event_alreadyRunning | ( | int | data | ) |
| void event_checkValidity | ( | void | ) |
|
static |
|
static |
| int event_dataID | ( | const char * | evdata | ) |
| const char * event_dataName | ( | int | dataid | ) |
|
static |
|
static |
| const char * event_getData | ( | unsigned int | eventid | ) |
| int event_isUnique | ( | unsigned int | eventid | ) |
|
static |
|
static |
| void event_remove | ( | unsigned int | eventid | ) |
| int event_save | ( | unsigned int | eventid | ) |
| int event_start | ( | const char * | name, |
| unsigned int * | id ) |
| int event_testClaims | ( | unsigned int | eventid, |
| int | sys ) |
| void events_cleanup | ( | void | ) |
| int events_load | ( | void | ) |
| int events_loadActive | ( | xmlNodePtr | parent | ) |
|
static |
| int events_saveActive | ( | xmlTextWriterPtr | writer | ) |
| void events_trigger | ( | EventTrigger_t | trigger | ) |