25737 Commits

Author SHA1 Message Date
wowgetoffyourcellphone 8a999d63b7 Add missing garrisoned prop point to the Athena Nike mesh. 2026-06-09 01:04:10 +02:00
Ralph Sennhauser 25f920bdb2 Make cxxtest optional
Remove mocks as they are no longer used making cxxtest effectively
optional.

Fixes: #8618
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-08 20:59:45 +02:00
Ralph Sennhauser 2d317d509d Remove unix_ExecutablePathname
The function was used as a fallback for when a platform specific approach
isn't available. Given that it effectively is a roundabout way to derive
it from argv[0] which we use as a generic fallback anyway just remove
it.

This further allows to make cxxtest optional.

Refs: #8618
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-08 20:59:45 +02:00
Ralph Sennhauser ae6d3bfc4e Implement BSD specific sys_ExecutablePathname
This is more reliable than argv[0] which is effectively used via
unix_ExecutablePathname. Also drop the fallback as it effectively is the
same as the generic fallback and blocks making cxxtest optional.

On FreeBSD the procfs is not mounted by default, so use a syscall
instead.

Refs: #8618
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-08 20:59:45 +02:00
Ralph Sennhauser 349478aa6b Remove Linux sys_ExecutablePathname fallback
The fallback is of little value and blocks making cxxtest an optional
build dependency. While at it use realpath instead of readlink.

Refs: #8618
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-08 20:59:45 +02:00
Ralph Sennhauser 6fc47e2997 Cleanup wposix header and source
Remove stale NAN and INFINITY, both have equivalents since C++11 and
cleanup headers in wposix source file.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-08 19:52:53 +02:00
Vladislav Belov 62fcb7e042 Removes requirement to restart the game for V-Sync 2026-06-08 18:27:12 +02:00
Vladislav Belov 7607d6bdd8 Decouples acquire/present from SubmitScheduler
SubmitScheduler doesn't have to know anything about Acquire/Present as
its responsibility to schedule and submit command buffers to a queue.
2026-06-08 18:27:10 +02:00
Vladislav Belov 07e5ad5b23 Fixes acquire and submit semaphores syncronization
I forgot to finish CSubmitScheduler synchronization in
7c84c23114. Even ++m_FrameID was
forgotten. And it worked at the time. A proper synchronization is
described in renderer/backend/Vulkan/SwapChain.h.
2026-06-08 18:27:08 +02:00
Vladislav Belov 4d83aa28e5 Uses SwapChain instead of direct Device calls 2026-06-08 18:27:06 +02:00
Vladislav Belov cf4a4d8fd5 Adds SwapChain as an explicit DeviceObject
It allows us more flexibility on how we control swapchain. That includes
toggling V-Sync in real time.
2026-06-08 18:26:58 +02:00
Ralph Sennhauser dab6e1a37a Fix disabled pathfinder tests
The disabled test are all broken one way or another. The maps used in
the tests got renamed. The pathfinder component got some performance
improvements which now require to call UpdateGrid() once before use.
Finally for the InitAttributes to be deep frozen they need to be an
object, so initialize them.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-07 10:43:32 +02:00
Ralph Sennhauser 296ccc78c9 Fix disabled serializer tests
test_hash depends on modmod for xml schemas. InitAttributes need to be
set as deep freezing expects them to be a valid object. The map used got
renamed at some point. Finally prior to running the sim PreInitGame()
and InitGame() need to be called.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-07 10:00:40 +02:00
Ralph Sennhauser 0599848330 Cleanup Atlas SectionLayout
Don't declare empty constructor and destructor, avoid c-style cast and
remove TODO about a bug that can't be reproduced any longer.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-07 09:36:57 +02:00
Ralph Sennhauser e3afa15966 Cleanup Atlas section headers
Make not otherwise used functions private and use override as
appropriate.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-07 09:36:57 +02:00
Ralph Sennhauser 94f13073ce Remove unused allocator page_aligned
Unused and since C++17 not really valuable with std::aligned_alloc
(_aligned_malloc and _aligned_free in case of MSVC) available. We also
have an other similar interface with "lib/sysdep/vm.h".

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-05 16:57:20 +02:00
Ralph Sennhauser cf5501a35b Support numpad with player hotkey in ActorViewer
KEY_DOWN means we need to check for the "down" values instead of "char"
value which differer for numpad.

