add function Get_image_mode()
just as there is Set_image_mode()
This commit is contained in:
parent
f8c06cd575
commit
4fa256398c
@ -360,6 +360,11 @@ void Set_image_mode(T_IO_Context *context, enum IMAGE_MODES mode)
|
||||
}
|
||||
}
|
||||
|
||||
enum IMAGE_MODES Get_image_mode(T_IO_Context *context)
|
||||
{
|
||||
return Main.backups->Pages->Image_mode;
|
||||
}
|
||||
|
||||
///
|
||||
/// Generic allocation and similar stuff, done at beginning of image load,
|
||||
/// as soon as size is known.
|
||||
|
||||
@ -229,6 +229,8 @@ void Set_frame_duration(T_IO_Context *context, int duration);
|
||||
int Get_frame_duration(T_IO_Context *context);
|
||||
/// Function to set a specific image mode
|
||||
void Set_image_mode(T_IO_Context *context, enum IMAGE_MODES mode);
|
||||
/// get the current image mode
|
||||
enum IMAGE_MODES Get_image_mode(T_IO_Context *context);
|
||||
|
||||
// =================================================================
|
||||
// What follows here are the definitions of functions and data
|
||||
|
||||
@ -5768,7 +5768,7 @@ void Load_FLI(T_IO_Context * context)
|
||||
else
|
||||
{
|
||||
Set_loading_layer(context, current_frame);
|
||||
if (context->Type == CONTEXT_MAIN_IMAGE && Main.backups->Pages->Image_mode == IMAGE_MODE_ANIMATION)
|
||||
if (context->Type == CONTEXT_MAIN_IMAGE && Get_image_mode(context) == IMAGE_MODE_ANIMATION)
|
||||
{
|
||||
// Copy the content of previous frame
|
||||
memcpy(
|
||||
|
||||
@ -84,6 +84,11 @@ void Set_image_mode(T_IO_Context *context, enum IMAGE_MODES mode)
|
||||
printf("Set_image_mode(%p, %d)\n", context, mode);
|
||||
}
|
||||
|
||||
enum IMAGE_MODES Get_image_mode(T_IO_Context *context)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
void Set_frame_duration(T_IO_Context *context, int duration)
|
||||
{
|
||||
printf("Set_frame_duration(%p, %d)\n", context, duration);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user