00001 00005 /* 00006 All original material Copyright (C) 2002-2010 UFO: Alien Invasion. 00007 00008 Original file from Quake 2 v3.21: quake2-2.31/client/cl_input.c 00009 Copyright (C) 1997-2001 Id Software, Inc. 00010 00011 This program is free software; you can redistribute it and/or 00012 modify it under the terms of the GNU General Public License 00013 as published by the Free Software Foundation; either version 2 00014 of the License, or (at your option) any later version. 00015 00016 This program is distributed in the hope that it will be useful, 00017 but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00019 00020 See the GNU General Public License for more details. 00021 00022 You should have received a copy of the GNU General Public License 00023 along with this program; if not, write to the Free Software 00024 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00025 00026 */ 00027 00028 #ifndef CL_CAMERA_H 00029 #define CL_CAMERA_H 00030 00031 typedef struct { 00032 vec3_t origin; 00033 vec3_t camorg; 00034 vec3_t speed; 00035 vec3_t angles; 00036 vec3_t omega; 00037 vec3_t axis[3]; 00039 float lerplevel; 00040 float zoom; 00041 } camera_t; 00042 00043 #define FOV 75.0 00044 #define CAMERA_START_DIST 600 00045 #define CAMERA_START_HEIGHT UNIT_HEIGHT * 1.5 00046 #define CAMERA_LEVEL_HEIGHT UNIT_HEIGHT 00047 00048 extern cvar_t *cl_centerview; 00049 extern cvar_t *cl_camzoommax; 00050 extern cvar_t *cl_camzoommin; 00051 extern cvar_t *cl_camzoomquant; 00052 00053 extern const float MIN_ZOOM, MAX_ZOOM; 00054 00055 void CL_CameraInit(void); 00056 void CL_CameraMove(void); 00057 void CL_CameraRoute(const pos3_t from, const pos3_t target); 00058 void CL_CameraZoomIn(void); 00059 void CL_CameraZoomOut(void); 00060 00061 #endif 00062