Automatically set Drawing mode when loading Thomson, C64 and Apple 2 files
This commit is contained in:
parent
2a6f0e3a27
commit
c81ffb0d6e
@ -317,7 +317,12 @@ void Set_image_mode(T_IO_Context *context, enum IMAGE_MODES mode)
|
|||||||
if (context->Type == CONTEXT_MAIN_IMAGE)
|
if (context->Type == CONTEXT_MAIN_IMAGE)
|
||||||
{
|
{
|
||||||
Main.backups->Pages->Image_mode = mode;
|
Main.backups->Pages->Image_mode = mode;
|
||||||
|
//Switch_layer_mode(mode);
|
||||||
Update_screen_targets();
|
Update_screen_targets();
|
||||||
|
if (mode > IMAGE_MODE_ANIMATION)
|
||||||
|
Selected_Constraint_Mode = mode;
|
||||||
|
// update the "FX" button state
|
||||||
|
Draw_menu_button(BUTTON_EFFECTS,Any_effect_active());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1186,7 +1186,10 @@ int Init_program(int argc,char * argv[])
|
|||||||
|
|
||||||
// If only one image was loaded, assume the spare has same image type
|
// If only one image was loaded, assume the spare has same image type
|
||||||
if (file_in_command_line==1)
|
if (file_in_command_line==1)
|
||||||
|
{
|
||||||
|
if (Main.backups->Pages->Image_mode <= IMAGE_MODE_ANIMATION)
|
||||||
Spare.backups->Pages->Image_mode = Main.backups->Pages->Image_mode;
|
Spare.backups->Pages->Image_mode = Main.backups->Pages->Image_mode;
|
||||||
|
}
|
||||||
|
|
||||||
Hide_cursor();
|
Hide_cursor();
|
||||||
Compute_optimal_menu_colors(Main.palette);
|
Compute_optimal_menu_colors(Main.palette);
|
||||||
|
|||||||
@ -3093,13 +3093,17 @@ void Load_C64(T_IO_Context * context)
|
|||||||
{
|
{
|
||||||
case F_fli:
|
case F_fli:
|
||||||
Load_C64_fli(context,bitmap,screen_ram,color_ram,background);
|
Load_C64_fli(context,bitmap,screen_ram,color_ram,background);
|
||||||
|
Set_image_mode(context, IMAGE_MODE_C64FLI);
|
||||||
break;
|
break;
|
||||||
case F_multi:
|
case F_multi:
|
||||||
Load_C64_multi(context,bitmap,screen_ram,color_ram,
|
Load_C64_multi(context,bitmap,screen_ram,color_ram,
|
||||||
(background==NULL) ? 0 : *background);
|
(background==NULL) ? 0 : *background);
|
||||||
|
Set_image_mode(context, IMAGE_MODE_C64MULTI);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Load_C64_hires(context,bitmap,screen_ram);
|
Load_C64_hires(context,bitmap,screen_ram);
|
||||||
|
if (loadFormat == F_hires)
|
||||||
|
Set_image_mode(context, IMAGE_MODE_C64HIRES);
|
||||||
}
|
}
|
||||||
|
|
||||||
free(file_buffer);
|
free(file_buffer);
|
||||||
@ -5652,6 +5656,8 @@ void Load_MOTO(T_IO_Context * context)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Pre_load(context, width, height, file_size, FORMAT_MOTO, ratio, bpp);
|
Pre_load(context, width, height, file_size, FORMAT_MOTO, ratio, bpp);
|
||||||
|
if (mode == MOTO_MODE_40col)
|
||||||
|
Set_image_mode(context, IMAGE_MODE_THOMSON);
|
||||||
File_error = 0;
|
File_error = 0;
|
||||||
i = 0;
|
i = 0;
|
||||||
for (y = 0; y < height; y++)
|
for (y = 0; y < height; y++)
|
||||||
@ -6685,6 +6691,8 @@ void Load_HGR(T_IO_Context * context)
|
|||||||
free(vram[0]);
|
free(vram[0]);
|
||||||
free(vram[1]);
|
free(vram[1]);
|
||||||
File_error = 0;
|
File_error = 0;
|
||||||
|
|
||||||
|
Set_image_mode(context, is_dhgr ? IMAGE_MODE_DHGR : IMAGE_MODE_HGR);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user