Commit graph

3627 commits

Author SHA1 Message Date
Denis Pauk
538aadb9dc Fix sound characteristics calculations
Ogg file has incorrectly calculated size and samples as
result calculation of volume and timings have used
incorrect test samples for sterio sound.

Checked with compare ogg and wav samples from 25th
Anniversary mod:
```
ffmpeg -i 25acu/sound/world/goreshit.wav 25acu/sound/world/goreshit-ogg.wav
```

Soundlist:
```
]/soundlist
 (16b)  1404340(2 ch) world/goreshit.wav -11.7 dB 351.1s:15.0..0.3..1.1..2.0
 (16b)  1404340(2 ch) world/goreshit-ogg.wav -11.5 dB 351.1s:15.0..18.4..1.4..2.0
```

Fixes:
* https://github.com/glhrmfrts/q25_game/issues/8
* https://github.com/yquake2/yquake2/issues/991
2023-04-14 18:22:12 +03:00
Jaime Moreira
61df6a74d5 Gyro aiming for Switch controllers on SDL < 2.0.14
dkms-hid-nintendo can expose the IMU sensors of a Switch controller
as a "second joystick", which makes possible to use gyro aiming on a
system without SDL 2.0.14 available (the minimum required to read
controller sensors like gyro and accelerometer).

This commit makes both "sensor" and "joystick reading" to coexist.
"Sensor" is still the preferred method when available.
2023-03-28 23:06:34 -03:00
apartfromtime
f96deee197 Playback Features
Playback features outlined in issue #729.

Added shuffle playback parameters:

default - Ogg track currently active repeats. This is the quake2 default behaviour.
play once - Ogg track currently active plays once then stops.
sequential - Ogg tracks play in numerical order, from the currently playing track and like default repeats.
random - Ogg tracks play randomly, but never the same track twice.

Ogg tracks can be played from a full-screen console and tracks played will adhere to the shuffle parameter.

Loading a game map the map cd-track takes precedence as the first played track then subsequent playback of tracks will adhere to the shuffle parameter.

Any currently playing track can be overridden from the console with "ogg play <track>" command and subsequent playback of tracks will adhere to the shuffle parameter.

If a sound restart occurs the ogg backend will attempt to save and recover the currently playing track, though some data in the audio queue may be lost in the process.
2023-03-26 14:43:28 +11:00
Daniel Gibson
c2d80c64ee Fix crash in DDays "wake" map, #978
the HunkAlloc size calculated in calTexinfoAndFacesSize() was too
small because that map has a *massive* water poly.
Unfortunately it's not feasible to calculate the correct size
(it depends on the size of the poly, for which I'd need the vertex
coordinates, but to get them I'd have to load them first, which requires
the allocation...), but allocating 5MB extra (instead of 1) made it work
2023-03-25 19:18:35 +01:00
Yamagi
373164bebc
Merge pull request #980 from devnexen/keyboard_warning_build_fix
console fix warning build.
2023-03-25 17:10:06 +01:00
David CARLIER
038848b246 console fix warning build. 2023-03-17 17:17:32 +00:00
Yamagi
6faa03a59d
Merge pull request #977 from devnexen/curl_client_type_fix
CURL client fix on error with CURLMcode.
2023-03-11 20:40:13 +01:00
Yamagi
e91851a939
Merge pull request #975 from devnexen/cmake_build_fox
cmake build fix adding missing compilation unit.
2023-03-11 20:39:56 +01:00
David CARLIER
5adf5175c4 CURL client fix on error with CURLMcode. 2023-03-11 15:02:59 +00:00
David Carlier
7775257121 cmake build fix adding missing compilation unit. 2023-02-16 19:35:27 +00:00
Yamagi
3fe9630ed7
Merge pull request #972 from 0lvin/reverb_fix
openal: Fix reverb slot configuration
2023-02-06 18:46:31 +01:00
Denis Pauk
6c9c81e2f7 openal: Fix reverb slot configuration 2023-02-05 16:19:38 +02:00
Yamagi
74bb325deb
Merge pull request #970 from devnexen/silent_analyzers
silencing static analysis warnings.
2023-02-04 17:42:37 +01:00
Yamagi
6c6aa62032
Merge pull request #968 from devnexen/riscv_build_fix
cpu pause instruction for RISV-64 compatible gcc/clang.
2023-02-04 17:41:09 +01:00
Daniel Gibson
d3f748c03a Fix special case in filesystem when game is reset to baseq2, #969
When running a mod/addon and then switching back to baseq2,
FS_BuildGameSpecificSearchPath() is called and sets fs_gamedir
(amongst other things). Unfortunately it used fs_baseSearchPaths->path
to set it, and in the -portable case, the top base search path is
pak2.pak, i.e. not a normal directory, so fs_baseSearchPaths->path is ""
and fs_gamedir is set to "" => later Sys_Mkdir(fs_gamedir) fails.

