Commit graph

2450 commits

Author SHA1 Message Date
Vladislav Belov
456e2a0b56
Removes dummy GL functions as replaced by core
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
2026-04-25 17:47:06 +02:00
Vladislav Belov
68091177ac
Removes ArrayDeleter 2026-04-10 23:03:00 +02:00
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
phosit
b67faf35c3
Switch main branch to Release 29 2025-12-18 18:16:11 +01:00
phosit
977bf5c0d1
Don't pass the AppHooks as pointer
It's not permitted to pass a nullptr to the `app_hooks_update`. So a
reference should be used.

CppCheck says one shouldn't take pointer to a temporary.
2025-11-20 19:38:33 +01:00
Ralph Sennhauser
16c9795cd1
Remove generic cache
The removal of the VFS cache in 89e339dd16
meant there is no longer a user. As such also clean out the generic
parts with the Landlord and a LRU policies.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-10-31 17:03:34 +01:00
Ralph Sennhauser
eba8439295
Replace boost::filesystem std::filyestem
Bumping the minimum version of macOS to 10.15 for spidermonky [1] also
allows us to use std::filesystem instead of boosts implementation.

[1] f14a98e26f

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-10-29 09:56:32 +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
Itms
50f6da2a13
Use the PYROGENESIS_VERSION macro instead of a global
Reviewed-At: https://gitea.wildfiregames.com/0ad/0ad/pulls/8222
2025-10-26 09:16:44 +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
Vladislav Belov
fb94cc704f
Makes loading terrain textures more smooth 2025-10-13 00:14:45 +02:00
Vladislav Belov
e4de94415e
Removes unused pointer from the allocate function
Also allows to compare ProxyAllocator. For example, it might be
required for containers to compare iterators.
2025-10-12 00:53:10 +02:00
Vladislav Belov
e63c80c613
Reduces string allocations in paths. 2025-10-05 01:31:27 +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
3647921bed
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.

Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-08-13 19:38:21 +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
Ralph Sennhauser
45afefa961
Rename wcsnlen and strnlen to C11 names
Those functions were added to the C11 standard as an extension under the
name wcsnlen_s and strnlen_s. Also supported under that name in Windows.

Renaming avoids a possible name conflict with the posix functions of the
same name. Further this new name follows the pattern of names of the
other "secure" functions.

Fixes: #8274
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-08-10 07:33:00 +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
phosit
971525a41b Remove TIMER_BEGIN and TIMER_END
`TIMER` messages where printed to stdout which lead to noise.

Refs: #1003
2025-07-29 18:19:59 +02:00
phosit
f721f56ad4 Replace TIMER with PROFILE2
`TIMER` messages where printed to stdout which lead to noise.

Refs: #1003
2025-07-29 18:19:49 +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
27f7216be7
Use proper units for time conversion
On *nix the conversion of timeval and timespec to double needs to use
the actual unit in use instead of the unrelated clock resolution.

Fixes: aa3bd08513
Fixes: #8215
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-07-27 14:11:52 +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
2e6f62dcf9
Use clock_gettime on macOS
Is a Posix function and available on macOS since version 10.12, has better
granularity than gettimeofday. Add missing header <time.h> where
clock_gettime is specified.

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
trompetin17
678a33c100
Dap Interface with Spidermonkey debug
Spidermonkey provide a mechanics to debug all comportaments and real
from a different place with JS code this allow us to reuse the current
scriptinterface but addind the new Debugger object definition only for
debugging without change any code from other place like GUI &
simulation.

Debugger Adapter Interface is a protocol that commons IDE implement to
being able for debugging, the concept is to provide sockets connections
with c++ but the Dap implementation in JS that allow us to extend for
more Request / Events that DAP provide.

Because Dap Interface its implemented with JS we need to handle message
in the main thread so we are calling in the main loop before GUI
messages
2025-07-11 11:06:04 -05: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
Ralph Sennhauser
5e4b49f65f
Fix some includes in source/renderer
Make include-what-you-use happy with some files in source/renderer and
fix what needs to be fixed.

Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-07-07 17:45:54 +02:00
Ralph Sennhauser
ed4e2587c2
Fix includes in source/maths
Make include-what-you-use happy with files in source/maths and fix what
needs to be fixed.

Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-07-06 18:24:31 +02:00
Ralph Sennhauser
61326cfca6
Fix some headers in gui
Make include-what-you-use happy with a part of the files in source/gui
and fix what needs to be fixed after including missing compile flags.

Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-07-02 13:20:13 +02:00
Ralph Sennhauser
863b0b90b7
Update headers in i18n
Remove external_libraries headers for icu and tinygettext, as they
neither add any workarounds needed and as quite a few other libraries
don't have such a header either. As for the warnings suppressed, this is
no longer needed as they were fixed and with vs2019 added support for
-isystem or equivalent would make this useless eitherway.

Further make include-what-you-use happy with files in source/118n and
fix what needs to be fixed after.

Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-07-01 09:01:00 +02:00
Ralph Sennhauser
a606fbf1a5
Fix headers for XML/XMB
Declare "lib/posix/posix.h" as source for <strings.h>

Make include-what-you-use happy with files in source/ps/{XMB,XML} and
fix what needs to be fixed after including missing compile flags.

Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-07-01 07:44:06 +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
Ralph Sennhauser
b6e66a5d43
Update headers in lobby
Some gloox headers need workarounds to be included, so mark the header
"lib/external_libraries/gloox.h" as source for all gloox symbols and
collect all headers we use under it.

Further make include-what-you-use happy with files in source/lobby and
fix what needs to be fixed after.

Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-06-25 14:00:44 +02:00
Ralph Sennhauser
4c165dd208
Update some includes for iwyu part 1
First batch of fixes to please include-what-you-use.

Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-06-20 09:01:19 +02:00
phosit
93666d8628 Remove ignore_result
`std::ignore` serves the same purpose and is C++ standard.
2025-06-19 19:05:56 +02:00