Makefile: Added missing png library to linker options (issue 141)
Fix the minimum screen size not enforced when resizing window (since r705) Fix the mouse cursor position when changing pixel size (since r705) In fileselector, the image preview now enforces "safe colors". (issue 116) git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@716 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
20
palette.c
20
palette.c
@@ -385,7 +385,7 @@ void Swap(int with_remap,short block_1_start,short block_2_start,short block_siz
|
||||
|
||||
|
||||
|
||||
void Set_nice_menu_colors(dword * color_usage)
|
||||
void Set_nice_menu_colors(dword * color_usage,int not_picture)
|
||||
{
|
||||
short index,index2;
|
||||
byte color;
|
||||
@@ -445,8 +445,16 @@ void Set_nice_menu_colors(dword * color_usage)
|
||||
replace_table[new_colors[index]]=Best_color_nonexcluded
|
||||
(rgb[index].R,rgb[index].G,rgb[index].B);
|
||||
|
||||
// On fait un changement des couleurs visibles à l'écran et dans l'image
|
||||
Remap_image_highlevel(replace_table);
|
||||
if (not_picture)
|
||||
{
|
||||
// Remap caused by preview. Only remap screen
|
||||
Remap_zone_highlevel(0,0,Screen_width,Screen_height,replace_table);
|
||||
}
|
||||
else
|
||||
{
|
||||
// On fait un changement des couleurs visibles à l'écran et dans l'image
|
||||
Remap_image_highlevel(replace_table);
|
||||
}
|
||||
Display_cursor();
|
||||
}
|
||||
|
||||
@@ -1398,7 +1406,7 @@ void Button_Palette(void)
|
||||
{
|
||||
memcpy(temp_palette,Main_palette,sizeof(T_Palette));
|
||||
memcpy(Main_palette,working_palette,sizeof(T_Palette));
|
||||
Set_nice_menu_colors(color_usage);
|
||||
Set_nice_menu_colors(color_usage,0);
|
||||
memcpy(working_palette,Main_palette,sizeof(T_Palette));
|
||||
memcpy(Main_palette,temp_palette,sizeof(T_Palette));
|
||||
}
|
||||
@@ -1444,7 +1452,7 @@ void Button_Palette(void)
|
||||
{
|
||||
memcpy(temp_palette,Main_palette,sizeof(T_Palette));
|
||||
memcpy(Main_palette,working_palette,sizeof(T_Palette));
|
||||
Set_nice_menu_colors(color_usage);
|
||||
Set_nice_menu_colors(color_usage,0);
|
||||
memcpy(working_palette,Main_palette,sizeof(T_Palette));
|
||||
memcpy(Main_palette,temp_palette,sizeof(T_Palette));
|
||||
}
|
||||
@@ -1946,7 +1954,7 @@ void Button_Palette(void)
|
||||
memcpy(backup_palette,working_palette,sizeof(T_Palette));
|
||||
memcpy(temp_palette,Main_palette,sizeof(T_Palette));
|
||||
memcpy(Main_palette,working_palette,sizeof(T_Palette));
|
||||
Set_nice_menu_colors(color_usage);
|
||||
Set_nice_menu_colors(color_usage,0);
|
||||
memcpy(working_palette,Main_palette,sizeof(T_Palette));
|
||||
memcpy(Main_palette,temp_palette,sizeof(T_Palette));
|
||||
Set_palette(working_palette);
|
||||
|
||||
Reference in New Issue
Block a user