Commit graph

25907 commits

Author SHA1 Message Date
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