Пример #1
0
/**
 * \brief Checks that the userdata at the specified index of the stack is a
 * timer and returns it.
 * \param l a Lua context
 * \param index an index in the stack
 * \return the timer
 */
Timer& LuaContext::check_timer(lua_State* l, int index) {
  return static_cast<Timer&>(check_userdata(l, index, timer_module_name));
}
Пример #2
0
/**
 * \brief Checks that the userdata at the specified index of the stack is a
 * timer and returns it.
 * \param l a Lua context
 * \param index an index in the stack
 * \return the timer
 */
TimerPtr LuaContext::check_timer(lua_State* l, int index) {
  return std::static_pointer_cast<Timer>(
      check_userdata(l, index, timer_module_name)
  );
}
Пример #3
0
/**
 * \brief Checks that the userdata at the specified index of the stack is a
 * text surface and returns it.
 * \param l a Lua context
 * \param index an index in the stack
 * \return the text surface
 */
std::shared_ptr<TextSurface> LuaContext::check_text_surface(lua_State* l, int index) {
  return std::static_pointer_cast<TextSurface>(check_userdata(
      l, index, text_surface_module_name
  ));
}
Пример #4
0
/**
 * \brief Checks that the userdata at the specified index of the stack is a
 * text surface and returns it.
 * \param l a Lua context
 * \param index an index in the stack
 * \return the text surface
 */
TextSurface& LuaContext::check_text_surface(lua_State* l, int index) {
  return static_cast<TextSurface&>(
      check_userdata(l, index, text_surface_module_name));
}
Пример #5
0
/**
 * \brief Checks that the userdata at the specified index of the stack is a
 * surface and returns it.
 * \param l a Lua context
 * \param index an index in the stack
 * \return the surface
 */
SurfacePtr LuaContext::check_surface(lua_State* l, int index) {
  return std::static_pointer_cast<Surface>(check_userdata(
      l, index, surface_module_name
  ));
}
Пример #6
0
/**
 * \brief Checks that the userdata at the specified index of the stack is an
 * equipment item and returns it.
 * \param l A Lua context.
 * \param index An index in the stack.
 * \return The equipment item.
 */
EquipmentItem& LuaContext::check_item(lua_State* l, int index) {
  return static_cast<EquipmentItem&>(check_userdata(l, index, item_module_name));
}
Пример #7
0
static void cfTreeGetId(void)
{
  lua_pushnumber(IupTreeGetId(iuplua_checkihandle(1), check_userdata(2)));
}
Пример #8
0
static void cfTreeSetUserId(void)
{
  lua_pushnumber(IupTreeSetUserId(iuplua_checkihandle(1), luaL_check_int(2), check_userdata(3)));
} 
Пример #9
0
/**
 * \brief Checks that the userdata at the specified index of the stack is a
 * game and returns it.
 * \param l a Lua context
 * \param index an index in the stack
 * \return the game
 */
Savegame& LuaContext::check_game(lua_State* l, int index) {
  return static_cast<Savegame&>(check_userdata(l, index, game_module_name));
}