Commit Graph

1204 Commits

Author SHA1 Message Date
Eric Wasylishen d3377b9358 gl_model.c: (Mod_LoadModel): change Sys_Error to Host_Error for missing
model to be less annoying when testing a broken mod

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1534 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-11-14 07:20:29 +00:00
Eric Wasylishen caceebb7a3 r_alias.c: display skin 0 instead of checkerboard for invalid skin num
metlslime says:

> I was the one that at added the blue checkerboard feature.
> I didn't realize at the time how many mods relied on the behavior of
> vanilla quake to show skin 0 when the mod asks for an invalid skin. So
> I now agree, the engine should replicate vanilla quake's permissive
> behavior and maybe just put up a non-spamy console warning when the
> bad skin is first set.

TODO: The warning is currently spammy (but only if developer 1).
Would be a bit of a pain to make non-spammy.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1532 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-11-12 22:16:34 +00:00
Ozkan Sezer c5b2c6a848 pr_edict.c (ED_ParseEpair): remove a developer.value check before the Con_Dwarning call added by r1527
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1528 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-11-10 05:55:04 +00:00
Eric Wasylishen 78970b5323 ED_ParseEpair: don't read garbage into vectors if the string is too short
This is a bug from vanilla.
Shows up in qump_vingal.bsp from QUMP, which has func_illusionary
entities with "origin" "". Example are the torch holders before
the first door in the map.
Prior to this commit the vector would possibly get a garbage value,
depending on what was on the stack.

see: http://celephais.net/board/view_thread.php?id=61523&start=53&end=61

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1527 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-11-07 21:49:32 +00:00
Eric Wasylishen ac42683f58 r_world.c: rewrite R_DrawTextureChains_Multitexture_VBO to use GLSL
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1524 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-11-01 04:01:02 +00:00
Eric Wasylishen d4d06b4a78 view.c: New "gl_cshiftpercent_contents", "gl_cshiftpercent_damage", "gl_cshiftpercent_bonus", "gl_cshiftpercent_powerup" cvars for tuning the strength of specic view blends.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1515 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-10-03 19:49:04 +00:00
Ozkan Sezer b9e5285607 compiler.h: added clang version of FUNC_NO_OPTIMIZE.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1512 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-10-01 18:11:29 +00:00
Ozkan Sezer 0f694ed6fe merged latest lodepng mainstream code: fixes encoder memory leak for some input error cases.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1506 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-09-17 11:04:05 +00:00
Ozkan Sezer e7648a42c9 minor cleanup to Max_Fps_f() cvar callback.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1505 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-09-17 11:02:46 +00:00
Ozkan Sezer daf5ebec2f "W007: '&array' may not produce intended result" Watcom warning fixes.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1504 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-09-17 08:00:32 +00:00
Ozkan Sezer 3cefb58d5d move the watcom 'aborts' pragma after function declarations.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1503 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-09-16 19:50:12 +00:00
Eric Wasylishen e71737d35c host_maxfps: tweak warning message; > character looks weird in quake
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1501 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-09-13 00:04:31 +00:00
Eric Wasylishen 45f1df6112 host_maxfps: warn the player if > 72 that physics will be broken
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1500 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-09-12 23:27:26 +00:00
Eric Wasylishen 71d7d02eaf SZ_GetSpace: change overflow Sys_Error to Host_Error
this happens for maps that exceed the signon buffer and makes it a bit less annoying

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1499 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-09-12 23:12:33 +00:00
Ozkan Sezer caf3f3eed7 minor warning fix.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1495 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-09-03 14:56:03 +00:00
Eric Wasylishen 7284d3d6f3 SV_TouchLinks: new workaround for touch functions that modify the
trigger linked list.

Copies the touched edicts to a hunk-allocated array first, before
running the touch functions. From QS-Spike, with some adjustments.

See: http://celephais.net/board/view_thread.php?id=60452&start=2950
and fixes: http://www.quaketastic.com/files/misc/touchlinks-test.zip

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1485 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-08-28 02:15:04 +00:00
Eric Wasylishen 94a4d55466 Revert SV_TouchLinks changes from fitzquake
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1484 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-08-28 02:15:03 +00:00
Eric Wasylishen 73123e19cb Revert "applied a better fix for the infamous "SV_TouchLinks: next != l->next" problem."
This reverts r359

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1483 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-08-28 02:15:02 +00:00
Eric Wasylishen 6b99b37f3e SV_HullForEntity: fix misleading error message "MOVETYPE_PUSH with a non bsp model"
- change this and "SOLID_BSP without MOVETYPE_PUSH" to Host_Error (less annoying)
- print classname and origin of entity that caused the error

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1481 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-08-24 03:06:56 +00:00
Eric Wasylishen 79aac789be Revert "always run" changes from r797; move the QuakeSpasm customizations to a new "cl_alwaysrun" cvar.
Set to 1 to scale forward/side/up speed by "cl_movespeedkey" (usually 2), and make "speedkey" act as "slowkey".

