Commit graph

681 commits

Author SHA1 Message Date
heinrich5991 bb3bd57c0e
Merge pull request #7683 from Learath2/dd_pr_curlmultifinal
Use curl-multi. Supersedes #5842
2024-01-15 21:54:24 +00:00
Alexander Akulich c56960728d CMake: Re-configure the project on version.h changed 2024-01-13 07:46:29 +03:00
Corantin H 3c9294321e Fix crash on editor autosave
Add system method `timestamp_from_str` and add tests.
Replace `int64_t` with `time_t` to be more consistent.
2024-01-02 23:38:41 +01:00
Corantin H ffd7776147 Add cursor types and use resize cursor for dragbars 2023-12-28 18:35:23 +01:00
Learath 1dc8496470 Use curl-multi 2023-12-18 20:06:43 +01:00
Robert Müller 013b8dffa5 Add INotifications kernel interface
Add a proper kernel interface `INotifications` for the notifications component instead of using a C style interface.

Add parameter for the application name when initializing notifications to avoid hardcoding the application name.

The implementation for macOS is kept in Objective-C and a TODO is added, as the API we are currently using appears to be deprecated.
2023-12-16 18:15:43 +01:00
heinrich5991 9a1644982e Remove ddnet.appdata.xml
It was outdated already.

Fixes #7607.
2023-12-13 11:58:29 +01:00
heinrich5991 05af24a052 Make less headers depend on <base/system.h>
Move a couple of trivial type definitions to `<base/types.h>` instead.
2023-12-11 23:52:23 +01:00
Corantin H 96e4c5f7cd Add editor undo/redo feature 2023-12-04 22:44:20 +01:00
furo 2cb948a57b Add finish info messages. 2023-11-26 17:29:40 +01:00
Robert Müller 42b952bc6c Move config variables to config_variables.h, remove variables.h
The contents of `variables.h` are moved to `config_variables.h` instead of being included with the preprocessor. The file `variables.h` is removed, so all config variables can be found in a single file instead of being spread over two files without any clear structure. The original declaration order of config variables is preserved. The unnecessary header guard `GAME_VARIABLES_H` from `variables.h` is removed, as the comment `// This file can be included several times.` already serves the same purpose of silencing the header guard check.

A comment is added at the end of `config_variables.h` to mark the location where modders should ideally declare all of their own config variables to avoid merge conflicts with us in the future.

