GrafX2 2.9.3227
The ultimate 256-color painting program
|
Some C64 video mode related functions. More...
Functions | |
int | C64_FLI (T_IO_Context *context, byte *bitmap, byte *screen_ram, byte *color_ram, byte *background) |
Save a 3 layer picture to C64 FLI format. More... | |
int | C64_pixels_to_FLI (byte *bitmap, byte *screen_ram, byte *color_ram, byte *background, const byte *pixels, long pitch, int errmode) |
Convert a (1 layer) picture to C64 FLI format. More... | |
void | C64_set_palette (T_Components *palette) |
Set the 16 colors Commodore 64 palette. More... | |
Some C64 video mode related functions.
int C64_FLI | ( | T_IO_Context * | context, |
byte * | bitmap, | ||
byte * | screen_ram, | ||
byte * | color_ram, | ||
byte * | background | ||
) |
Save a 3 layer picture to C64 FLI format.
context | the Save context |
bitmap | a 8000 byte buffer to store bitmap data |
screen_ram | a 8192 byte buffer to store the 8 screen RAMs |
color_ram | a 1000 byte buffer to store the color RAM |
background | a 200 byte buffer to store the background colors |
References count_set_bits(), Get_pixel(), T_IO_Context::Height, T_IO_Context::Nb_layers, NULL, Set_saving_layer(), and T_IO_Context::Width.
Referenced by Save_C64_fli().
int C64_pixels_to_FLI | ( | byte * | bitmap, |
byte * | screen_ram, | ||
byte * | color_ram, | ||
byte * | background, | ||
const byte * | pixels, | ||
long | pitch, | ||
int | errmode | ||
) |
Convert a (1 layer) picture to C64 FLI format.
Some "hints" can be put in background and color_ram. (a color value >= 16 means no hint).
Errors can be either outputed to the user with Warning messages, or put in layer 4. The layer 4 has to be created before.
bitmap | a 8000 byte buffer to store bitmap data |
screen_ram | a 8192 byte buffer to store the 8 screen RAMs |
color_ram | a 1000 byte buffer to store the color RAM |
background | a 200 byte buffer to store the background colors |
pixels | source pixel buffer (at least 160x200) |
pitch | bytes per line of the pixel buffer |
errmode | error reporting mode 0 = report, 1 = mark in layer 4 |
References T_Document::backups, count_set_bits(), count_trailing_zeros(), GFX2_DEBUG, GFX2_INFO, GFX2_Log(), Main, T_Page::Nb_layers, T_List_of_pages::Pages, Pixel_in_layer(), and Warning_with_format().
Referenced by Button_Constraint_mode(), and Save_C64_fli_monolayer().
void C64_set_palette | ( | T_Components * | palette | ) |
Set the 16 colors Commodore 64 palette.
Set C64 Palette from http://www.pepto.de/projects/colorvic/
Also set transparent color "16" as a dark grey that is distinguishable from black, but darker than normal colors.
set color "17" as RED to see color clashes
References T_Components::B, T_Components::G, and T_Components::R.
Referenced by Button_Constraint_menu(), Load_C64(), Load_GPX(), and Load_PRG().