Commit graph

3279 commits

Author SHA1 Message Date
Yamagi
82a280bc40
Merge pull request #841 from apartfromtime/ui
Add menu bitmap support
2022-06-07 14:19:26 +02:00
Yamagi
09d6dfcd92
Merge pull request #840 from Dremor8484/Dremor8484-aimfix-doublebarrel_shotgun
Update weapon.c
2022-06-07 14:18:51 +02:00
apartfromtime
42e85a207a Cache cursor frames
Bug fix. Missed bringing this over from my other failed pull request.
2022-06-05 13:28:58 +10:00
Yamagi
3872a60e6c Bump version number to 8.11pre. 2022-05-29 07:12:58 +02:00
Yamagi
31260fc0fd Bump version number to 8.10. 2022-05-29 07:10:24 +02:00
Yamagi
ba2fc77ee8 Enforce a minimal render (dsiplay) time for dlights of 32 milliseconds.
Several effects use dlights which are rendered for only one frame.
Muzzle flashes are an example. While this worked on 1997th computers,
todays hardware renders way too many frames for these dlights to be
visible at all. Work around that by enforcing a minimal display time
of 32 milliseconds for each dlight.

Fixes part of #815.
2022-05-28 16:44:29 +02:00
Yamagi
7d0ca125af Some more updates to the CHANGELOG for 8.10. 2022-05-28 11:52:14 +02:00
Yamagi
62d79c07e7 Add entity file for jail5.
Fixes two stuck monsters. Submitted by @BjossiAlfreds, closes #842.
2022-05-28 11:49:11 +02:00
Yamagi
c1212875b2
Merge pull request #845 from maraakate/master
Check >= maxsize in Info_SetValueForKey().  Found by ASAN.
2022-05-28 11:42:00 +02:00
Yamagi
d9c7895394 Update CHANGELOG for 8.10. 2022-05-28 11:25:08 +02:00
maraakate
deec7e422d src/common/shared/shared.c: Check >= maxsize in Info_SetValueForKey(). Found by ASAN. 2022-05-27 18:28:31 -04:00
apartfromtime
7e1bc6911b Code style changes
Tabs to white-space.
BSD style.
2022-05-22 05:52:25 +10:00
apartfromtime
809588798e De-align apply action
Draw the "apply" action string from right to left, with no alignment.
2022-05-21 22:22:10 +10:00
apartfromtime
07fc65f9c5 Add menu bitmap support
Adds menu bitmap struct, drawing of a menu bitmap and highlighting if bitmap menu item is in focus.
Allows items that are gray (inactive) to be skipped when adjusting the menu cursor.
Removed switch case from Menu_SelectItem, all items either do or do not call their callback functions.
2022-05-21 22:21:29 +10:00
Yamagi
b59077b972 Normalize arm64 to aarch64.
This ensures that we call ARM64 `aarch64` on all platform, which aren't
MacOS or Windows. And it fixes the bug, that `arm64` was normalized to
`arm`, making incompatible savegames between 32 bit and 64 bit ARM
loadable. Leading to crashes.
2022-05-20 12:56:22 +02:00
Dremor8484
25aeb81fa7
Update weapon.c
aimfix cvar now applies to the doublebarrel shotgun too
2022-05-20 11:37:34 +02:00
Yamagi
12c7fddfaa
Merge pull request #827 from protocultor/sdlcontroller
Full transition to SDL_GameController for gamepad usage
2022-05-17 19:42:19 +02:00
Daniel Gibson
ae4388abed Doc: Make busywait 0 sound a bit less scary
As far as we know it's mostly a Windows-only problem, where
(especially in power-saving modes) sleeping can be very imprecise.
2022-05-11 17:44:57 +02:00
Daniel Gibson
13d3dd1b33 doc/030_configuration.md: Update (and shorten) tuning guide 2022-05-11 16:20:28 +02:00
Daniel Gibson
e3aa1010f9 doc/040_cvarlist.md: improve documentation of cl_async etc
to reflect reality, including the latest changes
2022-05-11 02:02:46 +02:00
Yamagi
1833f160eb
Merge pull request #830 from DanielGibson/timing-improvements
Improve timings in Qcommon_Frame()
2022-05-10 18:53:55 +02:00
Yamagi
e3f2d1e6d7
Merge pull request #828 from devnexen/haiku_cmake_build_ease
cmake Haiku build little improvement for SDL retrieval.
2022-05-10 18:47:07 +02:00
Daniel Gibson
413b44b4cd Qcommon_Frame(): Try to get closer to desired packet framerate
.. by running a packet frame if the current renderframe is closer to
the time the packet frame *should* be run than the next renderframe
(presumably) will be.

