Commit graph

3779 commits

Author SHA1 Message Date
Denis Pauk
c92664c01d collision: check string entity hash before load
https://github.com/yquake2/yquake2remaster/issues/4#issuecomment-1741814349
2024-08-11 15:40:33 +03:00
Yamagi
180050b9a3 Add Github Workflows to create test build for Linux, MacOS and Win32.
This is should make testing for normal endusers easier by providing
prebuild binaries for them. It also serves as a simple CI by compiling
every commit and Pull Request for Linux, MacOS and Win32. And it saves
time, because (Windows) test build must no longer created by hand.

* Windows is build for Win32 only. We won't add a Win64, because there's
  no point in having a 64 bit Windows release and it would break most
  existing mods. Savegames are also not compatible between 32 and 64 but
  builds.

* MacOS is build to get some test exposure and to publish up to date
  binaries to users. This doesn't mean that MacOS is now officially
  supported. It stays community supported. The binaries are untested,
  because I have no Mac. PRs are welcome. ;)

* Linux is build with ubuntu-latest, which is the last LTS release. The
  binaries should work on most other distros.

Windows includes all required dependencies. As a difference to release
builds the curl.dll is taken from upstream and not a cut down custom
build. MacOS and Linux do not ship the dependencies, users should
install them through Brew or their distro.

Github strips file permission when zipping the assets. A work around
would be to create a tar archive and zip that, but that is ugly. I
opted against it, users must mark the binaries executable by hand.

These workflows trigger at each push to the master master branch and at
each new or edited pull request.

Special features like SDL3 are not supported at this time.
2024-08-11 13:03:12 +02:00
Yamagi
4b24e16a64
Merge pull request #1126 from devnexen/late_fade_data
client sound fade_data is only really used later.
2024-08-11 09:08:35 +02:00
Yamagi
c2d5b849e5 Bump version number to 8.42pre. 2024-08-08 18:56:25 +02:00
Yamagi
141bf6e7dd Bump version number to 8.41. 2024-08-08 18:55:54 +02:00
Yamagi
8cc3361730 Hardcode the SDL audio driver (again) to directsound under Windows.
Windows defaults to `wassapi`, which is a sensible choice. But WASAPI
only guarantees 32 bit float samples, anything else only works if the
driver or something supports it and YQ2 requires 16 bit samples. That
can be worked around by having SDL recode the audio, but I don't want
such a invasive change right before a release.

Another part of #1132.
2024-08-08 18:43:03 +02:00
Yamagi
409c508a7d Update CHANGELOG for 8.41. 2024-08-07 12:08:20 +02:00
Yamagi
b3c47df0c8 Don't overwrite SDLs audio driver selection.
Hardcoding default driver for some of the supported platform is a
remnant of SDL 1.2 and hasn't been necessary since SDL 2.0 a long
time ago. In fact it has a high properbility to break things, SDL
could easily end up with a non working driver.

When `s_sdldriver` is set to the newly introduced value `auto` the
driver is selected by SDL. In all other cases the string is the
driver name which SDL will be forced to.

This doesn't fix existing configs. Since the OpenAL sound backend has
been the default for nearly 15 years and we haven't received bug reports
for some other problem with the SDL sound backend in the past, I'm half
sure that there are next to users out there. These can reset the cvar
by hand if necessary.

Closes #1132.
2024-08-07 12:04:54 +02:00
Yamagi
3aa051c6d2
Merge pull request #1133 from protocultor/lightmapchain_fix
Infinite loop in R_GetBrushesLighting() function, hangs the game
2024-07-31 20:22:57 +02:00
Jaime Moreira
1df86ae16d lightmapchain cleared of surfaces added twice 2024-07-31 12:13:32 -04:00
Yamagi
c72d0c1b39 Add back linker options somehow lost in 8cedbb0.
Closes #1129, fixed by @ArminiusTux.
2024-07-29 19:18:48 +02:00
Yamagi
4b3545697e Bump version number to 8.41pre. 2024-07-27 09:41:02 +02:00
Yamagi
4e41dbf186 Bump version to 8.40. 2024-07-27 09:40:00 +02:00
David Carlier
ae827dbd86
client sound fade_data is only really used later. 2024-07-22 21:44:06 +01:00
Yamagi
528ffe6a6d Add missing R_ApplyGLBuffer() to actually render the player menu.
This fixes part of the player setup menu missing after the GL1 grouped
drawcalls branch was merged.

