Compare commits

...

324 commits

Author SHA1 Message Date
Vantha
3750a70926
Remove some unused getters from components
Since __________, a bunch of getter on various components are now
unused. This patch removes three of them:
- `Identity.prototype.GetRankTechName`, because it is kinda redundant since
  there's also `Identity.prototype.GetRank`.
- `Auras.prototype.GetDescriptions` and `Upgrade.prototype.GetUpgrades`
  because they are long and perform additional logic (only duplicating
  some lines from globalscripts/Templates.js).

All of the other getters are simple and kept for now because they are
useful to have in general and might be handy in the future or for mods.
2026-08-09 22:59:36 +02:00
Vantha
562c975db9
Deduplicate GetEntityState(clickedEntity) calls 2026-08-09 22:59:36 +02:00
Vantha
26cd005877
Simplify GetTemplateData calls
Previously it was made so that "template data" was a sort of super type
of "entity state" and that the former could always be replaced by the
latter. Using this we can simplify some code passages by removing
GetTemplateData calls and using the entity's state directly instead.
2026-08-09 22:59:36 +02:00
Vantha
2ff26eb85d
Rename the formation field to formationController
This patch renames the `unitAI.formation` field in entity states to
`unitAI.formationController` for clarity (there's `unitAI.formations`
as well, which was confusing)
2026-08-09 22:59:35 +02:00
Vantha
fd4a97c340
Remove selectableStance from entity states
The array was wastefully created and passed to the GUI every single
turn for every single selected unit.
Since the GUI defines the (selectable) stances' names and tooltips, it
already knew them anyway, so they don't even need to be passed from the
simulation to it in the first place.
2026-08-09 22:59:35 +02:00
Vantha
8ddbaf72e6
Optimise GetEntityState
GetEntityState is a performance-critical function in the GUI when a
large number of units are selected. The goal of this patch is to
increase the efficiency of it without modifying the returned states
visible to rest of the GUI in any way (it renames a few properties of
entities states or moves them around, but the information they contain
and the way to access it remain the complete same)

As explained the comments, certain parts (the template data) of an
entity state are "predictable" and can be reused between entities with
the same template.
What one has to account for, however, is that values of the template
data can be modified. This happens on two different levels:
Firstly, player-wide modifications, which apply to all entities owned
by that player. This includes stuff like bonuses from researched techs,
civs bonuses, team bonuses. And secondly, entity-local modifications,
which apply to individual entities. This includes buffs or debuffs from
status effects or auras (of other entities).

So we can construct a whole entity state by first just computing the
dynamic state (stuff like current hitpoints, which differs from entity
to entity) and then adding the (potentially already cached) template
data to it, which can be reused between entities with the same template
and owning player. And then overwrite the values affected by
entity-local modifications, which are usually just a few and even they
can be cached and reused for entities with the same owning player,
template, and entity-local modifications (identified by the
"modifications ID").

This saves the effort of retrieving/computing a ton of data each turn
and also saves the time it takes the engine to clone the data from the
simulation to the GUI (as the return value of the GUI interface call),
which previously took just as long as retrieving the entity states
themselves.

Since only the dynamic state is read from the components, a number of
small getter methods have become unused; they are kept (for now at
least) since they might be useful again in the future or for mods.
2026-08-09 22:59:03 +02:00
Vantha
70ace09a7e
Replace wasteful GetEntityState calls
GetEntityState is a pretty expensive function to call, in the simulation
we can check directly whether the entity has the Foundation component.
2026-08-08 17:40:56 +02:00
Vantha
520764b1c3
Add player to GetTemplateData calls where necessary
If no player is provided then the function falls back to the viewed
player, which is sometimes not the right one (like for observers), which
resulted in inconsistent/incorrect data being returned. This patch fixes
that.
2026-08-08 17:22:06 +02:00
Vantha
1c50df5c25
Split g_TemplateData into per-player cache
Previously, all templates were stored in the same cache. This was
problematic because the data returned by the GuiInterface depends on
the player passed (since it applies player modifications). The reason
this didn't cause a lot of issues is because most of the time
GetTemplateData is called without the player parameter, in which case
the viewed player is always fallen back to. In a few other cases the
viewed player is even passed directly to it, which has the same effect.

Creating one cache for each player is the best way to ensure the
stored template data is consistent and what one would expect.

Also, this allows us to stop having to reset the cache when the viewed
player is changed.
2026-08-08 17:22:06 +02:00
Vantha
a2befad973
Simplify GuiInterface.prototype.GetTemplateData
Some statements could be inlined and only passing relevant aura
templates to the TemplateHelper isn't required, so we can simply always pass
all of them and save the work.
2026-08-08 17:22:04 +02:00
Vantha
a89ce596a4
Revamp GetTemplateDataHelper
This patch is primarily meant as preparation in order to be able to
reuse this logic for GetEntityState calls in the future.

Key changes:
- Clearer API by providing different functions for different purposes.
- Slight performance optimisation by storing parameters in a context
object and pulling the info from there instead of redeclaring a lambda
each time, which it seems Spidermonkey struggled to optimise well.
- Allow computing only partial template data, specified by passing a
list of desired components. (to be used more in the future)
- Make it so the naming and structure of template data and matches 1:1
with the data in entity states. This makes accessing values from them
more consistent and would also allow e.g. adopting data between the two
in the future.
2026-08-08 17:21:44 +02:00
Stan
f90804c78f
Add macOS hint for game mode.
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
2026-08-07 14:09:25 +02:00
phosit
d6bdf51d83
Remove CStr::FromInt64$
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
For the usecase it's better to use `fmt::format`.
2026-08-06 18:03:05 +02:00
phosit
ae936e8177
Remove CStr::FromUInt
There is `std::to_string` which does the same. For most uses it's better
to use `fmt::format`.
2026-08-06 18:03:05 +02:00
phosit
06e199b12a
Remove CStr::FromInt
There is `std::to_string` which does the same. For most uses it's better
to use `fmt::format`.
2026-08-06 18:03:05 +02:00
ShadowOfHassen
84567e66c2 Fix catafalque aura typos
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
2026-08-06 13:30:42 +02:00
Vladislav Belov
c4e7364802
Removes unused BuildColor4ub from ModelRenderer
We don't need to calculate shading on CPU since we always use shaders.

Refs: a9c27b412b
2026-08-06 11:32:02 +02:00
Vladislav Belov
867bdf318b
Fixes missing material reference in ModelRenderer
Missed in 18a16aa135
2026-08-06 10:31:16 +02:00
Vladislav Belov
e64a138f92
Fixes outdated state on disabling GPU skinning 2026-08-04 23:06:12 +02:00
Vladislav Belov
4a7b7e7df1
Removes smart pointers from ModelRenderer
We don't need to use pointers because we know lifetimes of all
renderers. And its list statically defined. A new renderer should follow
DOD and use a separate submission list with a separate inplace renderer.
2026-08-04 23:06:10 +02:00
Vladislav Belov
fa90ddc8b6
Refactors ModelRenderer and makes it closer to DOD
Separates submitted models and moder renderer and makes relations
explicit. Now it's clear that we don't need separate ModelRenderer and
ModelVertexRenderer.
2026-08-04 23:06:09 +02:00
Vladislav Belov
764a420797
Merges ModelRenderer and ShaderModelRenderer
We use only shaders to render models so we don't need a separate class.

BatchModelRenderer was renamed in 6bc33fe8bd.
m_Renderer became unused in 0346ba1b18.
2026-08-04 23:06:07 +02:00
Vladislav Belov
8a2bb10827
Renames ShaderModelRenderer instances 2026-08-04 23:06:06 +02:00
Vladislav Belov
af9d102126
Removes legacy logic of reused ModelRendererPtr
It became unused in 4a69e9117e.
2026-08-04 23:06:04 +02:00
Ralph Sennhauser
822092fcb4
Fix set camera tooltip in Atlas player section
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
Refs: fe192fe58f
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-08-04 17:22:21 +02:00
Ralph Sennhauser
6e79dc2f70
Use dynamic events for Cinema Section
Replace static events with dynamic events and name delete path function
more aptly.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-08-04 17:04:22 +02:00
Dunedan
6fdcd68172
Update the actions used by the lint workflow
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
2026-08-04 10:09:22 +02:00
Dunedan
e4f4030a5e
Update the actions used by the checkrefs workflow
The workaround for the authentication problems isn't necessary with the
new version of the checkout action anymore.
2026-08-04 10:09:09 +02:00
Ralph Sennhauser
2fb6347125
Delete .already-built file prior to new build
In case the build fails this will allow other Jenkins jobs to restore
the old working state themselves.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-08-03 20:54:04 +02:00
phosit
7aa756f6a4
Remove line numbers from cppcheck supression list
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
They have to be changed to ofthen when code gets moved.
2026-08-02 14:03:28 +02:00
phosit
e712601602
PreInitGame and InitGame in the Loader
This makes the frame before the simulation starts less stuttery. Doing
it in the Loader also allows to make the progressbar more acurate.
2026-08-02 14:03:28 +02:00
Dunedan
865ca4cd55
Update the pre-commit hooks
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
2026-08-01 16:19:18 +02:00
Dunedan
dcb7cef308
Update Github actions used for pre-commit action 2026-08-01 16:19:03 +02:00
vyordan
71be79791f Use turn_id_t (int32_t) for turn-count across simulation, network and replay
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
CSimulation2 used , CSimulation2Impl mixed /, and
CTurnManager used  for the same turn-count concept, forcing a
static_cast<int64_t> at the one place these types already met
(rejoin-test comparison).

Add  (alias for std::int32_t) in SimulationCommand.h and use
it consistently for every turn counter in CSimulation2/Impl,
CTurnManager and its subclasses (CLocalTurnManager,
CReplayTurnManager), CNetServerTurnManager/CNetClientTurnManager, and
the network wire format (m_Turn in CEndCommandBatchMessage,
CSimulationMessage, CSyncCheckMessage, CSyncErrorMessage, and
m_CurrentTurn in CLoadedGameMessage).

Turn *duration* fields (m_TurnLength, m_CommandDelay,
DEFAULT_TURN_LENGTH, COMMAND_DELAY_SP/MP, SetTurnLength,
GetSavedTurnLength return type) are left as u32 — they're milliseconds,
not a counter, and out of scope here.

Remaining turn_id_t vs size_t comparisons use std::cmp_equal or
explicit casts, matching the existing pattern in Simulation2.cpp.

Fixes #8718
2026-07-31 10:34:20 +02:00
Atrik
9ab89b01c2 Add Langbart to art credits
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
2026-07-30 20:54:19 +02:00
Atrik
dcce6666ae Add missing garrison flag to some houses
Art work by @Langbart

Fixes #6911
2026-07-30 20:54:19 +02:00
Atrik
202bdb133a Add Atrik to art credits 2026-07-30 20:54:19 +02:00
Atrik
46981d2b90 Add missing garrison flag to German houses 2026-07-30 20:54:19 +02:00
Ralph Sennhauser
49c887b7ca
Don't nest Paths in Common settings
Doesn't make sense to have the Paths StaticBox inside the Common
settings StaticBox so make it a top-level item as well.

While at it dissolve nested constructors to make the creation of the
widgets more readable.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-30 18:43:24 +02:00
Atrik
91a37e32f6 Sort units spatially for freehand selection
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
2026-07-30 17:19:39 +02:00
Atrik
139b08fe6d Add tests for SelectionBoxTargeting 2026-07-30 17:19:39 +02:00
Atrik
dc6da217fd Enable using SelectionBox for targeting
Introduce a new  input, a command handler and adapt
UnitAI to handle arrays of targets in a single order
2026-07-30 17:19:39 +02:00
Atrik
e41dd2d3a4 Add Math.clamp utility function 2026-07-30 17:19:39 +02:00
phosit
c7953026dd
Use switchPage in autostart
Autostart used `OpenChildPage` to open the loading page. Because it's
started as child page the program doesn't end when closing it.
2026-07-30 12:36:51 +02:00
Ralph Sennhauser
0340cc9abd
Make NUSpline public members protected
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
Add a getter for MaxDistance and make members protected and inline
initialization.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-29 18:44:03 +02:00
Ralph Sennhauser
aeeda05433
Prefix NUSpline member variables
To follow coding convention rename the vector Node to m_Nodes,
MaxDistance to m_MaxDistance and NodeCount to m_NodeCount.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-29 18:44:03 +02:00
Atrik
0da1e0c398 Reveal Gaia wonders to players
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
2026-07-29 18:02:37 +02:00
Atrik
dc1e7179a3 Reveal and notify Wonders being constructed
Fixes #8683
2026-07-29 18:02:37 +02:00
Atrik
b6d9d87ba9 Add a test for ExploreCircle 2026-07-29 18:02:37 +02:00
Atrik
839226d542 Support revealing a small area of the map 2026-07-29 18:02:37 +02:00
Vladislav Belov
4125e5b645
Adds sRGB support to GLES 2026-07-29 01:29:11 +02:00
Vladislav Belov
f781181899
Adds sRGB support for proper lighting
Currently we're incorrectly using sRGB colors as raw inputs for lighting
instead of conversion to linear space. For proper PBR we need linear
values.
2026-07-29 01:29:09 +02:00
Vladislav Belov
e2f5b20922
Fixes GL internal format of textures in compute
In compute shaders load/store operations requires sized formats.
2026-07-28 23:32:23 +02:00
Vladislav Belov
b3165505b6
Fixes possible artifacts with GPU skinning on GL
std140 requires 16 bytes alignment and it makes alignment of uvec2 in
SkinData be equal to 16 bytes instead of 8 bytes.
2026-07-28 18:12:21 +02:00
Itms
15b9a39b00
Rebuild SPIRV shaders on all shader changes
Fixes #9096
2026-07-28 16:26:16 +02:00
Ralph Sennhauser
cf7b8aab39
Preserve Cinema Path selection
Commit 81c57e8a28 added support for adding and removing paths.
Reloading path list stores the current selection but it's unused, assume
the idea was to restore it again.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-25 17:18:16 +02:00
Ralph Sennhauser
df06b6895e
Don't mix static and dynamic events
Commit 309ed5ef28 used dynamic events
which prevents some other menu items from working properly. So don't mix
static and dynamic events for top window.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-25 14:05:38 +02:00
phosit
a80446eb59
Use the profiler to profile map generation
Instead of writing the duration to the console it uses
`Engine.ProfileStart` and `Engine.ProfileStop` to profile map
generation.

Refs: #5263
2026-07-25 10:47:49 +02:00
phosit
4122f0bfb3
Use atomic instead of COMPILER_FENCE for Profiler2 2026-07-24 17:22:44 +02:00
Ralph Sennhauser
aae1bbbab2
Use new WX object macro
Added in 2010.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-24 16:51:58 +02:00
Ralph Sennhauser
8523fa5ab4
Fix Atlas build on macOS Tahoe
Bump wxWidgets, the upstream fix was backported to 3.2.9 with commit
a6fc33b416e2ebc804d80a1ac66021935c434573

Fixes: #8594
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-24 13:14:34 +02:00
phosit
8b1e78ae1e
Use JS classes for the AI
Fixes: #6285
2026-07-23 15:15:59 +02:00
phosit
09671b49a2
Use JS classes for QueuePlan
Classes derifed from `QueuePlan` used manual inherintance.

Refs: #6285
2026-07-23 15:12:50 +02:00
phosit
327e70ea82
Use JS classes for Template and Entity
`Template` and `Entity` used a costum form of inheritance.

