2004-08-23 00:15:46 +00:00
/*
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
2006-05-10 22:12:20 +00:00
void IN_ReInit ( void ) ;
2004-08-23 00:15:46 +00:00
void IN_Init ( void ) ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
float IN_DetermineMouseRate ( void ) ;
2004-08-23 00:15:46 +00:00
void IN_Shutdown ( void ) ;
void IN_Commands ( void ) ;
// oportunity for devices to stick commands on the script buffer
2016-07-21 19:27:59 +00:00
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
2014-03-30 08:55:06 +00:00
void IN_Move ( float * movements , int pnum , float frametime ) ;
2004-08-23 00:15:46 +00:00
// add additional movement on top of the keyboard move cmd
extern cvar_t in_xflip ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
extern float mousecursor_x , mousecursor_y ;
extern float mousemove_x , mousemove_y ;
2010-08-11 23:55:35 +00:00
void IN_ActivateMouse ( void ) ;
2010-08-12 09:04:05 +00:00
void IN_DeactivateMouse ( void ) ;
2010-08-14 03:17:33 +00:00
int CL_TargettedSplit ( qboolean nowrap ) ;
2012-10-14 09:00:49 +00:00
//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).
2016-07-21 19:27:59 +00:00
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 ) ;
2017-10-13 17:50:28 +00:00
void IN_Accelerometer ( unsigned int devid , float x , float y , float z ) ;
void IN_Gyroscope ( unsigned int devid , float pitch , float yaw , float roll ) ;
2021-04-14 05:21:04 +00:00
qboolean IN_SetHandPosition ( const char * devname , vec3_t org , vec3_t ang , vec3_t vel , vec3_t avel ) ;
2012-10-14 09:00:49 +00:00
//system-specific functions
2018-03-04 14:41:16 +00:00
void INS_Move ( void ) ;
2012-10-14 09:00:49 +00:00
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
2016-07-21 19:27:59 +00:00
void INS_EnumerateDevices ( void * ctx , void ( * callback ) ( void * ctx , const char * type , const char * devicename , unsigned int * qdevid ) ) ;
2016-02-10 23:23:43 +00:00
void INS_SetupControllerAudioDevices ( qboolean enabled ) ; //creates audio devices for each controller (where controllers have their own audio devices)
2021-08-04 21:18:04 +00:00
void INS_Rumble ( int joy , quint16_t amp_low , quint16_t amp_high , quint32_t duration ) ;
void INS_RumbleTriggers ( int joy , quint16_t left , quint16_t right , quint32_t duration ) ;
void INS_SetLEDColor ( int id , vec3_t color ) ;
void INS_SetTriggerFX ( int id , const void * data , size_t size ) ;
2016-07-21 19:27:59 +00:00
# define DEVID_UNSET ~0u
2015-03-03 00:14:43 +00:00
2021-06-25 18:50:42 +00:00
extern cvar_t cl_splitscreen ;
2015-03-03 00:14:43 +00:00
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 ;
2019-04-15 18:43:42 +00:00
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).
2015-03-03 00:14:43 +00:00
extern cvar_t prox_inmenu ;
extern cvar_t cl_forceseat ;