Copied from the "map" autocompletion code, now I should probably refactor because most of the code could be shared.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1152 af15c1b1-3010-417e-b628-4374ebc0bcbd
This is consistent with toggling the in-game console off, and fixes stray '`' or '~' (or '^' or '\' or ..., depending on the keyboard layout) characters.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1116 af15c1b1-3010-417e-b628-4374ebc0bcbd
* in_sdl.c: Remove the over-zealous "no events for unknown keys" checks introduced in r1085. Events for unknown keys can be useful for "press any key" situations.
* keys.c: In input grab mode, update the "lastkey" member only for key down events.
* keys.c/console.c: Adapt input grab mode to properly support catching "any key" presses.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1089 af15c1b1-3010-417e-b628-4374ebc0bcbd
to unpredictable results. Use a new procedure COM_AddExtension()
which appends the given extension to the path if the one it has,
if any, doesn't match. In Host_Game_f(), reject "." as the path.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@902 af15c1b1-3010-417e-b628-4374ebc0bcbd
support for C-style /*..*/ comments in COM_Parse(). some whitespace
tidy-up.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@795 af15c1b1-3010-417e-b628-4374ebc0bcbd
do not set messagemode when not really connected. made chat_buffer[] and
chat_bufferlen static to keys.c. console.c uses new Key_GetChatBuffer()
and Key_GetChatMsgLen() accessor functions. renamed team_message global
to chat_team as in qw/q2. added Key_EndChat() as a new helper. called
Key_EndChat() from within CL_Disconnect() to not get stuck in chat mode.
now that key_message is guaranteed to be set only in game mode, removed
its cases from Key_ForceDest(). several other cleanups.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@771 af15c1b1-3010-417e-b628-4374ebc0bcbd
(Enter "r_nolerp_list" in the console for an example.)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@595 af15c1b1-3010-417e-b628-4374ebc0bcbd
Cvar_FindVarAfter. Don't expose cvar_vars directly and use Cvar_FindVarAfter
instead. several typo fixes, etc.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@570 af15c1b1-3010-417e-b628-4374ebc0bcbd
- removed the archive and server members of cvar_t structure
which are now represented by the CVAR_ARCHIVE, CVAR_NOTIFY
and CVAR_SERVERINFO flags.
- added new Cvar_SetROM and Cvar_SetValueROM functions to
set vars marked as CVAR_ROM (read-only vars) programaticaly
- added Cvar_SetCallback() as a new function to assign (or
remove) a callback function to a cvar.
- changed Cvar_RegisterVariable() to only accept a var pointer
as in original quake
- moved notification handling from Cvar_Set() to callbacks.
- changed Cvar_Set() so that it doesn't reallocate the var's
string buffer if nothing is changed, nor does it run the
var's callback.
- changed the 'registered' and 'cmdline' cvars to be read-only
so that the users can't change it using the console. (and
with 'registered' flagged as CVAR_ROM, the 'static_registered'
thing is no longer required)
- added comment that sending cmdline upon CCREQ_RULE_INFO is
evil...
- more to follow later.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@566 af15c1b1-3010-417e-b628-4374ebc0bcbd
you know..) and adjusted all callers accordingly. changed Sys_Sleep() to
take a milliseconds argument, added implementations for unix (usleep) and
windows (Sleep).
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@512 af15c1b1-3010-417e-b628-4374ebc0bcbd
It was a legacy from Quake who used to open and close the log file on every
write. Commented out the unlink() call and added O_TRUNC to the open flags.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@476 af15c1b1-3010-417e-b628-4374ebc0bcbd
removed the inline versions which only handled integers. moved CLAMP
macro to common.h. Adjusted all places for the renamed macros.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@386 af15c1b1-3010-417e-b628-4374ebc0bcbd
* Quake/console.c, net_udp.c: replace snprintf by q_snprintf.
* Quake/common.h: Define q_snprintf as _snprintf for windows and as
snprintf for all others. Likewise for q_vsnprintf. Disable several
MSVC warnings. Define fmin and fmax as min and max macros for MSVC.
* Windows/quakespasm.vcproj, quakespasm.sln: Add Visual Studio 2005
project files.
* Windows/SDL_x64.zip: Add SDL x64 import libraries for MSVC.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@281 af15c1b1-3010-417e-b628-4374ebc0bcbd
from uhexen2. Moved debug log initialization from Con_Init() to LOG_Init().
Made Con_DebugLog() to operate without varargs stuff. Log file is written
into host_parms->basedir now, not into a gamedir.
console.h: Added prototypes for LOG_Init() and LOG_Close().
host.c (Host_Init): Added LOG_Init().
(Host_Shutdown): Added LOG_Close().
quakedef.h (quakeparms_t): Moved the typedef to an earlier place before
any of the other quake headers are included.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@159 af15c1b1-3010-417e-b628-4374ebc0bcbd
Con_DPrintf2, Con_SafePrintf, Con_CenterPrintf, Con_LogCenterPrint,
Con_NotifyBox, PL_ErrorDialog, PR_RunError, Host_EndGame, Host_Error,
SV_ClientPrintf, SV_BroadcastPrintf, Host_ClientCommands, Sys_DebugLog,
Sys_Error, Sys_Printf, BOPS_Error and va. Added noreturn attribute to
Sys_Error, Sys_Quit, BOPS_Error, PR_RunError, Host_EndGame and Host_Error.
Added format printf attribute to Con_DebugLog, Con_Printf, Con_Warning,
Con_DPrintf, Con_DPrintf2, Con_SafePrintf, Con_CenterPrintf, PL_ErrorDialog,
PR_RunError, Host_EndGame, Host_Error, SV_ClientPrintf, SV_BroadcastPrintf,
Host_ClientCommands, Sys_DebugLog, Sys_Error, Sys_Printf and va. Adjusted
Host_Status_f and NET_Ban_f for the new attributes. Fixed broken format
strings in Con_Dump_f, Mod_LoadTexinfo, PR_AllocStringSlots and FloorDivMod.
Defined __attribute__ macros in quakedef.h so that we don't break non-gcc
compilers.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@154 af15c1b1-3010-417e-b628-4374ebc0bcbd
been happening with the argument completion for the changelevel command after
the completion changes. from Steven.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@75 af15c1b1-3010-417e-b628-4374ebc0bcbd
commands. this is not a true argument completion, only a tiny hack for the
two aforementioned commands.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@65 af15c1b1-3010-417e-b628-4374ebc0bcbd
more like bash, showing the maximum matching partial at the first time instead
of auto-completing to the first match.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@64 af15c1b1-3010-417e-b628-4374ebc0bcbd
net_sdlnet.c, sys_sdl.c: a lot of space-to-tab whitespace tidy-ups in the
files created or touched by the SDL port. no actual code change.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@43 af15c1b1-3010-417e-b628-4374ebc0bcbd
use the QUAKESPASM_VER_PATCH to append to the FITZQUAKE_VERSION.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@30 af15c1b1-3010-417e-b628-4374ebc0bcbd