Commit graph

1392 commits

Author SHA1 Message Date
ramtzok1
1b797ce0a0
Add specific tips for multiplayer sessions
A multi player loading screen will have possibility of showing single
and multi player tips while multi player tips are in favor.

Tips are now separated by categories. During loading those category
have an occurrence probability, where we are choosing a random category
based on chance and not by complete randomness. From there we just
picking a random tip from that category.
2025-04-12 10:38:57 +02:00
Dunedan
8482f25800
Fix a bunch of spelling mistakes
This fixes a bunch of spelling mistakes found in user facing strings.

Fixes #7716
2025-04-11 06:24:32 +02:00
phosit
56abf84da2 Catch all std::exception from a map in atlas
Since 0eed117e6d exceptions from the map generation script are rethrown
in the main thread but not all of them are catched.

This defect is already fixed in the engine with 82513c9104

Fixes: #7620
2025-04-09 15:02:33 +02:00
phosit
1a8757660f Get config values without using return parameters
Many temporaries can be removed.
2025-04-09 12:51:21 +02:00
Lancelot de Ferrière
874c4d1c59 Use __framestart only as frame references
Profiler2 currently explicitly considers 'frame' for frames, which is a bit annoying in replays as state hashes are computed outside of these. It's better to just rely on RecordFrameStart() calls.
2025-04-06 11:14:31 +02:00
Ralph Sennhauser
6da4e606d4
Add cppcheck workflow
Add a workflow for linting and add a cppcheck job.

The job is using cppcheck provided by package manager. Existing errors
are suppressed to get going with CI linting, ideally tho the suppression
list would be empty. Some of the suppressed errors are only found with
more recent cppcheck than what is available in the runner.

Also remove old arclint cppcheck setup.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-03-30 18:06:01 +02:00
Ralph Sennhauser
387ea927ac
Add util.sh shell library
A shell utilities function library starting with a first utility
function for getting the number of online CPUs.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-03-30 18:05:56 +02:00
Dunedan
e755ef7155
Improve performance and output of entvalidate.py
The most notable changes are:

- improved performance thanks to using `lxml` instead of `xmllint` for
  validating the templates
- improved performance by parallelizing the validation across multiple
  threads
