int main(int argc, char *argv[]) { game *g = game_init(DEFAULT_WINDOW_WIDTH, DEFAULT_WINDOW_HEIGHT); if (g != NULL) { game_prepare(g); game_main_loop(g); game_destroy(g); } else { error_message("fail to create game object"); } return 0; }
void play_game() { Win *disp= get_win("R2"); if (NULL == disp) { return; } Win *input = get_win("RCMD"); if (NULL == input) { return; } game_main_loop(disp, input); }
int __stdcall WinMain(HINSTANCE hi, HINSTANCE hpi, LPSTR cmd, int cm) { _qdgdfv_additional_int_info = (int) hi; #else int main(void) { #endif filp_startup(); _qdgdfa_16_bit = 1; _qdgdfv_scale = 2; _qdgdfv_scale2x = 1; _qdgdfv_screen_x_size = 320; _qdgdfv_screen_y_size = 240; strcpy(_qdgdfv_window_title, "Freaks 2002 " VERSION); /* strcpy(_qdgdfa_window_title,_qdgdfv_window_title); */ _qdgdfv_use_logger = 1; strcpy(_qdgdfv_logger_file, "fr2002.log"); _qdgdfa_sound = 1; map_startup(); filp_exec("\"$home_dir/config.filp\" load"); filp_exec("'./setup.filp' load"); qdgdfa_startup(); qdgdfv_startup(); render_startup(); game_startup(); misc_startup(); for (;;) { if (main_menu()) break; game_main_loop(); } qdgdfv_shutdown(); qdgdfa_shutdown(); filp_shutdown(); printf("qdgdfv version: %s\nqdgdfa version: %s\n", _qdgdfv_version, _qdgdfa_version); return 0; }
int main(int argc, char *argv[]) { game *g; regular_message("loading..."); if (!main_init_allegro_library()) { error_message("fail to init allegro library"); return 1; } g = game_init(); if (g != NULL) { game_prepare(g); game_main_loop(g); game_destroy(g); main_close_allegro_library(); return 0; } else { return 1; } }