Change "always run" menu option to offer
"off" (cl_alwaysrun 0, cl_forwardspeed 200, cl_backspeed 200),
"vanilla" (cl_alwaysrun 0, cl_forwardspeed 400, cl_backspeed 400) and
"quakespasm" (cl_alwaysrun 1, cl_forwardspeed 200, cl_backspeed 200).

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1480 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-08-23 06:00:20 +00:00
Ozkan Sezer 9c26054be9 avoid segfault from the 'viewpos' and 'viewtrace' commands when not
connected (e.g. right after the engine boots.)  make the 'entities'
command to only print when connected.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1479 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-08-20 23:15:43 +00:00
Eric Wasylishen 285e8d470f view.c: restore WinQuake gun position with a r_viewmodel_quake cvar (default to off).
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1477 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-08-19 01:35:54 +00:00
Eric Wasylishen 90e51f683a W_LoadWadFile, COM_CheckRegistered: more helpful error messages
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1476 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-08-14 04:10:32 +00:00
Ozkan Sezer b08e7b1168 Some more image.c / lodepng / stb_image_write clean-ups:
image.c: define LODEPNG_NO_COMPILE_CPP for lodepng.c.
image.c: define STB_IMAGE_WRITE_STATIC for stb_image_write.h
image.c: minor whitespace tidy-up.
stb_image_write.h: remove extern declaration for now non-existing
 stbi_write_tga_with_rle (missed in commit r1468).
stb_image_write.h: comment out stbi_write_jpg_to_func() which quakespasm
 doesn't use.
lodepng.c (lodepng_save_file): remove unneeded (char*) cast from buffer.
lodepng.c (lodepng_read32bitInt): make it static.
lodepng.c (lodepng_get_raw_size_lct): make it static, and move below to
 the place it is actually used.