Ref: #501
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-05 16:22:28 +02:00
Ralph Sennhauser fcbc3d3f71 Limit max PlayerID in Atlas hotkeys
9 isn't a valid playerID, setting this value causes a JS error
and corrupting the viewport.

Further limit selectable max playerID to what the mapSettings say.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-05 16:22:28 +02:00
Ralph Sennhauser 0c0552a428 Replace M_PI with C++ numbers
C++20 added π (pi) to the standard, replace the C macro globally.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-04 20:29:48 +02:00
Ralph Sennhauser 4379194255 Fix sidepanel layout in Atlas
In many places there are missing gaps/borders and where there are there
are almost random values used (2/3/4/5/8/10/15).

Add missing and standardize on using gaps 5 and 10 pixel only.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-03 19:17:28 +02:00
guerringuerrin 3922a7ee0a Prioritize least busy buildings for hotkey training commands
getTotalQueueTime(queue) calculates total remaining
queue time of a production building.
getBuildingsSortedByQueueTime(entities), sorts building selection
by their queued training time and filter invalid entities
Removes the resource availability guard from the Training selection
panel onPress handler to align mouse interaction with hotkey behavior
2026-05-27 10:29:08 -03:00
Vladislav Belov 1250ca1dac Replaces FALLTHROUGH macro by attribute
It was forgotten during removing the FALLTHROUGH macro in
b41ca5ad78.
2026-05-22 23:25:31 +02:00
Vladislav Belov a0ecfbaa33 Skips UNIFORM buffers for GLES
Currently we don't support UNIFORM buffers for GLES.

Refs 54701868da
2026-05-22 23:14:30 +02:00
phosit 01bd743b30 Correct LoadModal to continue a saved campaign
The `closePageCallback` isn't forwarted to the function calling it. Now
it's possible again to continue a saved campaign.
The error was introduced in 76b6725272.
2026-05-21 21:29:56 +02:00
Ralph Sennhauser a0bb103390 Unwrap SDL_Event
Since C++11 a C typedef'ed union can be forward declared, so the wrapper
is no longer needed.

While at it switch signatures to refs and convert C style casts.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-05-20 19:44:52 +02:00
phosit 34ab0f3938 Disconnect before deleting the session
The session was deleted from `m_Sessions` before disconnecting. Since
e7a583adc0 that also deleted the session.
2026-05-17 17:20:37 +02:00
phosit a95579a046 Fix UI when connecting to a server fails
When the connection fails, it wasn't possible to close the progress
window.
Now `PollNetworkClient` also resolves the previous promise.
2026-05-17 17:20:37 +02:00
guerringuerrin 32e5520507 Add hotkeys for opening GUI pages across the game
Add registerGlobalGuiPageHotkeys() to
common/functions_utility.js to selectively register
GUI page hotkeys
Allow active GUI pages to close using their corresponding hotkey
Move page_hotkeys.xml from gui/hotkeys/ to gui/
Update page_hotkeys.xml references in MainMenuItems and MenuButtons
Add default tipScrolling fallback in TipsPage when no initData is provided
2026-05-16 20:53:54 +02:00
wowgetoffyourcellphone 9df2dc2585 Temple of Athena Nike by @nifa
Temple of Athena Nike by @nifa

