Commit graph

2081 commits

Author SHA1 Message Date
Yamagi Burmeister
55889e4abb Rename gl_fullbright to r_fullbright. 2018-01-06 17:03:59 +01:00
Yamagi Burmeister
773147524b Rename gl_drawworld to r_drawworld. 2018-01-06 16:59:47 +01:00
Yamagi Burmeister
aa4d92e8dd Rename gl_drawentities to r_drawentities. 2018-01-06 16:53:45 +01:00
Yamagi Burmeister
54fc79e6b1 Remove unused function Cvar_CompleteVariable(). 2018-01-06 16:36:28 +01:00
Yamagi Burmeister
226e5922b9 Rename cl_drawfps to cl_showfps, to be consistent with other cvar.
And ensure that a nice message is printed to the console if anyone
enters the old cvar.
2018-01-06 16:26:28 +01:00
Yamagi Burmeister
7ae9b38da1 Fix video background color if the gl1 or gl3 renderer is used.
Both use truecolor and not paletted colors.
2018-01-03 21:11:08 +01:00
David Carlier
da5d36a7fd bus error fix when quitting. spotted on openbsd while
working ok on Linux and others.
2018-01-01 02:29:36 +01:00
Yamagi Burmeister
4d1b4fa88c Move the soft renderer header files into a subdirectory header/.
This matches the rest of YQ2s source tree.
2017-12-26 09:33:10 +01:00
Yamagi Burmeister
cc5e154511 Disable the softrenderer by default.
Before we can ship the softrenderer in the default install we'll need to
clean up the cvars. Currently the softrenderer is using the gl_* cvars
which is confusing.
2017-12-19 21:39:54 +01:00
Yamagi
b993e9d320
Merge pull request #256 from 0lvin/soft_render
Soft render from https://icculus.org/quake2/
2017-12-19 21:36:21 +01:00
Denis Pauk
5a24b969bc Merge commit '041d1c6cb6e1eff8d84ce883ff42c3c7f1c5f67e' into soft_render 2017-12-18 22:54:07 +02:00
Denis Pauk
4f68f0e9f1 Fix link issues 2017-12-17 23:18:56 +02:00
Yamagi Burmeister
339c9da8a8 Enable the softrenderer by default. 2017-12-17 10:00:43 +01:00
Yamagi Burmeister
2c149eda99 Call te soft renderer just "Software" and not "SDL Soft". 2017-12-17 09:59:37 +01:00
Yamagi Burmeister
e3067a325c Implement CMake support for the new soft renderer. 2017-12-17 09:58:00 +01:00
Yamagi Burmeister
6129e902b0 Add missing SDL2.h header. 2017-12-17 08:34:42 +01:00
Yamagi Burmeister
041d1c6cb6 Remove unused WinError() function. 2017-12-16 16:55:30 +01:00
Yamagi Burmeister
00bf016576 Rewrite all cvars, not just the ones loaded from config.cfg.
And print a nice message thate the cvar is deprecated.
2017-12-16 16:42:24 +01:00
Yamagi Burmeister
b433ee10fd Add a way to rewrite cvars loaded from config.cfg.
With this renamed cvars can be rewritten when config.cfg is first
loaded. Please note that once this was done older YQ2 versions can't
parse that config.cfg anymore.
2017-12-14 19:48:44 +01:00
Denis Pauk
60b444834e Set VSYNC 2017-12-11 23:48:12 +02:00
Denis Pauk
4f9833153f Fix background under cinematic and gamma values 2017-12-11 23:33:19 +02:00
sezero
51200b3e6b replace several long casts with intptr_t and include stdint.h for it. 2017-12-11 23:33:19 +02:00
Denis Pauk
c43e944a3d Rebase soft render from https://icculus.org/quake2/
* deleted asm code
* added support 2k+ resolutions
* SDL2 support
2017-12-11 23:33:19 +02:00
Yamagi Burmeister
430e21eab0 Bump version number to 7.11pre now that 7.10 is done. 2017-12-11 17:12:05 +01:00
Yamagi Burmeister
0e51204908 Bump version number to 7.10. 2017-12-08 10:22:59 +01:00
Yamagi Burmeister
e0ea5d4928 Add CHANGELOG for 7.10. 2017-12-07 15:00:38 +01:00
Yamagi Burmeister
9b82cad2c6 Bump version number to 2.10pre.
The next version will be 2.10 and not 2.03. This is done in preparation
of some Windows test builds.
2017-12-04 17:35:40 +01:00
Daniel Gibson
c3d3e9fc76 Make viewing with joystick framerate-independent
otherwise looking around is faster with higher framerates, that sucks,
especially with unstable framerates (on RPi)
2017-12-02 18:54:31 +01:00
Yamagi Burmeister
e429356bd3 Merge branch 'openal_volume' 2017-12-02 16:41:39 +01:00
Yamagi
44da2aca3b
Merge pull request #262 from DanielGibson/fix-win-msaa-crash
Fix crash on Windows if MSAA is set to a value the driver doesn't support
2017-12-02 16:38:26 +01:00
Daniel Gibson
c105117d41 cap cl_maxfps and gl_maxfps to sane values
gl_maxfps > 1000 breaks things, and cl_maxfps starts to behave weird
at >90, and while up to 125 or so you get the bugfeature of higher
jumping, beyond that things just get even buggier, at some point causing
bugs like #261
2017-12-02 16:36:50 +01:00
Yamagi Burmeister
e3e5bd1bdd Fix drop in volume when shooting into a Brains power screen.
If too many of these sounds are started in one frame (for example if the
player shoots with the super shotgun into the power screen of a Brain)
things get too loud and OpenAL is forced to scale the volume of several
other sounds and the background music down. That leads to a noticable
and annoying drop in the overall volume.

