1 #ifndef _INCLUDE_SYS_GFX_H
2 #define _INCLUDE_SYS_GFX_H
3 
4 /*
5  * Gfx section
6  *
7  * Certainly one of the most important one, this one deals with all what can
8  * be displayed.
9  */
10 
11   /*
12    * osd_gfx_buffer
13    *
14    * In order to make sprite and tiles functions generic to all ports, there's
15    * a need for a linear pointer needed to access the graphic buffer.
16    * This buffer will be the one used to display stuff on screen when calling
17    * the osd_gfx_blit function.
18    * I did this because e.g. when I use Allegro, I represent the buffer as a
19    * XBuf BITMAP (it's an allegro type) and set the osd_gfx_buffer to
20    * XBuf->line[0] since it's the first byte of the REAL data in this bitmap.
21    * Its size must be OSD_GFX_WIDTH * OSD_GFX_HEIGHT
22    */
23    extern UChar* osd_gfx_buffer;
24 
25    /*
26 	  * osd_gfx_driver
27 		*
28 		* Structure defining an entry for a useable graphical plug in in Hu-Go!
29 		*/
30    typedef struct {
31         int  (*init)(void);
32         int  (*mode)(void);
33         void (*draw)(void);
34         void (*shut)(void);
35    } osd_gfx_driver;
36 
37   /*
38 	 * osd_gfx_driver
39    *
40    * List of all driver (plug in) which can be used to render graphics
41    */
42    extern osd_gfx_driver osd_gfx_driver_list[];
43 
44 
45   /*
46    * osd_gfx_set_color
47    *
48    * Set the 'index' color to components r,b,g
49    */
50    void osd_gfx_set_color(UChar index,
51                        UChar r,
52                        UChar g,
53                        UChar b);
54 
55   /*
56    * osd_gfx_savepict
57    *
58    * Saves the current screen bitmap, returns the numerical part of the
59    * resulting filename
60    */
61    UInt16 osd_gfx_savepict(void);
62 
63   /*
64    * osd_gfx_set_hugo_mode
65    *
66    * Asks to set up a screen sized width x height, using the mode 'mode'
67    * which can be a driver in fact (X, SVGA, VESA, etc...)
68    */
69    SInt32 osd_gfx_set_hugo_mode(SInt32 mode,SInt32 width,SInt32 height);
70 
71 	/*
72 	 * osd_gfx_set_message
73 	 *
74 	 * Display a message
75 	 */
76 	void osd_gfx_set_message(char* message);
77 #endif
78