Commit graph

116 commits

Author SHA1 Message Date
Eidolon
94ef03dcd2 Add cpptrace in I_Error on windows, minidumps, stricter warnings, optimized drawers in debug 2025-09-25 16:08:09 -05:00
Eidolon
6fc6e8336c Merge public master 2025-03-09 21:00:08 -05:00
Logan Aerl Arias
d0e1dfe526 merge changes to make vcpkg caches smaller 2025-03-10 01:39:35 +00:00
Eidolon
22b20b5877 Add netgame voice chat
Implemented using libopus for the Opus codec, same as is used in Discord.
This adds the following cvars:

- `voice_chat` On/Off, triggers self-deafen state on server via weaponprefs
- `voice_mode` Activity/PTT
- `voice_selfmute` On/Off, triggers self-mute state on server via weaponprefs
- `voice_inputamp` -30 to 30, scales input by value in decibels
- `voice_activationthreshold` -30 to 0, if any peak in a frame is higher, activates voice
- `voice_loopback` On/Off, plays back local transcoded voice
- `voice_proximity` On/Off, enables proximity effects for server
- `voice_distanceattenuation_distance` distance in fracunits to scale voice volume over
- `voice_distanceattenuation_factor` distance in logarithmic factor to scale voice volume by distance to. e.g. 0.5 for "half as loud" at or above max distance
- `voice_stereopanning_factor` at 1.0, player voices are panned to left or right speaker, scaling to no effect at 0.0
- `voice_concurrentattenuation_factor` the logarithmic factor to attenuate player voices with concurrent speakers
- `voice_concurrentattenuation_min` the minimum concurrent speakers before global concurrent speaker attenuation
- `voice_concurrentattenuation_max` the maximum concurrent speakers for full global concurrent speaker attenuation
- `voice_servermute` whether voice chat is enabled on this server. visible from MS via bitflag
- `voicevolume` local volume of all voice playback

A Voice Options menu is added with a subset of these options, and Server Options has server mute.
2024-12-13 17:12:14 -06:00
Eidolon
e42b5c2cbf Always make debuglink .debug in CI 2024-05-16 15:42:04 -05:00
Eidolon
798d653c5b Substitute some unsafe chars for revision name
This ensures that the build system won't output something like
ringracers_rr/master.exe, among other potential issues.
2024-05-14 19:32:05 -05:00
Eidolon
67ee82e1a7 Check if -mno-ms-bitfields is avail before using 2024-04-27 21:35:48 -05:00
Hanicef
99550f97bd Fix FreeBSD build 2024-04-27 16:42:08 +02:00
Eidolon
140a56f513 Add build option to disable discord RPC 2024-04-25 21:05:58 -05:00
James R
3eba2cf60d CMakeLists.txt: use libfmt from thirdparty/fmt
Now compiles on Ubuntu 22.04, which only has libfmt 8.
I don't know which exact version of libfmt we need but the
one in thirdparty works.

This version of libfmt is header-only.
2024-04-14 00:24:40 -07:00
Eidolon
640ad6bc1e Remove GME VGM music emulation
We cannot comply with the terms of the GPL in using and distributing
libgme due to MAME license incompatibility, so the feature needs to
be removed.
2024-01-29 15:54:20 -06:00
James R.
bf1e4cb5bc Merge branch 'vscode-faster-pls' into 'master'
Add cmake option to skip comptime update

