DEADSOFTWARE

9b571858a3505e0f79c7e25ee6e28164b29eab60
[flatwaifu.git] / src / system.h
1 #ifndef SYSTEM_H_INCLUDED
2 #define SYSTEM_H_INCLUDED
4 #include "glob.h"
6 enum { Y_BYTE = 1, Y_WORD, Y_DWORD, Y_STRING, Y_SW_ON, Y_SW_OFF, Y_FILES, Y_KEY };
8 typedef struct cfg_t {
9 const char *cfg;
10 void *p;
11 byte t;
12 } cfg_t;
14 typedef struct videomode_size_t {
15 int w, h, r;
16 } videomode_size_t;
18 typedef struct videomode_t {
19 int n;
20 videomode_size_t *modes;
21 } videomode_t;
23 /* common video subsystem routines */
24 void Y_get_videomode (int *w, int *h);
25 int Y_videomode_setted (void);
26 void Y_unset_videomode (void);
27 void Y_set_fullscreen (int yes);
28 int Y_get_fullscreen (void);
30 /* hardware specific rendering */
31 int Y_set_videomode_opengl (int w, int h, int fullscreen);
32 const videomode_t *Y_get_videomode_list_opengl (int fullscreen);
33 void Y_swap_buffers (void);
35 /* software specific rendering */
36 int Y_set_videomode_software (int w, int h, int fullscreen);
37 const videomode_t *Y_get_videomode_list_software (int fullscreen);
38 void Y_get_buffer (byte **buf, int *w, int *h, int *pitch);
39 void Y_set_vga_palette (byte *vgapal);
40 void Y_repaint_rect (int x, int y, int w, int h);
41 void Y_repaint (void);
43 /* input */
44 void Y_enable_text_input (void);
45 void Y_disable_text_input (void);
47 #endif /* SYSTEM_H_INCLUDED */