Submitted by @protocultor in
https://github.com/yquake2/yquake2/pull/1124#issuecomment-2241272507
2024-07-21 09:24:49 +02:00
Yamagi
824cd9c034 Update CHANGELOG for 'Group draw call in GL1.' 2024-07-20 09:35:14 +02:00
Yamagi
85ca97192d
Merge pull request #1125 from apartfromtime/menu-stack
Menu: minor code refactor
2024-07-20 09:31:54 +02:00
Yamagi
eef7db91d8
Merge pull request #1124 from protocultor/gl1_buffer
Grouped draw calls for improved performance with GL1
2024-07-20 09:24:23 +02:00
apartfromtime
df81a8b7b8 menu: active menu layer
Replace function pointers with active menu layer.
2024-07-20 11:57:21 +10:00
apartfromtime
2bafa22cfc menu: menu framework function pointers
Add function pointers draw and key event to menu framework.
Setup function pointers for menu frames.
Pass menu framework as parameter to M_PushMenu().
2024-07-20 10:21:22 +10:00
Yamagi
4b9b8e14a4 Switch g_quick_weap to 1 by default.
It's a nice to have convenience feature that most players will never
notice. Die hard traditionalists can switch it off.
2024-07-15 21:42:15 +02:00
Yamagi
2d581a3667 Fix description of g_quick_weap and fix typo, it's SDL 3.1.2. 2024-07-15 21:38:26 +02:00
Jaime Moreira
15a1ebdd74 Deleted gl1_biglightmaps
glTexSubImage2D() calls are very slow, and are even slower when
the texture is big. Dynamic lighting changes are small compared
to the huge 512x512 size of the lightmap this option provided,
so it was detrimental to performance.
Original logic remains underneath if there's a need of a comeback.
2024-07-15 12:45:15 -04:00
Jaime Moreira
24b546ba54 GL1 unified draw calls, episode vi
Buffered shadows.
2024-07-15 12:33:19 -04:00
Jaime Moreira
55dfaa2e3b GL1 unified draw calls, 05
Buffered 'alias' models. Logic from R_DrawAliasModel() and
R_DrawAliasFrameLerp() was moved to R_ApplyGLBuffer().
2024-07-15 11:20:26 -04:00
Jaime Moreira
e8b2e36bd8 GL1 unified draw calls, chapter iv
Buffered flashblend effects.
2024-07-15 10:18:46 -04:00
Jaime Moreira
749e70b988 GL1 unified draw calls, part 3
Batching / buffered procedure, applied to multitexture surfaces.
This solves the issue with gl1_overbrightbits, when jumping
between 0 and 2-4.
2024-07-15 09:05:21 -04:00
Jaime Moreira
4461128255 GL1 unified draw calls, cont.
Batching procedure from previous commit, applied this time to GLPoly
/ single texture surfaces; alpha and liquid included.
2024-07-15 08:23:43 -04:00
Jaime Moreira
50aebd2de4 GL1 unified draw calls, init
Implemented a batching procedure, to try to group meshes in a buffer
and use a final GL call to draw them all in one step, instead of the
many GL draw calls existing today.
For now, only 2D textures are included, especifically console text
("conchars"), scrap and tiles. It's not worth doing this for
individual 2D elements (e.g. crosshair).
2024-07-15 06:56:02 -04:00
Jaime Moreira
4503333b3a GL1: lighting for brushes on the entity list...
...is being "preprocessed" before regenerating lightmaps, so there
are no additional changes to the lightmaps when drawing those brushes.
2024-07-14 20:20:27 -04:00
Jaime Moreira
1bae1e359f GL1: removed many fruitless glTexParameteri calls
They were in this form:
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG/MIN_FILTER,GL_LINEAR)
Only appeared at startup, but we didn't need so many of them.
2024-07-14 19:31:00 -04:00
Yamagi
fd2ebb8891 Update CHANGELOG for 8.40. 2024-07-13 16:19:14 +02:00
Yamagi
2a2f3e0b2f
Merge pull request #1123 from BjossiAlfreds/helpmsg-always
Workarounds for naggy help icons
2024-07-11 21:29:26 +02:00
Yamagi
7b6518060e
Merge pull request #1122 from devnexen/fix_dyn_symb_loading_sig
consistenly cast dynamic loading from generic pointer to fn pointer s…
2024-07-11 21:15:51 +02:00
BjossiAlfreds
6a25ba5118 Workarounds for naggy help icons 2024-07-09 13:11:12 +00:00
David Carlier
2b4598d536
consistenly cast dynamic loading from generic pointer to fn pointer signature. 2024-07-06 18:40:13 +01:00
Yamagi
8c0904f0c8
Merge pull request #1121 from 0lvin/backport
Improve pcx support and cleanup soft render
2024-07-06 18:49:29 +02:00
Denis Pauk
ac2a50cb4a soft: scale model texture s,t values
ref_gl renders use 0.0..1.0 float texture coordinates in gl commands
and skin ratio/resolution could be any.
ref_soft render uses absolute coordinates as result textures with
different to expected size are applied incorrectly.

