67 xmlw_startElem( writer,
"vars" );
69 xmlw_endElem( writer );
81 xmlNodePtr node = parent->xmlChildrenNode;
84 xml_onlyNodes( node );
85 if ( !xml_isNode( node,
"vars" ) )
88 }
while ( xml_nextNode( node ) );
146 const char *str = luaL_checkstring( L, 1 );
164 const char *str = luaL_checkstring( L, 1 );
185 const char *str = luaL_checkstring( L, 1 );
Provides macros to work with dynamic arrays.
#define array_create(basic_type)
Creates a new dynamic array of ‘basic_type’.
int lvar_addArray(lvar **arr, const lvar *new_var, int sort)
Adds a var to a var array.
void lvar_rmArray(lvar **arr, lvar *rm_var)
Removes a var from a var array.
lvar * lvar_get(const lvar *arr, const char *str)
Gets a lua var by name.
void lvar_freeArray(lvar *arr)
Frees a variable array.
lvar lvar_tovar(lua_State *L, const char *name, int idx)
Gets a lua variable from an index from a lua state.
int lvar_save(const lvar *arr, xmlTextWriterPtr writer)
Saves the mission variables.
lvar * lvar_load(xmlNodePtr parent)
Loads the vars from XML file.
int lvar_push(lua_State *L, const lvar *v)
Pushes a lua var to a lua state.
static int varL_pop(lua_State *L)
Pops a mission variable off the stack, destroying it.
static lvar * var_get(const char *str)
Gets a mission var by name.
static int var_add(lvar *new_var, int sort)
Adds a var to the stack, strings will be SHARED, don't free.
int var_save(xmlTextWriterPtr writer)
Saves the mission variables.
static int varL_push(lua_State *L)
Creates a new mission variable.
int var_checkflag(const char *str)
Mission variable Lua bindings.
static const luaL_Reg var_methods[]
void var_cleanup(void)
Cleans up all the mission variables.
int var_load(xmlNodePtr parent)
Loads the vars from XML file.
static int varL_peek(lua_State *L)
Gets the mission variable value of a certain name.
int nlua_loadVar(nlua_env env)
Loads the mission variable Lua library.
Contains a mission variable.