Refs: #6285
2026-07-23 15:12:50 +02:00
phosit
f9de339f85
Use JS classes for Terain-Analysis and InfoMap
`TerrainAnalysis` and `Accessibility` used a costum form of inheritance.

Refs: #6285
2026-07-23 15:12:50 +02:00
phosit
ea1026a1cc
Define the terrain states in a dedicated file 2026-07-23 15:12:49 +02:00
Vantha
2520c45220 Only call Engine.EndGame right before closing
Since #7786, the GUI tick completed normally after calling
`closePageCallback` instead of being cancelled like previously. Since
`Engine.EndGame` deletes the internal `g_Game` pointer, every Engine call
after it that tried to access `g_Game` caused a segfault.
This patch solves it by moving `Engine.EndGame` to the very end, right
before closing the session page.
In order to follow the convention that only functions directly closing
the page are called `closePageCallback`, that function is in turn
renamed to `closeSession`. Additionally, this allows only resolving
the promise with a bool (`showSummary`) and then only calling
`getNextPageOpenRequest` at the end of `init` for reasons of simplicity.
2026-07-22 23:51:49 +02:00
Vantha
801d21671e Correct hotkey names in Economy Walkthrough
The queue hotkey is called "session.queue", not "selection.queue"

Fixes #8939
2026-07-22 23:51:49 +02:00
Vantha
931c132b1b Fix brief text misalignment in GUI text objects
The issue was introduced by 8a2a450686.
It affected GUI text objects (CText) with `scrollbar` set to true; when
their caption was long enough for a scrollbar to be visible and then the
size changed (got bigger) so that no scrollbar was needed anymore, then
for a single frame the text was completely misaligned. This happened
because in `CText::Draw` the scrollbar wasn't updated yet, so the newly
added `GetScrollBar(0).IsVisible()` check still returned true, even
though it wouldn't end up being rendered anyway -- it was updated in
`IGUITextOwner::DrawText` eventually.

This happened to the tutorial info panel in the starting economy
walkthrough, for example. Note: in that case the scrollbar wasn't ever
drawn, but it was temporarily set visible within a frame by the JS
object resizing logic.
2026-07-22 23:51:49 +02:00
Vantha
6ed963b94c Don't check all scrollbars' visibility in CText
The CText class is designed to only work with one scrollbar, so the
any_of was pointless.
2026-07-22 23:51:49 +02:00
Vantha
a784659158 Two adjustments to the Introductory Tutorial
This patch splits the steps that said "Wait for X and then do Y" into
two different steps "Wait for X" and "Do Y".
2026-07-22 23:51:49 +02:00
Vantha
52b40aaa4f Add a tutorial panel for explaining the GUI
This patch adds a new type of tutorial steps called "GUI explanation",
with a corresponding GUI panel. The purpose of it is to explain what a
certain GUI element does. To make use of it the trigger script has to
specify the target GUI object's name as well as the side on which to
place the explanation panel relative to the target itself. The panel
then highlights the target object by fading everything else out with
black and also uses an arrow to point to it. Whilever the target GUI
object is hidden, the panel hides the background fade too and shows a
warning message.
Unlike for the other steps, the TutorialManager does not hide the
previously active panel when showing a GUI explanation, but instead
only disables it, since it could contain relevant information and the
GUI explanation panel is visibly placed "above" all other panels (in the
Z axis).
2026-07-22 23:51:49 +02:00
Vantha
27fbf02ff4 Improve the ending of tutorials
This patch introduces two functions `CompleteTutorial` and
`FailTutorial` for the tutorial steps to call. They can pass a
message to it to be shown on the victory/defeat screen.
`CompleteTutorial` is also called automatically when all steps are
finished, which resolves #8583 and prevents it from happening in the
future.
`FailTutorial` isn't used anywhere at the moment, but it'll be useful
for the future.

Fixes #8583
2026-07-22 23:51:49 +02:00
Vantha
f1a9c503b8 Support custom hint & button captions in the tutorial
This patch allows steps to override the default hint caption and button
caption set by the PanelControlSection class. This allows them to better
communicate what the player is supposed to do, e.g. don't show "Follow
the instructions" if the player is only supposed to wait.
2026-07-22 23:51:49 +02:00
Vantha
f39e71cca0 Move calls in playersFinished to handlers
This patch fixes the TODO comment in playersFinished and moves
all of the calls to handlers. The only reason for adding back the
function `handlePlayersFinished` is to prevent duplication in the "won"
and "defeated" message handlers. In the future, code to execute when
players finish in the future should exclusively be added by registering
new handlers, not by adding it to that function.
2026-07-22 23:51:49 +02:00
Vantha
6456bccebe Replace old GetState and SetState calls
966727b52e made the player state an enum and introduced more descriptive
functions to achieve the same thing, but it seems they were forgotten to
be replaced in a few places, which this patch fixes.
2026-07-22 23:51:49 +02:00
Vantha
0cc025f675 Indicate if a tutorial step is already done
If a new tutorial step has already been completed by the player it isn't
skipped, but instead shown with the continue button, so that the player
can manually switch to the next one. However, it wasn't well
communicated to the player that this was the case and why the continue
button was shown at the same time as the instruction. This patch adds a
hint "You have already done this." to explain the this to the player.
2026-07-22 23:51:49 +02:00
Vantha
05d434830f Add hotloading support to the tutorial UI 2026-07-22 23:51:49 +02:00
Vantha
2522c305dd Allow defining tutorial steps more compactly
This allows the trigger scripts to combine consecutive tutorial steps
that only differ in the `panelData.text` property into a single one that
instead defines a `panelData.texts` array.
2026-07-22 23:51:49 +02:00
Vantha
7e77065c56 Add an info panel to the tutorial
This patch adds a new tutorial step type and corresponding tutorial
panel labelled "info". It is intended to display steps whose purpose it
is to explain something to the player and give tips -- rather than
just giving instructions and telling the player what to do, like the
instruction panel does.
Also, it can show several related steps at once. To do that, the first
step has to set the 'appendable' flag to true and can also define a
title; then the succeeding steps can then set the 'appendToPrevious'
flag to true in order to do exactly that.
Note: 'info'-type tutorial steps are still supposed to be able to define
triggers, switch to the next step on their own and hide the continue
button on the info panel, to teach the topic interactively, e.g.
"Select a unit by left-clicking on it."

In order to prevent code duplication between `InfoPanel` and
`InstructionPanel` a generic superclass `TutorialPanel` is introduced,
which manages the text, hint, and button objects.
2026-07-22 23:51:49 +02:00
Vantha
6dd8139b43 Only show the last instruction in the tutorial
The idea is to add different types of panels to the tutorial in the
future. And the only texts that players might read multiple times are
tips or explanations, which the plan is to display on an entirely
separate panel anyway.
2026-07-22 23:51:49 +02:00
Vantha
c2c8f5bdf2 Remove pointless trainingDone from tutorial
In `Init` it was always overwritten to false, so `IsDone` always returned
false anyway.
2026-07-22 23:51:49 +02:00
Vantha
1f7d384c29 Fix player command handling in the tutorial
Move the code that checks whether a player command is a "continue
tutorial" into a separate method, so that it never overrides the player
command action of the active tutorial step. This could previously
happen if a step had the showContinueButton flag was set to true (and
a OnPlayerCommand method defined).
2026-07-22 23:51:49 +02:00
Vantha
2f27dcc97d Rename index to stepIndex in Tutorial.js
Makes it more clear what it is an index of.
2026-07-22 23:51:49 +02:00
Vantha
6e6864fd7c Improve internal naming of tutorial triggers
Make the naming consistent with e.g. the Triggers Demo map
Remove the "On" at the start, since it's otherwise used for message
handlers, and replace "Trigger" at the end with "Action", since that
more accurately describes what it is.
2026-07-22 23:51:49 +02:00
Vantha
702e3f1113 Revise tutorial step handling
- Remove the delay functionality from the tutorial. It was unused and
  that for a reason. Switching to the next step after a fixed amount of
  time is never wanted. It was only used to force-show the ready button
  in one case, but a designated bool communicates the purpose better.
- Rename the "ready" button to "continue" as it fits better.
- Rename "leave" to "isLast" as it's more descriptive.
- Rename the "warning" object of the instruction panel to "hint" as it's
  not always display warnings, and move its captions to the class
  prototype like the coding conventions state.
- Simplify the logic in NextStep a bit to make it more readable.
2026-07-22 23:51:49 +02:00
Vantha
f3b71a1fbf Remove unused this.fullText from the tutorial 2026-07-22 23:51:49 +02:00
Vantha
e02a2e0b31 Add support for different types of tutorial steps
This patch doesn't add any new functionality and keeps the introductory
tutorial and economy walkthrough as they are. Instead, it rearranges some
code to enable easily adding different types of tutorial steps in the
future. The idea is for each type to be displayed on a different panel
and for the TutorialManager to switch back and forth between them, and
to handle and translate the received messages from the simulation and
pass them along to the active panel. Currently, there are only
"instruction"-type steps, which are handled by the InstructionPanel in
the GUI. But new ones can be added in the future, like information boxes
or bigger objectives.
2026-07-22 23:51:49 +02:00
Vantha
ab4a9d6def Rename tutorial "goals" to "steps"
While it's currently the case everywhere, tutorial "steps" don't
necessarily have to be goals, they could be stuff like tips or info too
in general, if different types of "steps" are added in the future.
2026-07-22 23:51:49 +02:00
Vantha
dd396f19b6 Separate handling of tutorial goals and warnings
This is more explicit and makes the code cleaner.
2026-07-22 23:51:49 +02:00
Vantha
ca8a0a5611 Move "TutorialPanel" style to session styles
It's not used anywhere else besides there, so that where it belongs.
2026-07-22 23:51:49 +02:00
Vantha
663f5c5ff6 Create designated tutorial class in the GUI
This keeps messags.js shorter, prevents unnecessary GetGUIObjectByName
calls and, most importantly, makes it a lot more extensible for the
future.
2026-07-22 23:51:49 +02:00
Vantha
0e6e0280fc Prevent segfault in CMiniMap::Tick
Oversight in 01476b9836
For example, it could cause a segfault when rendering a frame after
EndGame was called therefore g_Game already deleted.
2026-07-22 23:51:49 +02:00
Ralph Sennhauser
adfe6b0c36
Convert wxString using ToStdWstring
Avoid using c-style cast to convert wxString to std::wstring.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-22 16:49:41 +02:00
Ralph Sennhauser
eae57d9aab
Fix clang-tidy modernize-avoid-bind check
And enable the check in the config.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-21 17:15:07 +02:00
Ralph Sennhauser
91a4b834a8
Add clang-tidy linting script
Add groups we might be interested in and disable failing checks.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-21 17:15:07 +02:00
phosit
9598c6c2e1
Only clone this.position when it's an object
Refs: #8951
2026-07-19 13:01:04 +02:00
phosit
e6f75f2c33
Fix displaying errors of map generation scripts
Displaying the error lead to a freeze.

Introduced in d842a134f9.
2026-07-19 11:17:35 +02:00
Ralph Sennhauser
6244d25f90
Don't generate SDL events on Atlas shutdown
WX may still generate mouse events after calling CVideoMode::Shutdown(),
so don't create SDL events triggering assertions.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-19 08:59:06 +02:00
Ralph Sennhauser
63629195ba
Wait for work to be finished before shutting down
Stopping the timers isn't sufficient, also wait for in-flight work to be
finished first.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-19 08:59:06 +02:00
Ralph Sennhauser
2fae39df3b
Use new WX event macros
Were added in 2010.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-18 13:32:23 +02:00
Ralph Sennhauser
f1181bada0 Don't install SDL default signal handler for Atlas
If we catch the signal we'd have to communicate that we terminated by
signal, which might depend on shell. There is also the issue of various
dialogs blocking regular quit which we don't want, so that would need
extra work as well.

As such just let the SIGINT/SIGTERM do there default action and forgo
cleanup and let the OS handle it.

Fixes: #198
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-18 11:50:31 +02:00
Ralph Sennhauser
309ed5ef28
Add fullscreen support to Atlas
Add a fullscreen toggle to the View menu and with a global hotkey,
reusing the default one from the main game.

Unlike the current implementation this one doesn't need the game canvas
to be focused and also works on GTK.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-18 11:33:17 +02:00
Ralph Sennhauser
3c8b7dfa7a
Fix Enter key behaviour on Windows
Commit fe192fe58f made it possible for
events to properly propagate to the top window. As on Windows Enter is
also used for navigation, i.e. used to trigger the dialogs default action,
which in our case seems to be quit.

Tell the wxSpinCtrl to fire wxEVT_TEXT_ENTER instead and handle it.

The wxCommandEvent wxEVT_TEXT_ENTER doesn't carry the value, so need to
use dynamic event binding (which is preferred way anyway).

Also show the numPlayerSpinner as a spinner instead of a text field to
match visuals to actual behaviour.

Fixes: #9026
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-18 11:24:36 +02:00
Ralph Sennhauser
32b9713781
Modernize Brush in Atlas
Use dynamic event bindings allowing to bind all events in all sort of
ways. Addionally no need for subclassing wx widgets.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-18 11:24:36 +02:00
Vladislav Belov
7ee476928b
Fixes missing window preview on Alt+Tab
There was a crash on Alt+Tab in fullscreen for some specific driver:

https://code.wildfiregames.com/D1212

It was related only to post processing so it's time to try to enable
rendering again (but with provided option to disable it). Also without
rendering we might have some bugs in other components. See:

https://github.com/libsdl-org/SDL/issues/5033#issuecomment-981819661

The issue is reported here (first one):

https://wildfiregames.com/forum/topic/129061-two-vulkan-issues-in-a27-and-unrelated-choppiness-caused-by-control-groups/
2026-07-14 19:54:00 +02:00
phosit
b89ab85415
Export functions from startingStrategy.js
The functions were defined on the `Headquarters` prototype. But not all
functions are needed outside of "startingStrategy.js". Also doing it
this way, "startingStrategy.js" and "headquarters.js" had to mutually
import each other.
2026-07-14 10:40:42 +02:00
Ralph Sennhauser
c0645c8b90
Fix value of nativewchar in premake5.lua
Available option values or "On" and "Off".

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-14 08:56:36 +02:00
Ralph Sennhauser
ca536a8cf1
Bump premake to 5.0.0-dev (2026-07-03)
This adds support for the compilcommands action, which allows to improve
the cppcheck workflow and is a requirement for include-what-you-use.

Also disable unused dependencies like is done for macOS.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-14 08:56:36 +02:00
Ralph Sennhauser
df48ad5813
Add support for premake-5.0.0-beta8
"flags" where deprecated and replaced by dedicated functions.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-14 08:56:35 +02:00
Vladislav Belov
2a6f17fbae
Uses std::string_view for UTF-8 conversions 2026-07-14 00:14:27 +02:00
Vladislav Belov
ef5088e595
Uses std::string_view for Script::Interface::Eval 2026-07-13 23:53:24 +02:00
phosit
ad08462626
Remove the first isResourceExhausted
This function is overwritten later.
This redundancy has been introduced in 4e664dd712 before only the
second existed.
2026-07-13 21:15:48 +02:00
Baelish
161da119ba Increase Max Gatherers for 'Small' Ruins
The maximum number of gathers is 1 for small ruins, I change it to 5. It is the issue 8599.
2026-07-13 19:29:03 +02:00
real_tabasco_sauce
60f9737cfb Buff halberdiers by increasing movement speed and adding 1 hack armor. 2026-07-13 09:05:10 +02:00
Vladislav Belov
5778ef6cac
Removes std::shared_ptr usages from particles 2026-07-13 01:01:03 +02:00
Vladislav Belov
d2375de187
Splits PrepareScene and remove intermediates
We don't need to have intermediate functions as they don't add something
useful.
2026-07-13 00:40:36 +02:00
Vladislav Belov
43dd988ee7
Removes render methods from GameView 2026-07-13 00:40:34 +02:00
Vladislav Belov
a2798b733f
Splits render frame function 2026-07-13 00:40:32 +02:00
Ralph Sennhauser
38d247467f
Handle incompatible mods for Atlas
In case of incompatible mods listed on the command line we can't launch
the mod selector from Atlas. Instead list the offending mods and launch
with the default mods.

