Commit graph

2400 commits

Author SHA1 Message Date
Yamagi Burmeister
4573e9639e Bump version number to 7.42pre. 2019-05-26 09:14:30 +02:00
Yamagi Burmeister
8bcb8f849c Bump version number to 7.41. 2019-05-26 08:43:11 +02:00
Yamagi Burmeister
40667b133f Some fixes and clarifications to the CHANGELOG. 2019-05-25 10:21:11 +02:00
Yamagi Burmeister
12084193c4 Add cURL to the LICENSE file. 2019-05-13 18:02:50 +02:00
Yamagi Burmeister
83a5d3c905 Mention the preview builds for Windows. 2019-05-13 17:48:46 +02:00
Yamagi Burmeister
298cb05d61 Update the CHANGELOG for the upcoming 7.41 release. 2019-05-13 17:28:04 +02:00
Yamagi
33bfd28ebc
Merge pull request #400 from DanielGibson/wrapper-foreground
quake2.exe wrapper puts Q2 window in foreground
2019-05-09 18:12:31 +02:00
Yamagi
8863ea2346
Merge pull request #399 from maxcrofts/master
CMake fixes for Windows
2019-05-09 18:12:14 +02:00
Yamagi Burmeister
9b80745d5d Fix cursor position in the 'name' field in the player setup menu.
This closes #396.
2019-05-09 18:01:36 +02:00
Daniel Gibson
7db5c71f3a quake2.exe wrapper puts Q2 window in foreground
because it sucks when you start quake2.exe and the game starts in the
background
2019-05-08 03:04:12 +02:00
Max Crofts
a43f3873a5 Link SDL with q2ded on Windows
This is in line with what the makefile does.
2019-05-07 19:16:02 +10:00
Max Crofts
332a322d8e Remove frame.c from CMakeLists.txt 2019-05-07 19:15:47 +10:00
Daniel Gibson
f5d9c49f20 Allow second layer of keybindings for controllers, refs #387
There's an "enable alt joy keys" command now. If a key is bound to that
command, all joystick buttons (incl. hat and triggers) are turned from
K_JOYx into K_JOYx_ALT, which allows two keybindings on the same key,
one with the altselector pressed and one without.
If there's no keybinding for K_JOYx_ALT, it will use the binding for
just K_JOYx as a fallback (if it exists).

This is especially handy to create direct bindings for all the weapons
on the (limited amount of) Joystick buttons.
2019-05-05 18:10:10 -01:00
Daniel Gibson
c57befe80d When opening file make sure it's actually a file, fixes #394
... and not a directory, which can cause crashes.
2019-05-04 19:55:38 +02:00
Daniel Gibson
d84bc47766
Merge pull request #395 from DanielGibson/faster-gl3
Make gl3 fast with AMDs Windows drivers, fix overbright models with SURF_DRAWSKY
2019-05-04 14:39:30 -01:00
Daniel Gibson
107d044da2 Make AMD performance workaround conditional per driver version 2019-05-04 17:37:16 +02:00
Daniel Gibson
cdf533f995 Fix overbright models in GL3, refs #393
also some dumb bug with using i in two nested loops
2019-05-04 17:37:16 +02:00
Daniel Gibson
26a461575b Try to make GL3_BufferAndDraw3D() faster on AMD/Windows
Seems like AMDs Windows driver doesn't like it when we call
glBufferData() *a lot* (other drivers, incl. Intels, don't seem to
care as much).
Even on an i7-4771 with a Radeon RX 580 I couldn't get stable 60fps
on Windows without this workaround (the open source Linux driver is ok).

This workaround can be enabled/disabled with the gl3_usebigvbo cvar;
by default it's -1 which means "enable if AMD driver is detected".

