Brushes are now saved in gfx2.cfg. Fix a severe bug in gfx2.cfg format: in Settings screen, the button 'Reload' was readign the file incorrectly, which caused (for example) the keyboard shortcut to 'Scroll Up' to disappear.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1481 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2010-05-18 00:07:06 +00:00
parent 3c391bc3af
commit a84a9b7e66
13 changed files with 278 additions and 260 deletions

View File

@@ -574,7 +574,6 @@ int Init_program(int argc,char * argv[])
// Données sur le pinceau:
Paintbrush_X=0;
Paintbrush_Y=0;
Paintbrush_shape=PAINTBRUSH_SHAPE_ROUND;
Paintbrush_hidden=0;
// On initialise tout ce qui concerne les opérations et les effets
@@ -634,6 +633,18 @@ int Init_program(int argc,char * argv[])
Windows_open=0;
// Paintbrush
if (!(Paintbrush_sprite=(byte *)malloc(MAX_PAINTBRUSH_SIZE*MAX_PAINTBRUSH_SIZE))) Error(ERROR_MEMORY);
// Load preset paintbrushes (uses Paintbrush_ variables)
Init_paintbrushes();
// Set a valid paintbrush afterwards
*Paintbrush_sprite=1;
Paintbrush_width=1;
Paintbrush_height=1;
Paintbrush_shape=PAINTBRUSH_SHAPE_ROUND;
// Charger la configuration des touches
Set_config_defaults();
@@ -701,11 +712,6 @@ int Init_program(int argc,char * argv[])
if (!(Brush =(byte *)malloc( 1* 1))) Error(ERROR_MEMORY);
if (!(Smear_brush =(byte *)malloc(MAX_PAINTBRUSH_SIZE*MAX_PAINTBRUSH_SIZE))) Error(ERROR_MEMORY);
// Pinceau
if (!(Paintbrush_sprite=(byte *)malloc(MAX_PAINTBRUSH_SIZE*MAX_PAINTBRUSH_SIZE))) Error(ERROR_MEMORY);
*Paintbrush_sprite=1;
Paintbrush_width=1;
Paintbrush_height=1;
starting_videomode=Current_resolution;
Horizontal_line_buffer=NULL;