mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-27 14:12:25 +00:00
c6c3d3f4e0
Quick hack preliminary d3d11 renderer. I'm not likely to touch this again for quite some time. Sys_Error works properly on android, with an error message shown. Should be less of a stab in the dark if you get errors. Seg faults are still instantly fatal. Not much I can reliably do about those - most of the juicy ones will likely occur within the gl drivers (even if its my fault) and java will still call in to it. Stereoscopic (quad-buffered) rendering is in the gl renderer. You'll likely need a quatro to use it despite it being a gl 1.0 feature. No idea about ati. See r_stereo_method for non-quad-buffered alternatives. Tweaked networking to not overflow so much. Needs testing against other qw clients. Fixed an issue with surface numbers > 32k on limit-breaking maps. Fixed a preparse issue resulting in QW clients dying with the ne_ruins map's progs. Support for the DP-variant of BSP2. The depricated RMQ variant is still supported. QTV proxy now uses ipv6 hybrid sockets where possible. Preliminary pext support. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4105 fc73d0e0-1445-4013-8a0c-d673dee63da5
104 lines
2.4 KiB
C
104 lines
2.4 KiB
C
/*
|
|
|
|
Copyright (C) 2001-2002 A Nourai
|
|
Copyright (C) 2006 Jacek Piszczek (Mac OSX port)
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU General Public License
|
|
as published by the Free Software Foundation; either version 2
|
|
of the License, or (at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
See the included (GNU.txt) GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
#include "quakedef.h"
|
|
|
|
float mouse_x,mouse_y;
|
|
float old_mouse_x,old_mouse_y;
|
|
|
|
cvar_t m_filter = SCVARF("m_filter", "1", CVAR_ARCHIVE);
|
|
|
|
void IN_Init (void)
|
|
{
|
|
Cvar_Register (&m_filter, "input values");
|
|
}
|
|
|
|
void IN_ReInit(void)
|
|
{
|
|
}
|
|
|
|
void IN_Shutdown (void)
|
|
{
|
|
}
|
|
|
|
void IN_Commands (void)
|
|
{
|
|
}
|
|
// oportunity for devices to stick commands on the script buffer
|
|
|
|
void IN_ModeChanged (void)
|
|
{
|
|
}
|
|
// called whenever screen dimensions change
|
|
|
|
void IN_Move (float *movements, int pnum)
|
|
{
|
|
float tx, ty, filterfrac;
|
|
|
|
#ifdef PEXT_CSQC
|
|
if (CSQC_MouseMove(mouse_x, mouse_y, 0))
|
|
{
|
|
mouse_x = 0;
|
|
mouse_y = 0;
|
|
}
|
|
#endif
|
|
|
|
tx = mouse_x;
|
|
ty = mouse_y;
|
|
|
|
if (m_filter.value)
|
|
{
|
|
filterfrac = bound(0, m_filter.value, 1) / 2.0;
|
|
mouse_x = (tx * (1 - filterfrac) + old_mouse_x * filterfrac);
|
|
mouse_y = (ty * (1 - filterfrac) + old_mouse_y * filterfrac);
|
|
}
|
|
|
|
old_mouse_x = tx;
|
|
old_mouse_y = ty;
|
|
|
|
mouse_x *= sensitivity.value;
|
|
mouse_y *= sensitivity.value;
|
|
|
|
if ((in_strafe.state[pnum] & 1) || (lookstrafe.value && in_mlook.state[pnum]))
|
|
{
|
|
movements[1] += m_side.value * mouse_x;
|
|
}
|
|
else
|
|
{
|
|
cl.playerview[pnum].viewanglechange[YAW] -= m_yaw.value * mouse_x;
|
|
}
|
|
|
|
if (in_mlook.state[pnum])
|
|
V_StopPitchDrift(pnum);
|
|
|
|
if (in_mlook.state[pnum] && !(in_strafe.state[pnum] & 1))
|
|
{
|
|
cl.playerview[pnum].viewanglechange[PITCH] += m_pitch.value * mouse_y;
|
|
}
|
|
else
|
|
{
|
|
movements[0] -= m_forward.value * mouse_y;
|
|
}
|
|
|
|
mouse_x = mouse_y = 0.0;
|
|
}
|
|
// add additional movement on top of the keyboard move cmd
|
|
|