Commit Graph

739 Commits

Author SHA1 Message Date
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
sezero 445ecebee4 cmd.c: Fix the unalias command.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@344 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-10-24 14:15:27 +00:00
stevenaaus c14af608a9 more max_edicts stuff (from Sander)
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@343 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-10-24 07:57:46 +00:00
stevenaaus 03b6281f52 Bump max_edicts for compatibility with WarpSpasm
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@342 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-10-23 21:50:16 +00:00
sezero 3a41b14315 * snd_mem.c: Remove prototype for non-existant function S_Alloc().
Remove unused global cache_full_cycle. Comment out unused function
DumpChunks().


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@341 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-10-18 20:39:10 +00:00
sezero 6869b0c6d5 increased default zone memory size to 384kb
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@340 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-10-11 18:06:11 +00:00
sezero ece77629ad cmd.c (Cmd_Alias_f): replace another occasion of Z_Malloc() + strcpy() by Z_Strdup().
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@339 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-10-04 07:40:12 +00:00
sezero 9d07b6cbd6 * console.c, sbar.c: fixed a few format string issues.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@337 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-09-20 08:27:20 +00:00
sezero 39e6259511 bumped version to 0.85.4 in the development tree.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@330 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-09-19 09:11:38 +00:00
sezero 6177ae068a makefile comment tweaks
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@321 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-09-01 06:10:21 +00:00
sezero 5ade0c29df replaced all usess of vsprintf by q_vsnprintf
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@320 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-31 16:57:12 +00:00
sezero 49286c1eb2 added q_snprintf and q_vsnprintf from uhexen2. always use our wrapper
versions to ensure consistent behavior accross platforms.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@319 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-31 14:09:00 +00:00
sezero 3e1087164e host_cmd.c: minor tidy up, nothing serious.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@318 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-31 12:15:38 +00:00
sezero 7271fcb9fe host_cmd.c (Host_Say_f, Host_Tell_f): adjustments, mostly inspired from
the darkplaces engine.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@317 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-31 11:55:55 +00:00
sezero 12a9aa1004 fixed lazy declaration and cleaned up the .bsp extension removal logic.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@315 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-30 02:51:21 +00:00
sezero 31c71800ae remove the defunct cls.mapstring
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@314 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-30 02:15:22 +00:00
stevenaaus da578286cc Remove any trailing ".bsp" from mapname
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@313 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 23:03:50 +00:00
stevenaaus 8d58b764d6 End of the world commit
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@312 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 21:37:07 +00:00
sezero 50b80f6c5c pr_edict.c (PR_LoadProgs): silenced a minor compiler warning after the const changes.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@310 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 17:50:20 +00:00
sezero 58f44e21f7 CDAudio_Next() and CDAudio_Prev() aren't public to the engine and do not
belong in a placeholder like cd_null.c.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@308 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 16:02:55 +00:00
sezero 2d5f1285e9 more fixes for deprecated conversion from string constant to char*:
handle the -safe command line switch using a new global safemode,
check for safemode in the related driver init functions and remove
the safeargvs & co from common.c and COM_InitArgv().


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@307 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 12:55:41 +00:00
sezero ac8fd3e7b0 pr_edict.c: changed the type arguments of PR_ValueString() and PR_UglyValueString()
from etype_t to int for C++ compatibility. from uhexen2.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@306 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 12:36:03 +00:00
sezero 94fd50da1e constified basedir member of quakeparms_t
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@305 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 12:33:33 +00:00
sezero 7bc0203aa3 pr_comp.h: fixed a harmless typo with DEF_SAVEGLOBAL
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@304 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 12:27:17 +00:00
sezero 3b39a77b92 some more constifications and fixes for deprecated conversion
from string constant to char*


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@303 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 12:04:19 +00:00
sezero fb2bae914f added comment in Host_Name_f()
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@301 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 10:22:17 +00:00
sezero 205cabbdc2 const correctness changes.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@300 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 02:22:55 +00:00
sezero b310219400 gl_model.c (Mod_LoadAliasModel, Mod_LoadSpriteModel): add some enum casts
to make things more compatible with C++.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@299 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-24 10:41:41 +00:00
sezero 8bf69437f4 made the PollProcedure api compatible with C++.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@298 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-24 10:29:19 +00:00
stevenaaus fded47666a Back out Oz's cd-sdl.c changes
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@297 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-24 10:06:16 +00:00
sezero 81a34ac603 removed net_serial which was for dosquake only.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@296 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-24 09:55:43 +00:00
sezero f1ed5896cc screen.h (canvastype): Added CANVAS_INVALID as a new enumerated value (-1).
gl_draw.c (GL_Set2D): Use CANVAS_INVALID instead of -1.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@295 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-24 09:20:19 +00:00
sezero 8315ed0198 main_sdl.c: removed dedicated setup TODO notes. added a new TODO note about
setting up the dedicated server with less memory.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@294 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-24 09:11:57 +00:00
sezero 7b2134168b cd_sdl.c: cleaned up the latest mess a little. restricted track progressing
to the cd player facility only.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@293 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-24 09:04:16 +00:00
stevenaaus 83a08ef79a cd fix needed fo gameplay
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@292 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-24 01:28:40 +00:00
stevenaaus a8de20a97d Make "cd play" progress tracks
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@291 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-24 00:35:22 +00:00
sezero 30b71faa55 * cd_sdl.c (export_cddev_arg): make putevn() actually work.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@290 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 23:46:16 +00:00
sezero 8138aa8608 * cd_sdl.c (export_cddev_arg): fixed bad snprintf and the crash it was
causing.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@289 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 23:20:16 +00:00
sezero a7dba17c55 cd_sdl.c: no need for uhexen2's CVS version identifier to stay here.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@288 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 17:23:39 +00:00
sezero 339fd92605 * cd_sdl.c (get_cddev_arg): fix stupid typo in uppercasing.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@287 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 15:55:54 +00:00
sezero 201ae03fdb * cd_sdl.c (get_cddev_arg): check for null or empty arguments also
for non-windows platforms.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@286 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 14:32:34 +00:00
sezero 905f6e8ed7 * cd_sdl.c: Remove unnecessary SDL_getenv.h include.
(CDAudio_Init): Move the bad ugly hack about SDL_CDROM environment
variable into the new export_cddev_arg() helper. FOr the -cddev option,
call the new get_cddev_arg() helper.

