Commit graph

9101 commits

Author SHA1 Message Date
Vantha
7386a5d514
Improve Engine.GetTextSize deprecation message
(cherry picked from commit 4d08446285)
Signed-off-by: phosit <phosit@autistici.org>
2025-12-23 20:18:16 +01:00
Vantha
4140858066
Fix warnings on the charts tab of summary screen
Engine.GetTextWidth has been deprecated since e845da025a

Idea:
If you look at a dropdown as just a text field (its header) that can
change caption like any other, then getPreferredHeaderTextSize is the
equivalent to getPreferredTextSize (present on buttons and text fields).

Fixes #8493

(cherry picked from commit 670f1e5d42)
Signed-off-by: phosit <phosit@autistici.org>
2025-12-23 20:18:16 +01:00
Vantha
cc56bafc66
Fix oversight in 83f4d8789b
(cherry picked from commit fbb6052c30)
Signed-off-by: phosit <phosit@autistici.org>
2025-12-23 20:18:16 +01:00
phosit
10408b46c2
Propagate error from autostart
The JavaScript error wasn't propagated leading to an infinite loop.

Fixes: #7967
(cherry picked from commit 14a5ccee52)
Signed-off-by: phosit <phosit@autistici.org>
2025-12-23 20:18:16 +01:00
Dunedan
7575a04305
Add Vietnamese as supported language
As 0 A.D. supports full unicode now and Vietnamese language coverage is
at a good level, let's include Vietnamese as supported language.

(cherry picked from commit 0086f005d4)
Signed-off-by: phosit <phosit@autistici.org>
2025-11-30 14:24:26 +01:00
Dunedan
3e8f296c72
Re-add Catalan as supported language
While Catalan got removed for Alpha 27 because of low coverage, its
coverage is now good enough again to get re-added as supported language.

(cherry picked from commit ed1bd1d75b)
Signed-off-by: phosit <phosit@autistici.org>
2025-11-30 14:24:26 +01:00
phosit
7ec2d3f0e0
Throw error when simulation script can't be loaded
When a script in "simulation/helpers/" contained an error. Files in
"simulation/components" aren't loaded. The return value of
`LoadDefaultScripts` indicated an error but was ignored. The simulation
still tried to start.

Now instead of returning a ignoreable error code the error is thrown. In
the common path the error is implicitly rethrown to the JS-function
which tried to start the game.

fixes: #8133
(cherry picked from commit 9a526bcae1)
Signed-off-by: phosit <phosit@autistici.org>
2025-11-24 20:20:17 +01:00
phosit
97eca26d58
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.

(cherry picked from commit 977bf5c0d1)
Signed-off-by: phosit <phosit@autistici.org>
2025-11-24 20:20:17 +01:00
phosit
2e4caf5d19
Use designatet initializers for AppHooks
CppCheck wasn't able to handle `{0}`. C++20 allows to use designated
initializers.

(cherry picked from commit b17c2fb80f)
Signed-off-by: phosit <phosit@autistici.org>
2025-11-24 20:20:17 +01:00
Ralph Sennhauser
bf314cbb4c
Add Atlas support to Appimage
Include the shared library libAtlasUI.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
(cherry picked from commit 5609492731)
Signed-off-by: phosit <phosit@autistici.org>
2025-11-19 20:28:48 +01:00
Vladislav Belov
e590a7cd4e
Replaces choosedDeviceIt by chosenDeviceIt
(cherry picked from commit c0ea17f06e)
Signed-off-by: phosit <phosit@autistici.org>
2025-11-11 18:16:35 +01:00
Vladislav Belov
8420377789
Disables Vulkan devices sorting by default
Currently we always choose the best device. But it's not always
desirable. A more safe approach is to use the default device (with
index 0). The only downside of that is if a user didn't adjust
settings then the game might run on an integrated GPU instead of a
discrete one. In the future it'll be solved by selecting GPU in
options: #8529

Fixes #8455

(cherry picked from commit 485200342d)
Signed-off-by: phosit <phosit@autistici.org>
2025-11-11 18:16:34 +01:00
Vladislav Belov
1e1db43854
Adds an option to destroy Vulkan old swapchain before
Now it's possible to destroy the old swapchain before creating a new
one. It might make the swapchain creation a bit slower but with a
lower memory peak.

