ugBASIC 1.18
An isomorphic BASIC language compiler for retrocomputers
Loading...
Searching...
No Matches
cga.h File Reference
#include "../ugbc.h"

Go to the source code of this file.

Macros

#define COLOR_TRANSPARENT   0x00
#define COLOR_BLACK   0x00
#define COLOR_DARK_WHITE   0x08
#define COLOR_WHITE   0x0f
#define COLOR_LIGHT_WHITE   COLOR_WHITE
#define COLOR_DARK_RED   0x04
#define COLOR_RED   0x0c
#define COLOR_LIGHT_RED   COLOR_RED
#define COLOR_CYAN   0x0b
#define COLOR_VIOLET   0x0d
#define COLOR_DARK_GREEN   0x02
#define COLOR_GREEN   0x0a
#define COLOR_LIGHT_GREEN   COLOR_GREEN
#define COLOR_DARK_BLUE   0x01
#define COLOR_BLUE   0x09
#define COLOR_LIGHT_BLUE   COLOR_BLUE
#define COLOR_YELLOW   0x0e
#define COLOR_ORANGE   COLOR_LIGHT_RED
#define COLOR_BROWN   0x06
#define COLOR_DARK_GREY   COLOR_DARK_WHITE
#define COLOR_GREY   0x07
#define COLOR_LIGHT_GREY   COLOR_GREY
#define COLOR_MAGENTA   0x0d
#define COLOR_PURPLE   COLOR_VIOLET
#define COLOR_LAVENDER   COLOR_VIOLET
#define COLOR_GOLD   COLOR_YELLOW
#define COLOR_TURQUOISE   COLOR_LIGHT_BLUE
#define COLOR_TAN   COLOR_BROWN
#define COLOR_YELLOW_GREEN   COLOR_LIGHT_GREEN
#define COLOR_OLIVE_GREEN   COLOR_GREEN
#define COLOR_PINK   COLOR_LIGHT_RED
#define COLOR_PEACH   COLOR_PINK
#define COLOR_COUNT   16
#define DEFAULT_PEN_COLOR   COLOR_WHITE
#define DEFAULT_PAPER_COLOR   COLOR_BLACK
#define TEXT_COLUMNS_COUNT   40
#define TEXT_ROWS_COUNT   25
#define TILEMAP_MODE_40x25x2   0
#define TILEMAP_MODE_40x25x16   1
#define TILEMAP_MODE_80x25x2   2
#define TILEMAP_MODE_80x25x16   3
#define TILEMAP_MODE_STANDARD   TILEMAP_MODE_40x25x16
#define BITMAP_MODE_320x200x2   4
#define BITMAP_MODE_320x200x4   5
#define BITMAP_MODE_640x200x2   6
#define BITMAP_MODE_STANDARD   BITMAP_MODE_320x200x4
#define BITMAP_MODE_DEFAULT   BITMAP_MODE_STANDARD
#define SPRITE_COUNT   32
#define SPRITE_WIDTH   8
#define SPRITE_HEIGHT   8
#define SPRITE_X_MIN   0
#define SPRITE_Y_MIN   0
#define SPRITE_X_MAX   264
#define SPRITE_Y_MAX   200
#define SCREEN_SPRITE_RATIO_X   100
#define SCREEN_SPRITE_RATIO_Y   100
#define SCREEN_BORDER_X   0
#define SCREEN_BORDER_Y   0
#define IMAGE_WIDTH_SIZE   2
#define IMAGE_WIDTH_OFFSET   0
#define IMAGE_HEIGHT_SIZE   1
#define IMAGE_HEIGHT_OFFSET   2
#define DOUBLE_BUFFER_PAGE_0   0
#define DOUBLE_BUFFER_PAGE_1   1

Typedefs

typedef void(* Tms9918SliceImageFunction) (Environment *, char *, char *, char *, int, int, char *)

Functions

int cga_screen_mode_enable (Environment *_environment, ScreenMode *_screen_mode)
void cga_initialization (Environment *_environment)
void cga_finalization (Environment *_environment)
void cga_back (Environment *_environment)
void cga_background_color (Environment *_environment, int _index, int _background_color)
 CGA: emit code to change background color
void cga_background_color_vars (Environment *_environment, char *_index, char *_background_color)
 CGA: emit code to change background color
void cga_background_color_semivars (Environment *_environment, int _index, char *_background_color)
 CGA: emit code to change background color