(export_cddev_arg): SDL_CDROM environment variable hack moved from
CDAudio_Init() to here. Fixed bad strcat() usage orto the array. Made it
for non-windows platforms only.

(get_cddev_arg): Added for checking the argument to the -cddev option.
For non-windows platforms just return the argument itself. For windows,
arg should be like "D:\", make sure it is so, but tolerate args like "D"
or "D:", as well.

(CDAudio_Next): Make static. Minor cleanups.

(CDAudio_Prev): Make static. Minor cleanups.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@285 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 14:05:32 +00:00
stevenaaus 0494f72f2b cd command tweaks
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@284 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 10:31:00 +00:00
stevenaaus a0f158b276 Add "cd next" and "cd prev" commands. Add a new "-cd" option , which in combination with "-dedicated", allows QS to be a stand-alone cd player... Useful\!
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@283 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 09:49:03 +00:00
stevenaaus 01218ee9ae Set SDL_CDROM environment variable when using -cddev. Some doco updates.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@282 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 04:12:19 +00:00
sezero a441851f2b 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: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@281 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-20 02:25:22 +00:00
sezero bc333b5bc8 Makefile.w32, Makefile.w64: made them a little bit more flexible by adding
CROSS_COMPILE and TARGET variables.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@280 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-17 19:30:35 +00:00
sezero 4bbc06e5c7 pr_cmds.c (PF_traceline): Added a FIXME note about the NaN issue with certain progs.dat
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@278 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 21:02:31 +00:00
sezero 78cbc8cc5f added q_stdinc.h, adapted from uhexen2, to tidy up several includes and
macros in one place.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@277 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 20:55:39 +00:00
sezero b4b84d9526 pr_cmds.c (PF_traceline): fix entity number printing.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@276 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 20:50:31 +00:00
sezero 6e94af1372 mathlib.h, mathlib.c: changed nanmask from being a global to being
a macro.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@275 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 20:10:20 +00:00
sezero aee8fe5f2f * pr_cmd.c: replaced isnan() calls with quake's own ISNAN() macro.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@274 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 20:06:06 +00:00
kristianduske 78f8041715 git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@272 af15c1b1-3010-417e-b628-4374ebc0bcbd 2010-08-14 19:41:09 +00:00
stevenaaus 02c566eec0 Miscellaneous doco updates
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@269 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 05:01:12 +00:00
stevenaaus 41d8164068 PF_traceline causes program to die badly if given non-numeric (isnan) vectors. So we must check to not allow this happening. Additionally, stop program execution is developer cvar is set. Note: Compiling program with gcc option \'-ffast-math\' (and more specifically, -funsafe-math-optimizations) is an alternative fix than this patch. It performs FPU opts that gloss over the issue
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@268 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 03:59:29 +00:00
stevenaaus d9ed158672 Swap left and right arrow keys in the videomode menu. (Right arrow now increases resolution, which is more standard)
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@267 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 03:42:52 +00:00
sezero a67c4ddf4a net_sys.h: update comments and tidy up.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@262 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-09 14:03:07 +00:00
sezero 40b6d80f99 struct sockaddr has unsigned char sa_len as the first member in BSD
in BSD variants and the family member is also an unsigned char instead
of (unsigned) short. So we define HAVE_SA_LEN for those BDS variants
and check for the offsetof for the sa_family member and also change
the struct qsockaddr to mirror that.  This should matter only when
PLATFORM_UNIX is defined.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@260 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-09 12:20:39 +00:00
stevenaaus 26d6246ff9 Add a "prev weapon" menu item (from Sander)
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@253 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-04 03:09:07 +00:00
sezero 427d671c24 host_cmd.c, menu.c: sanitize whitespace/formatting.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@252 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-02 19:45:16 +00:00
sezero 11b6986944 menu.c: Added an options enum for the options menu. Added an options menu
entry for mouse look toggling.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@251 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-02 18:28:23 +00:00
sezero edd2a2a34f revert incorrect changes to NUM_GAMEOPTIONS and gameoptions_cursor_table from rev. 246.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@250 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-02 17:33:03 +00:00
sezero 6bbb06b490 gl_mesh.c (BuildTris): worked around a type-punned pointer. adapted from quakeforge.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@249 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-01 21:11:16 +00:00
sezero e1046e68c6 * renamed Length() to VectorLength() for consistency with its friends.
* mathlib.c: Removed the unnecessary sqrt() prototype.
(VectorLength): Made it to just return sqrt(DotProduct(arg,arg))
(VectorNormalize): Calculate the length as sqrt(DotProduct(arg,arg)).
* mathlib.h (CLAMP): Renamed the macro arguments from min and max to
_minval and _maxval.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@248 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-01 19:22:46 +00:00
stevenaaus 57bf6f49b9 Add a statusbar alpha slider, and change default scr_sbaralpha to 0.95
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@247 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-29 06:48:25 +00:00
stevenaaus 86dea5717b Link the status bar size to the scale slider, though it's size only increases half as fast
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@246 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-29 01:52:04 +00:00
stevenaaus 630499ae8f History fixed - Ozkan's newline fix seems ok.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@245 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-28 07:50:27 +00:00
stevenaaus 57484778cd Make some fixes for command line history now that history is persistent
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@244 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-28 07:08:16 +00:00
stevenaaus 30d9246c7b There seems bugs in the command-line code. Revert this "blank newline" fix first, then look for more
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@243 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-27 21:45:33 +00:00
stevenaaus b9f418d276 -bgvolume switch stays... Allows CD music/ambient music to play while minimized
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@242 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-26 08:47:11 +00:00
sezero f81f9f5e05 Under windows, run the game (windowed), go into a saved game,
press Esc to get the menu, minimize using the mouse on the
window's minimize icon and then restore and you'll have sound
all the same.  HOWEVER: If you minimize by pressing the icon
on the start bar, sound will be lost upon restoring. Or, if
you use alt-tab to get away from the game window the same will
happen. Or, if you run the game fullscreen and use alt-tab to
go to the desktop (alt-tab is the only way I know) you will
lose the sound again.  Here, we are probably are hitting an
SDL_APPACTIVE or SDL_APPINPUTFOCUS event more than once and
since the block counter goes > 1 we are not restoring properly.
For now, making snd_blocked to act as a boolean and not as a
counter fixes the issue.  Hmmm...