Enabling it when using a nvidia GPU with their proprietary drivers
reduces the performance to 1/3 of the fps we get without it, so it
indeed needs to be conditional...
2019-05-04 17:37:16 +02:00
Daniel Gibson
7b4dc000ad Unify buffering data and drawing with gl3state.v[ab]ao3D
use GL3_BufferAndDraw3D() instead of glBufferData() and glDrawArrays()
in each place it's needed.
This by itself doesn't make anything faster, but it will make trying out
different ways to upload data easier.
2019-05-04 17:37:16 +02:00
Yamagi Burmeister
44e8088f7d Document gl_fixsurfsky. 2019-05-04 17:35:19 +02:00
Yamagi Burmeister
401ec04691 Make the SURF_DRAWSKY fix committed in 325e893 optional.
The developers tested their maps without the fix and decided that it
looked good. Add a new cvar gl_fixsurfsky defaulting to 0 that enables
the fix if someone really want it.
2019-05-04 17:23:20 +02:00
Yamagi Burmeister
325e893376 Don't create lightmaps and set SURF_DRAWSKY for SURF_SKY surfaces.
The software renderer already did this, but not the GL renderers. Maybe
the logic was lost somewhere on the long way... Without this change a
fullbright lightmap is generated for SURF_SKY surfaces and without the
SURF_DRAWSKY flags the surfaces aren't skipped in RecursiveLightPoint()
and GL3_LM_CreateSurfaceLightmap(). This isn't a problem under real
skyboxes, but in cases were SURF_SKY is abused fpr interior lightning.
rmine2.bsp in rogue is a good place to see the problem

Reported by @m-x-d, fixes #393.
2019-05-01 19:32:30 +02:00
Yamagi Burmeister
2c11d02b80 Fix Com_VPrintf() for messages longer then 4096 chars.
At least with MinGW on Windows vsnprintf() treats buffer < size as an
error, returning -1 instead of the number of characters that would have
been printed without size restrictions. Therefor msgLen may be wrong,
leading to all kind of funny mistakes further down below... Buffer
overflow included. Work around this by handling the msgLen < 0 case and
adding an explicit terminating \0.

This is another case of "I wonder why nobody has never noticed this",
the GL1 renderers extension string triggered the buffer overflow each
time the game started.
2019-04-28 13:57:46 +02:00
Yamagi Burmeister
193a5b7a5c Don't allow 'give health 0' or even less.
Giving the player < -1 health and increasing it to something above 0
without closing the console breaks the player state.
2019-04-27 19:15:38 +02:00
Daniel Gibson
98b24654b6 Make square particles gamma-correct, work around Intel Windows bug
I guess it makes sense to apply gamma to the color, we do the same
for the standard round particles.
Also, this way the fragment shader for square particles references the
uniCommon UBO (gamma is part of it) - apparently the Intel HD4000
(from Ivy Bridge) GPU driver for Windows has a bug that uniform blocks
that exist in the shader source but aren't actually used can't be found
(with glGetUniformBlockIndex(prog, name)), which we treat as an error
in  gl3_shaders.c initShader3D().

fixes #391
2019-04-25 18:38:16 +02:00
Daniel Gibson
0ef064b21d Fix GL1 and GL3 stencil buffer setup
This broke during refactoring (in b8a062e36), reported in #391

(SDL_GL_[SG]etAttribute() return 0 on success and -1 on failure)
2019-04-22 04:05:04 +02:00
Yamagi Burmeister
f9108db668 Fix stupid c&p braino, initialize vid_gamma.
This closes #385.
2019-04-08 14:05:54 +02:00
Yamagi
06c4735fbb
Merge pull request #382 from 0lvin/for_review
Add auto detect resolution
2019-04-08 14:00:52 +02:00
Yamagi
d24335a97c
Merge pull request #384 from devnexen/netbsd_little_update
hunk api mremap supported by NetBSD as well.
2019-04-08 14:00:16 +02:00
Yamagi Burmeister
b2874ab656 Some more fixes to the timing calculations.
If the vsync is enabled missuse it to slow the client down, e.g.
calculate the target framerate, add an security margin of 20% and
let the vsync handle the rest. This hopefully solves some problems
with frametime spikes. This is an idea by @DanielGibson.

