int main (int argc, char ** argv) { #ifdef HAVE_IO_H setmode (fileno (stdout), O_BINARY); #endif handle_args (argc, argv); if (demux_pid) ts_loop (); else ps_loop (); return 0; }
int main(int argc, char *argv[]) { GFraMe_ret rv; GFraMe_wndext ext; ext.atlas = "new-atlas-2"; ext.atlasWidth = 256; ext.atlasHeight = 256; ext.flags = 0; // Init the framework rv = GFraMe_init(320, 240, 640, 480, "com.gfmgamecorner", "BugSquasher", GFraMe_window_resizable, &ext, 60, 1, 0); GFraMe_assertRet(rv == GFraMe_ret_ok, "Failed to init the framework", _exit); #ifndef GFRAME_MOBILE setIcon(); #endif // Init the audio player rv = GFraMe_audio_player_init(); GFraMe_assertRet(rv == GFraMe_ret_ok, "Failed to init the audio", _exit); // Load the textures rv = global_init(); GFraMe_assertRet(rv == GFraMe_ret_ok, "Failed to create global stuff", _exit); GFraMe_audio_player_play_bgm(&gl_song, 0.625); // TODO clear events (there may be a few frames issued) // Run the main loop gl_running = 1; while (gl_running) { ms_loop(); ps_loop(); gos_loop(); } _exit: #ifdef GFRAME_MOBILE GFraMe_log("asd"); GFraMe_log_close(); GFraMe_log("qwe"); #endif GFraMe_audio_player_clear(); global_clear(); GFraMe_quit(); return rv; }