1 | /* |
---|
2 | * libee ASCII-Art library |
---|
3 | * Copyright (c) 2002, 2003 Sam Hocevar <sam@zoy.org> |
---|
4 | * All Rights Reserved |
---|
5 | * |
---|
6 | * $Id: ee.h 181 2003-11-15 12:42:38Z sam $ |
---|
7 | * |
---|
8 | * This program is free software; you can redistribute it and/or modify |
---|
9 | * it under the terms of the GNU General Public License as published by |
---|
10 | * the Free Software Foundation; either version 2 of the License, or |
---|
11 | * (at your option) any later version. |
---|
12 | * |
---|
13 | * This program is distributed in the hope that it will be useful, |
---|
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
16 | * GNU General Public License for more details. |
---|
17 | * |
---|
18 | * You should have received a copy of the GNU General Public License |
---|
19 | * along with this program; if not, write to the Free Software |
---|
20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
---|
21 | */ |
---|
22 | |
---|
23 | #ifndef __EE_H__ |
---|
24 | #define __EE_H__ |
---|
25 | |
---|
26 | #ifdef __cplusplus |
---|
27 | extern "C" |
---|
28 | { |
---|
29 | #endif |
---|
30 | |
---|
31 | /* |
---|
32 | * Colors |
---|
33 | */ |
---|
34 | enum ee_colors |
---|
35 | { |
---|
36 | EE_BLACK = 0, |
---|
37 | EE_BLUE = 1, |
---|
38 | EE_GREEN = 2, |
---|
39 | EE_CYAN = 3, |
---|
40 | EE_RED = 4, |
---|
41 | EE_MAGENTA = 5, |
---|
42 | EE_BROWN = 6, |
---|
43 | EE_LIGHTGRAY = 7, |
---|
44 | EE_DARKGRAY = 8, |
---|
45 | EE_LIGHTBLUE = 9, |
---|
46 | EE_LIGHTGREEN = 10, |
---|
47 | EE_LIGHTCYAN = 11, |
---|
48 | EE_LIGHTRED = 12, |
---|
49 | EE_LIGHTMAGENTA = 13, |
---|
50 | EE_YELLOW = 14, |
---|
51 | EE_WHITE = 15 |
---|
52 | }; |
---|
53 | |
---|
54 | /* |
---|
55 | * Types |
---|
56 | */ |
---|
57 | struct ee_sprite; |
---|
58 | |
---|
59 | /* |
---|
60 | * Prototypes |
---|
61 | */ |
---|
62 | int ee_init(void); |
---|
63 | void ee_set_delay(unsigned int); |
---|
64 | unsigned int ee_get_rendertime(void); |
---|
65 | unsigned int ee_get_width(void); |
---|
66 | unsigned int ee_get_height(void); |
---|
67 | const char *ee_get_color_name(unsigned int); |
---|
68 | void ee_refresh(void); |
---|
69 | void ee_end(void); |
---|
70 | |
---|
71 | char ee_get_key(void); |
---|
72 | |
---|
73 | void ee_set_color(int); |
---|
74 | int ee_get_color(void); |
---|
75 | void ee_putchar(int, int, char); |
---|
76 | void ee_putstr(int, int, const char *); |
---|
77 | void ee_printf(int, int, const char *, ...); |
---|
78 | void ee_clear(void); |
---|
79 | |
---|
80 | void ee_draw_line(int, int, int, int, char); |
---|
81 | void ee_draw_polyline(const int[], const int[], int, char); |
---|
82 | void ee_draw_thin_line(int, int, int, int); |
---|
83 | void ee_draw_thin_polyline(const int[], const int[], int); |
---|
84 | |
---|
85 | void ee_draw_circle(int, int, int, char); |
---|
86 | void ee_draw_ellipse(int, int, int, int, char); |
---|
87 | void ee_draw_thin_ellipse(int, int, int, int); |
---|
88 | void ee_fill_ellipse(int, int, int, int, char); |
---|
89 | |
---|
90 | void ee_draw_box(int, int, int, int, char); |
---|
91 | void ee_draw_thin_box(int, int, int, int); |
---|
92 | void ee_fill_box(int, int, int, int, char); |
---|
93 | |
---|
94 | void ee_draw_triangle(int, int, int, int, int, int, char); |
---|
95 | void ee_draw_thin_triangle(int, int, int, int, int, int); |
---|
96 | void ee_fill_triangle(int, int, int, int, int, int, char); |
---|
97 | |
---|
98 | int ee_rand(int, int); |
---|
99 | unsigned int ee_sqrt(unsigned int); |
---|
100 | |
---|
101 | struct ee_sprite * ee_load_sprite(const char *); |
---|
102 | int ee_get_sprite_frames(struct ee_sprite *); |
---|
103 | int ee_get_sprite_width(struct ee_sprite *, int); |
---|
104 | int ee_get_sprite_height(struct ee_sprite *, int); |
---|
105 | int ee_get_sprite_dx(struct ee_sprite *, int); |
---|
106 | int ee_get_sprite_dy(struct ee_sprite *, int); |
---|
107 | void ee_draw_sprite(int, int, struct ee_sprite *, int); |
---|
108 | void ee_free_sprite(struct ee_sprite *); |
---|
109 | |
---|
110 | #ifdef __cplusplus |
---|
111 | } |
---|
112 | #endif |
---|
113 | |
---|
114 | #endif /* __EE_H__ */ |
---|