void cga_colors_vars (Environment *_environment, char *_foreground_color, char *_background_color)
void cga_background_color_get_vars (Environment *_environment, char *_index, char *_background_color)
 CGA: emit code to retrieve background color
void cga_border_color (Environment *_environment, char *_border_color)
 CGA: emit code to change border color
Variablecga_collision (Environment *_environment, char *_sprite)
void cga_hit (Environment *_environment, char *_sprite_mask, char *_result)
 CGA: emit code to check for collision
void cga_next_raster (Environment *_environment)
 CGA: emit code to wait for next raster irq
void cga_next_raster_at (Environment *_environment, char *_label, char *_positionlo, char *_positionhi)
 CGA: emit code to wait for next raster irq at different position
void cga_raster_at (Environment *_environment, char *_label, char *_positionlo, char *_positionhi)
 CGA: emit code to set raster irq
void cga_sprite_common_color (Environment *_environment, char *_index, char *_common_color)
 CGA: emit code to change common sprite's color
void cga_bitmap_enable (Environment *_environment, int _width, int _height, int _colors)
void cga_bitmap_disable (Environment *_environment)
void cga_bitmap_at (Environment *_environment, char *_address)
void cga_colormap_at (Environment *_environment, char *_address)
void cga_textmap_at (Environment *_environment, char *_address)
void cga_tiles_at (Environment *_environment, char *_address)
void cga_tilemap_enable (Environment *_environment, int _width, int _height, int _colors, int _tile_width, int _tile_height)
void cga_bank_select (Environment *_environment, int _bank)
void cga_screen_on (Environment *_environment)
void cga_screen_off (Environment *_environment)
void cga_screen_rows (Environment *_environment, char *_rows)
void cga_screen_columns (Environment *_environment, char *_columns)
void cga_sprite_data_from (Environment *_environment, char *_sprite, char *_image)
void cga_sprite_data_set (Environment *_environment, char *_sprite, char *_image)
void cga_sprite_enable (Environment *_environment, char *_sprite)
void cga_sprite_disable (Environment *_environment, char *_sprite)
void cga_sprite_at (Environment *_environment, char *_sprite, char *_x, char *_y)
void cga_sprite_expand_vertical (Environment *_environment, char *_sprite)
void cga_sprite_expand_horizontal (Environment *_environment, char *_sprite)
void cga_sprite_compress_vertical (Environment *_environment, char *_sprite)
void cga_sprite_compress_horizontal (Environment *_environment, char *_sprite)
void cga_sprite_multicolor (Environment *_environment, char *_sprite)
void cga_sprite_monocolor (Environment *_environment, char *_sprite)
void cga_sprite_color (Environment *_environment, char *_sprite, char *_color)
void cga_sprite_priority (Environment *_environment, char *_sprite, char *_priority)
void cga_vertical_scroll (Environment *_environment, char *_displacement)
void cga_horizontal_scroll (Environment *_environment, char *_displacement)
void cga_busy_wait (Environment *_environment, char *_timing)
void cga_tiles_get (Environment *_environment, char *_result)
void cga_get_width (Environment *_environment, char *_result)
void cga_get_height (Environment *_environment, char *_result)
void cga_pset_int (Environment *_environment, int _x, int _y, int *_c)
void cga_pset_vars (Environment *_environment, char *_x, char *_y, char *_c)
void cga_pget_color_vars (Environment *_environment, char *_x, char *_y, char *_result)
void cga_cls (Environment *_environment)
void cga_cls_box (Environment *_environment, char *_x1, char *_y1, char *_w, char *_h)
void cga_scroll_text (Environment *_environment, int _direction, int _overlap)
void cga_hscroll_line (Environment *_environment, int _direction, int _overlap)
void cga_hscroll_screen (Environment *_environment, int _direction, int _overlap)
void cga_text (Environment *_environment, char *_text, char *_text_size, int _raw)
void cga_cline (Environment *_environment, char *_characters)
void cga_scroll (Environment *_environment, int _dx, int _dy)
void cga_calculate_sequence_frame_offset (Environment *_environment, char *_offset, char *_sequence, char *_frame, int _frame_size, int _frame_count)
Variablecga_get_raster_line (Environment *_environment)
int cga_image_size (Environment *_environment, int _width, int _height, int _mode)
Variablecga_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)
Variablecga_sprite_converter (Environment *_environment, char *_data, int _width, int _height, int _depth, RGBi *_color, int _x_slot, int _y_slot)
void cga_put_image (Environment *_environment, Resource *_image, char *_x, char *_y, char *_frame, char *_sequence, int _frame_size, int _frame_count, char *_flags)
void cga_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 cga_wait_vbl (Environment *_environment)
Variablecga_new_image (Environment *_environment, int _width, int _height, int _mode)
Variablecga_new_images (Environment *_environment, int _frames, int _width, int _height, int _mode)
Variablecga_new_sequence (Environment *_environment, int _sequences, int _frames, int _width, int _height, int _mode)
void cga_get_image (Environment *_environment, char *_image, char *_x, char *_y, char *_frame, char *_sequence, int _frame_size, int _frame_count, int _palette)
void cga_put_tile (Environment *_environment, char *_image, char *_x, char *_y)
void cga_put_tiles (Environment *_environment, char *_image, char *_x, char *_y, char *_w, char *_h)
void cga_move_tiles (Environment *_environment, char *_image, char *_x, char *_y)
void cga_use_tileset (Environment *_environment, char *_tileset)
void cga_tile_at (Environment *_environment, char *_x, char *_y, char *_result)
void cga_move_memory_video (Environment *_environment, char *_from, char *_to, char *_size)
void cga_move_video_memory (Environment *_environment, char *_from, char *_to, char *_size)
void cga_move_video_video (Environment *_environment, char *_from, char *_to, char *_size)
void cga_slice_image_copy (Environment *_environment, char *_image, char *_frame, char *_sequence, int _frame_size, int _frame_count, char *_destination)
void cga_slice_image_extract (Environment *_environment, char *_image, char *_frame, char *_sequence, int _frame_size, int _frame_count, char *_destination)
int cga_palette_extract (Environment *_environment, char *_data, int _width, int _height, int _depth, int _flags, RGBi *_palette)
void cga_flip_image (Environment *_environment, Resource *_image, char *_frame, char *_sequence, int _frame_size, int _frame_count, char *_direction)
void cga_screen (Environment *_environment, char *_x, char *_y, char *_c)