- more meaningful output for detected validation errors
- easier to call from other scripts (like checkrefs.py)
2025-03-18 12:57:01 +01:00
Dunedan
f4baf8944c
Fix the import of datetime.UTC in bundle script 2025-03-17 13:39:38 +01:00
Dunedan
c448973398
Remove a bunch of unused scripts
Some of them were simply unused, while others got replaced by Python
scripts.
2025-03-03 20:57:49 +01:00
Dunedan
03cb24d400
Move xmlvalidator code to entity directory
The xmlvalidator logic is only used by the checkrefs.py script, so this
moves it to the same directory to have it co-located and avoid having to
modify sys.path to import it.
2025-03-03 17:45:08 +01:00
Dunedan
118ea18a58
Enable a few more ruff rules 2025-03-03 14:18:40 +01:00
Dunedan
3c57fdb4a9
Fix ruff linting for scripts in source/tools/dist/
By default ruff excludes all files in directories named "dist" from
linting (https://docs.astral.sh/ruff/settings/#exclude). This caused the
Python scripts in `source/tools/dist/` to not get linted. This commit
fixes that and adjusts their style to fit our ruff rules.
2025-03-03 12:45:33 +01:00
Vantha
0177b97c69 Complete the GUI XML checks in checkrefs.py
Add checks for sprites, styles, scrollbars, tooltips, and colors.
And too for entire objects referenced by the "use_object" attribute.
(even though that is currently unused)
2025-02-26 16:20:27 +01:00
Ralph Sennhauser
77256c8d32
Fix profiler2 webui html
Cleanup some bogus tags and outdated css attribute.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-02-17 21:22:30 +01:00
Ralph Sennhauser
4b59d6b739
Update jquery used by profiler2 webui
jquery 1 is for support of old version of browsers not even maintained
this days.

Updating prevents occasional hangs for me.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-02-17 21:22:30 +01:00
Langbart
dffa892c60 fix: rlclient update resource gathering and map name
fix: #7540
2025-02-09 14:38:55 +01:00
Dunedan
db35a8494c
Update supported languages for the NSI installer
235ea5cfb4 updated the languages supported by 0 A.D., but missed
updating them for the installer. This commit makes up for that and
updates the languages for the installer as well.
2025-01-28 19:14:16 +01:00
Dunedan
2ea183d744
Allow to check multiple locales at once 2025-01-21 11:01:42 +01:00
Dunedan
bcdbe2e580
Add the ability to specify which rules to check 2025-01-21 11:01:40 +01:00
Dunedan
25e83d603f
Check for wrong whitespaces in project name
This adds checks to check for missing non-breaking space in "0 A.D.".
2025-01-21 11:01:37 +01:00
Itms
e1ecc4a743
Fix unix-build tarball inclusion of text files
The .txt were wrongly send to a subdirectory named `.` and the files
converted to Markdown were forgotten.
2025-01-20 22:03:07 +01:00
Ralph Sennhauser
3aa95b7a28
Prefetch tarballs in bundle pipline
Fetch third party tarballs for source packages so they will be bundled
in source release tarballs.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-01-20 16:58:37 +01:00
Itms
dc830ccf55
Switch main branch to Release 28 2025-01-12 01:27:02 +01:00
Dunedan
60c469bb64
Improve variable naming in check_diff.py 2025-01-11 21:44:52 +01:00
Dunedan
a92a4ff45c
Update the pre-commit hooks 2025-01-11 21:44:52 +01:00
Dunedan
235ea5cfb4
Update supported languages for Alpha 27
This removes Catalan and Scottish Gaelic as supported languages, as they
now both have a coverage of less than 80% and adds Galician and
Portugese which both have 100% coverage right now.
2025-01-10 05:52:02 +01:00
wowgetoffyourcellphone
c798a12815 Fix projectile modifier oversight and references
Update trigger script
Update Attack.js component
Update the relevant techs
Update unit_tables.py
2025-01-05 22:49:18 +01:00
Itms
2482ecf9fe
Sign and notarize macOS bundles 2025-01-03 17:05:15 +01:00
Itms
9f6699d964
Adapt bundles pipeline to the git environment 2024-12-21 23:03:25 +01:00
Vantha
d7dda097e1 Extend the tips page for multiple images per tip
Enable the Tips and Tricks page to show multiple images for each tip.
Add a small GUI panel below the image for switching between them.
Only show it when the current tip has more than one images.

Introduce tipfiles.json to assign images to the text files.
(And stop of relying on file naming)

Add a tip about wonders, and make some slight changes to other texts.
Improve existing tip images and add a bunch of new ones.
2024-12-20 19:46:07 +01:00
Dunedan
3a0f6aca32
Don't credit our Transifex account as translator
This account is only used for fixing technical bugs in translations and
not doing translations themselves, so let's exclude it from the credited
translators.
2024-12-18 21:53:31 +01:00
Vladislav Belov
e27909e603
Fixes SPIR-V compilation for compute_skinning shader.
Currently we don't mix storage images and storage buffers in the same
shader. Also we don't sample textures when we use storage buffers.
In the future we need to avoid shifting descriptor sets.
2024-12-11 01:18:05 +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
Vladislav Belov
e765a2c4ba
Moves tests for generate_rules and merge_rules to a separate folder. 2024-12-05 17:25:54 +01:00
Vladislav Belov
dbeb11a36b
Adds avoiding non-default render debug modes for generating rules of SPIR-V shaders. 2024-12-05 17:25:52 +01:00
Vladislav Belov
7801c40b40
Adds order test to merge_rules. 2024-12-05 17:25:50 +01:00
Vladislav Belov
53de281311
Adds +x to tools. 2024-12-05 17:25:48 +01:00
Vladislav Belov
d0d6113fc4
Fixes linter notes. 2024-12-05 17:25:47 +01:00
Vladislav Belov
b12cc27bef
Adds tools for SPIR-V rules. 2024-12-05 17:21:19 +01:00
phosit
f8afd49ae1 Return by value from CCamera::GetScreenCoordinates
Pack the two `float`s in to a `CVector2D`.
Rename some variables to not use underscore.
2024-11-17 20:27:58 +01:00
phosit
998dc30b6d Return by value from CCamera::BuildCameraRay
Some return values can be assigned to a `const auto`, somewhere `dir` is
mutated so the whole result has to be assigned to a non `const` variable
and once only dir is used, so structured binding isn't used there.
2024-11-17 20:27:58 +01:00
Dunedan
d9740858f7
Look up location of spirv-reflect only once
Instead of looking up the location of spirv-reflect for every shader,
this is now being done once and cached for all shaders. This results in
shader compilation being slightly faster.
2024-10-25 09:24:43 +02:00
Dunedan
cdd2f3636a
Use spirv-opt to strip debug info
Instead of compiling SPIR-V shaders twice, once with debug info and once
without, this uses `spirv-opt` to remove the debug info from the SPIR-V
shaders with debug info. This results in notable performance gains, as
stripping the debug info from existing shaders is much faster than
compiling them.

As a result of this change the contents of the non-debug shaders change
once. That's because shaders with debug info contain much more
instructions and therefore more result ids. Stripping the debug
info from shaders results in different result ids being used as when
generating ones without debug info. While that doesn't result in a
difference in the functionality of the shaders, it's a difference in
their binary representation, causing their content hashs and therefore
file names to change. After that one-time change the result ids are
reproducible again.
2024-10-25 08:26:54 +02:00
real_tabasco_sauce
8d78e3165b Rename TeamPlacement -> PlayerPlacement 2024-10-23 18:37:35 +02:00
Dunedan
6eb9a3308a
Define VkDescriptorType enum only once
Instead of redefining the VkDescriptorType enum for every shader, only
define it once. This avoids unnecessary computation and slightly
increases performance.
2024-10-21 09:02:38 +02:00
Ralph Sennhauser
b1f0ebda41 Fix wxString to std::string conversion in Atlas
At least on Linux this resulted in the help menu in Atlas not being
populated. This fixes the issue.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-10-18 19:30:26 +02:00
Dunedan
20cef3bce0
Fix compiling SPIR-V shaders on Windows
b2cdb1e6b4 broke compiling of SPIR-V shaders on Windows, as the output
of `spirv-reflect` contains CRLF as line separators there. This commit
fixes that.
2024-10-18 16:50:31 +02:00
Dunedan
0bbd2ad7dd
Improve linting of PO files
During the mogration to git e9d1cb6cc7 removed the
`lint-translations.sh` script which was used together with
`check_translations.py` to lint POT- and PO-files. By doing so it
removed a valuable option to find problems in translations.

This commit undos that by merging the functionality of the removed
`lint-translations.sh` and `check_translations.py` into the latter
one. The new logic is easier to maintain, produces less false-positives
and has some unit test coverage.
2024-10-17 19:23:50 +02:00
Dunedan
b2cdb1e6b4
Improve YAML loading performance using libyaml
This adds optional support for loading the YAML reflection data using
`libyaml`, which is faster than PyYAML's pure Python implementation.
2024-10-17 17:52:08 +02:00