See merge request KartKrew/Kart!1881
2024-01-29 05:10:44 +00:00
Eidolon
0e307208f8 Add cmake option to skip comptime update
In VS Code, comptime forces the game to be relinked even when no code
has changed. This is a bit of a nuisance when starting with the
debugger in the C++ extension, adding around 5 seconds of startup time
to the game.
2024-01-28 14:54:28 -06:00
Eidolon
090a012a74 cmake: exe name fallback if no .git present
Fixes KartKrew/Kart#895
2024-01-28 11:39:56 -06:00
SteelT
578d038b1a cmake: Set GIT_EXECUTABLE before add_subdirectory(src)
This fixes the build info not being set for my own builds.
2023-12-23 00:26:42 -05:00
Eidolon
2433d37d44 Switch from CPM to vcpkg 2023-12-15 02:49:15 +00:00
toaster
d3d548ea36 Copypaste error 2023-09-27 00:44:21 +01:00
toaster
47fe8bb9b1 Move SRB2_CONFIG_DEV_BUILD and SRB2_CONFIG_TESTERS to the root directory CMakeLists.txt
Repairs the pre-CMake functionality of TESTERS builds having the format `ringracers_branch-name_TESTERS.exe`
2023-09-26 23:59:14 +01:00
Eidolon
e9d789abc9 Add Tracy client library and build preset 2023-09-18 16:13:19 -05:00
SteelT
dbe80ab3a2 Update Catch2 to latest version
Fixes build errors related to it
2023-08-20 19:43:05 -04:00
James R
9e59bd6d67 cmake: add SRB2_CONFIG_ASAN, enable AddressSanitizer 2023-04-22 18:35:22 -07:00
James R
18287e2ed4 cmake: always build libgme, even if SRB2_CONFIG_SYSTEM_LIBRARIES 2023-03-30 23:44:53 -07:00
SteelT
de00dd15fc Fix building errors with webm, catch missing SRB2_CONFIG_ENABLE_WEBM_MOVIES condition 2023-02-28 21:49:24 -05:00
Eidolon
11fecebc47 Make AVRecorder WebM an optional part of the build 2023-02-26 20:18:05 -06:00
James R
61198a46e7 Add libvorbis (and ogg) dependency 2023-02-24 19:20:43 -08:00
James R
3741ab1c91 Add libwebm, libvpx, libyuv dependencies
Libvpx is built with configure script and make.
Unfortunate but the configure script is very dense and I'm
not sure if it's worth translating into CMake, since it
apparently does CPU detection for optimizations.
2023-02-24 19:20:43 -08:00
Eidolon
b95fd459b9 cmake: Remove SDL2_mixer and OpenMPT
Libraries superceded by libxmp-lite and new mixer.
2023-01-04 16:51:12 -06:00
Eidolon
19c5711092 cmake: build discord-rpc internally 2023-01-01 14:50:52 -06:00
James R
cff0def2a4 cmake: reconfigure if git HEAD changes 2022-12-27 00:59:29 -08:00
Sally Coolatta
38d8281a6b Merge branch 'master' into cmake-sources 2022-12-15 19:54:59 -05:00
Eidolon
5139d1276b cmake: Add Catch2 unit testing 2022-12-12 16:31:45 -06:00
James R
ef442e06b7 cmake: let SRB2_SDL2_EXE_NAME override git branch
SRB2_SDL2_EXE_NAME is now "" by default. Internally
defaults to ringracers.
2022-11-28 22:02:33 -08:00
James R
07c30a20c2 Move all sources into CMakeLists.txt
Changing Sourcefile did not automatically update the CMake
cache.
2022-11-28 21:46:43 -08:00
Eidolon
93aaa77de3 cmake: disallow in-source builds 2022-11-27 02:44:11 -08:00
Eidolon
8116edc5a1 cmake: Port misc options from Makefiles
- DEBUGMODE
- MOBJCONSISTANCY
- PACKETDROP
- ZDEBUG
- PROFILEMODE (likely moot, dunno how profiling with cmake works
though)
2022-11-27 02:44:11 -08:00
Eidolon
146344e7de cmake: Port warning configuration from make
Adds SRB2_CONFIG_ERRORMODE to replace ERRORMODE too.
2022-11-27 02:44:11 -08:00
Eidolon
d31037abc9 cmake: Remove asset hashing, CMAKE_ASSETS_DIR
Simplifies build setup for cmake.

# Conflicts:
#	assets/CMakeLists.txt
#	src/config.h.in
#	src/sdl/i_system.c
2022-11-27 02:44:10 -08:00
Eidolon
f0338d22d7 cmake: Use TheLartians' Ccache script on non-Win32
Improves ccache support for Xcode
2022-11-27 02:44:10 -08:00
James R
1dd25181a9 cmake: use SRB2_SDL2_EXE_NAME, append git branch, add SRB2_SDL2_EXE_SUFFIX 2022-11-27 02:44:10 -08:00
Eidolon
0677d59d51 cmake: Build all deps and static link
Overhaul cmake build
2022-11-27 02:44:10 -08:00
Eidolon
d80db6f51d cmake: add COMPVERSION_UNCOMMITTED 2022-10-08 21:19:04 -05:00
Sally Coolatta
98016ef390 Icons + other tweaks to rebranding
Replaced most drrr (mostly only used in system / exe stuff) with the more verbose "ringracers"
2022-05-20 19:42:34 -04:00
Sally Coolatta
852e9b8ce9 Rebrand all console / window stuff 2022-05-19 15:10:47 -04:00
SteelT
0b74476707 Don't make asset hashing be required under dev builds 2021-11-27 21:02:04 -05:00
James R
d5c08ac034 Backport 2021 SRB2 makefile overhaul
This is a squashed commit of the following commits from
upstream:

James R <justsomejames2@gmail.com> on 2021-05-01
Commit 44d217807f71d15bd7ca69dad226458e7060ccab
> Collect makefiles

James R <justsomejames2@gmail.com> on 2021-05-04
Commit f637e28d0c1877c44acd7b01f7130625d5ea4099
> Remove bin, objs and dep directories

