Commit graph

24831 commits

Author SHA1 Message Date
Dunedan
b42ea94c3c
Update the pre-commit hooks 2025-05-26 17:19:03 +02:00
Dunedan
d111d4cc84
Specify the NodeJS version for markdownlint
Running the markdownlint pre-commit hook as Gitea Action fails for
markdownlint >=0.38.0, as the NodeJS version available in the Act Runner
Docker image so too old for that. To solve this, this commit specifies a
newer NodeJS version to use.
2025-05-26 17:18:58 +02:00
Dunedan
782bab293b
Fix pre-commit workflow to work with Ubuntu 24.04 2025-05-26 16:42:05 +02:00
Dunedan
a109b3973c
Remove the need to change the working directory 2025-05-26 08:48:42 +02:00
Dunedan
5758430962
Simplify and speed up parent retrieval
This skips recursive parsing of the parents of an entity, as just its
direct parents are required by the implmentation. It also simplifies how
such calls are cached. This leads to much cleaner and faster code.
2025-05-26 08:48:42 +02:00
Dunedan
927165e1e5
Make unit_tables.py callable from other places 2025-05-26 08:48:42 +02:00
Dunedan
2b54697862
Fix overwriting previous error state
This fixes a problem where the previous error state got overwritten by
the result of validating meshes in checkrefs.py.
2025-05-25 12:23:58 +02:00
Dunedan
71c02cf658
Fix checkrefs.py return code
A typo in the assignment of the error state lead to checkrefs.py
existing with return code 0, while it should've returned 1 in some
cases. This commit fixes that.
2025-05-25 12:23:58 +02:00
Dunedan
b4f076effb
Don't report errors for empty attribute values
Let checkrefs.py skip reporting errors for empty attribute values.

Fixes #7966
2025-05-25 12:12:45 +02:00
Dunedan
99b9a0cb86
Add support for new font handling for checkrefs.py
As the fonts specified in the GUI templates don't exist as files on disk
anymore after 734386ce9f we can't check if they're specified correctly
the same way as before anymore. Instead, this commit adds validation
of font names to the GUI Relax NG schema and adds a check whether all
fonts referenced in default.cfg exist in the proper location.
2025-05-25 11:21:51 +02:00
Dunedan
6c85951d53
Combine duplicate profiler2 config sections
default.cfg contained two sections named "profiler2". That's something
which might be confusing and is not supported by all implementations of
ini file parsers. To remove that ambiguity, this combines these two
sections into one.
2025-05-25 11:21:47 +02:00
trompetin17
1aea9f2d32
Add CJK languages to release/installer
After 734386ce9f, CJK fonts are included in mods/mod folder, removing the
need for CJK mods. This commit enables those languages in the release
and the installer.
2025-05-24 12:15:14 -05:00
Lancelot de Ferrière
a7330cf469 Improve group movement by distributing units around the target.
This improves pathfinding feel as units no longer try to clump on a particular point. However, can lead to oddities if there's a lot of impassable terrain around.

Closes #7791
2025-05-24 14:34:09 +02:00
Dunedan
efdc1fab0a
Add a pre-commit hook to check for large files
This checks there are no large files being committed, which aren't
stored in git-lfs.
2025-05-22 20:43:52 +02:00
Dunedan
1985fefcbd
Fix a crash of the debug console
This fixes a crash when pyrogenesis got compiled with certain
compilers, whenever a command is entered in the console, while no
console.txt log exists.

Fixes #7964
2025-05-22 20:31:28 +02:00
Ralph Sennhauser
72be06fd7f
Fix AttackEntityInZone after eslint 'no-shadow'
Fix for 7b4cf11e25

Fixes: #7965
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-05-22 19:16:28 +02:00
trompetin17
8c85f32327 Remove fontbuilder & files
After 734386ce9f (that introduce freetype as a core of text rendering
engine), we dont need fontbuilder.py, neither files generated by that
tool.
2025-05-22 19:06:53 +02:00
trompetin17
c8c1522953
Fix memory leak from Font
FreeType’s FT_Glyph_To_Bitmap mutates the FT_Glyph by allocating a new
glyph object and overwriting the input pointer. This creates a risk of
memory leaks if the old glyph isn’t released or if ownership is unclear.

To avoid this, we now store the glyph in a UniqueFTGlyph and explicitly
pass it by reference to FT_Glyph_To_Bitmap. After the mutation,
ownership continues to reside in the smart pointer, and cleanup is
guaranteed even in error branches.