* main_sdl.c: Revert revision 238 change, no longer necessary.
* snd_dma.c: Make snd_blocked act as a boolean and not as a
counter.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@241 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-25 12:20:17 +00:00
sezero b4ae05875e made MAXCMDLINE definition public through keys.h.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@240 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-25 10:36:14 +00:00
stevenaaus 54a2f21892 (Some?) Win32/64 does not re-enable sound after app is minimized and restored, so (temporarily?) add a -bgsound switch to disable sound being muted
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@238 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-23 20:58:04 +00:00
stevenaaus c31e3d107a Enable messages and says to be 256 chars long, with a scrolling input line across top of screen. Allow tab button in demos.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@237 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-23 20:55:11 +00:00
sezero cfee212570 keys.c (History_Shutdown): Don't let it write an empty string to history.txt
if no console commands were used.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@235 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-26 10:50:40 +00:00
sezero f7d02fcbbf host.c (Host_Init): Do not exec quake.rc for dedicated servers. Instead,
exec autoexec.cfg and stuffcmds in that case. Also moved running the start
map for dedicated servers here.
host_cmd.c (Host_Startdemos_f): Moved running the start map for dedicated
servers to Host_Init().


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@234 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-26 08:45:40 +00:00
sezero 29d4cad280 host.c (Host_Init): Don't call V_Init, Chase_Init, Key_Init, Con_Init, M_Init,
ExtraMaps_Init and Modlist_Init for dedicated servers either.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@233 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-26 08:16:58 +00:00
sezero bd2385e5ea * keys.c (HISTORY_FILE_NAME): define simply as history.txt without
prefixing with a game directory, so that the history file would be
written into the basedir and not affected by dynamic game directory
changes.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@232 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-26 07:56:28 +00:00
sezero 52f4e89d99 host.c (Host_Shutdown): Write the console command history file only if
not a dedicated server. Same for shutting down the CDAudio and sound
subsystems.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@231 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-26 00:31:12 +00:00
sezero 7383a1647b keys.c (History_Init): Made global again.
(History_Shutdown): Likewise.
keys.h: Added prototypes for History_Init and History_Shutdown.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@230 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-26 00:15:22 +00:00
sezero 9154ed3539 * keys.c (History_Init): Make it static. Tidy-up its formatting.
(History_Shutdown): Likewise.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@229 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-25 23:55:41 +00:00
stevenaaus 819208b38c Add Bakers/Ezquakes persistent history feature
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@228 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-25 13:32:49 +00:00
sezero c1ff4646c2 net_udp.c, net_wins.c, net_wipx.c: Add more informative debug messages.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@227 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-22 18:11:00 +00:00
sezero eeb7b890ca net_wins.c (WINS_GetLocalAddress): Make sure buff is null terminated.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@226 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-22 18:09:02 +00:00
sezero 1da39b9337 net_wins.c (WINS_Init): Fix error return value as INVALID_SOCKET.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@225 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-22 18:05:43 +00:00
sezero fe05326ae9 * console.h (Con_DebugLog): Add prototype.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@224 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-22 11:02:13 +00:00
sezero b65383bf2d Reorganize files for platform-specific code:
* sys_sdl_win.c: Copied from sys_sdl.c. Windows-only. Remove unix code.
(Sys_Init): New procedure. Call AllocConsole() and get input and output
handles for dedicated servers.
(Sys_ConsoleInput): Add a windows version.
(Sys_Error): Adjust for the allocated console and use windows api.
Adjust message output. Remove the console timeout, doesn't work somehow.
Just display the console for 3 seconds and then exit. Rely on SDL that
it redirects/logs the stdout/stderr to files.
* sys_sdl_unix.c: Rename from sys_sdl.c. Unix-only. Remove windows code.
(Sys_Init): New procedure.
(Sys_Error): Remove Windows-oriented dedicated server specific code.
Adjust message output.
* sys_sdl.c: Delete.
* sys.h (Sys_Init): Add prototype.
* main_sdl.c (main): Call Sys_Init().
* pl_linux.c (PL_ErrorDialog): Remove terminal printing which Sys_Error
already does.
* pl_osx.m (PL_ErrorDialog): Update from uhexen2.
* pl_win.c: Make icon handle static. whitespace and formatting tidy-up.
* Makefile, Makefile.darwin, Makefile.w32, Makefile.w64: Adjust for the
sys_sdl.c name change to sys_sdl_unix.c and sys_sdl_win.c.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@223 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-22 11:01:24 +00:00
sezero fa6bc1ca0d * net_udp.c (UDP_Read): Remove the get_qsockaddr() helper which came from the
old fitzsdl port, and use the struct qsockaddr *addr argument with typecasting
as in original quake.
(get_qsockaddr): Remove.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@222 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 16:23:06 +00:00
sezero 027f7d2033 * net_udp.c (UDP_Init): Fix Con_SafePrintf() call.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@221 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 16:17:17 +00:00
sezero 6fa1c54ada net_udp, net_wins, net_wipx network drivers update:
- do not try to set the quake hostname to the machine name if it isn't set.
- use the newly added unix/windows socket api compatibility macros from
net_sys.h: using just an int as the socketfd wasn't a problem without win64
support: the windows SOCKET type is not only unsigned but may actually be
wider (uintptr_t, which is 8 bytes on win64).


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@220 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 15:24:40 +00:00
sezero b1835226d6 net_sdlnet.c: reverted parts of rev. 197/198.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@219 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 13:27:30 +00:00
sezero 1f9a960e86 net_main.c: more trivialities.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@218 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 12:27:30 +00:00
sezero 1f5cc564e8 net_bsd.c, net_dgrm.h, net_loop.c, net_loop.h, net_sdl.c, net_win.c: more trivialities.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@217 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 12:20:25 +00:00
sezero 7951b78a96 * host_cmd.c, menu.c, sv_main.c: Include net_sys.h (for net_defs.h).
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@216 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 11:50:21 +00:00
sezero 5ad7537be2 * Makefile, Makefile.darwin, Makefile.w32, Makefile.w64: Build changes:
The SDL_net driver is now disabled by default and platform-specific network
drivers will be used. To compile for SDL_net, a command like "make SDLNET=1"
must be used, in which case a new preprocessor macro _USE_SDLNET will be
defined in the CFLAGS. For windows targets when not using SDL_net, WINSOCK2
is added as another option: A command line like "make WINSOCK2=1" will enable
WinSock2 api and a new preprocessor macro _USE_WINSOCK2 will be defined in
the CFLAGS. Or, a command line like "make WINSOCK2=0" will disable WinSock2
api and the old WinSock 1.1 api will be used instead. For Win64, WinSock2 is
enabled by default. For Win32, WinSock 1.1 is the default api.
* net_bsd.c, net_dgrm.c, net_loop.c, net_main.c, net_sdl.c, net_sdlnet.c,
net_udp.c, net_win.c, net_wins.c, net_wipx.c: Use the newly added net_sys.h
header. The sys_socket_t type is not in use, yet.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@215 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 11:10:38 +00:00
sezero dfc8a912cb * arch_def.h, net_sys.h, wsaerror.h: New headers, adapted from uhexen2.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@214 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 10:55:21 +00:00
sezero 6ea46b7329 net_defs.h (net_driver_t): Removed the controlSock member. It is not used
for any purpose in either of Loop, Datagram or Serial drivers. It used to
be assigned the value returned by the Init() procedure of the relevant
driver which is either 0 for success or -1 for failure, therefore there is
no purpose to it at all.
net_main.c (NET_Init): Removed the controlSocket var and adjusted for the
net_driver_t change.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@213 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 10:50:21 +00:00
sezero 721b07063f net_main.c: made static variables and functions static. formatting tidy-ups.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@212 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 10:41:34 +00:00
sezero 50103ed00c net_dgrm.c: made the statistic counter variables static. same for the
testPollProcedure and test2PollProcedure varibles and StrAddr, NET_Ban_f,
SendMessageNext, ReSendMessage, PrintStats and NET_Stats_f functions.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@211 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 10:16:58 +00:00
sezero 6316a9322d net_dgrm.c: made the packetBuffer struct static.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@210 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 10:03:10 +00:00
sezero 9ca3cf7a34 * common.c: Renamed the empty Test_f function of johnfitz to FitzTezt_f.
Renamed its associated console command to fitztest.
* net_dgrm.c: Renamed back Net_Test_f to Test_f. Added back the test,
test2 and ban console commands.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@209 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 09:58:12 +00:00
sezero 479f58decb * net_dgrm.c: changed the types of banAddr and banMask to struct in_addr.
changed the type of testAddr in _Datagram_CheckNewConnections() to in_addr_t.
a little formatting tidy-up.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@208 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 09:45:24 +00:00
sezero 4b6a2e0b29 * net_defs.h, net_udp.c, net_wins.c, net_wipx.c, net_sdlnet.c: prefixed
the members of qsockaddr structure with a "q".


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@207 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 09:20:32 +00:00
sezero 9bd76857d3 * net_udp.c: Changed broadcastaddr type to struct sockaddr_in.
* net_wins.c: Likewise.
* net_wipx.c: Changed broadcastaddr type to struct sockaddr_ipx.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@206 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 09:00:56 +00:00
sezero 2f15423f9b * net_win.c, net_wins.c, net_wipx.c: warning and compilation fixes.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@205 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 20:50:27 +00:00
sezero 4710f5ae47 * net.h: separated the functions and data exported through net.h into two:
net.h now holds all public exports and the new net_defs.h holds the exports
only required by the net layer. besides the net_* files, host_cmd.c and
sv_main.c are the only reasonable foreign importers of net_defs.h: they
require accessing the qsocket_s structure members. The only one that does
not fit is menu.c needing some net exports, but it may be properly handled,
later on.
* net_defs.h: New header.
* host_cmd.c: Include net_defs.h.
* menu.c: Likewise.
* net_bsd.c: Likewise.
* net_dgrm.c: Likewise.
* net_loop.c: Likewise.
* net_main.c: Likewise.
* net_sdl.c: Likewise.
* net_sdlnet.c: Likewise.
* net_udp.c: Likewise.
* net_win.c: Likewise.
* net_wins.c: Likewise.
* net_wipx.c: Likewise.
* sv_main.c: Likewise.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@204 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 17:21:10 +00:00
sezero 52c41b25ba from uhexen2:
* net_dgrm.c (Datagram_Init): Datagram_Init() must return -1 if it couldn't
initialize any drivers.
* net_main.c (): dedicated servers must error out if no network drivers are
available.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@203 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 15:33:45 +00:00
sezero 7782356afe * net_main.c: added commentary on the driver checks in the code.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@202 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 15:19:58 +00:00
sezero ada3fb2e20 net_main.c (NET_SendToAll): Really change all occurances of state2 to msg_sent.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@201 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 15:06:26 +00:00
sezero 422fb4674a * net_main.c: Fix NET_SendToAll() so that it really skips non-connected
clients. While we're at it, change the type of the blocktime argument
to double (the comparison is against a double.) Rename the cryptic
state1 and state2 variables to something more indicative of thei
purpose, ie. msg_init and msg_sent. from uhexen2.
* net.h, host.c, sv_main.c: Adjust for the NET_SendToAll() argument type
change.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@200 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 15:00:57 +00:00
sezero 6b798a2ffa * net_udp.c: Changed myAddr type to in_addr_t.
* net_wins.c: Changed myAddr type to u_long.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@199 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 13:10:52 +00:00
sezero 77ac562f2d * net_sdlnet.c: Pass "localhost" instead of NULL to SDLNet_ResolveHost().
added some remarks about missing functionality in SDL_net.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@198 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 12:50:51 +00:00
sezero 57aa7ed713 * net_sdlnet.c: Added ASSERT_SOCKETID for paranoid debugging purposes,
disabled by default. Made socket_id() to work in two passes, once for
looking for a match and the next for looking for an empty slot in the
net_sockets[] array. Made it to Sys_Error if there are no empty slots.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@197 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 11:05:28 +00:00
sezero 7f8e2b6eb5 Some more tidy-up and minor fixing in net stuff. Largely trivial. Also
added winquake.h.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@196 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 10:03:05 +00:00
sezero b8388f131e * gl_vidsdl.c, in_sdl.c, main_sdl.c, net_sdlnet.c, pl_linux.c, pl_osx.m,
pl_win.c, sys_sdl.c: Explicitly include SDL.h in the SDL source files. At
present, quakedef.h already includes SDL.h you may never know what would
happen in the future.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@195 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 22:50:48 +00:00
sezero a369e60679 * input.h: Removed the SDL_MAJOR_VERSION guards around BuildKeyMaps() and
Key_Map() prototypes. Made Key_Map() to accept void* argument instead of
SDL_KeyboardEvent* so that the code can compile even without SDL.
* in_sdl.c (Key_Map): Adjusted for argument type change with proper cast
to SDL_KeyboardEvent*. The assembler output is the same as before.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@194 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 22:45:18 +00:00
sezero 7030aaf38c Makefiles: Removed an obsoleted comment. Added objects for platform-specific
network drivers in commented out form.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@193 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 20:15:21 +00:00
sezero 97fa260661 * net_wipx.c, net_wipx.h: added from Fitzquake-0.85 source.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@192 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 20:07:04 +00:00
sezero e98269bbf5 net_udp.h: Renamed all function argument names as socket to socketid.
net_udp.c: Renamed all function argument names as socket to socketid.
Replaced the inet_addr("127.0.0.1") call with htonl(INADDR_LOOPBACK).
Replaced qboolean _true with int _true.
net.h: Renamed the OpenSocket and CloseSocket function pointers to
Open_Socket and Close_Socket.
net_dgrm.c: Adjusted for Open_Socket and Close_Socket change.
net_sdlnet.c: Made some functions static.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@191 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 18:20:22 +00:00
sezero 200602bbf3 * net_udp.c: more minor fixes and tidy-ups.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@190 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 17:04:04 +00:00
sezero 47ec80a33a * sys_sdl.c: Added a Sys_ConsoleInput implementation from uhexen2.
Only for unix for the time being.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@189 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 16:50:15 +00:00
sezero 4ca09587ec * net_bsd.c: minor whitespace tidy-up.
* net_sdl.c (net_drivers[]): removed duplicated Datagram entry.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@188 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 16:45:38 +00:00
sezero 1e984d7809 * net_udp.c: Some cleanups & tidy-ups.
* net_bsd.c: Added from original Quake source.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@187 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 16:37:28 +00:00
sezero 0f6c0a0c55 * main_sdl.c: better dedicated server loop.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@186 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 14:50:48 +00:00
sezero 257ad7e38d * gl_model.c (Mod_LoadFaces): Do not call GL_SubdivideSurface() in dedicated
servers, otherwise we segfault in SubdividePolygon() at the BoundPoly() call.
This is a workaround, the actual problem is yet to be looked into.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@185 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 14:16:05 +00:00
sezero 3e996b3050 * main_sdl.c: Skip the SDL_Event stuff in dedicated servers.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@184 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 14:10:19 +00:00
sezero 243c2a6647 * host_cmd.c (Host_Map_f): Do not call IN_Activate() for dedicated servers.
(Host_Changelevel_f): Likewise.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@183 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 09:00:22 +00:00
sezero 367886b460 -Wshadow fixes:
sv_user.c (SV_WaterMove): use the global wishspeed.
(SV_ReadClientMessage): rename cmd to ccmd.
view.c (forward, right, up): make them local to V_CalcRoll() and not global.
net.h (playername, playercolor): remove externs for the non-existant globals.
r_sprite.c (R_GetSpriteFrame): rename the function's argument to currentent.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@182 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-03 19:03:31 +00:00
sezero 29b96547ed renamed the global channels to snd_channels. removed the global variable
sound_nominal_clip_dist and made it into a macro in snd_dma.c.
snd_dma.c: general whitespace and formatting cleanup.
(S_StaticSound): Explicitly cast vol to int when assigning it to ss->master_vol.
(S_UpdateAmbientSounds): changed the type of vol from float to int. used int
casts in its calculations. added explicit int casts when assigning values to
chan->master_vol.
(S_Update_): added explicit unsigned int casts in endtime calculations.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@181 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-03 17:25:24 +00:00
sezero 89b16b1ccd renamed cvar variable volume to sfxvolume in order to avoid shadowing.
(console name is still volume, no changes to that.)


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@180 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-03 16:38:22 +00:00
sezero d2fba0d4de snd_mix.c: General whitespace and formatting tidy up.
(DWORD): Deleted macro.
(S_TransferStereo16): Removed unnecessary pbuf pointer and used shm-> buffer
directly.
(S_TransferPaintBuffer): Removed unnecessary pbuf pointer and used shm-> buffer
directly. Removed the shadowing instance of snd_vol and used the global var.
(S_PaintChannels): Replaced Q_memset with memset.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@179 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-03 16:28:30 +00:00
sezero f60f04ac0a gl_model.c (Mod_LoadTextures): Don't use "min" or "max" as a var name.
net_dgrm.c (Net_Test_f): Likewise.
pr_cmds.c (SetMinMaxSize, PF_setsize): Likewise.
pr_exec.c (PR_Profile_f): Likewise.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@178 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-01 12:10:49 +00:00
sezero de3a15b24b gl_rmain.c, gl_rmisc.c, cl_tent.c, quakedef.h: removed leftovers from GLTEST.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@177 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-01 10:55:40 +00:00
sezero 94d3702026 common.h: tweak the qboolean and NULL definitions for __cplusplus. from uhexen2.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@176 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 12:10:25 +00:00
sezero 56fedf11a2 mathlib.h (max, min): The min and max were declared as inline but
were never defined. Moved them from mathlib.c to here as static
inline functions q_min and q_max. Define min and max as q_min and
q_max.
mathlib.c (max, min): Moved to mathlib.h as q_max and q_min static
inlines.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@175 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 10:56:27 +00:00
sezero aa07bc5c41 quakedef.h: Define inline as __inline if !__cplusplus && _MSC_VER
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@174 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 10:55:59 +00:00
sezero 3c1ba05bc0 menu.c (m_return_state, m_quit_prevstate): fixed typo.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@173 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 10:12:00 +00:00
sezero f325240397 menu.c (m_return_state): changed type to m_state_e
(m_quit_prevstate): Likewise.
menu.h (m_return_state): added extern declaration.
net_dgrm.c (m_return_state): removed extern declaration.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@172 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 09:15:50 +00:00
sezero 1c8a86d6b9 cvar.c (Cvar_RegisterVariable): change the callback function argument type
to cvarcallback_t.
cvar.h (Cvar_RegisterVariable): adjust prototype.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@171 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 08:01:29 +00:00
sezero cfc2566217 host_cmd.c, console.c, gl_draw.c, image.c, gl_model.c, r_sprite.c, cl_parse.c,
gl_warp.c, host.c, gl_mesh.c, gl_sky.c, gl_texmgr.c, cvar.c, sv_main.c, cvar.h,
gl_screen.c, r_brush.c, gl_vidsdl.c, zone.c, cl_main.c, cmd.c, snd_dma.c,
snd_mem.c, common.c, sv_phys.c: Added explicit casts to eliminate -Wc++-compat
warnings.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@170 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 07:42:36 +00:00
sezero f5986fba56 keys.c (Key_SetBinding): Avoid the C++ keyword "new".
pr_cmds.c (PF_normalize, PF_vlen): Likewise.
zone.c (Z_TagMalloc, Cache_Move, Cache_TryAlloc): Likewise.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@169 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 06:39:09 +00:00
sezero e883bf3b47 gl_mesh.c: Change the type of used[] array from qboolean to int, because
it is assigned not just true or false values but other integers like "2"
as well, and it would cause a mess if compiled as a C++ source.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@168 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 06:27:56 +00:00
sezero d0d9176e86 sys_sdl.c (Sys_Error): Call Host_Shutdown().
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@166 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-18 14:15:19 +00:00
sezero 2f54c5cef0 quakedef.h: bumped QuakeSpasm version to 3 (0.85.3) for further development
and future releases.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@165 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-03 15:28:18 +00:00
stevenaaus b8741a6e99 Fix mouse release issue after toggling fullscreen
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@163 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-02 02:22:24 +00:00
sezero 36d80efa84 host_cmd.c (Host_Startdemos_f): Add missing linefeed in Cbuf_InsertText() call.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@162 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-28 06:42:09 +00:00
sezero 4265cbc294 gl_vidnt.c, gl_vidsdl.c: if 0'ed out unused CheckArrayExtensions().
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@161 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-27 12:40:19 +00:00
sezero 749ef3b9f2 sys.h, sys_sdl.c: Removed unused Sys_MakeCodeWriteable and Sys_DebugLog.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@160 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-27 12:37:20 +00:00
sezero 31991cd33e console.c: Added LOG_Init() and LOG_Close() as two new procedures, adapted
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: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@159 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-27 08:24:13 +00:00
sezero 71a0e9e6c1 main_sdl.c (main): Remove leading linefeed from the init message.
common.c (COM_InitArgv): Move the leading linefeed to the end of message.