James R <justsomejames2@gmail.com> on 2021-05-02
Commit b31056c7d977fe3c2a5e0637589fd9521f1f6c04
> Rewrite Makefile to be modular as well as more automated
>
> Some key points for programmers:
> - Source code files are mostly listed in a 'Sourcefile'.
>   So you no longer directly edit the object list. There
>   can be multiple Sourcefiles and they can even live in
>   subdirectories--the directory name will be prepended to
>   every filename in the list. Of course, the Makefile
>   still needs to be edited to read from each Sourcefile.
> - Different rules are no longer required for source code
>   files that live in subdirectories (such as sdl/ or
>   hardware/). Subdirectories Just Work so go ham!
>
> In addition to those points, another important change is
> that the bin directory is no longer divided into platform
> subdirectories (Linux64, Mingw, etc). Executables now go
> directly into bin. If you use DEBUGMODE or target 64-bit,
> then subdirectories for 'debug' and '64' will be made
> though.
>
> Oh by the way, I don't think make clean actually removed
> files before on Windows. It should now. I also fixed as
> many little inconsistencies like that as I noticed.
>
> And now just an overview of the technical aspects that
> shouldn't affect anyone who doesn't REALLY care about the
> Makefile...
>
> objs and dep directories have been moved to a make
> directory. Makefile.cfg and its variants have been moved
> out of their various subdirectories to src/Makefile.d
> make distclean removes the bin and make directories
> entirely, but make clean and cleandep still only affect
> the current build target.
>
> When I say automation, I mean that a lot of copy pasting
> in the Makefile has been reduced.

James R <justsomejames2@gmail.com> on 2021-05-04
Commit 53d1cbe8264196e46911c86bc4be13d44aa35dfe
> Appveyor: update executable directory

James R <justsomejames2@gmail.com> on 2021-05-04
Commit 888073d64d1885cae0ad8b5d54bfec31e9793e0a
> Fix make clean printing header

James R <justsomejames2@gmail.com> on 2021-05-04
Commit 3d7205d4942d1e1b2627fdf5acf9d9c82437a97b
> Fix minor errors with Windows ECHO, DEL, MD
>
> - Quotes were not removed by ECHO.
> - DEL would print an error on nonexistent file.
> - MD would do this plus return a nonzero exit code.

James R <justsomejames2@gmail.com> on 2021-05-05
Commit f9813844e7f0dfa6229062b1ebd83e4e8150c120
> Update CMakeLists.txt to use Sourcefiles
>
> This establishes (near) parity of source code file lists
> between the Makefile and CMakeLists.txt
>
> To make that change I messed around CMakeLists.txt a bit.
> It now uses target_sources and target_compile_definitions.
> I also removed some MSVC stuff since we don't actually
> care about MSVC--it made things easier.
>
> CMake minimum version 3.0 -> 3.13 for target_sources.

James R <justsomejames2@gmail.com> on 2021-05-05
Commit ec8b63d6759f0c124693ea6d5a521e8d82efd566
> Makefile: remove last of unused flags

James R <justsomejames2@gmail.com> on 2021-05-07
Commit c06817d0085ee77b0027917bca91a24e60c7deba
> Makefile: fix mingw/64 swapped with 32-bit

James R <justsomejames2@gmail.com> on 2021-05-07
Commit 9e7d80c2c44199126fa451c59fca0f98d23ad14d
> Makefile: suppress DEL error

James R <justsomejames2@gmail.com> on 2021-05-07
Commit 87afa7655a71539c7cbc7db12df18c4253187fbc
> CMake: fix ASM compile
>
> - target_sources from correct directory
> - enable_language must be used in add_executable directory

James R <justsomejames2@gmail.com> on 2021-05-08
Commit 210c9419e4bddd1fe8e9be7cb66de31119fa0d68
> Ignore -Wtrigraphs

James R <justsomejames2@gmail.com> on 2021-06-16
Commit 3a044e71cc7cf6c80d9836189511c1a58c108370
> Disable EXE disassembly and compression by default
>
> NOOBJDUMP=1 and NOUPX=1 have been removed. Make 'dump'
> target to disassemble. UPX=upx to compress executable.
>
> Setting UPX used to cause it to fail. That has been fixed.

James R <justsomejames2@gmail.com> on 2021-06-16
Commit c142b3241ddb8f1ea9b5090d20dffa43a17129ab
> Makefile: alert full path of final executable
>
> With added textual contrast.

James R <justsomejames2@gmail.com> on 2021-06-16
Commit b04c79d8a7ba4ae8f888ab94d394b6714699e107
> Say 'at'

James R <justsomejames2@gmail.com> on 2021-06-21
Commit 2d7a8c3c571bcc5335437e9db074c75af00408ce
> Makefile: use shell commands to read in Sourcefile
>
> File function is not supported < Make 4.2.

