#include <LUAUtil.h>
Static Public Member Functions | |
| static void | addVectorToStack (lua_State *L, const FixedVector &vector) |
| static FixedVector | getVectorFromStack (lua_State *L, int position) |
| static fixed | getNumberFromTable (lua_State *L, int tablePosition, const char *name, fixed defaultResult) |
| static int | getIntFromTable (lua_State *L, int tablePosition, const char *name, int defaultResult) |
| static bool | getBoolFromTable (lua_State *L, int tablePosition, const char *name, bool defaultResult) |
| static std::string | getStringFromTable (lua_State *L, int tablePosition, const char *name, std::string &defaultResult) |
Definition at line 31 of file LUAUtil.h.
| void LUAUtil::addVectorToStack | ( | lua_State * | L, | |
| const FixedVector & | vector | |||
| ) | [static] |
Definition at line 24 of file LUAUtil.cpp.
References lua_newtable, lua_pushnumber(), lua_pushstring(), and lua_settable().
Referenced by addTank(), and LUAScript::addVectorParameter().
| FixedVector LUAUtil::getVectorFromStack | ( | lua_State * | L, | |
| int | position | |||
| ) | [static] |
Definition at line 42 of file LUAUtil.cpp.
References lua_gettable(), lua_pop, lua_pushstring(), LUA_TTABLE, luaL_checknumber(), and luaL_checktype().
Referenced by s3d_explosion(), s3d_fire_weapon(), s3d_laser(), and s3d_napalm().
| fixed LUAUtil::getNumberFromTable | ( | lua_State * | L, | |
| int | tablePosition, | |||
| const char * | name, | |||
| fixed | defaultResult | |||
| ) | [static] |
Definition at line 66 of file LUAUtil.cpp.
References lua_gettable(), lua_isnil, lua_pop, lua_pushstring(), and luaL_checknumber().
Referenced by FixedActionParam::initLUA(), NapalmParams::parseLUA(), LaserParams::parseLUA(), and ExplosionParams::parseLUA().
| int LUAUtil::getIntFromTable | ( | lua_State * | L, | |
| int | tablePosition, | |||
| const char * | name, | |||
| int | defaultResult | |||
| ) | [static] |
Definition at line 81 of file LUAUtil.cpp.
References fixed::asInt(), lua_gettable(), lua_isnil, lua_pop, lua_pushstring(), and luaL_checknumber().
Referenced by NapalmParams::parseLUA().
| bool LUAUtil::getBoolFromTable | ( | lua_State * | L, | |
| int | tablePosition, | |||
| const char * | name, | |||
| bool | defaultResult | |||
| ) | [static] |
Definition at line 97 of file LUAUtil.cpp.
References lua_gettable(), lua_isboolean, lua_isnil, lua_pop, lua_pushstring(), and lua_toboolean().
Referenced by NapalmParams::parseLUA(), LaserParams::parseLUA(), and ExplosionParams::parseLUA().
| std::string LUAUtil::getStringFromTable | ( | lua_State * | L, | |
| int | tablePosition, | |||
| const char * | name, | |||
| std::string & | defaultResult | |||
| ) | [static] |
Definition at line 114 of file LUAUtil.cpp.
References lua_gettable(), lua_isnil, lua_isstring(), lua_pop, lua_pushstring(), and lua_tostring.
Referenced by NapalmParams::parseLUA(), and ExplosionParams::parseLUA().
1.5.3