Load_C64_fli() : do not load additional layers when loading preview

This commit is contained in:
Thomas Bernard 2018-12-07 20:12:35 +01:00 committed by Adrien Destugues
parent 387b4c33f9
commit ab8c75306e

View File

@ -2510,6 +2510,8 @@ void Load_C64_fli(T_IO_Context *context, byte *bitmap, byte *screen_ram, byte *c
int cx,cy,x,y,c[4]; int cx,cy,x,y,c[4];
if (context->Type == CONTEXT_MAIN_IMAGE)
{
// Fill layer 0 with background colors // Fill layer 0 with background colors
for(y=0; y<200; y++) for(y=0; y<200; y++)
{ {
@ -2531,7 +2533,8 @@ void Load_C64_fli(T_IO_Context *context, byte *bitmap, byte *screen_ram, byte *c
{ {
for(x=0; x<4; x++) for(x=0; x<4; x++)
{ {
Set_pixel(context, cx*4+(3-x),cy*8+y,c[3]); Set_pixel(context, cx*4+x,cy*8+y,c[3]);
}
} }
} }
} }
@ -2562,12 +2565,13 @@ void Load_C64_fli(T_IO_Context *context, byte *bitmap, byte *screen_ram, byte *c
} }
} }
} }
if (context->Type == CONTEXT_MAIN_IMAGE)
{
// Fill layer 3 with color 16 // Fill layer 3 with color 16
Set_loading_layer(context, 3); Set_loading_layer(context, 3);
for(y=0; y<200; y++) for(y=0; y<200; y++)
{ {
for(x=0; x<160; x++) for(x=0; x<160; x++)
{
Set_pixel(context, x,y,16); Set_pixel(context, x,y,16);
} }
} }