Macro Definition Documentation

◆ BITMAP_MODE_320x200x2

#define BITMAP_MODE_320x200x2   4

Definition at line 82 of file cga.h.

◆ BITMAP_MODE_320x200x4

#define BITMAP_MODE_320x200x4   5

Definition at line 83 of file cga.h.

◆ BITMAP_MODE_640x200x2

#define BITMAP_MODE_640x200x2   6

Definition at line 84 of file cga.h.

◆ BITMAP_MODE_DEFAULT

#define BITMAP_MODE_DEFAULT   BITMAP_MODE_STANDARD

Definition at line 87 of file cga.h.

◆ BITMAP_MODE_STANDARD

#define BITMAP_MODE_STANDARD   BITMAP_MODE_320x200x4

Definition at line 85 of file cga.h.

◆ COLOR_BLACK

#define COLOR_BLACK   0x00

Definition at line 37 of file cga.h.

◆ COLOR_BLUE

#define COLOR_BLUE   0x09

Definition at line 50 of file cga.h.

◆ COLOR_BROWN

#define COLOR_BROWN   0x06

Definition at line 54 of file cga.h.

◆ COLOR_COUNT

#define COLOR_COUNT   16

Definition at line 68 of file cga.h.

◆ COLOR_CYAN

#define COLOR_CYAN   0x0b

Definition at line 44 of file cga.h.

◆ COLOR_DARK_BLUE

#define COLOR_DARK_BLUE   0x01

Definition at line 49 of file cga.h.

◆ COLOR_DARK_GREEN

#define COLOR_DARK_GREEN   0x02

Definition at line 46 of file cga.h.

◆ COLOR_DARK_GREY

#define COLOR_DARK_GREY   COLOR_DARK_WHITE

Definition at line 55 of file cga.h.

◆ COLOR_DARK_RED

#define COLOR_DARK_RED   0x04

Definition at line 41 of file cga.h.

◆ COLOR_DARK_WHITE

#define COLOR_DARK_WHITE   0x08

Definition at line 38 of file cga.h.

◆ COLOR_GOLD

#define COLOR_GOLD   COLOR_YELLOW

Definition at line 61 of file cga.h.

◆ COLOR_GREEN

#define COLOR_GREEN   0x0a

Definition at line 47 of file cga.h.

◆ COLOR_GREY

#define COLOR_GREY   0x07

Definition at line 56 of file cga.h.

◆ COLOR_LAVENDER

#define COLOR_LAVENDER   COLOR_VIOLET

Definition at line 60 of file cga.h.

◆ COLOR_LIGHT_BLUE

#define COLOR_LIGHT_BLUE   COLOR_BLUE

