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