UFO: Alien Invasion
Loading...
Searching...
No Matches
cl_video.h
Go to the documentation of this file.
1
5
6/*
7All original material Copyright (C) 2002-2025 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#define VID_POS_UNSET -99999
38
44typedef struct {
45 long left;
46 long top;
47 unsigned width;
48 unsigned height;
49 int mode;
54
69typedef struct {
71
72 bool stretch;
73
74 float rx;
75 float ry;
76
78
83} viddef_t;
84
85typedef struct vidmode_s {
87 int mode;
88} vidmode_t;
89
94
95extern viddef_t viddef; /* global video state */
96
98extern cvar_t* vid_stretch;
99extern cvar_t* vid_mode;
100extern cvar_t* vid_gamma;
101extern cvar_t* vid_ignoregamma;
102extern cvar_t* vid_grabmouse;
103
104/* Video module initialisation etc */
105void VID_Init(void);
106void VID_Minimize(void);
107int VID_GetModeNums(void);
108bool VID_GetModeInfo(int modeIndex, vidmode_t* modeInfo);
memPool_t * vid_genericPool
Definition cl_main.cpp:87
memPool_t * vid_imagePool
Definition cl_main.cpp:88
memPool_t * vid_modelPool
Definition cl_main.cpp:90
memPool_t * vid_lightPool
Definition cl_main.cpp:89
cvar_t * vid_grabmouse
Definition cl_video.cpp:39
cvar_t * vid_gamma
Definition cl_video.cpp:40
cvar_t * vid_fullscreen
Definition cl_video.cpp:37
cvar_t * vid_stretch
Definition cl_video.cpp:36
viddef_t viddef
Definition cl_video.cpp:34
cvar_t * vid_mode
Definition cl_video.cpp:38
cvar_t * vid_ignoregamma
Definition cl_video.cpp:41
void VID_Minimize(void)
Definition cl_video.cpp:150
void VID_Init(void)
Definition cl_video.cpp:158
bool VID_GetModeInfo(int modeIndex, vidmode_t *modeInfo)
Definition cl_video.cpp:91
int VID_GetModeNums(void)
Returns the amount of available video modes.
Definition cl_video.cpp:84
Cvar (console variable) header file.
Memory handling with sentinel checking and pools with tags for grouped free'ing.
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:69
int virtualHeight
Definition cl_video.h:77
float ry
Definition cl_video.h:75
int viewHeight
Definition cl_video.h:79
int x
Definition cl_video.h:79
int viewWidth
Definition cl_video.h:79
bool stretch
Definition cl_video.h:72
int y
Definition cl_video.h:79
int virtualWidth
Definition cl_video.h:77
float rx
Definition cl_video.h:74
viddefContext_t context
Definition cl_video.h:70
Contains the game screen context, everything that is needed to create the graphic context....
Definition cl_video.h:44
unsigned width
Definition cl_video.h:47
unsigned height
Definition cl_video.h:48
int height
Definition cl_video.h:86
int mode
Definition cl_video.h:87
int width
Definition cl_video.h:86
Cross-platform type definitions.