Fix will not add support of scalled retextured skins, just fix case
when ratio is incorrect after scale down such or place a incorrect
pcx skin to the model directory.
2024-07-06 16:48:20 +03:00
Denis Pauk
79c71c7a68 soft: get rid unused R_PolysetUpdateTables 2024-07-06 16:41:52 +03:00
Denis Pauk
bfeb842bd3 pcx: fix support of bytes_per_line
https://github.com/yquake2/yquake2/issues/1119
2024-07-06 16:32:45 +03:00
Yamagi
3f6a0a3689
Merge pull request #1118 from devnexen/few_more_build_chg
fix few warning builds.
2024-07-06 09:50:37 +02:00
Yamagi
af5a876be4 Fix a typo. 2024-07-06 09:20:04 +02:00
Yamagi
4c4759b73b
Merge pull request #1120 from BjossiAlfreds/jug13-mapfix
Mapfix for map jug13 (The Civic Center) in Juggernaut
2024-07-06 08:51:58 +02:00
BjossiAlfreds
298dd69def Mapfix for map jug13 (The Civic Center) in Juggernaut 2024-07-05 15:26:22 +00:00
David Carlier
a8a15ddff3
fix few warning builds. 2024-06-30 23:07:03 +01:00
Yamagi
a315b15494
Merge pull request #1116 from devnexen/prev_fix_sec_optim
micro optimisations for previous security mitigations.
2024-06-30 20:54:08 +02:00
David Carlier
d0dc3e9926
micro optimisations for previous security mitigations.
also strtok_r uses its own provided buffer instead of the static one
even in a somewhat monothread context, it s still better.
2024-06-30 17:08:45 +01:00
Yamagi
1a1b32961b Refactor the download filter.
The first try didn't take into account that an evil server could
override the filter list by sending a stuff command. Fix this by
hardcoding the filters for .dll, .dylib and .so. Make sure that the
filters are always applied, either when the download is requested
through the `download` command or because game data is missing.

This is just a poor mans fix, trying to rule out an obvious way to
inject code into the client.
2024-06-24 11:56:11 +02:00
Yamagi
852cec05e7 Filter .., :, / and \\ from al_driver and cl_libcurl.
This is a poor mans safeguard against malicious server trying to
download and inject libraries.
2024-06-22 17:22:22 +02:00
Yamagi
5e6a73dc3f Include downloads into the security considerations. 2024-06-22 16:57:30 +02:00