Add a gfx2.ini parameter to set the gamma for Thomson MO/TO palettes
This commit is contained in:
parent
cd15c4197b
commit
6189b43917
@ -416,5 +416,10 @@
|
||||
; is animation frames.
|
||||
;
|
||||
Default_mode_layers = no; (Default no)
|
||||
|
||||
; Set the gamma value used to translate palettes from Thomson MO/TO
|
||||
; pictures. 10 is 1.0, 22 is 2.2 etc.
|
||||
;
|
||||
MOTO_gamma = 28; (Default 28)
|
||||
|
||||
; end of configuration
|
||||
|
||||
@ -1011,7 +1011,7 @@ void Button_Settings(int btn)
|
||||
{" --- Format options ---",0,NULL,0,0,0,NULL},
|
||||
{"Screen size in GIF:",1,&(selected_config.Screen_size_in_GIF),0,1,0,Lookup_YesNo},
|
||||
{"Clear palette:",1,&(selected_config.Clear_palette),0,1,0,Lookup_YesNo},
|
||||
{"",0,NULL,0,0,0,NULL},
|
||||
{"MO6/TO8 palette gamma",1,&(selected_config.MOTO_gamma),10,30,2,NULL},
|
||||
{"",0,NULL,0,0,0,NULL},
|
||||
{"",0,NULL,0,0,0,NULL},
|
||||
{"",0,NULL,0,0,0,NULL},
|
||||
|
||||
@ -1048,6 +1048,13 @@ int Load_INI(T_Config * conf)
|
||||
{
|
||||
conf->Default_mode_layers=(values[0]!=0);
|
||||
}
|
||||
|
||||
conf->MOTO_gamma=28;
|
||||
// Optional, gamma value used for palette of load/save Thomson MO/TO pictures (>=2.6)
|
||||
if (!Load_INI_get_values (file,buffer,"MOTO_gamma",1,values))
|
||||
{
|
||||
conf->MOTO_gamma=(byte)values[0];
|
||||
}
|
||||
|
||||
// Insert new values here
|
||||
|
||||
|
||||
@ -754,6 +754,10 @@ int Save_INI(const T_Config * conf)
|
||||
if ((return_code=Save_INI_set_values (old_file,new_file,buffer,"Default_mode_layers",1,values,1)))
|
||||
goto Erreur_Retour;
|
||||
|
||||
values[0]=conf->MOTO_gamma;
|
||||
if ((return_code=Save_INI_set_values (old_file,new_file,buffer,"MOTO_gamma",1,values,0)))
|
||||
goto Erreur_Retour;
|
||||
|
||||
// Insert new values here
|
||||
|
||||
Save_INI_flush(old_file,new_file,buffer);
|
||||
|
||||
@ -379,6 +379,7 @@ typedef struct
|
||||
byte Tilemap_show_count; ///< Boolean, true if the Tilemap tool should display tile count after analysis.
|
||||
byte Use_virtual_keyboard; ///< 0: Auto, 1: On, 2: Off
|
||||
byte Default_mode_layers; ///< Indicates if default new image has layers (alternative is animation)
|
||||
byte MOTO_gamma; ///< Number, 10 x the Gamma used for converting MO6/TO8/TO9 palette
|
||||
|
||||
} T_Config;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user