Commit Graph

739 Commits

Author SHA1 Message Date
svdijk 70e2c7ded5 Rework the linux icon a bit, also store smaller (indexed color)
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@693 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-07-07 20:14:52 +00:00
sezero 0425d76d98 arch_def.h: Added GNU/Hurd defs.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@692 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-07-07 07:15:23 +00:00
sezero c51b7a899d GNU/Hurd has BSD-style struct sockaddr too (reported by Svante Signell
in debian bug #657793)
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=657793

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@691 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-07-07 05:09:55 +00:00
sezero 28eb6f0150 zone.c: Use memcpy() instead of strcpy() in Hunk_Strdup() and Z_Strdup().
Removed dead Cache_Compact() function. Made mainzone static to zone.c.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@689 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-06-25 14:50:17 +00:00
sezero 3e9ec5f401 updated snd bits from uhexen2. added signed 8 bit format support
to the mixer.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@688 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-06-25 12:50:09 +00:00
sezero 0eb805e919 updated arch_def.h and net_sys.h from uhexen2
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@687 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-06-25 11:51:23 +00:00
sezero e39b2ca3c8 * keys.h: renamed KP_* key macros to K_KP_*.
* key.c (Key_ClearStates): Instead of clearing all key's down state
  and repeat count, run KeyEvent(k,false) keys in down state, which
  will already clear those states for them. This also helps getting
  rid of several actions bound to keypad keys. Minor cleanups.
* gl_vidsdl.c (ClearAllStates): Removed code triggering every key
  with a release event, because we just changed Key_ClearStates() to
  do that for the necessary keys.
* in_sdl.c: Minor cleanups. Made K_KP_5 to send '5' when not in game
  mode, regardless of the numlock status. Moved prev_gamekey to top
  level and call SDL_EnableUNICODE() correctly.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@686 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-06-25 11:20:38 +00:00
svdijk 798b777233 in_sdl.c: Add missing KP_NUMLOCK key event.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@685 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-06-10 06:09:50 +00:00
svdijk 9b86e17502 Small update to r683.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@684 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-06-08 20:06:40 +00:00
svdijk ded49555b1 Re-introduce KP_* syms, but only "in-game".
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@683 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-06-08 19:27:12 +00:00
svdijk 2a36ecd51b pl_linux.c: Set icon only if mask creation is successful.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@682 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-05-30 18:31:41 +00:00
svdijk 66adde7474 Makefile, Makefile.darwin: Remove the not-so-useful "install" target.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@681 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-05-30 17:29:34 +00:00
sezero b5ecc9e636 added missing cast in PL_CreateIconMask() to fix compilation using g++
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@680 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-05-30 10:55:35 +00:00
sezero b3b4432138 Makefiles: defined new variable LINKER. for linkage we no longer use $(CC),
but $(LINKER)

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@679 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-05-30 09:47:45 +00:00
sezero 436f0f980f fix linkage for solaris: needs -lsocket -lnsl -lresolv for network
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@678 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-05-30 09:28:34 +00:00
sezero 08d5e1ac69 removed the SNDDMA_GetSamples() call from snd_dma.c:GetSoundtime() for solaris
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@677 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-05-30 09:00:12 +00:00
sezero aa4c9ebc40 renamed model_t to qmodel_t in order to avoid conflicts on solaris.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@676 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-05-30 08:56:06 +00:00
svdijk 62b1c9267a gl_warp.c: revert part of r653, not really needed.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@675 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-05-27 09:01:55 +00:00
sezero 91a17cce70 minor gl_vidsdl.c cleanups: tidied up VID_SetMode(). Removed the defunct
_windowed_mouse cvar. Simplified va()+Cvar_Set() calls into Cvar_SetValue().

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@673 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-05-21 12:32:20 +00:00
svdijk d9040eefff Minor linux icon tweak.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@672 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-05-17 06:02:50 +00:00
sezero 1120671550 don't print both of the two possible warning messages in PF_VarString()
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@671 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-05-15 16:10:13 +00:00
svdijk 0c9ff95e9b pr_cmds.c: Make PF_VarString's buffer a bit larger (fixes UQC's menu).
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@670 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-05-15 14:41:29 +00:00
svdijk 6bce934ae3 Use new transparent icon for linux (32x32 for now).
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@665 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-05-10 20:21:20 +00:00
svdijk 133184d1ea keys.[ch]: comment out KP_* keys, since we map them to their K_* counterparts
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@663 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-04-23 18:01:47 +00:00
sezero 1b51748596 snd_mp3.c, snd_vorbis.c, snd_wave.c: Make _sure_ that the number
of channels in the music file is supported, i.e. either stereo or
mono. Minor tidy up of the error return paths.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@661 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-04-22 11:02:08 +00:00
sezero 0bc25ece34 removed the envmap command which drew to front buffer. adjusted the
timerefresh command not to draw to the front buffer. also made sure
that there is an active connection when timerefresh is called.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@660 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-04-22 07:55:56 +00:00
svdijk f1554e1f37 in_sdl.c: invert the behaviour of numlock (numbers when on, not when off)
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@659 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-04-20 20:23:55 +00:00
sezero dd9733f870 common.c: until COM_CheckRegistered() is called keep the value of the
registered cvar as 1, set it right in COM_CheckRegistered().  fixes the
problem of registered game installed from later versions of cdroms not
being properly recognized by versions 0.85.6 and 0.85.7.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@658 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-04-20 19:47:22 +00:00
sezero 7b5b0b6502 Limited the struct qsocket_s details only to net_*.c sources :
For menu serverlist handling, added new procedures NET_SlistSort,
NET_SlistPrintServer and NET_SlistPrintServerName. Added new
procedure NET_QSocketGetTime for status and spawn commands' print
functionality in host_cmd.c. Added new NET_QSocketGetAddressString
procedure for status and connect commands' print functionality in
host_cmd.c and sv_main.c.  Patch ported over from uhexen2.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@657 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-04-18 20:33:12 +00:00
sezero f8c136c534 * net_dgrm.c: Fixed the types of testSocket and test2Socket from int
to sys_socket_t.
* updated version date stamp to 2012-04-01.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@656 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-04-01 18:03:25 +00:00
sezero 5c04251a36 cmd.c, gl_texmgr.c, gl_texmgr.h: killed the rest of the -Wsign-compare warnings.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@655 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-03-31 18:30:09 +00:00
sezero ca8b38b076 Added file count and header crc macros for id1/pak0.pak v1.00 and v1.01
so that the corresponding shareware versions actually work properly and
not error out.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@654 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-03-28 17:50:47 +00:00
svdijk 625e9f6518 gl_warp: save some cvars to config.cfg.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@653 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-03-25 19:08:31 +00:00
sezero dee036353f * mathlib.h (IS_NAN): Fixed strict aliasing violation by providing
an inline function using a float/int union instead of the original
  macro.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@650 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-03-24 06:24:56 +00:00
