Remove some static length strings

There are too many MAX_PATH_CHARACTERS length string.
make Initial_directory, Data_directory, Config_directory
dynamically allocated.
This commit is contained in:
Thomas Bernard
2019-01-14 12:19:47 +01:00
parent 0c2ee6659a
commit f5cc3a0aba
6 changed files with 157 additions and 93 deletions

View File

@@ -612,11 +612,11 @@ GFX2_GLOBAL byte Airbrush_multi_flow[256];
/// Boolean, set to true to exit the program.
GFX2_GLOBAL byte Quitting;
/// Name of the directory that was current when the program was run.
GFX2_GLOBAL char Initial_directory[MAX_PATH_CHARACTERS];
GFX2_GLOBAL char * Initial_directory;
/// Name of the directory that holds the program's (read-only) data: skins, icon, etc.
GFX2_GLOBAL char Data_directory[MAX_PATH_CHARACTERS];
GFX2_GLOBAL char * Data_directory;
/// Name of the directory where grafx2 reads and writes configuration (gfx2.ini, gfx2.cfg)
GFX2_GLOBAL char Config_directory[MAX_PATH_CHARACTERS];
GFX2_GLOBAL char * Config_directory;
/// Current foreground color for drawing.
GFX2_GLOBAL byte Fore_color;
/// Current background color for drawing.