Commit graph

1277 commits

Author SHA1 Message Date
Daniel Richard G.
eab11c247c Add nominal support for LoongArch64 and RISC-V 64
Fixes #6584, #6834
2026-03-23 08:20:10 +01:00
Ralph Sennhauser
ba4ef61c15
Use cpp-httplib instead of mongoose
Use cpp-httplib for Profiler2 and RLInterface instead of mongoose.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-01-24 10:45:48 +01:00
Itms
866d6f0527
Add an engine "compatible" version
When a patch version is released, it must declare compatibility with the
previous patch versions of the same main release. This allows players to
keep replaying their games and to keep playing online with users of
other patches of the same main release.

This should have anticipated for dae7a8c394
2025-10-26 09:16:46 +01:00
Vladislav Belov
cb58116270
Fixes lseek for big files on Windows
It was broken in ef69c37f66, before that we were using _lseeki64.

Fixes #8459
2025-10-25 13:35:59 +02:00
phosit
019374d5c7
Bump copyright year for windows build 2025-10-15 12:36:00 +02:00
Ralph Sennhauser
e22c5bd05e
Fix some includes in atlas
Make include-what-you-use happy with some files in source/tools/atlas
and fix what needs to be fixed.

Update premake script to include missing deps and drop various extra
paths for simplification.

Don't always include wx/wx.h via precompiled.h in case PCH is disabled.

Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-08-21 14:18:38 +02:00
Ralph Sennhauser
5b5f678e3f
Fix some includes all over the place
Make include-what-you-use happy with some files in source and fix what
needs to be fixed.

Add markers to precompiled.h header includes to avoid
include-what-you-use wanting them to be removed.

Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-08-14 20:15:30 +02:00
Ralph Sennhauser
af3f7acfe7
Explicitly const_cast string literal for C API
The implicit conversion form sting literal to char* for C compatibility
was removed with C++11, seems MSVC caught up with this in C++20.

Use explicit cast instead where needed and change API to const char*
otherwise.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-08-12 20:45:15 +02:00
Itms
03fff3572f Use conforming preprocessor with modern MSVC
https://learn.microsoft.com/en-us/cpp/preprocessor/preprocessor-experimental-overview
2025-08-04 17:35:48 +02:00
Ralph Sennhauser
7dece41990
Fix includes in source/lib
Make include-what-you-use happy with some files in source/lib and fix
what needs to be fixed.

Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-08-03 10:15:37 +02:00
Ralph Sennhauser
aed1570040
Fix some includes in source/ps
Make include-what-you-use happy with some files in source/ps and fix
what needs to be fixed.

Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-07-28 16:59:04 +02:00
phosit
08d8f0f61c Remove UNUSED2
The remaining uses can be changed to `std::ignore`.
Fix #7760
2025-07-28 13:16:37 +02:00
phosit
eb3f0166f8 Prefer [[maybe_unused]] over UNUSED2
`[[maybe_unused]]` is in the C++ standard.
2025-07-28 13:16:37 +02:00
phosit
5be02743fa Don't use UNUSED2 on always unused variables
Not introducing a variable enforces that the variable is not used.
`UNUSED2` on the other hand is used to silence the warning.
2025-07-28 13:16:37 +02:00
Ralph Sennhauser
70b8c6eb52
Prefer standard int types
<cstdint> since C++11 defines all those int types and macros, therefore
drop extra definitions in source/lib.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-07-25 15:53:40 +02:00
Ralph Sennhauser
9c7bbd531f
Fix some includes in source/lib
Make include-what-you-use happy with some files in source/lib and fix
what needs to be fixed.

Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-07-25 07:11:21 +02:00
trompetin17
df7b2fcd2a
Win: include <cctype> for isalpha without PCH
Building the workspace with `--without-pch` fails on MSVC:

    source/lib/sysdep/os/win/acpi.cpp(123): error C3861: 'isalpha':
    identifier not found

The pre-compiled header normally brings in `<cctype>`, but when PCH
generation is disabled the translation unit must include the header
explicitly.

Add the missing `#include <cctype>` to
`source/lib/sysdep/os/win/acpi.cpp`.

No functional change; the code now compiles cleanly with or without PCH.
2025-07-23 09:17:27 -05:00
Stan
ef69c37f66
Add VS2022 support with the v143 toolset 2025-07-23 09:19:29 +02:00
Stan
0d60ecbf96
Remove OS_MAC macro
It hasn't been used in a while, and we shouldn't pretend to support macOS < 10.9.
2025-07-19 18:16:14 +02:00
Ralph Sennhauser
4324dc1447
Fix some includes in source/lib
Make include-what-you-use happy with some files in source/lib and fix
what needs to be fixed.

Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-07-17 20:07:25 +02:00
Ralph Sennhauser
0a78acf4dd
Drop header lib/posix/posix_time.h
Only used for timespec which is in <ctime> since C++17. All other uses
were already obsolete with C++11 so remove the header wrapper.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-07-16 18:28:05 +02:00
Ralph Sennhauser
826dba847c
Make wfilesystem.cpp freestanding
Copy some wtime internals to wfilesystem.cpp with internal linkage only,
this code has had no use outside of wfilesystem and was only added to
wtime in case other use cases could be found. This will allow removing
posix_time and affiliated code.

wfilesystem will become obsolete with the move to <filesystem>

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-07-16 18:28:05 +02:00
Ralph Sennhauser
a03268ebae
Drop header lib/posix/posix_errno.h
Does only include <errno.h> with the exception on Windows but only if
not using MSVC and even then depends on whether boost is included first
or not.

