Commit Graph

3640 Commits

Author SHA1 Message Date
Denis Pauk daa471e0f8 filesystem: load system pak from remaster 2024-09-14 00:56:57 +03:00
Denis Pauk 7509200287 game: code cleanup 2024-09-14 00:56:11 +03:00
Denis Pauk dcf411bb11 models: add mda file to override list 2024-09-14 00:56:11 +03:00
Denis Pauk 1aadd6e404 gl1: free 16to8 convert table on exit 2024-09-10 06:47:01 +03:00
Denis Pauk e534f9e2b3 filesystem: fix compressed buffer allocation 2024-09-10 01:18:30 +03:00
Denis Pauk d0c98f5bab client: use rgb color in effect color tables 2024-09-09 00:35:30 +03:00
Denis Pauk f040b01e00 Merge remote-tracking branch 'yquake2/master' 2024-09-09 00:33:38 +03:00
Denis Pauk 6e8502a98d client: use 16 steps color particles 2024-09-09 00:28:25 +03:00
Denis Pauk aba2dc9ccf client: reuse combined colors in CL_BfgParticles 2024-09-09 00:21:38 +03:00
Denis Pauk 8ab3e54f6a client: reuse combined colors in CL_ParticleSteamEffect 2024-09-09 00:21:38 +03:00
Denis Pauk ee4086c82d client: reuse combined colors in CL_ParseTEnt 2024-09-09 00:21:38 +03:00
Denis Pauk 6b00ed85cd client: reuse combined colors in CL_ParticleEffect 2024-09-09 00:21:38 +03:00
Denis Pauk 900233ada7 client: reuse combined colors in CL_GenericParticleEffect 2024-09-09 00:21:38 +03:00
Denis Pauk d48904838e client: reuse combined colors in CL_ColorExplosionParticles 2024-09-09 00:21:38 +03:00
Denis Pauk 7e6e776c6a client: reuse combined colors in CL_ParticleSmokeEffect 2024-09-09 00:21:38 +03:00
Denis Pauk 1d8de9a89a client: reuse combined colors in CL_BlasterParticles2 2024-09-09 00:21:38 +03:00
Denis Pauk db0328a251 client: use combined color insted VID_PaletteColor 2024-09-09 00:21:38 +03:00
Denis Pauk 74e9708204 client: use rgb for CL_FlagTrail/CL_TagTrail 2024-09-09 00:21:38 +03:00
Yamagi 5acb267630 Add a new playback mode `ogg_shuffle` == `4`, truly random playback.
912b65ff74 changed mode `3` from random
playback to truly random playback, allowing the same track being played
several times in a row. Since some users might prefer the old behavior
move truly random playback to a new mode `4`. Add it to the menu and
finally document the `ogg_shuffle` cvar.

In addition to #1143
2024-09-08 17:00:34 +02:00
Yamagi da15696d23 Save and restore the OGG state only of the backend is enabled.
Otherwise we might end up in situations were `OGG_SaveState()` writes
invalid values into the state struct and `OGG_ResumeState()` tries to
recover theses values into an uninitialized stb_vorbis state. This may
lead to NULL pointers in stb_vorbis and other problems.

Closes #1135.
2024-09-08 17:00:34 +02:00
Yamagi 7c88889716
Merge pull request #1150 from amalchuk/feature/keyboard-improvements
Fix Windows key bind name on non-Mac
2024-09-08 16:18:44 +02:00
Denis Pauk e188358e2b Merge remote-tracking branch 'yquake2/master' 2024-09-08 12:58:00 +03:00
Yamagi a969526d87 Switch the SDL2 sound backend to transparent audio format conversion.
Since the SDL 1.2 day the SDL sound backend relied on the sound driver
supporting the requested audio format. That workes fine for drivers
support transparent conversions into formats supported by the hardware.
But it failes with drivers which are unable to do such conversions. As
long as we hardcoded the sound driver this wasn't a problem, because all
our chouces supported transparent conversions. When we removed the
hardcoded choices and started to rely on SDLs choices especially the
wsaapi driver - which is SDLs default choice under windows - failed.
wsaapi only guarantees support for AUDIO_F32LSB (other formats may be
supported, depending on the hardware), Quake II needs AUDIO_S16SYS or
AUDIO_U8.

Solve this by switching to transparent conversions through SDL. This way
Quake II can send whatever it wants to SDL and SDL will make sure that
it is in the right format before sending it to the driver.

This isn't necessary for SDL3, SDL3 doesn't support explicit formats and
always relies on transparent conversions.

Remove hardcoded wsaapi on Windows, it's no longer necessary.

