Commit Graph

400 Commits

Author SHA1 Message Date
sezero 0099434147 documentation updates
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@409 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-02-10 18:15:19 +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 faa16971d9 updated visual studio project file.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@399 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-13 14:10:16 +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 edee6c7c21 removed references to Misc/Todo.txt and Misc/Changelog.txt from the Xcode
project files.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@396 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-12 10:20:24 +00:00
sezero b3c944b4dd removed Misc/Todo.txt and Misc/Changelog.txt. Appended old Misc/Changelog.txt
content to Misc/fitzquake080sdl.txt for future reference.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@395 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-12 10:12:33 +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
stevenaaus 46a276a66f Update Todo list
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@393 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-12 09:55:01 +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
sezero 35d839abc7 updated the user directories patch to apply and function properly after
the latset changes.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@391 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-11 20:05:12 +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
stevenaaus 651d2c522b Documentation typos
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@389 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-11 08:06:03 +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 98ec5d5a9b updated codeblocks project files after the streaming music changes.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@379 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-05 22:27:33 +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 1b877e7991 added libmad, libogg and libvorbis headers and x86 and x64 import
libraries for windows builds.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@375 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-05 19:55:57 +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