// reset things to prepare for entry to the next stage bool Game::initlevel() { Carets::DestroyAll(); // delete smoke clouds, ZZzz's etc... ScreenEffects::Stop(); // prevents white flash after island scene when ballos defeated game.frozen = false; game.bossbar.object = NULL; nOnscreenObjects = 0; if (statusbar_init()) return 1; // reset his displayed health value InitPlayer(); initmap(); game.stageboss.SetType(stages[game.curmap].bossNo); game.stageboss.OnMapEntry(); map_scroll_jump(player->CenterX(), player->CenterY()); if (game.switchstage.eventonentry) { // this prevents a glitch otherwise caused by entry script to Last Cave. // i.e. the script immediately <PRI's then fades in while the game is still // frozen, thus the player code never has a chance to set the initial frame. PHandleAttributes(); PSelectFrame(); stat("-- Starting on-entry script %d", game.switchstage.eventonentry); StartScript(game.switchstage.eventonentry); game.switchstage.eventonentry = 0; } return 0; }
static void textui_finish_init(void) { quitting = FALSE; screen_refresh_freeze(); gui_entry_init(); gui_printtext_init(); gui_readline_init(); gui_special_vars_init(); gui_textwidget_init(); mainwindows_init(); mainwindow_activity_init(); gui_windows_init(); statusbar_init(); fe_common_core_finish_init(); fe_common_irc_finish_init(); #ifdef HAVE_STATIC_PERL perl_init(); #endif signal_emit("irssi init finished", 0); if (display_firsttimer) { printtext_window(active_win, MSGLEVEL_CLIENTNOTICE, "%s", firsttimer_text); } screen_refresh_thaw(); }
static void textui_finish_init(void) { quitting = FALSE; if (dummy) term_dummy_init(); else { term_refresh_freeze(); textbuffer_init(); textbuffer_view_init(); textbuffer_commands_init(); gui_expandos_init(); gui_printtext_init(); gui_readline_init(); lastlog_init(); mainwindows_init(); mainwindow_activity_init(); mainwindows_layout_init(); gui_windows_init(); statusbar_init(); term_refresh_thaw(); /* don't check settings with dummy mode */ settings_check(); } module_register("core", "fe-text"); #ifdef HAVE_STATIC_PERL perl_core_init(); fe_perl_init(); #endif dirty_check(); fe_common_core_finish_init(); signal_emit("irssi init finished", 0); statusbar_redraw(NULL, TRUE); if (servers == NULL && lookup_servers == NULL) { printtext(NULL, NULL, MSGLEVEL_CRAP|MSGLEVEL_NO_ACT, "%s", banner_text); } if (display_firsttimer) { printtext(NULL, NULL, MSGLEVEL_CRAP|MSGLEVEL_NO_ACT, "%s", firsttimer_text); } }
static void textui_finish_init(void) { quitting = FALSE; if (dummy) term_dummy_init(); else { term_refresh_freeze(); textbuffer_init(); textbuffer_view_init(); textbuffer_commands_init(); textbuffer_reformat_init(); gui_expandos_init(); gui_printtext_init(); gui_readline_init(); lastlog_init(); mainwindows_init(); mainwindow_activity_init(); mainwindows_layout_init(); gui_windows_init(); statusbar_init(); term_refresh_thaw(); } settings_check(); module_register("core", "fe-text"); #ifdef HAVE_STATIC_PERL perl_core_init(); fe_perl_init(); #endif dirty_check(); fe_common_core_finish_init(); signal_emit("irssi init finished", 0); if (display_firsttimer) { printtext_window(active_win, MSGLEVEL_CLIENTNOTICE, "%s", firsttimer_text); } }
void app_mgr_entry(void* parameter) { struct rtgui_app* application; application = rtgui_app_create(rt_thread_self(), "AppMgr"); if (application != RT_NULL) { /* set as window manager */ rtgui_app_set_as_wm(); /* initialize status bar */ statusbar_init(); app_mgr_win_init(); /* set our event handler */ rtgui_object_set_event_handler(RTGUI_OBJECT(application), event_handler); rtgui_app_run(application); rtgui_app_destroy(application); } }
int main(void) { flash_led(LED1); // init logger log_init(&mainlog, "main"); lcd_init(); graphics_init(); touch_panel_init(); lcd_backlight_init(); set_background_colour(BACKGROUND); lcd_backlight_auto_off(true); lcd_backlight_enable(); lcd_backlight_timeout(30000); statusbar_init(); // init filesystem sdfs_init(); log_info(&mainlog, "wait for filesystem..."); while(!sdfs_ready()); // init networking net_config(&netconf, DEFAULT_RESOLV_CONF_PATH, DEFAULT_NETIF_CONF_PATH); net_init(&netconf); log_info(&mainlog, "device init done..."); init_heater_cooler(); log_info(&mainlog, "service init done..."); while(1) { usleep(250000); update_heater_cooler(); } return 0; }
static void textui_finish_init(void) { quitting = FALSE; if (dummy) term_dummy_init(); else { term_refresh_freeze(); textbuffer_init(); textbuffer_view_init(); textbuffer_commands_init(); textbuffer_reformat_init(); gui_expandos_init(); gui_printtext_init(); gui_readline_init(); lastlog_init(); mainwindows_init(); mainwindow_activity_init(); mainwindows_layout_init(); gui_windows_init(); statusbar_init(); term_refresh_thaw(); /* don't check settings with dummy mode */ settings_check(); } module_register("core", "fe-text"); #ifdef HAVE_STATIC_PERL perl_core_init(); fe_perl_init(); #endif dirty_check(); fe_common_core_finish_init(); signal_emit("irssi init finished", 0); }
static void textui_finish_init(void) { quitting = FALSE; screen_refresh_freeze(); gui_entry_init(); gui_printtext_init(); gui_readline_init(); gui_special_vars_init(); gui_textwidget_init(); mainwindows_init(); gui_windows_init(); statusbar_init(); fe_common_core_finish_init(); fe_common_irc_finish_init(); signal_emit("irssi init finished", 0); #ifdef HAVE_PERL irssi_perl_init(); #endif screen_refresh_thaw(); }
static void app_mainmenu_entry(void *parameter) { struct rtgui_app *application; application = rtgui_app_create("menu"); if (application != RT_NULL) { /* set as window manager */ rtgui_app_set_as_wm(application); /* initialize status bar */ statusbar_init(); app_mainmenu_init(); /* set our event handler */ rtgui_object_set_event_handler(RTGUI_OBJECT(application), event_handler); tasklist_win = tasklist_win_create(RT_NULL); rtgui_app_run(application); rtgui_app_destroy(application); } }
static void textui_finish_init(void) { int loglev; quitting = FALSE; term_refresh_freeze(); textbuffer_init(); textbuffer_view_init(); textbuffer_commands_init(); gui_expandos_init(); gui_printtext_init(); gui_readline_init(); gui_entry_init(); lastlog_init(); mainwindows_init(); mainwindow_activity_init(); mainwindows_layout_init(); gui_windows_init(); /* Temporarily raise the fatal level to abort on config errors. */ loglev = g_log_set_always_fatal(G_LOG_FATAL_MASK | G_LOG_LEVEL_CRITICAL); statusbar_init(); g_log_set_always_fatal(loglev); term_refresh_thaw(); settings_check(); module_register("core", "fe-text"); #ifdef HAVE_STATIC_PERL perl_core_init(); fe_perl_init(); #endif #ifdef HAVE_STATIC_OTR otr_core_init(); #endif dirty_check(); fe_common_core_finish_init(); signal_emit("irssi init finished", 0); statusbar_redraw(NULL, TRUE); if (servers == NULL && lookup_servers == NULL) { printformat(NULL, NULL, MSGLEVEL_CRAP|MSGLEVEL_NO_ACT, TXT_IRSSI_BANNER); } if (display_firsttimer) { printformat(NULL, NULL, MSGLEVEL_CRAP|MSGLEVEL_NO_ACT, TXT_WELCOME_FIRSTTIME); } /* see irc-servers-setup.c:init_userinfo */ if (user_settings_changed) printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_WELCOME_INIT_SETTINGS); if (user_settings_changed & USER_SETTINGS_REAL_NAME) fe_settings_set_print("real_name"); if (user_settings_changed & USER_SETTINGS_USER_NAME) fe_settings_set_print("user_name"); if (user_settings_changed & USER_SETTINGS_NICK) fe_settings_set_print("nick"); if (user_settings_changed & USER_SETTINGS_HOSTNAME) fe_settings_set_print("hostname"); term_environment_check(); }