This should also help when using cl_maxfps -1 on a slow system that
can't reach the desired rfps (vid_maxfps or display refresh rate).
Without this change, we might run int the problem described in the
following example:
Imagine having cl_async 1, cl_maxfps 100, no vsync and a system that
mostly only reaches about 60fps. So rfps is 100 and pfps is 50.
But then (without this change) running at 60fps means that only every
second renderframe is a packetframe, so the packetframerate
*effectively* is 30, which can cause movement/clipping/physics bugs
(for example when hugging some non-perpendicular walls, like the right
 wall with the window that leads to the last room in base1).
With this change the packet framerate would effectively be 60 (every
renderframe is also a packetframe), which is less buggy and also closer
to 50 than 30 is.
2022-05-09 20:27:41 +02:00
Daniel Gibson
f95b5e7725 Qcommon_Frame(): Make pfps and rfps floats
should be more precise when converting to microseconds
2022-05-09 02:05:19 +02:00
Daniel Gibson
502ff345c3 Introduce cl_maxfps -1 for "use optimal value based on render framerate"
(this is the default value of that cvar now)

In Qcommon_Frame(), if cl_async is 1, the packet framerate should
ideally be a fraction of the render framerate, and to avoid movement
glitches and such it should be between 45 and 90, ideally around 60.
With cl_maxfps set to -1, pfps now is set to such a value automatically.
2022-05-09 02:05:19 +02:00
Daniel Gibson
7cf1392765 Qcommon_Frame(): Improve max framerate handling when vsync is enabled
When setting rfps based on GLimp_GetRefreshRate() and vid_maxfps,
take into account that GLimp_GetRefreshRate() might return a value
that's slightly too low (like 58 or 59 when it's 59.95 and should be 60)