Definition at line 51 of file cga.h.

◆ COLOR_LIGHT_GREEN

#define COLOR_LIGHT_GREEN   COLOR_GREEN

Definition at line 48 of file cga.h.

◆ COLOR_LIGHT_GREY

#define COLOR_LIGHT_GREY   COLOR_GREY

Definition at line 57 of file cga.h.

◆ COLOR_LIGHT_RED

#define COLOR_LIGHT_RED   COLOR_RED

Definition at line 43 of file cga.h.

◆ COLOR_LIGHT_WHITE

#define COLOR_LIGHT_WHITE   COLOR_WHITE

Definition at line 40 of file cga.h.

◆ COLOR_MAGENTA

#define COLOR_MAGENTA   0x0d

Definition at line 58 of file cga.h.

◆ COLOR_OLIVE_GREEN

#define COLOR_OLIVE_GREEN   COLOR_GREEN

Definition at line 65 of file cga.h.

◆ COLOR_ORANGE

#define COLOR_ORANGE   COLOR_LIGHT_RED

Definition at line 53 of file cga.h.

◆ COLOR_PEACH

#define COLOR_PEACH   COLOR_PINK

Definition at line 67 of file cga.h.

◆ COLOR_PINK

#define COLOR_PINK   COLOR_LIGHT_RED

Definition at line 66 of file cga.h.

◆ COLOR_PURPLE

#define COLOR_PURPLE   COLOR_VIOLET

Definition at line 59 of file cga.h.

◆ COLOR_RED

#define COLOR_RED   0x0c

Definition at line 42 of file cga.h.

◆ COLOR_TAN

#define COLOR_TAN   COLOR_BROWN

Definition at line 63 of file cga.h.

◆ COLOR_TRANSPARENT

#define COLOR_TRANSPARENT   0x00

Definition at line 36 of file cga.h.

◆ COLOR_TURQUOISE

#define COLOR_TURQUOISE   COLOR_LIGHT_BLUE

Definition at line 62 of file cga.h.

◆ COLOR_VIOLET

#define COLOR_VIOLET   0x0d

Definition at line 45 of file cga.h.

◆ COLOR_WHITE

#define COLOR_WHITE   0x0f

Definition at line 39 of file cga.h.

◆ COLOR_YELLOW

#define COLOR_YELLOW   0x0e

Definition at line 52 of file cga.h.

◆ COLOR_YELLOW_GREEN

#define COLOR_YELLOW_GREEN   COLOR_LIGHT_GREEN

Definition at line 64 of file cga.h.

◆ DEFAULT_PAPER_COLOR

#define DEFAULT_PAPER_COLOR   COLOR_BLACK

Definition at line 71 of file cga.h.

◆ DEFAULT_PEN_COLOR

#define DEFAULT_PEN_COLOR   COLOR_WHITE

Definition at line 70 of file cga.h.

◆ DOUBLE_BUFFER_PAGE_0

#define DOUBLE_BUFFER_PAGE_0   0

Definition at line 107 of file cga.h.

◆ DOUBLE_BUFFER_PAGE_1

#define DOUBLE_BUFFER_PAGE_1   1

Definition at line 108 of file cga.h.

◆ IMAGE_HEIGHT_OFFSET

#define IMAGE_HEIGHT_OFFSET   2

Definition at line 105 of file cga.h.

◆ IMAGE_HEIGHT_SIZE

#define IMAGE_HEIGHT_SIZE   1

Definition at line 104 of file cga.h.

◆ IMAGE_WIDTH_OFFSET

#define IMAGE_WIDTH_OFFSET   0

Definition at line 103 of file cga.h.

◆ IMAGE_WIDTH_SIZE

#define IMAGE_WIDTH_SIZE   2

Definition at line 102 of file cga.h.

◆ SCREEN_BORDER_X

#define SCREEN_BORDER_X   0

Definition at line 99 of file cga.h.

◆ SCREEN_BORDER_Y

#define SCREEN_BORDER_Y   0

Definition at line 100 of file cga.h.

◆ SCREEN_SPRITE_RATIO_X

#define SCREEN_SPRITE_RATIO_X   100

Definition at line 97 of file cga.h.

◆ SCREEN_SPRITE_RATIO_Y

#define SCREEN_SPRITE_RATIO_Y   100

Definition at line 98 of file cga.h.

◆ SPRITE_COUNT

#define SPRITE_COUNT   32

Definition at line 89 of file cga.h.

◆ SPRITE_HEIGHT