Fixes: #8852
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-12 20:16:52 +02:00
Ralph Sennhauser
f4bb99094d
Stop timers on closing Atlas
Otherwise we might try to render a view when half the infrastructure is
already taken down, which results in segfaults or asserts.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-12 20:04:20 +02:00
Ralph Sennhauser
16188c7305
Add birds eye view toggle to View menu
On request by @nifa add a checked menu item to View menu to set birds eye view.

When game view is focused, the focus which it hogs almost always, then
'B' doesn't propagate properly so use Ctrl+B instead in line with other
main menu shortcuts.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-12 19:45:30 +02:00
Vladislav Belov
abf444d91c
Reduces vertex maximum stride to 16
https://wikis.khronos.org/opengl/Vertex_Specification_Best_Practices

> The alignment of any attribute's data should be no less than 4 bytes.

But to make it a bit safer for older drivers we prefer to use 16 bytes
alignment (vec4) for now to match std140.
2026-07-12 17:54:26 +02:00
Vladislav Belov
db8c05572f
Adds Vulkan vertex format verification 2026-07-12 17:09:11 +02:00
Vladislav Belov
fd99348d56
Fixes AMD Vulkan drivers crash with GPU skinning
R16G16B16_SFLOAT isn't guaranteed to be supported:
https://docs.vulkan.org/spec/latest/chapters/formats.html
See Table 17. Mandatory Format Support: 16-bit Components

It's safe to use less components:
https://docs.vulkan.org/spec/latest/chapters/fxvertex.html

> The number of components in the vertex shader input variable
> need not exactly match the number of components in the format.
> If the vertex shader has fewer components, the extra components
> are discarded.

The issue is reported here (second one):

https://wildfiregames.com/forum/topic/129061-two-vulkan-issues-in-a27-and-unrelated-choppiness-caused-by-control-groups/
2026-07-12 17:09:09 +02:00
Ralph Sennhauser
9add728945
Don't track fullscreen mode
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
SDL already does it.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-10 21:37:14 +02:00
Ralph Sennhauser
89c6bd5de6
Remove unused ActionButton
Unused and doesn't add value on top of regular wxButton, just a slightly
different API.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-10 20:24:35 +02:00
Vladislav Belov
92ee2dba9e
Removes unused OGL legacy
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
2026-07-09 22:53:30 +02:00
Vladislav Belov
552d91e92a
Removes legacy GL error handling
We have GL_KHR_debug for proper error handling. ogl_WarnIfError isn't
really useful since it doesn't provide per-call granularity and requires
recompilation. So if it'll be really needed we can wrap all GL calls
into a macro like GL_CALL.
2026-07-09 22:53:29 +02:00
Ralph Sennhauser
711a584d3e
Remove workaround for old SDL2 on Windows
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
This removes the workaround for a bug[1] @Stan confirmed was fixed
upstream in SDL2 2.20 in the mentioned bug report. On Windows we are
using 2.32.8 now.

[1] https://github.com/libsdl-org/SDL/issues/5033

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-09 16:24:09 +02:00
Atrik
d85cea244e Add projectile count to template viewer & tooltips 2026-07-09 09:25:37 +02:00
Atrik
20d8fdba43 Make onager throw 4 stones per attack 2026-07-09 09:25:37 +02:00
Atrik
ec00288b36 Add support for throwing multiple projectils
Fixes #8918
2026-07-09 09:25:37 +02:00
Vladislav Belov
63b4b35bd3
Removes unused code about GL version from OGL
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
2026-07-08 20:54:11 +02:00
Vladislav Belov
11f78e5c1a
Uses GLAD to get GL version 2026-07-08 20:52:23 +02:00
Vladislav Belov
cd872e38d7
Removes functions about extension from OGL
We use GLAD directly now.
2026-07-08 20:06:36 +02:00
Vladislav Belov
4ca83fa071
Uses GLAD to check extensions
If GLAD failed to load an extension then we can't use it. Because all
its functions are nullptr.
2026-07-08 20:06:18 +02:00
phosit
2c44b5301c
Only clone this.targetPos when it's an object
When writing 55f2d356ff, I didn't know that `clone` only handles
objects. Now there is an extra path for `undefined`.

Fixes: #8951
2026-07-08 17:00:59 +02:00
Ralph Sennhauser
99bbc24265
Remove global g_xres and x_yres
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
Instead query g_VideoMode where needed. As both g_xres and g_yres aren't
global anymore remove static from UpdateRenderer. While at it use more
desicriptive names: GetXRes -> GetWindowWidth, GetYRes ->
GetWindowHeight.

This reduces the amount of variables tracking width and height by one
each.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-08 11:35:46 +02:00
Ralph Sennhauser
b588b62304
Fix Kush main menu background
It looked ok as long as the window had a 16:9 aspect ratio, however
default window size is 4:3 which squishes the balcony.

Add a horizontal alignment support for background layers, which allows
to fix this issue for any aspect ratio.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-08 10:55:24 +02:00
Ralph Sennhauser
173d768087
Fix UB in GUISprite Draw
Using the no args constructor m_RoundCoordinates doesn't get
initialized, meaning the memory can contain whatever. We were lucky in
that in most cases random means true.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-08 09:51:17 +02:00
Vladislav Belov
2bc674cbaa
Removes extensions prior 2.1
Since we generate GL headers using GLAD with 2.1 version we don't need
to check extensions prior that.
2026-07-08 09:28:52 +02:00
Ralph Sennhauser
3b9ec75e28
Split out View main menu in Atlas
On suggestion by @nifa add a View menu.

Initially move wireframe, smooth framerate and reset camera actions
there.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-07-08 08:53:02 +02:00
Vladislav Belov
eb3f55ae27
Removes unused ogl_SquelchError
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
2026-07-08 08:13:48 +02:00
Vladislav Belov
0a22bc66f7
Makes GL error handling explicit in report 2026-07-08 08:13:46 +02:00
Vladislav Belov
0168f45a65
Refactors GL device report
It makes the report function easier to read.
2026-07-08 08:13:44 +02:00
Vladislav Belov
46af67b5bd
Removes RenderPath
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
We can render the game only with shaders so we don't need to support
fixed function pipeline as a separate render path. We only need to know
when to warn a user.

Fixes #6244
2026-07-07 23:12:45 +02:00
Vantha
fb38c8781b More versatile placement of research buttons
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
This patch allows techs to optionally define a property "placeBelow"
specifying a combination of class requirements. The selection panel then
tries to place their research button below the training button whose
unit matches these classes -- if there is only and exactly one.
This is useful for techs only affecting a single type of unit: it e.g.
allows always placing the fishing nets research button below the fishing
boats training button.
To prevent duplicating information in "placeBelow" (e.g. from
"affects"), it can also be set to two magic values: "{AffectedUnit}" and
"{UnlockedUnit}". In practice, many techs use those, but class
combination remain useful for granular control in very specific cases.

Regarding tech pairs, as explained in a comment, their two research
buttons can now be placed in three different arrangements (with
descending preference):
1. Vertically below a single training button.
2. Horizontally below two adjacent training buttons.
3. Horizontally adjacent in the bottom row (below no training buttons).

Vertically in the third and fourth rows (below no training button) --
how it was previously -- is no longer done as it'd conflict with and
doesn't fit the new layout and the clear separation between "generic"
and "specific" techs.

Whenever a research button can't be placed in their preferred location
because it is already occupied, the code simply falls back to the default
position in the bottom row.

This patch also adds a new game option to hide the new small arrows above
the research buttons in order to give more experienced players who already
know the techs well the possibility to reduce visual clutter. By
default, the arrows are shown.
2026-07-06 05:01:12 +02:00
Vantha
280a19587f Define technology pairs in an array
This patch renames the "pair" property of paired technologies to
"partOfPair" for clarity and in the pair parent packs the two techs
(previously "top" and "bottom") into an array called "pair".
This makes the hierarchy more clear in the code and pairs might not be
always placed vertically in the future.
2026-07-06 05:01:12 +02:00
Vladislav Belov
8491b7f084
Removes Unattach from emitter
We don't really need that proxy. As the main idea is to move the
ownership from a model to the particle manager.
2026-07-06 01:05:09 +02:00
joeybadz
961dfc9279 Fix the deserialization of game state for AIs
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
Adjust function arguments to prevent errors when loading/rejoining a game with AI. These occurred due to 2f2cbb96bf not adding arguments for the state/playerID

Fixes: #9001
2026-07-02 21:50:32 +02:00
Dunedan
b848e760e4
Re-use XMPP resource GUID for whole app runtime
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
Instead of using a new GUID as part of the XMPP resource for each XMPP
connection, this keeps the same GUID as long as pyrogenesis is running.

This is meant to make it easier to detect players violating the Terms of
Use by using multiple accounts to smurf or circumvent bans, as after
this change it's not sufficient anymore to connect with another account
to stay anonymous, but instead players have to restart pyrogenesis as
well.
2026-07-01 15:36:51 +02:00
Ralph Sennhauser
bc0e043696
Don't allow rotation in atlas bird view
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
except for rotation around the y axis. This makes the behaviour
consistent with the main game.

Ref: #8931
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-29 20:12:31 +02:00
Vladislav Belov
0538e95793
Makes GameView::GetCamera constant
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
2026-06-28 17:57:26 +02:00
Vladislav Belov
e0d131854d
Makes GameView returning reference on camera 2026-06-28 17:57:16 +02:00
Vladislav Belov
0cc07aa209
Removes legacy glEnable of GL_TEXTURE_2D
It needs to bo enabled only for fixed-function pipeline.

https://registry.khronos.org/OpenGL-Refpages/gl2.1/

> If enabled and no fragment shader is active, two-dimensional texturing is performed
2026-06-28 15:56:33 +02:00
Vladislav Belov
74f11d2fd2
Adds const to particle emitter type
Emitter type must not be changed during any emitter update.
2026-06-28 14:30:44 +02:00
Vladislav Belov
7790c0972b
Removes legacy timers
Modern profiling tools provide more details and more precise
measurements for more platforms. For simpler cases we have our in-game
profiler.
2026-06-28 13:34:01 +02:00
Vladislav Belov
fa0e593669
Replaces virtual by override for particle emitters 2026-06-28 12:01:39 +02:00
Ralph Sennhauser
4967922447
Don't load WGL
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
Depend on SDL and wxWidgets doing the necessary work.

Also remove WGL from glad.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-28 09:49:26 +02:00
Ralph Sennhauser
d58e605992
Remove dependency on X11
Glad GLX was the last consumer of X11 libraries as such we no longer
depend on X11 directly.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-28 09:49:26 +02:00
Ralph Sennhauser
a27fe1f8a1
Drop EGL and GLX from glad
Also regenerate files with latest glad and vulkan 1.4.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-28 09:49:26 +02:00
Ralph Sennhauser
c5a9d18cfa
Drop use of GLX and EGL
Only used for hw-report and only when using GLX which is for X11 only.
The usefulness of those reported properties is questionable and X11 is
becoming rarer.

This allows us to drop a direct dependency on X11 delegating the
handling to SDL and wxWidgets respectively GTK.

Further SDL3 wont expose supported video driver at compile time making
this step more meaningful.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-28 09:49:26 +02:00
Ralph Sennhauser
9baa3bcd62
Drop DGA mouse workaround
Is no longer supported in SDL2, so this workaround does nothing anymore.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-28 09:49:25 +02:00
Ralph Sennhauser
08cd7e9096
Drop vsync workaround for wxWidgets
wxWidgets already sets it's prefered mode.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-28 09:49:25 +02:00
Ralph Sennhauser
0bfd703eda
Drop XInitThreads workaround
GTK used by wxWidgets on Unix calls it when creating an X11 window as
does SDL. As such this is no longer needed and we avoid a direct
dependency on X11.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-28 09:49:25 +02:00
Vladislav Belov
1709149740
Adds instancing to particles
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
We use instancing to provide dynamic data for particle only once and not
for each vertex.
2026-06-22 23:18:29 +02:00
Vladislav Belov
50d82810bc
Moves UV coordinates to a separate vertex buffer
UV coordinates are constant so we don't need to upload them each frame.
Ideally we shouldn't have UV coordinates at all as we could use
gl_VertexID but it's not available on all supported GLSL versions.
2026-06-22 23:18:27 +02:00
Vladislav Belov
1380a93077
Packs particle size and angle to axes
We need to have per-vertex data to be constant to use instancing.
Now we have only UV coordinates.
2026-06-22 23:18:26 +02:00
phosit
e82f8ac5ac
Log instead of crash on compile error in the gui
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
Refs: #8195
2026-06-21 20:05:39 +02:00
phosit
b0af0971e3
Don't crash on compile error of hotloads
Hotload functions aren't expected to throw an error. Instead return the
error to the function who is waiting for the module.
2026-06-21 20:05:39 +02:00
Vladislav Belov
db9f60b540
Renders only alive and visiable particles
We don't need to update and render dead or invisible particles. The
code still uploads the whole chunk but I'll improve that later.
2026-06-21 18:40:52 +02:00
Ralph Sennhauser
8bb72251ec
Drop use of off_t in soundmanger
The ogg library itself doesn't use off_t, mostly just int and long.

With off_t being problematic as Windows doesn't support _FILE_OFFSET_BITS
replacing this removes a potential headache.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-21 13:27:00 +02:00
Vladislav Belov
45cb592f22
Adds ability to enable smooth framerate in Atlas
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
2026-06-21 11:30:27 +02:00
Ralph Sennhauser
f9af0e571a
Mark ownership using unique_ptr in Atlas sections
And remove unused destructors.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-21 09:16:11 +02:00
Vladislav Belov
54b529ddac
Fixes crash for too many particles
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
The maximum number of particles was unbound. It's bound by the
number of maximum vertices per vertex buffer.
2026-06-20 21:45:55 +02:00
vyordan
ec8b420abc
Move Script* classes to Script namespace
- Rename ScriptEngine, ScriptContext, ScriptInterface, ScriptRequest to
  Script::Engine, Script::Context, Script::Interface, Script::Request
- Remove 'Script' prefix from filenames:
  ScriptContext.* → Context.*
  ScriptInterface.* → Interface.*
  ScriptRequest.* → Request.*
  ScriptEngine.* → Engine.*
  ScriptConversions.* → Conversions.*
  ScriptExceptions.* → Exceptions.*
  ScriptForward.* → ForwardDeclarations.*
  ScriptStats.* → Stats.*
- Update all includes, forward declarations, and friend classes
- Use namespace Script { ... } in .cpp definitions to avoid repetitive
  Script:: prefix (keeping global callbacks outside)
