Add visible_image and backups to the T_Document structure

This commit is contained in:
Thomas Bernard
2018-01-22 16:16:39 +01:00
parent 8ae651c75f
commit a53d6da6ea
23 changed files with 579 additions and 574 deletions

View File

@@ -36,7 +36,7 @@
void Pixel_in_layer(word x,word y, byte layer, byte color)
{
*((y)*Main.image_width+(x)+Main_backups->Pages->Image[layer].Pixels)=color;
*((y)*Main.image_width+(x)+Main.backups->Pages->Image[layer].Pixels)=color;
}
byte C64_FLI(byte *bitmap, byte *screen_ram, byte *color_ram, byte *background)
@@ -55,7 +55,7 @@ byte C64_FLI(byte *bitmap, byte *screen_ram, byte *color_ram, byte *background)
const byte no_color=16;
// Prerequisites
if (Main_backups->Pages->Nb_layers < 3)
if (Main.backups->Pages->Nb_layers < 3)
return 1;
if (Main.image_width != 160 || Main.image_height != 200)
return 2;
@@ -76,7 +76,7 @@ byte C64_FLI(byte *bitmap, byte *screen_ram, byte *color_ram, byte *background)
{
for (x=0;x<4;x++)
{
byte c=*((row)*Main.image_width+(col*4+x)+Main_backups->Pages->Image[2].Pixels);
byte c=*((row)*Main.image_width+(col*4+x)+Main.backups->Pages->Image[2].Pixels);
used_colors[row][col] |= 1<<c;
}
}
@@ -84,7 +84,7 @@ byte C64_FLI(byte *bitmap, byte *screen_ram, byte *color_ram, byte *background)
// Get "mandatory colors" from layer 1
for (row=0;row<200;row++)
{
byte c=*((row)*Main.image_width+0+Main_backups->Pages->Image[0].Pixels);
byte c=*((row)*Main.image_width+0+Main.backups->Pages->Image[0].Pixels);
if (c<16)
{
line_color[row]=c;
@@ -100,7 +100,7 @@ byte C64_FLI(byte *bitmap, byte *screen_ram, byte *color_ram, byte *background)
{
for (col=0;col<40;col++)
{
byte c=*((row)*Main.image_width+(col*4)+Main_backups->Pages->Image[1].Pixels);
byte c=*((row)*Main.image_width+(col*4)+Main.backups->Pages->Image[1].Pixels);
if (c<16)
{
block_color[row/8][col]=c;
@@ -312,7 +312,7 @@ byte C64_FLI(byte *bitmap, byte *screen_ram, byte *color_ram, byte *background)
for(x=0; x<4; x++)
{
byte bits;
byte c=*((row*8+y)*Main.image_width+(col*4+x)+Main_backups->Pages->Image[2].Pixels);
byte c=*((row*8+y)*Main.image_width+(col*4+x)+Main.backups->Pages->Image[2].Pixels);
if (c==line_color[row*8+y])
// BG color
@@ -360,7 +360,7 @@ byte C64_FLI_enforcer(void)
return 1;
if (Main.image_height != 200)
return 1;
if (Main_backups->Pages->Nb_layers != 4)
if (Main.backups->Pages->Nb_layers != 4)
return 2;
Backup_layers(3);