If the vsync is disabled use a simple 1s / fps calculation.
2019-04-08 13:56:56 +02:00
Yamagi Burmeister
5bb5e52879 Fix vid_displayrefreshrate reset.
Until now it wasn't possible to reset vid_displayrefreshrate to -1 once
it was changed to something else. Fix that.
2019-04-08 13:56:56 +02:00
Yamagi Burmeister
cda565d044 Rename msec to usec, because it holds microseconds.
Requested by @DanielGibson.
2019-04-08 13:56:56 +02:00
Yamagi Burmeister
49cc1b9789 Fix typos and grammar in comments, clarify some points. 2019-04-08 13:56:56 +02:00
Yamagi Burmeister
209bd9d529 Replace GetSystemTimeAsFileTime() with GetPerformanceCounter().
GetSystemTimeAsFileTime() is okay as long as the game runs fullscreen.
For some reasons it's resolution degraded to ~16ms as soon as the game
runs widowed... Better use GetPerformanceCounter(), its more reliable
and the recommended API for timecounters.
2019-04-08 13:56:56 +02:00
Yamagi Burmeister
f240799e6d Some clarifications and annotations to the file lists. 2019-04-08 13:56:19 +02:00
Yamagi Burmeister
5386e73af9 Add file listsings.
"What file goes were?" is an often asked question, so give a listing of
the complete kit. While at it provide checksums for the paks.
2019-04-03 21:17:13 +02:00
Yamagi Burmeister
9df2311df0 Bring the multiplayer docs inline with other docs.
* Break at 72 chars.
* It's Quake II and not quake2
* It's HTTP and not http
* Don't use german placeholders
2019-04-03 21:08:07 +02:00
Daniel Gibson
178fcff36e GL3: Fix missing dynamic lights on floor for grenades/rockets
Apparently the lightsource for exploding rockets/grenades is very close
to the surface, so the dot-Product between surface-normal and the
vector between the light and the pixel returns 0, basically disabling
the dynamic light for that surface.
As a workaround, move the lightposition (only for that dot product)
a bit above the surface, 32*surfaceNormal looks good.

fixes #386
2019-04-03 19:38:39 +02:00
Yamagi Burmeister
4f20ac97d1 Some clarifications, typo and grammar fixes to the documentation.
Make some things clearer and fix some small miss informations, overhaul
the timing guide. While at it fix typos and grammar mistakes.
2019-04-03 11:33:20 +02:00
David Carlier
65357c9ba5 hunk api mremap supported by NetBSD as well. 2019-03-29 17:24:07 +00:00
Denis Pauk
eea1cd30e8 Fix segfault in about menu 2019-03-23 23:23:54 +02:00
Denis Pauk
e568e3ff0e Save original window position before recreate 2019-03-22 23:29:17 +02:00
Denis Pauk
f0dc7bd6f9 Move GetDesktopMode to client/vid/vid.c 2019-03-21 21:32:34 +02:00
Denis Pauk
f105047540 make cppcheck little more happy 2019-03-20 22:01:14 +02:00
Denis Pauk
025764db79 make cppcheck little more happy 2019-03-20 21:56:28 +02:00
Denis Pauk
0f9e3cc69a Move patches authors to about menu
With whole respect to original authors
2019-03-20 21:28:42 +02:00
Denis Pauk
fbe42511c1 Add resolution autodetect 2019-03-20 20:59:34 +02:00
Denis Pauk
0ab41ee0df Use boolean for r_outof* 2019-03-20 20:45:15 +02:00
Denis Pauk
5e7082e72d Fix for light without current entity 2019-03-20 20:43:54 +02:00
Daniel Gibson
3b296c43a0 GL1, SW: Calculate needed hunk size in Mod_LoadBrushModel()
same as last commit but for the other renderers
2019-03-17 20:24:40 +01:00