[layers] Merged changes from trunk (up-to-date now)
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1132 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
		
						commit
						ad4b417afb
					
				@ -1123,6 +1123,8 @@ void Button_Skins(void)
 | 
			
		||||
  do
 | 
			
		||||
  {
 | 
			
		||||
    clicked_button=Window_clicked_button();
 | 
			
		||||
    if (Is_shortcut(Key,0x100+BUTTON_HELP))
 | 
			
		||||
      Window_help(BUTTON_SETTINGS, "SKINS");
 | 
			
		||||
 | 
			
		||||
    switch(clicked_button)
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										5
									
								
								global.h
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								global.h
									
									
									
									
									
								
							@ -112,11 +112,6 @@ GFX2_GLOBAL dword Key_ANSI;
 | 
			
		||||
/// Boolean set to true when the OS/window manager requests the application to close. ie: [X] button
 | 
			
		||||
GFX2_GLOBAL byte Quit_is_required;
 | 
			
		||||
 | 
			
		||||
/// Divisor for the mouse coordinates recieved. No target currently needs it, should be left at 1.
 | 
			
		||||
GFX2_GLOBAL byte Mouse_fix_factor_X;
 | 
			
		||||
/// Divisor for the mouse coordinates recieved. No target currently needs it, should be left at 1.
 | 
			
		||||
GFX2_GLOBAL byte Mouse_fix_factor_Y;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// This boolean is true when the current operation allows changing the
 | 
			
		||||
/// foreground or background color.
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										24
									
								
								helpfile.h
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								helpfile.h
									
									
									
									
									
								
							@ -2065,11 +2065,6 @@ static const T_Help_table helptable_settings[] =
 | 
			
		||||
  HELP_TEXT ("some particular files or directories must be")
 | 
			
		||||
  HELP_TEXT ("displayed by the fileselectors or not.")
 | 
			
		||||
  HELP_TEXT ("")
 | 
			
		||||
  HELP_TEXT ("- Show/Hide picture limits: Indicates if the")
 | 
			
		||||
  HELP_TEXT ("picture boundaries must be displayed when")
 | 
			
		||||
  HELP_TEXT ("you are in a resolution bigger than the")
 | 
			
		||||
  HELP_TEXT ("picture.")
 | 
			
		||||
  HELP_TEXT ("")
 | 
			
		||||
  HELP_TEXT ("- Clear palette: Indicates if loading a file")
 | 
			
		||||
  HELP_TEXT ("with a palette of less than 256 colors must")
 | 
			
		||||
  HELP_TEXT ("erase the rest of the current palette")
 | 
			
		||||
@ -2117,9 +2112,6 @@ static const T_Help_table helptable_settings[] =
 | 
			
		||||
  HELP_TEXT ("placing the handle in the center of the")
 | 
			
		||||
  HELP_TEXT ("brush.")
 | 
			
		||||
  HELP_TEXT ("")
 | 
			
		||||
  HELP_TEXT ("- Separate colors: Draws a squaring around")
 | 
			
		||||
  HELP_TEXT ("the colors of the tool-bar.")
 | 
			
		||||
  HELP_TEXT ("")
 | 
			
		||||
  HELP_TEXT ("- Auto-set resolution: sets the best")
 | 
			
		||||
  HELP_TEXT ("resolution for the loaded image.")
 | 
			
		||||
  HELP_TEXT ("")
 | 
			
		||||
@ -2151,9 +2143,10 @@ static const T_Help_table helptable_settings[] =
 | 
			
		||||
  HELP_TEXT ("GrafX2 with a classical font, or another one")
 | 
			
		||||
  HELP_TEXT ("a bit funnier.")
 | 
			
		||||
  HELP_TEXT ("")
 | 
			
		||||
  HELP_TEXT ("- Cursor: allows you to choose whether you")
 | 
			
		||||
  HELP_TEXT ("prefer a solid cursor or a transparent")
 | 
			
		||||
  HELP_TEXT ("cursor.")
 | 
			
		||||
  HELP_TEXT ("- Cursor: Allows you to choose the graphic")
 | 
			
		||||
  HELP_TEXT ("mouse cursor: Solid and Thin are solid black")
 | 
			
		||||
  HELP_TEXT ("and white cursors defined by the skin file,")
 | 
			
		||||
  HELP_TEXT (" Transparent is a 1-pixel wide XOR cross.")
 | 
			
		||||
  HELP_TEXT ("")
 | 
			
		||||
  HELP_TEXT ("- Graphic file: you can change the whole")
 | 
			
		||||
  HELP_TEXT ("interface by selecting where the sprites for")
 | 
			
		||||
@ -2165,6 +2158,15 @@ static const T_Help_table helptable_settings[] =
 | 
			
		||||
  HELP_TEXT ("days of Sunset Design. If you create a good")
 | 
			
		||||
  HELP_TEXT ("skin, feel free to share it with us! We may")
 | 
			
		||||
  HELP_TEXT ("include it in a future release...")
 | 
			
		||||
  HELP_TEXT ("")
 | 
			
		||||
  HELP_TEXT ("- Separate colors: Draws a squaring around")
 | 
			
		||||
  HELP_TEXT ("the colors of the tool-bar.")
 | 
			
		||||
  HELP_TEXT ("")
 | 
			
		||||
  HELP_TEXT ("- Show/Hide picture limits: Indicates if the")
 | 
			
		||||
  HELP_TEXT ("picture boundaries must be displayed when")
 | 
			
		||||
  HELP_TEXT ("you are in a resolution bigger than the")
 | 
			
		||||
  HELP_TEXT ("picture.")
 | 
			
		||||
  HELP_TEXT ("")
 | 
			
		||||
};
 | 
			
		||||
