Commit Graph

45 Commits

Author SHA1 Message Date
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
Ozkan Sezer 983af887bf changed many sprintf() calls into q_snprintf().
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@557 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-27 10:50:42 +00:00
Ozkan Sezer 42e55b3377 changed cvar callback functions to accept a cvar_t pointer arg. I may
have a use for that later.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@545 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-24 14:04:01 +00:00
Ozkan Sezer 2b919188d6 renamed Sys_FloatTime to Sys_DoubleTime (the thing always returned double
you know..) and adjusted all callers accordingly.  changed Sys_Sleep() to
take a milliseconds argument, added implementations for unix (usleep) and
windows (Sleep).

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@512 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-12 16:01:01 +00:00
Steven f7ac5f80f4 Typo: scr_crosshaircale -> scr_crosshairscale (from Sander).
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@490 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-09-21 02:51:56 +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
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
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
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 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
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
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 68fc38c3a6 chase.c, cl_input.c, cl_parse.c, client.h, common.c, common.h, console.h,
cvar.h, draw.h, gl_draw.c, gl_fog.c, gl_mesh.c, gl_model.c, gl_model.h,
gl_rmain.c, gl_rmisc.c, gl_screen.c, gl_sky.c, gl_texmgr.c, glquake.h,
host.c, keys.c, keys.h, main.c, menu.c, menu.h, pr_cmds.c, quakedef.h,
r_alias.c, r_brush.c, r_part.c, r_sprite.c, r_world.c, sbar.c, sbar.h,
screen.h, snd_dma.c, snd_mem.c, snd_mix.c, sv_main.c, sys_sdl.c, vid.h,
view.h, world.c, world.h:  Loads of warning fixes about missing function
prototypes, missing parens around &, missing braces leading to ambiguous
else statements and unused and uninitialized variables. There are still a
couple of unitialised variables here and there, but not much. The warnings
about strict aliasing violations need taking care of.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@21 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 12:01:07 +00:00
Ozkan Sezer 8309029808 several cvar tweaks by Steven:
gl_draw.c (scr_conalpha): change value from 1.0 to 0.5
gl_rmain.c (r_shadows): write to config.cfg.
gl_rmain.c (r_wateralpha): write to config.cfg.
gl_rmain.c (r_dynamic): write to config.cfg.
gl_rmain.c (r_novis): write to config.cfg.
gl_rmain.c (gl_flashblend): change to 0 (disable) and write to config.cfg.
gl_screen.c (scr_conspeed): change value from 300 to 500
gl_vidsdl.c (vid_fullscreen): change value to 0 (disable)
gl_vidsdl.c (vid_width): change value from 640 to 800
gl_vidsdl.c (vid_height): change value from 480 to 600


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@11 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 08:50:45 +00:00
Ozkan Sezer db613ab35d initial import of SDL port of Fitzquake-0.85 / 20090510 sources.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@2 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-15 23:26:55 +00:00