void SignalInterface::initialize(bool ctrlC) { _initializing = true; _is_in_map_load = false; PendingSelfSignals::init(); OSToSelfSignalMapper::init(); // virtual so cannot do in constructor _initializing = !ctrlC; initialize_platform(ctrlC); }
int main(void) { initialize_platform(); while (1) { platform_loop(); } return 0; }
void t_game::initialize() { t_window_ptr window; load_options(); //== writen by sunjun ==// // add_resource_file( "data/new.h4r" ); // add_resource_file( "data/updates.h4r" ); add_resource_file( "data/text.h4r" ); add_resource_file( "data/music.h4r" ); add_resource_file( "data/movies.h4r" ); add_resource_folder( "data" ); if (!add_resource_file( "data/heroes4.h4r" )) { fatal_error( "Unable to open data/heroes4.h4r" ); exit(0); } t_pointer_cache< t_string_table > string_table_cache( "text" ); t_pointer_cache< t_string_table > movie_string_table_cache( "intro voice over text" ); t_pointer_cache< t_string_table > credits_string_table_cache( "credits" ); t_external_string::add_table( *string_table_cache.get() ); t_external_string::add_table( *movie_string_table_cache.get() ); t_external_string::add_table( *credits_string_table_cache.get() ); // this is a once-off shutdown for pre-release code #ifdef k_useless_serialized_version fatal_error( k_text_serial_failure ); exit(0); #endif std::string cheat_text; if (get_command_line_argument( k_text_cheat_menu, cheat_text )) { set_show_cheat_menus( true ); } t_screen_point screen_size = get_desktop_size(); m_frame_window = new t_gray_window(t_screen_rect(0, 0, g_window_width, g_window_height)); t_mouse_window* cursor = new t_mouse_window; t_window* animation = new t_animated_window( g_sample_cursor.get(), t_screen_point(0,0), 100, cursor ); m_frame_window->set_cursor( cursor ); set_resolution(g_window_width, g_window_height, false); initialize_platform(); // Play the logo cinematics t_sound_cache music = get_music_playing(); stop_music(); play_music( music ); t_main_menu* main_menu = new t_main_menu( m_frame_window ); }