Use <cerrno> which was added in C++11 and is based of of Posix instead
of a particular cerrno.h of a particular C library.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-07-15 19:42:34 +02:00
Ralph Sennhauser
ad3f6e3119
Dissolve external_libraries/openal.h
This header was used to overcome macos openal vs openal-soft header name
difference, for the migration to openal 1.1 and to pass arguments to the
linker on windows in the past. None of this is used anymore so dissolve
the header.

Also fix related headers so one can run include-what-you-use on the
changed files.

Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-07-08 19:33:36 +02:00
phosit
891908b801 Remove UNUSED
The `UNUSED` macro is used to mark a variable as unused but with a name.
Those usages are replaced with comments so that `UNUSED` can be removed.

https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-unused
2025-06-26 17:25:05 +02:00
phosit
11b92f784f Decrease interval of hotload check on mac
There are 8 hotloads in the tests. When each takes 1 second that adds 8
seconds to the tests. Decrease the interval value to an acceptable
number.
2025-06-18 14:42:13 +02:00
Stan
85bb494c17 Catch more file changes on mac 2025-06-18 14:42:13 +02:00
Stan
2a47bbf096 Use a mutex to syncronize g_QueuedDirs
`g_QueuedDirs is accessed by multiple threads. It has to be syncronized.
2025-06-18 14:42:13 +02:00
phosit
d9795d29fe Remove the name of some unused arguments
Remove some usage of the `UNUSED` macro. Remove only those cases where
the names can be deduced from their type.

https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-unused
2025-06-18 12:49:59 +02:00
Ralph Sennhauser
58219b974c
Fix trailing whitespace and add pre-commit hook
Some have their editor configured to remove trailing whitespace and
editing such a file would "fix" it, adding an unrelated change.

Fix whitespace violations excluding third party libs and generated files
like glad or patches.

Enable pre-commit hook trailing-whitespace to enforce it in the future.

Fixes: #8016
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-06-15 20:08:48 +02:00
Ralph Sennhauser
a8e0e50ae5
Use Bit instead of BIT
The BIT macro is compile time only anyway. Takes care of the warning
"C4334 - <<': result of 32-bit shift implicitly converted to 64 bits".

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-06-01 20:51:39 +02:00
Vladislav Belov
b0160d0ece
Adds 64bits support. 2025-04-26 20:53:09 +02:00
Itms
c2d3595777
Remove LCC compiler defines 2025-03-25 12:30:01 +01:00
Itms
8f43dd53fc
Remove ICC code paths 2025-03-25 12:29:51 +01:00
Ralph Sennhauser
82ff0ea90b
Remove CONFIG_ENABLE_BOOST
Code within CONFIG_ENABLE_BOOST is required to compile pyrogenesis.

As boost is required in many other places, making it truly optional in
the one case where there is currently a guard is meaningless.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-02-14 20:35:04 +01:00
phosit
b41ca5ad78 Replace FALLTHROUGH by the standard attribute 2025-01-29 19:34:12 +01:00
Itms
2482ecf9fe
Sign and notarize macOS bundles 2025-01-03 17:05:15 +01:00
Vladislav Belov
c7ae248b77 Removes duplicated manifest for Windows. 2024-12-16 23:07:37 +01:00
Stan
7b195d6a5d
Add compatibility mode detection for Windows 2024-12-14 13:47:10 +01:00
Ralph Sennhauser
ead62bba78
Update trac links with gitea links
This replaces all links pointing to trac with their corresponding links
to gitea. Also replace http with https while at it.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-12-10 11:29:48 +01:00
Stan
1a216cb848
Fix compilation on other platforms after 67464ebbaa 2024-11-03 10:57:11 +01:00
Stan
6d12d25348
Replace usage of OSString().c_str() by OSString
Fixes #6604
2024-10-28 16:35:49 +01:00
Stan
67464ebbaa
Fix the CPU name detection on AARCH64 macOS 2024-09-25 23:34:43 +02:00
Itms
86a4092e55 Remove platform-dependant atomic operations 2024-09-25 21:57:15 +02:00
Itms
e7434e1770 Use std::atomic instead of platform-dependant code
This covers atomic add operations and atomic compare-and-switch
operations.
2024-09-25 21:57:15 +02:00
Itms
e401b206d0 Remove TIMER_ACCRUE_ATOMIC
Added in aa44bac652, the "atomic" accumulated timer is based on a
structure that mixes atomic and non-atomic access, which is not fit to
be converted to std::atomic.

Additionally, it is only used in a single situation where benchmarking
is not essential to us.
2024-09-25 21:57:15 +02:00
Stan
028ec40165
Add a RC file to add metadata to the pyrogenesis executable 2024-08-28 23:37:36 +02:00
Ralph Sennhauser
a44dd59a0c Add some missing headers
When running clang-format which reorders headers, those are the ones
that came up as missing.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-08-24 12:19:52 +02:00
vladislavbelov
ffc4a56b9f Revert non-ASCII characters from source and configuration files introduced in 157c6af18e.
Fixes #6846

Differential Revision: https://code.wildfiregames.com/D5185
This was SVN commit r27965.
2023-12-03 00:30:12 +00:00
vladislavbelov
82bf9bb902 Removes WInit module completely. Refs #2611
Comments By: phosit
Differential Revision: https://code.wildfiregames.com/D5085
This was SVN commit r27810.
2023-08-22 17:59:01 +00:00