int main( int argc, char *argv[] ) { system( "clear" ); char _string[ 1024 ]; // Read the raw string----------------------------- fprintf( stdout, " ##### #\n" ); fprintf( stdout, "##### ## #### ###### # # # #\n" ); fprintf( stdout, "# # # # # # # # #\n" ); fprintf( stdout, "##### # # #### ##### ###### #######\n" ); fprintf( stdout, "# # ###### # # # # #\n" ); fprintf( stdout, "# # # # # # # # # #\n" ); fprintf( stdout, "##### # # #### ###### ##### #\n\n" ); fprintf( stdout, "###### # # #### #### ##### ###### \n" ); fprintf( stdout, "# ## # # # # # # # # \n" ); fprintf( stdout, "##### # # # # # # # # ##### \n" ); fprintf( stdout, "# # # # # # # # # # \n" ); fprintf( stdout, "# # ## # # # # # # # \n" ); fprintf( stdout, "###### # # #### #### ##### ###### \n\n" ); fprintf( stdout, "Write the raw string-------------------------\n\n" ); //------------------------------------------------- gets( _string ); FLUSH; // Start the engine-------------------------------- start_engine( _string ); //------------------------------------------------- return 0; }
/* * Run engine until stop() is called. * * The virtual member frame() will be called once for * each control system frame. pre_render() and * post_render() will be called before/after the engine * renders each video frame. */ void gfxengine_t::run() { open(); show(); start_engine(); is_running = 1; double toframe = 0.0f; double fdt = 1.0f; cs_engine_advance(csengine, 0); while(is_running) { int t = (int)SDL_GetTicks(); int dt = t - last_tick; last_tick = t; if(abs(dt) > 500) last_tick = t; if(dt > 250) dt = (int)ticks_per_frame; if(_timefilter) fdt += (dt - fdt) * _timefilter; else fdt = ticks_per_frame; toframe += fdt / ticks_per_frame; cs_engine_advance(csengine, toframe); pre_render(); window->select(); cs_engine_render(csengine); post_render(); if(_autoinvalidate) window->invalidate(); flip(); } stop_engine(); }
int what_to_print(const char *format, va_list *arg) { char *text; int size; t_mod data; char *choped; unsigned long int i; text = NULL; init_var(&i, &size); while (++i < ft_strlen(format)) { if (format[i] == '%') { choped = ft_strdup(chop_format(format, &i)); process_flags(choped, &data); start_engine(text, &size, &data, arg); i = i + ft_strlen(choped); } else { ft_putchar(format[i]); size++; } } return (size); }
void draw() { dt = gui_t.dtime(); gui_f_time += dt; gui_g_time += dt; float f_wait; bool run_always = false; f_wait = 1.0f/100.0f; if (run_always || gui_f_time > f_wait) { if (first) { start_engine(); cl_server.set_command_lists(&internal_cmd_in,&internal_cmd_out); cl_server.start(); first = false; } ++frame_count; gui_fullscreen_fpstimer += gui_f_time; current_fps = f2s(round(1.0f/gui_f_time),2); if (gui_fullscreen_fpstimer > 1) { vsx_string h = fpsstring + " @ "+ current_fps+ "fps"; gui_fullscreen_fpstimer = 0; } gui_f_time = 0; glDepthMask(GL_TRUE); glClearColor(0.0f,0.0f,0.0f,1.0f); glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); if (vxe) { vxe->process_message_queue(&internal_cmd_in,&internal_cmd_out); vxe->render(); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); // Reset The Modelview Matrix glEnable(GL_BLEND); ++frame_counter; ++delta_frame_counter; } } pgv.iterations = -1; pgv.process_garbage(); }
int main(void) { int ret; t_sh *shell; if ((shell = create_shell_props())) { if (start_engine(shell) == 0) { ret = shell->l_ret; clean_program(shell); return (ret); } ret = shell->l_ret; clean_program(shell); return (ret); } return (3); }
int main() { if (load_executable(RA2_EXE)) { return 0; } std::cout << "Patching engine symbols..." << std::endl; patch_engine_symbols(); //Fool the engine that the launcher is running CreateMutexA(0, 0, "48BC11BD-C4D7-466b-8A31-C6ABBAD47B3E"); std::cout << "Start engine..." << std::endl; start_engine(); return 0; }