Commit Graph

432 Commits

Author SHA1 Message Date
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
Ozkan Sezer 906df3f650 const correctness changes.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@300 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 02:22:55 +00:00
Ozkan Sezer 66ec5d11dc gl_model.c (Mod_LoadAliasModel, Mod_LoadSpriteModel): add some enum casts
to make things more compatible with C++.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@299 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-24 10:41:41 +00:00
Ozkan Sezer d9182f61a4 made the PollProcedure api compatible with C++.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@298 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-24 10:29:19 +00:00
Steven 5c57699095 Back out Oz's cd-sdl.c changes
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@297 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-24 10:06:16 +00:00
Ozkan Sezer 36d82d087d removed net_serial which was for dosquake only.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@296 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-24 09:55:43 +00:00
Ozkan Sezer a7103e2d39 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@295 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-24 09:20:19 +00:00
Ozkan Sezer 6829940b87 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@294 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-24 09:11:57 +00:00
Ozkan Sezer 7957d214ba cd_sdl.c: cleaned up the latest mess a little. restricted track progressing
to the cd player facility only.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@293 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-24 09:04:16 +00:00
Steven 6beef00279 cd fix needed fo gameplay
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@292 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-24 01:28:40 +00:00
Steven 627ffd4f64 Make "cd play" progress tracks
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@291 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-24 00:35:22 +00:00
Ozkan Sezer 834e2cf868 * cd_sdl.c (export_cddev_arg): make putevn() actually work.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@290 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 23:46:16 +00:00
Ozkan Sezer 010a465de2 * cd_sdl.c (export_cddev_arg): fixed bad snprintf and the crash it was
causing.


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


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@286 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 14:32:34 +00:00
Ozkan Sezer 27fc06b792 * 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@285 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 14:05:32 +00:00
Steven 93dd4d8bb1 cd command tweaks
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@284 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 10:31:00 +00:00
Steven fb745fe815 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@283 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 09:49:03 +00:00
Steven 38b8119eb7 Set SDL_CDROM environment variable when using -cddev. Some doco updates.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@282 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 04:12:19 +00:00
Ozkan Sezer d8779f7d0d 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@281 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-20 02:25:22 +00:00
Ozkan Sezer 88f32bdabf Makefile.w32, Makefile.w64: made them a little bit more flexible by adding
CROSS_COMPILE and TARGET variables.


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


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


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@275 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 20:10:20 +00:00
Ozkan Sezer 1b8482a1d8 * pr_cmd.c: replaced isnan() calls with quake's own ISNAN() macro.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@274 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 20:06:06 +00:00
Kristian Duske 542da2a2aa git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@272 af15c1b1-3010-417e-b628-4374ebc0bcbd 2010-08-14 19:41:09 +00:00
Steven d4389ecb61 Miscellaneous doco updates
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@269 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 05:01:12 +00:00
Steven f528bdb8a1 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@268 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 03:59:29 +00:00
Steven 2ec27d0df8 Swap left and right arrow keys in the videomode menu. (Right arrow now increases resolution, which is more standard)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@267 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 03:42:52 +00:00
Ozkan Sezer ef4fc53d27 net_sys.h: update comments and tidy up.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@262 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-09 14:03:07 +00:00
Ozkan Sezer f89750857f 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@260 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-09 12:20:39 +00:00
Steven fbe9360365 Add a "prev weapon" menu item (from Sander)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@253 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-04 03:09:07 +00:00
Ozkan Sezer d5e85a5e6c host_cmd.c, menu.c: sanitize whitespace/formatting.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@252 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-02 19:45:16 +00:00
Ozkan Sezer 4a1e01a976 menu.c: Added an options enum for the options menu. Added an options menu
entry for mouse look toggling.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@251 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-02 18:28:23 +00:00
Ozkan Sezer c8273e039c revert incorrect changes to NUM_GAMEOPTIONS and gameoptions_cursor_table from rev. 246.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@250 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-02 17:33:03 +00:00
Ozkan Sezer f493f3a17f gl_mesh.c (BuildTris): worked around a type-punned pointer. adapted from quakeforge.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@249 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-01 21:11:16 +00:00
Ozkan Sezer a7d57b4b51 * 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@248 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-01 19:22:46 +00:00
Steven 19b960c889 Add a statusbar alpha slider, and change default scr_sbaralpha to 0.95
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@247 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-29 06:48:25 +00:00
Steven b9d4ec244f Link the status bar size to the scale slider, though it's size only increases half as fast
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@246 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-29 01:52:04 +00:00
Steven 6a79b12f88 History fixed - Ozkan's newline fix seems ok.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@245 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-28 07:50:27 +00:00
Steven f303df4d82 Make some fixes for command line history now that history is persistent
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@244 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-28 07:08:16 +00:00
Steven 66cafbd197 There seems bugs in the command-line code. Revert this "blank newline" fix first, then look for more
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@243 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-27 21:45:33 +00:00
Steven 7284633062 -bgvolume switch stays... Allows CD music/ambient music to play while minimized
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@242 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-26 08:47:11 +00:00
Ozkan Sezer 236d7a62ce 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@241 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-25 12:20:17 +00:00
Ozkan Sezer e69a106d3d made MAXCMDLINE definition public through keys.h.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@240 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-25 10:36:14 +00:00
Steven 70dc6cb641 (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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@238 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-23 20:58:04 +00:00
Steven e9192f232a 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@237 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-23 20:55:11 +00:00
Ozkan Sezer c6a63edca2 keys.c (History_Shutdown): Don't let it write an empty string to history.txt
if no console commands were used.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@235 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-26 10:50:40 +00:00
Ozkan Sezer d65f8679a7 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@234 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-26 08:45:40 +00:00
Ozkan Sezer 1496d179e5 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@233 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-26 08:16:58 +00:00
Ozkan Sezer 8126ad58a8 * 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@232 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-26 07:56:28 +00:00
Ozkan Sezer 5fdce8c9ef 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@231 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-26 00:31:12 +00:00
Ozkan Sezer d96f32d4b8 keys.c (History_Init): Made global again.
(History_Shutdown): Likewise.
keys.h: Added prototypes for History_Init and History_Shutdown.


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


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@229 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-25 23:55:41 +00:00
Steven 5a273f0a99 Add Bakers/Ezquakes persistent history feature
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@228 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-25 13:32:49 +00:00
Ozkan Sezer 42c47095a1 net_udp.c, net_wins.c, net_wipx.c: Add more informative debug messages.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@227 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-22 18:11:00 +00:00
Ozkan Sezer bfe38b58b4 net_wins.c (WINS_GetLocalAddress): Make sure buff is null terminated.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@226 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-22 18:09:02 +00:00
Ozkan Sezer 506774e2ad net_wins.c (WINS_Init): Fix error return value as INVALID_SOCKET.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@225 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-22 18:05:43 +00:00
Ozkan Sezer 132f3a8542 * console.h (Con_DebugLog): Add prototype.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@224 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-22 11:02:13 +00:00
Ozkan Sezer d098087606 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@223 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-22 11:01:24 +00:00
Ozkan Sezer 79d6d5cf5a * 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@222 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 16:23:06 +00:00
Ozkan Sezer 5a4f294463 * net_udp.c (UDP_Init): Fix Con_SafePrintf() call.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@221 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 16:17:17 +00:00
Ozkan Sezer 01d0107869 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@220 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 15:24:40 +00:00
Ozkan Sezer 9bf3296c08 net_sdlnet.c: reverted parts of rev. 197/198.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@219 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 13:27:30 +00:00
Ozkan Sezer d1c4f8d602 net_main.c: more trivialities.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@218 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 12:27:30 +00:00
Ozkan Sezer 2bed6c79c9 net_bsd.c, net_dgrm.h, net_loop.c, net_loop.h, net_sdl.c, net_win.c: more trivialities.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@217 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 12:20:25 +00:00
Ozkan Sezer dd05f2d23b * host_cmd.c, menu.c, sv_main.c: Include net_sys.h (for net_defs.h).
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@216 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 11:50:21 +00:00
Ozkan Sezer 92481933c5 * 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@215 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 11:10:38 +00:00
Ozkan Sezer 695de2626a * arch_def.h, net_sys.h, wsaerror.h: New headers, adapted from uhexen2.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@214 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 10:55:21 +00:00
Ozkan Sezer 269be1c938 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@213 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 10:50:21 +00:00
Ozkan Sezer 2362229246 net_main.c: made static variables and functions static. formatting tidy-ups.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@212 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 10:41:34 +00:00
Ozkan Sezer 6f88083fd3 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@211 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 10:16:58 +00:00
Ozkan Sezer e0f77e3510 net_dgrm.c: made the packetBuffer struct static.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@210 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 10:03:10 +00:00
Ozkan Sezer efde005b7f * 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@209 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 09:58:12 +00:00
Ozkan Sezer 5475d36f5f * 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@208 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 09:45:24 +00:00
Ozkan Sezer ca7aa6c733 * 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@207 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 09:20:32 +00:00
Ozkan Sezer 56d6aa3899 * 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@206 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 09:00:56 +00:00
Ozkan Sezer 79154d12ca * net_win.c, net_wins.c, net_wipx.c: warning and compilation fixes.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@205 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 20:50:27 +00:00
Ozkan Sezer febb164f0f * 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@204 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 17:21:10 +00:00
Ozkan Sezer c418e8e05f 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@203 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 15:33:45 +00:00
Ozkan Sezer 09c70daa38 * net_main.c: added commentary on the driver checks in the code.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@202 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 15:19:58 +00:00
Ozkan Sezer 0ea2624976 net_main.c (NET_SendToAll): Really change all occurances of state2 to msg_sent.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@201 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 15:06:26 +00:00
Ozkan Sezer a32d9f11bc * 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@200 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 15:00:57 +00:00
Ozkan Sezer ccbabac1c5 * net_udp.c: Changed myAddr type to in_addr_t.
* net_wins.c: Changed myAddr type to u_long.


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


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@198 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 12:50:51 +00:00
Ozkan Sezer c026da1140 * 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@197 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 11:05:28 +00:00
Ozkan Sezer 9940a1ef02 Some more tidy-up and minor fixing in net stuff. Largely trivial. Also
added winquake.h.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@196 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 10:03:05 +00:00
Ozkan Sezer 2740f44b92 * 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@195 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 22:50:48 +00:00
Ozkan Sezer 58784476dc * 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@194 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 22:45:18 +00:00
Ozkan Sezer ff422a8af3 Makefiles: Removed an obsoleted comment. Added objects for platform-specific
network drivers in commented out form.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@193 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 20:15:21 +00:00
Ozkan Sezer 9c8e8bfcfd * net_wipx.c, net_wipx.h: added from Fitzquake-0.85 source.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@192 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 20:07:04 +00:00
Ozkan Sezer 5b0a76cfd2 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@191 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 18:20:22 +00:00
Ozkan Sezer ce25b2ce89 * net_udp.c: more minor fixes and tidy-ups.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@190 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 17:04:04 +00:00
Ozkan Sezer 92b924d247 * sys_sdl.c: Added a Sys_ConsoleInput implementation from uhexen2.
Only for unix for the time being.


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


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


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@187 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 16:37:28 +00:00
Ozkan Sezer 48f7e6ba51 * main_sdl.c: better dedicated server loop.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@186 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 14:50:48 +00:00
Ozkan Sezer ea4bad07b8 * 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@185 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 14:16:05 +00:00
Ozkan Sezer d29e2927e6 * main_sdl.c: Skip the SDL_Event stuff in dedicated servers.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@184 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 14:10:19 +00:00
Ozkan Sezer 58d37f36a3 * host_cmd.c (Host_Map_f): Do not call IN_Activate() for dedicated servers.
(Host_Changelevel_f): Likewise.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@183 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 09:00:22 +00:00
Ozkan Sezer 3d537f9ec2 -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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@182 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-03 19:03:31 +00:00
Ozkan Sezer 5658a9e28d 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@181 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-03 17:25:24 +00:00
Ozkan Sezer 80a3a0df30 renamed cvar variable volume to sfxvolume in order to avoid shadowing.
(console name is still volume, no changes to that.)


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@180 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-03 16:38:22 +00:00
Ozkan Sezer a68e196950 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@179 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-03 16:28:30 +00:00
Ozkan Sezer b2b771b19f 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@178 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-01 12:10:49 +00:00
Ozkan Sezer 10b8caa816 gl_rmain.c, gl_rmisc.c, cl_tent.c, quakedef.h: removed leftovers from GLTEST.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@177 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-01 10:55:40 +00:00
Ozkan Sezer 23bc72554f common.h: tweak the qboolean and NULL definitions for __cplusplus. from uhexen2.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@176 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 12:10:25 +00:00
Ozkan Sezer 12e4aa6caa 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@175 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 10:56:27 +00:00
Ozkan Sezer 1ec6c1b340 quakedef.h: Define inline as __inline if !__cplusplus && _MSC_VER
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@174 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 10:55:59 +00:00
Ozkan Sezer e8b48ab9ec menu.c (m_return_state, m_quit_prevstate): fixed typo.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@173 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 10:12:00 +00:00
Ozkan Sezer 3062b81726 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@172 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 09:15:50 +00:00
Ozkan Sezer b034275af4 cvar.c (Cvar_RegisterVariable): change the callback function argument type
to cvarcallback_t.
cvar.h (Cvar_RegisterVariable): adjust prototype.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@171 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 08:01:29 +00:00
Ozkan Sezer c24d592580 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@170 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 07:42:36 +00:00
Ozkan Sezer def1c058f4 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@169 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 06:39:09 +00:00
Ozkan Sezer 1bdb202ef8 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@168 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 06:27:56 +00:00
Ozkan Sezer 8ee760abc8 sys_sdl.c (Sys_Error): Call Host_Shutdown().
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@166 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-18 14:15:19 +00:00
Ozkan Sezer 61ff367eee quakedef.h: bumped QuakeSpasm version to 3 (0.85.3) for further development
and future releases.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@165 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-03 15:28:18 +00:00
Steven bcc52d9c82 Fix mouse release issue after toggling fullscreen
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@163 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-02 02:22:24 +00:00
Ozkan Sezer 7f7fdb596d host_cmd.c (Host_Startdemos_f): Add missing linefeed in Cbuf_InsertText() call.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@162 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-28 06:42:09 +00:00
Ozkan Sezer bb18b7dd41 gl_vidnt.c, gl_vidsdl.c: if 0'ed out unused CheckArrayExtensions().
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@161 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-27 12:40:19 +00:00
Ozkan Sezer 9501dc2bf6 sys.h, sys_sdl.c: Removed unused Sys_MakeCodeWriteable and Sys_DebugLog.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@160 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-27 12:37:20 +00:00
Ozkan Sezer c2c768f028 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@159 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-27 08:24:13 +00:00
Ozkan Sezer 65a7f903e5 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@158 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-27 07:15:19 +00:00
Ozkan Sezer 72cae1fef7 host_cmd.c (Host_Mapname_f): Simplified map name retrieval.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@157 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 21:16:50 +00:00
Ozkan Sezer ba6f73616b 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@156 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 20:40:18 +00:00
Ozkan Sezer 68361d51b1 sys_sdl.c (Sys_Error): made text3, text4 and text5 into const char arrays.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@155 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 16:55:14 +00:00
Ozkan Sezer 53746a85c9 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@154 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 16:30:40 +00:00
Ozkan Sezer 04f7b1589a 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@153 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 14:11:48 +00:00
Ozkan Sezer 4bc2b26e79 r_alias.c (GL_DrawAliasFrame): Initialize vert2 to vert1 when not lerping,
which avoids a bogus compiler warning.


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


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


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@150 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 13:44:24 +00:00
Ozkan Sezer 4b4ee0cbe9 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@149 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 13:41:39 +00:00
Ozkan Sezer c7dc5d6cbf 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@148 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 13:37:56 +00:00
Ozkan Sezer 9f235e0013 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@147 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 13:33:07 +00:00
Ozkan Sezer d9bba8189a changed SDL conditional in input.h to SDL_MAJOR_VERSION
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@145 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 16:54:55 +00:00
Ozkan Sezer bbcb0caaaa 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@144 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 16:25:08 +00:00
Ozkan Sezer 8c2b5e909c Makefiles: tweaked+tidied the objects (based on uhexen2 makefile.)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@143 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 15:55:02 +00:00
Ozkan Sezer eafcf39b85 renamed main.c to main_sdl.c.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@142 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 15:21:59 +00:00
Ozkan Sezer 986fd86c79 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@141 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 14:50:18 +00:00
Ozkan Sezer 59e73c21f4 removed gl_test.c
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@138 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 13:55:00 +00:00
Ozkan Sezer 91d141ae1e updated to Steven's new icon.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@135 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 12:55:10 +00:00
Ozkan Sezer 3416a30557 renamed several Fitzquake.* files to QuakeSpasm.* and adjusted the places
where they are referenced.


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


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@130 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 12:21:14 +00:00
Ozkan Sezer 6f81045e9f 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@129 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 11:10:07 +00:00
Ozkan Sezer 8a9230a245 menu.c (M_AdjustSliders): Changed all of the second if conditions to else if.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@128 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 11:08:12 +00:00
Ozkan Sezer be8c131e1a gl_vidsdl.c: minor editing for a little less diff output against gl_vidnt.c.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@127 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 10:10:16 +00:00
Ozkan Sezer 0521495d86 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@126 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 09:50:44 +00:00
Steven 4443dbc333 Change the "screen size" slider to a scale slider
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@125 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 09:25:13 +00:00
Ozkan Sezer a9b408d871 gl_vidsdl.c: fixed copy+paste error from rev. 119.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@123 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 07:25:39 +00:00
Ozkan Sezer b5e526686d 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@122 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 06:55:20 +00:00
Ozkan Sezer cd19b2c7a9 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@121 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 06:52:27 +00:00
Ozkan Sezer 2fc9ed73e5 gl_vidsdl.c: Several Cvar_Set weirdness tidy-ups from fitzquake-0.85.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@120 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 06:48:36 +00:00
Ozkan Sezer cd31ebe1e5 gl_vidsdl.c: Several Con_Printf("WARNING: ....") to Con_Warning("....")
changes from fitzquake-0.85.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@119 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 06:43:24 +00:00
Ozkan Sezer 32335fa57b 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@118 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 06:24:51 +00:00
Ozkan Sezer 317e2d4bd5 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@117 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-22 19:02:29 +00:00
Ozkan Sezer 33a927c262 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@116 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-22 18:32:26 +00:00
Steven 335ed556d4 Add OSX makefile
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@114 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-22 00:30:57 +00:00
Steven 03ebbd04c9 Make conspeed cvar persistent
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@113 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-22 00:27:14 +00:00
Steven 23f43b6685 A few QuakeSpasm name fixes
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@112 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-22 00:25:31 +00:00
Ozkan Sezer f34affb0b0 New quakespasm icon from Steven.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@111 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-27 13:50:43 +00:00
Ozkan Sezer d1f28ddb43 sv_main.c (SV_SpawnServer): made the dummy array 8 bytes long.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@110 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-09 14:15:34 +00:00
Ozkan Sezer 088fb98279 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@109 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-09 14:11:10 +00:00
Ozkan Sezer e5df1b24be zone.c (Z_Realloc): Fixed the old_size value.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@108 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-09 12:03:08 +00:00
Ozkan Sezer b6fa239014 gl_vidsdl.c (VID_Init): Removed the gldir variable, not used anymore.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@107 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-07 07:35:39 +00:00
Ozkan Sezer 4df28fa92b gl_vidsdl.c (VID_Init): Removed creation of the 'glquake' directory. Not
used for quite some time.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@106 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-07 07:27:54 +00:00
Ozkan Sezer ea9f085b67 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@105 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 21:03:03 +00:00
Ozkan Sezer 6a93cb2317 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@104 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 14:20:46 +00:00
Ozkan Sezer 2108aef8c6 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@103 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 14:10:37 +00:00
Ozkan Sezer 610567cb8a 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@102 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 13:35:05 +00:00
Ozkan Sezer 1018692eaa net_dgrm.c (_Datagram_Connect): fix the printf call in the CCREP_REJECT case.
manually null terminate the reason string buffer.


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


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@100 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 10:29:43 +00:00
Steven 72fe89e17c S.A. history fixes
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@99 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-05 22:12:23 +00:00
Ozkan Sezer 6f43d5ca99 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@98 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-05 16:11:06 +00:00
Ozkan Sezer baf95f8146 main.c (main): Block/Unblock sound upon focus loss/gain, implemented
under the SDL_ACTIVEEVENT case.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@97 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-01 23:10:13 +00:00
Ozkan Sezer 14a1493f73 quakedef.h (quakeparms_t): removed the cachedir member which doesn't serve
any purpose for quite some time. added userdir as a new member, user's
directory on UNIX platforms. if user directories are enabled, basedir
and userdir will point to different memory locations, otherwise to the same.
this member will be enabled/used later.
common.c: removed all references to cachedir and com_cachedir which don't
serve any purpose for quite some time.
main (main): removed assingment to cachedir member.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@96 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-01 12:50:12 +00:00
Ozkan Sezer 3724ddbb02 common.c (com_basedir): added new global char array.
(COM_InitFilesystem): used global com_basedir instead of the automatic
basedir variable.
common.h (com_basedir): added extern.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@95 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-01 11:55:13 +00:00
Ozkan Sezer 6feadde1c2 gl_screen.c (SCR_ScreenShot_f): Changed screenshot name to spasmXXXX.tga
as suggested by Piotr Szymaniak.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@94 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-01 11:35:28 +00:00
Ozkan Sezer e0cb1c601d console.c (BuildMapList, Con_TabComplete): fix sporadic erratic behaviour
with map name completion. from Steven.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@93 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-01 10:44:59 +00:00
Ozkan Sezer 0f91628b0d common.c (va): made va() to cycle between four static buffers so that we
can call it one after another. will be needed later.
(get_va_buffer): new helper for va().


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@92 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-01 10:28:12 +00:00
Ozkan Sezer da2c24431a quakedef.h: incremented QuakeSpasm version to 0.2 (0.85.2)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@91 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-27 09:32:44 +00:00
Ozkan Sezer 4a68c9c35e host_cmd.c (ExtraMaps_Add): Fix the list sorting.
(Modlist_Add): Likewise.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@90 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-27 09:03:22 +00:00