mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-29 23:22:01 +00:00
b9cd6ec91b
_pext_vrinputs: added cvar to enable vr inputs protocol extension allowing vr inputs to be networked to ssqc too. defaults to 0 for now, will be renamed when deemed final. updates menu: the prompt to enable sources is now more explicit instead of expecting the user to have a clue. updates menu: added a v3 sources format, which should be more maintainable. not final. updates menu: try to give reasons why sources might be failing (to help blame ISPs if they try fucking over TTH dns again). presets menu: no longer closes the instant a preset is chosen. some presets have a couple of modifiers listed. force the demo loop in the background to serve as a preview. prompts menus: now does word wrapping. ftemaster: support importing server lists from other master servers (requested by Eukara). server: try to detect when non-reply inbound packets are blocked by firewalls/nats/etc (using ftemaster to do so). qcvm: added pointcontentsmask builtin, allowing it to probe more than just world, with fte's full contentbit range instead of just q1 legacy. qcvm: memfill8 builtin now works on createbuffer() pointers. qcvm: add missing unsigned ops. Fixed double comparison ops. fixed bug with op_store_i64. added missing OP_LOADP_I64 qcc: added '#pragma framerate RATE' for overriding implicit nextthink durations. qcc: fixed '#pragma DONT_COMPILE_THIS_FILE' to not screw up comments. qcc: added __GITURL__ __GITHASH__ __GITDATE__ __GITDATETIME__ __GITDESC__ for any mods that might want to make use of that. qcc: fix up -Fhashonly a little setrenderer: support for vulkan gpu enumeration. rulesets: reworked to support custom rulesets (using hashes to catch haxxors, though still nothing prevents just changing the client to ignore rulesets) bspx: use our BIH code for the bspx BRUSHLIST lump instead of the older less efficient code. (static)iqm+obj: these model formats can now be used for the worldmodel (with a suitable .ent file). Also using BIH for much better collision performance. pmove: tried to optimise PM_NudgePosition, should boost fps in stress tests. wayland: fix a crash on startup. mousegrabs now works better. imagetool: uses sdl for previews. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5813 fc73d0e0-1445-4013-8a0c-d673dee63da5
84 lines
3.4 KiB
C
84 lines
3.4 KiB
C
/*
|
|
Copyright (C) 1996-1997 Id Software, Inc.
|
|
|
|
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 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.
|
|
|
|
*/
|
|
// input.h -- external (non-keyboard) input devices
|
|
|
|
void IN_ReInit (void);
|
|
|
|
void IN_Init (void);
|
|
float IN_DetermineMouseRate(void);
|
|
|
|
void IN_Shutdown (void);
|
|
|
|
void IN_Commands (void);
|
|
// oportunity for devices to stick commands on the script buffer
|
|
|
|
qboolean IN_MouseDevIsTouch(unsigned int devid); //check if a mouse devid is a touch screen, and thus if we should check the cursor and simulate a ui event or not
|
|
int IN_TranslateMButtonPress(unsigned int devid); //allow the touchscreen code to swallow mouse1 as a begin-looking event
|
|
|
|
void IN_Move (float *movements, int pnum, float frametime);
|
|
// add additional movement on top of the keyboard move cmd
|
|
|
|
extern cvar_t in_xflip;
|
|
|
|
extern float mousecursor_x, mousecursor_y;
|
|
extern float mousemove_x, mousemove_y;
|
|
|
|
void IN_ActivateMouse(void);
|
|
void IN_DeactivateMouse(void);
|
|
|
|
int CL_TargettedSplit(qboolean nowrap);
|
|
|
|
//specific events for the system-specific input code to call. may be called outside the main thread (so long as you don't call these simultaneously - ie: use a mutex or only one input thread).
|
|
void IN_KeyEvent(unsigned int devid, int down, int keycode, int unicode); //don't use IN_KeyEvent for mice if you ever use abs mice...
|
|
void IN_MouseMove(unsigned int devid, int abs, float x, float y, float z, float size);
|
|
void IN_JoystickAxisEvent(unsigned int devid, int axis, float value);
|
|
void IN_Accelerometer(unsigned int devid, float x, float y, float z);
|
|
void IN_Gyroscope(unsigned int devid, float pitch, float yaw, float roll);
|
|
qboolean IN_SetHandPosition(const char *devname, vec3_t org, vec3_t ang, vec3_t vel, vec3_t avel);
|
|
|
|
//system-specific functions
|
|
void INS_Move (void);
|
|
void INS_Accumulate (void);
|
|
void INS_ClearStates (void);
|
|
void INS_ReInit (void);
|
|
void INS_Init (void);
|
|
void INS_Shutdown (void);
|
|
void INS_Commands (void); //final chance to call IN_MouseMove/IN_KeyEvent each frame
|
|
void INS_EnumerateDevices(void *ctx, void(*callback)(void *ctx, const char *type, const char *devicename, unsigned int *qdevid));
|
|
void INS_SetupControllerAudioDevices(qboolean enabled); //creates audio devices for each controller (where controllers have their own audio devices)
|
|
|
|
#define DEVID_UNSET ~0u
|
|
|
|
extern cvar_t cl_nodelta;
|
|
extern cvar_t cl_c2spps;
|
|
extern cvar_t cl_c2sImpulseBackup;
|
|
extern cvar_t cl_netfps;
|
|
extern cvar_t cl_sparemsec;
|
|
extern cvar_t cl_queueimpulses;
|
|
extern cvar_t cl_smartjump;
|
|
extern cvar_t cl_run;
|
|
extern cvar_t cl_fastaccel;
|
|
extern cvar_t cl_rollspeed;
|
|
extern cvar_t cl_prydoncursor;
|
|
extern cvar_t cl_instantrotate;
|
|
extern cvar_t in_xflip;
|
|
extern cvar_t in_windowed_mouse; //if 0, uses absolute mouse coords allowing the mouse to be used for other programs too. ignored when fullscreen (and reliable).
|
|
extern cvar_t prox_inmenu;
|
|
extern cvar_t cl_forceseat;
|