示例#1
0
void make_anigif()
{
  int i=0;
  int x,y;
  FILE *fp;
  Window root;
  unsigned int h,w,bw,d;
  XGetGeometry(display,draw_win,&root,&x,&y,&w,&h,&bw,&d);
  if(mov_ind==0)return;
  if(h<movie[i].h||w<movie[i].w){
    too_small();
    return;
    
  }
 h=movie[0].h;
 w=movie[0].w;
 for(i=0;i<mov_ind;i++){
   if((movie[i].h!=h)||(movie[i].w!=w)){
     err_msg("All clips must be same size");
     return;
   }
 }
 fp=fopen("anim.gif","wb");
 set_global_map(1);
  for(i=0;i<mov_ind;i++){
    XCopyArea(display,movie[i].xi,draw_win,gc_graph,0,0,w,h,0,0);
    XFlush(display);
    /* add_ani_gif(draw_win,fp,i); */
        add_ani_gif(movie[i].xi,fp,i);
  }
  
 end_ani_gif(fp);
   fclose(fp);
   set_global_map(0);

}
示例#2
0
void initialise_global_options_data (void)
{
	set_global_version_number (application_version_number);

	set_global_gunship_type (GUNSHIP_TYPE_COMANCHE);

	set_global_dynamics_model (DEFAULT_DYNAMICS_MODEL);

	set_global_dynamics_options_cross_coupling (TRUE);
	set_global_dynamics_options_damage (TRUE);
	set_global_dynamics_options_over_torque (FALSE);
	set_global_dynamics_options_draw_flight_path (FALSE);
	set_global_dynamics_options_ground_collisions (TRUE);
	set_global_dynamics_options_ground_effect (TRUE);
	set_global_dynamics_options_keyboard_assistance (TRUE);
	set_global_dynamics_options_object_collisions (TRUE);
	set_global_dynamics_options_retreating_blade_stall (FALSE);
	set_global_dynamics_options_reverse_throttle_input (FALSE);
	set_global_dynamics_options_transitional_lift (TRUE);
	set_global_dynamics_options_vortex_ring (FALSE);
	set_global_dynamics_options_wind (FALSE);

	set_global_cyclic_input (KEYBOARD_INPUT);

	set_global_collective_input (KEYBOARD_INPUT);

	set_global_pedal_input (KEYBOARD_INPUT);

	set_global_hud_colour (HUD_COL_GREEN);

	set_global_hud_enlarge (FALSE);

	set_global_blurred_main_rotors_visible_from_cockpit (TRUE);

	set_global_display_external_view_name (TRUE);

	set_global_graphics_files_installed (FALSE);

	set_global_map (MAP1);

	set_global_joystick_device_index (-1);

	set_global_sound_effects_enabled (TRUE);

	set_global_speech_effects_enabled (TRUE);

	set_global_sound_music ( GAME_MUSIC_ON );

	set_global_graphics_rain_textures_enabled (TRUE);

	set_global_graphics_device_selection_automatic (TRUE);

	set_global_graphics_files_wrong_format (FALSE);

	set_global_comms_port ( 1 );

	set_global_baud_rate ( 1 );

	set_global_stop_bits ( 1 );

	set_global_parity ( 1 );

	set_global_flow ( 1 );

	sprintf ( global_options.ip_address, "" );

	sprintf ( global_options.phone_number, "" );

	set_global_cpg_assist_type (CPG_ASSIST_TYPE_EASY);

	set_global_display_hud_on_external_view (TRUE);

	//
	// Spare stuff at the end of the file
	//

	memset (global_options.spare, 0, sizeof (global_options.spare));

	//
	// Initialise the next version's global data
	//

	initialise_global_options_data_version2 ();
}