Commit Graph

1119 Commits

Author SHA1 Message Date
Ozkan Sezer f8247e30bd host.c (Host_WriteConfiguration): change bitwise and into logical and.
seems like a typo in original quake source.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1561 af15c1b1-3010-417e-b628-4374ebc0bcbd
2018-02-16 06:03:25 +00:00
Ozkan Sezer e62db0b9fb console.c (Con_TabComplete): don't change the length counter in arg completion.
issue seems to have been added in v0.90.1.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1560 af15c1b1-3010-417e-b628-4374ebc0bcbd
2018-02-16 05:57:54 +00:00
Eric Wasylishen f910bae881 in_sdl: Change controller movement to use cubic easing by default; added
"joy_exponent_move" cvar.

Previously movement was linear.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1556 af15c1b1-3010-417e-b628-4374ebc0bcbd
2018-02-05 06:37:50 +00:00
Eric Wasylishen a89063a5ff PF_vlen: add casts to double to force 64-bit precision
Fixes https://sourceforge.net/p/quakespasm/bugs/26/
(travail qte1m2.bsp button near 2772 767 -584 hurting the player
sm179_otp.bsp: left button causing the player to get stuck)

This change should probably be applied to more places in pr_cmds.c
and elsewhere, but this specific change is enough to fix these corner
cases

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1554 af15c1b1-3010-417e-b628-4374ebc0bcbd
2018-01-17 07:44:26 +00:00
Ozkan Sezer 77a45cbbbe lodepng.c (lodepng_encode): check for preProcessScanlines() errors.
(patch by 'yoch', from https://github.com/lvandeve/lodepng/pull/66)

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1553 af15c1b1-3010-417e-b628-4374ebc0bcbd
2018-01-11 07:00:02 +00:00
Eric Wasylishen ae38737ada keys.c: increase CMDLINES (history.txt lines) from 32 to 64
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1552 af15c1b1-3010-417e-b628-4374ebc0bcbd
2018-01-10 04:40:31 +00:00
Ozkan Sezer 9dd0a76812 r1550 merged a bad patch. merging the correct one...
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1551 af15c1b1-3010-417e-b628-4374ebc0bcbd
2018-01-08 15:28:05 +00:00
Ozkan Sezer a7deed353e Mod_DecompressVis: warn every case of vis data buffer overrun, not once.
also remove the #if 0'ed out code.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1550 af15c1b1-3010-417e-b628-4374ebc0bcbd
2018-01-08 08:28:17 +00:00
Eric Wasylishen 413272b977 Mod_DecompressVis: don't overflow output buffer given invalid visdata
Fixes crash on death32c.bsp:
http://sourceforge.net/p/quakespasm/bugs/25/

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1548 af15c1b1-3010-417e-b628-4374ebc0bcbd
2018-01-08 05:02:14 +00:00
Eric Wasylishen e4b71e6268 TexMgr_Imagedump_f: fix buffer overflow by setting GL_PACK_ALIGNMENT
reported by ASan

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1547 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-12-28 18:51:40 +00:00
Eric Wasylishen ec4b6115d1 world shader: avoid matrix multiplication in the fragment shader
alias shader: sync fog implementation with world shader

Thanks to Axel for the suggestion.

Add a FIXME where our shader differs from vkQuake in treatment of
alpha transparent faces + fog.

see:
https://sourceforge.net/p/quakespasm/bugs/24/
https://github.com/Novum/vkQuake/blob/master/Shaders/world.vert
https://github.com/Novum/vkQuake/blob/master/Shaders/world.frag

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1546 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-12-24 18:59:44 +00:00
Ozkan Sezer a3f395b0f7 bump version to 0.93.1, update changelog.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1545 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-12-20 06:28:28 +00:00
Eric Wasylishen c227b42c51 GLWorld_CreateShaders: do fog fully in the fragment shader.
Fixes a regression introduced in 0.93.0 when we switched from
fixed-function fog to GLSL (for world polys), reported by ItEndsWithTens

It was visible on large polygons.
For a test case, see: https://sourceforge.net/p/quakespasm/bugs/24/

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1544 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-12-20 03:04:39 +00:00
Eric Wasylishen c91dd567e8 main_sdl.c: override sys_throttle to 0 during timedemo
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1536 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-11-16 18:21:38 +00:00
Ozkan Sezer a23a75efa3 gl_model.c (Mod_SetExtraFlags): remove bogus !mod->name check.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1535 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-11-16 07:00:02 +00:00
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