- Rename internal implementation structs:
  ScriptInterface_impl → Interface_impl
  ScriptFunction → Function
- Update copyright year to 2026 in all touched files
- Suppress pre-existing cppcheck warnings (uninitvar, nullPointer, unknown
  macro) by adding them to suppressions-list.txt (these are not caused
  by this refactor)

Fixes #7516
2026-06-20 17:43:00 +02:00
Ralph Sennhauser
310c4bf028
Add staticbox padding style in Atlas
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
GTK static box doesn't have padding, so add a style variable to allow
adding a custom padding.

Replace implicit padding with explicit padding where needed.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-20 14:38:42 +02:00
Vladislav Belov
d23f9e1da3
Adds a storage check for resolve PBR shader
We need to check for storage support because we outpout result into a
storage. Note: it seems we might have a bug inside GL backend or inside
Mesa drivers which prevents us from running resolve on compute.
2026-06-20 13:29:14 +02:00
Vladislav Belov
7a19f38070
Allows floating point textures based on extension 2026-06-20 13:29:13 +02:00
Vladislav Belov
f72c0c1c09
Enables fragment PBR resolve shader in PostProc 2026-06-20 13:29:11 +02:00
Vladislav Belov
8c5416e2c5
Adds fragment shader PBR resolve
It allows to have PBR for devices without properly detected compute
shaders.
2026-06-20 13:29:01 +02:00
Ralph Sennhauser
181a29597d
Remove helper function FileExists
Use std::filesystem at caller site instead.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-20 12:01:38 +02:00
Vladislav Belov
5ca4c93f55
Reduces canvas2d layout for SPIR-V
It's preferrable to keep push constant under 64 bytes for some vendors.
The layout optimization rule is similar to C++ one.
2026-06-20 11:22:29 +02:00
Ralph Sennhauser
355c068068
Remove helper function FileSize
Use std::filesystem at caller site instead.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-20 09:00:57 +02:00
phosit
364d50e184
Move the gameView input handler to CGameView
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
`game_view_handler` isn't global anymore. That makes the interface
simpler and might make the compilation and the runtime faster.
2026-06-19 20:53:52 +02:00
phosit
3bf8e92ed4
Move the profileViewer handler to CProfileViewer
`CProfileViewer::InputThunk` isn't global anymore. That makes the
interface simpler and might make the compilation and the runtime faster.
2026-06-19 20:53:52 +02:00
phosit
80d5fd7a52
Move the gui input handler to CGUIManager
`gui_handler` isn't global anymore. That makes the interface simpler and
might make the compilation and the runtime faster.
2026-06-19 20:53:52 +02:00
phosit
b2a8f94a20
Move the console input handler to CConsole
`conInputHandler` isn't global anymore. That makes the interface simpler
and might make the compilation and the runtime faster.
2026-06-19 20:53:52 +02:00
phosit
596c0c2ddd
Split screenshot from main input handler
This enables the screenshot hotkeys in atlas.
2026-06-19 20:53:52 +02:00
phosit
464d40ab61
Split window from main event handler
Two globals can be removed.
2026-06-19 20:53:52 +02:00
phosit
3af4287f6d
Change the return type of event-handler
The return value is more strongly typed.
2026-06-19 20:53:52 +02:00
phosit
47e8a17a41
New input handling system
The new system allows to register all function objects as Input::Handler
not only function pointers.
To not get dangling references a handler is unsubscribed on it's
destruction.
The order in with the handlers are executed has to be specified by the
slot-argument, instead of the reverse order of registration.
2026-06-19 20:53:51 +02:00
Ralph Sennhauser
02d9a083aa
Restore visiblity on sim reset in Atlas
The LOS override for all players isn't serialized as such we have to
restore it when resetting a game.

Fixes: #8926
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-19 19:55:42 +02:00
Ralph Sennhauser
628713859f
Don't send default setting to engine
Sending default setting on first view of a section/tool to the engine
triggers the "you have changes" mechanism. Sending them just in case
isn't needed unless there is a bug in a different place.

Drop this preemptive measure.

Fixes: #3029
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-19 19:25:09 +02:00
Ralph Sennhauser
52dee75c47
Remove unused helpers from wfilesystem
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
Were used for mtime conversion. Cpp-20 has std::chrono::file_clock.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-18 20:47:34 +02:00
Ralph Sennhauser
3c0274c7cc
Remove unused android filesystem helpers
We don't use neither opendir nor readdir nor closedir. Further there are
no callers for init_libc().

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-18 19:48:05 +02:00
Ralph Sennhauser
62e116340e
Remove POSIX rename wrapper
Unused by now, use `<filesystem>` instead.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-18 17:46:00 +02:00
Ralph Sennhauser
792949e812
Remove POSIX mkdir wrapper
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
Unused by now, use `<filesystem>` instead.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-18 10:53:30 +02:00
Ralph Sennhauser
ca3bacf6c1
Update Atlas sidebar layout
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
Replace the wxBoxSizer with a wxFlexGridSizer so the gaps between main
elements, typically wxStaticBoxSizer, remain uniform across the tools.

Add a style variable to control the wxFlexGridSizer on platform basis.

Also replace the obsolete wxScrolledWindow by inheriting from
wxScrolled<wxPanel> instead.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-17 18:58:02 +02:00
Ralph Sennhauser
e3c65841de
Replace all uses of POSIX stat
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
Use `<filesystem>` instead of `stat` and remove wrapper.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-17 13:14:28 +02:00
Ralph Sennhauser
fab4a132e1
Fix camera reset under bird view in Atlas
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
Resetting camera while in bird view should reset birdview flag.

Fixes: 9388692a47
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-16 19:20:53 +02:00
Ralph Sennhauser
8336e679af
Replace all uses of POSIX realpath
Use `<filesystem>` instead of `realpath` and remove wrapper.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-16 14:08:02 +02:00
Ralph Sennhauser
6b4ecbdc40
Create dedicated stylesheet for Atlas
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
This is meant as a central place to tweak layout per platform.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-15 21:27:42 +02:00
Ralph Sennhauser
149baf116b
Replace all use of POSIX truncate
Use `<filesystem>` instead of `truncate` and remove `truncate`
portability wrapper.

Add a helper function `StatusFromSystemError` to convert error_code to
`Status`.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-15 15:33:59 +02:00
Ralph Sennhauser
57f5b73458
Remove unused wrapper for POSIX rmdir
std::filesystem::remove can be used instead.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-15 15:33:59 +02:00
Ralph Sennhauser
518ed74496
Replace all use of POSIX unlink
Use `<filesystem>` instead of `unlink` and remove `unlink` portability
wrapper.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-15 15:33:59 +02:00
Vladislav Belov
4259c78150
Removes unused Get/SetDepthTextureBits methods
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
Methods were added in f903b83674.
Methods became unused in 12e2428495.
2026-06-15 00:35:04 +02:00
Ralph Sennhauser
71400e8045
Drop unused lowlevel functions
and associated types. Aka posix dirent.h abstraction.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-14 21:58:59 +02:00
Ralph Sennhauser
43e7dbc6da
Use std::filesystem for filesystem abstraction
Drop the use of lowlevel interfaces and consitently use the cpp
interface decupling it from systm dependent code.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-14 21:58:59 +02:00
phosit
2f2cbb96bf
Remove this.isDeserialized from BaseAI
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
`this.isDeserialized` is only required for AIs which `Deserialize`
function depends on the game state.
2026-06-14 17:52:54 +02:00
phosit
a4b580991b
Move this.turn to PetraBot
The `BaseAI` shouldn't make assumptions whether the AI runs every turn.
2026-06-14 17:52:54 +02:00
phosit
babe9e5c18
Remove this.events from AIs
`this.events` is only valid during one turn. When it is used in the next
turnn it might be outdated. So it makes no sense to keep it alive untill
the next turn.
2026-06-14 17:52:54 +02:00
phosit
cbce748b8c
Remove moduleName from Petras data.json
It was accidentally re-introduced in 88dc947b6a.
2026-06-14 13:21:26 +02:00
Ralph Sennhauser
1ab55e7f2e
Remove leftover code from wxCollapsiblePane use
There is a workaround for an old bug with the use of wxCollapsiblePane.
As the widget itself is no longer in use, just remove the now dead code.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-13 18:34:09 +02:00
Ralph Sennhauser
b4fe426963
Replace notebook with choicebook
The terrain selection notebook is painful to navigate with a large
amount of tabs. Further the control is broken on macOS. As such replace
the wxNotebook with a wxChoicebook.

Fixes: #8705
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-13 16:57:32 +02:00
Ralph Sennhauser
8cb4f5e4a3
Fix negative content width GTK warnings in Atlas
Interdependent content width in terrain selection panel results in GTK
throwing warnings. Don't expand the grid cell content.

Also wrap the grid to keep spacing consistent and not variable for the
terrain buttons.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-13 13:38:44 +02:00
Ralph Sennhauser
9388692a47
Add bird view to Atlas
Fixes: #2657
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-12 21:54:01 +02:00
Ralph Sennhauser
fa9584fdc0
Fix some Atlas header includes
iwyu 0.26 now want's full declaration of TYPE in case of
std::vector<TYPE>, which is good as it allows the header to be
self standing.

There are some other changes suggested in part of the headers not being
updated when they should have been and some due to changes in iwyu
itself.

Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-12 21:22:36 +02:00
Ralph Sennhauser
7f4377c086
Treat <wx/defs.h> as private header
Add the header to iwyu mappings as private as the wx documentation
doesn't suggest otherwise.

Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-12 21:22:36 +02:00
animus
1034b55037 Rename class names postifxed with "Man" to "Manager".
A regex-based
search across the codebase confirms there are no other instances
of "Man" that should be renamed to "Manager".
Variables were not renamed.
2026-06-12 18:35:32 +02:00
animus
b1627f5158 Remove redundant virtual keywords
This commit performs code cleanup to improve
code clarity and consistency:

Remove redundant 'virtual' keywords from methods that are already marked
with 'final' or 'override', as well as reducing redundant 'override
final's to 'final'.
2026-06-12 18:35:32 +02:00
Jonny McCullagh
917275d6cb Add more tips incl the Arsenal and Great Hall
Fixes #8914
2026-06-12 10:44:41 +02:00
mehmed-faheim-arslan
50e1f51755 Draw trainer section before tree section
Previously, TreeSection was drawn before TrainerSection.
Reversing the order ensures TrainerSection layout is resolved first,
which fixes scroll state being computed against an incomplete
structree page render.

Fixes #8893
2026-06-10 20:55:52 +02:00
mehmed-faheim-arslan
39b1311fac Allow players to set rally points on allied buildings
Instead of storing a single flat list of positions and data per
building, RallyPoint now stores them keyed by player ID. This lets
mutual allies independently set and display rally points on each
other's structures.

The GUI now allows selecting allied buildings with a rally point
and only shows the viewing player's own rally point data.
GuiInterface gets an OnUpdate handler to keep displayed positions
in sync when rally point targets move.

GetRallyPointCommands now takes raw position and data arrays instead
of a component reference. The network command field is also renamed
from "entities" to "structures".

Fixes #3115
2026-06-10 00:09:48 +02:00
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
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
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
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
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
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
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
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
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
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
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
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
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
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
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
phosit
f35595610a
Sort entitycollections when adding entities
On joining clients entitycollections are always sorted. To stay in sync
non-joining clients also have to sort entitycollections.
2026-05-10 14:18:50 +02:00
phosit
130ea06ce8
Don't add queues when deserializing AttackPlans
When deserializing the queues are already there. It was an error to try
to add a queue since sometimes there must not be a queue.
2026-05-10 14:18:50 +02:00
phosit
cca2cfe05c
Don't updateTerritories when deserializing
Clients which didn't late-join only get a change to `uptadeTerritories`
when the ai playes a turn. When joining clients do it at the turn when
they deserialize the ai they might be ahead of the others. That would
lead to an out of sync.
2026-05-10 14:18:50 +02:00
phosit
e9339591c2
Reset turnCach at the begin of the turn 2026-05-10 14:18:50 +02:00
phosit
911285e625
Always update territories 2026-05-10 14:18:50 +02:00
phosit
4b516b336e
Get the UnitAI order data directly
The cached data wasn't always up to date. I coudn't figure out when to
update it.
2026-05-10 14:18:50 +02:00
phosit
3afdf64eee
Update territories when a construction is finished
Constructions can change the territories. So they should be updated.
2026-05-10 14:18:50 +02:00
phosit
f5e926f6fe
Remove remanents of entityObj
All uses have been removed.
2026-05-10 14:18:49 +02:00
phosit
b6243966f3
Remove usage of entityObj from Destroy event
`entityObj` is not available on clients which just have rejoined. As not
all clients have access to it the data shouldn't be used for anything
elaborate.
2026-05-10 14:18:49 +02:00
phosit
0a2294171e
Remove usage of entityObj in VictoryManager
This is done by remembering the ID of the assigned healers and guards.
2026-05-10 14:18:49 +02:00
phosit
b59d2c91e3
Remove usage of entityObj in TradeManager
Now `source` and `target` are only entityID. So that we can check
whethero one of them got destroied.
Additionaly it's much simpler to serialize.
2026-05-10 14:18:49 +02:00
phosit
d18a6392b3
Reduce usage of entityObj in SharedScript
The information where a unit is and which resource it provides wasn't
available on joining clients. Now the `resourceMap` is reset when a
resource is destroide.

It would be performance intensive when the `resourceMap` would be reset
when any unit would be destroied. To prevent this the `SharedScript`
remembers which entities are resourcesources.
2026-05-10 14:18:49 +02:00
phosit
8d7de7fde7
Remove usage of entityObj in BuildManager
When destroying a builder it might not be known anymore what it was able
to build. Now the entityIDs of the builder is stores. So that it can
easily be looked up and removed.
2026-05-10 14:18:49 +02:00
phosit
4f6b01ccb8
Reduce usage of entityObj in BasesManager
Some functions in the `BaseManager` expect a complete entity but only
the ID is used. When an entity is destroied the entity isn't available
anymore.
2026-05-10 14:18:49 +02:00
phosit
7b50e32b28
Always delete metadata when destroying entities
On newly deserialized clients there is no property for the destroied
entities. Because of that the metadata of the entity wasn't remembered
in the event and wasn't destroied.
2026-05-10 14:18:49 +02:00
phosit
08340ca18a
Call GetFullRepresentation only internally
`GetFullRepresentation` doesn't reset `this.changes` to `null`. So when
a message arrives the ai-interface will not be informed.
The ai-interface calls `GetFullRepresentation` and removed the dirty
flag from the ai interface.

This two behaviors lead to the error that the ai never receives messages
from entities which exist at game start.
2026-05-10 14:18:49 +02:00
phosit
f81cf7e602
Clear changedEntities on initialization
When initialized all entities get queried. But the set of entities to
query wasn't cleard. This lead to an OOS.
2026-05-10 14:18:48 +02:00
phosit
e07b4df6ba
Serialize dropsiteSupplies
The assignement has to be done for new dropsite but must not always be
done as it sends a command.