(cherry picked from commit c4bc6c9627)
Signed-off-by: phosit <phosit@autistici.org>
2025-11-10 20:15:31 +01:00
Vladislav Belov
b08f2d1d33
Waits Vulkan device idle also on window resize
Fixes the case when a swapchain was recreated on resize rather than
by VK_ERROR_OUT_OF_DATE_KHR.

(cherry picked from commit 8a64182ca2)
Signed-off-by: phosit <phosit@autistici.org>
2025-11-10 20:15:31 +01:00
Vladislav Belov
d4736962ab
Deletes Vulkan resources on swapchain recreation
The change tries to minimize a memory peak during a window resizing.

Refs #6864

(cherry picked from commit de36c75023)
Signed-off-by: phosit <phosit@autistici.org>
2025-11-10 20:15:31 +01:00
Vladislav Belov
76337efe76
Fixes missing Vulkan application version
Missing after dc830ccf55.

(cherry picked from commit 8b1b1d28f8)
Signed-off-by: phosit <phosit@autistici.org>
2025-11-10 20:15:30 +01:00
Ralph Sennhauser
d503ae6da6
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>
(cherry picked from commit eba8439295)
Signed-off-by: phosit <phosit@autistici.org>
2025-10-31 13:43:50 +01:00
Itms
1b50d731fc
Store NSIS registry keys under a consistent root
Reviewed-At: https://gitea.wildfiregames.com/0ad/0ad/pulls/8476
(cherry picked from commit 4716a230ab)
Signed-off-by: phosit <phosit@autistici.org>
2025-10-31 13:43:49 +01:00
Itms
621aa9d7a9
Wipe NSIS install preferences when uninstalling
The user language and start menu folder name were saved, which goes
against recommendations in the NSIS documentation.

The installation directory was also saved, which might make sense,
but prevents us from dropping the "alpha" label.

Reviewed-At: https://gitea.wildfiregames.com/0ad/0ad/pulls/8476
Fixes: #7594
(cherry picked from commit 18df61517c)
Signed-off-by: phosit <phosit@autistici.org>
2025-10-31 13:43:49 +01:00
Itms
6a6712799c
Fix install and Start Menu folder names on Windows
Those cannot end with a period.

Reviewed-At: https://gitea.wildfiregames.com/0ad/0ad/pulls/8476
(cherry picked from commit f772181501)
Signed-off-by: phosit <phosit@autistici.org>
2025-10-31 13:43:49 +01:00
Itms
a7f0678dad
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

(cherry picked from commit 866d6f0527)
Signed-off-by: phosit <phosit@autistici.org>
2025-10-31 13:43:49 +01:00
Itms
4fca5ed21c
Use the PYROGENESIS_VERSION macro instead of a global
Reviewed-At: https://gitea.wildfiregames.com/0ad/0ad/pulls/8222
(cherry picked from commit 50f6da2a13)
Signed-off-by: phosit <phosit@autistici.org>
2025-10-31 13:43:49 +01:00
Itms
abc83a7dfb
Address cppcheck uninitialized warning
Reviewed-At: https://gitea.wildfiregames.com/0ad/0ad/pulls/8222
(cherry picked from commit f0c8db6422)
Signed-off-by: phosit <phosit@autistici.org>
2025-10-31 13:43:48 +01:00
Vladislav Belov
52e6d08e79
Fixes lseek for big files on Windows
It was broken in ef69c37f66, before that we were using _lseeki64.

Fixes #8459

(cherry picked from commit cb58116270)
Signed-off-by: phosit <phosit@autistici.org>
2025-10-26 15:06:35 +01:00
Ralph Sennhauser
981b3b898e
Support running individual tests or suites
Add back some functionality that got dropped with the move to a custom
runner in 39ea3b6ea5

Add option --list to print all available test grouped by suite.

Add option --suite to limit the run to a specific testsuite.

Add option --test to limit the run to a specific test.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
(cherry picked from commit a7d65d4a34)
2025-10-17 13:31:20 +02:00
phosit
d3239591b8
Bump copyright year for windows build 2025-10-15 17:58:23 +02:00
phosit
e2ed4afe00
SoundManager: reintroduce manual memory management
This reverts commit 94c907342a.

It introduced multiple errors and is to big to find the actual errors.

