UFO: Alien Invasion
Loading...
Searching...
No Matches
cl_camera.h
Go to the documentation of this file.
1
4
5/*
6All original material Copyright (C) 2002-2025 UFO: Alien Invasion.
7
8Original file from Quake 2 v3.21: quake2-2.31/client/cl_input.c
9Copyright (C) 1997-2001 Id Software, Inc.
10
11This program is free software; you can redistribute it and/or
12modify it under the terms of the GNU General Public License
13as published by the Free Software Foundation; either version 2
14of the License, or (at your option) any later version.
15
16This program is distributed in the hope that it will be useful,
17but WITHOUT ANY WARRANTY; without even the implied warranty of
18MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19
20See the GNU General Public License for more details.
21
22You should have received a copy of the GNU General Public License
23along with this program; if not, write to the Free Software
24Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
26*/
27
28#pragma once
29
41
42#define FOV 75.0
43#define CAMERA_START_DIST 600
44#define CAMERA_START_HEIGHT UNIT_HEIGHT * 1.5
45#define CAMERA_LEVEL_HEIGHT UNIT_HEIGHT
46
47extern cvar_t* cl_centerview;
48extern cvar_t* cl_camzoommax;
49extern cvar_t* cl_camzoommin;
51
52extern const float MIN_ZOOM, MAX_ZOOM;
53
54void CL_CameraInit(void);
55void CL_CameraMove(void);
56void CL_CameraRoute(const pos3_t from, const pos3_t target);
57void CL_CheckCameraRoute(const pos3_t from, const pos3_t target);
58void CL_CameraZoomIn(void);
59void CL_CameraZoomOut(void);
cvar_t * cl_centerview
Definition cl_camera.cpp:69
cvar_t * cl_camzoommax
Definition cl_camera.cpp:66
cvar_t * cl_camzoommin
Definition cl_camera.cpp:68
cvar_t * cl_camzoomquant
Definition cl_camera.cpp:67
const float MAX_ZOOM
Definition cl_camera.cpp:44
const float MIN_ZOOM
Definition cl_camera.cpp:40
void CL_CheckCameraRoute(const pos3_t from, const pos3_t target)
Only moves the camera to the given target location if its not yet close enough.
void CL_CameraMove(void)
Update the camera position. This can be done in two different reasons. The first is the user input,...
Definition cl_camera.cpp:93
void CL_CameraRoute(const pos3_t from, const pos3_t target)
Interpolates the camera movement from the given start point to the given end point.
void CL_CameraZoomIn(void)
Zooms the scene of the battlefield in.
void CL_CameraZoomOut(void)
Zooms the scene of the battlefield out.
void CL_CameraInit(void)
vec3_t camorg
Definition cl_camera.h:32
float lerplevel
Definition cl_camera.h:38
vec3_t origin
Definition cl_camera.h:31
vec3_t axis[3]
Definition cl_camera.h:36
float zoom
Definition cl_camera.h:39
vec3_t angles
Definition cl_camera.h:34
vec3_t speed
Definition cl_camera.h:33
vec3_t omega
Definition cl_camera.h:35
This is a cvar definition. Cvars can be user modified and used in our menus e.g.
Definition cvar.h:71
pos_t pos3_t[3]
Definition ufotypes.h:58
vec_t vec3_t[3]
Definition ufotypes.h:39