UFO: Alien Invasion
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
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
;
48
int
multisample
;
49
int
swapinterval
;
50
}
viddefContext_t
;
51
66
typedef
struct
{
67
viddefContext_t
context
;
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
87
extern
memPool_t
*
vid_genericPool
;
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);
memPool_t
Definition:
mem.cpp:55
vidmode_s::width
int width
Definition:
cl_video.h:83
vidmode_s
Definition:
cl_video.h:82
vid_gamma
cvar_t * vid_gamma
Definition:
cl_video.cpp:40
viddefContext_t::swapinterval
int swapinterval
Definition:
cl_video.h:49
cvar_s
This is a cvar definition. Cvars can be user modified and used in our menus e.g.
Definition:
cvar.h:71
vid_imagePool
memPool_t * vid_imagePool
Definition:
cl_main.cpp:88
viddef_t::rx
float rx
Definition:
cl_video.h:71
vid_fullscreen
cvar_t * vid_fullscreen
Definition:
cl_video.cpp:37
viddefContext_t::width
unsigned width
Definition:
cl_video.h:44
viddefContext_t
Contains the game screen context, everything that is needed to create the graphic context...
Definition:
cl_video.h:43
vid_grabmouse
cvar_t * vid_grabmouse
Definition:
cl_video.cpp:39
vid_ignoregamma
cvar_t * vid_ignoregamma
Definition:
cl_video.cpp:41
viddefContext_t::mode
int mode
Definition:
cl_video.h:46
viddefContext_t::fullscreen
bool fullscreen
Definition:
cl_video.h:47
VID_Minimize
void VID_Minimize(void)
Definition:
cl_video.cpp:147
VID_GetModeInfo
bool VID_GetModeInfo(int modeIndex, vidmode_t *modeInfo)
Definition:
cl_video.cpp:88
viddef_t::stretch
bool stretch
Definition:
cl_video.h:69
viddef
viddef_t viddef
Definition:
cl_video.cpp:34
VID_Init
void VID_Init(void)
Definition:
cl_video.cpp:159
VID_GetModeNums
int VID_GetModeNums(void)
Returns the amount of available video modes.
Definition:
cl_video.cpp:81
viddef_t::context
viddefContext_t context
Definition:
cl_video.h:67
vidmode_t
struct vidmode_s vidmode_t
vid_mode
cvar_t * vid_mode
Definition:
cl_video.cpp:38
viddefContext_t::multisample
int multisample
Definition:
cl_video.h:48
viddef_t
Contains the game screen size and drawing scale.
Definition:
cl_video.h:66
vid_stretch
cvar_t * vid_stretch
Definition:
cl_video.cpp:36
viddef_t::y
int y
Definition:
cl_video.h:76
viddef_t::virtualWidth
int virtualWidth
Definition:
cl_video.h:74
viddefContext_t::height
unsigned height
Definition:
cl_video.h:45
viddef_t::ry
float ry
Definition:
cl_video.h:72
vidmode_s::height
int height
Definition:
cl_video.h:83
vidmode_s::mode
int mode
Definition:
cl_video.h:84
vid_modelPool
memPool_t * vid_modelPool
Definition:
cl_main.cpp:90
vid_genericPool
memPool_t * vid_genericPool
Definition:
cl_main.cpp:87
vid_lightPool
memPool_t * vid_lightPool
Definition:
cl_main.cpp:89
src
client
cl_video.h
Generated on Mon Feb 24 2020 05:28:04 for UFO: Alien Invasion by
1.8.8