summaryrefslogtreecommitdiff
path: root/src/i_video.h
diff options
context:
space:
mode:
authorSimon Howard2008-01-20 04:47:52 +0000
committerSimon Howard2008-01-20 04:47:52 +0000
commit142a9488ad2e782d3d699b4f9b2902ffe26aeaa2 (patch)
tree766d38e08a38d95e9cfe794d078f60926c7440b4 /src/i_video.h
parent6805e192226d33c6431b1aaf60e84e1b5ea6f707 (diff)
downloadchocolate-doom-142a9488ad2e782d3d699b4f9b2902ffe26aeaa2.tar.gz
chocolate-doom-142a9488ad2e782d3d699b4f9b2902ffe26aeaa2.tar.bz2
chocolate-doom-142a9488ad2e782d3d699b4f9b2902ffe26aeaa2.zip
Refactor the video mode configuration system.
The previous system was built around the program choosing a screen mode from the user's settings, this is based around choosing settings from the specified screen mode. As such, the old screenmultiply config variable is now gone. Also, aspect ratio correction is now on by default. Add new aspect ratio correction functions for horizontal squashing (as a complement to the existing vertical stretching). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1005
Diffstat (limited to 'src/i_video.h')
-rw-r--r--src/i_video.h28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/i_video.h b/src/i_video.h
index 2eeb8343..99107433 100644
--- a/src/i_video.h
+++ b/src/i_video.h
@@ -31,7 +31,30 @@
#include "doomtype.h"
+typedef struct
+{
+ // Screen width and 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.
+
+ void (*InitMode)(byte *palette);
+
+ // Function to call to draw the screen from the source buffer.
+
+ void (*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.
+
+ boolean poor_quality;
+} screen_mode_t;
// Called by D_DoomMain,
// determines the hardware configuration
@@ -63,13 +86,14 @@ void I_CheckIsScreensaver(void);
extern char *video_driver;
extern int autoadjust_video_settings;
extern boolean screenvisible;
-extern int screenmultiply;
+extern int screen_width, screen_height;
extern int fullscreen;
extern int aspect_ratio_correct;
-extern boolean grabmouse;
+extern int grabmouse;
extern float mouse_acceleration;
extern int mouse_threshold;
extern int startup_delay;
extern int vanilla_keyboard_mapping;
#endif
+