35#if defined(__d32b__) || defined(__d64b__) || defined(__cocob__)
40static RGBi SYSTEM_PALETTE_ALTERNATE[][4] = {
42 { 0x00, 0xcc, 0x55, 0xff, 0,
"GREEN" },
43 { 0xee, 0xee, 0x77, 0xff, 1,
"YELLOW" },
44 { 0x00, 0x00, 0xaa, 0xff, 2,
"BLUE" },
45 { 0x88, 0x00, 0x00, 0xff, 3,
"RED" }
48 { 0x00, 0x00, 0x00, 0xff, 0,
"BLACK" },
49 { 0xf0, 0xf0, 0xf0, 0xff, 5,
"BUFF" },
50 { 0xaa, 0xff, 0xe6, 0xff, 6,
"CYAN" },
51 { 0xcc, 0x44, 0xcc, 0xff, 7,
"MAGENTA" }
56static RGBi * SYSTEM_PALETTE = &SYSTEM_PALETTE_ALTERNATE[0][0];
58static RGBi * commonPalette;
108 outline1(
"LDA %s", _border_color );
136 outline1(
"LDA %s", _background_color );
216#define SET_VIDEOAT_ZERO SAM_F0_CLR; SAM_F1_CLR; SAM_F2_CLR; SAM_F3_CLR; SAM_F4_CLR; SAM_F5_CLR; SAM_F6_CLR;
218#define SET_VIDEOAT_0400 SET_VIDEOAT_ZERO; SAM_F1_SET;
219#define SET_VIDEOAT_1C00 SET_VIDEOAT_ZERO; SAM_F2_SET; SAM_F3_SET; SAM_F4_SET;
223 int consoleSA = 0x0c00;
294 switch( _screen_mode->
id ) {
741 outline0(
"JSR C6847bVIDEOSTARTATB" );
752 outline0(
"JSR C6847bVIDEOSTARTATT" );
761 outline1(
"LDX %4.4x", (_x & 0xffff ) );
763 outline1(
"LDD %4.4x", ( _y & 0xffff ) );
766 outline1(
"LDA %2.2x", ( *_c & 0Xff ) );
931 deploy( clsText, src_hw_6847b_cls_text_asm );
934 deploy( clsGraphic, src_hw_6847b_cls_graphic_asm );
945 deploy( clsBox, src_hw_6847b_cls_box_asm );
963 outline1(
"LDA #$%2.2x", ( _direction & 0xff ) );
965 outline1(
"LDA #$%2.2x", ( _overlap & 0xff ) );
970 outline1(
"LDA #$%2.2x", ( _direction & 0xff ) );
972 outline1(
"LDA #$%2.2x", ( _overlap & 0xff ) );
982 deploy( textEncodedAt, src_hw_6847b_text_at_asm );
991 deploy( clsText, src_hw_6847b_cls_text_asm );
993 deploy( textEncodedAtTextRaw, src_hw_6847b_text_at_text_raw_asm );
996 deploy( clsGraphic, src_hw_6847b_cls_graphic_asm );
997 deploy( vScroll, src_hw_6847b_vscroll_graphic_asm );
998 deploy( textEncodedAtGraphicRaw, src_hw_6847b_text_at_graphic_raw_asm );
999 outline0(
"JSR TEXTATBITMAPMODERAW");
1003 deploy( clsText, src_hw_6847b_cls_text_asm );
1005 deploy( textEncodedAtText, src_hw_6847b_text_at_text_asm );
1008 deploy( clsGraphic, src_hw_6847b_cls_graphic_asm );
1009 deploy( vScroll, src_hw_6847b_vscroll_graphic_asm );
1010 deploy( textEncodedAtGraphic, src_hw_6847b_text_at_graphic_asm );
1020 deploy( c6847bstartup, src_hw_6847b_startup_asm );
1115 deploy( clsText, src_hw_6847b_cls_text_asm );
1123 copperList = copperList->
next;
1134 outline1(
"LDA #$%2.2x", ( _direction & 0xff ) );
1136 outline1(
"LDA #$%2.2x", ( _overlap & 0xff ) );
1149 outline1(
"LDA #$%2.2x", ( _direction & 0xff ) );
1151 outline1(
"LDA #$%2.2x", ( _overlap & 0xff ) );
1167 if ( _characters ) {
1179 deploy( textCline, src_hw_6847b_cline_text_asm );
1182 deploy( textClineGraphic, src_hw_6847b_cline_graphic_asm );
1204 return 3 + ( ( _width >> 2 ) * _height );
1206 return 2 + ( ( _width >> 2 ) * _height );
1213 if ( _transparent ) {
1214 return 3 + 2*( ( _width >> 3 ) * _height );
1216 return 3 + ( ( _width >> 3 ) * _height );
1219 return 2 + ( ( _width >> 3 ) * _height );
1228static int calculate_images_size(
Environment * _environment,
int _frames,
int _width,
int _height,
int _mode,
int _transparent ) {
1244 return 3 + ( 3 + ( ( _width >> 2 ) * _height ) ) * _frames;
1246 return 3 + ( 2 + ( ( _width >> 2 ) * _height ) ) * _frames;
1253 if ( _transparent ) {
1254 return 3 + ( 3 + 2* ( ( _width >> 3 ) * _height ) ) * _frames;
1256 return 3 + ( 3 + ( ( _width >> 3 ) * _height ) ) * _frames;
1259 return 3 + ( 2 + ( ( _width >> 3 ) * _height ) ) * _frames;
1268static int calculate_sequence_size(
Environment * _environment,
int _sequences,
int _frames,
int _width,
int _height,
int _mode,
int _transparent ) {
1284 return 3 + ( ( 3 + ( ( _width >> 2 ) * _height ) ) * _frames ) * _sequences;
1286 return 3 + ( ( 2 + ( ( _width >> 2 ) * _height ) ) * _frames ) * _sequences;
1293 if ( _transparent ) {
1294 return 3 + ( ( 3 + 2 * ( ( _width >> 3 ) * _height ) ) * _frames ) * _sequences;
1296 return 3 + ( ( 3 + ( ( _width >> 3 ) * _height ) ) * _frames ) * _sequences;
1299 return 3 + ( ( 2 + ( ( _width >> 3 ) * _height ) ) * _frames ) * _sequences;
1308static Variable * c6847b_image_converter_bitmap_mode_standard(
Environment * _environment,
char * _source,
int _width,
int _height,
int _depth,
int _offset_x,
int _offset_y,
int _frame_width,
int _frame_height,
int _transparent_color,
int _flags ) {
1311 (void)!_transparent_color;
1313 RGBi white = { 0xff, 0xff, 0xff, 0xff };
1314 RGBi black = { 0x00, 0x00, 0x00, 0xff };
1317 (void)!_transparent_color;
1323 _width = ( ( ( _width - 1 ) / 8 ) - 1 ) * 8;
1325 if ( _frame_width % 8 ) {
1326 _frame_width = ( ( ( _frame_width - 1 ) / 8 ) - 1 ) * 8;
1334 if (paletteColorCount > 3) {
1338 if ( _transparent_color == 0 ) {
1339 for(
int i=0; i<3; ++i ) {
1340 if ( palette[i].alpha < 255 ) {
1341 _transparent_color = 0x0f0000;
1349 SYSTEM_PALETTE = &SYSTEM_PALETTE_ALTERNATE[_environment->
paletteSelected][0];
1351 commonPalette =
palette_match( palette, paletteColorCount, SYSTEM_PALETTE,
sizeof(SYSTEM_PALETTE_ALTERNATE[0]) /
sizeof(
RGBi) );
1356 adilinepalette(
"CPMS:%d", (
int)(
sizeof(SYSTEM_PALETTE_ALTERNATE[0]) /
sizeof(
RGBi)), SYSTEM_PALETTE );
1367 char * buffer =
malloc ( bufferSize );
1368 memset( buffer, 0, bufferSize );
1371 int image_x, image_y;
1382 *(buffer) = _frame_width;
1383 *(buffer+1) = _frame_height;
1385 *(buffer+2) = (_transparent_color & 0x0f0000) ? 0x01 : 0x00;
1388 _source += ( ( _offset_y * _width ) + _offset_x ) * _depth;
1395 for (image_y = 0; image_y < _frame_height; ++image_y) {
1396 for (image_x = 0; image_x < _frame_width; ++image_x) {
1400 rgb.
green = *(_source + 1);
1401 rgb.
blue = *(_source + 2);
1403 rgb.
alpha = *(_source + 3);
1407 if ( rgb.
alpha == 0 ) {
1418 int minDistance = 9999;
1419 for(
int i=0; i<2; ++i ) {
1433 offset = ( image_y * ( _frame_width >> 3 ) ) + ( image_x >> 3 );
1434 bitmask = 1 << ( 7 - (image_x & 0x7) );
1436 if ( colorIndex > 0) {
1438 *( buffer +
offset + 3) |= bitmask;
1440 *( buffer +
offset + 2) |= bitmask;
1445 *( buffer +
offset + 3) &= ~bitmask;
1447 *( buffer +
offset + 2) &= ~bitmask;
1452 if ( _transparent_color & 0x0f0000 ) {
1453 if ( rgb.
alpha == 0 ) {
1455 *( buffer + ( _frame_height * ( _frame_width >> 3 ) ) +
offset + 3) |= bitmask;
1457 *( buffer + ( _frame_height * ( _frame_width >> 3 ) ) +
offset + 2) |= bitmask;
1462 *( buffer + ( _frame_height * ( _frame_width >> 3 ) ) +
offset + 3) &= ~bitmask;
1464 *( buffer + ( _frame_height * ( _frame_width >> 3 ) ) +
offset + 2) &= ~bitmask;
1476 _source += ( _width - _frame_width ) * _depth;
1494static Variable * c6847b_image_converter_multicolor_mode_standard(
Environment * _environment,
char * _source,
int _width,
int _height,
int _depth,
int _offset_x,
int _offset_y,
int _frame_width,
int _frame_height,
int _transparent_color,
int _flags ) {
1496 RGBi white = { 0xff, 0xff, 0xff, 0xff };
1497 RGBi black = { 0x00, 0x00, 0x00, 0x00 };
1500 (void)!_transparent_color;
1506 _width = ( ( ( _width - 1 ) / 8 ) - 1 ) * 8;
1508 if ( _frame_width % 8 ) {
1509 _frame_width = ( ( ( _frame_width - 1 ) / 8 ) - 1 ) * 8;
1517 if (paletteColorCount > 4) {
1523 SYSTEM_PALETTE = &SYSTEM_PALETTE_ALTERNATE[_environment->
paletteSelected][0];
1525 commonPalette =
palette_match( palette, paletteColorCount, SYSTEM_PALETTE,
sizeof(SYSTEM_PALETTE_ALTERNATE[0]) /
sizeof(
RGBi) );
1530 adilinepalette(
"CPMS:%d", (
int)(
sizeof(SYSTEM_PALETTE_ALTERNATE[0]) /
sizeof(
RGBi)), SYSTEM_PALETTE );
1540 char * buffer =
malloc ( bufferSize );
1541 memset( buffer, 0, bufferSize );
1544 int image_x, image_y;
1550 int offset, offsetc, bitmask;
1555 *(buffer) = _frame_width;
1556 *(buffer+1) = _frame_height;
1559 _source += ( ( _offset_y * _width ) + _offset_x ) * _depth;
1564 for (image_y = 0; image_y < _frame_height; ++image_y) {
1565 for (image_x = 0; image_x < _frame_width; ++image_x) {
1569 rgb.
green = *(_source + 1);
1570 rgb.
blue = *(_source + 2);
1572 rgb.
alpha = *(_source + 3);
1576 if ( rgb.
alpha == 0 ) {
1582 offset = ( image_y * ( _frame_width >> 2 ) ) + ( image_x >> 2 );
1586 if ( rgb.
alpha < 255 ) {
1589 int minDistance = 9999;
1594 colorIndex = commonPalette[i].index;
1603 bitmask = colorIndex << (6 - ((image_x & 0x3) * 2));
1605 *(buffer + 3 +
offset) |= bitmask;
1611 _source += ( _width - _frame_width ) * _depth;
1631Variable *
c6847b_image_converter(
Environment * _environment,
char * _data,
int _width,
int _height,
int _depth,
int _offset_x,
int _offset_y,
int _frame_width,
int _frame_height,
int _mode,
int _transparent_color,
int _flags ) {
1647 return c6847b_image_converter_multicolor_mode_standard( _environment, _data, _width, _height, _depth, _offset_x, _offset_y, _frame_width, _frame_height, _transparent_color, _flags );
1656 return c6847b_image_converter_bitmap_mode_standard( _environment, _data, _width, _height, _depth, _offset_x, _offset_y, _frame_width, _frame_height, _transparent_color, _flags );
1666static void c6847b_load_image_address_to_register(
Environment * _environment,
char * _register,
Resource * _source,
char * _sequence,
char * _frame,
int _frame_size,
int _frame_count ) {
1668 if ( !_sequence && !_frame ) {
1686 if ( strlen(_sequence) == 0 ) {
1692 if ( strlen(_frame) == 0 ) {
1701 if ( strlen(_frame) == 0 ) {
1715void c6847b_blit_image(
Environment * _environment,
char * _sources[],
int _source_count,
char * _blit,
char * _x,
char * _y,
char * _frame,
char * _sequence,
int _frame_size,
int _frame_count,
int _flags ) {
1718 deploy( blitimage, src_hw_6847b_blit_image_asm );
1720 if ( _source_count > 2 ) {
1729 outline0(
"STY BLITIMAGEBLITADDR" );
1731 if ( _source_count > 0 ) {
1733 resource.
realName = strdup( _sources[0] );
1736 c6847b_load_image_address_to_register( _environment,
"BLITTMPPTR", &resource, _sequence, _frame, _frame_size, _frame_count );
1742 if ( _source_count > 1 ) {
1744 resource.
realName = strdup( _sources[1] );
1747 c6847b_load_image_address_to_register( _environment,
"BLITTMPPTR2", &resource, _sequence, _frame, _frame_size, _frame_count );
1758 outline1(
"LDA #$%2.2x", ( _flags & 0xff ) );
1760 outline1(
"LDA #$%2.2x", ( (_flags>>8) & 0xff ) );
1770 deploy( putimage, src_hw_6847b_put_image_asm );
1778 if ( _frame_size ) {
1779 if ( !_sequence && !_frame ) {
1783 if ( strlen(_sequence) == 0 ) {
1789 if ( strlen(_frame) == 0 ) {
1798 if ( strlen(_frame) == 0 ) {
1833 memset( buffer, 0,
size );
1836 *(buffer+1) = _height;
1848 int size = calculate_images_size( _environment, _frames, _width, _height, _mode, 0 );
1858 memset( buffer, 0,
size );
1860 *(buffer) = _frames;
1861 *(buffer+1) = ( _width & 0xff );
1862 *(buffer+2) = ( _width >> 8 ) & 0xff;
1863 for(
int i=0; i<_frames; ++i ) {
1864 *(buffer+3+(i*frameSize)) = _width;
1865 *(buffer+3+(i*frameSize)+1) = _height;
1879 int size2 = calculate_sequence_size( _environment, _sequences, _frames, _width, _height, _mode, 0 );
1880 int size = calculate_images_size( _environment, _frames, _width, _height, _mode, 0 );
1889 char * buffer =
malloc ( size2 );
1890 memset( buffer, 0, size2 );
1892 *(buffer) = _frames;
1893 *(buffer+1) = _width;
1894 *(buffer+2) = _sequences;
1895 for(
int i=0; i<(_frames * _sequences); ++i ) {
1896 *(buffer+3+(i*frameSize)) = _width;
1897 *(buffer+3+(i*frameSize)+1) = _height;
1902 result->
size = size2;
1909void c6847b_get_image(
Environment * _environment,
char * _image,
char * _x,
char * _y,
char * _frame,
char * _sequence,
int _frame_size,
int _frame_count,
int _palette ) {
1912 deploy( getimage, src_hw_6847b_get_image_asm );
1917 if ( strlen(_sequence) == 0 ) {
1919 outline1(
"LDX #OFFSETS%4.4x", _frame_count * _frame_size );
1928 if ( strlen(_frame) == 0 ) {
1930 outline1(
"LDX #OFFSETS%4.4x", _frame_size );
1942 if ( strlen(_frame) == 0 ) {
1944 outline1(
"LDX #OFFSETS%4.4x", _frame_size );
1959 outline1(
"LDA #$%2.2x", _palette );
2009 SYSTEM_PALETTE = &SYSTEM_PALETTE_ALTERNATE[_environment->
paletteSelected][0];
2011 memcpy( _palette,
palette_match( _palette, paletteColorCount, SYSTEM_PALETTE,
sizeof(SYSTEM_PALETTE) /
sizeof(
RGBi) ), paletteColorCount *
sizeof(
RGBi ) );
2013 int uniquePaletteCount = 0;
2017 return uniquePaletteCount;
2026 if ( strlen(_sequence) == 0 ) {
2028 outline1(
"LDX #OFFSETS%4.4x", _frame_count * _frame_size );
2037 if ( strlen(_frame) == 0 ) {
2039 outline1(
"LDX #OFFSETS%4.4x", _frame_size );
2051 if ( strlen(_frame) == 0 ) {
2053 outline1(
"LDX #OFFSETS%4.4x", _frame_size );
2072 if ( strcmp( _direction,
"#FLIPIMAGEDIRECTION0001" ) == 0 || strcmp( _direction,
"#FLIPIMAGEDIRECTION0003" ) == 0 ) {
2073 c6847b_load_image_address_to_register( _environment,
"TMPPTR", _image, _sequence, _frame, _frame_size, _frame_count );
2074 deploy( flipimagex, src_hw_6847b_flip_image_x_asm );
2080 c6847b_load_image_address_to_register( _environment,
"TMPPTR", _image, _sequence, _frame, _frame_size, _frame_count );
2081 deploy( flipimagex, src_hw_6847b_flip_image_x_asm );
2090 if ( strcmp( _direction,
"#FLIPIMAGEDIRECTION0002" ) == 0 || strcmp( _direction,
"#FLIPIMAGEDIRECTION0003" ) == 0 ) {
2091 c6847b_load_image_address_to_register( _environment,
"TMPPTR", _image, _sequence, _frame, _frame_size, _frame_count );
2092 deploy( flipimagey, src_hw_6847b_flip_image_y_asm );
2098 c6847b_load_image_address_to_register( _environment,
"TMPPTR", _image, _sequence, _frame, _frame_size, _frame_count );
2099 deploy( flipimagey, src_hw_6847b_flip_image_y_asm );
2112 deploy( screen, src_hw_6847b_screen_asm);
void cpu_store_16bit(Environment *_environment, char *_destination, int _value)
CPU 6309: emit code to store 16 bit
void cpu_move_16bit(Environment *_environment, char *_source, char *_destination)
CPU 6309: emit code to move 16 bit
void cpu_store_8bit(Environment *_environment, char *_destination, int _value)
CPU 6309: emit code to store 8 bit
int lastUsedSlotInCommonPalette
#define BITMAP_MODE_RESOLUTION6
#define BITMAP_MODE_RESOLUTION2
#define BITMAP_MODE_COLOR2
#define BITMAP_MODE_COLOR1
#define TILEMAP_MODE_SEMIGRAPHICS6
#define TILEMAP_MODE_INTERNAL
#define BITMAP_MODE_COLOR6
#define TILEMAP_MODE_EXTERNAL
#define BITMAP_MODE_COLOR3
#define TILEMAP_MODE_SEMIGRAPHICS8
#define TILEMAP_MODE_SEMIGRAPHICS4
#define BITMAP_MODE_RESOLUTION3
#define TILEMAP_MODE_SEMIGRAPHICS12
#define BITMAP_MODE_RESOLUTION1
#define TILEMAP_MODE_SEMIGRAPHICS24
void c6847b_sprite_compress_horizontal(Environment *_environment, char *_sprite)
void c6847b_colormap_at(Environment *_environment, char *_address)
int c6847b_screen_mode_enable(Environment *_environment, ScreenMode *_screen_mode)
void c6847b_sprite_expand_vertical(Environment *_environment, char *_sprite)
void c6847b_use_tileset(Environment *_environment, char *_tileset)
void c6847b_calculate_sequence_frame_offset(Environment *_environment, char *_offset, char *_sequence, char *_frame, int _frame_size, int _frame_count)
void c6847b_sprite_monocolor(Environment *_environment, char *_sprite)
void c6847b_slice_image(Environment *_environment, char *_image, char *_frame, char *_sequence, int _frame_size, int _frame_count, char *_destination)
void c6847b_initialization(Environment *_environment)
void c6847b_sprite_data_set(Environment *_environment, char *_sprite, char *_address)
void c6847b_bitmap_disable(Environment *_environment)
void c6847b_blit_image(Environment *_environment, char *_sources[], int _source_count, char *_blit, char *_x, char *_y, char *_frame, char *_sequence, int _frame_size, int _frame_count, int _flags)
void c6847b_back(Environment *_environment)
void c6847b_screen(Environment *_environment, char *_x, char *_y, char *_c)
void c6847b_sprite_enable(Environment *_environment, char *_sprite)
Variable * c6847b_new_image(Environment *_environment, int _width, int _height, int _mode)
void c6847b_raster_at(Environment *_environment, char *_label, char *_positionlo, char *_positionhi)
VIC-II: emit code to set raster irq
void c6847b_bank_select(Environment *_environment, int _bank)
void c6847b_pget_color_vars(Environment *_environment, char *_x, char *_y, char *_result)
void c6847b_pset_int(Environment *_environment, int _x, int _y, int *_c)
void c6847b_next_raster(Environment *_environment)
VIC-II: emit code to wait for next raster irq
void c6847b_screen_rows(Environment *_environment, char *_rows)
void c6847b_move_tiles(Environment *_environment, char *_tile, char *_x, char *_y)
void c6847b_horizontal_scroll(Environment *_environment, char *_displacement)
Variable * c6847b_image_converter(Environment *_environment, char *_data, int _width, int _height, int _depth, int _offset_x, int _offset_y, int _frame_width, int _frame_height, int _mode, int _transparent_color, int _flags)
void c6847b_hscroll_line(Environment *_environment, int _direction, int _overlap)
void c6847b_text(Environment *_environment, char *_text, char *_text_size, int _raw)
void c6847b_finalization(Environment *_environment)
int c6847b_palette_extract(Environment *_environment, char *_data, int _width, int _height, int _depth, int _flags, RGBi *_palette)
void c6847b_sprite_priority(Environment *_environment, char *_sprite, char *_priority)
void c6847b_textmap_at(Environment *_environment, char *_address)
Variable * c6847b_new_sequence(Environment *_environment, int _sequences, int _frames, int _width, int _height, int _mode)
void c6847b_flip_image(Environment *_environment, Resource *_image, char *_frame, char *_sequence, int _frame_size, int _frame_count, char *_direction)
void c6847b_get_width(Environment *_environment, char *_result)
void c6847b_vertical_scroll(Environment *_environment, char *_displacement)
void c6847b_collision(Environment *_environment, char *_sprite_mask, char *_result)
VIC-II: emit code to check for collision
void c6847b_put_tile(Environment *_environment, char *_tile, char *_x, char *_y)
Variable * c6847b_new_images(Environment *_environment, int _frames, int _width, int _height, int _mode)
void c6847b_put_tiles(Environment *_environment, char *_tile, char *_x, char *_y, char *_w, char *_h)
void c6847b_screen_on(Environment *_environment)
void c6847b_bitmap_enable(Environment *_environment, int _width, int _height, int _colors)
void c6847b_cls_box(Environment *_environment, char *_x1, char *_y1, char *_w, char *_h)
void c6847b_tilemap_enable(Environment *_environment, int _width, int _height, int _colors, int _tile_width, int _tile_height)
void c6847b_screen_columns(Environment *_environment, char *_columns)
void console_calculate_vars(Environment *_environment)
void c6847b_sprite_compress_vertical(Environment *_environment, char *_sprite)
int c6847b_image_size(Environment *_environment, int _width, int _height, int _mode, int _transparent)
void c6847b_put_image(Environment *_environment, Resource *_source, char *_x, char *_y, char *_frame, char *_sequence, int _frame_size, int _frame_count, char *_flags)
void c6847b_sprite_common_color(Environment *_environment, char *_index, char *_common_color)
VIC-II: emit code to change common sprite's color
void c6847b_sprite_at(Environment *_environment, char *_sprite, char *_x, char *_y)
void c6847b_hit(Environment *_environment, char *_sprite_mask, char *_result)
VIC-II: emit code to check for collision
void c6847b_hscroll_screen(Environment *_environment, int _direction, int _overlap)
void c6847b_pset_vars(Environment *_environment, char *_x, char *_y, char *_c)
void c6847b_bitmap_at(Environment *_environment, char *_address)
void c6847b_get_image(Environment *_environment, char *_image, char *_x, char *_y, char *_frame, char *_sequence, int _frame_size, int _frame_count, int _palette)
void c6847b_sprite_expand_horizontal(Environment *_environment, char *_sprite)
void c6847b_border_color(Environment *_environment, char *_border_color)
VIC-II: emit code to change border color
void c6847b_tiles_get(Environment *_environment, char *_result)
void c6847b_get_height(Environment *_environment, char *_result)
void c6847b_next_raster_at(Environment *_environment, char *_label, char *_positionlo, char *_positionhi)
VIC-II: emit code to wait for next raster irq at different position
void c6847b_sprite_data_from(Environment *_environment, char *_sprite, char *_address)
void c6847b_screen_off(Environment *_environment)
Variable * c6847b_get_raster_line(Environment *_environment)
void c6847b_sprite_disable(Environment *_environment, char *_sprite)
void c6847b_sprite_multicolor(Environment *_environment, char *_sprite)
void c6847b_scroll(Environment *_environment, int _dx, int _dy)
void c6847b_tiles_at(Environment *_environment, char *_address)
void c6847b_sprite_color(Environment *_environment, char *_sprite, char *_color)
void c6847b_tile_at(Environment *_environment, char *_x, char *_y, char *_result)
void c6847b_background_color(Environment *_environment, char *_index, char *_background_color)
VIC-II: emit code to change background color
void c6847b_cline(Environment *_environment, char *_characters)
void console_calculate(Environment *_environment)
void c6847b_scroll_text(Environment *_environment, int _direction, int _overlap)
void c6847b_cls(Environment *_environment)
Variable * variable_retrieve(Environment *_environment, char *_name)
Variable * variable_retrieve_or_define(Environment *_environment, char *_name, VariableType _type, int _value)
int rgbi_distance(RGBi *_e1, RGBi *_e2)
Calculate the distance between two colors.
int rgbi_equals_rgba(RGBi *_first, RGBi *_second)
void image_converter_asserts_free_height(Environment *_environment, int _width, int _height, int _offset_x, int _offset_y, int *_frame_width, int *_frame_height, int _modulo_x)
Variable * variable_import(Environment *_environment, char *_name, VariableType _type, int _size_or_value)
RGBi * malloc_palette(int _size)
Allocate a palette space.
void variable_global(Environment *_environment, char *_pattern)
ScreenMode * find_screen_mode_by_suggestion(Environment *_environment, int _bitmap, int _width, int _height, int _colors, int _tile_width, int _tile_height)
Variable * variable_temporary(Environment *_environment, VariableType _type, char *_meaning)
Define a temporary variable.
int rgbi_extract_palette(Environment *_environment, unsigned char *_source, int _width, int _height, int _depth, RGBi _palette[], int _palette_size, int _sorted)
Extract the color palette from the given image.
Variable * variable_store(Environment *_environment, char *_destination, unsigned int _value)
Store a direct value to a variable.
RGBi * palette_remove_duplicates(RGBi *_source, int _source_size, int *_unique_size)
Remove duplicates from a palette.
void font_descriptors_init(Environment *_environment, int _embedded_present)
RGBi * palette_match(RGBi *_source, int _source_size, RGBi *_system, int _system_size)
Make a "palette match".
Variable * variable_store_buffer(Environment *_environment, char *_destination, unsigned char *_buffer, int _size, int _at)
void plot(Environment *_environment, char *_x, char *_y, char *_c, int _preserve_color)
void console_init(Environment *_environment)
Variable * distance(Environment *_environment, char *_x1, char *_y1, char *_x2, char *_y2)
Return the distance between two (screen) positions.
struct _CopperList * next
VestigialConfig vestigialConfig
unsigned char * valueBuffer
RGBi originalPalette[MAX_PALETTE]
struct _ScreenMode ScreenMode
#define CRITICAL_IMAGE_CONVERTER_TOO_COLORS(f)
struct _Resource Resource
struct _RGBi RGBi
Structure to store color components (red, green and blue).
#define adilineendbitmap()
#define WARNING_SCREEN_MODE(v1)
struct _Variable Variable
Structure of a single variable.
struct _Environment Environment
Structure of compilation environment.
#define adiline3(s, a, b, c)
#define deploy_preferred(s, e)
#define SCREEN_MODE_DEFINE(_id, _bitmap, _width, _height, _colors, _tile_width, _tile_height, _description)
#define CRITICAL_NEW_IMAGES_UNSUPPORTED_MODE(f)
#define CRITICAL_SCREEN_UNSUPPORTED(v)
#define WARNING_IMAGE_CONVERTER_UNSUPPORTED_MODE(f)
#define adilinepalette(s, c, p)
#define FONT_SCHEMA_ASCII
#define adilinebeginbitmap(s)
struct _CopperList CopperList
#define CRITICAL_NEW_IMAGE_UNSUPPORTED_MODE(f)
#define CRITICAL_BLIT_TOO_MUCH_SOURCES()