Part of #1135.
2024-09-08 10:29:36 +02:00
Yamagi 5ba7695d64
Merge pull request #1147 from protocultor/delta_time_fs
Flick Stick fixed duration to 0.1 seconds
2024-09-08 09:49:11 +02:00
Denis Pauk ff115d7061 client: update mpeg video decoder
3198122a19/pl_mpeg.h
2024-09-08 03:18:26 +03:00
Andrew Malchuk d7845deb4c
Fix Windows key bind name on non-Mac 2024-09-07 14:25:26 +04:00
Denis Pauk 4778c6bd7c soft: reuse R_BuildLightMap code 2024-09-03 00:44:57 +03:00
Jaime Moreira d90dc649ec Revert "PCX_Decode warning demoted to 'dev only'"
This reverts commit 4756c44155.
2024-09-01 19:21:48 -04:00
Denis Pauk 8d8034f244 files/light: rework R_BuildLightMap code 2024-09-02 00:31:31 +03:00
Denis Pauk eb3ea06fc9 pcx: make palette marker optional 2024-08-31 16:13:33 +03:00
Denis Pauk a2536cc735 pcx: make palette marker optional 2024-08-31 13:18:00 +03:00
Jaime Moreira b00e925d47 Refactored obtaining the renderer used
...in videomenu code. Now it allows to use switch statements, to
avoid the execution of paths not meant for certain renderers.
2024-08-30 00:48:24 -04:00
Jaime Moreira 13deb72b16 Flick Stick refactor
Removed redundant calculations
2024-08-29 15:44:34 -04:00
Denis Pauk a7cb9431b3 client: Fix filesystem memory leaks 2024-08-28 00:45:02 +03:00
Denis Pauk b3efe338c1 client: Fix memory leaks 2024-08-28 00:40:06 +03:00
Denis Pauk 04aec20891 gl1, gl3: use GL_LIGHTMAP_FORMAT intead internal_format
value is never changed, so replace should be safe.
2024-08-27 23:47:27 +03:00
Denis Pauk 758961a848 maps: fix in load n64jam_doomshakalaka
Checks entid is bigger than maximum number of entities.

https://www.moddb.com/games/quake-2/addons/quake-2-re-release-n64-sp-map-jam
2024-08-27 23:22:51 +03:00
Jaime Moreira f839596168 SDL3 nomenclature: "game controller" to "gamepad"
Changes are mostly visual; many elements are still referred as "controller"
in backend, to maintain parity with SDL2.
2024-08-27 13:13:24 -04:00
Jaime Moreira 15f9d35d39 Default button for 'Esc' in gamepad is now Start 2024-08-27 13:10:25 -04:00
Jaime Moreira 68973b6ae7 Flick Stick fixed duration to 0.1 seconds
Formerly, there were "6 frames" with a precalculated change factor on each frame.
This allowed to use Flick Stick exclusively on vsync 60 Hz screens only (6 *
16.6 ms = 100 ms). By using any other refresh rate, or just disabling vsync,
these 6 frames could take any time, normally much less than the intended 100 ms.
Now delta time is used to calculate the angle change on each frame displayed,
so the entire flick duration remains at 100 ms, independent of refresh rate.
2024-08-27 13:05:44 -04:00
Jaime Moreira 4756c44155 PCX_Decode warning demoted to "developer only"
"(Texture.pcx) file has possible size issues" will only appear when `developer 1`.
It might get annoying on properly working mods.
2024-08-27 13:04:00 -04:00
Denis Pauk 33ebf6c193 vk: replace index buffer after new frame only 2024-08-27 01:22:31 +03:00
Denis Pauk 10ee6eace3 vk: Create more image semaphores that command buffers used.
Mostly workaround for vkAcquireNextImageKHR errors,
Create more cmdbuffers with slow vulkan implementation could produce
issues when old cmdbuffer is not finished but need to resize dynamic buffer.

Based on
```
Added additional image ready semaphore - this addresses validation errors
when calling vkAcquireNextImageKHR() which started appearing in SDK 1.3.275
```
88009a6149
2024-08-26 15:47:56 +03:00
Denis Pauk ed3d760840 vk: force render all calls before change viewport 2024-08-25 23:40:04 +03:00
Denis Pauk 131164748e maps: fix in load n64jam_doomshakalaka
https://www.moddb.com/games/quake-2/addons/quake-2-re-release-n64-sp-map-jam
2024-08-25 19:20:18 +03:00
Denis Pauk b685aa4683 vk: force clean up vertex push constants 2024-08-25 17:43:44 +03:00
Denis Pauk 833932ce44 vk: use static index buffer for merged tex calls 2024-08-25 17:12:49 +03:00
Denis Pauk 1a760004d8 vk: merge QVk_DrawTexRect calls 2024-08-25 15:49:14 +03:00
Denis Pauk a06ef9aa4a vk: merge QVk_DrawColorRect calls 2024-08-25 15:00:12 +03:00
Denis Pauk d9da999bcd vk: get rid vk_colorRectVbo usage 2024-08-25 14:09:53 +03:00