Commit graph

64 commits

Author SHA1 Message Date
Shpoike
78b5a73ee6 Framerate counter should count frames, not scenes. 2024-03-01 08:11:35 +00:00
Shpoike
2c38d5b3e3 Merge remote-tracking branch 'sf/master' into qss 2023-03-18 12:38:25 +00:00
Andrei Drexler
e0469ae4b4 Fix console animation with scr_conspeed <= 0 2023-03-13 11:33:00 +03:00
Ozkan Sezer
c3ef90eb36 replaced Sys_FileTime() with Sys_FileType() from uhexen2 project. 2022-10-25 10:35:20 +03:00
Shpoike
66abf5a378 Fix some misc csqc issues. 2022-08-23 11:58:15 +01:00
Shpoike
0f1c4fca19 Merge remote-tracking branch 'sf/master' into qss 2022-08-04 07:04:30 +01:00
Shpoike
eb02e3b5ed Fixes https://github.com/Shpoike/Quakespasm/issues/107 2022-07-19 22:36:57 +01:00
Shpoike
7a97911ff4 Merge tag 'quakespasm-0.94.5' into qss 2022-07-15 14:11:03 +01:00
Ozkan Sezer
2dd6a14ccf removed r_cache_thrash, showram & co. 2022-07-05 08:50:02 +03:00
Ozkan Sezer
02b953e993 use C11 _Generic macros for q_min, q_max and CLAMP, if available.
.. if not, then use GCC expression macros for them, if available.
2022-06-12 14:32:28 +03:00
Shpoike
26f0bc4682 Merge remote-tracking branch 'sf/master' into qss
(cl_startdemos stripped in favour of QSS's existing cl_demoreel cvar. osx project files ignored.)
2022-04-27 22:32:40 +01:00
Ozkan Sezer
d119208ab2 silence 'Unknown command "scr_usekfont"' message from 2021 re-release. 2022-04-21 03:25:24 +03:00
Shpoike
a5275c95d5 Merge remote-tracking branch 'sf/master' into qss 2021-09-03 20:19:12 +01:00
Andrei Drexler
401aa52d45 Compensate viewmodel distortion at fov > 90
See: https://github.com/Novum/vkQuake/issues/281

Controlled by new cvar cl_gun_fovscale (defaults to 1).
Based on code from Qrack:
3bc2862b1a/gl_rmain.c (L2384-L2392)
2021-09-02 20:50:50 +03:00
Shpoike
43bf160e0c Fix csqc's view_angles global. 2021-08-31 04:59:13 +01:00
Shpoike
03ec27b5f0 Allow csqc to implement CSQC_UpdateView for full control over the 3d scene. 2021-08-31 04:59:12 +01:00
Shpoike
54538a054a Menuqc support. Only tested against menusys so far. 2021-08-31 04:59:12 +01:00
Spike
fe4b224c7d Added support for simple csqc.
This is a subset of csqc, with alternative entry points that can be invoked by compat wrappers.

Also added sv_gameplayfix_setmodelrealbox cvar. Default value of 1 matches QuakeSpasm, whereas a value of 0 matches vanilla quake's behaviour.
2021-08-31 04:59:11 +01:00
Spike
d76ca606bf All changes present in QSS-R7, plus
md3 support
quoth/etc bug fix
strzone bug fix
png/jpg replacement wall textures
rewrote mdl rendering to always use arrays, relaxing vertex+tri limits.
removed static ents limit
fixed ambient_level not working at high framerates.
2021-08-31 04:59:11 +01: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
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
b94df5a4cd SCR_TileClear: fix for GLSL gamma causing the tiled screen border to turn white, if you use "sizedown" to show the border.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1232 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-06-15 21:17:45 +00:00
Eric Wasylishen
1311398e80 New gamma correction implementation using glsl. Enabled by default on OpenGL2. Disable with -noglslgamma.
Avoids general bugginess of hardware gamma, doesn't affect the whole screen in windowed mode like HW gamma. Should fix http://sourceforge.net/p/quakespasm/bugs/5/

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1157 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-01-26 20:18:45 +00:00
Ozkan Sezer
039fdaad6f minor whitespace adjustments
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1101 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-11 19:11:40 +00:00
Sander van Dijk
8d0cb0086a input: More text input restructuring.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1077 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-02 19:00:42 +00:00
Ozkan Sezer
b9032b7815 copyright years, general tidy-up, remove unused d_ifacea.h.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1059 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-22 08:55:46 +00:00
Eric Wasylishen
db43cf1836 gl_screen.c: make the console speed independent of the current resolution. Before, switching to a really high (e.g. 2880x1800) resolution would make the colsole take several seconds to open/close
Not totally sure about this but i think it's a decent idea. I'm using 800x600 as a reference screen size (arbitrary choice but it's the default QS resolution). So if your resolution is 600 pixels tall this will make no difference. On higher resolutions this will make the console a bit faster than before.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@992 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-08 06:25:59 +00:00
Steven
aa885d4efa When crosshair is present, for simple messages (SCR_DrawCenterString), text doesnt always end with a newline (eg E1 entry in startmap), so move message up one line. Doesnt affect large messages used via SCR_DrawNotifyString(eg Socks Shadow demo).
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@926 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-06-29 01:22:35 +00:00
Ozkan Sezer
65cd7e75e0 ditch fmin/fmax and use plain q_min/q_max
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@922 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-06-22 05:50:39 +00:00
Ozkan Sezer
46b1533a41 SCR_ScreenShot_f: dont bother GL_PACK_ALIGNMENT restoring
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@910 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-04-28 20:10:34 +00:00
Ozkan Sezer
72be5368ee fix screenshots when width isn't a multiple of 4. explained by Sander van Dijk.
also check that malloc() didn't fail.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@909 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-04-28 08:12:42 +00:00
Sander van Dijk
c8ebc6ce64 Base FOV adapting on screen resolution instead of viewport resolution.
By doing this we still adapt to widescreen resolutions automatically,
but we now keep the horizontal FOV a constant for any given resolution.
E.g. if the aspect of the viewport changes (for instance when the user
changes the statusbar from transparent to solid) we adapt the vertical
FOV instead of the horizontal FOV (like original GLQuake does). For any
4:3 screen resolution quakespasm now behaves the same with or without
fov_adapt set, regardless of viewport size/aspect. This fixes the issue
reported by mh at http://forums.inside3d.com/viewtopic.php?f=1&t=5166.



git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@872 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-10-12 16:20:38 +00:00
Sander van Dijk
56ee142fc0 gl_screen.c: some fov_adapt style syncing with uhexen2
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@838 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-03-02 18:52:22 +00:00
Sander van Dijk
22f426441f remove isIntelVideo special handling, simply set gl_clear instead
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@830 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-03-02 12:31:09 +00:00
Sander van Dijk
3d7a0fd66a revert r612, fix VID_Test blackscreen properly
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@826 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-03-02 09:34:18 +00:00
Sander van Dijk
48e884e8fe Rename the fov_adaptive cvar to fov_adapt.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@796 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-01-31 20:03:23 +00:00
Sander van Dijk
f755ad47a3 Adaptive FOV (Hor+). Patch by and thanks to rg3. Added cvar and clamping.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@777 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-31 07:30:36 +00:00
Sander van Dijk
14997a7f09 Recalc refdef on sbaralpha change.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@717 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-10 06:55:29 +00:00
Sander van Dijk
57deb8c9d7 Minor default sbaralpha tweak.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@709 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-04 18:38:13 +00:00
Sander van Dijk
e64b7509cf SCR_ModalMessage: (very) minor correction.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@708 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-04 18:29:01 +00:00
Sander van Dijk
64b53c510c Rework the scale menu option to be more intuitive.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@703 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-03 19:47:16 +00:00
Sander van Dijk
bf62017608 Since it covers (part of) the weapon, make the statusbar somewhat more transparent by default.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@702 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-02 17:18:23 +00:00
Ozkan Sezer
ee56c76abd removed the defunct block_drawing global (btw, it was checked incorrectly
in GL_EndRendering()... )

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@632 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-02-10 22:37:07 +00:00
Ozkan Sezer
abb004f5d4 minor cleanup
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@616 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-20 17:11:24 +00:00
Sander van Dijk
a4ac23f19f gl_screen.c:SCR_ModalMessage(): make sure we don't ignore the next keypress (after a timeout).
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@613 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-19 19:09:23 +00:00
Sander van Dijk
b714fbb601 gl_screen.c:SCR_ModalMessage(): sleep a little while busy-waiting.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@610 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-17 08:34:54 +00:00
Ozkan Sezer
b51d0c0878 SCR_CenterPrint() has been counting the lines in the wrong place: count
the copied string NOT the original.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@607 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-13 19:10:52 +00:00
Ozkan Sezer
eb09523d00 changed some of the Cvar_Set[Value] calls to their *Quick variants in the
source files where the vars are defined.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@576 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-29 21:21:11 +00:00
Ozkan Sezer
e2a17c9bcf * gl_screen.c: removed oldscreensize, oldfov, oldsbarscale, oldsbaralpha.
use the callbacks for scr_fov, scr_viewsize, scr_conwidth & scr_conscale
changes by simply setting vid.recalc_refdef to 1: now that Cvar_Set()
doesn't do anything when there is no change, this has the same effect.
* snd_dma.c: removed oldvol, set a callback to sfxvol in order to call
SND_InitScaletable() upon every volume change.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@567 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-28 22:40:15 +00:00
Ozkan Sezer
1928f2e1b8 * first shot at cvar flag system and cvar layer clean-ups :
- removed the archive and server members of cvar_t structure
  which are now represented by the CVAR_ARCHIVE, CVAR_NOTIFY
  and CVAR_SERVERINFO flags.
- added new Cvar_SetROM and Cvar_SetValueROM functions to 
  set vars marked as CVAR_ROM (read-only vars) programaticaly
- added Cvar_SetCallback() as a new function to assign (or
  remove) a callback function to a cvar.
- changed Cvar_RegisterVariable() to only accept a var pointer
  as in original quake
- moved notification handling from Cvar_Set() to callbacks.
- changed Cvar_Set() so that it doesn't reallocate the var's
  string buffer if nothing is changed, nor does it run the
  var's callback.
- changed the 'registered' and 'cmdline' cvars to be read-only
  so that the users can't change it using the console.  (and
  with 'registered' flagged as CVAR_ROM, the 'static_registered'
  thing is no longer required)
- added comment that sending cmdline upon CCREQ_RULE_INFO is
  evil...
- more to follow later.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@566 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-28 22:01:33 +00:00