remove C64_FLI_enforcer() for good

This commit is contained in:
Thomas Bernard 2018-12-11 12:31:07 +01:00
parent 66aa397b11
commit cdcb4e93da
No known key found for this signature in database
GPG Key ID: 0FF11B67A5C0863C
5 changed files with 2 additions and 103 deletions

View File

@ -1343,12 +1343,6 @@ void Main_handler(void)
Layer_activate((key_index-SPECIAL_LAYER1_TOGGLE)/2, RIGHT_SIDE);
action++;
break;
#if 0
case SPECIAL_FORMAT_CHECKER:
C64_FLI_enforcer();
action++;
break;
#endif
case SPECIAL_REPEAT_SCRIPT:
#ifdef __ENABLE_LUA__

View File

@ -343,9 +343,6 @@ static const T_Help_table helptable_help[] =
HELP_LINK (" Go to last: %s", 0x100+BUTTON_ANIM_LAST_FRAME)
HELP_LINK (" Set duration: %s", 0x100+BUTTON_ANIM_TIME)
HELP_TEXT ("")
HELP_LINK (" Format check : %s", SPECIAL_FORMAT_CHECKER)
HELP_LINK (" Format check menu: %s", SPECIAL_FORMAT_CHECKER_MENU)
HELP_TEXT ("")
HELP_TEXT ("")
HELP_TEXT ("")
};

View File

@ -2045,8 +2045,8 @@ word Ordering[NB_SHORTCUTS]=
SPECIAL_RUN_SCRIPT_9,
SPECIAL_RUN_SCRIPT_10,
SPECIAL_CYCLE_MODE,
SPECIAL_FORMAT_CHECKER,
SPECIAL_FORMAT_CHECKER_MENU,
SPECIAL_FORMAT_CHECKER, /// unused at this time
SPECIAL_FORMAT_CHECKER_MENU, /// unused at this time
0x100+BUTTON_ANIM_TIME,
0x100+BUTTON_ANIM_FIRST_FRAME,
0x100+BUTTON_ANIM_LAST_FRAME,

View File

@ -126,13 +126,6 @@ int Constraint_mode_from_label(const char * label)
return -1;
}
#if 0
static void Set_Pixel_in_layer(word x,word y, byte layer, byte color)
{
*((y)*Main.image_width+(x)+Main.backups->Pages->Image[layer].Pixels)=color;
}
#endif
int C64_FLI(T_IO_Context * context, byte *bitmap, byte *screen_ram, byte *color_ram, byte *background)
{
word used_colors[200][40];
@ -648,79 +641,6 @@ int C64_pixels_to_FLI(byte *bitmap, byte *screen_ram, byte *color_ram,
}
#if 0
int C64_FLI_enforcer(void)
{
byte background[200];
byte bitmap[8000];
byte screen_ram[8192];
byte color_ram[1000];
int row, col, x, y;
byte c[4];
// Checks
if (Main.image_width != 160 || Main.image_height != 200)
{
GFX2_Log(GFX2_WARNING, "C64_FLI_enforcer() requires 160x200 image resolution\n");
return 1;
}
if (Main.backups->Pages->Nb_layers != 4) {
GFX2_Log(GFX2_WARNING, "C64_FLI_enforcer() requires 4 layers\n");
return 2;
}
Backup_layers(3);
memset(bitmap,0,8000);
memset(background,0,200);
memset(color_ram,0,1000);
memset(screen_ram,0,8192);
C64_FLI(bitmap, screen_ram, color_ram, background);
for(row=0; row<25; row++)
{
for(col=0; col<40; col++)
{
c[3]=color_ram[row*40+col]&15;
for(y=0; y<8; y++)
{
int pixel=bitmap[row*320+col*8+y];
c[0]=background[row*8+y]&15;
c[1]=screen_ram[y*1024+row*40+col]>>4;
c[2]=screen_ram[y*1024+row*40+col]&15;
for(x=0; x<4; x++)
{
int color=c[(pixel&3)];
pixel>>=2;
Set_Pixel_in_layer(col*4+(3-x),row*8+y,3,color);
}
}
}
}
End_of_modification();
// Visible feedback:
// If the "check" layer was visible, manually update the whole thing
if (Main.layers_visible & (1<<3))
{
Hide_cursor();
Redraw_layered_image();
Display_all_screen();
Display_layerbar();
Display_cursor();
}
else
// Otherwise, simply toggle the layer visiblity
Layer_activate(3,RIGHT_SIDE);
return 0;
}
#endif
void C64_set_palette(T_Components * palette)
{
/// Set C64 Palette from http://www.pepto.de/projects/colorvic/

View File

@ -74,18 +74,6 @@ int C64_FLI(T_IO_Context * context, byte *bitmap, byte *screen_ram, byte *color_
*/
int C64_pixels_to_FLI(byte *bitmap, byte *screen_ram, byte *color_ram, byte *background, const byte * pixels, long pitch, int errmode);
#if 0
/**
* FLI Check/enforcer
*
* Generate Screen RAM, Color RAM and bitmap data from the first 3 layers
* and output the result in layer 4.
*
* @return 0 for success, 2 if the picture is not 4 layers, 1 if the picture dimensions are not 160x200
*/
int C64_FLI_enforcer(void);
#endif
/**
* Set the 16 colors Commodore 64 palette
*/