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
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
...
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
...
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
...
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
...
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
...
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
...
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
...
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
...
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
...
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
...
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
...
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