Now fs_gamedir is set to the correct directory, based on fs_rawPath
2023-02-04 17:38:35 +01:00
David Carlier
2e51a9f72f silencing static analysis warnings. 2023-01-31 06:47:04 +00:00
David Carlier
a5ee9c9d4f cpu pause instruction for RISV-64 compatible gcc/clang. 2023-01-22 21:00:04 +00:00
Yamagi
2e939b10e9
Merge pull request #932 from 0lvin/shared_models_logic
Shared models logic
2023-01-21 18:07:54 +01:00
Denis Pauk
16395a15d9 Fix m32 load code 2023-01-21 18:31:18 +02:00
Denis Pauk
0cd2eed28b Share R_CullBox and R_SetFrustum 2023-01-21 18:31:16 +02:00
Denis Pauk
32ab1e1815 Share R_MarkLights 2023-01-21 18:24:55 +02:00
Denis Pauk
d326b1be51 Share R_AreaVisible 2023-01-21 18:24:55 +02:00
Denis Pauk
c17210b34a Share R_TextureAnimation 2023-01-21 18:24:55 +02:00
Denis Pauk
42bfb2014c Share Mod_PointInLeaf 2023-01-21 18:24:55 +02:00
Denis Pauk
442fe10f27 Share Mod_Load* functions 2023-01-21 18:24:55 +02:00
Denis Pauk
4463e1fcd7 Share mnode_t and mleaf_t struct between renders. 2023-01-21 18:24:55 +02:00
Yamagi
54949d59ce
Merge pull request #960 from DanielGibson/cmake-msvc
Fix build with VisualC++'s internal CMake
2023-01-21 16:55:46 +01:00
Yamagi
6566a2ae7d Handle case that ResizeSTB() failed.
This unlikely, however the compiler printed a warning that `image` may
be used uninitialized.
2023-01-21 16:43:27 +01:00
Yamagi
e17d4f5dc0 Solve warning regarding deprecated curl macros.
These are deprecated since curl 7.31 and 7.50. Even Debian Stretch
(oldoldstable) ships with 7.52.
2023-01-21 16:31:02 +01:00
Yamagi
548b7ff37f Implement gl_polyblend for GL3.
Closes #965.
2023-01-21 16:24:02 +01:00
Yamagi
c5c2af0320 Rename gl1_polyblend to gl_polyblend.
An upcoming commit will implement it for GL3.
2023-01-21 16:19:18 +01:00
Yamagi
c48ff63b50
Merge pull request #957 from SirYodaJedi/master
Change icon color to teal
2023-01-21 15:24:59 +01:00
Yamagi
fac2313774
Merge pull request #955 from devnexen/fix_windows_hidden
introduces a new cl_unpaused_scvis cvar to unpause the cli.
2023-01-21 15:16:14 +01:00
Yamagi
a3d45fef19
Merge pull request #948 from HAMM3REXTREME/patch-1
Seperated mapfixes text from monster footstep text
2023-01-21 15:15:28 +01:00
Daniel Gibson
651503d48a Fix build with VisualC++'s internal CMake
.. which doesn't set CMAKE_GENERATOR_PLATFORM

so set YQ2ARCH in src/common/header/common.h when building with MSVC
2023-01-16 06:02:26 +01:00
HAMM3REXTREME
b6e5518049
Update 020_installation.md 2023-01-15 01:24:54 -05:00
SirYodaJedi
8163324b8f Quake2.ico - change to teal to improve visibility 2023-01-09 15:02:40 -05:00
SirYodaJedi
712600c931 Quake2.png - change to teal to improve visibility 2023-01-09 14:59:08 -05:00
Yui
21847b8d21
Quake2.svg - change to teal to improve visibility 2023-01-09 14:57:59 -05:00
David Carlier
f394209c75 introduces a new cl_unpaused_scvis cvar to unpause the cli. 2023-01-08 10:14:09 +00:00
Yamagi
6c18d819d3
Merge pull request #947 from devnexen/sound_pause_option
Introduces new cvar cl_audiopaused to control if the audio loop
2023-01-08 10:45:55 +01:00
Yamagi
502bd78c31
Merge pull request #944 from 0lvin/haptic_feedback
Restore haptic feedback functionality.
2023-01-08 10:43:47 +01:00
David Carlier
7616880b96 Introduces new cvar cl_audiopaused to control if the audio loop
ought to go on or not when the game pauses.
2023-01-07 20:16:24 +00:00
Denis Pauk
02358e2457 Add joy_haptic_filter description 2023-01-07 21:47:21 +02:00
Denis Pauk
633c50177a Haptic: Fix comments 2023-01-07 21:30:21 +02:00
Denis Pauk
4e36b66654 Add joy_haptic_distance cvar.
Haptic maximum effect distance value, By default this cvar is `100.0`.
Any positive value is valid. E.g. effect of shot near barrel to barrel
has 58 points.
2023-01-07 21:30:21 +02:00
Denis Pauk
e1aed62201 Haptic code cleanup 2023-01-07 21:30:21 +02:00
Denis Pauk
1c4dae7c87 Haptic: Add sound filtering by string
filters are separated by spaces with '*' support,
and '!' for apply opposite decision.
2023-01-07 21:30:21 +02:00
Denis Pauk
37344b5330 Haptic: skip clean of slots without configured haptic 2023-01-07 21:30:21 +02:00
Denis Pauk
db83143b47 haptic: reuse old slots and left some slots for rumble on error 2023-01-07 21:30:21 +02:00