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