James R <justsomejames2@gmail.com> on 2021-06-21
Commit d5146945a69ebf30e6fc1fbb64558e456e0b7459
> Makefile: don't automatically set WINDOWSHELL unless PATH matches Windows norms
>
> This is for MSYS2, which requires unix shell commands.

James R <justsomejames2@gmail.com> on 2021-06-22
Commit 5f4d7e3c5b013afe03ae2a441c82ad79bae7c66c
> Makefile: fail if old build directories exist
>
> After a checkout from before revision, old directories
> such as bin/Linux64 only remain if untracked files exist
> within. This may be confusing to the user. They may even
> use an outdated executable if it is one of those untracked
> files.

James R <justsomejames2@gmail.com> on 2021-06-22
Commit c3ad5de912fccfdd64c510f5684883afceaa7d36
> Makefile: let variables be defined on Make line
>
> If a variable is defined as in 'make CC=gcc-10', then that
> definition overrides anything other definition in the
> Makefile.

James R <justsomejames2@gmail.com> on 2021-06-22
Commit ed85e994a46ace07cf022b38a9abac1698a8667e
> Remove misplaced parentheses

James R <justsomejames2@gmail.com> on 2021-06-29
Commit c1ecfa306f6a0b168d4f6cbc3224ebebd4deec51
> Makefile: 'dep' not 'deps'

James R <justsomejames2@gmail.com> on 2021-06-29
Commit 6c03f9b5b3590e01773f05bc1c31cc67a2d88fc2
> fuck

James R <justsomejames2@gmail.com> on 2021-06-29
Commit abdf5c101cbe80657f210c0b90800e2c4c6f0c05
> Makefile: report SHELL

James R <justsomejames2@gmail.com> on 2021-06-29
Commit 22ab611daa17bd23225f3afeeba39147c0d0fe17
> Makefile: do not automatically set WINDOWSHELL
>
> According to this answer--
> https://stackoverflow.com/a/45952425
> --Make will always prefer a unix shell, even on Windows,
> if one can be found in Path. So we can't check PATH to
> determine if it's a Windows shell... this is just too much
> bother.

James R <justsomejames2@gmail.com> on 2021-06-29
Commit f79e0ee540564fcec5da7c0dc4006906492a7f30
> Appveyor: remove 64-bit target

James R <justsomejames2@gmail.com> on 2021-06-29
Commit faee657572f23cd6f8b68c077873e01c4278414e
> Appveyor: update for new Makefile

James R <justsomejames2@gmail.com> on 2021-06-29
Commit 44b82dea58612e6f07830647e2b08555f54a7caa
> Appveyor: remove redundant CFLAGS
>
> Also changed -Wno-error=implicit-fallthrough to
> -Wno-implicit-fallthrough. For some reason Appveyor's
> version of GCC is triggering these warnings despite the
> comments, so just shut it up.

James R <justsomejames2@gmail.com> on 2021-06-29
Commit db919accd22350c087c1fd0e5122d8e490e2f171
> Appveyor: suppress real time file names

James R <justsomejames2@gmail.com> on 2021-07-12
Commit 58fa44e8dc0444eecbe701f31872fad9fa563a6a
> CMP0115

SteelT <steeltitanium1@gmail.com> on 2021-07-16
Commit 71f905f95bd4fe62dbca87208cf71b7309f12de1
> Fix gme support being effectively disabled
>
> I found this easier than trying to adjust the makefile, as it uses the same thing to automatically generate the various NO* compile options.

James R <justsomejames2@gmail.com> on 2021-08-14
Commit 824b1ab28cdddfd1c018454a9af14dabaab49fcd
> Makefile: use full stem in dependency generation
>
> Previously took only the filename, so the directory
> component was stripped. This broke dependencies for
> basically every file.

GoldenTails <milestailsprower101n2@gmail.com> on 2021-08-28
Commit 1a8ec7975c20e1d652cbbdb7a9e366192e41c05f
> Makefile: Improve gcc detection
>
> Wasn't working for me until I fixed it.
> Turns out gcc really doesn't like giving its name out.
> Most of the time it reads argv[0].
2021-11-25 03:56:23 -08:00
lachwright
4cc3816350 CmakeLists.txt (assumes we will add version.h) 2020-08-10 11:15:40 +08:00
Sally Coolatta
e296e1309a YAY, round 2 2020-08-09 21:02:56 -04:00
SteelT
17bccc671d Merge CMakeLists.txt and src/CMakeLists.txt 2020-08-06 01:08:42 -04:00
James R
6efedfc756 Merge remote-tracking branch 'origin/master' into cmake-adjustments 2020-07-12 16:24:24 -07:00
James R
d92afe87a0 Automate VERSION/SUBVERSION; move version related definitions to version.h
CMake support. Srb2win.rc still needs touchy, whatever.
2020-07-10 22:20:33 -07:00