Serialized data shouldn't be too complicated. Because of that the `ent`
property is removed.
2026-05-10 14:18:48 +02:00
phosit
6facc9ee17
Fix AI OOS on rejoin related to random calls
Based on a diff from @Silier: https://code.wildfiregames.com/D2573
2026-05-10 14:18:48 +02:00
phosit
8151e18d51
Enable the ai to be tested with -serializationtest 2026-05-10 14:18:48 +02:00
phosit
c042b3ca2c
Start the serializationtest at a specivic turn
This enables to only test critical game sections.
2026-05-10 14:18:48 +02:00
vyordan
843f39ba55 Use dynamic budget for progressive load timeout
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
The progressive load timeout was hardcoded to 10ms, causing the CPU
to be mostly idle during map loading. This commit replaces the fixed
value with a dynamic budget derived from the display refresh rate
when VSync is enabled, or from the configured adaptivefps.menu limit
otherwise.

Fixes: #8774
2026-05-07 19:38:31 +02:00
phosit
f38b956eb3
Update code owners
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
2026-05-04 18:47:53 +02:00
Jonny McCullagh
e903506f13 More ai names for the germans
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
Fixes: #8408

Forum thread: https://wildfiregames.com/forum/topic/140675-more-ai-names-for-the-germans/
2026-05-02 13:13:01 +01:00
wowgetoffyourcellphone
5268cb62a6 Persians -> Achaemenids
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
Persians -> Achaemenids
Pers -> Achae

Addressing Checkrefs

Internal Achaemenid and Persian references

