fix a bunch of warnings git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9905 d7cf8633-e32d-0410-b094-e92efae38249
split FS_Open into FS_OpenRealFile and FS_OpenVirtualFile (read-only), this allows the savegame menu to only display savegames from the current save directory (not other directories in the virtual filesystem) added b (binary) flag to a few FS_OpenRealFile calls, and removed from a few others (so that logs and QuakeC-written files use OS line endings) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8487 d7cf8633-e32d-0410-b094-e92efae38249
added a parameter to S_StopChannel to trigger a mutex lock, this fixes crashes in the SDL audio callback when S_StopChannel clears fields while they are being used in the mixer (this mostly crashed on level changes), the mutex lock itself is done simply by calling SndSys_LockRenderBuffer git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8176 d7cf8633-e32d-0410-b094-e92efae38249
Removed all calls to strcpy; most of them are now calls to strlcpy or memcpy. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6544 d7cf8633-e32d-0410-b094-e92efae38249
Replaced all calls to str[n]cat and strncpy by calls to strlcat and strlcpy respectively git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6542 d7cf8633-e32d-0410-b094-e92efae38249
fix free/malloc problems from a partial switch to Z_Free and Z_Malloc, the switch over is now complete git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5774 d7cf8633-e32d-0410-b094-e92efae38249
gave names to nearly all structs and enums which should make for better C++ error messages, and fix any more of those anonymous struct errors git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5750 d7cf8633-e32d-0410-b094-e92efae38249
made darkplaces compile successfully with g++ to test for errors C doesn't care about (result: found no actual bugs, just C++ compilers being ultra fussy) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5743 d7cf8633-e32d-0410-b094-e92efae38249
more warning fixes git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5509 d7cf8633-e32d-0410-b094-e92efae38249
-Changed the dpv buffer to 1 MB. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5176 d7cf8633-e32d-0410-b094-e92efae38249
cl_capturevideo_raw* modes now use O_NONBLOCKING file access for more performance git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5074 d7cf8633-e32d-0410-b094-e92efae38249
S_LoadSound now automatically tries both with and without sound/ when loading sounds, which allows quake3 maps to work better, since their target_speaker entities include sound/ in the filenames, this also got rid of the stdpath parameter in the S_PrecacheSound/S_FindName/S_LocalSound calls) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4710 d7cf8633-e32d-0410-b094-e92efae38249
Lots of minor fixes and improvements to the sound engine, plus a few more important changes: - moved the internal structures and API into a separate file (snd_main.h) - added a lock mecanism on SFXs to free them as soon as they're no longer used - simplified the sound API - minor fixes and comment changes here and there - independent sound volume for fake CD tracks - updated MSVC and Dev-C++ project files accordingly - removed unused functions - added a SFX flag to make sure the engine complains at most one time for each missing sound file - made the SFX list a linked list to remove the hardcoded limit for the number of SFX a client can handle - changed the way ambient sounds are managed to be more consistent with the new API - factorized some code - removed the useless IN_Accumulate in the Win32 specific code - removed the table for 8bit sound mixing (snd_scaletable) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4624 d7cf8633-e32d-0410-b094-e92efae38249
Modified the sound code so it can handle sounds outside of a "sound" subdirectory. Changed the video code so it uses the common sound code (nice side-effect: DP video soundtracks can now be Ogg Vorbis files). Removed "wavefile.[ch]" and updated the project files accordingly. Fixed log timestamps on Win32. Cleaned a bit of code and a few header files inclusions here and there. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4258 d7cf8633-e32d-0410-b094-e92efae38249
removed a couple unused hz_bitstream_read functions git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2886 d7cf8633-e32d-0410-b094-e92efae38249
This is a patch from Elric greatly cleaning up the filesystem portions of the engine, and partially prepares the engine for .pk3 support (yay), this also removes support for gzipped files (but that had been disabled for months anyway) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2844 d7cf8633-e32d-0410-b094-e92efae38249
win32 fixes and some MSVC warnings fixed git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2136 d7cf8633-e32d-0410-b094-e92efae38249
.dpv video playback is now implemented. Slow though, because it's resizing textures, this needs to be fixed... git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2083 d7cf8633-e32d-0410-b094-e92efae38249