This has the benefit that it is stored in "config.cfg",
and is reset by "resetall" and "resetcfg". Other than
that though, it behaves exactly the same as before.
(The same console input will lead to the same result
as before when it was a command.)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@617 af15c1b1-3010-417e-b628-4374ebc0bcbd
- Make it reset only those cvar's that are saved to config.cfg.
- Make it as the user for confirmation.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@609 af15c1b1-3010-417e-b628-4374ebc0bcbd
of the new cvar to use the new cvar flags.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@601 af15c1b1-3010-417e-b628-4374ebc0bcbd
(Enter "r_nolerp_list" in the console for an example.)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@595 af15c1b1-3010-417e-b628-4374ebc0bcbd
GL_CheckExtensions() set gl_swap_control as true.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@582 af15c1b1-3010-417e-b628-4374ebc0bcbd
the vid_fullscreen callback function setting vid_changed to true.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@577 af15c1b1-3010-417e-b628-4374ebc0bcbd
moved its calling from COM_Init() to Host_Init() just after COM_Init().
Moved registration of registered and cmdline cvars and COM_Path_f command
and the calling of COM_CheckRegistered() to COM_InitFilesystem(). Removed
unused memsearch(). Fixed the stupidity in leading space elimination from
com_cmdline.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@573 af15c1b1-3010-417e-b628-4374ebc0bcbd
Cvar_FindVarAfter. Don't expose cvar_vars directly and use Cvar_FindVarAfter
instead. several typo fixes, etc.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@570 af15c1b1-3010-417e-b628-4374ebc0bcbd
and set some basic flags, but then let functions to set it. Added Cvar_SetQuick
and Cvar_SetValueQuick which accept a cvar pointer instead of a var name, but
identical to the non-Quick versions otherwise. Made Cvar_SetValue to print the
value as an integer if the float value is the same when cast to an int; if not,
made it to strip the trailing zeroes in the string.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@569 af15c1b1-3010-417e-b628-4374ebc0bcbd
CCREQ_RULE_INFO is evil...
while I was there, did some whitespace clean-up in common.c.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@568 af15c1b1-3010-417e-b628-4374ebc0bcbd
use the callbacks for scr_fov, scr_viewsize, scr_conwidth & scr_conscale
changes by simply setting vid.recalc_refdef to 1: now that Cvar_Set()
doesn't do anything when there is no change, this has the same effect.
* snd_dma.c: removed oldvol, set a callback to sfxvol in order to call
SND_InitScaletable() upon every volume change.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@567 af15c1b1-3010-417e-b628-4374ebc0bcbd
- removed the archive and server members of cvar_t structure
which are now represented by the CVAR_ARCHIVE, CVAR_NOTIFY
and CVAR_SERVERINFO flags.
- added new Cvar_SetROM and Cvar_SetValueROM functions to
set vars marked as CVAR_ROM (read-only vars) programaticaly
- added Cvar_SetCallback() as a new function to assign (or
remove) a callback function to a cvar.
- changed Cvar_RegisterVariable() to only accept a var pointer
as in original quake
- moved notification handling from Cvar_Set() to callbacks.
- changed Cvar_Set() so that it doesn't reallocate the var's
string buffer if nothing is changed, nor does it run the
var's callback.
- changed the 'registered' and 'cmdline' cvars to be read-only
so that the users can't change it using the console. (and
with 'registered' flagged as CVAR_ROM, the 'static_registered'
thing is no longer required)
- added comment that sending cmdline upon CCREQ_RULE_INFO is
evil...
- more to follow later.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@566 af15c1b1-3010-417e-b628-4374ebc0bcbd
server: R_Init() isn't called for dedicated server therefore gl_subdivide_size
was used without being registered hence divisions by zero when using its value
member. Geez.. Moved its registration to Mod_Init() and we are good.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@565 af15c1b1-3010-417e-b628-4374ebc0bcbd
instead of FS_fseek(). From Sander van Dijk.
cfgfile.c, cfgfile.h: synced with uhexen2 versions.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@564 af15c1b1-3010-417e-b628-4374ebc0bcbd
if zero size was passed. From Sander van Dijk.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@563 af15c1b1-3010-417e-b628-4374ebc0bcbd
(fix originally from QIP sources of Matthias Buecher, a.k.a. Maddes)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@536 af15c1b1-3010-417e-b628-4374ebc0bcbd
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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@534 af15c1b1-3010-417e-b628-4374ebc0bcbd
of platform specific usleep() or Sleep() calls.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@532 af15c1b1-3010-417e-b628-4374ebc0bcbd
isn't necessary after init. thanks to Sander van Dijk.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@531 af15c1b1-3010-417e-b628-4374ebc0bcbd
* 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@529 af15c1b1-3010-417e-b628-4374ebc0bcbd
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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@528 af15c1b1-3010-417e-b628-4374ebc0bcbd
and dead key support to the console, thanks to Sander van Dijk.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@524 af15c1b1-3010-417e-b628-4374ebc0bcbd
character. This allows using a windows-generated history.txt file on unix.
based on a patch from Sander van Dijk.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@523 af15c1b1-3010-417e-b628-4374ebc0bcbd
patch from Sander van Dijk. Rearrange the autorepeat condition checks a
bit, based on uhexen2.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@522 af15c1b1-3010-417e-b628-4374ebc0bcbd
is connected. Set it to key_console, otherwise. Patch from and thanks
to Sander van Dijk.
(M_Main_Key): Likewise.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@521 af15c1b1-3010-417e-b628-4374ebc0bcbd
host.c (Host_GetConsoleCommands): ... here, where it should be.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@520 af15c1b1-3010-417e-b628-4374ebc0bcbd
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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@517 af15c1b1-3010-417e-b628-4374ebc0bcbd
you know..) and adjusted all callers accordingly. changed Sys_Sleep() to
take a milliseconds argument, added implementations for unix (usleep) and
windows (Sleep).
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@512 af15c1b1-3010-417e-b628-4374ebc0bcbd
made windows Sys_mkdir() to use windows api functions.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@507 af15c1b1-3010-417e-b628-4374ebc0bcbd
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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@505 af15c1b1-3010-417e-b628-4374ebc0bcbd
variables and functions private and did some whitespace tidy-ups.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@504 af15c1b1-3010-417e-b628-4374ebc0bcbd
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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@500 af15c1b1-3010-417e-b628-4374ebc0bcbd
performing checks every two seconds in CDAudio_Update() and caching
the last check time.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@498 af15c1b1-3010-417e-b628-4374ebc0bcbd
to become negative. (noticed this in rmq some time ago...)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@495 af15c1b1-3010-417e-b628-4374ebc0bcbd
It was a legacy from Quake who used to open and close the log file on every
write. Commented out the unlink() call and added O_TRUNC to the open flags.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@476 af15c1b1-3010-417e-b628-4374ebc0bcbd
of the memory before returning, which is Z_Malloc() behavior.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@470 af15c1b1-3010-417e-b628-4374ebc0bcbd
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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@467 af15c1b1-3010-417e-b628-4374ebc0bcbd
Hunk_Alloc() already clears the memory before returning it.
* Some minor cleanups.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@465 af15c1b1-3010-417e-b628-4374ebc0bcbd
Adding a cvar to control this option should follow later.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@458 af15c1b1-3010-417e-b628-4374ebc0bcbd
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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@455 af15c1b1-3010-417e-b628-4374ebc0bcbd
renamed it to COM_FileGetExtension, added a prototype to common.h.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@454 af15c1b1-3010-417e-b628-4374ebc0bcbd
changed version to 0.85.5 in the README files. changed version to
0.85.5 in quakedef.h.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@449 af15c1b1-3010-417e-b628-4374ebc0bcbd
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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@443 af15c1b1-3010-417e-b628-4374ebc0bcbd
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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@440 af15c1b1-3010-417e-b628-4374ebc0bcbd
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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@439 af15c1b1-3010-417e-b628-4374ebc0bcbd
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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@428 af15c1b1-3010-417e-b628-4374ebc0bcbd
a default value of 0.02. changing its value to 0 disables throttling.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@427 af15c1b1-3010-417e-b628-4374ebc0bcbd
added braces to the inner for loop in SND_InitScaletable().
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@424 af15c1b1-3010-417e-b628-4374ebc0bcbd
updated documentation for the command line option name change.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@416 af15c1b1-3010-417e-b628-4374ebc0bcbd
an alternative to the existing one using libmad. requires at least
mpg123-1.12.0, i.e. api version 25.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@414 af15c1b1-3010-417e-b628-4374ebc0bcbd
(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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@408 af15c1b1-3010-417e-b628-4374ebc0bcbd
* 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@407 af15c1b1-3010-417e-b628-4374ebc0bcbd
* updated copyright years for several sound related sources.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@405 af15c1b1-3010-417e-b628-4374ebc0bcbd
as a new private function. make S_MP3_CodecRewindStream() to use
the new mp3_madseek() function.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@404 af15c1b1-3010-417e-b628-4374ebc0bcbd
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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@401 af15c1b1-3010-417e-b628-4374ebc0bcbd
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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@398 af15c1b1-3010-417e-b628-4374ebc0bcbd
so we must undefine them before redefining.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@397 af15c1b1-3010-417e-b628-4374ebc0bcbd
made quakespasm custom conback embedding optional, still defaulting to 1.
the code requires USE_QS_CONBACK preprocessor definition.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@392 af15c1b1-3010-417e-b628-4374ebc0bcbd
(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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@388 af15c1b1-3010-417e-b628-4374ebc0bcbd
removed the inline versions which only handled integers. moved CLAMP
macro to common.h. Adjusted all places for the renamed macros.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@386 af15c1b1-3010-417e-b628-4374ebc0bcbd
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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@384 af15c1b1-3010-417e-b628-4374ebc0bcbd
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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@374 af15c1b1-3010-417e-b628-4374ebc0bcbd
COM_FileExists as a new helper procedure which calls COM_FindFile
with both file and handle parameters as NULL.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@373 af15c1b1-3010-417e-b628-4374ebc0bcbd
accept only if it is coming from the same game directory as for the map
itself.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@372 af15c1b1-3010-417e-b628-4374ebc0bcbd
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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@371 af15c1b1-3010-417e-b628-4374ebc0bcbd
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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@370 af15c1b1-3010-417e-b628-4374ebc0bcbd
Made COM_FindFile() static to common.c. Removed COM_CopyFile(), no
callers at the moment.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@369 af15c1b1-3010-417e-b628-4374ebc0bcbd
for easier reading. Added COM_LoadZoneFile(), COM_LoadMallocFile() and
COM_LoadBufFile() from uhexen2. Added comments after their prototypes
in common.h.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@361 af15c1b1-3010-417e-b628-4374ebc0bcbd
Fixes "whiteroom" (http://www.quaddicted.com/reviews/whiteroom.html) completely
locking the engine. fix from the quakeforge sources.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@359 af15c1b1-3010-417e-b628-4374ebc0bcbd
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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@356 af15c1b1-3010-417e-b628-4374ebc0bcbd
* 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@355 af15c1b1-3010-417e-b628-4374ebc0bcbd
with extra bits from uhexen2. we may use the information some
day.. (or not..)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@354 af15c1b1-3010-417e-b628-4374ebc0bcbd
* 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@353 af15c1b1-3010-417e-b628-4374ebc0bcbd
handling. If volume is 0, don't bother advancing and pause.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@351 af15c1b1-3010-417e-b628-4374ebc0bcbd
* 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@350 af15c1b1-3010-417e-b628-4374ebc0bcbd
removed the old unused CheckArrayExtensions.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@348 af15c1b1-3010-417e-b628-4374ebc0bcbd
Remove unused global cache_full_cycle. Comment out unused function
DumpChunks().
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@341 af15c1b1-3010-417e-b628-4374ebc0bcbd
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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@307 af15c1b1-3010-417e-b628-4374ebc0bcbd
from etype_t to int for C++ compatibility. from uhexen2.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@306 af15c1b1-3010-417e-b628-4374ebc0bcbd
gl_draw.c (GL_Set2D): Use CANVAS_INVALID instead of -1.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@295 af15c1b1-3010-417e-b628-4374ebc0bcbd
setting up the dedicated server with less memory.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@294 af15c1b1-3010-417e-b628-4374ebc0bcbd
(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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@285 af15c1b1-3010-417e-b628-4374ebc0bcbd
* Quake/console.c, net_udp.c: replace snprintf by q_snprintf.
* Quake/common.h: Define q_snprintf as _snprintf for windows and as
snprintf for all others. Likewise for q_vsnprintf. Disable several
MSVC warnings. Define fmin and fmax as min and max macros for MSVC.
* Windows/quakespasm.vcproj, quakespasm.sln: Add Visual Studio 2005
project files.
* Windows/SDL_x64.zip: Add SDL x64 import libraries for MSVC.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@281 af15c1b1-3010-417e-b628-4374ebc0bcbd