Commit graph

314 commits

Author SHA1 Message Date
Ozkan Sezer
e28dfd7d70 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@369 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-02 21:42:54 +00:00
Ozkan Sezer
0e3e259be3 Made CDAudio_Play() to return success (0) or failure (-1) instead of void.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@368 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-02 18:33:21 +00:00
Ozkan Sezer
3281636a96 fixed rest of the strict-aliasing and uninitialized use warnings.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@367 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-01 14:05:20 +00:00
Ozkan Sezer
9289a26a88 whitespace/formatting tidy-up in quakedef.h.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@366 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-01 12:32:16 +00:00
Ozkan Sezer
1dac8dd81d removed the useless msg_suppress_1 thing.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@365 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-01 12:27:02 +00:00
Ozkan Sezer
301ff71325 removed all remaining references to id386 and UNALIGNED_OK because
the fitz engine doesn't use them at all.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@364 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-01 12:24:28 +00:00
Ozkan Sezer
c7c9f1abb3 changed MAX_OSPATH from 128 to 256 for better compatibility everywhere.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@363 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-01 12:20:15 +00:00
Ozkan Sezer
087196844c W_LoadWadFile: Just use COM_LoadMallocFile(). Some minor cleanup.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@362 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-31 10:47:29 +00:00
Ozkan Sezer
9aad4f2759 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@361 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-31 10:29:38 +00:00
Ozkan Sezer
4ccfbc0ec1 Mod_LoadLighting: free the allocated hunk memory in case of broken or
unsupported lit file.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@360 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-31 09:05:44 +00:00
Ozkan Sezer
b94fea30fb 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@359 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-31 07:55:43 +00:00
Ozkan Sezer
b322f347be W_LoadWadFile: free wad_base only if it isn't NULL.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@358 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-30 23:30:42 +00:00
Ozkan Sezer
6d2ae18a82 killed all references to Draw_BeginDisc
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@357 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-30 23:28:08 +00:00
Ozkan Sezer
f157f088d1 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@356 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-30 21:10:26 +00:00
Ozkan Sezer
bcef8e85f0 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@355 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-30 17:11:28 +00:00
Ozkan Sezer
94767a4e6d 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@354 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-30 17:00:19 +00:00
Ozkan Sezer
165598051c 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@353 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-30 16:50:15 +00:00
Ozkan Sezer
56a7b2e6fd added file_from_pak as a new flobal, made COM_FindFile() to set it properly.
from quakeworld sources.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@352 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-30 16:35:16 +00:00
Ozkan Sezer
b0550eeacd Minor cd_sdl.c cleanups from uhexen2. Reorganized cdaudio volume
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
2010-12-30 14:55:25 +00:00
Ozkan Sezer
f96a8e4d99 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@350 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-30 14:39:12 +00:00
Ozkan Sezer
bf49e25d3f renamed sound.h to q_sound.h
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@349 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-30 14:30:52 +00:00
Ozkan Sezer
ed45746547 gl_vidnt.c, gl_vidsdl.c: Reformatted GL_CheckExtensions for better readability,
removed the old unused CheckArrayExtensions.


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


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@347 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-11-23 06:48:02 +00:00
Ozkan Sezer
d5a2f16883 SDL_putenv() is problematic in versions <= 1.2.9 so replaced it with plain putenv().
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@346 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-11-12 15:51:04 +00:00
Ozkan Sezer
db353f7a19 menu.c: restore the screen size menu item that was removed in rev. 125.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@345 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-10-29 13:03:04 +00:00
Ozkan Sezer
737158283f cmd.c: Fix the unalias command.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@344 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-10-24 14:15:27 +00:00
Steven
94a597c2f3 more max_edicts stuff (from Sander)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@343 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-10-24 07:57:46 +00:00
Steven
179a9a8599 Bump max_edicts for compatibility with WarpSpasm
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@342 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-10-23 21:50:16 +00:00
Ozkan Sezer
2de33fba8b * 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@341 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-10-18 20:39:10 +00:00
Ozkan Sezer
0eaca6e6c2 increased default zone memory size to 384kb
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@340 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-10-11 18:06:11 +00:00
Ozkan Sezer
f5ed1bb6fe cmd.c (Cmd_Alias_f): replace another occasion of Z_Malloc() + strcpy() by Z_Strdup().
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@339 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-10-04 07:40:12 +00:00
Ozkan Sezer
7aa88b97a4 * console.c, sbar.c: fixed a few format string issues.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@337 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-09-20 08:27:20 +00:00
Ozkan Sezer
4221fb358a bumped version to 0.85.4 in the development tree.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@330 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-09-19 09:11:38 +00:00
Ozkan Sezer
1883fdd469 makefile comment tweaks
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@321 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-09-01 06:10:21 +00:00
Ozkan Sezer
e08d6cf1e3 replaced all usess of vsprintf by q_vsnprintf
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@320 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-31 16:57:12 +00:00
Ozkan Sezer
20c394edea added q_snprintf and q_vsnprintf from uhexen2. always use our wrapper
versions to ensure consistent behavior accross platforms.


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


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@317 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-31 11:55:55 +00:00
Ozkan Sezer
6c62d1f9c5 fixed lazy declaration and cleaned up the .bsp extension removal logic.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@315 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-30 02:51:21 +00:00
Ozkan Sezer
71eda66cdc remove the defunct cls.mapstring
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@314 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-30 02:15:22 +00:00
Steven
55764a6111 Remove any trailing ".bsp" from mapname
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@313 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 23:03:50 +00:00
Steven
dd590862a0 End of the world commit
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@312 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 21:37:07 +00:00
Ozkan Sezer
3274be68e3 pr_edict.c (PR_LoadProgs): silenced a minor compiler warning after the const changes.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@310 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 17:50:20 +00:00
Ozkan Sezer
24ac622029 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@308 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 16:02:55 +00:00
Ozkan Sezer
b1585b3039 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@307 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 12:55:41 +00:00
Ozkan Sezer
cecbdc723c 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@306 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 12:36:03 +00:00
Ozkan Sezer
4e60e59d39 constified basedir member of quakeparms_t
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@305 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 12:33:33 +00:00
Ozkan Sezer
ef7e98cb02 pr_comp.h: fixed a harmless typo with DEF_SAVEGLOBAL
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@304 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 12:27:17 +00:00
Ozkan Sezer
db94e7f98c some more constifications and fixes for deprecated conversion
from string constant to char*


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@303 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 12:04:19 +00:00
Ozkan Sezer
f17e534519 added comment in Host_Name_f()
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@301 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 10:22:17 +00:00