sezero 661379c20a bumped version to 0.85.8 in the development tree
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@648 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-03-14 07:02:41 +00:00
sezero b75db882b0 Moved the stufftext_frame global to client_static_t structure and
adjusted CL_GetDemoMessage and CL_ParseServerMessage accordingly.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@644 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-03-12 08:24:16 +00:00
sezero 1bc8ffdb15 minor Makefile tidying
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@642 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-03-09 10:11:09 +00:00
sezero 5fe60a036b changed the rowbytes, width, height, conwidth and conheight members of
viddef_t from unsigned to signed int. fixed the -Wsign-compare warnings
for NUM_GLMODES. fixed compilation using g++, by adding a missing type
cast.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@641 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-03-08 10:14:58 +00:00
stevenaaus 39f9ad3116 'make install' directory needs trailing slash in order to fail (desired) if directory doesn't exist.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@640 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-03-08 07:17:49 +00:00
sezero 934aeb38e6 cmd.c (Cbuf_InsertText): Unconditionally add a newline after the inserted
text. Fixes executed files without a newline at the end of them eating up
followup commands.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@639 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-03-03 21:55:53 +00:00
sezero 79d0808dca apply anisotropic level setting only to mipmap textures
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@638 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-02-18 22:04:38 +00:00
sezero 89a1c03243 at least use the api sensibly and don't screw the whitespace
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@637 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-02-12 11:33:07 +00:00
stevenaaus 314774c99c common.c
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@636 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-02-12 02:59:21 +00:00
sezero 39965c2472 common.c (COM_FindFile): reverted ultra-hacky revs. 627-629. made it to
report files which aren't found only if developer.value >= 2, i.e. used
Con_DPrintf2 of fitz for the first time since its creation.. would have
been better if I'd implement and use Sys_DPrintf() there.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@634 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-02-11 15:55:09 +00:00
sezero 69a35ba645 gl_texmgr.c (TexMgr_ReloadImage): reduced the hunk memory usage during
reloading of images from the bsp by not loading the whole file but by
opening the file, fseek()ing and allocating only the necessary amount.
This way, I can load and reload a save of ne_ruins with just the default
64 Mb of memory on x86 and with only 68.5 Mb of memory (-heapsize 70000)
on x86_64.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@633 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-02-11 14:30:19 +00:00
sezero f3efdba768 removed the defunct block_drawing global (btw, it was checked incorrectly
in GL_EndRendering()... )

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@632 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-02-10 22:37:07 +00:00
sezero a93c6a90f5 in_sdl.c: fixed backspace key on Mac OS X
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@631 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-02-10 22:04:43 +00:00
svdijk 56f65849c7 make missing texture no-spam hack safer
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@629 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-02-08 18:22:55 +00:00
stevenaaus 5539f60c75 Refine missing texture no-spam hack.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@628 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-02-08 00:53:29 +00:00
stevenaaus c1989375ab Don't spam developers about missing external textures.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@627 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-02-07 20:38:34 +00:00
sezero da21476848 net_sys.h: Add __FreeBSD_kernel__ to the HAVE_SA_LEN list. Debian
bug entry: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=657793

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@625 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-30 10:40:41 +00:00
sezero c2e215c30f snd_mp3.c (mp3_madseek): clang, -Wtautological-compare: fixed the
"comparison of unsigned expression >= 0 is always true" warning for
to_skip_samples.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@624 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-29 19:15:20 +00:00
sezero ea46ad2ca6 gl_vidsdl.c (VID_Init): fixed a -Wparentheses-equality warning from clang
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@623 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-29 18:04:28 +00:00
svdijk 4b284d9547 gl_texmgr.c: less ambiguous naming.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@622 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-24 21:24:14 +00:00
svdijk 81eadc659d gl_texmgr.c: some small improvements and cleanup.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@621 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-23 18:51:12 +00:00
svdijk 2151a3b9ed gl_texmgr.c: make sure "gl_texturemode" starts in sync with "mode".
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@619 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-21 09:51:38 +00:00
svdijk ec91b6a204 gl_texmgr.c: small optimization
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@618 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-20 19:31:18 +00:00
svdijk a398d25020 gl_texmgr.c: Make "gl_texturemode" a cvar with callback.
This has the benefit that it is stored in "config.cfg",
and is reset by "resetall" and "resetcfg". Other than
that though, it behaves exactly the same as before.
(The same console input will lead to the same result
as before when it was a command.)


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@617 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-20 18:59:20 +00:00
sezero 848b6a0911 minor cleanup
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@616 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-20 17:11:24 +00:00
sezero 2b547aefbf make sure gl_max_anisotropy is initialized. also added a uberparanoid check
for gl_max_anisotropy.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@615 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-19 20:55:27 +00:00
sezero d148250fcb some form of a workaround for recursive calling of TexMgr_Anisotropy_f()
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@614 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-19 20:22:29 +00:00
svdijk 2eaf8974b7 gl_screen.c:SCR_ModalMessage(): make sure we don't ignore the next keypress (after a timeout).
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@613 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-19 19:09:23 +00:00
svdijk f53eccda96 When modetesting, redraw the screen before asking for confirmation. Otherwise the screen is just a black rectangle, which may be confusing for the user.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@612 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-18 12:48:09 +00:00
svdijk ec75ca1621 Make the "Reset config" message more informative.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@611 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-18 12:00:35 +00:00
svdijk d16f04cda7 gl_screen.c:SCR_ModalMessage(): sleep a little while busy-waiting.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@610 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-17 08:34:54 +00:00
svdijk 7a574b265e - Rename the "Reset defaults" menu option to "Reset config".
- Make it reset only those cvar's that are saved to config.cfg.
- Make it as the user for confirmation.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@609 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-17 08:25:07 +00:00
sezero e6ebf96d46 SCR_CenterPrint() has been counting the lines in the wrong place: count
the copied string NOT the original.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@607 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-13 19:10:52 +00:00
sezero 8d8f6c108f fixed demo playback covering multiple maps (from Pa3PyX's hexen2 source)
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@604 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-09 08:10:35 +00:00
svdijk 8800a5c8eb console.c:Con_DrawInput(): some changes for correctness and simplicity
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@603 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-07 13:21:42 +00:00
sezero 42d50749e3 tidy up osx mouse acceleration hack a bit more.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@602 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-07 09:22:43 +00:00
sezero 70f452ed47 tidied up whitespace in osx mouse acceleration hack code. fixed declaration
of the new cvar to use the new cvar flags.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@601 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-07 08:50:11 +00:00
kristianduske cce245b688 Applied patch to disable mouse acceleration in Mac OS X.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@599 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-07 08:26:32 +00:00
svdijk e27c150194 console.c: some long input line fixes (keep cursor on screen, don't clip line early, buffer size fix)
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@598 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-06 21:25:42 +00:00
svdijk 95ca642f59 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: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@595 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-03 18:03:51 +00:00
sezero 2aaefce401 bumped version to 0.85.7 in the development tree
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@592 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-01 12:00:16 +00:00
sezero 6325be70be gl_texmgr.c, gl_vidsdl.c: made a lot of functions and variables static.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@584 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-30 14:00:28 +00:00
sezero 862aa71e52 removed some OS-specific drivers. they weren't used and was here only for
reference.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@583 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-30 13:59:14 +00:00
sezero db10cdba6c gl_vidsdl.c (GL_Init): set VID_Changed_f() callback to vid_vsync only if
GL_CheckExtensions() set gl_swap_control as true.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@582 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-30 12:15:19 +00:00
sezero 09ad2e875c gl_vidsdl.c (VID_SyncCvars): set vid_vsync to 1 only if the received value
is positive, not "not zero".

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@579 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-30 00:10:16 +00:00
sezero 299557ebe3 minor typo fixes for vsync related messages.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@578 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-29 23:05:12 +00:00
sezero a653822538 gl_vidsdl.c (VID_Toggle): if SDL_WM_ToggleFullScreen() succeeded, ignore
the vid_fullscreen callback function setting vid_changed to true.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@577 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-29 21:44:36 +00:00
sezero b7bbda4c94 changed some of the Cvar_Set[Value] calls to their *Quick variants in the
source files where the vars are defined.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@576 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-29 21:21:11 +00:00
sezero 9ef1ddb76b silenced -Wsign-compare warnings.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@575 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-29 19:06:08 +00:00
sezero 982070b2c5 cleanup of Cvar_Set[Value] calls in menu.c
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@574 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-29 16:50:45 +00:00
sezero 349c4a81c9 some common.c cleanup: Made COM_InitFilesystem() public through common.h,
moved its calling from COM_Init() to Host_Init() just after COM_Init().
Moved registration of registered and cmdline cvars and COM_Path_f command
and the calling of COM_CheckRegistered() to COM_InitFilesystem(). Removed
unused memsearch(). Fixed the stupidity in leading space elimination from
com_cmdline.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@573 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-29 15:10:18 +00:00
sezero 93fd580b18 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: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@570 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-29 12:28:21 +00:00
sezero 62cd7643a3 some more cvar work: made Cvar_RegisterVariable() to only link the variable in
and set some basic flags, but then let functions to set it. Added Cvar_SetQuick
and Cvar_SetValueQuick which accept a cvar pointer instead of a var name, but
identical to the non-Quick versions otherwise. Made Cvar_SetValue to print the
value as an integer if the float value is the same when cast to an int; if not,
made it to strip the trailing zeroes in the string.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@569 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-29 09:37:28 +00:00
sezero 175a348297 dropped CVAR_SERVERINFO flag from the cmdline cvar: sending cmdline upon
CCREQ_RULE_INFO is evil...
while I was there, did some whitespace clean-up in common.c.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@568 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-28 23:40:27 +00:00
sezero 3d4901410c * gl_screen.c: removed oldscreensize, oldfov, oldsbarscale, oldsbaralpha.
use the callbacks for scr_fov, scr_viewsize, scr_conwidth & scr_conscale
changes by simply setting vid.recalc_refdef to 1: now that Cvar_Set()
doesn't do anything when there is no change, this has the same effect.
* snd_dma.c: removed oldvol, set a callback to sfxvol in order to call
SND_InitScaletable() upon every volume change.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@567 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-28 22:40:15 +00:00
sezero 6612180a74 * 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: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@566 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-28 22:01:33 +00:00
sezero 7a58f5033c finally nailed the SubdividePolygon() segfault when running as a dedicated
server: R_Init() isn't called for dedicated server therefore gl_subdivide_size
was used without being registered hence divisions by zero when using its value
member. Geez.. Moved its registration to Mod_Init() and we are good.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@565 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-28 17:37:30 +00:00
sezero 96d60a3f51 cfgfile.c (CFG_ReadCvars): Also check for ferror(). Use FS_rewind()
instead of FS_fseek(). From Sander van Dijk.
cfgfile.c, cfgfile.h: synced with uhexen2 versions.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@564 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-27 19:40:14 +00:00
sezero a22c56b5ae common.c (q_vsnprintf): Don't attempt to nul terminate the buffer
if zero size was passed. From Sander van Dijk.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@563 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-27 19:32:17 +00:00
sezero f7394ffc06 added COM_ExtractExtension() helper.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@561 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-27 14:00:33 +00:00
sezero ba15eced3c changed many strcpy and strncpy into q_strlcpy
and strcat and strncat into q_strlcat

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@560 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-27 13:15:31 +00:00
sezero 1a4b16f741 added strlcat.c and strlcpy.c to build.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@559 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-27 11:11:24 +00:00
sezero 04eb8ef74d added strlcat.c and strlcpy.c: will use them later.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@558 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-27 11:03:39 +00:00
sezero f797c71f8b changed many sprintf() calls into q_snprintf().
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@557 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-27 10:50:42 +00:00
sezero 02c18a64e3 Makefiles update: Passing the libraries to the linker before passing the
object list is a bad idea.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@556 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-27 10:10:51 +00:00
sezero 3760bbf494 reverted revision 536 which made coop and deathmatch not to be set at
the same time

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@555 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-27 08:27:52 +00:00
sezero 6a940110c0 better buffer size safety with COM_StripExtension, COM_FileBase and COM_DefaultExtension
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@554 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-27 08:04:02 +00:00
sezero 8fe6e6efb4 bumped version to 0.85.6 in the development tree. documentation tidy-up.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@549 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-25 09:28:30 +00:00
sezero 8f7ced1cf2 changed cvar callback functions to accept a cvar_t pointer arg. I may
have a use for that later.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@545 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-24 14:04:01 +00:00
sezero 49e4762ac2 minor correction after last cfgfile patch.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@543 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-24 12:35:01 +00:00
sezero 282fac9686 changed cfgfile to use FS_functions. From Sander van Dijk.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@542 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-24 12:10:15 +00:00
sezero 7becf71d2f added FS_fgets(). From Sander van Dijk.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@541 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-24 12:03:29 +00:00
sezero 60a764f30e tidy up nul termination for strncpy in CFG_ReadCvarOverrides (from Sander.)
update copyright years.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@540 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-24 12:02:25 +00:00
sezero fea02186c7 Made sure that deathmatch and coop are not set at the same time
(fix originally from QIP sources of Matthias Buecher, a.k.a. Maddes)

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@536 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-23 12:03:49 +00:00
sezero 8dbddbd097 removed support for the -mode argument from gl_vidsdl.c
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@535 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-22 23:10:25 +00:00
sezero fea1ba3030 gl_vidsdl.c fixes/changes from Sander van Dijk: if (hypothetically) no
fullscreen modes are reported at all fixes bad behaviour of several
options in the video menu, and allows the user to use "-force" to force
a fullscreen mode even if none was reported; this was previously only
possible if there was at least one fullscreen mode reported), makes the
treatment of "-current" more similar to "-width/-height/-bpp" (only
forcing it if the user provides "-force"), gets rid of leavecurrentmode
hack (which didn't do much useful, besides making the code less clear).

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@534 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-22 21:55:48 +00:00
sezero 3790bb0ea2 main_sdl.c: added SDL version check at runtime requiring at least SDL-1.2.10
and rejecting SDL >= 1.3.x.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@533 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-22 21:20:19 +00:00
sezero 37221269d6 sys_sdl_unix.c, sys_sdl_win.c (Sys_Sleep): rely on SDL_Delay() instead
of platform specific usleep() or Sleep() calls.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@532 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-21 10:40:18 +00:00
sezero 6a36725e1f backport from uhexen2: read video variables early so that a vid_restart
isn't necessary after init. thanks to Sander van Dijk.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@531 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-20 09:22:19 +00:00
sezero 65d248f750 gl_vidsdl.c: comment out the rest of vid_refreshrate usage which isn't supported.
(VID_SetMode): check whether SDL_SetVideoMode() actually succeeded. otherwise we
just segfault. noticed by Sander.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@530 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-18 16:27:14 +00:00
sezero 5926d9a2e3 * client.h: moved usercmd_t structure to protocol.h
* quakedef.h: moved chase declarations to client.h.
  moved the entity_state_t structure to protocol.h.
  tweaked the order of quake header includes.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@529 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-18 10:03:53 +00:00
sezero 25fedde47a net_win.c, net_sdl.c, net_bsd.c, net_defs.h: removed fixed size from net_drivers
and net_landrivers. changed net_numdrivers and net_numlandrivers into const int
and assigned their values using array size macros instead of hardcoded numbers.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@528 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-18 10:00:36 +00:00
sezero 13e482e911 sv_main.c: changed a (cls.state != ca_dedicated) condition into (!isDedicated)
so that a server file doesn't use "cls"

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@527 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-18 09:55:18 +00:00
sezero 416d68a861 net_loop.h: Tiny whitespace tidy up.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@526 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-18 09:51:28 +00:00
sezero d076443923 net_dgrm.c: removed the DEBUG build condition around the "Forged packet received"
message prints. Tiny whitespace tidy up.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@525 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-18 09:50:49 +00:00
sezero 7a7fe8f4c9 SDL input driver: updated from the uHexen2 project adding native keymap
and dead key support to the console, thanks to Sander van Dijk.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@524 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-16 14:11:37 +00:00
sezero 94117294f7 keys.c (History_Init): filter out '\r' and skip over to the first non-EOL
character. This allows using a windows-generated history.txt file on unix.
based on a patch from Sander van Dijk.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@523 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-15 21:41:48 +00:00
sezero c28e767afb keys.c (Key_Event): Allow autorepeats in message (chat) mode; based on a
patch from Sander van Dijk.  Rearrange the autorepeat condition checks a
bit, based on uhexen2.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@522 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-15 16:33:52 +00:00
sezero d3e28b441e menu.c (M_ToggleMenu_f): Set key_dest to key_game only if the client
is connected. Set it to key_console, otherwise. Patch from and thanks
to Sander van Dijk.
(M_Main_Key): Likewise.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@521 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-15 16:21:36 +00:00
sezero f5c53deb06 sys_sdl_unix.c, sys_sdl_win.c (Sys_ConsoleInput): Moved isDedicated check to...
host.c (Host_GetConsoleCommands): ... here, where it should be.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@520 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-15 15:51:28 +00:00
sezero 702afcf27e gl_texmgr.c (TexMgr_LoadPalette): properly point to d_8to24table_fbright
(noticed this in recent RMQ sources.)

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@519 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-15 06:37:12 +00:00
sezero 5c7fdf0366 host_cmd.c (Host_Loadgame_f): Close the file before signalling an error
(noticed this in recent RMQ sources.)

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@518 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-15 06:31:51 +00:00
sezero 88c8265faf gl_model.c (Mod_SetExtraFlags): Fixed r_nolerp_list.string parsing code
of fitzquake: the loop was able to go beyond the null terminator of the
cvar.  (Besides, it would technically yield a false positive because of
strncmp(), but much less likely..)

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@517 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-14 14:21:12 +00:00
sezero ba74395b56 CL_ParseUpdate: removed unused bitcounts[] array
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@516 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-13 19:00:25 +00:00
sezero 55512f9385 Cmd_Alias_f: don't append a space at the very end.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@515 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-13 18:40:23 +00:00
sezero e6f6e24cab Cmd_TokenizeString: simplify duplication by using Z_Strdup()
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@514 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-13 18:35:40 +00:00
sezero 338019e9e4 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: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@512 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-12 16:01:01 +00:00
sezero f4a3b2c9a2 Made the cmd argument of CL_SendMove() const.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@511 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-12 14:11:17 +00:00
sezero 08546599cf constified the name arguments of Image_LoadImage() and Image_WriteTGA()
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@510 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-12 12:56:57 +00:00
sezero 79e1fa29ee made Sys_ConsoleInput() to return const
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@508 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-12 12:02:37 +00:00
sezero 7ff46cf8d8 made unix Sys_mkdir() to print strerror in case of failure.
made windows Sys_mkdir() to use windows api functions.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@507 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-12 10:50:26 +00:00
sezero 2503c74cb6 removed privileged member from the client structure
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@506 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-12 09:50:23 +00:00
sezero d17e6bfa52 pr_exec.c (PR_ExecuteProgram): Implemented some of LordHavoc's
optimizations mostly by removing the temporary eval_t *a,*b and *c
variables and replacing them by OPA, OPB and OPC macros. Removed
the statement index s and used the statement pointer instead,
updating the pr_xstatement global whenever necessary. In OP_STATE,
stored OPA->_float to ed->v.frame without comparing them (I don't
understand the significance to the comparison.)  Casted st->a, b
and c to unsigned short instead of using them signed as they are
as the pr_globals index value. Updated profiling code.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@505 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-12 09:03:34 +00:00
sezero d7c0fb946a pr_comp.h, pr_edict.c, progs.h, pr_cmds.c, pr_exec.c: made some of the
variables and functions private and did some whitespace tidy-ups.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@504 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-12 08:56:25 +00:00
stevenaaus 18ad2c4554 Make 'R_DrawSprite' error messages Con_DPrintf.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@503 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-11-19 23:33:54 +00:00
sezero 1c872edebd net_udp.c: Fixed FIONREAD ioctl to take an int* argument instead of
an unsigned long*.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@502 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-11-12 18:03:49 +00:00
sezero af17307829 cd_sdl.c: Reverted the CDAudio_Update() change from 27 Oct: it does
not make things better.  Removed the SDL_CDStatus() check before the
error message in case of SDL_CDPlay() failures: I don't really know
the significance to it and witnessed that it caused the error report
once, so I don't see any merit in its presence.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@500 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-10-30 16:56:03 +00:00
sezero 6ca9562340 cd_sdl.c: Simplified, making it similar to cd_linux.c or cd_bsd.c by
performing checks every two seconds in CDAudio_Update() and caching
the last check time.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@498 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-10-27 09:40:46 +00:00
sezero a38d81e23b in Sbar_DrawFace(), don't let the index derived off cl.stats[STAT_HEALTH]
to become negative. (noticed this in rmq some time ago...)

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@495 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-10-19 20:10:49 +00:00
sezero a74fefa51e cl_demo.c: Several tidy-ups and message corrections
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@493 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-10-09 08:51:29 +00:00
stevenaaus 84028ae47a Typo: scr_crosshaircale -> scr_crosshairscale (from Sander).
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@490 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-09-21 02:51:56 +00:00
stevenaaus 2a5421cd03 Update sndspeed cvar when it is changed from the command line (from Sander). Note in-game changes of the sound cvars don't change sound playback settings or behaviour.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@489 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-09-20 22:45:52 +00:00
sezero 7eb20be3fe added IS_LOOP_DRIVER macro and made the confusing loop driver checks
more readable. from uhexen2.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@488 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-09-20 18:05:51 +00:00
stevenaaus eaafb0906f Make the default fullscreen mode 800x600 (same as window default), from Sander.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@487 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-09-20 06:41:36 +00:00
sezero 2d275feeeb gl_model.c: Added new external_ents cvar for Mod_LoadEntities()
in parallel to the old QIP code.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@484 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-09-15 07:51:11 +00:00
sezero c2b863bbce updated makefiles.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@483 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-08-27 07:11:36 +00:00
sezero 75a0ef543c updated snd_vorbis.c from the uhexen2 project: support for Tremor (libvorbisidec)
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@482 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-08-27 07:11:02 +00:00
sezero a3a9b37d53 mlook and lookspring fixes by Jacques Krige :
http://www.quake-1.com/docs/quakesrc.org/1.html

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@481 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-08-25 21:37:34 +00:00
stevenaaus 5a6a9c30d1 z-fighting (flickering gl texture clash most notable in e1m1) bug fix, from Sander.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@480 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-08-24 07:47:29 +00:00
sezero 2713633423 snd_mp3.c (S_MP3_CodecOpenStream): Don't Z_Free() stream's private
data when not allocating on the zone.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@479 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-08-21 09:10:52 +00:00
sezero 64ef4147b5 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: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@476 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-08-03 19:30:37 +00:00
sezero e22611b1e7 removed the LoadBufFile method
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@475 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-08-03 19:22:29 +00:00
sezero c5b2bf7087 fixed vorbisfile link order for static linkage if one chooses to do so.
deleted unused vorbisenc.h header.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@472 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-07-21 09:03:35 +00:00
sezero 7920f6af3e snd_mp3.c: leave Z_ alone and allocate libmad decoding buffers (ca. 64kb)
on the system memory.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@471 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-07-20 09:00:12 +00:00
sezero df4a1685a0 zone.c (Z_Realloc): If expanding size, zero-fill the expanded part
of the memory before returning, which is Z_Malloc() behavior.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@470 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-07-17 14:00:48 +00:00
sezero 3fcb8030ae progs.h (PR_RunError): Mark the function as noreturn.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@468 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-07-08 17:27:44 +00:00
sezero 6181c3307a host.c (Host_ClearMemory): Do not check if host_hunklevel is
set before freeing the hunk allocations.  The order in Host_Init()
is clear and Host_ClearMemory must not be hit before host_hunklevel
is set. (otherwise, there _will_ be much trouble...)

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@467 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-07-05 06:50:23 +00:00
sezero b7a03b22f3 host.c (Host_Init): Execute quake.rc _after_ setting host_hunklevel
and host_initialized.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@466 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-07-05 06:45:31 +00:00
sezero 55cc159297 * Removed some useless memset calls onto newly hunk allocated memory.
Hunk_Alloc() already clears the memory before returning it.
* Some minor cleanups.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@465 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-07-05 06:28:42 +00:00
sezero b6913f5348 Increased localmodels array size to 8 (better alignment)
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@464 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-06-28 11:33:23 +00:00
sezero 7e771ad5bb moved Host_Version_f from host_cmd.c to host.c.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@463 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-06-27 13:20:52 +00:00
sezero 4ac590b037 net_udp.c: check whether the address returned by gethostbyname is an IPv4 address
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@462 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-06-27 13:10:19 +00:00
sezero fedac5982f minor syncing with uhexen2
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@461 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-06-13 12:41:00 +00:00
sezero 9800cf9d15 a little syncing with uhexen2.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@460 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-06-12 12:25:22 +00:00
sezero 2806d26412 updated q_stdinc.h from uhexen2.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@459 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-06-11 13:20:13 +00:00
sezero 74dc497e5a gl_model.c (Mod_LoadEntities): Added support for loading external entity files.
Adding a cvar to control this option should follow later.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@458 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-06-11 05:03:04 +00:00
stevenaaus f4853de691 Trial a new Freeze cvar.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@457 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-06-10 03:04:51 +00:00
sezero 82960be532 Sync music stuff with uHexen2: Removed S_FileExtension, replaced its use
by COM_FileGetExtension.  Adjusted all users because COM_FileGetExtension
doesn't include the leading dot for the extension, nor does it ever return
NULL.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@455 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-05-20 22:20:30 +00:00
sezero 5d43920b02 replaced COM_FileExtension by a slightly better version from uhexen2,
renamed it to COM_FileGetExtension, added a prototype to common.h.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@454 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-05-20 20:38:11 +00:00
sezero e81b03246e small documentation corrections. fixed the borked README.txt file.
changed version to 0.85.5 in the README files. changed version to
0.85.5 in quakedef.h.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@449 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-04-24 04:27:54 +00:00
stevenaaus b88b2ac7ce Update Makefile.darwin (OSX) and doco.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@448 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-04-24 03:01:40 +00:00
sezero 88d6f8f1ef check for arguments to several command line options. patch from Sander van Dijk.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@446 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-04-19 18:29:41 +00:00
sezero 51134643dd keys.c (History_Init, History_Shutdown): use host_parms->userdir.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@444 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-04-19 17:02:41 +00:00
sezero f6b6f49a7e made global host_parms a pointer, set in main(). adjusted places where
host_parms is used. made COM_Init() and Host_Init() to take no arguments.
made Sys_Init() to set host_parms->userdir: at present, it is set to
host_parms->basedir, to be changed properly when user directories are
implemented.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@443 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-04-19 16:41:45 +00:00
sezero ccf800306b fixed several gcc-4.6 -Wunused-but-set-variable warnings.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@442 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-04-12 12:36:04 +00:00
sezero 46f0616a0b cl_parse.c (CL_KeepaliveMessage): fixed big boom in net play in maps with
extended limits. it was a fitzquake-0.85 bug noticed by `mh' as explained
at http://forums.inside3d.com/viewtopic.php?p=35030

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@440 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-04-08 06:01:39 +00:00
sezero 7851cda724 just properly use (u)intptr_t where necessary and don't do the cheap hack
of using size_t instead of it.  include stdint.h in q_stdinc.h for it.
for Visual Studio earlier than version 2010, use the header provided by
the msinttypes project.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@439 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-04-01 14:55:45 +00:00
sezero 2f8cc178a9 added native sound code snd_alsa.c, snd_oss.c, snd_win.c and for future
reference and/or probable use.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@434 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-03-28 11:37:44 +00:00
sezero 17df4c702d minor documentation updates, final touches for 0.85.4.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@430 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-03-27 14:00:31 +00:00
stevenaaus e9d05ae12a Trivial doco updates
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@429 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-03-05 10:20:00 +00:00
sezero 49f0fc353a * gl_model.c: relaxed searchpath requirements for external lit file
loading: they are now allowed from the same game directory as the
  map itself as well as from a searchpath with a higher priority.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@428 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-03-01 18:00:30 +00:00
sezero a8c685d391 cvar'ize the game loop throttling by adding the new sys_throttle with
a default value of 0.02.  changing its value to 0 disables throttling.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@427 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-02-27 07:05:18 +00:00
sezero 50d5076443 snd_mix.c, minor cleanup: eliminated stupid multiple casting in SND_PaintChannelFrom8(),
added braces to the inner for loop in SND_InitScaletable().

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@424 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-02-21 18:03:35 +00:00
sezero 2130f17bc9 * snd_mpg123.c: Print a message if mpg123_init() fails.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@420 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-02-17 07:02:47 +00:00
sezero 3f8f259567 * gl_model.c: changed the `ignored' messages from Con_DPrintf
to Con_Printf for external lit files.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@418 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-02-17 06:38:52 +00:00
sezero ea14bd5b1a bgmusic.c, bgmusic.h: small updates and tidy-ups from uHexen2.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@417 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-02-16 15:20:20 +00:00
sezero 7972de8af4 bgmusic.c: renamed -nomusic command line switch to -noextmusic. minor update.
updated documentation for the command line option name change.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@416 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-02-15 21:30:32 +00:00
sezero 81a318c09b * snd_mpg123.c: added new codec for mp3 playback using libmpg123 as
an alternative to the existing one using libmad. requires at least
  mpg123-1.12.0, i.e. api version 25.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@414 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-02-14 20:02:52 +00:00
sezero 1be80dc881 snd_codec.c (S_CodecUtilOpen): fix again after rev.410.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@411 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-02-10 18:23:50 +00:00
sezero ed1958d1ff snd_codec.c (S_CodecUtilOpen): minor cleanup (better type for length.)
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@410 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-02-10 18:20:33 +00:00
sezero de3f97016a * common.c (COM_FileExists): changed return type to qboolean.
(COM_filelength): new procedure.
(COM_FindFile): adjustments to avoid multiple file open/close operations just a
little.
* common.h (COM_FileExists): adjusted prototype.
* bgmusic.c (BGM_PlayCDtrack): adjusted for COM_FileExists() return type change.
* sys_sdl_win.c, sys_sdl_unix.c (Sys_filelength): changed return type to long.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@408 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-02-10 17:25:43 +00:00
sezero cd97cf2507 support for mouse buttons 4 and 5:
* keys.h: add KMOUSE4 and K_MOUSE5 defines after K_MWHEELDOWN
* keys.c: add KMOUSE4 and K_MOUSE5 to the keynames table.
* main_sdl.c: handle SDL_BUTTON_X1 and SDL_BUTTON_X2 for mouse
button events.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@407 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-02-10 16:10:53 +00:00
sezero c851a07cc6 * common.c (FS_fread): fixed coding style.
* bgmusic.c:  minor updates from uhexen2.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@406 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-02-08 11:00:29 +00:00
sezero 687eb577cd * snd_mp3.c: removed useless rudimentary info checks.
* updated copyright years for several sound related sources.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@405 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-30 21:34:12 +00:00
sezero d8ffad069b * snd_mp3.c: sync with sox project CVS repo and add mp3_madseek()
as a new private function. make S_MP3_CodecRewindStream() to use
  the new mp3_madseek() function.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@404 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-30 18:23:20 +00:00
sezero 30d44eac5b gl_vidsdl.c (VID_Menu_ChooseNextRate): refresh rates not implemented for SDL.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@403 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-29 07:21:04 +00:00
sezero fde82ec3ac fixed a typo in a comment, noticed by Sander van Dijk.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@402 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-22 20:11:46 +00:00
sezero 26735b7ba9 * snd_mix.c (SND_PaintChannelFrom16): multiplication might cause
integer overflow as observed in the warpspasm mod depending on
  the volume level. so, moved the left shifting to left/right
  volume before the multiplication.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@401 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-18 06:50:35 +00:00
sezero 593463dafd added linux, bsd and windows native cdaudio code from uhexen2.
will integrate to build later.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@400 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-15 09:50:17 +00:00
sezero 2493d3e1f8 * net_sys.h: revert previous commit undefining EWOULDBLOCK and
ECONNREFUSED for windows.  define new macros NET_EWOULDBLOCK and
  NET_ECONNREFUSED for both unix and for windows and change the
  users accordingly.
* net_udp.c, net_wins.c, net_wipx.c:
  adjust for the new NET_EWOULDBLOCK and NET_ECONNREFUSED macros.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@398 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-12 20:10:34 +00:00
sezero 8be7c0ebad net_sys.h: the new MS SDKs define EWOULDBLOCK and ECONNREFUSED,
so we must undefine them before redefining.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@397 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-12 12:39:24 +00:00
sezero 0221c58370 removed the cdplayer facility added in 0.85.3
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@394 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-12 10:02:16 +00:00
sezero 65f2ac04aa changed makefiles to use 1/0 instead of yes/no for the codec options.
made quakespasm custom conback embedding optional, still defaulting to 1.
the code requires USE_QS_CONBACK preprocessor definition.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@392 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-12 09:32:22 +00:00
stevenaaus 3723fc3935 Make Makefile.darwin consistent with Makefile
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@390 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-11 08:19:22 +00:00
sezero f38b3e66ad bgmusic.c: remove some unnecessary comments.
(BGM_Play): call BGM_Stop() before anything else. don't do anything
if there are no music handlers.
(BGM_PlayCDtrack): remove commented out code. if CDAudio_Play() call
failed and there are no music handlers, don't do anything else.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@388 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-10 20:33:12 +00:00
sezero 277fc57891 bgm*: updated copyright years.
bgmnull.c: removed unused file.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@387 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-10 20:17:15 +00:00
sezero 5acd0431ee 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: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@386 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-10 10:35:40 +00:00
sezero 137c598a4d add the new bgm_extmusic cvar to bgmnull.c, too.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@385 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-10 08:37:18 +00:00
sezero b4843e0e65 added -nomusic command line switch to turn off playing external music files.
added new cvar bgm_extmusic to enable/disable playing of external music files.
added a new menu entry to control bgm_extmusic.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@384 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-10 08:33:22 +00:00
stevenaaus ef6a6119d9 Doco update
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@383 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-10 03:09:09 +00:00
stevenaaus c26975fb82 Author name change
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@382 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-06 20:19:37 +00:00
sezero c61463f1ff applied a modified version of heritage & quit message by Sander van Dijk
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@381 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-06 20:05:49 +00:00
sezero 0815188f3b updated the darwin makefile after music streaming changes. it probably needs
further updating, though...

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@380 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-05 23:05:17 +00:00
sezero e70afa3c4d menu.c: allow proper music volume adjustment for windows.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@378 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-05 21:30:37 +00:00
sezero c307083fd1 snd_mp3.c: fixed windows build.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@377 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-05 21:29:00 +00:00
sezero b08f283ff5 updated windows makefiles and visual studio project files after streaming
music changes.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@376 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-05 21:27:37 +00:00
sezero 2950b5cdf9 Backported external music files support using decoder libraries and the
new raw samples interface from Hammer of Thyrion (uhexen2) :
- bgmusic.c, bgmusic.h: New BGM interface for background music handling.
  Handles streaming music as raw sound samples.
- bgmnull.c: BGM source for cases where the engine is configured for no
  sound.
- cl_main.c: Include bgmusic.h. Call BGM_Stop() and CDAudio_Stop() in
  CL_Disconnect().
- cd_sdl.c: Moved bgmvolume boundary checking to bgmusic.c upon value
  changes.
- gl_vidnt.c, gl_vidsdl.c, cl_parse.c: Include bgmusic.h. Add BGM_Pause()
  and BGM_Resume() calls along with CDAudio_ counterparts.
- cl_parse.c: Replace CDAudio_Play() call by the new BGM_PlayCDtrack()
  which first tries CDAudio_Play() and then streaming music if it fails.
- host.c: Include bgmusic.h. Call BGM_Update() just before S_Update()
  in Host_Frame(). In Host_Init(), call BGM_Init() after other audio init
  calls. In Host_Shutdown(), call BGM_Shutdown() before all other audio
  shutdown calls.
- snd_dma.c: Include snd_codec.h and bgmusic.h. Call S_CodecInit() from
  S_Init(). Call S_CodecShutdown() from S_Shutdown().
- snd_codec.c, snd_codec.h: New public codec interface for streaming
  music as raw samples. Adapted from quake2 and ioquake3 with changes.
  Individual codecs are responsible for handling any necessary byte swap
  operations.
- snd_codeci.h: New header for snd_codec internals.
- snd_wave.c, snd_wave.h: Codec for WAV format streaming music. Adapted
  from ioquake3 with changes.
- snd_vorbis.c, snd_vorbis.h: Codec for Ogg/Vorbis format streaming music.
- snd_mp3.c, snd_mp3.h: Codec for MP3 format streaming music using libmad.
  Adapted from the SoX project with changes.
- Makefile: Adjusted for the new sources. Added switches USE_CODEC_WAVE,
  USE_CODEC_MP3, USE_CODEC_VORBIS for enabling and disabling individual
  codecs.
- Windows makefiles and project files as well as other CodeBlocks project
  files will be updated shortly.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@374 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-05 19:50:43 +00:00
sezero c243f20067 made COM_FindFile to accept both file and handle as NULL. Added
COM_FileExists as a new helper procedure which calls COM_FindFile
with both file and handle parameters as NULL.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@373 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-05 18:01:15 +00:00
sezero 8af0805ee2 gl_model.c (Mod_LoadLighting): Check the path_id of the lit file and
accept only if it is coming from the same game directory as for the map
itself.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@372 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-02 22:02:11 +00:00
sezero e6d0cc36cd gl_model.h (model_t): Added a path_id member to store the
information about the game directory from where the model is
loaded.
gl_model.c (Mod_LoadModel): Send the path_id member of the
model to FS_Load* function, instead of NULL.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@371 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-02 21:55:26 +00:00
sezero 8dde04f7b5 common.c (searchpath_t): Added new member `path_id', an unsigned
int identifier assigned to the game directory. Remember that main
<install_dir>/game1 and the unix <userdir>/game1 have the same id.
The id starts as 1 for the first data1 directory. For every new
directory, the value is the left-shifted version of the previous
one.  Made COM_FindFile() to accept a path_id pointer argument
and storing the id in it if it isn't NULL. Made COM_OpenFile(),
COM_FOpenFile() and all COM_Load* functions to accept a path_id
pointer argument similarly. Adjusted callers accordingly.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@370 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-02 21:45:16 +00:00
sezero 0323d3d388 Removed support for -proghack and -path. I think no one misses them.
Made COM_FindFile() static to common.c. Removed COM_CopyFile(), no
callers at the moment.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@369 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-02 21:42:54 +00:00
sezero 373bf70243 Made CDAudio_Play() to return success (0) or failure (-1) instead of void.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@368 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-02 18:33:21 +00:00
sezero 96a6a4e28a fixed rest of the strict-aliasing and uninitialized use warnings.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@367 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-01 14:05:20 +00:00
sezero 0a915708f5 whitespace/formatting tidy-up in quakedef.h.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@366 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-01 12:32:16 +00:00
sezero b09efe63af removed the useless msg_suppress_1 thing.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@365 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-01 12:27:02 +00:00
sezero c08580f9ca removed all remaining references to id386 and UNALIGNED_OK because
the fitz engine doesn't use them at all.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@364 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-01 12:24:28 +00:00
sezero 883fcf0184 changed MAX_OSPATH from 128 to 256 for better compatibility everywhere.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@363 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-01 12:20:15 +00:00
sezero 49708d88bd W_LoadWadFile: Just use COM_LoadMallocFile(). Some minor cleanup.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@362 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-31 10:47:29 +00:00
sezero 82c069c4d3 common.c, common.h: Added LOADFILE_* defines for use with COM_LoadFile,
for easier reading. Added COM_LoadZoneFile(), COM_LoadMallocFile() and
COM_LoadBufFile() from uhexen2. Added comments after their prototypes
in common.h.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@361 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-31 10:29:38 +00:00
sezero a3c3749b98 Mod_LoadLighting: free the allocated hunk memory in case of broken or
unsupported lit file.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@360 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-31 09:05:44 +00:00
sezero 0926f39da2 applied a better fix for the infamous "SV_TouchLinks: next != l->next" problem.
Fixes "whiteroom" (http://www.quaddicted.com/reviews/whiteroom.html) completely
locking the engine. fix from the quakeforge sources.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@359 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-31 07:55:43 +00:00
sezero 1729f9ec3c W_LoadWadFile: free wad_base only if it isn't NULL.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@358 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-30 23:30:42 +00:00
sezero 27aebd0608 killed all references to Draw_BeginDisc
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@357 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-30 23:28:08 +00:00
sezero abf9a39ef4 sync several sound-related files with uhexen2 a little: move
DEFAULT_SOUND_PACKET_VOLUME and DEFAULT_SOUND_PACKET_ATTENUATION
from sound.h to protocol.h. remove unused gamealive, soundalive
and splitbuffer members from the dma_t structure. make SNDDMA_Init()
to take a dma_t* parameter and make sn static to snd_dma.c. copy
over LordHavoc's S_StartSound skip calculation fixes from uhexen2.
make many functions/data static to their respective files. many
whitespace/formatting clean-ups.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@356 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-30 21:10:26 +00:00
sezero 30c936880c backports from uhexen2 source, preparing for streaming music support:
* snd_mix.c: Increased PAINTBUFFER_SIZE from 512 to 2048.
* snd_mix.c: snd_vol is static now. it is calculated in S_PaintChannels and
  only used in SND_PaintChannelFrom16. all its other uses are removed from
  Snd_WriteLinearBlastStereo16, S_TransferStereo16, S_TransferPaintBuffer.
  The way it was, the sound volume was applied to the whole final contents
  of the paint buffer, but with this new quake2+ way we can add raw samples
  to the paint buffer with its own volume, such as bgmvolume. However, this
  makes the snd_scaletable to be recalculated everytime the sfxvolume is,
  changed, therefore it is adjusted that way to incorporate sfxvolume.
* snd_mix.c: In S_PaintChannels, check against s_rawend and copy from the
  streaming sound source if necessary.
* snd_dma.c: Added old_volume to detect sfxvolume changes. Made S_Update to
  compare it to sfxvolume.value and call SND_InitScaletable() if it changed.
* snd_dma.c: Add new globals s_rawsamples and s_rawend. Reset s_rawend to 0
  in S_ClearBuffer. Add new function S_RawSamples, adapted from quake2 with
  its 8 bit stereo playback fixed.
* snd_dma.c (S_FileExtension): Add new function which returns the given
  sound file's extension including the dot, or NULL.
* q_sound.h: Add new macro MAX_RAW_SAMPLES, defined as 8192. Add externs
  for new globals s_rawsamples and s_rawend. Add prototype for the new
  S_RawSamples and S_FileExtension functions.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@355 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-30 17:11:28 +00:00
sezero 6a070ea797 added windows version detection back from original sources
with extra bits from uhexen2. we may use the information some
day.. (or not..)


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@354 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-30 17:00:19 +00:00
sezero 22e2f5aca8 backports from uHexen2 tree:
* common.c, common.h: Added new structure fshandle_t. Added new procedures
  FS_fread, FS_fseek, FS_ftell, FS_rewind, FS_feof, FS_ferror and FS_fclose.
  The new FS_*() stdio replacements are necessary if one is to perform non-
  sequential reads on files reopened on pak files because bookkeeping about
  file start/end positions is needed. Allocating and filling in the fshandle_t
  structure is the users' responsibility when the file is initially opened.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@353 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-30 16:50:15 +00:00
sezero 82ccf48171 added file_from_pak as a new flobal, made COM_FindFile() to set it properly.
from quakeworld sources.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@352 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-30 16:35:16 +00:00
sezero f4b0b373cb Minor cd_sdl.c cleanups from uhexen2. Reorganized cdaudio volume
handling. If volume is 0, don't bother advancing and pause.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@351 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-30 14:55:25 +00:00
sezero d0ae9d2d65 snd_mem.c updates from uhexen2 :
* q_sound.h: add WAV_FORMAT_PCM as a new macro, defined as 1.
* snd_mem.c (S_LoadSound): use WAV_FORMAT_PCM. reject wav files which are
  neither 8 nor 16 bit. reject wav files which have zero samples. report
  the wav file name with the error messages so that they mean something.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@350 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-30 14:39:12 +00:00
sezero b4ee053e2d renamed sound.h to q_sound.h
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@349 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-30 14:30:52 +00:00
sezero 7fddf9abdc gl_vidnt.c, gl_vidsdl.c: Reformatted GL_CheckExtensions for better readability,
removed the old unused CheckArrayExtensions.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@348 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-26 22:10:44 +00:00
sezero 6fe1dbab48 * sv_main.c (SV_WriteEntitiesToClient): the protocol check must be against
sv.protocol, not sv_protocol.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@347 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-11-23 06:48:02 +00:00
sezero 671da2bc11 SDL_putenv() is problematic in versions <= 1.2.9 so replaced it with plain putenv().
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@346 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-11-12 15:51:04 +00:00
sezero 14f356c45e menu.c: restore the screen size menu item that was removed in rev. 125.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@345 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-10-29 13:03:04 +00:00