Work around that by limiting the number of sounds started. 16 was
choosen by empirical testing.
2017-11-30 08:26:39 +01:00
Yamagi Burmeister
e30f824944 Don't cast the array itself but it's content.
This was so broken... Casting the type of an array to silence a
warning... It worked on x86, of course. But gave a SIGBUS on ARM.
Do it right, cast / copy the content of the array into another
array of the correct type. Yeah.

This fixes issue #231.
2017-11-14 17:24:41 +00:00
Yamagi
82616d0992
Merge pull request #253 from 0lvin/sdl_build_fix
Fix build with SDL1.2
2017-11-07 10:32:52 +01:00
Yamagi Burmeister
1396741904 Fix possible Vorbis buffer underruns.
There're two possible problems with the calculation of the number of
sound buffers for Vorbis if OpenAL is in use:

* We assume that the (more or less) maximum number buffers is allocated
  during map load. This is not correct if in a multiplayer game a lot of
  custom models with custom sound connect at a later time.
* 64 buffers (about 3 seconds worth of music) may be too low in some
  situations.

Work around this by recalculating the number of buffers if necessary.
We're now reserving about 256 (== 12 seconds) buffers.

This may fix issue #252.
2017-11-04 18:22:53 +01:00
Denis Pauk
9495fe4da9 Show real place of error and fix build with SDL1.2 2017-11-01 22:57:54 +02:00
Yamagi
7b6340ddff Merge pull request #245 from 0lvin/back_button_as_escape
Add support for use controller back button as ESC
2017-10-22 18:19:56 +02:00
Yamagi Burmeister
185e89722a Don't unqueue OpenAL raw samples if OpenAL isn't initialized.
This fixes a crash at menu entry if a cinematic is playing when the
game is build with OpenAL support, but s_openal is set to 0.
2017-10-22 17:58:31 +02:00
Thomas Green
f46c46864a Fix a potential OGG issue when OpenAL library is not found. 2017-10-22 17:54:59 +02:00
Thomas Green
daa0c2c1bf Add improvements to Makefile for OSX. 2017-10-22 17:54:55 +02:00
Daniel Gibson
de5bd4c2c8 OSX: Fix usage of clock_get_time in Sys_Microseconds()
turns out clock_get_time() uses mach_timespec_t which is very similar
to POSIX timespec_t so we're back to just one Sys_Microseconds() function
with an #ifdef __APPLE__ for the (relatively small) differences
2017-10-22 17:54:19 +02:00
Yamagi Burmeister
3d459be4c1 Fix build on OS X that might not have clock_gettime().
Older versions of OS X don't implement clock_gettime() and no(?) version
seems to implement CLOCK_MONOTONIC. Work around this by implementing an
OS X specific variant of Sys_Microseconds() that relies on Mach APIs
provided by all OS X versions...

While at it alter the generic variant so that CLOCK_MONOTONIC is used
only if it's available. CLOCK_REALTIME as a fallback should be good
enough in most cases.

This is believed to fix issue #239.
2017-10-22 17:52:02 +02:00
Denis Pauk
a08374c8cd Add more strict checks for read/write spaces in pcx decode logic 2017-10-21 01:01:41 +03:00
Denis Pauk
61da3dffd1 Add support for use back button as ESC, as example first button in SDL_GAMECONTROLLERCONFIG 2017-10-14 18:58:19 +03:00
Yamagi Burmeister
4bfd1cb9d4 Calculate the correct offset for the cl_drawfps 1 framecounter.
We need to take in account that scaling the characters makes them
bigger, thus they need need to be places depending on the scale and not
at a precaclulated position. This should fix issue #247.
2017-10-11 19:15:11 +02:00
Yamagi Burmeister
8bfcfa7e70 Fix Sys_*seconds() on legacy Windows versions.
Returning 'microseconds / 1000ll' at the first call is wrong, the game
would thing that the first frame too way too much time. For some reason
this wirks in (my) Win10, but breaks on (my) Win7...
2017-10-02 20:48:47 +02:00
Yamagi
db7676307a Merge pull request #242 from devnexen/macos_build_fix
Macos build fix
2017-10-02 18:02:09 +02:00
Yamagi
c4a86ecb49 Merge pull request #240 from devnexen/master
name field is not a pointer.
2017-10-02 17:59:52 +02:00
David Carlier
54f9798fc8 name field is not a pointer. 2017-10-01 17:47:06 +01:00
David Carlier
6ed1898440 dlopen wrapper expects .dylib extension on osx 2017-10-01 17:46:18 +01:00