[layers] Implemented SwapUp and SwapDown (Alt-PgUp, Alt-PgDown) to change layers order; Implemented layer merge (Alt-End); improved GIF loader to read images with optimized layers (smaller) and the ones with a transparent color different than zero.
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1077 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
4
misc.c
4
misc.c
@@ -222,7 +222,7 @@ byte Read_pixel_from_current_screen (word x,word y)
|
||||
byte depth;
|
||||
byte color;
|
||||
color = *(Main_screen+y*Main_image_width+x);
|
||||
if (color != 0) // transparent
|
||||
if (color != Main_backups->Pages->Transparent_color) // transparent color
|
||||
return color;
|
||||
|
||||
depth = *(Visible_image_depth_buffer.Image+x+y*Main_image_width);
|
||||
@@ -236,7 +236,7 @@ void Pixel_in_current_screen (word x,word y,byte color,int with_preview)
|
||||
*(Main_backups->Pages->Image[Main_current_layer] + x+y*Main_image_width)=color;
|
||||
if ( depth <= Main_current_layer)
|
||||
{
|
||||
if (color == 0) // transparent
|
||||
if (color == Main_backups->Pages->Transparent_color) // transparent color
|
||||
// fetch pixel color from the topmost visible layer
|
||||
color=*(Main_backups->Pages->Image[depth] + x+y*Main_image_width);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user