コード例 #1
0
ファイル: GameAPI.cpp プロジェクト: abenavente406/solarus
/**
 * \brief Calls the on_started() method of a Lua game.
 *
 * Does nothing if the method is not defined.
 *
 * \param game A game.
 */
void LuaContext::game_on_started(Game& game) {

  if (!userdata_has_field(game.get_savegame(), "on_started")) {
    return;
  }

  push_game(l, game.get_savegame());
  on_started();
  lua_pop(l, 1);
}
コード例 #2
0
ファイル: ItemApi.cpp プロジェクト: Umigatsu/solarus
/**
 * \brief Calls the on_started() method of a Lua equipment item.
 *
 * Does nothing if the method is not defined.
 *
 * \param item An equipment item.
 */
void LuaContext::item_on_started(EquipmentItem& item) {

  if (!userdata_has_field(item, "on_started")) {
    return;
  }

  push_item(l, item);
  on_started();
  lua_pop(l, 1);
}
コード例 #3
0
ファイル: event.cpp プロジェクト: ahmedmlj/nestk
EventProcessingBlockInOwnThread::~EventProcessingBlockInOwnThread ()
{
    QObject::disconnect(this, SIGNAL(terminated()), this, SLOT(on_terminated()));
    QObject::disconnect(this, SIGNAL(finished  ()), this, SLOT(on_finished  ()));
    QObject::disconnect(this, SIGNAL(started   ()), this, SLOT(on_started   ()));

    QObject::disconnect(this, SIGNAL(dbg_terminated(EventProcessingBlockInOwnThread*)), &debugger(), SLOT(terminated(EventProcessingBlockInOwnThread*)));
    QObject::disconnect(this, SIGNAL(dbg_finished  (EventProcessingBlockInOwnThread*)), &debugger(), SLOT(finished  (EventProcessingBlockInOwnThread*)));
    QObject::disconnect(this, SIGNAL(dbg_started   (EventProcessingBlockInOwnThread*)), &debugger(), SLOT(started   (EventProcessingBlockInOwnThread*)));

    debugger().destroyed(this);
}
コード例 #4
0
ファイル: event.cpp プロジェクト: ahmedmlj/nestk
EventProcessingBlockInOwnThread::EventProcessingBlockInOwnThread (Name name)
: name(name)
{
    debugger().constructed(this);

    QObject::connect(this, SIGNAL(dbg_started   (EventProcessingBlockInOwnThread*)), &debugger(), SLOT(started   (EventProcessingBlockInOwnThread*)));
    QObject::connect(this, SIGNAL(dbg_finished  (EventProcessingBlockInOwnThread*)), &debugger(), SLOT(finished  (EventProcessingBlockInOwnThread*)));
    QObject::connect(this, SIGNAL(dbg_terminated(EventProcessingBlockInOwnThread*)), &debugger(), SLOT(terminated(EventProcessingBlockInOwnThread*)));

    QObject::connect(this, SIGNAL(started   ()), this, SLOT(on_started   ()));
    QObject::connect(this, SIGNAL(finished  ()), this, SLOT(on_finished  ()));
    QObject::connect(this, SIGNAL(terminated()), this, SLOT(on_terminated()));
}
コード例 #5
0
ファイル: loop.c プロジェクト: pwrtelegram/tg
void clist_cb (struct tgl_state *TLSR, void *callback_extra, int success, int size, tgl_peer_id_t peers[], tgl_message_id_t *last_msg_id[], int unread_count[]) {
  on_started (TLS);
}
コード例 #6
0
ファイル: MainAPI.cpp プロジェクト: Arvek/SOLARME
/**
 * \brief Calls sol.main.on_started() if it exists.
 *
 * This function is called when the engine requests Lua to show an
 * initial screen, i.e. at the beginning of the program
 * or when the program is reset.
 */
void LuaContext::main_on_started() {

  push_main(l);
  on_started();
  lua_pop(l, 1);
}
コード例 #7
0
ファイル: MenuApi.cpp プロジェクト: Codex-NG/solarus
/**
 * \brief Calls the on_started() method of a Lua menu.
 * \param menu_ref A reference to the menu object.
 */
void LuaContext::menu_on_started(const ScopedLuaRef& menu_ref) {

  push_ref(l, menu_ref);
  on_started();
  lua_pop(l, 1);
}
コード例 #8
0
ファイル: MenuAPI.cpp プロジェクト: xor-mind/solarus
/**
 * @brief Calls the on_started() method of a Lua menu.
 * @param menu_ref A reference to the menu object.
 */
void LuaContext::menu_on_started(int menu_ref) {

  push_ref(l, menu_ref);
  on_started();
  lua_pop(l, 1);
}
コード例 #9
0
ファイル: GameAPI.cpp プロジェクト: lambdaloop/solarus
/**
 * @brief Calls the on_started() method of a Lua game.
 * @param game A game.
 */
void LuaContext::game_on_started(Game& game) {

  push_game(l, game.get_savegame());
  on_started();
  lua_pop(l, 1);
}