GrafX2 2.9.3227
The ultimate 256-color painting program
|
helper functions for load/save More...
Macros | |
#define | Write_one_byte(file, b) do { if (!Write_byte(file,(b))) File_error=1; } while (0) |
Functions | |
FILE * | Open_file_write (T_IO_Context *context) |
For use by Save_XXX() functions. More... | |
FILE * | Open_file_read (T_IO_Context *context) |
For use by Load_XXX() and Test_XXX() functions. More... | |
FILE * | Open_file_read_with_alternate_ext (T_IO_Context *context, const char *ext) |
For use by Load_XXX() and Test_XXX() functions. More... | |
void | Remove_file (T_IO_Context *context) |
For use by Save_XXX() functions. More... | |
FILE * | Open_file_write_with_alternate_ext (T_IO_Context *context, const char *ext) |
For use by Save_XXX() functions. More... | |
void | Palette_256_to_64 (T_Palette palette) |
void | Palette_64_to_256 (T_Palette palette) |
word | Current_layer_count_used_colors (T_IO_Context *context, dword *usage) |
helper functions for load/save
#define Write_one_byte | ( | file, | |
b | |||
) | do { if (!Write_byte(file,(b))) File_error=1; } while (0) |
FILE * Open_file_write | ( | T_IO_Context * | context | ) |
For use by Save_XXX() functions.
References T_IO_Context::File_directory, T_IO_Context::File_name, T_IO_Context::File_name_unicode, Filepath_append_to_dir(), GFX2_ERROR, GFX2_Log(), GFX2_malloc, NULL, PATH_SEPARATOR, Unicode_char_strlcat(), Unicode_char_strlcpy(), Unicode_strlcat(), and Unicode_strlen().
Referenced by Save_2GS(), Save_BMP(), Save_C64_fli(), Save_C64_fli_monolayer(), Save_C64_hires(), Save_C64_multi(), Save_CA1(), Save_CEL(), Save_CM5(), Save_GIF(), Save_GOS(), Save_GPL(), Save_HGR(), Save_ICO(), Save_IFF(), Save_IMG(), Save_KCF(), Save_MOTO(), Save_MSX(), Save_NEO(), Save_PAL(), Save_PC1(), Save_PCX(), Save_PI1(), Save_PKM(), Save_PNG(), Save_PRG(), Save_SCR(), Save_SCx(), Save_SGX(), Save_TNY(), and Save_XPM().
FILE * Open_file_read | ( | T_IO_Context * | context | ) |
For use by Load_XXX() and Test_XXX() functions.
References T_IO_Context::File_directory, T_IO_Context::File_name, and Filepath_append_to_dir().
Referenced by Init_program(), Load_2GS(), Load_BMP(), Load_C64(), Load_CA1(), Load_CEL(), Load_CM5(), Load_FLI(), Load_GIF(), Load_GOS(), Load_GPL(), Load_GPX(), Load_GRB(), Load_HGR(), Load_ICO(), Load_IFF(), Load_image(), Load_IMG(), Load_INFO(), Load_KCF(), Load_MOTO(), Load_MSX(), Load_NEO(), Load_PAL(), Load_PC1(), Load_PCX(), Load_PI1(), Load_PKM(), Load_PNG(), Load_PPH(), Load_PRG(), Load_Recoil_Image(), Load_SCR(), Load_SCx(), Load_SGX(), Load_TIFF(), and Load_TNY().
FILE * Open_file_read_with_alternate_ext | ( | T_IO_Context * | context, |
const char * | ext | ||
) |
For use by Load_XXX() and Test_XXX() functions.
References T_Find_alternate_ext_data::basename, T_Find_alternate_ext_data::basename_unicode, T_Find_alternate_ext_data::ext, T_IO_Context::File_directory, T_IO_Context::File_name, T_IO_Context::File_name_unicode, Filepath_append_to_dir(), For_each_directory_entry(), T_Find_alternate_ext_data::foundname, T_Find_alternate_ext_data::foundname_unicode, GFX2_ERROR, GFX2_Log(), GFX2_malloc, Look_for_alternate_ext(), NULL, and Unicode_strlen().
Referenced by Load_CM5(), Load_GOS(), Load_PPH(), Load_SCR(), RECOIL_ReadFile(), Test_CM5(), Test_GOS(), Test_PPH(), and Test_SCR().
void Remove_file | ( | T_IO_Context * | context | ) |
For use by Save_XXX() functions.
References T_IO_Context::File_directory, T_IO_Context::File_name, Filepath_append_to_dir(), and Remove_path().
Referenced by Save_BMP(), Save_CEL(), Save_GIF(), Save_GPL(), Save_ICO(), Save_IFF(), Save_IMG(), Save_KCF(), Save_NEO(), Save_PAL(), Save_PC1(), Save_PCX(), Save_PI1(), Save_PKM(), Save_PNG(), Save_SCx(), and Save_TNY().
FILE * Open_file_write_with_alternate_ext | ( | T_IO_Context * | context, |
const char * | ext | ||
) |
For use by Save_XXX() functions.
References T_IO_Context::File_directory, T_IO_Context::File_name, T_IO_Context::File_name_unicode, Filepath_append_to_dir(), GFX2_malloc, NULL, PATH_SEPARATOR, Unicode_char_strlcat(), Unicode_char_strlcpy(), Unicode_strlcat(), and Unicode_strlen().
Referenced by Save_CM5(), Save_GOS(), and Save_SCR().
void Palette_256_to_64 | ( | T_Palette | palette | ) |
Referenced by Save_PKM(), and Save_SCx().
void Palette_64_to_256 | ( | T_Palette | palette | ) |
Referenced by Load_PAL(), Load_PKM(), and Load_SCx().
word Current_layer_count_used_colors | ( | T_IO_Context * | context, |
dword * | usage | ||
) |
References Get_pixel(), T_IO_Context::Height, and T_IO_Context::Width.
Referenced by Save_SGX().