Load_C64_fli() : do not load additional layers when loading preview
This commit is contained in:
parent
387b4c33f9
commit
ab8c75306e
@ -2510,28 +2510,31 @@ 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];
|
||||||
|
|
||||||
// Fill layer 0 with background colors
|
if (context->Type == CONTEXT_MAIN_IMAGE)
|
||||||
for(y=0; y<200; y++)
|
|
||||||
{
|
{
|
||||||
byte bg_color = 0;
|
// Fill layer 0 with background colors
|
||||||
if (background != NULL)
|
for(y=0; y<200; y++)
|
||||||
bg_color = background[y];
|
|
||||||
for(x=0; x<160; x++)
|
|
||||||
Set_pixel(context, x,y, bg_color);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fill layer 1 with color ram (1 color per 4x8 block)
|
|
||||||
Set_loading_layer(context, 1);
|
|
||||||
for(cy=0; cy<25; cy++)
|
|
||||||
{
|
|
||||||
for(cx=0; cx<40; cx++)
|
|
||||||
{
|
{
|
||||||
c[3]=color_ram[cy*40+cx]&15;
|
byte bg_color = 0;
|
||||||
for(y=0; y<8; y++)
|
if (background != NULL)
|
||||||
|
bg_color = background[y];
|
||||||
|
for(x=0; x<160; x++)
|
||||||
|
Set_pixel(context, x,y, bg_color);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fill layer 1 with color ram (1 color per 4x8 block)
|
||||||
|
Set_loading_layer(context, 1);
|
||||||
|
for(cy=0; cy<25; cy++)
|
||||||
|
{
|
||||||
|
for(cx=0; cx<40; cx++)
|
||||||
{
|
{
|
||||||
for(x=0; x<4; x++)
|
c[3]=color_ram[cy*40+cx]&15;
|
||||||
|
for(y=0; y<8; y++)
|
||||||
{
|
{
|
||||||
Set_pixel(context, cx*4+(3-x),cy*8+y,c[3]);
|
for(x=0; x<4; x++)
|
||||||
|
{
|
||||||
|
Set_pixel(context, cx*4+x,cy*8+y,c[3]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2562,13 +2565,14 @@ void Load_C64_fli(T_IO_Context *context, byte *bitmap, byte *screen_ram, byte *c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Fill layer 3 with color 16
|
if (context->Type == CONTEXT_MAIN_IMAGE)
|
||||||
Set_loading_layer(context, 3);
|
|
||||||
for(y=0; y<200; y++)
|
|
||||||
{
|
{
|
||||||
for(x=0; x<160; x++)
|
// Fill layer 3 with color 16
|
||||||
|
Set_loading_layer(context, 3);
|
||||||
|
for(y=0; y<200; y++)
|
||||||
{
|
{
|
||||||
Set_pixel(context, x,y,16);
|
for(x=0; x<160; x++)
|
||||||
|
Set_pixel(context, x,y,16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user