Add "EHB" button in palette dialog.
allow to build an Amiga "Extra Half Bright" palette. OCS/ECS rocks !
This commit is contained in:
		
							parent
							
								
									159e26bb25
								
							
						
					
					
						commit
						b0175a22b2
					
				@ -2879,6 +2879,9 @@ static const T_Help_table helptable_palette[] =
 | 
			
		||||
  HELP_TEXT ("to the number of colors you want (and")
 | 
			
		||||
  HELP_TEXT ("modifies the picture).")
 | 
			
		||||
  HELP_TEXT ("")
 | 
			
		||||
  HELP_TEXT ("- EHB: Amiga Extra Half Bright. Sets colors")
 | 
			
		||||
  HELP_TEXT ("32 to 63 to half tones of colors 0 to 31.")
 | 
			
		||||
  HELP_TEXT ("")
 | 
			
		||||
  HELP_TEXT ("- Undo: Allows you to recover the last")
 | 
			
		||||
  HELP_TEXT ("modifications made on the palette. Note that")
 | 
			
		||||
  HELP_TEXT ("it can't undo the changes that affect the")
 | 
			
		||||
 | 
			
		||||
@ -1085,15 +1085,15 @@ void Button_Palette(int btn)
 | 
			
		||||
 | 
			
		||||
  // Coordinates of the block that displays Backcolor
 | 
			
		||||
  static const int BGCOLOR_DISPLAY_X = 176;
 | 
			
		||||
  static const int BGCOLOR_DISPLAY_Y = 65;
 | 
			
		||||
  static const int BGCOLOR_DISPLAY_Y = 65 + 14;
 | 
			
		||||
  static const int BGCOLOR_DISPLAY_W = 40;
 | 
			
		||||
  static const int BGCOLOR_DISPLAY_H = 96;
 | 
			
		||||
  static const int BGCOLOR_DISPLAY_H = 96 - 14;
 | 
			
		||||
 | 
			
		||||
  // Coordinates of the block that displays Forecolor
 | 
			
		||||
  static const int FGCOLOR_DISPLAY_X = 180;
 | 
			
		||||
  static const int FGCOLOR_DISPLAY_Y = 69;
 | 
			
		||||
  static const int FGCOLOR_DISPLAY_Y = 69 + 14;
 | 
			
		||||
  static const int FGCOLOR_DISPLAY_W = 32;
 | 
			
		||||
  static const int FGCOLOR_DISPLAY_H = 88;
 | 
			
		||||
  static const int FGCOLOR_DISPLAY_H = 88 - 14;
 | 
			
		||||
 | 
			
		||||
  // Coordinates of the Color#
 | 
			
		||||
  static const int COLOR_X = 111;
 | 
			
		||||
@ -1252,6 +1252,8 @@ void Button_Palette(int btn)
 | 
			
		||||
  Window_set_normal_button( 44,178,35,14,"Load"  ,1,1,KEY_l);  // 26
 | 
			
		||||
  Window_set_normal_button( 83,178,35,14,"Save"  ,1,1,KEY_s);  // 27
 | 
			
		||||
 | 
			
		||||
  Window_set_normal_button( 89+84,L4,39,14,"EHB" ,3,1,KEY_b);  // 28
 | 
			
		||||
 | 
			
		||||
  // Dessin des petits effets spéciaux pour les boutons [+] et [-]
 | 
			
		||||
  Draw_thingumajig(BUTTON_PLUS_X-5, BUTTON_PLUS_Y,MC_White,-1);
 | 
			
		||||
  Draw_thingumajig(BUTTON_MINUS_X+16,BUTTON_MINUS_Y,MC_Dark,+1);
 | 
			
		||||
@ -2628,6 +2630,16 @@ void Button_Palette(int btn)
 | 
			
		||||
      case 27: // Save palette
 | 
			
		||||
        Save_picture(CONTEXT_PALETTE);
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 28:  // EHB : Amiga Extra Half Bright
 | 
			
		||||
        for (i = 0; i < 32; i++)
 | 
			
		||||
        {
 | 
			
		||||
          working_palette[i+32].R = working_palette[i].R >> 1;
 | 
			
		||||
          working_palette[i+32].G = working_palette[i].G >> 1;
 | 
			
		||||
          working_palette[i+32].B = working_palette[i].B >> 1;
 | 
			
		||||
        }
 | 
			
		||||
        Set_palette(working_palette);
 | 
			
		||||
        break;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user