GrafX2 2.9.3227
The ultimate 256-color painting program
|
Functions | |
unsigned char * | raw2crtc (T_IO_Context *context, unsigned char mode, unsigned char r9, unsigned long *outSize, unsigned char *r1, unsigned char r12, unsigned char r13) |
void | CPC_set_HW_palette (T_Components *palette) |
Set 32 color HW Amstrad CPC palette. More... | |
int | CPC_is_CPC_old_color (T_Components *col) |
Check if the color is likely to be a CPC RGB tri level color. More... | |
void | CPC_set_default_BASIC_palette (T_Components *palette) |
Set 16 color default Amstrad CPC BASIC palette. More... | |
int | CPC_compare_colors (T_Components *col1, T_Components *col2) |
compare two RGB colors More... | |
byte | CPC_Firmware_to_Hardware_color (byte fw_color) |
Convert CPC firmware color to hardware color (Gate Array) More... | |
int | CPC_check_AMSDOS (FILE *file, word *loading_address, word *exec_address, unsigned long *file_length) |
Check AMSDOS header. More... | |
int | CPC_write_AMSDOS_header (FILE *file, const char *filename, const char *ext, byte type, word load_address, word save_address, word file_length) |
Write AMSDOS header. More... | |
unsigned char * raw2crtc | ( | T_IO_Context * | context, |
unsigned char | mode, | ||
unsigned char | r9, | ||
unsigned long * | outSize, | ||
unsigned char * | r1, | ||
unsigned char | r12, | ||
unsigned char | r13 | ||
) |
References addrCalc(), GFX2_DEBUG, GFX2_ERROR, GFX2_Log(), GFX2_malloc, T_IO_Context::Height, mode, mode0interlace(), mode1interlace(), mode2interlace(), mode3interlace(), NULL, and T_IO_Context::Width.
Referenced by Save_GOS(), and Save_SCR().
void CPC_set_HW_palette | ( | T_Components * | palette | ) |
Set 32 color HW Amstrad CPC palette.
The palette is in fact 27 colors, with some duplicates. http://www.cpcwiki.eu/index.php/CPC_Palette
References CPC_Hw_Palette.
Referenced by Button_Constraint_menu(), Load_CM5(), Load_GOS(), Load_SCR(), and Save_SCR().
int CPC_is_CPC_old_color | ( | T_Components * | col | ) |
Check if the color is likely to be a CPC RGB tri level color.
References T_Components::B, T_Components::G, and T_Components::R.
Referenced by Save_SCR().
void CPC_set_default_BASIC_palette | ( | T_Components * | palette | ) |
Set 16 color default Amstrad CPC BASIC palette.
in the default CPC Basic palette, INKs 14 and 15 are blinking, so that would be great to include theses in the colorcycling, but I don't see any way to make these blinking colors with the way GrafX2 handles color cycling
References CPC_Hw_Palette.
Referenced by Button_Constraint_menu().
int CPC_compare_colors | ( | T_Components * | col1, |
T_Components * | col2 | ||
) |
compare two RGB colors
The RGB colors are compared in order as if they were converted from CPC (27 color palette), as there are several mapping of the 3 level CPC RGB signals.
The mapping used in this function is :
References T_Components::B, T_Components::G, and T_Components::R.
Referenced by Save_SCR(), and Test_CPC_compare_colors().
Convert CPC firmware color to hardware color (Gate Array)
fw_color | a CPC Firmware color index (from 0 to 26) |
References CPC_Firmware_Colors.
Referenced by Load_SCR().
int CPC_check_AMSDOS | ( | FILE * | file, |
word * | loading_address, | ||
word * | exec_address, | ||
unsigned long * | file_length | ||
) |
Check AMSDOS header.
see http://www.cpcwiki.eu/index.php/AMSDOS_Header
[in] | file | an open file |
[out] | loading_address | the loading address from the header |
[out] | exec_address | the execution address from the header |
[out] | file_length | the file length written in the header |
References GFX2_DEBUG, GFX2_INFO, GFX2_Log(), and Read_bytes().
Referenced by Load_CM5(), Load_GOS(), Load_SCR(), Test_CM5(), Test_GOS(), and Test_SCR().
int CPC_write_AMSDOS_header | ( | FILE * | file, |
const char * | filename, | ||
const char * | ext, | ||
byte | type, | ||
word | load_address, | ||
word | save_address, | ||
word | file_length | ||
) |
Write AMSDOS header.
References GFX2_DEBUG, GFX2_LogHexDump(), and Write_bytes().
Referenced by Save_SCR().