Commit graph

8821 commits

Author SHA1 Message Date
Dunedan
b42ea94c3c
Update the pre-commit hooks 2025-05-26 17:19:03 +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
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
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
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
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
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
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
Ralph Sennhauser
d2222ee0ac
Fix eslint rule 'prefer-const'
The remaining ones that can be fixed automatically.

eslint --no-config-lookup --fix --rule '"prefer-const": 1'

Ref: #7812
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-05-12 18:44:28 +02:00
Lancelot de Ferrière
dd74892463 Fix no-pch build following #7829 2025-05-11 11:24:50 +02:00
Lancelot de Ferrière
cf952b34e4 Fix silhouette calculation after 8a40673
Fixes #7804
2025-05-11 09:56:24 +02:00
Lancelot de Ferrière
9eccf1f27d Iterate the component map only once on serialization 2025-05-10 17:08:49 +02:00
Lancelot de Ferrière
ea34960249 Skip UTF8 conversions in prototype name 2025-05-10 17:08:49 +02:00
Lancelot de Ferrière
bcd0e12cc3 BinarySerializer: avoid creating unnecessary ScriptRequest 2025-05-10 17:08:49 +02:00
Lancelot de Ferrière
ab6a420f78 Cache property keys during component serialization 2025-05-10 17:08:49 +02:00
Lancelot de Ferrière
83bf2eb22e Skip redundant HasProperty in GetObjectClassName 2025-05-10 17:08:49 +02:00
Stan
934ca601d7
Add a Jenkinsfile linter 2025-05-08 19:50:21 +02:00
scuti
0e1c881fef Check for broken animated meshes in checkrefs.
Added and integrated P293 by @trompetin17 and @Stan
Addresses #6714
2025-05-04 22:25:47 +02:00
Lancelot de Ferrière
7cc495ec91 Fix UnitMotion 'path prediction' to not trigger if following a short path
This is needed otherwise units might never go around pure unit obstructions.

Adds a small test map.

Fixes def0f57365
2025-05-04 11:22:31 +02:00
Ralph Sennhauser
9038b555fe
Eslint auto-fix JS in profiler2 webui
This fixes all issues eslint can safely do automatically. Drastically
reducing the number of open style issues reported.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-05-02 13:25:23 +02:00
Dunedan
d79c05f10e
Allow loading multiple profiling reports at once
This allows selecting multiple reports to load at once in the file
chooser dialog. Reports will be loaded in parallel and the last one to
finish loading will be the active one.
2025-04-29 12:40:31 +02:00
Dunedan
1e276bb4ad
Remove duplicate call of on_report_loaded()
This removes a duplicate call of on_report_loaded() when loading a
profiling report. This second call caused loading reports to fail,
whenever it took longer than 5 seconds. While that was probably a
measure to prevent reports loading too long and taking up too much
resources, it didn't achieve that goal, as the actual loading of the
report din't get aborted.
2025-04-29 12:40:31 +02:00
Ralph Sennhauser
19d568d506
Add linter to check for copyright year
This replaces the previous arclint linter for checking the copyright
year in license headers with a gitea workflow job.

As the date of last edit might differ from commit date due to reverts
the copyright linter is run against a base commit.

The python script doing the heavy lifting is written by @Dunedan.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Co-Authored-by: Dunedan <dunedan@phoenitydawn.de>
2025-04-28 16:14:34 +02:00
Vladislav Belov
b0160d0ece
Adds 64bits support. 2025-04-26 20:53:09 +02:00
Lancelot de Ferrière
8a40673dab Avoid overflow in silhouette occluder bounds
This triggered a debug_warn in some cases.
2025-04-26 16:48:06 +02:00
Vladislav Belov
2264807ad0
Fixes runtime switch of the GPU skinning.
Fixes #7572, #7630.
2025-04-25 20:13:59 +02:00
Vladislav Belov
0180faa1f2
Adds fixed frame frequency.
Adds possibility to control the frame time by setting the frame
frequency by a command line argument (`-fixed-frame-frequency`). It's
mostly useful for a trailer recording and graphics debugging.
2025-04-25 19:15:57 +02:00
Vladislav Belov
0bf3ff5ad6
Reduce allocations for GUI and Hotkeys.
It allows to reduce the number of allocations per-frame for GUI and
during initialization for Hotkeys.
2025-04-24 15:11:22 +02:00
Vladislav Belov
bdd3cac051
Reduces allocations for ShaderDefines.
It allows to reduce the number of allocations per-frame for
ShaderDefines. For example, on Acropolis Bay it goes down from
2.7k to 0.9k for the whole map view.
We don't really need std::vector for it. Because materials and
particularly shaders shouldn't have so many parameters.
2025-04-24 01:05:34 +02:00
Lancelot de Ferrière
af32d386b9 Stop running shrinking gcs & simplify GC logic.
Shrinking GCs dump the JITted code, which leads to redundant recompilations, lowers performance, and makes profiling JS more difficult.
They may still happen if the runtime is at risk of OOM.
2025-04-22 17:03:29 +02:00
Lancelot de Ferrière
d262eb8757 Remove log scale in profiler2
It showed incorrect values and was simply not very useful.
2025-04-21 09:05:34 +02:00
Vladislav Belov
9306aae297 Fixes PS::StaticVector insert and adds more tests
There was an incorrect mutable iterator construction missed in
ca242239f1.
2025-04-20 17:13:40 +02:00
Lancelot de Ferrière
ea5a350f83 Cache JS component wrappers 2025-04-19 14:41:45 +02:00
Vladislav Belov
e65879bdbf
Fixes non-PCH compilation after 0b33921c06. 2025-04-17 23:26:23 +02:00
phosit
44605c1297 Add a class to register stateful callbacks to JS
Use the class in autostart as an example.
2025-04-17 15:02:05 +02:00
phosit
0afb5f3d06 Use std::string_view in ConfigDB
Now no `std::string` has to be constructed to get a config-value.
To accomplish that the map has to have a "transparent" comparator.
2025-04-17 12:35:40 +02:00
Vladislav Belov
0b33921c06
Removes GL code from the common GPU profiler. 2025-04-16 22:38:34 +02:00
Vladislav Belov
6ef6a87287
Adds queries implementation to renderer backends. 2025-04-16 22:38:32 +02:00