#define SPRITE_HEIGHT   8

Definition at line 91 of file cga.h.

◆ SPRITE_WIDTH

#define SPRITE_WIDTH   8

Definition at line 90 of file cga.h.

◆ SPRITE_X_MAX

#define SPRITE_X_MAX   264

Definition at line 94 of file cga.h.

◆ SPRITE_X_MIN

#define SPRITE_X_MIN   0

Definition at line 92 of file cga.h.

◆ SPRITE_Y_MAX

#define SPRITE_Y_MAX   200

Definition at line 95 of file cga.h.

◆ SPRITE_Y_MIN

#define SPRITE_Y_MIN   0

Definition at line 93 of file cga.h.

◆ TEXT_COLUMNS_COUNT

#define TEXT_COLUMNS_COUNT   40

Definition at line 73 of file cga.h.

◆ TEXT_ROWS_COUNT

#define TEXT_ROWS_COUNT   25

Definition at line 74 of file cga.h.

◆ TILEMAP_MODE_40x25x16

#define TILEMAP_MODE_40x25x16   1

Definition at line 77 of file cga.h.

◆ TILEMAP_MODE_40x25x2

#define TILEMAP_MODE_40x25x2   0

Definition at line 76 of file cga.h.

◆ TILEMAP_MODE_80x25x16

#define TILEMAP_MODE_80x25x16   3

Definition at line 79 of file cga.h.

◆ TILEMAP_MODE_80x25x2

#define TILEMAP_MODE_80x25x2   2

Definition at line 78 of file cga.h.

◆ TILEMAP_MODE_STANDARD

#define TILEMAP_MODE_STANDARD   TILEMAP_MODE_40x25x16

Definition at line 80 of file cga.h.

Typedef Documentation

◆ Tms9918SliceImageFunction

typedef void(* Tms9918SliceImageFunction) (Environment *, char *, char *, char *, int, int, char *)

Definition at line 202 of file cga.h.

Function Documentation

◆ cga_back()

void cga_back ( Environment * _environment)

Definition at line 1300 of file cga.c.

◆ cga_background_color()

void cga_background_color ( Environment * _environment,
int _index,
int _background_color )

CGA: emit code to change background color

This function can be used to issue code aimed at changing the background color of the screen.

Parameters
_environmentCurrent calling environment
_indexIndex of the background color
_background_colorBackground color to use

Definition at line 227 of file cga.c.

◆ cga_background_color_get_vars()

void cga_background_color_get_vars ( Environment * _environment,
char * _index,
char * _background_color )

CGA: emit code to retrieve background color

This function can be used to issue code aimed at retrieving the background color of the screen.

Parameters
_environmentCurrent calling environment
_indexIndex of the background color
_background_colorBackground color to use

Definition at line 289 of file cga.c.

◆ cga_background_color_semivars()

void cga_background_color_semivars ( Environment * _environment,
int _index,
char * _background_color )

CGA: emit code to change background color

This function can be used to issue code aimed at changing the background color of the screen.

Parameters
_environmentCurrent calling environment
_indexIndex of the background color
_background_colorBackground color to use

Definition at line 268 of file cga.c.

◆ cga_background_color_vars()

void cga_background_color_vars ( Environment * _environment,
char * _index,
char * _background_color )

CGA: emit code to change background color

This function can be used to issue code aimed at changing the background color of the screen.

Parameters
_environmentCurrent calling environment
_indexIndex of the background color
_background_colorBackground color to use

Definition at line 247 of file cga.c.

◆ cga_bank_select()

void cga_bank_select ( Environment * _environment,
int _bank )

Definition at line 361 of file cga.c.

◆ cga_bitmap_at()

void cga_bitmap_at ( Environment * _environment,
char * _address )

Definition at line 830 of file cga.c.

◆ cga_bitmap_disable()

void cga_bitmap_disable ( Environment * _environment)

Definition at line 799 of file cga.c.

◆ cga_bitmap_enable()

void cga_bitmap_enable ( Environment * _environment,
int _width,
int _height,
int _colors )

Definition at line 776 of file cga.c.

◆ cga_blit_image()

void cga_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 )

Definition at line 1541 of file cga.c.

◆ cga_border_color()

void cga_border_color ( Environment * _environment,
char * _border_color )

CGA: emit code to change border color

This function can be used to issue code aimed at changing the border color of the screen.

Parameters
_environmentCurrent calling environment
_border_colorBorder color to use

Definition at line 206 of file cga.c.

◆ cga_busy_wait()