The 20% tolerance that, in case of vsync enabled, used to be handled
with `packetdelta < 0.8 * 1000000/pfps` (and the same for rfps) is now
instead added to rfps (and thus implicitly pfps, if it's >= refreshrate)
2022-05-09 01:43:08 +02:00
Daniel Gibson
5a8382064a Remove 0.95 factor for packet framerate
It could make things stutter, especially if cl_maxfps was deliberately
set to a fraction of the display refreshrate (as it'd target a few
frames less).
The 0.95 factor was supposed to ensure that we don't have more packet
frames than renderframes (or two packet frames in a row without
rendering in between), as that apparently breaks the movement prediction
code. We now ensure the same thing my not running a packet frame if no
render frame is run at the same time.
2022-05-08 18:10:25 +02:00
David Carlier
77aef1d732 cmake Haiku build little improvement for SDL retrieval. 2022-05-08 09:06:13 +00:00
Jaime Moreira
422715cee2 Hot plugging / hot swapping of game controller(s)
May be unreliable on some devices, e.g. Nintendo Switch Pro Controller.
Works great on others, e.g. DualShock 4.

Delay added to gamepad initialization on hotplug, gives time to the OS to
recognize the device.
2022-05-08 01:05:07 -04:00
Jaime Moreira
20542420ef New controller alt buttons menu option
Allows to bind buttons that only will work with "+joyaltselector" active.
The definition of another "scope" of keys was needed, to identify ALT bindings.
2022-05-08 00:24:52 -04:00
Jaime Moreira
0aa44afa13 New customize controller buttons menu option
Handles game controller button bindings exclusively.
Classic "customize controls" option now handles only keyboard / mouse bindings.
This separation is achieved with the new order of QKEYS in keyboard.h, and
binding functions in menus (especially "MenuKey" functions) now take into
account the "scope" where they operate: keyboard/mouse only, controller only,
or both.
2022-05-07 23:55:00 -04:00
Jaime Moreira
d4100f7113 Menu inputs standardised
Streamlined menu inputs by making most "*_MenuKey(key)" functions to use
Key_GetMenuKey(). "Backspace" is not a special case anymore, so any menus
that have a "delete" option can already handle any input expected, like the
backspace or delete keys, or the "Y" button of the controller, to run it.

Also, fixed a bug where changing the key for "team chat" also changes the one
for "chat" in the "multiplayer" -> "customize controls" menu.
2022-05-07 22:45:44 -04:00
Jaime Moreira
2bb1b33d7e Full transition to use only SDL_GameController for gamepad
This removes the usage of SDL_Joystick for joystick buttons and hat, and
relies exclusively on SDL_GameController for input. This allows to identify
buttons in a consistent manner across multiple types of controllers, which
in turn allows to assign specific tasks to them without worrying of breaking
usability, like having "A" to accept and "B" to cancel in menus.

Init and Shutdown logic of game controller have been separated from main SDL
Init and Shutdown functions.

Old style button names "JOYx" have been removed.

If your gamepad has paddles or other extra buttons, you'll need at least
SDL version 2.0.14 to use them.
2022-05-07 21:26:50 -04:00
Yamagi
ab8d700674 Add hangar1.ent entity file.
This fixes two stuck monsters. Found and submitted by @Dremor8484.
Closes #821.
2022-05-07 10:08:49 +02:00
Yamagi
e294fc94e5
Merge pull request #822 from DanielGibson/gles3-rb
OpenGL ES 3.0 support
2022-05-07 09:45:30 +02:00
Yamagi
22ff171007
Merge pull request #825 from devnexen/curl_progress_fix
curl client show progress only when there actually some
2022-05-07 09:44:00 +02:00
Yamagi
434e85feaf
Merge pull request #823 from 0lvin/benchmark
Remove framelimits for timedemo
2022-05-07 09:42:16 +02:00
Yamagi
5dd7a56c57
Merge pull request #820 from ConHuevosGuey/master
Update retexturing command in configuration document.
2022-05-07 09:40:30 +02:00
Yamagi
56d5342fa7
Merge pull request #816 from devnexen/refactor_cpu_pause
frame cpu pause refactoring.
2022-05-07 09:39:57 +02:00
David Carlier
c34071d05c curl client show progress only when there actually some 2022-05-07 07:03:40 +01:00
Denis Pauk
bbaf6d6b20 Remove framelimits for timedemo 2022-04-27 23:09:28 +03:00
Daniel Gibson
ef7ba41932 Update documentation for GLES3 and gl3_usefbo 2022-04-27 00:33:46 +02:00
Daniel Gibson
56e1b9bc1e Add gles3 renderer to videomenu 2022-04-27 00:33:46 +02:00
Daniel Gibson
0881a63b1e GLES3: Explicitly don't handle gl_drawbuffer
GLES can't render to the front-buffer
2022-04-27 00:33:46 +02:00
Daniel Gibson
e124ddb4d0 GLES3 support in CMake 2022-04-27 00:33:46 +02:00
Daniel Gibson
2a8bd9e7a6 GL3: build ref_gles3 in addition to ref_gl3
instead of making it a compile-time option, just build both
2022-04-27 00:33:46 +02:00
Daniel Gibson
a195305592 GL3: Fix particles on RPi4
tested V3D 4.2; OpenGL ES 3.1 Mesa 20.3.5
2022-04-26 04:10:57 +02:00
Daniel Gibson
89f63915a3 GLES3: Make newer shaders work with OpenGL ES 2022-04-26 04:09:38 +02:00
Daniel Gibson
c936e43420 GL3: Use one projection-view matrix in shaders
instead of separate projection and view matrices - this way there is
one less mat4 multiplication in the 3D vertex shaders.
2022-04-26 04:09:38 +02:00
Daniel Gibson
1eabde6b55 GL3: Make GLES3 work on Raspberry Pi 4B
(older Raspberry Pi versions don't support OpenGL ES 3.0, only 2.0)
2022-04-26 04:09:38 +02:00