Commit Graph

65 Commits

Author SHA1 Message Date
Shpoike 7a97911ff4 Merge tag 'quakespasm-0.94.5' into qss 2022-07-15 14:11:03 +01:00
Ozkan Sezer 6c9bde021c Con_Init: don't use function calls from q_max() macro. 2022-06-02 14:33:10 +03:00
Shpoike 54538a054a Menuqc support. Only tested against menusys so far. 2021-08-31 04:59:12 +01:00
Spike fe4b224c7d Added support for simple csqc.
This is a subset of csqc, with alternative entry points that can be invoked by compat wrappers.

Also added sv_gameplayfix_setmodelrealbox cvar. Default value of 1 matches QuakeSpasm, whereas a value of 0 matches vanilla quake's behaviour.
2021-08-31 04:59:11 +01:00
Spike d76ca606bf All changes present in QSS-R7, plus
md3 support
quoth/etc bug fix
strzone bug fix
png/jpg replacement wall textures
rewrote mdl rendering to always use arrays, relaxing vertex+tri limits.
removed static ents limit
fixed ambient_level not working at high framerates.
2021-08-31 04:59:11 +01:00
Ozkan Sezer e62db0b9fb console.c (Con_TabComplete): don't change the length counter in arg completion.
issue seems to have been added in v0.90.1.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1560 af15c1b1-3010-417e-b628-4374ebc0bcbd
2018-02-16 05:57:54 +00:00
Ozkan Sezer 3cf6946ebd revise the function attributes usage: do not use the gcc __attribute__
directly, but define proper macros for each attribute we do or may use.
also support MSC along the way for example with the noreturn attribute.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1440 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-28 12:50:10 +00:00
Eric Wasylishen f5fdc1867d raise CON_TEXTSIZE from 64KB to 1MB
useful for capturing debug info e.g. "entities" command which prints
a lot.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1431 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-22 01:56:38 +00:00
Eric Wasylishen e30910131c Move filelist_item_t struct to quakedef.h, instead of redefining
it in console.c and host_cmd.c

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1411 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-06-12 02:18:55 +00:00
Eric Wasylishen d09bbd2cd7 console.c: use q_snprintf for printing version number
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1409 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-05-29 06:54:14 +00:00
Eric Wasylishen e45de4c68a Add QUAKESPASM_VER_SUFFIX macro for marking betas/dev builds.
Refactor printing of QUAKESPASM_VERSION/QUAKESPASM_VER_PATCH to use a new
QUAKESPASM_VER_STRING macro.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1408 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-05-29 04:17:49 +00:00
Eric Wasylishen 197127fc97 Add autocompletion for "timedemo" command's demo name
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1372 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-01-17 22:38:12 +00:00
Ozkan Sezer f857cd4669 constify arg_completion_type_t->command
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1242 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-08-23 09:51:35 +00:00
Eric Wasylishen 0ba423061b Add filename tab-completion for "playdemo" and "record" commands
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1219 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-05-30 02:28:58 +00:00
Eric Wasylishen 1f3c1a711a Make "exceeds standard limit of" messages only display when developer cvar is set, with a new Con_DWarning function.
Have heard these are confusing players and mappers/modders; people assume there is an error or a limit in QS is exceeded, but the messages are only about exceeding the limits in vanilla WinQuake/GLQuake.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1211 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-05-25 01:48:03 +00:00
Eric Wasylishen a568c712c1 tab completion: lower size of filelist_item_t name buffer from MAX_OSPATH to 32 to avoid filling up the zone memory (this limits the length of maps / games you can tab-complete).
Prior to r1153 it was 32 for maps and MAX_OSPATH for mods.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1158 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-01-26 23:35:55 +00:00
Eric Wasylishen c31fb37b20 Refactor argument completion for "game" and "map" so all of the code is shared.
TODO: currently using a char[MAX_OSPATH] buffer to store map/mod names in the completion list which is probably unnecessairly large

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1153 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-01-24 08:26:14 +00:00
Eric Wasylishen f0778c45b5 Autocompletion of mod names for the "game" command.
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
2015-01-24 07:02:47 +00:00
Sander van Dijk 25d630c1b8 console.c: When toggling the fullscreen console off, clear the current line.
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
2014-10-15 06:06:18 +00:00
Ozkan Sezer 039fdaad6f minor whitespace adjustments
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1101 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-11 19:11:40 +00:00
Sander van Dijk 745c643ef2 input: Some more tuning.
* 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
2014-10-06 06:09:42 +00:00
Sander van Dijk 8d0cb0086a input: More text input restructuring.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1077 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-02 19:00:42 +00:00
Ozkan Sezer b9032b7815 copyright years, general tidy-up, remove unused d_ifacea.h.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1059 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-22 08:55:46 +00:00
Ozkan Sezer ad2905b5e4 bumped version to 0.90.0
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1033 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-16 09:05:36 +00:00
Ozkan Sezer 53e10c7098 Avoid using COM_DefaultExtension() whenever possible: it may lead
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
2014-04-26 07:50:54 +00:00
Sander van Dijk 64f3091f05 rename the modestate_t enum items
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@805 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-13 19:07:19 +00:00
Sander van Dijk 103f041614 remove "type" from "viddef_t", use "modestate" instead
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@804 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-13 19:01:26 +00:00
Ozkan Sezer 3011dbfe35 fix quoted strings when EOF is reached before the closing '\"' and
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
2013-01-16 19:02:23 +00:00
Ozkan Sezer cf30d683d0 renamed Key_ForceDest to Key_UpdateForDest. added M_Menu_Main_f()
prototype to menu.h. minor tidy-ups.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@775 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-23 08:44:20 +00:00
Ozkan Sezer 9a78c9e829 some merges from uhexen2: clean up some crap in long chat line support.
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
2012-10-21 09:55:16 +00:00
Sander van Dijk 892aa73db0 console.c: fix skipping of first match when tab-completing
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@758 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-01 03:55:45 +00:00
Sander van Dijk 4ba7ad73b6 console.c: move some externals to a better place
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@757 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-01 03:13:40 +00:00
Sander van Dijk f2a2cd3fcf Style
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@749 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-30 08:23:00 +00:00
Ozkan Sezer 2f9fcd69b7 console.c (Con_TabComplete): eliminated string buffer overflow issues.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@735 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-27 09:55:41 +00:00
Sander van Dijk 296dc11b52 console.c:Con_DrawInput(): some changes for correctness and simplicity
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@603 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-07 13:21:42 +00:00
Sander van Dijk dc9166c3b8 console.c: some long input line fixes (keep cursor on screen, don't clip line early, buffer size fix)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@598 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-06 21:25:42 +00:00
Sander van Dijk f704084539 Console word wrap fix: only check and wrap at word boundaries, not in the middle of a word.
(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
2012-01-03 18:03:51 +00:00
Ozkan Sezer 19953bd399 silenced -Wsign-compare warnings.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@575 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-29 19:06:08 +00:00
Ozkan Sezer b09ee296a7 more cvar cleanups: Added Cvar_LockVar, Cvar_UnlockVar, Cvar_UnlockAll and
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
2011-12-29 12:28:21 +00:00
Ozkan Sezer 1928f2e1b8 * first shot at cvar flag system and cvar layer clean-ups :
- 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
2011-12-28 22:01:33 +00:00
Ozkan Sezer 983af887bf changed many sprintf() calls into q_snprintf().
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@557 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-27 10:50:42 +00:00
Ozkan Sezer 07b572b642 better buffer size safety with COM_StripExtension, COM_FileBase and COM_DefaultExtension
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@554 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-27 08:04:02 +00:00
Ozkan Sezer 2b919188d6 renamed Sys_FloatTime to Sys_DoubleTime (the thing always returned double
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
2011-12-12 16:01:01 +00:00
Ozkan Sezer 0c82fbc646 console.c (LOG_Init): Removed the O_APPEND flag when opening the log file.
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
2011-08-03 19:30:37 +00:00
Ozkan Sezer 250fa2b7ce check for arguments to several command line options. patch from Sander van Dijk.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@446 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-04-19 18:29:41 +00:00
Ozkan Sezer 945262b863 min/max macros: renamed them to q_min and q_max, moved them common.h.
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
2011-01-10 10:35:40 +00:00
Ozkan Sezer 7aa88b97a4 * console.c, sbar.c: fixed a few format string issues.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@337 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-09-20 08:27:20 +00:00
Ozkan Sezer e08d6cf1e3 replaced all usess of vsprintf by q_vsnprintf
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@320 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-31 16:57:12 +00:00
Ozkan Sezer 906df3f650 const correctness changes.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@300 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 02:22:55 +00:00
Ozkan Sezer d8779f7d0d MS Visual Studio support:
* 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
2010-08-20 02:25:22 +00:00