/* This is a custom main method that would be a specialized version of the one that came with unmodified TheGame (if it were real). Basically, we've injected calls here and there to setup RL-Glue, etc.*/ int main(int argc, char** argv) { int theConnection=0; game_startup(); theConnection=setup_rlglue_network(); runEnvironmentEventLoop(theConnection); printf("Thanks for playing the game!\n"); teardown_rlglue_network(theConnection); return 1; }
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; }