SpecificName from @Outis and @Thalatta
2026-05-14 13:38:32 +02:00
Vladislav Belov 017aa3b736 Adds splitted shader effects to materials 2026-05-10 23:57:27 +02:00
Vladislav Belov 59e36be140 Splits shader effects to reuse in material passes 2026-05-10 23:57:23 +02:00
Vladislav Belov 18a16aa135 Moves all rendering to material passes
Now we should use material passes instead of context and defines to
select a needed shader. It allows us to reduce the number of
shader combinations we use and reduce memory consumption.
2026-05-10 23:57:20 +02:00
Vladislav Belov aced56c336 Adds material passes to choose different shaders
All shaders were selected by context (set of defines) which increases
the number of needed permutations. For example: we don't need to know
about shadows when rendering silhouettes.
2026-05-10 23:57:16 +02:00
Vladislav Belov 9aee507e28 Adds wireframe techniques for particle and terrain 2026-05-10 23:57:12 +02:00
Vladislav Belov 75bd640bd8 Removes context of terrain shadows and silhouettes
We were unnecessary passing all combinations of our scene shader context
even if we don't need it as for shadows and silhouettes for terrain
rendering. Since we only need to draw a solid color.
2026-05-10 23:56:57 +02:00
Vladislav Belov 58d3527130 Adds profile table for renderer backend statistics 2026-05-10 19:26:16 +02:00
Vladislav Belov 2e87f6b5aa Adds renderer backend-specific statistics
Different backend have different metrics to watch and debug. So we need
a simple way to collect that.
2026-05-10 19:26:16 +02:00
phosit 3549cc1e6c Remove the hint that ai-rejoin isn't supported 2026-05-10 14:18:52 +02:00
phosit b3552ebccb Clone the position in attackPlan 2026-05-10 14:18:52 +02:00
phosit e2466e9bd5 Consistently sort the ai-queues
When the returned value of the compare function is `0` the order is
preserved. Before the sort, the order between joining clients and
non-joining clients differ.
Additionally sorting by name should make the order consintent.
2026-05-10 14:18:51 +02:00
phosit 6d31e6de89 Serialize the isIdleConfirmed for the AI
The AI only noticed for changes to `isIdleConfirmed`. That is done to
avoid recursions and don't send to many messages. But when the AI is
deserialized it get's `isIdle` from the simulation. Leading to an OOS.
2026-05-10 14:18:51 +02:00
phosit be03605eac Update unitCollection in attackPlan 2026-05-10 14:18:51 +02:00
phosit 86289a89fd Clone the bonuses
Sometimes the same object was serialized.
2026-05-10 14:18:51 +02:00
phosit 53a67e560f Sort templateModifications after inserting
The insertion order might not be consistent when clients join.
2026-05-10 14:18:51 +02:00
phosit b572fed672 Consistently sort the build order
When the returned value of the compare function is `0` the order is
preserved. Before the sort, the order between joining clients and
non-joining clients differ.
Now everything important (which is used later on) is included in the
comparison. If still `0` is returned it's not importent which element is
taken.

Another solution would be to have one array per category.
2026-05-10 14:18:51 +02:00
phosit c4dd0040ee Never serialize an event when it's not owned 2026-05-10 14:18:51 +02:00
phosit 2f86d4a2f8 Don't write entity-metadata when deserializing
The metadata where written every the turn of deserialization. When on
the non rejoining client it was only written when that AI makes a turn
and handles the events.
2026-05-10 14:18:51 +02:00
phosit 55f2d356ff Clone targetPos in attackPlan
On a rejoined client the data isn't the same anymore. But it's equal.
Likely this is because the data isn't aquired at the same turn.

This could also be solved more generally by copying all data which is
pushed to the AI. Or by using the same serializer for AI as for the rest
of the simulation.
2026-05-10 14:18:51 +02:00
phosit 3ddf101a06 Inform the AI about builders when initializing
This wasn't a problem since there are no builders on a fresh match but
now when deserializing there might be builders.
2026-05-10 14:18:50 +02:00
phosit 9aea56e4a2 Also serialize unitCollUpdateArray in AttackPlan
It needs to be serialized so it's known which units to update next.
2026-05-10 14:18:50 +02:00