static const T_Help_table helptable_clear[] =
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										44
									
								
								main.c
									
									
									
									
									
								
							
							
						
						
									
										44
									
								
								main.c
									
									
									
									
									
								
							@ -287,24 +287,31 @@ void Analyze_command_line(int argc,char * argv[])
 | 
			
		||||
    else
 | 
			
		||||
    {
 | 
			
		||||
      // Si ce n'est pas un paramètre, c'est le nom du fichier à ouvrir
 | 
			
		||||
      if (File_in_command_line)
 | 
			
		||||
      if (File_in_command_line > 1)
 | 
			
		||||
      {
 | 
			
		||||
        // plusieurs noms de fichier en argument
 | 
			
		||||
        // Il y a déjà 2 noms de fichiers et on vient d'en trouver un 3ème
 | 
			
		||||
        Error(ERROR_COMMAND_LINE);
 | 
			
		||||
        Display_syntax();
 | 
			
		||||
        exit(0);
 | 
			
		||||
      }
 | 
			
		||||
      else if (File_exists(argv[index]))
 | 
			
		||||
      {
 | 
			
		||||
        File_in_command_line=1;
 | 
			
		||||
 | 
			
		||||
        // On récupère le chemin complet du paramètre
 | 
			
		||||
        // Et on découpe ce chemin en répertoire(path) + fichier(.ext)
 | 
			
		||||
		File_in_command_line ++;
 | 
			
		||||
		buffer = Realpath(argv[index], NULL);
 | 
			
		||||
 | 
			
		||||
		if (File_in_command_line == 1)
 | 
			
		||||
		{
 | 
			
		||||
			// Separate path from filename
 | 
			
		||||
        Extract_path(Main_file_directory, buffer);
 | 
			
		||||
        Extract_filename(Main_filename, buffer);
 | 
			
		||||
			DEBUG(Main_filename, 0);
 | 
			
		||||
			free(buffer);
 | 
			
		||||
        chdir(Main_file_directory);
 | 
			
		||||
		} else {
 | 
			
		||||
			Extract_path(Spare_file_directory, buffer);
 | 
			
		||||
			Extract_filename(Spare_filename, buffer);
 | 
			
		||||
			DEBUG(Spare_filename, 1);
 | 
			
		||||
        free(buffer);
 | 
			
		||||
		}
 | 
			
		||||
      }
 | 
			
		||||
      else
 | 
			
		||||
      {
 | 
			
		||||
@ -645,6 +652,18 @@ int Init_program(int argc,char * argv[])
 | 
			
		||||
  // Allocation de mémoire pour les différents écrans virtuels (et brosse)
 | 
			
		||||
  if (Init_all_backup_lists(Screen_width,Screen_height)==0)
 | 
			
		||||
    Error(ERROR_MEMORY);
 | 
			
		||||
  // On remet le nom par défaut pour la page de brouillon car il été modifié
 | 
			
		||||
  // par le passage d'un fichier en paramètre lors du traitement précédent.
 | 
			
		||||
  // Note: le fait que l'on ne modifie que les variables globales 
 | 
			
		||||
  // Brouillon_* et pas les infos contenues dans la page de brouillon 
 | 
			
		||||
  // elle-même ne m'inspire pas confiance mais ça a l'air de marcher sans 
 | 
			
		||||
  // poser de problèmes, alors...
 | 
			
		||||
  if (File_in_command_line == 1)
 | 
			
		||||
  {
 | 
			
		||||
    strcpy(Spare_file_directory,Spare_current_directory);
 | 
			
		||||
    strcpy(Spare_filename,"NO_NAME.GIF");
 | 
			
		||||
    Spare_fileformat=DEFAULT_FILEFORMAT;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  // Nettoyage de l'écran virtuel (les autres recevront celui-ci par copie)
 | 
			
		||||
  memset(Main_screen,0,Main_image_width*Main_image_height);
 | 
			
		||||
@ -797,10 +816,19 @@ int main(int argc,char * argv[])
 | 
			
		||||
    if (Config.Opening_message && (!File_in_command_line))
 | 
			
		||||
      Button_Message_initial();
 | 
			
		||||
  
 | 
			
		||||
    if (File_in_command_line)
 | 
			
		||||
    switch (File_in_command_line)
 | 
			
		||||
    {
 | 
			
		||||
		case 2:
 | 
			
		||||
      Button_Reload();
 | 
			
		||||
			DEBUG(Main_filename, 0);
 | 
			
		||||
			DEBUG(Spare_filename, 0);
 | 
			
		||||
			Button_Page();
 | 
			
		||||
			// no break ! proceed with the other file now
 | 
			
		||||
		case 1:
 | 
			
		||||
			Button_Reload();
 | 
			
		||||
			Resolution_in_command_line = 0;
 | 
			
		||||
		default:
 | 
			
		||||
			break;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  Main_handler();
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										26
									
								
								palette.c
									
									
									
									
									
								
							
							
						
						
									
										26
									
								
								palette.c
									
									
									
									
									
								
							@ -893,27 +893,27 @@ void Button_Palette(void)
 | 
			
		||||
  Window_set_normal_button(96,32,29,14,"HSL"    ,1,1,SDLK_h);   // 22
 | 
			
		||||
  Window_set_normal_button(96,47,29,14,"Srt"    ,1,1,SDLK_s);   // 23
 | 
			
		||||
 | 
			
		||||
  if (Config.Auto_nb_used)
 | 
			
		||||
  {
 | 
			
		||||
	Update_color_count(&used_colors,color_usage);
 | 
			
		||||
 | 
			
		||||
	Num2str(color_usage[Fore_color], str, 6);
 | 
			
		||||
	Print_in_window(222, 33, str, MC_Black, MC_Light);
 | 
			
		||||
	Print_in_window(222, 42, "pixels", MC_Dark, MC_Light);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  // Dessin des petits effets spéciaux pour les boutons [+] et [-]
 | 
			
		||||
  Draw_thingumajig(263, 74,MC_White,-1);
 | 
			
		||||
  Draw_thingumajig(280, 74,MC_White,+1);
 | 
			
		||||
  Draw_thingumajig(263,165,MC_Dark,-1);
 | 
			
		||||
  Draw_thingumajig(280,165,MC_Dark,+1);
 | 
			
		||||
 | 
			
		||||
  Update_window_area(0,0,299,188);
 | 
			
		||||
 | 
			
		||||
  Display_cursor();
 | 
			
		||||
 | 
			
		||||
  if (Config.Auto_nb_used)
 | 
			
		||||
  {
 | 
			
		||||
    Update_color_count(&used_colors,color_usage);
 | 
			
		||||
    
 | 
			
		||||
    Hide_cursor();
 | 
			
		||||
    Print_in_window(222, 42, "pixels", MC_Dark, MC_Light);
 | 
			
		||||
    Num2str(color_usage[Fore_color], str, 6);
 | 
			
		||||
    Print_in_window(222, 33, str, MC_Black, MC_Light);
 | 
			
		||||
    Display_cursor();
 | 
			
		||||
  }
 | 
			
		||||
  
 | 
			
		||||
  Update_window_area(0,0,299,188);
 | 
			
		||||
  
 | 
			
		||||
  do
 | 
			
		||||
  {
 | 
			
		||||
    old_mouse_x=Mouse_X;
 | 
			
		||||
 | 
			
		||||
@ -469,13 +469,13 @@ int Load_INI(T_Config * conf)
 | 
			
		||||
    goto Erreur_Retour;
 | 
			
		||||
  if ((values[0]<0) || (values[0]>4))
 | 
			
		||||
    goto Erreur_ERREUR_INI_CORROMPU;
 | 
			
		||||
  conf->Mouse_fix_factor_X=Mouse_fix_factor_X=values[0];
 | 
			
		||||
  // Deprecated setting, unused
 | 
			
		||||
 | 
			
		||||
  if ((return_code=Load_INI_get_values (file,buffer,"Y_correction_factor",1,values)))
 | 
			
		||||
    goto Erreur_Retour;
 | 
			
		||||
  if ((values[0]<0) || (values[0]>4))
 | 
			
		||||
    goto Erreur_ERREUR_INI_CORROMPU;
 | 
			
		||||
  conf->Mouse_fix_factor_Y=Mouse_fix_factor_Y=values[0];
 | 
			
		||||
  // Deprecated setting, unused
 | 
			
		||||
 | 
			
		||||
  if ((return_code=Load_INI_get_values (file,buffer,"Cursor_aspect",1,values)))
 | 
			
		||||
    goto Erreur_Retour;
 | 
			
		||||
 | 
			
		||||
@ -445,11 +445,11 @@ int Save_INI(T_Config * conf)
 | 
			
		||||
  if ((return_code=Save_INI_set_values (Ancien_fichier,Nouveau_fichier,buffer,"Y_sensitivity",1,values,0)))
 | 
			
		||||
    goto Erreur_Retour;
 | 
			
		||||
 | 
			
		||||
  values[0]=conf->Mouse_fix_factor_X;
 | 
			
		||||
  values[0]=0;
 | 
			
		||||
  if ((return_code=Save_INI_set_values (Ancien_fichier,Nouveau_fichier,buffer,"X_correction_factor",1,values,0)))
 | 
			
		||||
    goto Erreur_Retour;
 | 
			
		||||
 | 
			
		||||
  values[0]=conf->Mouse_fix_factor_Y;
 | 
			
		||||
  values[0]=0;
 | 
			
		||||
  if ((return_code=Save_INI_set_values (Ancien_fichier,Nouveau_fichier,buffer,"Y_correction_factor",1,values,0)))
 | 
			
		||||
    goto Erreur_Retour;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										2
									
								
								struct.h
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								struct.h
									
									
									
									
									
								
							@ -285,8 +285,6 @@ typedef struct
 | 
			
		||||
  byte Max_undo_pages;                   ///< Number of steps to memorize for Undo/Redo.
 | 
			
		||||
  byte Mouse_sensitivity_index_x;        ///< Mouse sensitivity in X axis
 | 
			
		||||
  byte Mouse_sensitivity_index_y;        ///< Mouse sensitivity in Y axis
 | 
			
		||||
  byte Mouse_fix_factor_X;               ///< Mouse correction factor in X axis.
 | 
			
		||||
  byte Mouse_fix_factor_Y;               ///< Mouse correction factor in Y axis.
 | 
			
		||||
  byte Mouse_merge_movement;             ///< Number of SDL mouse events that are merged into a single change of mouse coordinates.
 | 
			
		||||
  byte Delay_left_click_on_slider;       ///< Delay (in 1/100s) between two activations of a repeatable button when you hold left-click.
 | 
			
		||||
  byte Delay_right_click_on_slider;      ///< Delay (in 1/100s) between two activations of a repeatable button when you hold left-click.
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user