source: ttyvaders/trunk/libee/ee.h @ 154

Last change on this file since 154 was 154, checked in by Sam Hocevar, 16 years ago
  • libee/graphics.c: + Renamed ee_color() to ee_set_color(), wrote ee_get_color().
  • libee/line.c: + Implemented draw_polyline() and draw_thin_polyline().
  • libee/sprite.c: + Removed the f member of struct ee_sprite. + Implemented ee_get_sprite_{width|height|dx|dy}(). + Restore the color fater ee_draw_sprite() is called.
  • libee/box.c: + Fixed a bug causing improper box clipping at the right and the bottom.
  • data/foo_fighter: + Fixed bugs in the sprite.
  • src/intro.c: + Test effects for the future game's intro.
  • test/spritedit.c: + Added stuff to the sprite editor. We can now navigate through frames.
  • Property svn:keywords set to Id
File size: 2.6 KB
Line 
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 154 2003-11-12 01:48:58Z 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
27extern "C"
28{
29#endif
30
31/*
32 * Colors
33 */
34#define EE_BLACK 1
35#define EE_GREEN 2
36#define EE_YELLOW 3
37#define EE_WHITE 4
38#define EE_RED 5
39#define EE_GRAY 6
40#define EE_LIGHTGRAY 7
41#define EE_BLUE 8
42#define EE_CYAN 9
43#define EE_MAGENTA 10
44
45/*
46 * Types
47 */
48struct ee_sprite;
49
50/*
51 * Prototypes
52 */
53int ee_init(void);
54void ee_set_delay(int);
55int ee_get_width(void);
56int ee_get_height(void);
57void ee_refresh(void);
58void ee_end(void);
59
60char ee_get_key(void);
61
62void ee_set_color(int);
63int ee_get_color(void);
64void ee_putchar(int, int, char);
65void ee_putstr(int, int, char *);
66void ee_clear(void);
67
68void ee_draw_line(int, int, int, int, char);
69void ee_draw_polyline(int[], int[], int, char);
70void ee_draw_thin_line(int, int, int, int);
71void ee_draw_thin_polyline(int[], int[], int);
72
73void ee_draw_circle(int, int, int, char);
74void ee_draw_ellipse(int, int, int, int, char);
75void ee_draw_thin_ellipse(int, int, int, int);
76void ee_fill_ellipse(int, int, int, int, char);
77
78void ee_draw_box(int, int, int, int, char);
79void ee_draw_thin_box(int, int, int, int);
80void ee_fill_box(int, int, int, int, char);
81
82void ee_draw_triangle(int, int, int, int, int, int, char);
83void ee_draw_thin_triangle(int, int, int, int, int, int);
84void ee_fill_triangle(int, int, int, int, int, int, char);
85
86int ee_rand(int, int);
87int ee_sqrt(int);
88
89struct ee_sprite * ee_load_sprite(const char *);
90int ee_get_sprite_frames(struct ee_sprite *);
91int ee_get_sprite_width(struct ee_sprite *, int);
92int ee_get_sprite_height(struct ee_sprite *, int);
93int ee_get_sprite_dx(struct ee_sprite *, int);
94int ee_get_sprite_dy(struct ee_sprite *, int);
95void ee_draw_sprite(int, int, struct ee_sprite *, int);
96void ee_free_sprite(struct ee_sprite *);
97
98#ifdef __cplusplus
99}
100#endif
101
102#endif /* __EE_H__ */
Note: See TracBrowser for help on using the repository browser.