phosit
369a7e7e5d
Use fmt::format for LOGERROR
...
The format string can be checked at compile time. It will be easier to
transition to `std::format`.
2026-10-05 20:29:26 +02:00
phosit
ba158aa3ff
Use fmt::format for LOGWARNING
...
The format string can be checked at compile time. It will be easier to
transition to `std::format`.
2026-10-05 20:29:25 +02:00
phosit
43cb3100b6
Use fmt::format for LOGMESSAGE
...
The format string can be checked at compile time. It will be easier to
transition to `std::format`.
2026-10-05 20:29:25 +02:00
phosit
00ee825374
Remove u8
...
It's better to use types from the standard library.
2026-09-21 18:11:14 +02:00
Vladislav Belov
58e2c59466
Adds Load with unique_ptr to VFS
...
Also replaces some usages of Load with shared_ptr by unique_ptr.
2026-09-10 16:39:29 +02:00
Vladislav Belov
4ae50fd4a4
Reduces memory peak during window resize
2026-09-10 15:38:55 +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
9add728945
Don't track fullscreen mode
...
SDL already does it.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com >
2026-07-10 21:37:14 +02:00
Ralph Sennhauser
99bbc24265
Remove global g_xres and x_yres
...
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
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
phosit
464d40ab61
Split window from main event handler
...
Two globals can be removed.
2026-06-19 20:53:52 +02:00
Vladislav Belov
4d83aa28e5
Uses SwapChain instead of direct Device calls
2026-06-08 18:27:06 +02:00
Vladislav Belov
0432b86de7
Removes ARB (legacy OpenGL) backend
...
ARB is a legacy backend which uses old assembly shaders. It makes
writing shaders more complex. According to the stats
https://feedback.wildfiregames.com we small amount of players with
ARB.
Fixes #8533
2026-02-20 22:07:38 +01:00
Vladislav Belov
1441c971f5
Uses SDL workaround only for GL
2025-10-15 00:52:25 +02:00
Stan
94a7dbacdc
Build molten vk instead of relying on a prebuilt version
2025-08-06 21:21:30 +02:00
Ralph Sennhauser
46d44bbc14
Fix includes in source/ps
...
Make include-what-you-use happy with some files in source/ps and fix
what needs to be fixed.
Delete source/ps/FutureForward.h as it is no longer used.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com >
2025-08-05 07:21:22 +02:00
Ralph Sennhauser
8a6d7b6c65
Fix includes in source/ps
...
Make include-what-you-use happy with some iles in source/ps and fix what
needs to be fixed.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com >
2025-08-03 15:57:56 +02:00
Ralph Sennhauser
621a9c422f
Fix includes in source/graphics
...
Make include-what-you-use happy with files in source/graphics and fix
what needs to be fixed.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com >
2025-08-02 21:39:39 +02:00
Ralph Sennhauser
e7f44ca6ca
Fix some includes in source/renderer
...
Make include-what-you-use happy with some files in source/renderer and
fix what needs to be fixed.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com >
2025-07-09 09:04:50 +02:00
phosit
1a8757660f
Get config values without using return parameters
...
Many temporaries can be removed.
2025-04-09 12:51:21 +02:00
Vladislav Belov
0716d23aa4
Fixes notes.
2024-10-08 23:07:18 +02:00
Vladislav Belov
03792bd809
Adds a hack to detect missing SPIR-V mod.
2024-10-08 23:07:17 +02:00
vladislavbelov
ffc4a56b9f
Revert non-ASCII characters from source and configuration files introduced in 157c6af18e.
...
Fixes #6846
Differential Revision: https://code.wildfiregames.com/D5185
This was SVN commit r27965.
2023-12-03 00:30:12 +00:00
bb
157c6af18e
Make the space in 0 A.D. non-breaking throughout the codebase.
...
Avoid cases of filenames
Update years in terms and other legal(ish) documents
Don't update years in license headers, since change is not meaningful
Will add linter rule in seperate commit
Happy recompiling everyone!
Original Patch By: Nescio
Comment By: Gallaecio
Differential Revision: D2620
This was SVN commit r27786.
2023-07-27 20:54:46 +00:00
vladislavbelov
a28fddcf72
Adds an option to disable mouse grab in fullscreen.
...
Refs #6649
Refs #545
Differential Revision: https://code.wildfiregames.com/D4974
This was SVN commit r27603.
2023-04-12 06:59:37 +00:00
Stan
e27a3c4e53
Fix Molten VK printing too many log messages
...
Reported by: @Langbart
Fixes #6719
Differential Revision: https://code.wildfiregames.com/D4913
This was SVN commit r27501.
2023-01-29 13:03:58 +00:00
Stan
d6121a43ea
Add MoltenVK support to fix Vulkan on macOS.
...
Tested by: @Langbart, @real_tabasco_sauce, @wraitii
Refs #6636
Differential Revision: https://code.wildfiregames.com/D4905
This was SVN commit r27488.
2023-01-26 15:24:12 +00:00
vladislavbelov
a054bd7a9d
Adds a warning in case of Vulkan window creation failure.
...
This was SVN commit r27478.
2023-01-21 23:14:29 +00:00
vladislavbelov
28707d61dd
Fixes creating window on macOS in case of missing Vulkan driver. Fixes #6681
...
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4884
This was SVN commit r27438.
2023-01-13 20:32:36 +00:00
vladislavbelov
fc7c78b8cd
Refactors window creation in CVideoMode.
...
Comments By: phosit, Stan
Differential Revision: https://code.wildfiregames.com/D4866
This was SVN commit r27388.
2023-01-09 00:13:52 +00:00
vladislavbelov
c0e888e2af
Removes SetViewport from CRenderer.
...
Differential Revision: https://code.wildfiregames.com/D4849
This was SVN commit r27313.
2022-12-29 06:53:06 +00:00
vladislavbelov
480bc48194
Removes unused debug print of backend inside CVideoMode forgotten in 912202ff0c.
...
This was SVN commit r27185.
2022-10-30 00:43:45 +00:00
vladislavbelov
968fd50fb0
Moves Backend enum from CVideoMode to backends.
...
Comments By: phosit, Stan
Differential Revision: https://code.wildfiregames.com/D4809
This was SVN commit r27173.
2022-10-25 22:45:54 +00:00
vladislavbelov
62e589ab76
Adds renderer backend interface and dummy backend.
...
Comments By: phosit, Stan
Tested By: Langbart, phosit
Differential Revision: https://code.wildfiregames.com/D4636
This was SVN commit r26858.
2022-05-08 22:02:46 +00:00
vladislavbelov
3ed4eaf247
Removes ogl_WarnIfError from regular renderer code.
...
This was SVN commit r26850.
2022-05-02 21:52:21 +00:00
vladislavbelov
0d2faa1cab
Adds debug context option for GL context creation.
...
This was SVN commit r26484.
2022-02-25 16:26:56 +00:00
vladislavbelov
912202ff0c
Uses core GL functions for GLSL shaders.
...
Tested By: nwtour, Stan
Differential Revision: https://code.wildfiregames.com/D4416
This was SVN commit r26175.
2022-01-06 11:41:04 +00:00
vladislavbelov
7b8c66ec9f
Adds config settings for borderless fullscreen and window modes.
...
Tested By: bb, Langbart
Differential Revision: https://code.wildfiregames.com/D4106
This was SVN commit r26148.
2021-12-31 12:05:48 +00:00
vladislavbelov
89c181ded1
Encapsulates information about GL inside device.
...
Commented By: Stan
Differential Revision: https://code.wildfiregames.com/D4375
This was SVN commit r26072.
2021-12-15 06:43:41 +00:00
vladislavbelov
3809457513
Replaces unclear PreferGLSL by direct renderer backend choice.
...
Commented By: Stan
Differential Revision: https://code.wildfiregames.com/D4363
This was SVN commit r26069.
2021-12-14 06:34:02 +00:00
vladislavbelov
5e61febf16
Resolves concerns from e4907bdb6e. Fixes #6395
...
Tested By: Langbart, nwtour
Differential Revision: https://code.wildfiregames.com/D4370
This was SVN commit r26051.
2021-12-10 21:29:40 +00:00
vladislavbelov
e4907bdb6e
Forces GL 2.1 core context creation in VideoMode.
...
This was SVN commit r26031.
2021-12-04 22:01:20 +00:00
Angen
b4fbbed379
There have been quite a bit of number of questions how to change scale of the gui, because this option is hidden from the user.
...
Use dropdown with values. Implement confirmation box with countdown to
revert scale change because buttons can get unable to click.
Differential revision: D3037
Comments by: @vladislavbelov, @Stan, @wraitii, @pieq, @sera
Tested by: @Langbart
This was SVN commit r25966.
2021-10-17 10:58:51 +00:00
vladislavbelov
0e599a3176
Moves cursor to VideoMode to draw it via SDL.
...
It removes the software implementation intentionally. Because it
duplicates SDL functionality. But it might be added in future on demand.
Tested By: bb, Langbart
Differential Revision: https://code.wildfiregames.com/D4278
This was SVN commit r25936.
2021-09-21 22:44:46 +00:00
vladislavbelov
63c1347ef7
Removes windows enumeration on Windows to retrieve HWND taking it from SDL and wxWidgets.
...
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4064
This was SVN commit r25709.
2021-06-06 15:31:55 +00:00
vladislavbelov
fdb4040838
Adds HiDPI mode for testing. HiDPI on Windows isn't supported in SDL yet. So we use a custom code.
...
Differential Revision: https://code.wildfiregames.com/D4076
This was SVN commit r25692.
2021-06-05 19:01:37 +00:00
vladislavbelov
d7ac3c6b89
Removes macOS system version include added in 7e87211d91 and forgotten in 9a2d0f803e.
...
This was SVN commit r25506.
2021-05-21 21:46:01 +00:00
vladislavbelov
7ae43c149e
Replaces global g_VSync state by VideoMode property.
...
This was SVN commit r25504.
2021-05-21 21:33:43 +00:00
vladislavbelov
e7e6fe139e
Allows to override GL version for SDL.
...
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3448
This was SVN commit r24768.
2021-01-22 19:40:02 +00:00
wraitii
5ee8354e99
Fix windows SEH hook when crashing in an std::thread
...
Follows 107d3d461f and other 'pthread->std::thread' diffs.
Windows uses Structured Exception Handling to allow reporting errors
(both C++ and hardware) nicely. This works by wrapping the code in a
__try __catch block.
The pthread wrapper did this automatically, but we now need to do it
explicitly for std::thread.
Tested by: Stan
Differential Revision: https://code.wildfiregames.com/D3261
This was SVN commit r24530.
2021-01-10 08:39:54 +00:00