|
ASCII-GFX
2.0
|
Classes | |
| struct | SpriteType |
Functions | |
| void | set_drawing_window (WINDOW *w) |
| set the drawing window More... | |
| void | set_area_size (int sx, int sy) |
| create a scrollable canvas area More... | |
| bool | has_area () |
| is a scrollable canvas area available? More... | |
| int | get_area_width () |
| get the width of the scrollable area More... | |
| int | get_area_height () |
| get the height of the scrollable area More... | |
| void | set_window_size (int sx, int sy) |
| set the size of the displayed window More... | |
| bool | has_window () |
| is a displayed window available? More... | |
| int | get_window_width () |
| get the width of the displayed window More... | |
| int | get_window_height () |
| get the height of the displayed window More... | |
| void | set_window_offset (int ox, int oy) |
| set the offset of the displayed window More... | |
| void | clear_area (int ch) |
| clear the scrollable area More... | |
| void | set_area_border (int ch) |
| set the border of the scrollable area More... | |
| void | set_window_border (int ch) |
| set the border of the displayed window More... | |
| int | get_cell (int x, int y) |
| get the cell character at position (x, y) of the canvas area More... | |
| int | get_ascii (int x, int y) |
| get the ascii character at cell position (x, y) More... | |
| void | set_cell (int x, int y, int ch) |
| set the cell at position (x, y) to character ch of the canvas area More... | |
| void | use_cell_color (int index) |
| use indexed color pair for foreground/background colors of cells More... | |
| void | set_cell_offset (int x, int y) |
| set the cell coordinate offset More... | |
| void | set_cell_mode (bool retain) |
| set the cell modification mode More... | |
| int * | get_cell_area (int x, int y, int sx, int sy, int ch) |
| get the cell area at top-left position (x, y) with size (sx, sy) More... | |
| void | fill_cell_area (int x, int y, int sx, int sy, int ch) |
| fill a cell area at top-left position (x, y) with size (sx, sy) More... | |
| void | render_cell_area (int x, int y, int sx, int sy, const int *data) |
| render a cell area at top-left position (x, y) with size (sx, sy) More... | |
| int | render_text_area (int x, int y, const char *text) |
| render a text area at top-left position (x, y) More... | |
| int | render_text_format (int x, int y, const char *format,...) |
| render a formatted text at position (x, y) More... | |
| void | render_grid_char (int x, int y, int ch) |
| render a grid font character at top-left position (x, y) More... | |
| void | render_grid_text (int x, int y, const char *text) |
| render a text string with grid font characters at top-left position (x, y) More... | |
| void | render_line (int x1, int y1, int x2, int y2, int ch) |
| render a line from position (x1, y1) to (x2, y2) More... | |
| void | render_frame (int x1, int y1, int x2, int y2, int ch) |
| render a frame from position (x1, y1) to (x2, y2) More... | |
| void | render_circle (int xc, int yc, int r, int ch, double aspect) |
| render a circle at center position (xc, yc) with radius r More... | |
| void | render_points (int xc, int yc, int x, int y, int ax, int ay, double aspect, int ch) |
| void | render_ellipse (int xc, int yc, int ax, int ay, int ch, double aspect) |
| void | flood_fill (int x, int y, int ch) |
| flood-fill a cell area starting at position (x, y) More... | |
| void | inverse_flood_fill (int x, int y, int ch) |
| flood-fill everything but a cell area starting at position (x, y) More... | |
| void | scroll_area_up () |
| scroll the content of the canvas area up More... | |
| void | scroll_area_down (int num) |
| scroll the content of the canvas area down More... | |
| void | scroll_area_left (int num) |
| scroll the content of the canvas area left More... | |
| void | scroll_area_right (int num) |
| scroll the content of the canvas area right More... | |
| int | get_sprite_num () |
| void | enable_sprite (int num, int sx, int sy, bool window, bool own) |
| enable a sprite overlay More... | |
| bool | is_sprite_enabled (int num) |
| is a sprite overlay enabled? More... | |
| int | get_sprite_width (int num) |
| get the width of a sprite More... | |
| int | get_sprite_height (int num) |
| get the height of a sprite More... | |
| void | clear_sprite (int num, int ch) |
| clear a sprite More... | |
| void | set_sprite_data (int num, int sx, int sy, int *data) |
| set the sprite data More... | |
| int * | get_sprite_data (int num) |
| get the sprite data More... | |
| void | set_sprite_text (int num, const char *text, int ch, bool interprete) |
| set the sprite data by text string More... | |
| void | fill_sprite_area (int num, int x, int y, int sx, int sy, int ch) |
| fill a sprite cell area More... | |
| void | set_sprite_area (int num, int x, int y, int sx, int sy, const int *data) |
| set a sprite cell area More... | |
| int | print_sprite_text (int num, int x, int y, const char *text) |
| print a sprite text area More... | |
| void | print_sprite_grid_char (int num, int x, int y, int ch) |
| print a sprite grid font character More... | |
| void | print_sprite_grid_text (int num, int x, int y, const char *text) |
| print a sprite text string with grid font characters More... | |
| void | mirror_sprite_horizontal (int num, bool flip) |
| mirror the sprite horizontally More... | |
| void | mirror_sprite_vertical (int num, bool flip) |
| mirror the sprite vertically More... | |
| void | scroll_sprite_up (int num) |
| scroll the sprite up More... | |
| void | scroll_sprite_down (int num) |
| scroll the sprite down More... | |
| void | scroll_sprite_left (int num) |
| scroll the sprite left More... | |
| void | scroll_sprite_right (int num) |
| scroll the sprite right More... | |
| void | set_sprite_position (int num, int x, int y) |
| set the sprite position More... | |
| void | center_sprite_position (int num, int x, int y) |
| center the sprite position More... | |
| void | get_sprite_position (int num, int *x, int *y) |
| get the sprite position More... | |
| void | hide_sprite (int num) |
| hide a sprite More... | |
| void | show_sprite (int num) |
| show a sprite More... | |
| void | background_sprite (int num, bool background) |
| make background sprite More... | |
| void | parallax_sprite (int num, float dx, float dy) |
| make parallax sprite More... | |
| bool | detect_area_collision (int num, int ch, const char *empty) |
| detect a sprite collision with a non-empty canvas area More... | |
| bool | detect_area_touch (int num, int dx, int dy, int ch, const char *empty) |
| detect a sprite touch with a non-empty canvas area More... | |
| bool | detect_sprite_collision (int num, int spr) |
| detect a sprite collision with a non-transparent area of another sprite More... | |
| bool | detect_sprite_touch (int num, int dx, int dy, int spr) |
| detect a sprite touch with a non-transparent area of another sprite More... | |
| void | bake_sprite (int num) |
| bake the sprite into the canvas area More... | |
| void | disable_sprite (int num) |
| disable a sprite More... | |
| void | disable_sprites () |
| disable all sprites More... | |
| void | redraw_window (int x, int y) |
| redraw the displayed window at top-left position (x, y) More... | |
| void | position_window (int x, int y) |
| position the displayed window at center position (x, y) More... | |
| void | scroll_window (int x, int y, int deltax, int deltay, bool stop) |
| scroll the displayed window to top-left position (x, y) More... | |
| void | center_window (int x, int y, int deltax, int deltay, bool stop) |
| scroll the displayed window to center position (x, y) More... | |
| void | get_window (int *x, int *y) |
| get the top-left position (x, y) of the scrolled window More... | |
| void | release_area () |
| release allocated memory More... | |
Variables | |
| static int | sizex = 0 |
| static int | sizey = 0 |
| static int | winx = 0 |
| static int | winy = 0 |
| static int | offx = 0 |
| static int | offy = 0 |
| static int | scrollx = 0 |
| static int | scrolly = 0 |
| static WINDOW * | W = NULL |
| static int * | area = NULL |
| static int * | window = NULL |
| static bool | window_change = false |
| static int | window_border_ch = -1 |
| static int | color_idx = 0 |
| static int | coordx = 0 |
| static int | coordy = 0 |
| static int | mode = 0 |
| static const int | sprites = 64 |
| static SpriteType | sprite [sprites] = {{0}} |
| static int | sprite_begin = 0 |
| static int | sprite_end = -1 |
| void background_sprite | ( | int | num, |
| bool | background = true |
||
| ) |
make background sprite
| void bake_sprite | ( | int | num | ) |
bake the sprite into the canvas area
| void center_sprite_position | ( | int | num, |
| int | x, | ||
| int | y | ||
| ) |
center the sprite position
| void center_window | ( | int | x, |
| int | y, | ||
| int | deltax = 0, |
||
| int | deltay = 0, |
||
| bool | stop = true |
||
| ) |
scroll the displayed window to center position (x, y)
| void clear_area | ( | int | ch = ' ' | ) |
clear the scrollable area
| void clear_sprite | ( | int | num, |
| int | ch = -1 |
||
| ) |
clear a sprite
| bool detect_area_collision | ( | int | num, |
| int | ch = -1, |
||
| const char * | empty = NULL |
||
| ) |
detect a sprite collision with a non-empty canvas area
| bool detect_area_touch | ( | int | num, |
| int | dx, | ||
| int | dy, | ||
| int | ch = -1, |
||
| const char * | empty = NULL |
||
| ) |
detect a sprite touch with a non-empty canvas area
| bool detect_sprite_collision | ( | int | num, |
| int | spr | ||
| ) |
detect a sprite collision with a non-transparent area of another sprite
| bool detect_sprite_touch | ( | int | num, |
| int | dx, | ||
| int | dy, | ||
| int | spr | ||
| ) |
detect a sprite touch with a non-transparent area of another sprite
| void disable_sprite | ( | int | num | ) |
disable a sprite
| void disable_sprites | ( | ) |
disable all sprites
| void enable_sprite | ( | int | num, |
| int | sx, | ||
| int | sy, | ||
| bool | window = false, |
||
| bool | own = false |
||
| ) |
enable a sprite overlay
| void fill_cell_area | ( | int | x, |
| int | y, | ||
| int | sx, | ||
| int | sy, | ||
| int | ch = -1 |
||
| ) |
fill a cell area at top-left position (x, y) with size (sx, sy)
| void fill_sprite_area | ( | int | num, |
| int | x, | ||
| int | y, | ||
| int | sx, | ||
| int | sy, | ||
| int | ch = -1 |
||
| ) |
fill a sprite cell area
| void flood_fill | ( | int | x, |
| int | y, | ||
| int | ch = -1 |
||
| ) |
flood-fill a cell area starting at position (x, y)
| int get_area_height | ( | ) |
get the height of the scrollable area
| int get_area_width | ( | ) |
get the width of the scrollable area
| int get_ascii | ( | int | x, |
| int | y | ||
| ) |
get the ascii character at cell position (x, y)
| int get_cell | ( | int | x, |
| int | y | ||
| ) |
get the cell character at position (x, y) of the canvas area
| int* get_cell_area | ( | int | x, |
| int | y, | ||
| int | sx, | ||
| int | sy, | ||
| int | ch = -1 |
||
| ) |
get the cell area at top-left position (x, y) with size (sx, sy)
| int* get_sprite_data | ( | int | num | ) |
get the sprite data
| int get_sprite_height | ( | int | num | ) |
get the height of a sprite
| int get_sprite_num | ( | ) |
| void get_sprite_position | ( | int | num, |
| int * | x, | ||
| int * | y | ||
| ) |
get the sprite position
| int get_sprite_width | ( | int | num | ) |
get the width of a sprite
| void get_window | ( | int * | x, |
| int * | y | ||
| ) |
get the top-left position (x, y) of the scrolled window
| int get_window_height | ( | ) |
get the height of the displayed window
| int get_window_width | ( | ) |
get the width of the displayed window
| bool has_area | ( | ) |
is a scrollable canvas area available?
| bool has_window | ( | ) |
is a displayed window available?
| void hide_sprite | ( | int | num | ) |
hide a sprite
| void inverse_flood_fill | ( | int | x, |
| int | y, | ||
| int | ch = -1 |
||
| ) |
flood-fill everything but a cell area starting at position (x, y)
| bool is_sprite_enabled | ( | int | num | ) |
is a sprite overlay enabled?
| void mirror_sprite_horizontal | ( | int | num, |
| bool | flip = true |
||
| ) |
mirror the sprite horizontally
| void mirror_sprite_vertical | ( | int | num, |
| bool | flip = true |
||
| ) |
mirror the sprite vertically
| void parallax_sprite | ( | int | num, |
| float | dx, | ||
| float | dy | ||
| ) |
make parallax sprite
| void position_window | ( | int | x, |
| int | y | ||
| ) |
position the displayed window at center position (x, y)
| void print_sprite_grid_char | ( | int | num, |
| int | x, | ||
| int | y, | ||
| int | ch | ||
| ) |
print a sprite grid font character
| void print_sprite_grid_text | ( | int | num, |
| int | x, | ||
| int | y, | ||
| const char * | text | ||
| ) |
print a sprite text string with grid font characters
| int print_sprite_text | ( | int | num, |
| int | x, | ||
| int | y, | ||
| const char * | text | ||
| ) |
print a sprite text area
| void redraw_window | ( | int | x, |
| int | y | ||
| ) |
redraw the displayed window at top-left position (x, y)
| void release_area | ( | ) |
release allocated memory
| void render_cell_area | ( | int | x, |
| int | y, | ||
| int | sx, | ||
| int | sy, | ||
| const int * | data | ||
| ) |
render a cell area at top-left position (x, y) with size (sx, sy)
| void render_circle | ( | int | xc, |
| int | yc, | ||
| int | r, | ||
| int | ch = -1, |
||
| double | aspect = 2 |
||
| ) |
render a circle at center position (xc, yc) with radius r
| void render_ellipse | ( | int | xc, |
| int | yc, | ||
| int | ax, | ||
| int | ay, | ||
| int | ch = -1, |
||
| double | aspect = 2 |
||
| ) |
| void render_frame | ( | int | x1, |
| int | y1, | ||
| int | x2, | ||
| int | y2, | ||
| int | ch = -1 |
||
| ) |
render a frame from position (x1, y1) to (x2, y2)
| void render_grid_char | ( | int | x, |
| int | y, | ||
| int | ch | ||
| ) |
render a grid font character at top-left position (x, y)
| void render_grid_text | ( | int | x, |
| int | y, | ||
| const char * | text | ||
| ) |
render a text string with grid font characters at top-left position (x, y)
| void render_line | ( | int | x1, |
| int | y1, | ||
| int | x2, | ||
| int | y2, | ||
| int | ch = -1 |
||
| ) |
render a line from position (x1, y1) to (x2, y2)
| void render_points | ( | int | xc, |
| int | yc, | ||
| int | x, | ||
| int | y, | ||
| int | ax, | ||
| int | ay, | ||
| double | aspect, | ||
| int | ch | ||
| ) |
| int render_text_area | ( | int | x, |
| int | y, | ||
| const char * | text | ||
| ) |
render a text area at top-left position (x, y)
| int render_text_format | ( | int | x, |
| int | y, | ||
| const char * | format, | ||
| ... | |||
| ) |
render a formatted text at position (x, y)
| void scroll_area_down | ( | int | num | ) |
scroll the content of the canvas area down
| void scroll_area_left | ( | int | num | ) |
scroll the content of the canvas area left
| void scroll_area_right | ( | int | num | ) |
scroll the content of the canvas area right
| void scroll_area_up | ( | ) |
scroll the content of the canvas area up
| void scroll_sprite_down | ( | int | num | ) |
scroll the sprite down
| void scroll_sprite_left | ( | int | num | ) |
scroll the sprite left
| void scroll_sprite_right | ( | int | num | ) |
scroll the sprite right
| void scroll_sprite_up | ( | int | num | ) |
scroll the sprite up
| void scroll_window | ( | int | x, |
| int | y, | ||
| int | deltax = 0, |
||
| int | deltay = 0, |
||
| bool | stop = true |
||
| ) |
scroll the displayed window to top-left position (x, y)
| void set_area_border | ( | int | ch = ACS_CKBOARD | ) |
set the border of the scrollable area
| void set_area_size | ( | int | sx, |
| int | sy | ||
| ) |
create a scrollable canvas area
| void set_cell | ( | int | x, |
| int | y, | ||
| int | ch | ||
| ) |
set the cell at position (x, y) to character ch of the canvas area
| void set_cell_mode | ( | bool | retain = false | ) |
set the cell modification mode
| void set_cell_offset | ( | int | x = 0, |
| int | y = 0 |
||
| ) |
set the cell coordinate offset
| void set_drawing_window | ( | WINDOW * | w | ) |
set the drawing window
| void set_sprite_area | ( | int | num, |
| int | x, | ||
| int | y, | ||
| int | sx, | ||
| int | sy, | ||
| const int * | data | ||
| ) |
set a sprite cell area
| void set_sprite_data | ( | int | num, |
| int | sx, | ||
| int | sy, | ||
| int * | data | ||
| ) |
set the sprite data
| void set_sprite_position | ( | int | num, |
| int | x, | ||
| int | y | ||
| ) |
set the sprite position
| void set_sprite_text | ( | int | num, |
| const char * | text, | ||
| int | ch = -1, |
||
| bool | interprete = false |
||
| ) |
set the sprite data by text string
| void set_window_border | ( | int | ch = ACS_CKBOARD | ) |
set the border of the displayed window
| void set_window_offset | ( | int | ox, |
| int | oy | ||
| ) |
set the offset of the displayed window
| void set_window_size | ( | int | sx, |
| int | sy | ||
| ) |
set the size of the displayed window
| void show_sprite | ( | int | num | ) |
show a sprite
| void use_cell_color | ( | int | index = 1 | ) |
use indexed color pair for foreground/background colors of cells
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
1.8.17