void cga_busy_wait ( Environment * _environment,
char * _timing )

Definition at line 995 of file cga.c.

◆ cga_calculate_sequence_frame_offset()

void cga_calculate_sequence_frame_offset ( Environment * _environment,
char * _offset,
char * _sequence,
char * _frame,
int _frame_size,
int _frame_count )

Definition at line 1716 of file cga.c.

◆ cga_cline()

void cga_cline ( Environment * _environment,
char * _characters )

Definition at line 1304 of file cga.c.

◆ cga_cls()

void cga_cls ( Environment * _environment)

Definition at line 1011 of file cga.c.

◆ cga_cls_box()

void cga_cls_box ( Environment * _environment,
char * _x1,
char * _y1,
char * _w,
char * _h )

Definition at line 1022 of file cga.c.

◆ cga_collision()

Variable * cga_collision ( Environment * _environment,
char * _sprite )

Definition at line 174 of file cga.c.

◆ cga_colormap_at()

void cga_colormap_at ( Environment * _environment,
char * _address )

Definition at line 834 of file cga.c.

◆ cga_colors_vars()

void cga_colors_vars ( Environment * _environment,
char * _foreground_color,
char * _background_color )

Definition at line 1686 of file cga.c.

◆ cga_finalization()

void cga_finalization ( Environment * _environment)

Definition at line 1275 of file cga.c.

◆ cga_flip_image()

void cga_flip_image ( Environment * _environment,
Resource * _image,
char * _frame,
char * _sequence,
int _frame_size,
int _frame_count,
char * _direction )

Definition at line 1720 of file cga.c.

◆ cga_get_height()

void cga_get_height ( Environment * _environment,
char * _result )

Definition at line 1007 of file cga.c.

◆ cga_get_image()

void cga_get_image ( Environment * _environment,
char * _image,
char * _x,
char * _y,
char * _frame,
char * _sequence,
int _frame_size,
int _frame_count,
int _palette )

Definition at line 1640 of file cga.c.

◆ cga_get_raster_line()

Variable * cga_get_raster_line ( Environment * _environment)

Definition at line 1668 of file cga.c.

◆ cga_get_width()

void cga_get_width ( Environment * _environment,
char * _result )

Definition at line 999 of file cga.c.

◆ cga_hit()

void cga_hit ( Environment * _environment,
char * _sprite_mask,
char * _result )

CGA: emit code to check for collision

This function can be used to issue code aimed at verifying if a sprite has had a collision with a tile. The result (0 = no collision, 0xff = collision occurred) is returned in the output variable.

  • Parameters
    _environmentCurrent calling environment
    _sprite_maskSprite mask to use
    _resultWhere to store the result

Definition at line 193 of file cga.c.

◆ cga_horizontal_scroll()

void cga_horizontal_scroll ( Environment * _environment,
char * _displacement )

Definition at line 991 of file cga.c.

◆ cga_hscroll_line()

void cga_hscroll_line ( Environment * _environment,
int _direction,
int _overlap )

Definition at line 1292 of file cga.c.

◆ cga_hscroll_screen()

void cga_hscroll_screen ( Environment * _environment,
int _direction,
int _overlap )

Definition at line 1296 of file cga.c.

◆ cga_image_converter()

Variable * cga_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 )

Definition at line 1515 of file cga.c.

◆ cga_image_size()

int cga_image_size ( Environment * _environment,
int _width,
int _height,
int _mode )

Definition at line 1308 of file cga.c.

◆ cga_initialization()

void cga_initialization ( Environment * _environment)

Definition at line 1091 of file cga.c.

◆ cga_move_memory_video()

void cga_move_memory_video ( Environment * _environment,
char * _from,
char * _to,
char * _size )

Definition at line 1678 of file cga.c.

◆ cga_move_tiles()

void cga_move_tiles ( Environment * _environment,
char * _image,
char * _x,
char * _y )

Definition at line 1652 of file cga.c.

◆ cga_move_video_memory()

void cga_move_video_memory ( Environment * _environment,
char * _from,
char * _to,
char * _size )

Definition at line 1682 of file cga.c.

◆ cga_move_video_video()

void cga_move_video_video ( Environment * _environment,
char * _from,
char * _to,
char * _size )

◆ cga_new_image()

Variable * cga_new_image ( Environment * _environment,
int _width,
int _height,
int _mode )

Definition at line 1553 of file cga.c.

◆ cga_new_images()

Variable * cga_new_images ( Environment * _environment,
int _frames,
int _width,
int _height,
int _mode )