Reported by @Stan`

Update unit_tables.py
2026-05-02 02:50:39 +02:00
Ralph Sennhauser
6514230330
Allow building without lobby
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
Commit 6a8366b99a added additional
libraries to the report but didn't consider gloox be optional. Address
this false assumption allowing to build pyrogenesis without lobby
support.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-05-01 08:20:38 +02:00
Vladislav Belov
a7967d4ad9
Adds PBR output texture to PostProc
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
2026-04-29 19:25:14 +02:00
Vladislav Belov
25df2d8a02
Adds resolve PBR compute shader
Also fixes sky shader as it was writing negative values for -Y
direction.
2026-04-29 19:25:12 +02:00
Vladislav Belov
1a277269d3
Adds floating point textures to backends
R8G8B8A8_UNORM isn't enough to store HDR data as the scene can brighter
than 1.0 especially when looking into sun speculars.
2026-04-29 19:25:11 +02:00
Vladislav Belov
c4fb0eed3a
Adds slider to developer overlay
Also adds PBR config values. Refs #8535
2026-04-29 19:25:03 +02:00
phosit
0f7417bb47
Remove Engine.SwitchGuiPage
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
This function isn't used by JavaScript anymore.

Fixes: #6929
2026-04-26 12:44:41 +02:00
phosit
bb714c89ef
Remove Engine.SwitchGuiPage from summary 2026-04-26 12:44:41 +02:00
phosit
2415b41438
Remove Engine.SwitchGuiPage from session 2026-04-26 12:44:41 +02:00
phosit
76b6725272
Remove Engine.SwitchGuiPage from campaigns 2026-04-26 12:44:41 +02:00
phosit
434a1a1905
Remove Engine.SwitchGuiPage from mod 2026-04-26 12:44:41 +02:00
phosit
3126a249d2
Remove Engine.SwitchGuiPage from locale 2026-04-26 12:44:41 +02:00
phosit
340a4d64ca
Remove Engine.SwitchGuiPage from lobby
Since the page now isn't closed immediately, the `onTick` has to be
cleared.
2026-04-26 12:44:40 +02:00
phosit
3edda64566
Remove Engine.SwitchGuiPage from gamesetup 2026-04-26 12:44:40 +02:00
phosit
2f1bf9531b
Remove Engine.SwitchGuiPage from replay menu 2026-04-26 12:44:40 +02:00
phosit
d842a134f9
Remove Engine.SwitchGuiPage from loading 2026-04-26 12:44:40 +02:00
phosit
02a4cf6aff
Remove Engine.SwitchGuiPage from autostart 2026-04-26 12:44:40 +02:00
phosit
5b5a7f9dc8
Remove Engine.SwitchGuiPage from gamesetup_mp 2026-04-26 12:44:40 +02:00
phosit
4ff3abf203
Remove Engine.SwitchGuiPage from prelobby 2026-04-26 12:44:40 +02:00
phosit
c1a50c7012
Remove Engine.SwitchGuiPage from main menu 2026-04-26 12:44:40 +02:00
phosit
3d8971daca
Remove pageLoop
That functionality is now built in to the engine.
2026-04-26 12:44:39 +02:00
phosit
6ead0d2f92
Add Engine.openRequest
Pages can replace themselfe by another (continuation) page.
2026-04-26 12:44:39 +02:00
Vladislav Belov
456e2a0b56
Removes dummy GL functions as replaced by core
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
2026-04-25 17:47:06 +02:00
Vladislav Belov
9b79fb3793
Fixes particle solid axes after aae957ec7b
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
2026-04-25 15:58:25 +02:00
Vladislav Belov
dd9124ae99
Fixes Vulkan uniform buffer size after 9e371824c2
32 was accidentally added during debugging.
2026-04-25 11:55:12 +02:00
2162 changed files with 41160 additions and 40109 deletions

View file

@ -28,9 +28,9 @@ source/tools/spirv/.* @vladislavbelov
## == Scripts
## GUI
binaries/data/mods/public/gui/.* @Phosit @wraitii
binaries/data/mods/public/gui/.* @Vantha @wraitii
## AI
#binaries/data/mods/public/simulation/ai/.*
binaries/data/mods/public/simulation/ai/.* @Phosit
## Balancing
binaries/data/mods/public/simulation/(data|templates)/.* @real_tabasco_sauce

View file

@ -11,7 +11,7 @@ jobs:
lfscheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- name: Fetch the base branch
run: git fetch origin ${{ env.BASE_SHA }}
@ -24,27 +24,14 @@ jobs:
env:
GIT_LFS_SKIP_SMUDGE: "1"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.11"
- name: Add remote fork origin for LFS
run: |
PR_REPO="${{ gitea.event.pull_request.head.repo.full_name || gitea.repository }}"
git remote add ${{ gitea.actor }} https://gitea.wildfiregames.com/${PR_REPO}.git
- name: Workaround for authentication problem with LFS
# https://gitea.com/gitea/act_runner/issues/164
run: |
git config --local \
http.${{ gitea.server_url }}/${{ gitea.repository }}.git/info/lfs/objects/.extraheader ''
PR_REPO="${{ gitea.event.pull_request.head.repo.full_name || gitea.repository }}"
EXTRAHEADER="$(git config --get --local http.${{ gitea.server_url }}/.extraheader)"
git config --local \
http.${{ gitea.server_url }}/${PR_REPO}.git/info/lfs/objects/batch.extraheader \
'${EXTRAHEADER}'
git config --local \
http.${{ gitea.server_url }}/${PR_REPO}.git/info/lfs/objects/.extraheader ''
- name: Download necessary LFS assets
shell: sh {0}
run: |

View file

@ -12,7 +12,7 @@ jobs:
cppcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
# cache only works for items in workspace, so configure apt to allow for caching.
- name: Setup apt cache locations
@ -26,7 +26,7 @@ jobs:
- name: Cache apt pkg db and and deb files
id: apt-cache
uses: actions/cache@v4
uses: actions/cache@v6
with:
path: |
apt-cache
@ -49,11 +49,11 @@ jobs:
copyright:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
fetch-depth: 100
- uses: actions/setup-python@v5
- uses: actions/setup-python@v7
with:
python-version: "3.11"
@ -66,10 +66,10 @@ jobs:
jenkinsfiles:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v7
with:
node-version: '20'

View file

@ -7,17 +7,17 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.11"
- id: restore-pip-cache
uses: actions/cache/restore@v4
uses: actions/cache/restore@v6
with:
key: pip-cache-v1-${{ github.workflow }}
path: ~/.cache/pip
- uses: pre-commit/action@v3.0.1
- uses: actions/cache/save@v4
- uses: actions/cache/save@v6
if: steps.restore-pip-cache.outcome == 'success'
with:
key: pip-cache-v1-${{ github.workflow }}

3
.gitignore vendored
View file

@ -32,8 +32,9 @@ build/bin/
source/tools/spirv/rules.json
# Linting
cppcheck-error.log
compile_commands.json
copyright-check-error.log
cppcheck-error.log
# Files generated by running premake5
build/premake/.gccmachine.tmp

View file

@ -34,7 +34,7 @@ repos:
\.patch$
)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.9
rev: v0.16.0
hooks:
- id: ruff-check
args:
@ -56,7 +56,7 @@ repos:
files: ^binaries/
exclude: (^binaries/data/mods/(mod|public)/art/.*\.xml|\.dae$)
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.12.0-2
rev: v3.13.1-1
hooks:
- id: shfmt
args:
@ -67,7 +67,7 @@ repos:
hooks:
- id: shellcheck
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.45.0
rev: v0.47.0
hooks:
- id: markdownlint
language_version: 22.14.0
@ -77,13 +77,13 @@ repos:
^source/third_party/
)
- repo: https://github.com/adrienverge/yamllint
rev: v1.37.1
rev: v1.38.0
hooks:
- id: yamllint
args:
- --strict
- repo: https://github.com/eslint/eslint
rev: v9.39.2
rev: v10.8.0
hooks:
- id: eslint
language_version: 22.14.0

View file

@ -107,6 +107,10 @@ shadowscovermap = false
renderer.scale = 1.0
renderer.upscale.technique = "fsr"
; Allows to disable rendering when the game window is out of focus. It might
; save some performance or fix old driver crashes on out of focus.
renderer.renderwhenoutoffocus = "true"
vsync = false
particles = true
fog = true
@ -148,9 +152,6 @@ renderer.backend.vulkan.debugwaitidlebeforeacquire = false
renderer.backend.vulkan.debugwaitidlebeforepresent = false
renderer.backend.vulkan.debugwaitidleafterpresent = false
; Should not be edited. It's used only for preventing of running fixed pipeline.
renderpath = default
; (0 - low, 1 - medium, 2 - high), higher quality means worse performance.
textures.quality = 2
@ -160,10 +161,19 @@ textures.maxanisotropy = 2
; GPU skinning via compute shaders, requires up-to-date drivers
gpuskinning = true
; Currently experimental feature to transit to PBR pipelines.
pbr = false
; We might want to render to different texture formats depending on quality and
; performance we need. We support: r11g11b10, rgba16, rgba32.
pbr.framebufferformat = "rgba16"
; Adjust exposure of the scene.
pbr.brightness = "0.5"
; Use smooth LOS interpolation
smoothlos = true
; Use screen-space postprocessing filters (HDR, bloom, DOF, etc). Incompatible with fixed renderpath.
; Use screen-space postprocessing filters (HDR, bloom, DOF, etc).
postproc = true
; Use anti-aliasing techniques.
@ -223,6 +233,12 @@ summary = "Ctrl+Tab" ; Toggle in-game summary
lobby = "Alt+L" ; Show the multiplayer lobby in a dialog window.
structree = "Alt+Shift+T" ; Show structure tree
civinfo = "Alt+Shift+H" ; Show civilization info
catafalque = "Alt+Shift+F" ; Show catafalque overview
mapbrowser = "Alt+Shift+M" ; Show map browser
manual = "Alt+Shift+U" ; Show manual
tips = "Alt+Shift+I" ; Show tips and tricks
options = "Alt+Shift+O" ; Show options
hotkeys = "Alt+Shift+Y" ; Show hotkeys
; > CLIPBOARD CONTROLS
copy = "Ctrl+C" ; Copy to clipboard
@ -379,9 +395,6 @@ defense_tower = "Space+W"
market = "Space+M"
dock = "Space+D"
[hotkey.gamesetup]
mapbrowser.open = "M"
[hotkey.session]
kill = Delete, Backspace ; Destroy selected units
stop = "H" ; Stop the current action
@ -504,6 +517,7 @@ defaultformation = "special/formations/box" ; For walking orders, automatically
formationwalkonly = "true" ; Formations are disabled when giving gather/attack/... orders.
howtoshownames = 0 ; Whether the specific names are show as default, as opposed to the generic names. And whether the secondary names are shown. (0 - show both; specific names primary, 1 - show both; generic names primary, 2 - show only specific names, 3 - show only generic names)
selectformationasone = "true" ; Whether to select formations as a whole by default.
techarrows = true ; Whether to show an arrow above some techs that indicates which unit they affect or unlock.
[gui.session.minimap]
; Icons that are displayed for some entities on a minimap.

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<objects>
<script file="gui/OpenRequest/Continuation/Script.js"/>
</objects>

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<page>
<include>OpenRequest/Continuation/Object.xml</include>
</page>

View file

@ -0,0 +1,4 @@
async function init(arg)
{
return arg + " Continuation";
}

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<objects>
<script file="gui/OpenRequest/Entry/Script.js"/>
</objects>

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<page>
<include>OpenRequest/Entry/Object.xml</include>
</page>

View file

@ -0,0 +1,7 @@
async function init()
{
return { [Engine.openRequest]: {
"page": "OpenRequest/Continuation/Page.xml",
"argument": "Entry"
} };
}

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<objects>
<script file="gui/OpenRequest/Root/Script.js"/>
</objects>

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<page>
<include>OpenRequest/Root/Object.xml</include>
</page>

View file

@ -0,0 +1,13 @@
async function init()
{
const result = await Engine.OpenChildPage("OpenRequest/Entry/Page.xml");
await new Promise(closePageCallback =>
{
globalThis.closePageCallback = () =>
{
closePageCallback();
return result;
};
});
}

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<material>
<required_texture name="baseTex"/>
<shader effect="dummy"/>
<shader pass="main" effect="dummy"/>
</material>

View file

@ -24,9 +24,23 @@
<empty/>
</element>
</optional>
<element name="shader">
<attribute name="effect"/>
</element>
<oneOrMore>
<element name="shader">
<attribute name="effect"/>
<attribute name="pass">
<choice>
<value>main</value>
<value>shadow_caster</value>
<value>silhouette_occluder</value>
<value>silhouette_caster</value>
<value>wireframe</value>
<value>wireframe_solid</value>
<value>reflections</value>
<value>refractions</value>
</choice>
</attribute>
</element>
</oneOrMore>
<zeroOrMore>
<element name="define">
<attribute name="name"/>
@ -64,6 +78,9 @@
<optional>
<attribute name="define"/>
</optional>
<optional>
<attribute name="srgb"/>
</optional>
</element>
</zeroOrMore>
</interleave>

View file

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<material>
<shader effect="terrain_base"/>
<shader pass="main" effect="terrain_base"/>
<shader pass="reflections" effect="terrain_base_reflections"/>
<shader pass="refractions" effect="terrain_base"/>
<shader pass="wireframe" effect="terrain_base_wireframe"/>
<required_texture name="baseTex"/>
</material>

View file

@ -4,6 +4,9 @@
<required_texture name="baseTex"/>
<required_texture name="normTex" define="USE_NORMAL_MAP"/>
<required_texture name="specTex" define="USE_SPECULAR_MAP"/>
<shader effect="terrain_base"/>
<shader pass="main" effect="terrain_base"/>
<shader pass="reflections" effect="terrain_base_reflections"/>
<shader pass="refractions" effect="terrain_base"/>
<shader pass="wireframe" effect="terrain_base_wireframe"/>
<uniform name="effectSettings" value="1.0 15.0 0.0"/>
</material>

View file

@ -4,6 +4,9 @@
<required_texture name="baseTex"/>
<required_texture name="normTex" define="USE_NORMAL_MAP"/>
<required_texture name="specTex" define="USE_SPECULAR_MAP"/>
<shader effect="terrain_base"/>
<shader pass="main" effect="terrain_base"/>
<shader pass="reflections" effect="terrain_base_reflections"/>
<shader pass="refractions" effect="terrain_base"/>
<shader pass="wireframe" effect="terrain_base_wireframe"/>
<uniform name="effectSettings" value="1.2 15.0 0.0"/>
</material>

View file

@ -4,6 +4,9 @@
<required_texture name="baseTex"/>
<required_texture name="normTex" define="USE_NORMAL_MAP"/>
<required_texture name="specTex" define="USE_SPECULAR_MAP"/>
<shader effect="terrain_base"/>
<shader pass="main" effect="terrain_base"/>
<shader pass="reflections" effect="terrain_base_reflections"/>
<shader pass="refractions" effect="terrain_base"/>
<shader pass="wireframe" effect="terrain_base_wireframe"/>
<uniform name="effectSettings" value="0.8 15.0 0.0"/>
</material>

View file

@ -3,6 +3,9 @@
<alternative material="terrain_base.xml" quality="1"/>
<define name="USE_TRIPLANAR" value="1"/>
<required_texture name="baseTex"/>
<shader effect="terrain_base"/>
<shader pass="main" effect="terrain_base"/>
<shader pass="reflections" effect="terrain_base_reflections"/>
<shader pass="refractions" effect="terrain_base"/>
<shader pass="wireframe" effect="terrain_base_wireframe"/>
<uniform name="effectSettings" value="1.0 15.0 0.0"/>
</material>

View file

@ -5,6 +5,9 @@
<required_texture name="baseTex"/>
<required_texture name="normTex" define="USE_NORMAL_MAP"/>
<required_texture name="specTex" define="USE_SPECULAR_MAP"/>
<shader effect="terrain_base"/>
<shader pass="main" effect="terrain_base"/>
<shader pass="reflections" effect="terrain_base_reflections"/>
<shader pass="refractions" effect="terrain_base"/>
<shader pass="wireframe" effect="terrain_base_wireframe"/>
<uniform name="effectSettings" value="1.0 15.0 0.0"/>
</material>

View file

@ -71,6 +71,9 @@ function init(data, hotloadData)
return new Promise(closePageCallback =>
{
Engine.GetGUIObjectByName("quitButton").onPress = closePageCallback;
Engine.GetGUIObjectByName("cancelButton").onPress = closePageCallback.bind(undefined, {
[Engine.openRequest]: { "page": "page_pregame.xml" }
});
});
}
@ -293,11 +296,6 @@ function filterMod(folder)
return !negateFilter;
}
function closePage()
{
Engine.SwitchGuiPage("page_pregame.xml", {});
}
/**
* Moves an item in the list up or down.
*/

View file

@ -194,7 +194,6 @@
<object name="cancelButton" type="button" style="ModernButtonRed" size="100%-932 100%-44 100%-752 100%-16" hotkey="cancel">
<translatableAttribute id="caption">Cancel</translatableAttribute>
<action on="Press">closePage();</action>
</object>
<object type="button" style="ModernButtonRed" size="100%-748 100%-44 100%-568 100%-16">

View file

@ -1,6 +1,7 @@
function init()
async function init()
{
Engine.SwitchGuiPage("page_modmod.xml", {
"cancelbutton": false
});
return { [Engine.openRequest]: {
"page": "page_modmod.xml",
"argument": { "cancelbutton": false }
} };
}

View file

@ -166,6 +166,7 @@ function RunDetection(settings)
// This function should have no side effects, it should just
// set these output properties:
let hardwareSupported = true;
// List of warning strings to display to the user
// in an ugly GUI dialog box
@ -184,7 +185,6 @@ function RunDetection(settings)
var disable_fancywater;
var enable_postproc;
var enable_smoothlos;
var override_renderpath;
// TODO: add some mechanism for setting config values
// (overriding default.cfg, but overridden by local.cfg)
@ -289,23 +289,21 @@ function RunDetection(settings)
// r300 classic has problems with shader mode, so fall back to non-shader
if (os_unix && GL_RENDERER.match(/^Mesa DRI R[123]00 /))
{
override_renderpath = "fixed";
warnings.push("Some graphics features are disabled, due to bugs in old graphics drivers. Upgrading to a Gallium-based driver might help.");
hardwareSupported = false;
}
// https://www.wildfiregames.com/forum/index.php?showtopic=15058
// GF FX has poor shader performance, so fall back to non-shader
if (GL_RENDERER.match(/^GeForce FX /))
{
override_renderpath = "fixed";
disable_allwater = true;
hardwareSupported = false;
}
// https://gitea.wildfiregames.com/0ad/0ad/issues/964
// SiS Mirage 3 drivers apparently crash with shaders, so fall back to non-shader
if (os_win && GL_RENDERER.match(/^Mirage Graphics3$/))
{
override_renderpath = "fixed";
hardwareSupported = false;
}
return {
@ -319,7 +317,7 @@ function RunDetection(settings)
"disable_fancywater": disable_fancywater,
"enable_postproc": enable_postproc,
"enable_smoothlos": enable_smoothlos,
"override_renderpath": override_renderpath,
"hardwareSupported": hardwareSupported,
};
}
@ -327,7 +325,7 @@ global.RunHardwareDetection = function(settings)
{
// Currently we don't have limitations for other backends than GL.
if (settings.renderer_backend.name != 'gl')
return;
return true;
// print(JSON.stringify(settings, null, 1)+"\n");
@ -376,6 +374,5 @@ global.RunHardwareDetection = function(settings)
if (output.enable_smoothlos !== undefined)
Engine.ConfigDB_CreateValue("hwdetect", "smoothlos", (output.enable_smoothlos).toString());
if (output.override_renderpath !== undefined)
Engine.ConfigDB_CreateValue("hwdetect", "renderpath", (output.override_renderpath).toString());
return output.hardwareSupported;
};

View file

@ -30,7 +30,7 @@ for (var settings of hwdetectTestData)
var os = (settings.os_linux ? "linux" : settings.os_macosx ? "macosx" : settings.os_win ? "win" : "???");
var disabled = [];
for (var d of ["disable_audio", "disable_s3tc", "disable_shadows", "disable_shadowpcf", "disable_allwater", "disable_fancywater", "override_renderpath"])
for (var d of ["disable_audio", "disable_s3tc", "disable_shadows", "disable_shadowpcf", "disable_allwater", "disable_fancywater", "hardwareSupported"])
if (output[d] !== undefined)
disabled.push(d+"="+output[d]);

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="glsl"/>
<require shaders="spirv"/>
<compute shader="compute_resolve_pbr"/>
</technique>
</effect>

View file

@ -1,14 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="glsl"/>
<require shaders="spirv"/>
<require context="MODE_WIREFRAME"/>
<pass shader="particle_solid">
<polygon mode="LINE"/>
</pass>
</technique>
<technique>
<require shaders="glsl"/>
<require shaders="spirv"/>

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="glsl"/>
<require shaders="spirv"/>
<pass shader="particle_solid">
<polygon mode="LINE"/>
</pass>
</technique>
</effect>

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="glsl"/>
<require shaders="spirv"/>
<pass shader="resolve_pbr">
<depth test="FALSE" mask="false"/>
</pass>
</technique>
</effect>

View file

@ -1,23 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require context="PASS_REFLECTIONS"/>
<require shaders="glsl"/>
<require shaders="spirv"/>
<pass shader="terrain_base">
<cull mode="FRONT"/>
</pass>
</technique>
<technique>
<require shaders="glsl"/>
<require shaders="spirv"/>
<require context="MODE_WIREFRAME"/>
<pass shader="terrain_base">
<polygon mode="LINE"/>
</pass>
</technique>
<technique>
<require shaders="glsl"/>
<require shaders="spirv"/>

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="glsl"/>
<require shaders="spirv"/>
<pass shader="terrain_base">
<cull mode="FRONT"/>
</pass>
</technique>
</effect>

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="glsl"/>
<require shaders="spirv"/>
<pass shader="terrain_base">
<polygon mode="LINE"/>
</pass>
</technique>
</effect>

View file

@ -1,27 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require context="PASS_REFLECTIONS"/>
<require shaders="glsl"/>
<require shaders="spirv"/>
<pass shader="terrain_blend">
<depth mask="false"/>
<cull mode="FRONT"/>
<blend src="src_alpha" dst="one_minus_src_alpha"/>
</pass>
</technique>
<technique>
<require shaders="glsl"/>
<require shaders="spirv"/>
<require context="MODE_WIREFRAME"/>
<pass shader="terrain_blend">
<depth mask="false"/>
<polygon mode="LINE"/>
<blend src="src_alpha" dst="one_minus_src_alpha"/>
</pass>
</technique>
<technique>
<require shaders="glsl"/>
<require shaders="spirv"/>

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="glsl"/>
<require shaders="spirv"/>
<pass shader="terrain_blend">
<depth mask="false"/>
<cull mode="FRONT"/>
<blend src="src_alpha" dst="one_minus_src_alpha"/>
</pass>
</technique>
</effect>

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="glsl"/>
<require shaders="spirv"/>
<pass shader="terrain_blend">
<depth mask="false"/>
<polygon mode="LINE"/>
<blend src="src_alpha" dst="one_minus_src_alpha"/>
</pass>
</technique>
</effect>

View file

@ -1,27 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require context="PASS_REFLECTIONS"/>
<require shaders="glsl"/>
<require shaders="spirv"/>
<pass shader="terrain_decal">
<depth mask="false"/>
<cull mode="FRONT"/>
<blend src="src_alpha" dst="one_minus_src_alpha"/>
</pass>
</technique>
<technique>
<require shaders="glsl"/>
<require shaders="spirv"/>
<require context="MODE_WIREFRAME"/>
<pass shader="terrain_decal">
<depth mask="false"/>
<polygon mode="LINE"/>
<blend src="src_alpha" dst="one_minus_src_alpha"/>
</pass>
</technique>
<technique>
<require shaders="glsl"/>
<require shaders="spirv"/>

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>>
<require shaders="glsl"/>
<require shaders="spirv"/>
<pass shader="terrain_decal">
<depth mask="false"/>
<cull mode="FRONT"/>
<blend src="src_alpha" dst="one_minus_src_alpha"/>
</pass>
</technique>
</effect>

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="glsl"/>
<require shaders="spirv"/>
<pass shader="terrain_decal">
<depth mask="false"/>
<polygon mode="LINE"/>
<blend src="src_alpha" dst="one_minus_src_alpha"/>
</pass>
</technique>
</effect>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="glsl"/>
<require shaders="spirv"/>
<pass shader="dummy">
<cull mode="FRONT"/>
<color mask_red="FALSE" mask_green="FALSE" mask_blue="FALSE" mask_alpha="FALSE"/>
</pass>
</technique>
</effect>

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="glsl"/>
<require shaders="spirv"/>
<pass shader="dummy">
<!--
To prevent units displaying silhouettes when parts of their model
protrude into the ground, only occlude with the back faces of the
terrain (so silhouettes will still display when behind hills).
-->
<cull mode="FRONT"/>
<color mask_red="FALSE" mask_green="FALSE" mask_blue="FALSE" mask_alpha="FALSE"/>
</pass>
</technique>
</effect>

View file

@ -1,33 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require context="PASS_SHADOWS || MODE_SILHOUETTEOCCLUDER"/>
<require shaders="glsl"/>
<require shaders="spirv"/>
<pass shader="dummy">
<!--
To prevent units displaying silhouettes when parts of their model
protrude into the ground, only occlude with the back faces of the
terrain (so silhouettes will still display when behind hills).
-->
<cull mode="FRONT"/>
<color mask_red="FALSE" mask_green="FALSE" mask_blue="FALSE" mask_alpha="FALSE"/>
</pass>
</technique>
<technique>
<require shaders="glsl"/>
<require shaders="spirv"/>
<require context="MODE_WIREFRAME"/>
<pass shader="dummy">
<polygon mode="LINE"/>
</pass>
</technique>
<technique>
<require shaders="glsl"/>
<require shaders="spirv"/>
<pass shader="dummy"/>
</technique>
</effect>

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="glsl"/>
<require shaders="spirv"/>
<pass shader="dummy">
<polygon mode="LINE"/>
</pass>
</technique>
</effect>

View file

@ -1,15 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="glsl"/>
<require shaders="spirv"/>
<require context="MODE_WIREFRAME"/>
<pass shader="water_simple">
<depth test="TRUE"/>
<polygon mode="LINE"/>
</pass>
</technique>
<technique>
<require shaders="glsl"/>
<require shaders="spirv"/>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="glsl"/>
<require shaders="spirv"/>
<pass shader="water_simple">
<depth test="TRUE"/>
<polygon mode="LINE"/>
</pass>
</technique>
</effect>

View file

@ -6,9 +6,9 @@ END_DRAW_TEXTURES
BEGIN_DRAW_UNIFORMS
UNIFORM(vec4, transform)
UNIFORM(vec2, translation)
UNIFORM(vec4, colorAdd)
UNIFORM(vec4, colorMul)
UNIFORM(vec2, translation)
UNIFORM(float, grayscaleFactor)
END_DRAW_UNIFORMS

View file

@ -12,10 +12,10 @@
layout(set = 2, binding = LOCATION, FORMAT) uniform image2D NAME
#if USE_DESCRIPTOR_INDEXING
#define STORAGE_BUFFER(LOCATION) \
layout(set = 2, binding = LOCATION)
layout(std430, set = 2, binding = LOCATION)
#else
#define STORAGE_BUFFER(LOCATION) \
layout(set = 1, binding = LOCATION)
layout(std430, set = 1, binding = LOCATION)
#endif
#else
// We use offset to the binding slot for OpenGL to avoid overlapping with other
@ -23,7 +23,7 @@
#define STORAGE_2D(LOCATION, FORMAT, NAME) \
layout(binding = LOCATION, FORMAT) uniform image2D NAME
#define STORAGE_BUFFER(LOCATION) \
layout(binding = LOCATION)
layout(std430, binding = LOCATION)
#endif
#endif // STAGE_COMPUTE

View file

@ -0,0 +1,12 @@
#ifndef INCLUDED_COMMON_TONE_MAPPING
#define INCLUDED_COMMON_TONE_MAPPING
vec3 applyTonemapper(vec3 color)
{
float whitePoint = 10.0;
// Extendend Reinhard:
// https://www-old.cs.utah.edu/docs/techreports/2002/pdf/UUCS-02-001.pdf
return color * (vec3(1.0) + color / (whitePoint * whitePoint)) / (vec3(1.0) + color);
}
#endif // INCLUDED_COMMON_TONE_MAPPING

View file

@ -0,0 +1,27 @@
#version 430
#include "common/compute.h"
#include "common/tone_mapper.h"
BEGIN_DRAW_TEXTURES
TEXTURE_2D(0, inTex)
END_DRAW_TEXTURES
BEGIN_DRAW_UNIFORMS
UNIFORM(vec4, screenSize)
// Premultiplied exposure, already contains 2^exposure.
UNIFORM(float, exposure)
END_DRAW_UNIFORMS
STORAGE_2D(0, rgba8, outTex);
layout(local_size_x = 8, local_size_y = 8, local_size_z = 1) in;
void main()
{
ivec2 position = ivec2(gl_GlobalInvocationID.xy);
if (any(greaterThanEqual(position, ivec2(screenSize.xy))))
return;
vec3 hdrColor = texelFetch(GET_DRAW_TEXTURE_2D(inTex), position, 0).rgb;
vec3 sdrColor = applyTonemapper(hdrColor * exposure);
imageStore(outTex, position, vec4(sdrColor, 1.0));
}

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<program type="glsl">
<compute file="glsl/compute_resolve_pbr.cs"/>
</program>

View file

@ -26,7 +26,6 @@ struct Vertex
vec4 tangent;
vec4 normal;
vec4 position;
vec4 padding;
};
STORAGE_BUFFER(0) restrict readonly buffer InputVertices

View file

@ -8,26 +8,37 @@
VERTEX_INPUT_ATTRIBUTE(0, vec3, a_vertex);
VERTEX_INPUT_ATTRIBUTE(1, vec4, a_color);
VERTEX_INPUT_ATTRIBUTE(2, vec2, a_uv0);
VERTEX_INPUT_ATTRIBUTE(3, vec2, a_uv1);
VERTEX_INPUT_ATTRIBUTE(4, vec3, a_axisX);
VERTEX_INPUT_ATTRIBUTE(5, vec3, a_axisY);
VERTEX_INPUT_ATTRIBUTE(3, vec4, a_axisX); // .w is a particle diagonal size
VERTEX_INPUT_ATTRIBUTE(4, vec4, a_axisY); // .w is a particle angle
void main()
{
vec3 viewAxisX = vec3(modelViewMatrix[0][0], modelViewMatrix[1][0], modelViewMatrix[2][0]);
vec3 viewAxisY = vec3(modelViewMatrix[0][1], modelViewMatrix[1][1], modelViewMatrix[2][1]);
vec2 offset = a_uv1;
vec3 axisX = (spaceTransform * vec4(a_axisX, 0.0)).xyz;
vec3 axisY = (spaceTransform * vec4(a_axisY, 0.0)).xyz;
const float PI_4 = 0.7853981633974483;
const float HALF_INV_SQRT2 = 0.35355339059327376;
float particleHalfSize = a_axisX.w * HALF_INV_SQRT2;
// Currently we store an angle to a particle corner.
float particleAngle = a_axisY.w - PI_4;
float sinParticleAngle = sin(particleAngle);
float cosParticleAngle = cos(particleAngle);
mat2 rotationMatrix = mat2(
cosParticleAngle, -sinParticleAngle,
sinParticleAngle, cosParticleAngle
);
vec2 offset = rotationMatrix * ((a_uv0 * 2.0 - 1.0) * particleHalfSize);
vec3 axisX = (spaceTransform * vec4(a_axisX.xyz, 0.0)).xyz;
vec3 axisY = (spaceTransform * vec4(a_axisY.xyz, 0.0)).xyz;
vec3 particlePosition = (spaceTransform * vec4(a_vertex, 1.0)).xyz;
vec3 particleAxisX = viewAxisX;
vec3 particleAxisY = viewAxisY;
if (a_axisX != vec3(0.0))
if (a_axisX.xyz != vec3(0.0))
{
particleAxisX = axisX;
if (a_axisY != vec3(0.0))
if (a_axisY.xyz != vec3(0.0))
particleAxisY = axisY;
else
{

View file

@ -5,9 +5,8 @@
<stream name="pos" attribute="a_vertex"/>
<stream name="color" attribute="a_color"/>
<stream name="uv0" attribute="a_uv0"/>
<stream name="uv1" attribute="a_uv1"/>
<stream name="uv2" attribute="a_axisX"/>
<stream name="uv3" attribute="a_axisY"/>
<stream name="uv1" attribute="a_axisX"/>
<stream name="uv2" attribute="a_axisY"/>
</vertex>
<fragment file="glsl/particle.fs"/>

View file

@ -5,7 +5,8 @@
<stream name="pos" attribute="a_vertex"/>
<stream name="color" attribute="a_color"/>
<stream name="uv0" attribute="a_uv0"/>
<stream name="uv1" attribute="a_uv1"/>
<stream name="uv1" attribute="a_axisX"/>
<stream name="uv2" attribute="a_axisY"/>
</vertex>
<fragment file="glsl/particle.fs"/>

View file

@ -0,0 +1,23 @@
#version 120
#include "common/fragment.h"
#include "common/stage.h"
#include "common/tone_mapper.h"
BEGIN_DRAW_TEXTURES
TEXTURE_2D(0, inTex)
END_DRAW_TEXTURES
BEGIN_DRAW_UNIFORMS
// Premultiplied exposure, already contains 2^exposure.
UNIFORM(float, exposure)
END_DRAW_UNIFORMS
VERTEX_OUTPUT(0, vec2, v_tex);
void main()
{
vec3 hdrColor = SAMPLE_2D(GET_DRAW_TEXTURE_2D(inTex), v_tex).rgb;
vec3 sdrColor = applyTonemapper(hdrColor * exposure);
OUTPUT_FRAGMENT_SINGLE_COLOR(vec4(sdrColor, 1.0));
}

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<program type="glsl">
<vertex file="glsl/simple.vs">
<stream name="pos" attribute="a_vertex"/>
<stream name="uv0" attribute="a_uv0"/>
</vertex>
<fragment file="glsl/resolve_pbr.fs"/>
</program>

View file

@ -6,10 +6,10 @@
void main()
{
vec4 tex = SAMPLE_CUBE(GET_DRAW_TEXTURE_CUBE(baseTex), v_tex);
vec3 color = SAMPLE_CUBE(GET_DRAW_TEXTURE_CUBE(baseTex), v_tex).rgb;
float m = (1.0 - v_tex.y) - 0.75;
m *= 4.0;
OUTPUT_FRAGMENT_SINGLE_COLOR((v_tex.y > 0.0) ? (tex * m) : tex);
OUTPUT_FRAGMENT_SINGLE_COLOR(vec4((v_tex.y > 0.0) ? clamp(color * m, 0.0, 1.0) : color, 1.0));
}

View file

@ -2,8 +2,8 @@
<actor version="1">
<castshadow/>
<group>
<variant file="quadraped/horse/props/blanket_pers.xml" name="horse-blanket-pers"/>
<variant file="quadraped/horse/props/blanket_pers_01.xml" name="horse-blanket-pers-01"/>
<variant file="quadraped/horse/props/blanket_achae.xml" name="horse-blanket-achae"/>
<variant file="quadraped/horse/props/blanket_achae_01.xml" name="horse-blanket-achae-01"/>
</group>
<group>
<variant file="quadraped/base_horse_javelin_fast.xml" name="Javelinist-Fast-Horse" frequency="1"/>

View file

@ -2,7 +2,7 @@
<actor version="1">
<castshadow/>
<group>
<variant file="quadraped/horse/props/blanket_pers_02.xml" name="horse-blanket-pers-02"/>
<variant file="quadraped/horse/props/blanket_achae_02.xml" name="horse-blanket-achae-02"/>
</group>
<group>
<variant file="quadraped/base_horse_javelin_fast.xml" name="Javelinist-Fast-Horse" frequency="1"/>

View file

@ -2,7 +2,7 @@
<actor version="1">
<castshadow/>
<group>
<variant file="quadraped/horse/props/blanket_pers_03.xml" name="horse-blanket-pers-03"/>
<variant file="quadraped/horse/props/blanket_achae_03.xml" name="horse-blanket-achae-03"/>
</group>
<group>
<variant file="quadraped/base_horse_javelin_fast.xml" name="Javelinist-Fast-Horse" frequency="1"/>

View file

@ -2,7 +2,7 @@
<actor version="1">
<castshadow/>
<group>
<variant file="quadraped/horse/props/peytral_pers_bronze_01.xml" name="horse-peytral-persian-Bronze"/>
<variant file="quadraped/horse/props/peytral_achae_bronze_01.xml" name="horse-peytral-persian-Bronze"/>
</group>
<group>
<variant file="quadraped/base_horse_javelin_fast.xml" name="Javelinist-Fast-Horse" frequency="1"/>

View file

@ -2,7 +2,7 @@
<actor version="1">
<castshadow/>
<group>
<variant file="quadraped/horse/props/peytral_pers_iron_01.xml" name="horse-peytral-persian-Iron"/>
<variant file="quadraped/horse/props/peytral_achae_iron_01.xml" name="horse-peytral-persian-Iron"/>
</group>
<group>
<variant file="quadraped/base_horse_javelin_fast.xml" name="Javelinist-Fast-Horse" frequency="1"/>

View file

@ -3,7 +3,7 @@
<castshadow/>
<group>
<variant>
<mesh>props/horse/armor_pers_winged_01.dae</mesh>
<mesh>props/horse/armor_achae_winged_01.dae</mesh>
<textures>
<texture file="props/horse/winged_armor_01.png" name="baseTex"/>
<texture file="props/horse/winged_armor_01_norm.png" name="normTex"/>

View file

@ -3,7 +3,7 @@
<castshadow/>
<group>
<variant>
<mesh>props/horse/armor_pers_winged_02.dae</mesh>
<mesh>props/horse/armor_achae_winged_02.dae</mesh>
<textures>
<texture file="props/horse/winged_armor_02.png" name="baseTex"/>
<texture file="props/horse/winged_armor_02_norm.png" name="normTex"/>

View file

@ -3,7 +3,7 @@
<castshadow/>
<group>
<variant>
<mesh>props/horse/armor_pers_winged_03.dae</mesh>
<mesh>props/horse/armor_achae_winged_03.dae</mesh>
<textures>
<texture file="props/horse/winged_armor_03.png" name="baseTex"/>
<texture file="props/horse/winged_armor_03_norm.png" name="normTex"/>

View file

@ -3,9 +3,9 @@
<castshadow/>
<float/>
<group>
<variant file="others/waypoints/base.xml" frequency="1" name="Pers Waypoint Flag">
<variant file="others/waypoints/base.xml" frequency="1" name="Achae Waypoint Flag">
<textures>
<texture file="props/banner_persian.png" name="baseTex"/>
<texture file="props/banner_achaemenids.png" name="baseTex"/>
<texture file="default_norm.png" name="normTex"/>
<texture file="null_black.dds" name="specTex"/>
</textures>

View file

@ -2,13 +2,13 @@
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="pers flag 3">
<variant frequency="1" name="Achae flag 3">
<animations>
<animation file="mechanical/garrison_flag_idle.dae" name="Idle" speed="30"/>
</animations>
<mesh>props/garrison_flag.dae</mesh>
<textures>
<texture file="props/garrison_pers_3.png" name="baseTex"/>
<texture file="props/garrison_achae_3.png" name="baseTex"/>
<texture file="default_norm.png" name="normTex"/>
<texture file="null_black.dds" name="specTex"/>
</textures>

View file

@ -10,9 +10,9 @@
</variant>
</group>
<group>
<variant name="waypoint_persians">
<variant name="waypoint_achaemenids">
<textures>
<texture file="props/banner_persian.png" name="baseTex"/>
<texture file="props/banner_achaemenids.png" name="baseTex"/>
</textures>
</variant>
<variant name="waypoint_hellenes">

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="Achae treasure 4 (food big)">
<mesh>props/treasure_achae_4.dae</mesh>
<textures>
<texture file="structural/achae_struct.png" name="baseTex"/>
<texture file="structural/achae_struct_norm.png" name="normTex"/>
<texture file="structural/achae_struct_spec.png" name="specTex"/>
</textures>
</variant>
</group>
<material>player_trans_parallax_spec.xml</material>
</actor>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="Achae treasure 1 (food smalll)">
<mesh>props/treasure_achae_1.dae</mesh>
<textures>
<texture file="structural/achae_struct.png" name="baseTex"/>
<texture file="structural/achae_struct_norm.png" name="normTex"/>
<texture file="structural/achae_struct_spec.png" name="specTex"/>
</textures>
</variant>
</group>
<material>player_trans_parallax_spec.xml</material>
</actor>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="Achae treasure 2 (metal bigl)">
<mesh>props/treasure_achae_2.dae</mesh>
<textures>
<texture file="structural/achae_struct.png" name="baseTex"/>
<texture file="structural/achae_struct_norm.png" name="normTex"/>
<texture file="structural/achae_struct_spec.png" name="specTex"/>
</textures>
</variant>
</group>
<material>player_trans_parallax_spec.xml</material>
</actor>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="Achae treasure 3 (metal small)">
<mesh>props/treasure_achae_3.dae</mesh>
<textures>
<texture file="structural/achae_struct.png" name="baseTex"/>
<texture file="structural/achae_struct_norm.png" name="normTex"/>
<texture file="structural/achae_struct_spec.png" name="specTex"/>
</textures>
</variant>
</group>
<material>player_trans_parallax_spec.xml</material>
</actor>

View file

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="pers treasure 4 (food big)">
<mesh>props/treasure_pers_4.dae</mesh>
<textures>
<texture file="structural/pers_struct.png" name="baseTex"/>
<texture file="structural/pers_struct_norm.png" name="normTex"/>
<texture file="structural/pers_struct_spec.png" name="specTex"/>
</textures>
</variant>
</group>
<material>player_trans_parallax_spec.xml</material>
</actor>

View file

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="pers treasure 1 (food smalll)">
<mesh>props/treasure_pers_1.dae</mesh>
<textures>
<texture file="structural/pers_struct.png" name="baseTex"/>
<texture file="structural/pers_struct_norm.png" name="normTex"/>
<texture file="structural/pers_struct_spec.png" name="specTex"/>
</textures>
</variant>
</group>
<material>player_trans_parallax_spec.xml</material>
</actor>

View file

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="pers treasure 2 (metal bigl)">
<mesh>props/treasure_pers_2.dae</mesh>
<textures>
<texture file="structural/pers_struct.png" name="baseTex"/>
<texture file="structural/pers_struct_norm.png" name="normTex"/>
<texture file="structural/pers_struct_spec.png" name="specTex"/>
</textures>
</variant>
</group>
<material>player_trans_parallax_spec.xml</material>
</actor>

View file

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="pers treasure 3 (metal small)">
<mesh>props/treasure_pers_3.dae</mesh>
<textures>
<texture file="structural/pers_struct.png" name="baseTex"/>
<texture file="structural/pers_struct_norm.png" name="normTex"/>
<texture file="structural/pers_struct_spec.png" name="specTex"/>
</textures>
</variant>
</group>
<material>player_trans_parallax_spec.xml</material>
</actor>

View file

@ -1,16 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="100" name="palisade rocks outpost banners">
<animations/>
<mesh>props/palisade_rocks_outpost_banners.dae</mesh>
<textures>
<texture file="structural/pers_struct.png" name="baseTex"/>
<texture file="structural/pers_struct_norm.png" name="normTex"/>
<texture file="structural/pers_struct_spec.png" name="specTex"/>
<texture file="structural/achae_struct.png" name="baseTex"/>
<texture file="structural/achae_struct_norm.png" name="normTex"/>
<texture file="structural/achae_struct_spec.png" name="specTex"/>
</textures>
</variant>
</group>

View file

@ -2,15 +2,15 @@
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="persian-alt-building-01">
<mesh>props/pers_alt_build_01_big.dae</mesh>
<variant frequency="1" name="achaemenid-alt-building-01">
<mesh>props/achae_alt_build_01_big.dae</mesh>
<props>
<prop actor="props/structures/persians/alt_building_01_prop.xml" attachpoint="root"/>
<prop actor="props/structures/achaemenids/alt_building_01_prop.xml" attachpoint="root"/>
</props>
<textures>
<texture file="structural/pers_struct.png" name="baseTex"/>
<texture file="structural/pers_struct_norm.png" name="normTex"/>
<texture file="structural/pers_struct_spec.png" name="specTex"/>
<texture file="structural/achae_struct.png" name="baseTex"/>
<texture file="structural/achae_struct_norm.png" name="normTex"/>
<texture file="structural/achae_struct_spec.png" name="specTex"/>
</textures>
</variant>
</group>
@ -21,7 +21,7 @@
<prop actor="particle/destruction_smoke_med.xml" attachpoint="root"/>
<prop actor="particle/destruction_dust_med.xml" attachpoint="root"/>
<prop actor="particle/destruction_dust_med_gray.xml" attachpoint="root"/>
<prop actor="props/structures/persians/alt_building_01_prop.xml" attachpoint="root"/>
<prop actor="props/structures/achaemenids/alt_building_01_prop.xml" attachpoint="root"/>
</props>
</variant>
</group>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="props">
<mesh>props/achae_alt_build_01_prop.dae</mesh>
<textures>
<texture file="structural/achae_struct.png" name="baseTex"/>
<texture file="structural/achae_struct_norm.png" name="normTex"/>
<texture file="structural/achae_struct_spec.png" name="specTex"/>
</textures>
</variant>
</group>
<material>player_trans_parallax_spec.xml</material>
</actor>

View file

@ -2,15 +2,15 @@
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="persian-alt-building-02">
<mesh>props/pers_alt_build_02.dae</mesh>
<variant frequency="1" name="achaemenid-alt-building-02">
<mesh>props/achae_alt_build_02.dae</mesh>
<props>
<prop actor="props/structures/persians/alt_building_02_prop.xml" attachpoint="root"/>
<prop actor="props/structures/achaemenids/alt_building_02_prop.xml" attachpoint="root"/>
</props>
<textures>
<texture file="structural/pers_struct.png" name="baseTex"/>
<texture file="structural/pers_struct_norm.png" name="normTex"/>
<texture file="structural/pers_struct_spec.png" name="specTex"/>
<texture file="structural/achae_struct.png" name="baseTex"/>
<texture file="structural/achae_struct_norm.png" name="normTex"/>
<texture file="structural/achae_struct_spec.png" name="specTex"/>
</textures>
</variant>
</group>
@ -21,7 +21,7 @@
<prop actor="particle/destruction_smoke_small.xml" attachpoint="root"/>
<prop actor="particle/destruction_dust_small.xml" attachpoint="root"/>
<prop actor="particle/destruction_dust_small_gray.xml" attachpoint="root"/>
<prop actor="props/structures/persians/alt_building_02_prop.xml" attachpoint="root"/>
<prop actor="props/structures/achaemenids/alt_building_02_prop.xml" attachpoint="root"/>
</props>
</variant>
</group>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="base">
<mesh>props/achae_alt_build_02_prop.dae</mesh>
<textures>
<texture file="structural/achae_struct.png" name="baseTex"/>
<texture file="structural/achae_struct_norm.png" name="normTex"/>
<texture file="structural/achae_struct_spec.png" name="specTex"/>
</textures>
</variant>
</group>
<material>player_trans_parallax_spec.xml</material>
</actor>

View file

@ -2,15 +2,15 @@
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="persian-alt-building-03">
<mesh>props/pers_alt_build_03.dae</mesh>
<variant frequency="1" name="achaemenid-alt-building-03">
<mesh>props/achae_alt_build_03.dae</mesh>
<props>
<prop actor="props/structures/persians/alt_building_03_prop.xml" attachpoint="root"/>
<prop actor="props/structures/achaemenids/alt_building_03_prop.xml" attachpoint="root"/>
</props>
<textures>
<texture file="structural/pers_struct.png" name="baseTex"/>
<texture file="structural/pers_struct_norm.png" name="normTex"/>
<texture file="structural/pers_struct_spec.png" name="specTex"/>
<texture file="structural/achae_struct.png" name="baseTex"/>
<texture file="structural/achae_struct_norm.png" name="normTex"/>
<texture file="structural/achae_struct_spec.png" name="specTex"/>
</textures>
</variant>
</group>
@ -21,7 +21,7 @@
<prop actor="particle/destruction_smoke_med.xml" attachpoint="root"/>
<prop actor="particle/destruction_dust_med.xml" attachpoint="root"/>
<prop actor="particle/destruction_dust_med_gray.xml" attachpoint="root"/>
<prop actor="props/structures/persians/alt_building_03_prop.xml" attachpoint="root"/>
<prop actor="props/structures/achaemenids/alt_building_03_prop.xml" attachpoint="root"/>
</props>
</variant>
</group>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="achaemenid-alt-building-03-prop">
<mesh>props/achae_alt_build_03_prop.dae</mesh>
<textures>
<texture file="structural/achae_struct.png" name="baseTex"/>
<texture file="structural/achae_struct_norm.png" name="normTex"/>
<texture file="structural/achae_struct_spec.png" name="specTex"/>
</textures>
</variant>
</group>
<material>basic_trans_parallax_spec.xml</material>
</actor>

View file

@ -2,12 +2,12 @@
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="persian-alt-building-04">
<mesh>props/pers_alt_build_04.dae</mesh>
<variant frequency="1" name="achaemenid-alt-building-04">
<mesh>props/achae_alt_build_04.dae</mesh>
<textures>
<texture file="structural/pers_struct.png" name="baseTex"/>
<texture file="structural/pers_struct_norm.png" name="normTex"/>
<texture file="structural/pers_struct_spec.png" name="specTex"/>
<texture file="structural/achae_struct.png" name="baseTex"/>
<texture file="structural/achae_struct_norm.png" name="normTex"/>
<texture file="structural/achae_struct_spec.png" name="specTex"/>
</textures>
</variant>
</group>
@ -18,7 +18,7 @@
<prop actor="particle/destruction_smoke_med.xml" attachpoint="root"/>
<prop actor="particle/destruction_dust_med.xml" attachpoint="root"/>
<prop actor="particle/destruction_dust_med_gray.xml" attachpoint="root"/>
<prop actor="props/structures/persians/alt_building_01_prop.xml" attachpoint="root"/>
<prop actor="props/structures/achaemenids/alt_building_01_prop.xml" attachpoint="root"/>
</props>
</variant>
</group>

View file

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="achaemenid-alt-building-05">
<mesh>props/achae_alt_build_05.dae</mesh>
<props>
<prop actor="props/structures/achaemenids/alt_building_05_baskets.xml" attachpoint="root"/>
<prop actor="props/structures/achaemenids/alt_building_05_prop.xml" attachpoint="root"/>
</props>
<textures>
<texture file="structural/achae_struct.png" name="baseTex"/>
<texture file="structural/achae_struct_norm.png" name="normTex"/>
<texture file="structural/achae_struct_spec.png" name="specTex"/>
</textures>
</variant>
</group>
<group>
<variant frequency="100" name="Idle"/>
<variant name="death">
<props>
<prop actor="particle/destruction_smoke_small.xml" attachpoint="root"/>
<prop actor="particle/destruction_dust_small.xml" attachpoint="root"/>
<prop actor="particle/destruction_dust_small_gray.xml" attachpoint="root"/>
<prop actor="props/structures/achaemenids/alt_building_05_baskets.xml" attachpoint="root"/>
<prop actor="props/structures/achaemenids/alt_building_05_prop.xml" attachpoint="root"/>
</props>
</variant>
</group>
<material>player_trans_parallax_spec.xml</material>
</actor>

View file

@ -3,18 +3,18 @@
<castshadow/>
<group>
<variant frequency="1" name="baskets_a">
<mesh>props/pers_alt_build_05_baskets_a.dae</mesh>
<mesh>props/achae_alt_build_05_baskets_a.dae</mesh>
</variant>
<variant frequency="1" name="baskets_b">
<mesh>props/pers_alt_build_05_baskets_b.dae</mesh>
<mesh>props/achae_alt_build_05_baskets_b.dae</mesh>
</variant>
</group>
<group>
<variant frequency="1" name="texture">
<textures>
<texture file="structural/pers_struct.png" name="baseTex"/>
<texture file="structural/pers_struct_norm.png" name="normTex"/>
<texture file="structural/pers_struct_spec.png" name="specTex"/>
<texture file="structural/achae_struct.png" name="baseTex"/>
<texture file="structural/achae_struct_norm.png" name="normTex"/>
<texture file="structural/achae_struct_spec.png" name="specTex"/>
</textures>
</variant>
</group>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="achaemenid-alt-building-05-prop">
<mesh>props/achae_alt_build_05_prop.dae</mesh>
<textures>
<texture file="structural/achae_struct.png" name="baseTex"/>
<texture file="structural/achae_struct_norm.png" name="normTex"/>
<texture file="structural/achae_struct_spec.png" name="specTex"/>
</textures>
</variant>
</group>
<material>basic_trans_parallax_spec.xml</material>
</actor>

View file

@ -3,23 +3,23 @@
<castshadow/>
<group>
<variant frequency="1" name="base">
<mesh>props/pers_barracks_shields.dae</mesh>
<mesh>props/achae_barracks_shields.dae</mesh>
<props>
<prop actor="props/units/shields/hele_round_back.xml" attachpoint="root"/>
</props>
</variant>
</group>
<group>
<variant frequency="1" name="shield-pers-aspis-1">
<variant frequency="1" name="shield-achae-aspis-1">
<textures>
<texture file="props/shield/pers_aspis_1.png" name="baseTex"/>
<texture file="props/shield/achae_aspis_1.png" name="baseTex"/>
<texture file="props/shield/aspis_smooth_a_norm.png" name="normTex"/>
<texture file="props/shield/aspis_smooth_a_spec.png" name="specTex"/>
</textures>
</variant>
<variant frequency="1" name="shield-pers-aspis-2">
<variant frequency="1" name="shield-achae-aspis-2">
<textures>
<texture file="props/shield/pers_aspis_2.png" name="baseTex"/>
<texture file="props/shield/achae_aspis_2.png" name="baseTex"/>
<texture file="props/shield/aspis_smooth_a_norm.png" name="normTex"/>
<texture file="props/shield/aspis_smooth_a_spec.png" name="specTex"/>
</textures>

View file

@ -4,9 +4,9 @@
<float/>
<group>
<variant frequency="100" name="Base">
<mesh>props/pers_bir_fence.dae</mesh>
<mesh>props/achae_bir_fence.dae</mesh>
<textures>
<texture file="structural/pers_bir.dds" name="baseTex"/>
<texture file="structural/achae_bir.dds" name="baseTex"/>
<texture file="default_norm.png" name="normTex"/>
<texture file="null_black.dds" name="specTex"/>
</textures>

View file

@ -1,20 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<float/>
<group>
<variant file="others/ships/main_sail_base.xml" name="Bireme Sail">
<mesh>props/pers_bireme_sail.dae</mesh>
<textures>
<texture file="props/ptol_sail_norm.png" name="normTex"/>
<texture file="props/sail_spec_1.png" name="specTex"/>
</textures>
</variant>
</group>
<group>
<variant frequency="100" file="others/ships/pers_sail_01.xml" name="zoroaster"/>
<variant frequency="100" file="others/ships/pers_sail_02.xml" name="royal standard"/>
<variant frequency="100" file="others/ships/pers_sail_03.xml" name="standard"/>
</group>
<material>player_trans_parallax_spec.xml</material>
</actor>
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<float/>
<group>
<variant file="others/ships/main_sail_base.xml" name="Bireme Sail">
<mesh>props/achae_bireme_sail.dae</mesh>
<textures>
<texture file="props/ptol_sail_norm.png" name="normTex"/>
<texture file="props/sail_spec_1.png" name="specTex"/>
</textures>
</variant>
</group>
<group>
<variant frequency="100" file="others/ships/achae_sail_01.xml" name="zoroaster"/>
<variant frequency="100" file="others/ships/achae_sail_02.xml" name="royal standard"/>
<variant frequency="100" file="others/ships/achae_sail_03.xml" name="standard"/>
</group>
<material>player_trans_parallax_spec.xml</material>
</actor>

View file

@ -4,20 +4,20 @@
<float/>
<group>
<variant frequency="100" name="Base">
<mesh>props/pers_bir_mast.dae</mesh>
<mesh>props/achae_bir_mast.dae</mesh>
</variant>
</group>
<group>
<variant frequency="1" name="trireme-sail-zoroaster">
<textures>
<texture file="props/pers_trireme_sail.dds" name="baseTex"/>
<texture file="props/achae_trireme_sail.dds" name="baseTex"/>
<texture file="props/sail_norm_1.png" name="normTex"/>
<texture file="props/sail_spec_1.png" name="specTex"/>
</textures>
</variant>
<variant frequency="1" name="trireme-sail-royal standard">
<textures>
<texture file="props/pers_trireme_sail_b.dds" name="baseTex"/>
<texture file="props/achae_trireme_sail_b.dds" name="baseTex"/>
<texture file="props/sail_norm_1.png" name="normTex"/>
<texture file="props/sail_spec_1.png" name="specTex"/>
</textures>

View file

@ -4,9 +4,9 @@
<float/>
<group>
<variant frequency="100" name="Base">
<mesh>props/pers_bir_oars.dae</mesh>
<mesh>props/achae_bir_oars.dae</mesh>
<textures>
<texture file="structural/pers_bir.dds" name="baseTex"/>
<texture file="structural/achae_bir.dds" name="baseTex"/>
<texture file="default_norm.png" name="normTex"/>
<texture file="null_black.dds" name="specTex"/>
</textures>

View file

@ -3,7 +3,7 @@
<castshadow/>
<group>
<variant frequency="1" name="Props_a">
<mesh>structural/pers_blacksmith_props.dae</mesh>
<mesh>structural/achae_blacksmith_props.dae</mesh>
</variant>
</group>
<group>

View file

@ -4,10 +4,10 @@
<group>
<variant frequency="100" name="Base">
<animations/>
<mesh>props/pers_fc.dae</mesh>
<mesh>props/achae_fc.dae</mesh>
<props/>
<textures>
<texture file="props/pers_prop_a.dds" name="baseTex"/>
<texture file="props/achae_prop_a.dds" name="baseTex"/>
<texture file="default_norm.png" name="normTex"/>
<texture file="null_black.dds" name="specTex"/>
</textures>

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="achaemenid farmstead cart">
<mesh>props/achae_farmstead_cart.dae</mesh>
</variant>
</group>
<group>
<variant>
<textures>
<texture file="structural/achae_struct.png" name="baseTex"/>
<texture file="structural/achae_struct_norm.png" name="normTex"/>
<texture file="structural/achae_struct_spec.png" name="specTex"/>
<texture file="structural/ao/achae_farmstead.png" name="aoTex"/>
</textures>
</variant>
</group>
<material>player_trans_ao_parallax_spec.xml</material>
</actor>

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="achaemenid farmstead cart">
<mesh>props/achae_farmstead_cart_big.dae</mesh>
</variant>
</group>
<group>
<variant>
<textures>
<texture file="structural/achae_struct.png" name="baseTex"/>
<texture file="structural/achae_struct_norm.png" name="normTex"/>
<texture file="structural/achae_struct_spec.png" name="specTex"/>
<texture file="structural/ao/achae_farmstead.png" name="aoTex"/>
</textures>
</variant>
</group>
<material>player_trans_ao_parallax_spec.xml</material>
</actor>

Some files were not shown because too many files have changed in this diff Show more