X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fsystem.h;h=9b571858a3505e0f79c7e25ee6e28164b29eab60;hb=2b481ae25adcf3bebf37be182eafc8bfa0acb4c1;hp=41cf079fe2ae3fb518f6325e3eb9b39ff1905498;hpb=7b2f2285593458477b8185e62099d61975faf7d4;p=flatwaifu.git diff --git a/src/system.h b/src/system.h index 41cf079..9b57185 100644 --- a/src/system.h +++ b/src/system.h @@ -3,8 +3,22 @@ #include "glob.h" -#define SYSTEM_USE_OPENGL (1 << 0) -#define SYSTEM_USE_FULLSCREEN (1 << 1) +enum { Y_BYTE = 1, Y_WORD, Y_DWORD, Y_STRING, Y_SW_ON, Y_SW_OFF, Y_FILES, Y_KEY }; + +typedef struct cfg_t { + const char *cfg; + void *p; + byte t; +} cfg_t; + +typedef struct videomode_size_t { + int w, h, r; +} videomode_size_t; + +typedef struct videomode_t { + int n; + videomode_size_t *modes; +} videomode_t; /* common video subsystem routines */ void Y_get_videomode (int *w, int *h); @@ -15,10 +29,12 @@ int Y_get_fullscreen (void); /* hardware specific rendering */ int Y_set_videomode_opengl (int w, int h, int fullscreen); +const videomode_t *Y_get_videomode_list_opengl (int fullscreen); void Y_swap_buffers (void); /* software specific rendering */ int Y_set_videomode_software (int w, int h, int fullscreen); +const videomode_t *Y_get_videomode_list_software (int fullscreen); void Y_get_buffer (byte **buf, int *w, int *h, int *pitch); void Y_set_vga_palette (byte *vgapal); void Y_repaint_rect (int x, int y, int w, int h);