1 /* $Id: tenm_graphic.h,v 1.39 2003/02/14 17:56:16 oohara Exp $ */
2 
3 #ifndef __TENM_GRAPHIC_H__
4 #define __TENM_GRAPHIC_H__
5 
6 #include <SDL.h>
7 
8 #include "tenm_primitive.h"
9 #include "tenm_object.h"
10 
11 struct _tenm_image
12 {
13   /* number of images */
14   int n;
15   SDL_Surface **image;
16 };
17 typedef struct _tenm_image tenm_image;
18 
19 typedef Uint32 tenm_color;
20 
21 /* for flag in tenm_graphic_init */
22 #define TENM_FULLSCREEN 1
23 
24 int tenm_graphic_init(int width, int height, int flag, const char *name);
25 int tenm_draw_line(int a_x, int a_y, int b_x, int b_y, int width,
26                    tenm_color color);
27 int tenm_draw_circle(int center_x, int center_y, int radius, int width,
28                      tenm_color color);
29 int tenm_draw_point(int x, int y, tenm_color color);
30 int tenm_draw_rectangle(int x, int y, int w, int h, tenm_color color);
31 tenm_color tenm_map_color(int red, int green, int blue);
32 int tenm_clear_window(tenm_color color);
33 int tenm_redraw_window(void);
34 int tenm_draw_primitive(tenm_primitive *p, tenm_color color);
35 int tenm_draw_mass(tenm_mass *p, tenm_color color);
36 
37 tenm_image *tenm_load_image(int number_file, ...);
38 void tenm_image_delete(tenm_image *p);
39 int tenm_draw_image(int x, int y, tenm_image *image, int number);
40 int tenm_draw_string(int x, int y, tenm_image *font, const char *string,
41                      int length);
42 
43 
44 
45 
46 #endif /* not __TENM_GRAPHIC_H__ */
47