Definition at line 1577 of file cga.c.

◆ cga_new_sequence()

Variable * cga_new_sequence ( Environment * _environment,
int _sequences,
int _frames,
int _width,
int _height,
int _mode )

Definition at line 1608 of file cga.c.

◆ cga_next_raster()

void cga_next_raster ( Environment * _environment)

CGA: emit code to wait for next raster irq

This function outputs assembly code needed to wait for the next raster. Meanwhile, the execution of the main code will resume where it left off.

Parameters
_environmentCurrent calling environment

Definition at line 340 of file cga.c.

◆ cga_next_raster_at()

void cga_next_raster_at ( Environment * _environment,
char * _label,
char * _positionlo,
char * _positionhi )

CGA: emit code to wait for next raster irq at different position

This function outputs assembly code needed to wait for the next raster on a different position with a different code to execute. Meanwhile, the execution of the main code will resume where it left off.

Parameters
_environmentCurrent calling environment
_labelLabel to jump to when vertical raster reach the value given
_positionloThe vertical position to wait for (bits 7..0)
_positionhiThe vertical position to wait for (bit 8)

Definition at line 357 of file cga.c.

◆ cga_palette_extract()

int cga_palette_extract ( Environment * _environment,
char * _data,
int _width,
int _height,
int _depth,
int _flags,
RGBi * _palette )

Definition at line 1702 of file cga.c.

◆ cga_pget_color_vars()

void cga_pget_color_vars ( Environment * _environment,
char * _x,
char * _y,
char * _result )

Definition at line 889 of file cga.c.

◆ cga_pset_int()

void cga_pset_int ( Environment * _environment,
int _x,
int _y,
int * _c )

Definition at line 842 of file cga.c.

◆ cga_pset_vars()

void cga_pset_vars ( Environment * _environment,
char * _x,
char * _y,
char * _c )

Definition at line 863 of file cga.c.

◆ cga_put_image()

void cga_put_image ( Environment * _environment,
Resource * _image,
char * _x,
char * _y,
char * _frame,
char * _sequence,
int _frame_size,
int _frame_count,
char * _flags )

Definition at line 1545 of file cga.c.

◆ cga_put_tile()

void cga_put_tile ( Environment * _environment,
char * _image,
char * _x,
char * _y )

Definition at line 1648 of file cga.c.

◆ cga_put_tiles()

void cga_put_tiles ( Environment * _environment,
char * _image,
char * _x,
char * _y,
char * _w,
char * _h )

Definition at line 1656 of file cga.c.

◆ cga_raster_at()

void cga_raster_at ( Environment * _environment,
char * _label,
char * _positionlo,
char * _positionhi )

CGA: emit code to set raster irq

This function outputs assembly code needed to initialize a raster routine. In other words, asynchronously and in parallel with the execution of the main program, the routine starting from the label provided will be executed when the vertical brush on the screen reaches the value of _position. This function is particularly useful when the position is communicated is given as an integer.

Parameters
_environmentCurrent calling environment
_labelLabel to jump to when vertical raster reach the value given
_positionloThe vertical position to wait for (bits 7..0)
_positionhiThe vertical position to wait for (bit 8)

Definition at line 326 of file cga.c.

◆ cga_screen()

void cga_screen ( Environment * _environment,
char * _x,
char * _y,
char * _c )

Definition at line 1724 of file cga.c.

◆ cga_screen_columns()

void cga_screen_columns ( Environment * _environment,
char * _columns )

Definition at line 927 of file cga.c.

◆ cga_screen_mode_enable()

int cga_screen_mode_enable ( Environment * _environment,
ScreenMode * _screen_mode )

Definition at line 365 of file cga.c.

◆ cga_screen_off()

void cga_screen_off ( Environment * _environment)

Definition at line 915 of file cga.c.

◆ cga_screen_on()

void cga_screen_on ( Environment * _environment)

Definition at line 907 of file cga.c.

◆ cga_screen_rows()

void cga_screen_rows ( Environment * _environment,
char * _rows )

Definition at line 923 of file cga.c.

◆ cga_scroll()

void cga_scroll ( Environment * _environment,
int _dx,
int _dy )

Definition at line 1644 of file cga.c.

◆ cga_scroll_text()

void cga_scroll_text ( Environment * _environment,
int _direction,
int _overlap )

Definition at line 1026 of file cga.c.

◆ cga_slice_image_copy()

void cga_slice_image_copy ( Environment * _environment,
char * _image,
char * _frame,
char * _sequence,
int _frame_size,
int _frame_count,
char * _destination )

