UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
cl_video.h
Go to the documentation of this file.
1 
6 /*
7 All original material Copyright (C) 2002-2020 UFO: Alien Invasion.
8 
9 Original file from Quake 2 v3.21: quake2-2.31/client/vid.h
10 Copyright (C) 1997-2001 Id Software, Inc.
11 
12 This program is free software; you can redistribute it and/or
13 modify it under the terms of the GNU General Public License
14 as published by the Free Software Foundation; either version 2
15 of the License, or (at your option) any later version.
16 
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 
21 See the GNU General Public License for more details.
22 
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software
25 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 
27 */
28 
29 #pragma once
30 
31 #include "../shared/ufotypes.h" /* for bool */
32 #include "../common/mem.h" /* for memPool_t */
33 #include "../common/cvar.h" /* for cvar_t */
34 
35 #define VID_NORM_WIDTH 1024
36 #define VID_NORM_HEIGHT 768
37 
43 typedef struct {
44  unsigned width;
45  unsigned height;
46  int mode;
47  bool fullscreen;
51 
66 typedef struct {
68 
69  bool stretch;
71  float rx;
72  float ry;
74  int virtualWidth, virtualHeight;
76  int x, y, viewWidth, viewHeight;
80 } viddef_t;
81 
82 typedef struct vidmode_s {
83  int width, height;
84  int mode;
85 } vidmode_t;
86 
88 extern memPool_t* vid_imagePool;
89 extern memPool_t* vid_lightPool;
90 extern memPool_t* vid_modelPool;
91 
92 extern viddef_t viddef; /* global video state */
93 
94 extern cvar_t* vid_fullscreen;
95 extern cvar_t* vid_stretch;
96 extern cvar_t* vid_mode;
97 extern cvar_t* vid_gamma;
98 extern cvar_t* vid_ignoregamma;
99 extern cvar_t* vid_grabmouse;
100 
101 /* Video module initialisation etc */
102 void VID_Init(void);
103 void VID_Minimize(void);
104 int VID_GetModeNums(void);
105 bool VID_GetModeInfo(int modeIndex, vidmode_t* modeInfo);
int width
Definition: cl_video.h:83
cvar_t * vid_gamma
Definition: cl_video.cpp:40
int swapinterval
Definition: cl_video.h:49
This is a cvar definition. Cvars can be user modified and used in our menus e.g.
Definition: cvar.h:71
memPool_t * vid_imagePool
Definition: cl_main.cpp:88
float rx
Definition: cl_video.h:71
cvar_t * vid_fullscreen
Definition: cl_video.cpp:37
unsigned width
Definition: cl_video.h:44
Contains the game screen context, everything that is needed to create the graphic context...
Definition: cl_video.h:43
cvar_t * vid_grabmouse
Definition: cl_video.cpp:39
cvar_t * vid_ignoregamma
Definition: cl_video.cpp:41
bool fullscreen
Definition: cl_video.h:47
void VID_Minimize(void)
Definition: cl_video.cpp:147
bool VID_GetModeInfo(int modeIndex, vidmode_t *modeInfo)
Definition: cl_video.cpp:88
bool stretch
Definition: cl_video.h:69
viddef_t viddef
Definition: cl_video.cpp:34
void VID_Init(void)
Definition: cl_video.cpp:159
int VID_GetModeNums(void)
Returns the amount of available video modes.
Definition: cl_video.cpp:81
viddefContext_t context
Definition: cl_video.h:67
struct vidmode_s vidmode_t
cvar_t * vid_mode
Definition: cl_video.cpp:38
Contains the game screen size and drawing scale.
Definition: cl_video.h:66
cvar_t * vid_stretch
Definition: cl_video.cpp:36
int y
Definition: cl_video.h:76
int virtualWidth
Definition: cl_video.h:74
unsigned height
Definition: cl_video.h:45
float ry
Definition: cl_video.h:72
int height
Definition: cl_video.h:83
int mode
Definition: cl_video.h:84
memPool_t * vid_modelPool
Definition: cl_main.cpp:90
memPool_t * vid_genericPool
Definition: cl_main.cpp:87
memPool_t * vid_lightPool
Definition: cl_main.cpp:89