lodepng.c (lodepng_info_swap): remove (unused function).
lodepng.c (readChunk_zTXt,readChunk_iTXt,addChunk_zTXt, addChunk_iTXt):
 add missing const to casts on const pointers in zlib_compress() calls.
 (see: https://github.com/lvandeve/lodepng/pull/34).
lodepng.c (inflateHuffmanBlock): wrong error code if huffmanDecodeSymbol
 fail. (see: https://github.com/lvandeve/lodepng/pull/52).

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1471 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-08-09 20:00:08 +00:00
Ozkan Sezer 9bf21b932f Makefiles: replace '$^' with '$<' in build rules. add dependency list for image.o.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1469 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-08-09 12:10:13 +00:00
Ozkan Sezer 1e728fa2ad - stb_image_write.h: keep only the jpg writer, the only thing we use
in quakespasm, and remove all others.
- image.c: disable decoder, ancillary chunks and error text support
  by defining the relevant LODEPNG_NO_??? macros.
  (Image_WritePNG): make use of upsidedown parameter for symmetry
  with Image_WriteJPG(). print an error message in case of encoding
  failure if error text support is enabled.
  (Image_WriteSTB): rename to Image_WriteJPG, adjust for jpg writing
  only. remove the old Image_WriteJPG wrapper.
  (enum imageformat_t): remove.
  (CopyFlipped): constify the data parameter.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1468 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-08-09 11:33:44 +00:00
Eric Wasylishen f364c9864c Image_WritePNG: switch to lodepng, configure for fast compression
~3x faster than stb_image_write and similar file size

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1467 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-08-09 06:23:42 +00:00
Ozkan Sezer 1eb57d8cbe stb_image_write.h: fix build with watcom
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1466 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-08-08 09:37:06 +00:00
Eric Wasylishen 4a02827fe6 SCR_ScreenShot_f: change default format to png, using stb_image_write
Add optional format and quality args to "screenshot" command,
can specify tga, png, jpg

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1465 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-08-08 05:07:56 +00:00
Ozkan Sezer 10ed2c85dc kill annoying warnings. remove commented pakfile/progs.dat testing code from Modlist_Init().
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1464 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-08-04 20:36:59 +00:00
Eric Wasylishen 6b2affaebc r_alias: add MF_HOLEY (0x4000) model flag, from QSS.
(MarkV compatible).
For more info see: http://celephais.net/board/view_thread.php?id=61351&start=1&end=1

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1463 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-08-04 19:45:11 +00:00
Eric Wasylishen a2fb8317cb gl_vidsdl.c: restore vid_refreshrate from fitz 0.85; SDL2 supports it
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1461 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-08-03 06:43:38 +00:00
Eric Wasylishen 3b5f3794cb gl_vidsdl.c: fix indentation
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1460 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-30 22:55:51 +00:00
Eric Wasylishen 9a37377cf4 gl_vidsdl.c: fix bug where vid_desktopfullscreen would get set to 1
when entering fullscreen. Fix VID_GetDesktopFullscreen() which
was incorrectly returning "true" in regular fullscreen mode.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1459 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-30 22:46:34 +00:00
Ozkan Sezer 6c885849d2 in_sdl.c: OW1.9 doesn't have powf() and sqrtf(). use pow/sqrt, instead.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1458 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-29 07:00:50 +00:00
Ozkan Sezer 005650abf4 sdl, win32, watcom: generate our own import lib instead of using vc6 lib
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1456 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-29 05:55:26 +00:00
Ozkan Sezer 01b01c0a13 SDL windows: move SDL_main sources into their own directory
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1455 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-29 05:36:30 +00:00
Ozkan Sezer 586447e449 net_wins.c: disable WSA*BlockingHook() stuff for winsock2 builds
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1454 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-29 00:35:03 +00:00
Ozkan Sezer 78ebe4ff0a add SDL2 stuff to watcom makefile
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1453 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-29 00:33:02 +00:00
Eric Wasylishen bb8debf18f sv_move.c: add explicit int cast to a float argument to abs().
Previously, the cast was implicit since abs() takes an int,
so there is no change in behaviour.
Suppresses a clang warning that we might want fabs().

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1451 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-28 20:50:25 +00:00
Eric Wasylishen 3d594fc4d4 PL_ErrorDialog: fix clang warning about format string not a literal
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1450 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-28 20:50:18 +00:00
Eric Wasylishen 0a5cd3c2ad Modlist_Init: fix unused variable warning
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1449 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-28 20:50:11 +00:00
Eric Wasylishen 7df6ca7bd1 snd_mix.c: Fix clang warnings about bit-shifting negative numbers
(which is implementation-defined)

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1448 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-28 20:50:03 +00:00
Ozkan Sezer b99a823965 noreturn functions: use the 'aborts' aux pragma with Watcom
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1447 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-28 20:11:03 +00:00
Ozkan Sezer 386cb1a720 add win32 makefile for watcom. it builds and runs.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1446 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-28 20:10:03 +00:00
Ozkan Sezer be437dd258 r_alias.c: change *AttrIndex into macros instead of static const vars.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1443 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-28 20:01:19 +00:00
Ozkan Sezer c671916fc7 sv_main.c (SV_Init): use a return instead of a dummy assignment after Sys_Error to silence compiler
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1442 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-28 20:00:56 +00:00
Ozkan Sezer e2d1800b12 r_part.c (R_ReadPointFile_f): silence pesky compiler warnings
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1441 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-28 20:00:32 +00:00
Ozkan Sezer 3cf6946ebd revise the function attributes usage: do not use the gcc __attribute__
directly, but define proper macros for each attribute we do or may use.
also support MSC along the way for example with the noreturn attribute.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1440 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-28 12:50:10 +00:00
Eric Wasylishen f13af4d0e5 in_sdl.c: raise joy_deadzone_trigger to 0.2.
Previous value of 0.001 was probably too low, may have caused
"stuck" triggers:
http://celephais.net/board/view_thread.php?id=60452&start=2935

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1439 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-27 22:55:08 +00:00
Ozkan Sezer 72d5f11278 bump version to 0.93.0 (there has been enough changes), update changelog.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1437 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-27 15:56:58 +00:00
Ozkan Sezer 6793c30712 change QUAKESPASM_VER_SUFFIX to be a string literal and adjust
QUAKESPASM_VER_STRING for it.  revise the QS_STRINGIFY macros.
fixes "the not enough actual parameters for macro QS_STRINGIFY"
warnings from my VS2005.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1436 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-27 14:32:31 +00:00
Ozkan Sezer d1f391b383 remove all libmodplug code
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1435 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-27 12:50:17 +00:00
Eric Wasylishen e87a1b8d9d drop MAX_MAP_LEAFS limit and move 4 static buffers to use realloc().
4 buffers were: mod_novis, decompressed, checkpvs, and fatpvs.

Also fix fatbytes calculation in SV_FatPVS to match the other PVS
buffers, was (numleafs+31)>>3, changed to (numleafs+7)>>3.
I am assuming the previous was a bug/typo.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1434 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-26 04:27:16 +00:00
Eric Wasylishen f5fdc1867d raise CON_TEXTSIZE from 64KB to 1MB
useful for capturing debug info e.g. "entities" command which prints
a lot.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1431 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-22 01:56:38 +00:00
Eric Wasylishen e24916cfc0 Add "find" as an alias for "apropos" (for consistency with MarkV)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1428 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-19 05:40:54 +00:00
Eric Wasylishen 737b6e9eb4 Host_Randmap_f: print the map being started
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1427 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-19 05:40:37 +00:00
Eric Wasylishen af62037fde raise MAX_MAP_LEAFS to 80000 to handle ad_sepulcher.bsp
TODO: maybe switch to malloc'ed pvs arrays now?

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1420 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-06-24 07:23:46 +00:00
Eric Wasylishen 8d2d2cc8b3 host_cmd.c: Add "randmap" command, requested by Barnak
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1418 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-06-23 23:22:00 +00:00
Eric Wasylishen 50c52ae0eb Com_game_f: try execing quake.rc automatically..
Not convinced there are any issues with this, and it solves these
problems:
- change to new gamedir without execing quake.rc and exit: the
  config.cfg in the new gamedir will be clobbered with the settings
  from the previous gamedir.
- discrepancy between -game command line arg and "game" command.

Video mode is locked during the "exec quake.rc" to prevent the mode
from changing.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1417 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-06-23 22:02:49 +00:00
Eric Wasylishen d8719d6e4f Modlist_Init: relax tests for mod directories
Consider any subdirectories of the com_basedir as mods, except for
.app bundles on posix systems. Previous code was too strict
as it required progs.dat or pak files, so it excluded map packs, etc.
(useful mods could contain almost anything, e.g. just a music directory,
just a config...)

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1416 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-06-23 22:02:40 +00:00
Ozkan Sezer 3405b87ee0 pr_exec.c, MAX_STACK_DEPTH: increase from 32 to 64
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1415 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-06-23 15:47:01 +00:00
Eric Wasylishen d61095a0e0 PF_lightstyle: make invalid style a warning instead of a Host_Error
Allows loading start.bsp in xmen TC again.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1414 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-06-22 03:32:14 +00:00
Eric Wasylishen e30910131c Move filelist_item_t struct to quakedef.h, instead of redefining
it in console.c and host_cmd.c

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1411 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-06-12 02:18:55 +00:00
Eric Wasylishen d09bbd2cd7 console.c: use q_snprintf for printing version number
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1409 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-05-29 06:54:14 +00:00
Eric Wasylishen e45de4c68a Add QUAKESPASM_VER_SUFFIX macro for marking betas/dev builds.
Refactor printing of QUAKESPASM_VERSION/QUAKESPASM_VER_PATCH to use a new
QUAKESPASM_VER_STRING macro.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1408 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-05-29 04:17:49 +00:00
Eric Wasylishen ebe31714b2 VID_SetMode: SDL2: stay on the current display when changing modes
This allows you to move the QS window to a different monitor and
then go fullscreen on that monitor. QS will still always start on
the primary monitor.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1407 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-05-27 07:29:49 +00:00
Eric Wasylishen 0a681bd7cd new r_scale cvar, for rendering the 3D view at 1/2, 1/3, or 1/4 res.
This is for emulating a low-resolution pixellated look,
or possibly as a performance boost on slow graphics cards.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1406 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-05-26 20:37:48 +00:00
Eric Wasylishen c827ccaa66 Host_Loadgame_f: fix for arrow characters appearing in multiline messages
on Windows, a regression introduced in the Host_Loadgame_f rewrite r1398

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1405 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-05-09 00:01:41 +00:00
Ozkan Sezer 3d3d46887a tiny tidy-ups to snd_flac
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1404 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-30 08:51:34 +00:00
Eric Wasylishen 4bea6d51e2 UDP_Init: don't bother calling gethostbyname() if our hostname ends in ".local"
(a macOS thing), because it blocks for a few seconds and then fails
(on my system anyway), so it's pointless.

Fixes an annoying startup pause on macOS, which was reported as
https://sourceforge.net/p/quakespasm/bugs/15/

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1403 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-26 01:38:38 +00:00
Eric Wasylishen f92ce77fc9 PF_VarString: throttle "exceeds standard limit" warning message
Prevents console spam on "developer 1" if a mod calls PF_VarString often (e.g. In the Shadows textbooks).

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1402 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-25 20:07:34 +00:00
Eric Wasylishen 3e4b9f8f6c Cbuf_Init: raise cmd_text from 8k to 256k to handle large .cfgs, from QS-Spike
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1400 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-21 20:43:05 +00:00
Eric Wasylishen 8011b3f9fd Host_Loadgame_f: rewritten version loads the whole .sav into memory
+ avoids "Loadgame buffer overflow" when loading saves from QS-Spike/DarkPlaces containing large comments
+ removes ugly } hack
+ should be a bit faster as we avoid calling fgetc for every byte

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1398 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-16 02:53:06 +00:00
Eric Wasylishen 83a0b5ae14 ED_ParseGlobals: switch strcpy() to q_strlcpy() to avoid crashing on certain bogus .sav's
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1397 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-15 22:18:41 +00:00
Eric Wasylishen 1f4c3514ad Host_Loadgame_f: block relative paths, like Host_Savegame_f does
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1396 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-09 20:42:22 +00:00
Eric Wasylishen a1c95a5978 gl_refrag.c: Hunk-allocate efrags and trim out unused functionality
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1394 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-02 19:39:18 +00:00
Eric Wasylishen 43b509ba4f Add "apropos" command from QS-Spike
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1393 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-02 18:18:57 +00:00
Eric Wasylishen 1c83b69cb6 CRC_Block: make input pointer const. From QS-Spike
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1392 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-02 07:14:53 +00:00
Eric Wasylishen 3cae0dae3f net_defs.h: add a preprocessor assertion that NET_MAXMESSAGE is sane
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1391 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-02 00:45:00 +00:00
Eric Wasylishen 2d394e7a29 PF_lightstyle: add bounds check to avoid clobbering memory
Found when trying to load e1-4.bsp from https://github.com/plankatron/quakemash

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1390 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-01 21:31:07 +00:00
Eric Wasylishen 182369ca03 BoundPoly: fix infinite recursion when loading e1-4.bsp from https://github.com/plankatron/quakemash
Fix from QS-Spike.
TODO: replace all 9999.. constants used for min/max calculations with FLT_MAX/-FLT_MAX

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1389 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-01 21:31:00 +00:00
Eric Wasylishen 198c828b03 client.h: raise MAX_STATIC_ENTITIES further to 4096, and MAX_EFRAGS from 4096 to 8192
this is for a limit breaking map in developement. TODO: these can both be made dynamically
allocated, MarkV has applied this patch.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1388 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-03-31 00:56:13 +00:00
Eric Wasylishen 4b6eb1bbe2 client.h: raise MAX_STATIC_ENTITIES from 512 to 2048
Rationale is AD was hitting this and just using non-static ents instead, which is counterproductive.
2048 matches QS-Spiked.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1387 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-03-30 20:35:31 +00:00
Eric Wasylishen 4fe5f6956f Adjust "exceeds standard limit of" debug warnings to include the actual QS limit.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1386 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-03-30 06:26:16 +00:00
Ozkan Sezer 8d919e5cd0 sys_win.c: properly check the returned value from GetCurrentDirectory()
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1384 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-03-10 20:01:47 +00:00
Ozkan Sezer 182ec759b8 snd_flac.c: removed unnecessary metadata.h include. fixed build and
run against legacy flac <= 1.1.2 with LP64 systems.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1381 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-03-09 22:41:55 +00:00
Ozkan Sezer 087222e8f5 snd_xmp.c: fix windows static linkage to libxmp.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1380 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-03-09 22:41:17 +00:00
Ozkan Sezer 3d4c9cd2b5 added _WINSOCK_DEPRECATED_NO_WARNINGS among the preprocessor definitions
in Visual Studio project files.  fixes C4996 warnings: "'inet_ntoa': Use
inet_ntop() or InetNtop() instead" from VS2013 and newer.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1377 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-02-14 11:00:29 +00:00
Eric Wasylishen 702b0decf1 in_debugkeys: print time, and log text input mode changes
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1373 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-01-17 22:39:19 +00:00
Eric Wasylishen 197127fc97 Add autocompletion for "timedemo" command's demo name
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1372 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-01-17 22:38:12 +00:00
Ozkan Sezer bc5cc7094a add missing SDLCALL to SDL callback functions (it need not be nothing for every platform.)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1367 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-12-17 12:10:07 +00:00
Ozkan Sezer 5025e9e457 added tracker music support using libxmp >= v4.2.0 (off by default.)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1364 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-12-07 09:24:49 +00:00
Ozkan Sezer 6e1aa25e78 sync'ed arch_defs.h and filenames.h with uhexen2 tree (for sake of symmetry.)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1363 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-12-07 06:55:04 +00:00
Eric Wasylishen fc78971b59 Only print "maps/*.lit loaded" messages on develoepr 2, the are spam on developer 1.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1357 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-10-22 18:38:58 +00:00
Ozkan Sezer b04a4a5fbd Makefile.darwin: removed bundle1.o from 10.6/i386 linkage (crashes. only needed for x86_64.)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1353 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-10-16 09:32:25 +00:00
Ozkan Sezer 945be672af - rebuilt SDL2 for windows and osx from SDL hg rev.10541
to prepare for and test their upcoming 2.0.5 release.
- changed Makefile.darwin so that SDL2-386 builds target
  10.6+ which is an SDL2-2.0.5 requirement.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1351 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-10-15 19:28:47 +00:00
Ozkan Sezer 796f7b7601 changed version to 0.92.2, added placeholders for changelog in the readme.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1350 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-10-14 09:47:07 +00:00
Ozkan Sezer 2c034462e5 Fixed -Wformat-length warning from experimental gcc-7:
sbar.c: In function 'Sbar_DrawInventory':
sbar.c:673:18: warning: '%3i' directive writing between 3 and 11 bytes into a region of size 6 [-Wformat-length=]
   sprintf (num, "%3i", q_min(999,cl.stats[STAT_SHELLS+i])); //johnfitz -- cap displayed value to 999
                  ^~~
sbar.c:673:17: note: directive argument in the range [-2147483648, 999]
   sprintf (num, "%3i", q_min(999,cl.stats[STAT_SHELLS+i])); //johnfitz -- cap displayed value to 999
                 ^~~~~
sbar.c:673:3: note: format output between 4 and 12 bytes into a destination of size 6
   sprintf (num, "%3i", q_min(999,cl.stats[STAT_SHELLS+i])); //johnfitz -- cap displayed value to 999
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1346 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-10-07 20:00:27 +00:00
Ozkan Sezer f095cd1abf filenames.h: update copyright years from mainstream.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1344 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-10-01 11:00:35 +00:00
Ozkan Sezer c0d6f2e736 minor stuff..
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1343 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-09-12 14:03:01 +00:00
Ozkan Sezer c0b9eab645 meh..
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1339 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-08-23 11:47:12 +00:00
Ozkan Sezer ad055bf6fd minor updates to some files from uhexen2 (for sake of symmetry between the two trees.)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1337 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-08-23 11:24:24 +00:00
Ozkan Sezer 633f009252 Fix out of bounds access to keybindings: K_PAUSE is 255. Noticed by Axel Gneiting (bug #14).
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1336 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-08-21 17:37:21 +00:00
Ozkan Sezer 56c2e44b87 snd_mikmod.c: we don't truly need the high-quality mixer. (and it's slow too...)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1334 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-08-08 04:04:14 +00:00
Eric Wasylishen b683cd2fcd Fix for large menu scale factors, broken in r1293
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1333 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-07-20 04:15:02 +00:00
Ozkan Sezer d0bca18060 changed version to 0.92.1 for future development
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1329 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-07-02 05:41:25 +00:00
Eric Wasylishen 7897f0700e in_sdl.c: make new joy_* cvars CVAR_ARCHIVE
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1322 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-06-26 23:37:41 +00:00
Ozkan Sezer 2cdb92e63b just remove the if0'ed part..
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1320 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-06-25 05:24:11 +00:00
Ozkan Sezer 9c7eb2c6ff Host_Loadgame_f(): no need for entnum >= sv.max_edicts check
because EDICT_NUM() does it already. also move ent->free=false
statement to partial zero-fill case.
Host_ClearMemory(): remove check before free(sv.edicts)
SV_Init(): initialize sv.edicts to NULL (just paranoia)

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1319 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-06-25 05:21:22 +00:00
Ozkan Sezer de4bea0e74 Loadgame_f() may go past sv.num_edicts, but it does not go through
ED_Alloc(), therefore such ents will have uninitialized members.
This used to lead to bad crashes with e.g. Rubicon Rumble Pack maps
since svn r1286 when we began allocating sv.edicts using malloc and
only zero-filling when necessary.  So, check against sv.num_edicts
and zero-fill the ent properly when necessary.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1318 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-06-24 16:04:25 +00:00
Ozkan Sezer e1c26de7fb silence pesky warnings from old compilers
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1316 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-06-24 07:40:08 +00:00
Ozkan Sezer 301630d8ac change version to 0.92.0
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1315 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-06-24 07:04:11 +00:00
Eric Wasylishen 3261dd1213 add -protocol [15/666/999] command line flag, patch from szo
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1314 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-06-24 06:15:47 +00:00
Eric Wasylishen 5b21d5935f RMQ protocol (999) support, adapted from RMQEngine
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1313 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-06-24 06:15:41 +00:00
Eric Wasylishen 316de63f98 limit increases to handle oms3 map pack.
MAX_MAP_LEAFS: 65535 -> 70000
MAX_LIGHTMAPS: 256 -> 512

TODO: maybe drop static arrays based on MAX_MAP_LEAFS like, see R_InitVisCache in RMQEngine.
TODO: dynamically allocate the static `lightmaps` array as well; with this last limit increase it's 32MB.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1312 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-06-24 06:15:33 +00:00
Ozkan Sezer 623f8c6698 bgmusic.c (BGM_UpdateStream): avoid a possible endless loop.
(just a paranoid safeguard, shouldn't happen in real life.)

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1311 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-06-23 08:03:43 +00:00
Ozkan Sezer 917543bc50 sv_user.c: partially revert svn commit r182, move wishdir and wishspeed
from global to local context, and pass them as params to SV_Accelerate()
and SV_AirAccelerate().

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1309 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-06-11 05:36:05 +00:00
Eric Wasylishen 5660094d1d host_cmd.c: add new "setpos" command.
developer cheat to teleport to a given origin, optionally looking in a given direction.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1308 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-06-07 07:08:23 +00:00
Ozkan Sezer 33fe493c89 sync net_sys.h with the uhexen2 tree.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1307 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-05-31 20:01:09 +00:00
Eric Wasylishen 759aa803d1 CL_Tracepos_f: fix wrong trace endpoint (developer function added in Fitzquake)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1304 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-05-21 19:50:03 +00:00
Ozkan Sezer f07ac29c0b fix C++11 -Wliteral-suffix warnings. fix -Wnarrowing errors/warnings.
fix the detestable in_sdl.c/SDL2 int-to-enum conversion failure errors
from g++.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1302 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-04-29 20:00:50 +00:00
Ozkan Sezer f3af6bf791 Fixed -Wmisleading-indentation warnings from new gcc6.
The warning from gl_model.c:Mod_LoadTextures() seemed
like a real bug: Eric please check and confirm.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1301 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-04-28 21:47:12 +00:00
Ozkan Sezer 5af28b2121 windows: use target-specfic flags for gcc too (-m32/-m64). hmph..
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1299 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-04-18 14:01:55 +00:00
Ozkan Sezer f22eed7f57 use specific target flags with windres (pe-i386/pe-x86-64 for w32/w64),
just in case the compiler toolchain is a multilib one.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1298 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-04-17 19:10:01 +00:00
Eric Wasylishen 39a6b46713 in_sdl.c: lower default controller deadzone to 0.175. refactor a bit, fix clamping of look axis vector length.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1297 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-03-09 04:42:44 +00:00
Eric Wasylishen f8ccd07420 in_sdl.c: IN_StartupJoystick: do SDL_INIT_GAMECONTROLLER before SDL_GameControllerAddMappingsFromFile, to match the sdl testgamecontroller tool
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1296 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-03-03 23:01:44 +00:00
Eric Wasylishen dfcaa52260 in_sdl.c: improve error messages when opening joysticks
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1295 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-03-03 21:38:58 +00:00
Eric Wasylishen e007e35e6d in_sdl.c: fix spurious "-1 mappings loaded from gamecontrollerdb.txt" message
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1294 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-03-02 00:04:25 +00:00
Eric Wasylishen dc2218b9c8 SDL2 Game Controller support
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1293 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-03-01 21:58:08 +00:00
Eric Wasylishen 9c9facfe7b gl_vidsdl.c: add vid_borderless cvar for getting a borderless window
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1292 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-02-26 20:18:27 +00:00
Eric Wasylishen 185f2f2883 R_UpdateWarpTextures: workaround osx 10.6 driver bug when using FSAA, reported by Barnak.
R_Clear only clears the warpimage part of the screen, leading to an unplayable
HOM effect on the rest of the screen.

The workaround is calling GL_SetCanvas(CANVAS_DEFAULT); at the end of
R_UpdateWarpTextures, it should be harmless enough on other systems, so not sure
if it's worth making this workaround conditional.

My guess is glClear in this implementation is wrongly using glViewport as the
area to clear.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1291 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-02-26 07:37:00 +00:00
Eric Wasylishen 150be12da1 Contrast support with a "contrast" cvar, behaving the same as MarkV's.
It may be a useful alternative to the existing gamma control for laptops in a bright environment, etc.
(raising contrast gives less of a gray/washed out look than raising gamma, but as a disadvantage, colours near white get clipped to white.)

It's also implemented for both GLSL and SDL gamma ramps, but only if USE_GAMMA_RAMPS is set to 1.
Since USE_GAMMA_RAMPS  is 0, currently it only works with GLSL.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1290 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-02-12 23:26:36 +00:00
Eric Wasylishen ebd73d2a3c world.c: use DoublePrecisionDotProduct to fix items falling out of the world
on oms3.bsp on SSE builds.

Thanks to ParuBaru for reporting the issue.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1289 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-02-01 22:41:15 +00:00
Eric Wasylishen 36d9cc4b42 Default gl_clear to 1, as described in "Common mistakes" https://www.opengl.org/wiki/Common_Mistakes#Swap_Buffers
"The buffers should always be cleared. On much older hardware, there was a technique to get away without clearing the scene, but on even semi-recent hardware, this will actually make things slower. So always do the clear."
Plus it's nice for map development / debugging.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1287 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-29 20:47:24 +00:00
Eric Wasylishen ae8a4f82da SV_SpawnServer: use malloc for sv.edicts, and only zero it as needed
Previously we were Hunk_Alloc'ing space for 8192 edicts (by default) which zeros all of that memory, this way we only use as much RAM as needed since the unuesd pages aren't dirtied

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1286 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-29 01:05:11 +00:00
Eric Wasylishen 70a472bed1 GL_Init: log gl_vendor, gl_renderer, gl_version to the console.
Taken from RMQEngine. the idea is to ensure every -condebug log has the gfx driver version logged.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1284 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-28 06:07:07 +00:00
Ozkan Sezer 16a84f52b8 bumped version to 0.91.1 for future development
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1283 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-18 07:28:03 +00:00
Eric Wasylishen 65727a9810 max_edicts: raise to 8192 (from 2048) and make non-archived, to reduce the need for players to mess with it to get maps/mods to run.
Some measurements on the size of the sv.edicts hunk allocation, with this change, on various mods (it depends on the number of QC entity fields):
id1 7MB, quoth 11 MB, arcadim 21 MB, rrp 9MB,  ne_ruins 16MB.

Since this is a Hunk_Alloc, the whole 10-20MB is cleared to zero which will allocate that much physical ram.
We could probably change it to a malloc later, and not clear the memory, so physical ram is only allocated when the memory is cleared in ED_Alloc.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1278 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-10 23:03:06 +00:00
Eric Wasylishen 74eb6b0f9d Raise default heapsize to 256MB and zone to 4MB (matching Fitz MarkV)
N.B.: I verified with the OS X Instruments tool that unused space in the heap isn't dirtied (e.g. we never memset the entire heap, only the portions returned by Hunk_Alloc) so this should have no impact on RAM required.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1276 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-09 20:29:22 +00:00
Eric Wasylishen 0da03db7b8 zone.c: fix padding in memblock_t struct to works as intended. the previous layout was probably harmless but wasted a few bytes.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1275 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-09 20:03:27 +00:00
Eric Wasylishen ba5ce1e5af TexMgr_RecalcWarpImageSize: removed early exit if (gl_warpimagesize == oldsize), fixes liquids sometimes turning to noise after a mode change.
after vid_restart TexMgr_ReloadImage reloads textures to tx->source_width/source_height, which might not match oldsize.
fixes: https://sourceforge.net/p/quakespasm/bugs/13/

steps to reproduce (fixed) bug:
-launch at 640x480, windowed, and with "r_oldwater 0"
-do "map start"
-change to 1024x768 windowed
-change to 1920x1080 windowed
-this last mode change makes liquid textures turn into random garbage.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1274 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-08 08:22:27 +00:00
Eric Wasylishen 239503c998 VID_Toggle: disable the fast path entirely because it was failing on SDL2/WinXP.
(640x480 fullscreen -> windowed would give a large 1280x768 window mostly filled with garbage).

Previously, we were only using the fast path on old systems (no VBO support) anyway.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1272 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-03 08:38:46 +00:00
Eric Wasylishen 35631f4b02 snd_dma.c: raise MAX_SFX to 1024, for the upcoming arcadim mod.
Uses only 36k extra of hunk memory, less for 32-bit builds, so shouldn't have any negative effects.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1266 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-12-22 06:22:29 +00:00
Eric Wasylishen be808701ea GLSLGamma_GammaCorrect: clear the cached texture binding in GL_Bind properly, after the glBindTexture calls earlier in this function.
Fixes a obscure bug where:
 - a bsp with no textures (pink checkerboard displayed)
 - gamma != 1
 - nothing else on screen (sbar hidden, r_drawviewmodel 0)
would result in the screen turning to noise.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1263 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-12-13 07:23:04 +00:00
Steven 0d14920ba0 Credit Eric as co-author.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1261 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-12-01 10:35:51 +00:00
Eric Wasylishen e2321d816b Fog: move setting of GL_FOG_MODE to GL_EXP2 to a new Fog_SetupState() function and call it in VID_Restart.
Fixes bug where the fog mode was resetting to the default (GL_EXP) after a mode switch, causing fog to look different. This was only affecting SDL1 for me.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1259 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-11-26 09:06:42 +00:00
Eric Wasylishen 5ac3b16363 Sbar_DrawPicAlpha: change glColor3f call to glColor4f with explicit alpha of 1 to work around intel 855 bug, which also affected Fitzquake 0.85.
With "r_oldwater 0" and "scr_sbaralpha 0", warp textures wouldn't be rendered and instead you would see a copy of the screen tiled where water surfaces should be.
Thanks to graham for reporting.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1256 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-10-06 06:18:30 +00:00
Eric Wasylishen 69791776a4 PF_traceline: change Host_Error when a NaN is detected to a Con_Warning.
This only affects the case when the developer cvar is set, we already ignore NaN's here.

negke reports getting the nan error with this debug progs.dat: http://negke.fov120.com/files/progsbjp.zip (rename to pak0.pak + install as a mod)
and his sm133_neg!ke.bsp: https://www.quaddicted.com/reviews/sm133_pack.html (walk over the zombie to activate a lightning trap)

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1255 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-10-06 04:08:29 +00:00
Eric Wasylishen e007116a5d Alias model VBO renderer: restructure so each model is stored in a separate VBO and load them in Mod_LoadAliasModel, rather than R_NewMap.
Initially I thought that we would never need to draw an alias model that hadn't been precached when R_NewMap runs, but this assumption turned out to be incorrect. This fixes the issue where progs/bolt.mdl wasn't rendering in the Scourge Done Slick demos.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1253 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-09-20 20:10:49 +00:00