For temporary glyphs (e.g., strokes), we still manually call
FT_Done_Glyph, since they are not managed by UniqueFTGlyph. These
changes ensure all glyph memory is correctly released and reduce the
need for repetitive error-path cleanup code.
2025-05-22 11:35:12 -05:00
Ralph Sennhauser
1fac3461f9
Never strip binaries automatically
Striping is trivial, getting the debug symbols if premake just strips
them silently is a pain tho.

Stripping should optionally be done during install, as we don't have an
install target nor an install-strip target, make it a configure option
which is off by default.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-05-22 17:32:39 +02:00
Dunedan
b3de44c37d
Increase range of Ptolemaic lighthouse
The Ptolemaic lighthouse is a pretty unique building. Ever since it got
changed to not reveal all coasts anymore in 04240f05a7 it hasn't been
very useful anymore, as its visibility range was too low to justify
spending the resources on it. To make the lighthouse more attractive
again, this commit increases its visibility range from 200 to 325.
2025-05-22 08:18:24 +02:00
Ralph Sennhauser
fb470ffa35
Add options for sanitizers to premake5.lua
Given that Valgrind is not yet avx512 ready [1] all the more reason to
have easy access to ASAN and friends for compilers that support it.

This commit adds options for ASAN, TSAN and UBSAN. [2]

[1] https://bugs.kde.org/show_bug.cgi?id=383010
[2] https://github.com/google/sanitizers/wiki

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-05-21 20:44:19 +02:00
trompetin17
a1d13c1cf8
Add CJK fonts for Text Engine
This PR removes the need for separate mods that previously provided CJK
support, and reduce the step for release process as mentioned here:
https://gitea.wildfiregames.com/0ad/0ad/wiki/ReleaseProcess
2025-05-21 16:16:36 +02:00
Lancelot de Ferrière
75421ef27c Disable system libs for WxWidgets
This is needed on recent wxWidgets versions to prevent fetching native libraries on the system while we are cross-compiling for Intel bundles.
2025-05-21 08:54:45 +02:00
Ralph Sennhauser
622f477ae9
Fix eslint rule 'no-new'
Manual fixes needed for:
eslint --no-config-lookup --rule '"no-new": 1'

Make the handlers that aren't actually handlers calss functions and for
the HotkeyPage suppress the warning as the global init is prone to be
removed at some point.

Ref: #7812
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-05-20 14:17:13 +02:00
Ralph Sennhauser
382b732515
Update test_root path in update-workspace
After 8d993b9250 the generated test_root.cpp is no longer in the source
tree but generated in workspace. The issue of there bing no source is
still valid, so update the path.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-05-19 17:43:21 +02:00
Dunedan
638391d7ab
Fix password change for certain usernames
This fixes the ability for users with uppercase letters in their
username to change their passwords, which wasn't possible before on
non-Windows platforms. The underlying issue for that is
https://github.com/processone/ejabberd/issues/4377 and in addition some
inconsistent normalization of usernames in password change requests
by gloox. This commit works around that by always using the local JID
part as username for password requests, which got the nodeprep string
profile already applied.

It also fixes a problem that Windows users which were able to change
their passwords, weren't able to login afterwards anymore, unless they
typed their username in all lowercase in the login form. This was caused
by using the all lowercase username as input for the password hash
function, instead of using the username in the user supplied case.

Fixes #7796
2025-05-19 17:05:41 +02:00
ShadowOfHassen
231c38d28d Improved Civ Overviews 2025-05-19 10:35:27 +02:00
Ralph Sennhauser
5445aaaf59
Allow no files for copyright checks
If a commit just removes files for cleanup purpose for example the list
of files to check would be empty. Therefore allow no files as arguments
for use in CI.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-05-18 20:18:08 +02:00
Dunedan
f28ca5d684
Fix bold and italic fonts
A last minute change in #7787 caused the bold and italic identifiers of
fonts to be ignored once it got merged in 734386ce9f and all fonts to
be rendered as regular fonts. This commit fixes that.
2025-05-18 18:41:25 +02:00
Dunedan
b1a638dfdc
Remove the sprites of the player color dropdown
This makes the arrow of the player color dropdown look like in a27
again.
2025-05-17 18:54:22 +02:00
Dunedan
dc156c3f24
Fix position of the ingame release label
This commit fixes the vertical position of the release label in the
in-game top menu, which broke with 734386ce9f.
2025-05-17 18:54:22 +02:00
Dunedan
ec95ee96d4
Improve player color dropdown
This properly centers the colors in the player color dropdown.
2025-05-17 18:54:22 +02:00
Dunedan
58a58bc25d
Improve layout of the civ and structree pages
This contains some small layout fixes and improvements for the
civilization overview and structure tree pages. Some of these fixes have
fix regressions introduced with 37065ebc71.
2025-05-17 18:54:12 +02:00
Ralph Sennhauser
4e5cdc87b9
Fix eslint rule 'spaced-comment'
Manual fixes needed for:
eslint --no-config-lookup --rule '"spaced-comment": ["warn", "always"]'