Definition at line 1694 of file cga.c.

◆ cga_slice_image_extract()

void cga_slice_image_extract ( Environment * _environment,
char * _image,
char * _frame,
char * _sequence,
int _frame_size,
int _frame_count,
char * _destination )

Definition at line 1698 of file cga.c.

◆ cga_sprite_at()

void cga_sprite_at ( Environment * _environment,
char * _sprite,
char * _x,
char * _y )

Definition at line 947 of file cga.c.

◆ cga_sprite_color()

void cga_sprite_color ( Environment * _environment,
char * _sprite,
char * _color )

Definition at line 975 of file cga.c.

◆ cga_sprite_common_color()

void cga_sprite_common_color ( Environment * _environment,
char * _index,
char * _common_color )

CGA: emit code to change common sprite's color

This function can be used to issue code aimed at changing the common color of the sprites.

Parameters
_environmentCurrent calling environment
_indexIndex of the background color
_common_colorIndex of the color to use

Definition at line 307 of file cga.c.

◆ cga_sprite_compress_horizontal()

void cga_sprite_compress_horizontal ( Environment * _environment,
char * _sprite )

Definition at line 963 of file cga.c.

◆ cga_sprite_compress_vertical()

void cga_sprite_compress_vertical ( Environment * _environment,
char * _sprite )

Definition at line 959 of file cga.c.

◆ cga_sprite_converter()

Variable * cga_sprite_converter ( Environment * _environment,
char * _data,
int _width,
int _height,
int _depth,
RGBi * _color,
int _x_slot,
int _y_slot )

Definition at line 1370 of file cga.c.

◆ cga_sprite_data_from()

void cga_sprite_data_from ( Environment * _environment,
char * _sprite,
char * _image )

Definition at line 935 of file cga.c.

◆ cga_sprite_data_set()

void cga_sprite_data_set ( Environment * _environment,
char * _sprite,
char * _image )

Definition at line 931 of file cga.c.

◆ cga_sprite_disable()

void cga_sprite_disable ( Environment * _environment,
char * _sprite )

Definition at line 943 of file cga.c.

◆ cga_sprite_enable()

void cga_sprite_enable ( Environment * _environment,
char * _sprite )

Definition at line 939 of file cga.c.

◆ cga_sprite_expand_horizontal()

void cga_sprite_expand_horizontal ( Environment * _environment,
char * _sprite )

Definition at line 955 of file cga.c.

◆ cga_sprite_expand_vertical()

void cga_sprite_expand_vertical ( Environment * _environment,
char * _sprite )

Definition at line 951 of file cga.c.

◆ cga_sprite_monocolor()

void cga_sprite_monocolor ( Environment * _environment,
char * _sprite )

Definition at line 971 of file cga.c.

◆ cga_sprite_multicolor()

void cga_sprite_multicolor ( Environment * _environment,
char * _sprite )

Definition at line 967 of file cga.c.

◆ cga_sprite_priority()

void cga_sprite_priority ( Environment * _environment,
char * _sprite,
char * _priority )

Definition at line 979 of file cga.c.

◆ cga_text()

void cga_text ( Environment * _environment,
char * _text,
char * _text_size,
int _raw )

Definition at line 1038 of file cga.c.

◆ cga_textmap_at()

void cga_textmap_at ( Environment * _environment,
char * _address )

Definition at line 838 of file cga.c.

◆ cga_tile_at()

void cga_tile_at ( Environment * _environment,
char * _x,
char * _y,
char * _result )

Definition at line 1660 of file cga.c.

◆ cga_tilemap_enable()

void cga_tilemap_enable ( Environment * _environment,
int _width,
int _height,
int _colors,
int _tile_width,
int _tile_height )

Definition at line 803 of file cga.c.

◆ cga_tiles_at()

void cga_tiles_at ( Environment * _environment,
char * _address )

Definition at line 983 of file cga.c.

◆ cga_tiles_get()

void cga_tiles_get ( Environment * _environment,
char * _result )

Definition at line 1003 of file cga.c.

◆ cga_use_tileset()

void cga_use_tileset ( Environment * _environment,
char * _tileset )

Definition at line 1664 of file cga.c.

◆ cga_vertical_scroll()

void cga_vertical_scroll ( Environment * _environment,
char * _displacement )

Definition at line 987 of file cga.c.

◆ cga_wait_vbl()

void cga_wait_vbl ( Environment * _environment)

Definition at line 1549 of file cga.c.