Index: main_sdl.c
===================================================================
--- main_sdl.c	(revision 157)
+++ main_sdl.c	(working copy)
@@ -58,7 +58,7 @@
 	if (!parms.membase)
 		Sys_Error ("Not enough memory free; check disk space\n");
 
-	Con_Printf("\nFitzQuake %1.2f (c) John Fitzgibbons\n", FITZQUAKE_VERSION);
+	Con_Printf("FitzQuake %1.2f (c) John Fitzgibbons\n", FITZQUAKE_VERSION);
 	Con_Printf("SDL port (c) Sleepwalkr, Baker\n");
 	Con_Printf("QuakeSpasm %1.2f.%d (c) Ozkan Sezer, Stevenaaus\n", FITZQUAKE_VERSION, QUAKESPASM_VER_PATCH);
 
Index: common.c
===================================================================
--- common.c	(revision 157)
+++ common.c	(working copy)
@@ -1150,7 +1150,7 @@
 	if (n > 0 && com_cmdline[n-1] == ' ')
 		com_cmdline[n-1] = 0; //johnfitz -- kill the trailing space
 
-	Con_Printf("\nCommand line: %s",com_cmdline);
+	Con_Printf("Command line: %s\n", com_cmdline);
 
 	safe = false;
 


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@158 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-27 07:15:19 +00:00
sezero e4623215dd host_cmd.c (Host_Mapname_f): Simplified map name retrieval.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@157 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 21:16:50 +00:00
sezero dbcc18293b zone.c: A little whitespace tidy-up here and there.
(hunk_t): Increased name array length to 24. Fixed the strncpy() calls
into that field so that it will be null terminated.
(cache_system_t): Increased name array length to 32.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@156 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 20:40:18 +00:00
sezero 5879f113e0 sys_sdl.c (Sys_Error): made text3, text4 and text5 into const char arrays.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@155 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 16:55:14 +00:00
sezero 414c89ad55 Constified Con_DebugLog, Con_Print, Con_Printf, Con_Warning, Con_DPrintf,
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: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@154 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 16:30:40 +00:00
sezero 4c0ab421c6 mathlib.h (VectorNormalizeFast): Use a float/int union instead of type
punning to avoid strict aliasing violations. the compiler used to emit
a warning from rsprite.c:R_DrawSpriteModel() where the macro is used.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@153 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 14:11:48 +00:00
sezero d5179bc560 r_alias.c (GL_DrawAliasFrame): Initialize vert2 to vert1 when not lerping,
which avoids a bogus compiler warning.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@152 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 14:02:37 +00:00
sezero d0808e3a96 gl_model.c (Mod_LoadTextures): If lump->filelen == 0, initialize m to NULL
in order to avoid a bogus compiler warning.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@151 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 13:47:19 +00:00
sezero 35795de3d6 r_alias.c (GL_DrawAliasFrame): Initialize blend and iblend to 0 when not
lerping, which avoids a bogus compiler warning.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@150 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 13:44:24 +00:00
sezero ad452580db gl_vidnt.c (VID_SetMode): Initialize stat to false to avoid a compiler warning.
Some whitespace tidy-ups all over.
gl_vidsdl.c (VID_SetMode): Likewise.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@149 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 13:41:39 +00:00
sezero 1593b023a8 gl_vidsdl.c (VID_Init): If -height is not specified on the command line,
initialize height to width*3/4 which avoids a compiler warning.
gl_vidnt.c (VID_Init): Likewise.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@148 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 13:37:56 +00:00
sezero 107d7e932e gl_vidsdl.c (VID_SetMode): If mode setting failed, error out before doing
anything else unnecessary in between.
gl_vidnt.c (VID_SetMode): Likewise.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@147 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 13:33:07 +00:00
sezero 526ebf2017 changed SDL conditional in input.h to SDL_MAJOR_VERSION
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@145 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 16:54:55 +00:00
sezero 04ad6afa99 moved BuildKeyMaps(), Key_Map() and key_map[] from keys.c to in_sdl.c.
made key_map[] static to in_sdl.c. moved the relevant prototypes to
input.h for SDL builds only.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@144 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 16:25:08 +00:00
sezero 8fb859d55c Makefiles: tweaked+tidied the objects (based on uhexen2 makefile.)
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@143 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 15:55:02 +00:00
sezero fb8a9ad688 renamed main.c to main_sdl.c.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@142 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 15:21:59 +00:00
sezero f057a48130 Makefiles: do not rely on /bin/true. define do_strip as a macro for debug and
non-debug cases and use it, instead. (adapted from tyrquake makefile.)


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@141 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 14:50:18 +00:00
sezero 642b28a3af removed gl_test.c
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@138 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 13:55:00 +00:00
sezero 8ad6b1c72a updated to Steven's new icon.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@135 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 12:55:10 +00:00
sezero e600d4aef0 renamed several Fitzquake.* files to QuakeSpasm.* and adjusted the places
where they are referenced.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@132 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 12:45:12 +00:00
sezero b03db64a80 deleted fitzquake.bmp, fitz_bmp.h and fitzquake.ico, removed their reference
from the relevant source files.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@130 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 12:21:14 +00:00
sezero f2b1e54d8d gl_vidsdl.c, gl_vidnt.c: more sync'ing between gl_vidsdl.c and fitz-0.85
version of gl_vidnt.c.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@129 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 11:10:07 +00:00
sezero e4790293d6 menu.c (M_AdjustSliders): Changed all of the second if conditions to else if.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@128 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 11:08:12 +00:00
sezero 63a88014ac gl_vidsdl.c: minor editing for a little less diff output against gl_vidnt.c.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@127 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 10:10:16 +00:00
sezero 2b586c4162 gl_vidnt.c (GL_MTexCoord2fFunc, GL_SelectTextureFunc): these aren't externs
in this file. made it to look like gl_vidsdl.c.
glquake.h: removed commented out multitexture stuff.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@126 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 09:50:44 +00:00
stevenaaus 3e2e9c9cfe Change the "screen size" slider to a scale slider
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@125 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 09:25:13 +00:00
sezero 644f818b5a gl_vidsdl.c: fixed copy+paste error from rev. 119.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@123 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 07:25:39 +00:00
sezero c9918a6861 gl_vidsdl.c (VID_Restart): make sure that scr_conscale.value is positive
in conwidth and conheight recalculation (fitzquake-0.85 change).


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@122 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 06:55:20 +00:00
sezero e89700a400 gl_vidsdl.c (VID_Menu_RebuildBppList): if there are no valid fullscreen
bpps for this width/height, just pick one (fitzquake-0.85 change).


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@121 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 06:52:27 +00:00
sezero aefda7ca67 gl_vidsdl.c: Several Cvar_Set weirdness tidy-ups from fitzquake-0.85.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@120 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 06:48:36 +00:00
sezero 48e69fe4e6 gl_vidsdl.c: Several Con_Printf("WARNING: ....") to Con_Warning("....")
changes from fitzquake-0.85.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@119 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 06:43:24 +00:00
sezero 764baea503 sv_main.c (localmodels): Bumped array size from 5 to 6 in order for it
to operate correctly with the raised limits of fitzquake-0.85.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@118 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 06:24:51 +00:00
sezero 2435579d64 make the code to compile with -fno-common flag:
glquake.h (dev_stats): Add extern.
(dev_peakstats): Likewise.
(dev_overflows): Likewise.
(lightmap_textures): Likewise.
(gl_warpimagesize): Likewise.
(r_drawflat_cheatsafe): Likewise.
(r_fullbright_cheatsafe): Likewise.
(r_lightmap_cheatsafe): Likewise.
(r_drawworld_cheatsafe): Likewise.
gl_texmgr.h (notexture): Likewise.
(nulltexture): Likewise.
(d_8to24table): Likewise.
(d_8to24table_fbright): Likewise.
(d_8to24table_nobright): Likewise.
(d_8to24table_conchars): Likewise.
(d_8to24table_shirt): Likewise.
(d_8to24table_pants): Likewise.
gl_screen.c (sb_lines): Remove and make it live only in sbar.c.
(vid): Remove and make it live only in gl_vid*.c
gl_vidsdl.c (m_state): Remove and make it live only in menu.c.
gl_vidnt.c (m_state): Likewise.
net_dgrm.c (m_state): Remove extern declaration.
menu.c (m_state): Tagged the m_state enum as m_state_e and moved it to menu.h.
Declared m_state as enum m_state_e.
menu.h (enum m_state_e): Moved from menu.c to here.
(m_state): Added extern declaration.
gl_rmain.c (r_drawflat_cheatsafe): Made the global to live here.
(r_fullbright_cheatsafe): Likewise.
(r_lightmap_cheatsafe): Likewise.
(r_drawworld_cheatsafe): Likewise.
gl_warp.c (gl_warpimagesize): Likewise.
host.c (dev_stats): Likewise.
(dev_peakstats): Likewise.
(dev_overflows): Likewise.
gl_texmgr.c (notexture): Likewise.
(nulltexture): Likewise.
(d_8to24table): Likewise.
(d_8to24table_fbright): Likewise.
(d_8to24table_nobright): Likewise.
(d_8to24table_conchars): Likewise.
(d_8to24table_shirt): Likewise.
(d_8to24table_pants[): Likewise.
r_brush.c (lightmap_textures): Likewise.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@117 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-22 19:02:29 +00:00
sezero 85cd1e7867 menu.c (M_Quit_Draw): updated the authors string and tweaked the string
length calculation by dropping some sprintf() and strlen() calls.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@116 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-22 18:32:26 +00:00
stevenaaus 5e391c16ac Add OSX makefile
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@114 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-22 00:30:57 +00:00
stevenaaus c1a6e95ffc Make conspeed cvar persistent
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@113 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-22 00:27:14 +00:00
stevenaaus 1dc58562cb A few QuakeSpasm name fixes
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@112 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-22 00:25:31 +00:00
sezero cdf45c7e21 New quakespasm icon from Steven.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@111 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-27 13:50:43 +00:00
sezero 72f4e909e6 sv_main.c (SV_SpawnServer): made the dummy array 8 bytes long.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@110 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-09 14:15:34 +00:00
sezero 8a4c3ee70c Don't explicitly expose pr_strings to the whole engine, make it static
to pr_edict.c. Assign a static array of zeroes to sv.model_precache[0]
and sv.sound_precache[0], instead of pr_strings, in sv_main.c.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@109 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-09 14:11:10 +00:00
sezero 9eb958f4da zone.c (Z_Realloc): Fixed the old_size value.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@108 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-09 12:03:08 +00:00
sezero 1a2f742911 gl_vidsdl.c (VID_Init): Removed the gldir variable, not used anymore.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@107 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-07 07:35:39 +00:00
sezero 1b6dc473b0 gl_vidsdl.c (VID_Init): Removed creation of the 'glquake' directory. Not
used for quite some time.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@106 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-07 07:27:54 +00:00
sezero 5b9079f3f2 net_dgrm.c (Strip_Port): rewrote it to not modify its input string and
return its own copy, which I feel safer with. Adjusted its callers.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@105 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 21:03:03 +00:00
sezero 013af8f6ce det_dgrm.c (_Datagram_Connect): Added error feedback when we could not
resolve the given host name.
(Test_f): Likewise.
(Test2_f): Likewise.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@104 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 14:20:46 +00:00
sezero 605c7a360a det_dgrm.c (Strip_Port): New proc stripping off port from the given host
name and assining the new port number to net_hostport. based on ProQuake
code. This makes a command line like "+connect ip:port" work.
(Test_f): Call Strip_Port().
(Test2_f): Likewise.
(Datagram_Connect): Likewise.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@103 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 14:10:37 +00:00
sezero 0074d89d29 common.c (COM_Parse): commented out the check for ':' in regular word parsing
so that a command line like "+connect ip:port2 works.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@102 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 13:35:05 +00:00
sezero e7001c64fa net_dgrm.c (_Datagram_Connect): fix the printf call in the CCREP_REJECT case.
manually null terminate the reason string buffer.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@101 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 10:48:18 +00:00
sezero 5d8209a874 net_sdlnet.c (SDLN_GetAddrFromName): use net_hosport instead of hardcoded
26000 in the SDLNet_ResolveHost() call.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@100 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 10:29:43 +00:00
stevenaaus ca0a5d999a S.A. history fixes
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@99 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-05 22:12:23 +00:00
sezero 271ebe9b1e cl_main.c (CL_EstablishConnection): Send a clc_nop at the end of the function.
This has been referred to by Baker as the NAT fix of ProQuake. Applied upon
Steven's suggestion and it made me able to connect to bigfoot.quake1.net:26001
too.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@98 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-05 16:11:06 +00:00
sezero ae22d65e0a main.c (main): Block/Unblock sound upon focus loss/gain, implemented
under the SDL_ACTIVEEVENT case.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@97 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-01 23:10:13 +00:00