Fixes: #8342
Fixes: #8426
2025-10-13 20:42:32 +02:00
Vladislav Belov
70893b6a32
Adds ARM Neon to report 2025-10-13 19:57:52 +02:00
Vladislav Belov
c99345a24b Adds MapReader to cppcheck ignore. 2025-10-13 16:57:15 +02:00
Vladislav Belov
fb94cc704f
Makes loading terrain textures more smooth 2025-10-13 00:14:45 +02:00
Vladislav Belov
fb98f5059a
Refactors TerrainTextureManager 2025-10-13 00:14:43 +02:00
Vladislav Belov
5bbb2c0b76
Makes parsing entities more smooth 2025-10-13 00:14:29 +02:00
elexis
2ccd10e566 Fix missing returns after disconnect in 95179c5e46.
Patch by @elexis.

The package sent in fa85527baf / #2420 plus this missing return causes the NetServerTurnManager
to be stalled forever if a client succeeds to send this package on disconnect.

In NotifyFinishedClientCommands, Disconnect calls OnDisconnect calls UninitialiseClient calls m_ClientsData.erase,
but then m_ClientsData[client].readyTurn = turn; reinserts the disconnected client, making the turnmanager wait forever for the disconnected client.

refs https://wildfiregames.com/forum/topic/134742-bug-game-incredibly-slowfreeze-at-start-because-because-of-1-player/
2025-10-12 12:39:41 +02:00
Vladislav Belov
893f192eaa
Makes TextRenderer allocates using LinearAllocator
Also replaces DynamicArena for model and terrain rendering by
LinearAllocator.
2025-10-12 00:53:12 +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
53ff6f0d50
Adds LinearAllocator for faster allocations.
LinearAllocator (also known as bump allocator) allows to reuse the
same memory across the frame for short lifetime allocations.
2025-10-12 00:53:08 +02:00
Itms
acf0ccc8dc Create a 64-bit Windows installer in bundles 2025-10-12 00:48:33 +02:00
Itms
5826074374 Split building Unix tarballs and Win installer 2025-10-12 00:48:33 +02:00
Vladislav Belov
bedb6129f2
Reduces string allocations in GUI and maths. 2025-10-11 19:44:22 +02:00
Ralph Sennhauser
39ea3b6ea5
Use custom runner for tests
The --libdir switch got lost at some point, which is useful for running
tests with a system build.

Further allow to switch the type of output at runtime avoiding an
unnecessary rebuild.

Finally allow to specify an output file, this means there is no need to
redirect stdout which might break the CI in case the tests write
something to stdout like in case of LOGERROR resulting the test result
not being valid xml.

Ref: #7534
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-10-11 11:34:38 +02:00
Vladislav Belov
3ffb5ec5a0
Removes USE_FOG define and switches to a shader parameter.
Refs #8385
2025-10-11 08:11:35 +02:00
real_tabasco_sauce
c43aa1d609 fix debug build by directly setting probability for the inverse binomial in Decay.cpp 2025-10-08 17:00:09 +02:00
Vladislav Belov
8f4aa8ddbd
Adds a script to modify rules and tests to it. 2025-10-08 13:56:48 +02:00
Ralph Sennhauser
788708ed8c
Add AppImage support
Add a Dockerfile having all needed tooling. Using a container also means
those are the libs that will end up being used in the AppImage.

Then add a script for building pyrogenesis either form git or from
extracted source tarballs and for assembling the AppImage and finally
creating the AppImage.

Add building the AppImage to the "bundles" pipeline.

Also add a wrapper script to use podman to drive the whole process
for convenience for local builds.

Ref: #7577
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-10-05 20:35:43 +02:00
Vladislav Belov
199f4cb666
Fixes uninitialized water textures.
Fixes #8052
2025-10-05 14:13:49 +02:00
Vladislav Belov
e1d5e92c2a
Restores minimap entities size and adds options.
Restores minimap entities size to size they have in A25.
Adds minimap options.

Fixes #6782.
2025-10-05 12:04:21 +02:00
Vladislav Belov
e63c80c613
Reduces string allocations in paths. 2025-10-05 01:31:27 +02:00
Ralph Sennhauser
d22d8776e6
Fix layouting of texture preview in atlas
Commit fe192fe58f added one extra level,
so we have to layout the parent of the parent now to actually layout the
sidebar.

Fixes: #8388
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-10-01 14:40:30 +02:00
Vladislav Belov
275f6631c4
Allows to use the same technique for multiple shaders. 2025-09-29 12:04:42 +02:00
elexis
1f58836cf1
Fix NetServerTurnManager hanging if a client passed handshake but not authentication on gamestart.
Fixes #5201.
2025-09-27 10:02:46 +02:00