Ref: #7812
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-05-17 12:08:47 +02:00
Dunedan
52ee6ad470
Fix element positions after new font rendering
This fixes the positions of elements which changed as part of
734386ce9f.
2025-05-17 10:02:25 +02:00
Ralph Sennhauser
7b4cf11e25
Fix eslint rule 'no-shadow'
Manual fixes needed for:
eslint --no-config-lookup --rule '"no-shadow": 1'

Ref: #7812
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-05-17 09:48:36 +02:00
Ralph Sennhauser
dcda4187be
Fix parsing of graph.js for eslint
The perl script extract.pl just checks for a line matching
'-- include data json--', so making it valid js is can be done just
fine.

Also fix eslint warning is graph.js.

Ref: #7812
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-05-17 06:29:29 +02:00
trompetin17
734386ce9f
Use freetype for font rendering
Replace premade bitmap fonts with FreeType2 and dynamic texture atlas.

Switched from static, premade bitmap fonts to runtime-generated glyphs using FreeType2.
Glyphs are rendered on demand into a dynamic texture atlas, improving scalability,
font quality, and support for internationalization.

Currently using RGBA format for compatibility across all render
paths while initial support for R8_UNORM is being added.
This prepares for future optimizations in VRAM and performance

Includes groundwork for gamma-corrected blending and future swizzling support.
2025-05-16 14:57:59 -05:00
Dunedan
45340a2e32
Don't store consecutive console commands twice
This adds an option to disable storing consecutive console commands
twice and enables it by default.
2025-05-16 17:38:41 +02:00
Dunedan
d549cbeeaa
Make the console font configurable 2025-05-16 17:38:41 +02:00
Dunedan
13c00d1869
Add missing console.history.size to default.cfg 2025-05-16 17:38:29 +02:00
Kate
a91a8594c2 remove whitespace on line 317 through 321 2025-05-16 12:11:18 +02:00
Kate
750b10a966 Update binaries/data/mods/public/simulation/ai/petra/config.js 2025-05-16 01:51:06 +02:00
Kate
517916c4d6 Update binaries/data/mods/public/simulation/ai/petra/config.js 2025-05-16 00:50:49 +02:00
Itms
416ba3fc2b
Fix Gitea actions syntax on push events
The Github documentation is difficult to parse, but there is an
asymmetry in the API:
- for a PR event, the event object contains a `pull_request` object
  containing `base` and `head` objects
- for a push event, the `before` and `after` SHAs are immediate
  children of the event object

<https://docs.github.com/en/webhooks/webhook-events-and-payloads>

Fixes #7730.
2025-05-15 11:45:25 +02:00
Itms
83674e1d1b
Fix lfscheck action syntax on push 2025-05-15 10:54:46 +02:00
Itms
2889170a09
Check LFS pointers integrity in an action
Running the checks here instead of in repository hooks will prevent
Gitea from hanging during pushes.
2025-05-15 09:33:50 +02:00
Ralph Sennhauser
a9987868c4
Fix eslint rule 'no-use-before-define'
Manual fixes needed for:
eslint --no-config-lookup --rule '"no-use-before-define": ["error", "nofunc"]

Ref: #7812
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-05-14 16:35:58 +02:00
Ralph Sennhauser
3a2d75af65
Fix eslint rule 'no-irregular-whitespace'
Manual fixes needed for:
eslint --no-config-lookup --rule '"no-irregular-whitespace": 1'

Ref: #7812
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-05-14 13:52:12 +02:00
Itms
56e268d82b
Update the issue template for release processes 2025-05-14 11:14:13 +02:00