diff options
Diffstat (limited to 'src/i_video.h')
-rw-r--r-- | src/i_video.h | 82 |
1 files changed, 54 insertions, 28 deletions
diff --git a/src/i_video.h b/src/i_video.h index 44fe1cd2..c3c50c4b 100644 --- a/src/i_video.h +++ b/src/i_video.h @@ -30,34 +30,49 @@ #include "doomtype.h" +// Screen width and height. + +#define SCREENWIDTH 320 +#define SCREENHEIGHT 200 + +// Screen width used for "squash" scale functions + +#define SCREENWIDTH_4_3 256 + +// Screen height used for "stretch" scale functions. + +#define SCREENHEIGHT_4_3 240 + #define MAX_MOUSE_BUTTONS 8 typedef struct { - // Screen width and height + // Screen width and height - int width; - int height; + int width; + int height; - // Initialisation function to call when using this mode. - // Called with a pointer to the Doom palette. - // - // If NULL, no init function is called. + // Initialisation function to call when using this mode. + // Called with a pointer to the Doom palette. + // + // If NULL, no init function is called. - void (*InitMode)(byte *palette); - - // Function to call to draw the screen from the source buffer. - // Return true if draw was successful. + void (*InitMode)(byte *palette); + + // Function to call to draw the screen from the source buffer. + // Return true if draw was successful. - boolean (*DrawScreen)(int x1, int y1, int x2, int y2); + boolean (*DrawScreen)(int x1, int y1, int x2, int y2); - // If true, this is a "poor quality" mode. The autoadjust - // code should always attempt to use a different mode to this - // mode in fullscreen. + // If true, this is a "poor quality" mode. The autoadjust + // code should always attempt to use a different mode to this + // mode in fullscreen. - boolean poor_quality; + boolean poor_quality; } screen_mode_t; +typedef boolean (*grabmouse_callback_t)(void); + // Called by D_DoomMain, // determines the hardware configuration // and sets up the video mode @@ -72,31 +87,42 @@ void I_SetPalette (byte* palette); void I_UpdateNoBlit (void); void I_FinishUpdate (void); -// Wait for vertical retrace or pause a bit. -void I_WaitVBL(int count); - void I_ReadScreen (byte* scr); void I_BeginRead (void); void I_EndRead (void); -void I_SetWindowCaption(void); -void I_SetWindowIcon(void); +void I_SetWindowTitle(char *title); void I_CheckIsScreensaver(void); +void I_SetGrabMouseCallback(grabmouse_callback_t func); + +void I_DisplayFPSDots(boolean dots_on); +void I_BindVideoVariables(void); + +// Called before processing any tics in a frame (just after displaying a frame). +// Time consuming syncronous operations are performed here (joystick reading). + +void I_StartFrame (void); + +// Called before processing each tic in a frame. +// Quick syncronous operations are performed here. + +void I_StartTic (void); + +// Enable the loading disk image displayed when reading from disk. + +void I_EnableLoadingDisk(void); extern char *video_driver; -extern int autoadjust_video_settings; extern boolean screenvisible; -extern int screen_width, screen_height; -extern int screen_bpp; -extern int fullscreen; -extern int aspect_ratio_correct; -extern int grabmouse; + extern float mouse_acceleration; extern int mouse_threshold; -extern int startup_delay; extern int vanilla_keyboard_mapping; +extern boolean screensaver_mode; +extern int usegamma; +extern byte *I_VideoBuffer; #endif |