Closes #7472.
2023-11-25 16:40:55 +01:00
heinrich5991 d4713cbfe2
Merge pull request #7475 from ChillerDragon/pr_gametype_mod
Add sv_gametype and sample mod
2023-11-19 03:07:24 +00:00
ChillerDragon becffb9377 Add sv_gametype and sample mod 2023-11-19 03:00:21 +01:00
Chairn 6e629e1deb Type safe mem_zero function (fixes #5228)
Partially replaces #5690.
POD types are just memset. Other types are either destructed if not
trivial and/or constructed if not trivial. Types need to have a default
constructor.
Virtual classes can be mem_zeroed only if they already have been
constructed, otherwise it is UB.
2023-11-18 22:47:22 +01:00
Dennis Felsing d716210e31
Merge pull request #7408 from Jupeyy/pr_tile_border_shader
Switch to a fragment shader solution for border tile rendering
2023-11-11 23:02:34 +00:00
Robert Müller 3d858c28ee Add CLock wrapper for std::mutex to replace lock_* functions
Replace usages of platform specific `lock_*` functions with `std::mutex` through the wrapper class `CLock`. Move lock classes to `base/lock.h`.

The `CLock` wrapper class is only necessary because the clang thread-safety attributes are not available for `std::mutex` except when explicitly using libc++.
2023-11-11 00:04:57 +01:00
Robert Müller 859727c1d3 Fix inaccurate envelope point value rounding
Round to nearest integer instead of truncating in `f2fx` to ensure correct round-trip with `fx2f`.

Add test to ensure correct round-trip with maximum `0.0005f` absolute error.
2023-11-10 19:11:10 +01:00
Jupeyy 639a8c3c8b Switch to a fragment shader solution for border tile rendering 2023-11-04 14:51:39 +01:00
Alexander Akulich 80a4ad5293 CMake: Filter out project patch version == '0' 2023-11-03 21:33:49 +03:00
dobrykafe ec0380e683 fix requested changes 2023-10-25 21:35:26 +02:00
dobrykafe 579005b98a add new tool demo_extract_chat 2023-10-25 16:03:24 +02:00
Robert Müller f8af7542c6 Move CHostLookup to separate compilation unit
The host lookup job and the engine interface are independent so they are moved to separate files.

The include of `engine.h` in `client.h` is therefore unnecessary and other includes also had to be adjusted because of this.

The variable `m_VersionServeraddr` is unused and therefore removed. The host lookup job is currently not used on the client-side.
2023-10-22 13:38:35 +02:00
Robert Müller 912355f9ec Move CSmoothTime class to separate compilation unit 2023-10-17 20:23:07 +02:00
Robert Müller ee51cac9e6 Move CGraph class to separate compilation unit 2023-10-17 20:22:48 +02:00
Robert Müller d9a7df0f92 Add tests and documentation for swap_endian function 2023-10-14 13:29:24 +02:00
Dennis Felsing 60fa51ff13
Merge pull request #7309 from infclass/kaffeine/merge-client-data-structs
Extract client 'six' data types and use them for 'seven' data
2023-10-10 21:55:55 +00:00
Robert Müller 093edb7803
Merge pull request #7308 from Marmare314/add-editor-object
Add `CEditorObject` class
2023-10-07 10:26:28 +00:00
marmare314 719b2bdadd add editor object class
This class is slightly more light-weight than a CEditorComponent
and its naming makes it more natural to inherit for envelope points,
proof-mode positions etc.
2023-10-07 00:46:47 +02:00
Alexander Akulich 418d8ae73d CMake: Fix overriding 2023-10-06 19:07:53 +03:00
Alexander Akulich abb1d4d18c CMake: Cleanup CMake pre-3.0 support code 2023-10-06 19:07:36 +03:00
Alexander Akulich 26b4a41c03 Extract 'six' content data structs to their own file 2023-10-06 18:14:15 +03:00
marmare314 073f208808 split implementations from CEnvelope class 2023-10-06 00:32:12 +02:00
marmare314 1bd3e65c2a extract CEnvelope into seperate header 2023-10-05 22:42:24 +02:00
marmare314 d400687876 extract editor layers into seperate headers 2023-10-02 23:07:08 +02:00
Dennis Felsing 971fa6d024
Merge pull request #7186 from infclass/for-ddnet2
CMake: Revert versioning (move it back to version.h)
2023-09-17 14:51:47 +00:00
Alexander Akulich 11a16f553f CMake: Revert versioning (move it back to version.h) 2023-09-16 12:48:36 +03:00
Dennis Felsing 15bdef32a1
Merge pull request #7136 from infclass/for-ddnet2
Refactor some core classes (step 1/xxx to shared CGameWorld)
2023-09-15 22:34:53 +00:00
Alexander Akulich a1b7e0c37c Move alloc.h to game/ and use it in client/prediction/entity.h 2023-09-15 18:04:29 +03:00
Alexander Akulich 96af62c3fd CMake: Change the net versioning
Set DDNET_VERSION_NUMBER from DDNET_NETWORK_VERSION no matter what VERSION is.
Provide get_network_version_number() which parses version to network version.
2023-09-15 01:58:11 +03:00
Jupeyy f25773243f
Merge pull request #7150 from heinrich5991/pr_ddnet_cmakelists_add_in_h
Revert "`.h.in` aren't compiled"
2023-09-12 19:07:53 +00:00
Alexander Akulich 6b78013a13 CMake: Set package version to the project version
Setting the version to VERSION didn't allow to override the project()
name and version.
2023-09-09 00:26:25 +03:00
Alexander Akulich 1074a5ff56 CMake: Use DDNet_VERSION to construct DDNET_VERSION_NUMBER 2023-09-08 23:13:00 +03:00
heinrich5991 237c2eba35 Revert ".h.in aren't compiled"
This allows the version.h.in file to show up in IDEs.

This reverts commit db5f28e65a.
2023-09-08 16:21:52 +02:00
heinrich5991 cebc472cbe Remove C-only compiler flag
We don't have any own C source files anymore.
2023-09-08 11:08:52 +02:00
heinrich5991 db5f28e65a .h.in aren't compiled 2023-09-08 11:05:51 +02:00
Alexander Akulich 0cea5b0120 CMake: Remove the code for old CMake versions 2023-09-08 00:10:48 +03:00
Alexander Akulich f6172a2ec4 CMake: Add version range validation 2023-09-08 00:10:48 +03:00
Alexander Akulich d0ecb5f8dd CMake: Rework the versioning 2023-09-08 00:10:48 +03:00
Alexander Akulich 225b175889 CMake: Set the minimum CMake version to 3.12
In fact this version is required after 00a0e0e723
(FindPython3 added in 3.12)
2023-09-08 00:10:48 +03:00
Robert Müller 16bc489afb Move editor automap .rules files to separate subfolder
For better organization of the `data/editor` folder.
2023-09-02 11:41:46 +02:00