コード例 #1
0
ファイル: TimerApi.cpp プロジェクト: kenygia/solarus
/**
 * \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
ファイル: TimerApi.cpp プロジェクト: benoitschneider/solarus
/**
 * \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
ファイル: TextSurfaceApi.cpp プロジェクト: christopho/solarus
/**
 * \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
ファイル: TextSurfaceApi.cpp プロジェクト: Arseth/solarus
/**
 * \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
ファイル: SurfaceApi.cpp プロジェクト: akimi634/solarus
/**
 * \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
ファイル: ItemApi.cpp プロジェクト: Umigatsu/solarus
/**
 * \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
ファイル: il_tree.c プロジェクト: DavidPhillipOster/IupCocoa
static void cfTreeGetId(void)
{
  lua_pushnumber(IupTreeGetId(iuplua_checkihandle(1), check_userdata(2)));
}
コード例 #8
0
ファイル: il_tree.c プロジェクト: DavidPhillipOster/IupCocoa
static void cfTreeSetUserId(void)
{
  lua_pushnumber(IupTreeSetUserId(iuplua_checkihandle(1), luaL_check_int(2), check_userdata(3)));
} 
コード例 #9
0
ファイル: GameAPI.cpp プロジェクト: abenavente406/solarus
/**
 * \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));
}