1
0
forked from 0ad/0ad
Commit Graph

8136 Commits

Author SHA1 Message Date
fd976456d7 Performs texture uploads via DeviceCommandContext interface.
Tested By: Langbart, Stan
Differential Revision: https://code.wildfiregames.com/D4415
This was SVN commit r26170.
2022-01-05 14:49:54 +00:00
0a8d382657 Fix OpenGL ES 2.0 Warnings.
This was SVN commit r26167.
2022-01-04 20:54:37 +00:00
5e3426794c Moves frame rendering function to CRenderer and combines with making screenshots.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4414
This was SVN commit r26166.
2022-01-04 18:13:45 +00:00
87b5c233c5 Splits CRenderer part about scene to CSceneRenderer.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4412
This was SVN commit r26165.
2022-01-04 13:29:01 +00:00
3d2be697a2 Fix OpenGL ES build after ae32055c9b.
This was SVN commit r26163.
2022-01-04 00:21:37 +00:00
2f90becb28 Removes SkipSubmit and unused friends from Renderer.
This was SVN commit r26162.
2022-01-03 12:16:16 +00:00
3e6b0780fa Removes unused Renderer friends of removed classes, refs 8753f881ee, 6bc33fe8bd.
This was SVN commit r26161.
2022-01-03 12:00:37 +00:00
3b8f1cdc04 Moves Renderer internals class out of the global namespace.
This was SVN commit r26160.
2022-01-03 11:11:58 +00:00
6dc0abebdb Removes unused includes from Renderer.
This was SVN commit r26159.
2022-01-03 10:59:41 +00:00
4fba543488 Unifies providing SkyManager and WaterManager like other managers, refs b889826a3d.
This was SVN commit r26158.
2022-01-03 10:49:12 +00:00
7afe489214 Remove topology.cpp. The data isn't useful to us, and it prevents some players from running the game.
Fixes #6028
Differential Revision: https://code.wildfiregames.com/D4402
This was SVN commit r26157.
2022-01-03 10:29:34 +00:00
273d336364 Removes unused Atlas functionality to set clear color added in 2f53eea71a and removed in 0d6882dad2.
This was SVN commit r26156.
2022-01-03 09:39:54 +00:00
e9070a2630 Removes rand function usage from Atlas and unused rand include from particles.
This was SVN commit r26153.
2022-01-02 22:35:17 +00:00
e547704a54 Removes rand function usage from test_cache_adt.
This was SVN commit r26152.
2022-01-02 22:32:38 +00:00
8347c94e3a Moves game load progress update function from GameSetup to CGUIManager.
This was SVN commit r26150.
2022-01-01 12:23:24 +00:00
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
202e248c93 Removes cinema path recording from atlas added in 2c71c22045 and not removed with ffmpeg in [[SVN:9520]], 4c395f4bf2 and 47b26e56d3.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4411
This was SVN commit r26147.
2021-12-31 10:35:56 +00:00
c9ba9299a3 Ignores sampler settings for multisample GL textures.
Reported By: Stan
This was SVN commit r26144.
2021-12-30 17:31:16 +00:00
abc3190c03 Removes binding native GLuint textures from public ShaderProgram API.
Differential Revision: https://code.wildfiregames.com/D4407
This was SVN commit r26143.
2021-12-30 16:37:51 +00:00
e4455a8e8f Speedups terrain painting tab in Atlas by asynchronous texture loading.
Tested By: Silier, Stan
Differential Revision: https://code.wildfiregames.com/D4405
This was SVN commit r26142.
2021-12-30 16:24:07 +00:00
ae32055c9b Add support for GL_KHR_debug in Debug Mode.
Based on a patch by: @linkmauve
Reviewed by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D2488
This was SVN commit r26141.
2021-12-30 15:07:17 +00:00
b74fd6d4a2 Use the high performance GPU on Windows by default.
Reviewed by: @vladislavbelov
Accepted by: @asterix
Differential Revision: https://code.wildfiregames.com/D4401
This was SVN commit r26140.
2021-12-30 13:57:40 +00:00
92cf0c784c Removes Handle from ShaderProgram to use more high-level objects.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4403
This was SVN commit r26138.
2021-12-29 07:07:08 +00:00
b9e4c14083 Fixes out of bounds access in SkyManager after 0837e369cf.
This was SVN commit r26136.
2021-12-28 10:50:42 +00:00
3591220361 Removes redundant ogl usage to process data on CPU combining terrain alpha map.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4399
This was SVN commit r26129.
2021-12-28 06:41:06 +00:00
136f4621af Fixes crash for ARB shaders because they don't provide actual locations, triggered after c2c3a3b663.
Reported By: nwtour
This was SVN commit r26127.
2021-12-27 21:27:56 +00:00
0837e369cf Moves PostProcManager and SkyManager to GL texture class continuing 57ba7c4a1c.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4398
This was SVN commit r26126.
2021-12-27 21:01:43 +00:00
c4de86973d Fix Haiku detection introduced in cc65e0e8a2
Patch by: @xone47
Differential Revision: https://code.wildfiregames.com/D4396
This was SVN commit r26125.
2021-12-27 18:59:44 +00:00
bb
cbb7177fc1 Fix two comments from d95550248b
This was SVN commit r26124.
2021-12-27 16:30:58 +00:00
bb
6ed690f102 Add script to remove unneeded info from .po files
Differential Revision: D4264
This was SVN commit r26123.
2021-12-27 14:31:32 +00:00
3cb60353e1 Removes unused h_mgr includes.
This was SVN commit r26122.
2021-12-27 11:47:16 +00:00
9696df3c28 Removes unused ogl/ogl_tex includes.
This was SVN commit r26121.
2021-12-27 10:11:26 +00:00
60a422b668 Moves water textures and terrain alpha composite map to GL texture class following 57ba7c4a1c.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4394
This was SVN commit r26120.
2021-12-27 08:14:47 +00:00
f59f637cbb Cleanups TerrainTextureEntry a little, removes commented member from 88ab3f0f5b.
This was SVN commit r26118.
2021-12-26 20:39:13 +00:00
c2c3a3b663 Moves shadow map and terrain overlay to GL texture class continuing 57ba7c4a1c.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4393
This was SVN commit r26117.
2021-12-26 09:48:48 +00:00
bb
bd8b11676e Update translation files on translator change
Comments By: Stan
Differential Revision: D4260
This was SVN commit r26113.
2021-12-25 21:22:45 +00:00
Angen
ac7dc057df Add "Invalid signature" reason to modio
When signature is invalid, it does not comunicate the reason clearly.
Fix this.
Also remove silent failure in case of signature is not valid.

Differential revision: D3478
Reviewed by: @bb
This was SVN commit r26111.
2021-12-25 19:31:51 +00:00
57ba7c4a1c Encapsulates GL texture creation in a separate class.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4389
This was SVN commit r26107.
2021-12-25 00:26:10 +00:00
478164962f Removes static linking of OpenGL library.
Tested By: Langbart, Stan
Differential Revision: https://code.wildfiregames.com/D4387
This was SVN commit r26104.
2021-12-24 08:02:27 +00:00
f9818b7f7a Moves default texture to SingleColorTexture following 283f524fcf.
This was SVN commit r26102.
2021-12-23 17:44:24 +00:00
6b7541cec5 Add more options to archive builds.
Patch by: @wraitii, @Stan
Tested for A25.

Differential Revision:
https://code.wildfiregames.com/D4141#change-nbAmEr5oWUW3

This was SVN commit r26100.
2021-12-23 14:59:37 +00:00
6f1322881e Cleanups console a little bit.
This was SVN commit r26099.
2021-12-23 07:37:03 +00:00
53734a05a6 Add a missed include in https://code.wildfiregames.com/D721; It's included for some reason in Windows NOPCH but not linux
Reported by: @Freagarach
This was SVN commit r26097.
2021-12-22 11:02:13 +00:00
c9bea80e0d Use GLAD2 a multi-Language Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator.
Comments by: @nwtour, @Langbart, @bb
Based on patch by: @echotangoecho
Tested on Windows 7 & 10, Ubuntu and macos.

Differential Revision: https://code.wildfiregames.com/D721
This was SVN commit r26093.
2021-12-21 22:03:31 +00:00
a32ab00f4d Moves backbuffer swap and error check to GL device.
This was SVN commit r26092.
2021-12-21 17:02:04 +00:00
3b9b7cd605 Moves GL report from HWDetect to GL device.
Tested By: Freagarach, Stan
Differential Revision: https://code.wildfiregames.com/D4376
This was SVN commit r26081.
2021-12-16 06:36:46 +00:00
eb004e5c98 Uses forward declaration for SDL in GL device.
This was SVN commit r26078.
2021-12-15 10:50:31 +00:00
93a9072618 Removes logs of unused GL constants which duplicate video mode settings.
This was SVN commit r26077.
2021-12-15 10:49:46 +00:00
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
784f734480 Removes a hack to detect an old S3 SuperSavage card added in c1ec44d751.
This was SVN commit r26070.
2021-12-14 10:47:32 +00:00
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
f28efbaa87 Forbids using more than 64 bones for GPU skinning.
Commented By: Stan
Differential Revision: https://code.wildfiregames.com/D4244
This was SVN commit r26067.
2021-12-13 19:22:27 +00:00
a3382fb3eb Removes checks for unused or always enabled GL extensions.
Differential Revision: https://code.wildfiregames.com/D4371
This was SVN commit r26065.
2021-12-13 18:36:37 +00:00
b7cf30fce5 Fix Windows 11 Detection
Comments by: @vladislavbelov, @Freagarach
Differential Revision: https://code.wildfiregames.com/D4337
This was SVN commit r26056.
2021-12-12 16:08:09 +00:00
5b6bb1cd89 Fix Alt Tab on Windows for SDL > 2.0.12
Comments by: @vladislavbelov,  @Freagarach
Differential Revision: https://code.wildfiregames.com/D4359
This was SVN commit r26055.
2021-12-12 16:01:30 +00:00
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
9cb6e4c105 Cleanups Font and FontManager a little.
This was SVN commit r26050.
2021-12-10 16:59:32 +00:00
dfe165d6c2 Fixes unused m_Simulation after b991ef919b.
This was SVN commit r26046.
2021-12-09 18:07:10 +00:00
fe81a6eec7 Refactors WaterManager to remove duplication of the current texture index calculation. Removes unused m_WaterCurrentTex from f2cae8cb9b.
This was SVN commit r26045.
2021-12-09 18:01:28 +00:00
fe511e88d9 Adds FreeType support to the engine.
Tested By: Langbart, Imarok, Stan, s0600204, wraitii
Differential Revision: https://code.wildfiregames.com/D4108
This was SVN commit r26040.
2021-12-08 22:14:43 +00:00
90f27d4909 Adds console toggle hotkeys to the console welcome message.
Patch By: nwtour
Differential Revision: https://code.wildfiregames.com/D4347
This was SVN commit r26035.
2021-12-07 20:09:46 +00:00
e4907bdb6e Forces GL 2.1 core context creation in VideoMode.
This was SVN commit r26031.
2021-12-04 22:01:20 +00:00
5a7aa37cd1 Fixes without PCH build after af567560b8.
Reported By: Freagarach
This was SVN commit r26026.
2021-11-30 18:03:39 +00:00
a591e5aa69 Removes unused/not implemented hooks from AppHooks. Refs f947fa6afe.
This was SVN commit r26024.
2021-11-29 18:21:49 +00:00
af567560b8 Drops custom utf16 string implementation (from cdd3317ded), uses C++11 one.
Patch By: sera
Differential Revision: https://code.wildfiregames.com/D4223
This was SVN commit r26023.
2021-11-29 12:10:41 +00:00
e1374252b7 Removes direct access to shaders, leaves only techniques.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4353
This was SVN commit r26020.
2021-11-27 15:01:14 +00:00
4c26a2d11f Adds disabled sprites to slider.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4355
This was SVN commit r26019.
2021-11-27 13:37:05 +00:00
c0e0d620eb Draws fancy water and its shore waves only for GLSL shaders.
This was SVN commit r26017.
2021-11-26 21:47:04 +00:00
809e3ed0bd Removes rand function usage from tests to avoid non-uniform distributions.
This was SVN commit r26012.
2021-11-25 17:57:59 +00:00
6efa293fd1 Reduces number of allocations during GPU profiler processing for Intel queries.
This was SVN commit r26011.
2021-11-25 17:33:17 +00:00
265a2246f0 Removes unused fnv_lc_hash, also file paths case sensitive so we can't use the function.
This was SVN commit r26010.
2021-11-25 16:58:04 +00:00
25ce179cbc Adds collision test for fnv_hash, removes unused include forgotten in b4a33851e6.
This was SVN commit r26007.
2021-11-21 11:59:02 +00:00
ab01a2d2fc Fix replay folders with special characters.
Implemented in e7ab22286e, broken in cb346e207b.

Patch by: @Langbart
Help by: @elexis
Differential revision: https://code.wildfiregames.com/D4345
Fixes: #6373
Reviewed by: @vladislavbelov
Tested by: @Freagarach
This was SVN commit r26005.
2021-11-19 11:34:26 +00:00
9b3dcd2610 Slightly improves minimap flares, makes animation more smooth via alpha fade in/out.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4351
This was SVN commit r26001.
2021-11-16 16:58:32 +00:00
b5d85e279f Removes border pixels drawing of the minimap texture with scissors after b991ef919b. Fixes #6382
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4350
This was SVN commit r25997.
2021-11-14 16:51:39 +00:00
d1a7aa2858 Adds alpha and custom options to render debug modes.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4346
This was SVN commit r25996.
2021-11-14 08:33:59 +00:00
b991ef919b Moves MiniMap texture rendering to a separate framebuffer to update it less frequently.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4331
This was SVN commit r25993.
2021-11-12 19:15:48 +00:00
36eb92f9a4 Adds render debug modes.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4311
This was SVN commit r25992.
2021-11-12 11:22:18 +00:00
bb
c1cd28c878 Also do a postMove update when the average speed over last turn isn't zero
Reviewed By: Freagarach
Differential Revision: D4302
refs acc780bcbb

This was SVN commit r25985.
2021-10-31 17:21:04 +00:00
4bae03c6c8 Enables GL_TEXTURE_2D always since we don't support FPP anymore.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4327
This was SVN commit r25982.
2021-10-30 14:34:20 +00:00
Angen
5924575705 Fix pathname not matching name incompatible mod detection
Differential revision: D4324
Broken in 498f0d420b

This was SVN commit r25979.
2021-10-28 20:33:01 +00:00
083ab0f4b0 Some layout changes to the replay menu.
Cursor should not blink in read-only.
The path was too similar to the list and thus easy to miss, it has been
changed to a 'golden' colour.
A tooltip was added to the path.
The border colour of input fields was changed from white to gold.
The buttons at the bottom of the page are spread evenly.

Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4296
Refs: #6350

This was SVN commit r25976.
2021-10-28 06:14:17 +00:00
f543574d61 Removes lines drawing by direct GL calls from MiniMap.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4321
This was SVN commit r25973.
2021-10-27 06:42:54 +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
31a6ffdd3a Removes mentions of legacy and unused GL calls, unifies AsFloatArray.
This was SVN commit r25961.
2021-10-11 12:39:01 +00:00
9ee448b377 Removes direct GL calls from Atlas bandbox drawing.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4300
This was SVN commit r25960.
2021-10-11 11:30:50 +00:00
bb
acc780bcbb Add accelerations in unit movement.
This helps preventing arrow dodging.

Differential Revision: D3200
Reviewed By: Freagarach
Comments By: wraitii, vladislav, Palaxin, Stan
refs: #5106

This was SVN commit r25953.
2021-10-09 21:31:11 +00:00
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
31b70309b3 Debundle Valgrind and make it optional
If a *nix user wishes to build `pyrogenesis` with support for Valgrind
(such as
it is), then can do so by passing `--with-valgrind` to
`update-workspaces.sh`.
(They will need Valgrind installed and locateable via `pkg-config`.)


Reviewed By: sera, Stan
Fixes: #2904
Differential Revision: https://code.wildfiregames.com/D3646
This was SVN commit r25933.
2021-09-20 22:18:28 +00:00
ce08f57f51 Removes ogl_tex_find function, which duplicates cache-like logic in TextureManager.
This was SVN commit r25932.
2021-09-20 16:39:51 +00:00
3e198f1463 Removes duplication of terrain alpha map creation in Renderer.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4269
This was SVN commit r25931.
2021-09-20 12:55:39 +00:00
dfeb29b82c Fix duplicate insertion error when detecting incompatible mods.
Since f1acd22455, mods are checked for compatibility. However, they can
incorrectly be checked & added to inompatible mods several time, leading
to a potential crash.

The new code can also be simplified slightly.

Reviewed By: Angen
Differential Revision: https://code.wildfiregames.com/D4276
This was SVN commit r25926.
2021-09-17 16:59:03 +00:00
645e053fd2 Remove executable bit on some source files.
Reported by: Ralph Sennhauser
Fixes: #6325

This was SVN commit r25917.
2021-09-12 18:41:51 +00:00
b6012ec606 Fix false positive; undefined variable in NetworkClient.cpp
refs #6321 for further cleanups.
Discussed with: @wraitii
Differential Revision: https://code.wildfiregames.com/D4258
This was SVN commit r25908.
2021-09-09 18:00:17 +00:00
6272ba2344 Remove Custom implementation of wrename on windows. 52baaa4bbd removed the other occurences.
Reviewed by: @wraitii
Differential Revision: https://code.wildfiregames.com/D4225
This was SVN commit r25907.
2021-09-09 17:53:17 +00:00
d599a86b3e Disable the false positive "mod by 0" warning on Windows.
Differential Revision: https://code.wildfiregames.com/D4259
This was SVN commit r25906.
2021-09-09 17:49:07 +00:00
96708cc6a5 Adds header for forward declarations of CStr.
This was SVN commit r25905.
2021-09-09 17:39:08 +00:00
a5c82a4ef6 Removes unused forward declarations of class and struct.
This was SVN commit r25903.
2021-09-08 19:43:01 +00:00
b90066a69b Moves macro-defined methods of CStr to templates.
Differential Revision: https://code.wildfiregames.com/D4251
This was SVN commit r25900.
2021-09-07 21:01:34 +00:00
3fdbe3e8dc Make translation pulling parallel to reduce update time.
This was SVN commit r25897.
2021-09-05 17:39:51 +00:00
e62dac7ad4 Removes unused macro from CStr, reduces macro dependency.
Tested By: Freagarach, Stan
Differential Revision: https://code.wildfiregames.com/D4245
This was SVN commit r25891.
2021-09-03 21:06:22 +00:00
3b417062bb Reduces the number of possible allocations for models with multiple UV sets during loading.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4247
This was SVN commit r25890.
2021-09-03 20:11:52 +00:00
eaddc92816 Removes unused g_GameRestarted forgotten in 7ce4552f5e.
This was SVN commit r25885.
2021-09-01 19:48:09 +00:00
55f9d78e7e Moves tex tests to the related folder, was forgotten to move in 63086f4e26.
This was SVN commit r25884.
2021-09-01 19:27:34 +00:00
dd90dbf8b5 Allow to enable Cartography at the start of a match.
Adds a checkbox to the game setup to allow players to have Cartography
autoresearched from the start of the match.
Refs.
https://wildfiregames.com/forum/topic/27265-theres-any-mod-so-you-can-see-what-your-allies-see-from-the-start.

Patch by: @Jammyjamjamman
Differential revision: https://code.wildfiregames.com/D4191
Reviewed by: @Angen
Comments by: @andy5995, @Langbart
This was SVN commit r25869.
2021-08-28 06:15:36 +00:00
Angen
81ad9f746b Do not require restart when chaning Background pause option
Background pause does require a game restart to take effect.
Adding function to update it on runtime since only place where it is
used is in main.cpp.

Differential revision: D4181
Fixes: #6236
Tested by: @Langbart
This was SVN commit r25866.
2021-08-27 18:54:20 +00:00
Angen
9ff8b0758c [scripts]Update translation checks to check pluralised strings
Currently script checks only singular translations
Add branch to check plural strings as well

Differential revision: D4199
Refs: #4250
Comments by: @Stan
This was SVN commit r25865.
2021-08-27 18:48:41 +00:00
4a9bac2811 Bump version to alpha 26.
Last alpha 25 commit was [[SVN:25860]]

Accepted by: @Freagarach, @asterix
Comments by: @wraitii
Differential Revision: https://code.wildfiregames.com/D4215
This was SVN commit r25861.
2021-08-27 16:32:34 +00:00
26bfd92dbd Fix nopch build. broken in 52baaa4bbd.
This was SVN commit r25855.
2021-08-22 13:20:41 +00:00
Angen
52baaa4bbd Fix updating existing mods
Replace wrename, that fails when mod exists already with RenameFile by
@Stan
Check if mod was actually installed when downloading it
error if mod cannot be coppied into modTemp

Differential revision: D4222
This was SVN commit r25854.
2021-08-22 11:35:34 +00:00
Angen
83bb6f3ed5 Fix downloanded mods not showing in list until restart
since 498f0d420b
While at it, remove not used variable after 6400a4a0c5
also fix non visual replay broken in 6400a4a0c5

Differential revision: D4220
Tested by: @Stan, @Langbart
Fixes: #6288

This was SVN commit r25853.
2021-08-22 09:54:16 +00:00
Angen
6400a4a0c5 Update Available mods when installing them
Differential revision: D4211
Since 498f0d420b available mods where cached and not updated when new
where installed.
Fixing above.

This was SVN commit r25850.
2021-08-17 17:32:10 +00:00
0ba9cbef74 Fix units changing appearance when switching animation.
Bug introduced in 76acc4e146.
The previous CUnit code had logic to select random aesthetic variants
once initially. The new code removed that, as I completely missed its
purpose, assuming that the random selection, being based on a seed,
would pick the same variants every time. This is incorrect because
entity selections can change the RNG calls, thus the variants, and thus
entity appearance can change when the animation changes (typically, a
horse will change color when walking and running).

The solution is to re-introduce the choice of actor selections on CUnit
creation. This makes sure that units don't change their purely-aesthetic
selections when e.g. animations change.

Reported by: Wowgetoffyourcellphone
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4205
This was SVN commit r25844.
2021-07-31 17:55:10 +00:00
12aa35eb3b Fix loading grayscale heightmaps for RM maps.
d2948937a0 introduced code to read Heightmap images into RM terrain
data. However, the original diff contained a bug where it read
Out-of-bounds array data for grayscale images. This bug was hidden by
another issue until D1816 / cbc04ba83b, which changed the code and made
the OOB read actually relevant. The effect was twofold:
- The height chosen was not the max of the 3 color channels, but the max
of the 3 neighboring pixel (thus slightly lowering the quality of
generated maps)
- The height for the bottom-right coordinates were random memory values,
thus garbage.

This random height ended up resulting in non-deterministic map
generation, which was reported on Ngorongoro.

The cause of this silent failure is that the transformation to BGRA is
not applied for grayscale images, as the alpha transformation is
processed first and exits. This is not per-se buggy, so it is not
changed here.
The fixed behaviour is specialized for the common grayscale case, and
retains the max-of-3-color-channel intended behaviour otherwise.

Fixes #6261.

Reported by: Feldfeld
Differential Revision: https://code.wildfiregames.com/D4203
This was SVN commit r25843.
2021-07-31 17:52:05 +00:00
Angen
ae744f13f3 Prevent formation members to run when they should not
Reported on forum:
https://wildfiregames.com/forum/topic/41264-alpha-25-pre-releaserelease-candidate-build-testing/page/13/
Introduced in: 40cbde1925
Differential revision: D4201
Tested by: @Freagarach, @marder
This was SVN commit r25841.
2021-07-27 18:20:26 +00:00
cba3528c48 Update translation credits.
- Restore original language names, and keep an English fallback in case
the font is missing for some languages.
Fixes: #6023
Fixes: #6255

This was SVN commit r25839.
2021-07-26 16:40:16 +00:00
72a20be1df Fix rare crash on Linux when opening dropdowns.
Patch by: @wraitii
Accepted by: @Angen
Fixes #5598
Fixes #6225

Differential Revision: https://code.wildfiregames.com/D4183
This was SVN commit r25830.
2021-07-20 20:59:45 +00:00
dddaa67abd Fix unicode build for Atlas on OpenSuse.
Based on a patch by: @MatSharrow
Reviewed by: @wraitii
Differential Revision: https://code.wildfiregames.com/D4178
This was SVN commit r25815.
2021-06-29 12:41:31 +00:00
a541f3a317 Fix hotloading making models disappear.
The actors were always hotloaded because of a bad logic change in
76acc4e146.

Fixes #6228

Differential Revision: https://code.wildfiregames.com/D4175
This was SVN commit r25805.
2021-06-17 07:52:50 +00:00
17c54d5a69 Fix options occasionally thinking they've been modified when they haven't.
std::array leave the values in an undefined state which can very well be
'true'.

Tested By: Freagarach
Fixes #6205

Differential Revision: https://code.wildfiregames.com/D4170
This was SVN commit r25802.
2021-06-16 15:54:55 +00:00
6b493aa52c Fixes big screenshots, implements CCamera::GetViewQuad properly for custom projections.
Differential Revision: https://code.wildfiregames.com/D4165
This was SVN commit r25794.
2021-06-13 17:42:37 +00:00
f189172db6 UnitMotion hack to fix units being stuck near corners.
I think there is a small mismatch between CheckMovement & the vertex
pathfinder when computing passability because one is ray-based and the
other just uses edges. However, it's out of my reach to fix it for now.
This can lead to units being stuck near building edges occasionally.
This introduces an un-intrusive recovery strategy (aka a hack) in
HandleObstructedMove that should get the units unstuck.

Should fix #6114 (to a sufficient extent anyways)

Differential Revision: https://code.wildfiregames.com/D4162
This was SVN commit r25786.
2021-06-13 08:43:32 +00:00
b3458d408a Add a setting for the minimap flare lifetime.
Tested by: marder, Langbart
Differential Revision: https://code.wildfiregames.com/D4135
This was SVN commit r25775.
2021-06-11 20:47:09 +00:00
79e772152b Fix game not closing when compiled with --without-nvtt.
Fixes: #6107

Differential Revision: https://code.wildfiregames.com/D4138
This was SVN commit r25766.
2021-06-10 15:42:38 +00:00
4de9c4c164 Fixes for some random maps.
- Hellas_biome isn't a RM but as a JSON script it does load, and then
silently fails on mapgen. Explicitly fail.
- Fix player.js when a valid position cannot exist.
- Fix unknown.js when landscape isn't set in the settings.

Reported by: vladislavbelov
Refs #6180

Differential Revision: https://code.wildfiregames.com/D4147
This was SVN commit r25765.
2021-06-10 13:16:10 +00:00
270378414e Uncompress cached DDS in mouse event mask.
Reported by: langbart
Differential Revision: https://code.wildfiregames.com/D4142
This was SVN commit r25759.
2021-06-09 13:50:57 +00:00
990d61a74a Draws all characters for a very long text of the same style.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4120
This was SVN commit r25749.
2021-06-08 18:17:10 +00:00
870e689e5f Unit pushing: fix pairs of unit being allowed to overlap.
Following 40cbde1925, the minimum pushing force is 0.2. This also
happens to be the maximum pushing force any pair of units can exert on
each other, so they can freely overlap instead of being pushed.

This tweaks settings slightly to fix that problem.

Reported by: marder
Differential Revision: https://code.wildfiregames.com/D4129
This was SVN commit r25748.
2021-06-08 16:38:06 +00:00
83703992c9 Fix speed glitch
Introduced in 40cbde1925
MoveToFormationOffset may be called after the formation controller is
reset, leading to issues. It seems best to trust only
SetMemberOfFormation.

This causes the speed glitch experienced by wow & Valihrant.

Differential Revision: https://code.wildfiregames.com/D4128
This was SVN commit r25747.
2021-06-08 16:03:31 +00:00
b7ff371d00 Prevent OOM crash in Reference Tree on error
The structTree, in case of errors, could have enough items to draw to
trigger an OOM failure in the Arena allocator.

This fixes that by hiding elements by default and some c++ memory
optimisation (mostly, this should make all platforms take the same
memory footprint for VisibleObject).

Discussed with vladislavbelov and s0600204

Differential Revision: https://code.wildfiregames.com/D4114
This was SVN commit r25746.
2021-06-08 14:57:59 +00:00
1d518f5d6f Fix MouseEventMask for bundles.
The .png get converted to .dds and they failed to load. Use a custom
CacheLoader since that's lightweight enough and avoids having to hack
into the texture manager.

Thanks Stan for testing

Differential Revision: https://code.wildfiregames.com/D4119
This was SVN commit r25738.
2021-06-07 19:27:54 +00:00
65ae6543c3 Increase maximum size of mac bundle DMG
The game is slightly over 3G now.
This doesn't affect the actual DMG size, just the maximum size we can
write into it.

Differential Revision: https://code.wildfiregames.com/D4118
This was SVN commit r25737.
2021-06-07 18:56:32 +00:00
f5f493681d Fix atlas crash with RM capture the relic.
As no default values got set, some game settings became NaN, which
triggered exceptions.
This sets sane default.

This also includes better debugging logic in case of exception, so it's
easier to know what happens.

Fixes #6200

Reported by: langbart
Differential Revision: https://code.wildfiregames.com/D4113
This was SVN commit r25736.
2021-06-07 18:48:16 +00:00
67539a8837 Fixes an old bug with missed handle appeared in 63c1347ef7.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4115
This was SVN commit r25735.
2021-06-07 18:45:28 +00:00
7787176802 Ship the fontbuilder folder to distribute font licenses
Fixes #6198

Differential Revision: https://code.wildfiregames.com/D4090
This was SVN commit r25722.
2021-06-07 06:43:54 +00:00
8597cd2c2e Removes FFP shader program. Fixes #5791
This was SVN commit r25717.
2021-06-06 19:49:43 +00:00
e0b492a83a Removes old gui_* materials, replaced by a single canvas2d material.
This was SVN commit r25714.
2021-06-06 18:25:04 +00:00
7d039f2627 Replaces gui material by solid material in water waves rendering.
This was SVN commit r25713.
2021-06-06 18:13:20 +00:00
fa03eb3485 Switches ShadowMap debug rendering to canvas2d material.
This was SVN commit r25712.
2021-06-06 18:05:10 +00:00
30e135693e Implements configurable cascade shadows.
Tested By: Langbart, Stan, wraitii
Differential Revision: https://code.wildfiregames.com/D3972
This was SVN commit r25711.
2021-06-06 16:44:54 +00:00
ca6fcb28ab Don't store the camera pointer in the minimap
Reviewed by: vladislavbelov
Fix #5973

Differential Revision: https://code.wildfiregames.com/D4100
This was SVN commit r25710.
2021-06-06 16:08:10 +00:00
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
40cbde1925 Further Pushing tweaks: more customisable, longer ranges.
This overall decreases the deathball effect from units walking to each
other a bit.
- Fix formations - this cleans up a UnitMotion hack for formations,
making it possible to increase pushing ranges without breaking closely
knit formations like testudo.
- Make MINIMAL_PUSHING and the MOVE_EXTENSION configurable, and add a
STATIC_EXTENSION as well.
- Increase the pushing range significantly, making units sparser.

Differential Revision: https://code.wildfiregames.com/D4098
This was SVN commit r25708.
2021-06-06 15:25:52 +00:00
7fdbe037dd Uses canvas2d material for line drawing instead of gui_solid.
This was SVN commit r25704.
2021-06-06 10:13:57 +00:00
337c4100ce Cleanups ddbf1ea770 which fixes 4ffc005a7f. Sprites can not be inserted twice.
This was SVN commit r25702.
2021-06-06 09:31:36 +00:00
8af0689b5f Fix gamesetup player assignment issue when joining
Switch some logic from C++ to JS in PREGAME for player assignments. Refs
#3049

Fixes #6204

Reported by: Imarok
Tested By: Imarok
Differential Revision: https://code.wildfiregames.com/D4092
This was SVN commit r25699.
2021-06-06 08:02:28 +00:00
ddbf1ea770 Hotfix 4ffc005a7f
A GUI sprite can have e.g. "color:" and "stretched:", but 'sprite' was
moved from after the first call.
Refs #6206

Differential Revision: https://code.wildfiregames.com/D4094
This was SVN commit r25698.
2021-06-06 07:44:20 +00:00
4ffc005a7f Removes raw pointers management from sprites owned by CGUI.
This was SVN commit r25695.
2021-06-06 00:32:49 +00:00
8e150199a8 Removes raw pointers management from CGUISprite.
This was SVN commit r25694.
2021-06-06 00:22:43 +00:00
a2257237b3 Removes raw pointers management from GUIScrollBarOwner.
This was SVN commit r25693.
2021-06-06 00:12:31 +00:00
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
8e63a0322c Map flares
Add flaring on the map and resize the minimap buttons.
Target marker and button by Stan.
Reviewed/Commented by wraitii, elexis, vladislavbelov
Refs: #3491
Refs: #57

Differential Revision: https://code.wildfiregames.com/D1751
This was SVN commit r25691.
2021-06-05 17:37:18 +00:00
f3efe47ff6 Default-init atomics in TaskManager::Impl
std::atomic<bool> does not value-initialise the boolean.
This caused windows tests to use way too much CPU and fail.

Differential Revision: https://code.wildfiregames.com/D4089
This was SVN commit r25687.
2021-06-05 09:48:41 +00:00
3745940de8 Fix OOS in unit motion
Fixes 592453c62f
wasObstructed and wentStraight are not reset when Move() isn't called,
but PostMove may still be called (if the unit was pushed). This will
OOS.

Differential Revision: https://code.wildfiregames.com/D4088
This was SVN commit r25686.
2021-06-05 09:33:57 +00:00
69901d9ffb Tweaks to TaskManager code
Reported by: Vladislav
Differential Revision: https://code.wildfiregames.com/D4077
This was SVN commit r25667.
2021-06-04 12:55:15 +00:00
82c44e826d Lobbybots: Send IQ result containing the IP address to a client starting a new hosted match and remove the IP from gamelist stanza.
Refs: D3490, D3184

This was SVN commit r25660.
2021-06-04 00:33:43 +00:00
b360b7bd2b Disallow hardware without VBO support to simplify vertex buffer usages.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4054
This was SVN commit r25659.
2021-06-03 22:06:59 +00:00
0ebc08b13c Thread the pathfinder computations using the task manager.
The pathfinder computations are run asynchronously (and potentially on
the main thread) in-between simulation turns, thus reducing
pathfinder-related lag considerably in common cases.

To make this most efficient, the number of paths computed during a turn
via MaxSameTurnMoves is reduced from 64 to 20.

This has a hard dependency on the obstruction manager (via the vertex
pathfinder) not being modified in-between simulation turn (or to put it
more generally on the simulation state not changing outside of turn
computation), otherwise results will be non-deterministic and go OOS.
This is currently entirely safe (as in, it indeed does not happen that
the simulation state changes in-between turn), but future work towards
improving simulation sandboxing would be good.

Thanks to Kuba386 for maintaining & improving the patch in 2020
Thanks to everyone who tested the various iterations of this patch.

Fixes #4324

Differential Revision: https://code.wildfiregames.com/D14
This was SVN commit r25657.
2021-06-03 16:21:28 +00:00
1b35d36daa Implement a global task manager using a pool of worker threads
Tasks are simple callables (e.g. lambdas), and can be pushed with 2
priority levels. Pushing a task returns a future.
Futures can be waited on, can return results, and can be cancelled
deterministically. Futures can also not be waited on.

This gives 'hardware concurrency - 1' threads to maximize CPU usage in a
work-stealing workflow.

Reviewed by: vladislavbelov
Refs #5874

Differential Revision: https://code.wildfiregames.com/D3848
This was SVN commit r25656.
2021-06-03 14:48:38 +00:00
3662b2d5e2 Fix error in HasSameMods with old matchsettings.
Add some retro-compatibility to avoid issues.

First reported by: gameboy
Differential Revision: https://code.wildfiregames.com/D4066
This was SVN commit r25651.
2021-06-03 10:16:59 +00:00
83608c9205 Removes complex transform from TextRenderer.
This was SVN commit r25648.
2021-06-02 22:16:09 +00:00
455b784f62 Delete test .zip file after running tests
Issue spotted by kalimaps
Reviewed by: wraitii
Code parts by: wraitii
Differential Revision: https://code.wildfiregames.com/D4043
This was SVN commit r25646.
2021-06-02 21:31:18 +00:00
2d455df18d Removes Z value from TextRenderer translate, renames TextRenderer methods to more explicit ones.
This was SVN commit r25645.
2021-06-02 21:21:28 +00:00
48ea6ee7d2 Moddability for pushing: radius in XML, allow deactivating globally/some templates.
Differential Revision: https://code.wildfiregames.com/D4040
This was SVN commit r25635.
2021-06-02 17:36:32 +00:00
07e44a75a1 Allow mods to say they should be ignored in replay/MP compatibility checks
Since it is very non-trivial to determine which mods change checksums
and which don't, this relies on modder goodwill (and on verification on
our end for signed mods).

The declaration is an optional "ignoreInCompatibilityChecks" boolean in
mod.json

Also rework slightly the MP lobby mod display to always show the host
mods in a clear manner.

Differential Revision: https://code.wildfiregames.com/D3968
This was SVN commit r25634.
2021-06-02 06:50:16 +00:00
2c3a49734c Removes ShaderProgram from MiniMap header, removes unnecessary members, removes useless scissoring.
This was SVN commit r25631.
2021-06-01 21:37:14 +00:00
e0fd3b532f Cleanups MiniMapTexture a bit.
This was SVN commit r25630.
2021-06-01 19:50:15 +00:00
c2c9059f67 Fixes removed terrain missed in 7ce4552f5e.
This was SVN commit r25629.
2021-06-01 19:08:22 +00:00
7ce4552f5e Moves partially MiniMap texture rendering into a separate object.
Tested By: Langbart, Stan
Differential Revision: https://code.wildfiregames.com/D4045
This was SVN commit r25628.
2021-06-01 18:55:35 +00:00
01e940217e Adds header safeguards to LOSTexture forgotten in fe21c5e023.
This was SVN commit r25620.
2021-05-31 20:47:03 +00:00
4d11256510 Adds shader technique caching to Canvas2D.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4034
This was SVN commit r25619.
2021-05-31 19:22:14 +00:00
42e67be0ee Fix crash when pushing a page while pushing a page.
Because the page stack is a vector, if during PushPage, a new page is
pushed, the vector may re-allocate. This 'pulls the rug out' from
underneath the code stack that originally pushed, which then crashes.

To fix this, use a deque, since push/pop won't invalidate references.

Reported by: Imarok.
Based on a patch by: Imarok (tests are his)
Differential Revision: https://code.wildfiregames.com/D4037
This was SVN commit r25616.
2021-05-31 13:42:08 +00:00
b1902d8e80 Allow setting texture quality in the config file. Fixes a todo.
Differential Revision: https://code.wildfiregames.com/D3020
This was SVN commit r25615.
2021-05-31 12:52:43 +00:00
0bc7ba50ea Add an option to reduce the diversity of actor variants
Variants can now have limited or no diversity. This can occasionally
speed rendering slightly (5-10% FPS increase was reported on Combat Demo
Huge, which is very variant-heavy).

Reported by: bb
Based on a patch by: bb
Fixes #5831

Differential Revision: https://code.wildfiregames.com/D3035
This was SVN commit r25613.
2021-05-31 11:42:46 +00:00
2cc671fd36 Makes 2D text drawing via Canvas2D.
This was SVN commit r25607.
2021-05-30 19:10:10 +00:00
7f16a5c40c Moves TextRenderer shader to a more relevant place, into the rendering function argument.
This was SVN commit r25606.
2021-05-30 18:28:06 +00:00
7f6ef5db79 Removes gui_solid material usage from CChart.
This was SVN commit r25605.
2021-05-30 18:13:23 +00:00
9933fe4b69 Removes gui_solid material usage from ProfileViewer.
This was SVN commit r25604.
2021-05-30 17:35:26 +00:00
1f192f1593 Removes low level GL code from GUI sprite rendering and switches to Canvas2D.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4031
This was SVN commit r25603.
2021-05-30 13:48:58 +00:00
d08c96be43 Uses Canvas2D for str_gui_add material in GUIRenderer.
This was SVN commit r25598.
2021-05-30 01:01:42 +00:00
bee5a4b3a6 Uses Canvas2D for str_gui_solid_mask material in GUIRenderer.
This was SVN commit r25597.
2021-05-30 00:30:55 +00:00
9e611e11f8 Uses Canvas2D for gui_basic material in GUIRenderer.
This was SVN commit r25596.
2021-05-29 23:41:07 +00:00
a462970707 Restores GL check for tests in TextureManager forgotten in 283f524fcf.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4030
This was SVN commit r25595.
2021-05-29 23:24:36 +00:00
7f0c4ee9ab Removes unnecessary blend state changes from GUIRenderer.
This was SVN commit r25594.
2021-05-29 22:48:52 +00:00
df7cabd653 Implements DrawTexture in Canvas2D.
This was SVN commit r25593.
2021-05-29 22:30:23 +00:00
dacbab8b02 Fixes a mistype introduced in 283f524fcf. A smaller size might cause a write to an allocated memory.
This was SVN commit r25592.
2021-05-29 20:07:15 +00:00
57dde8d082 Provides Canvas2D for sprite rendering.
Differential Revision: https://code.wildfiregames.com/D4029
This was SVN commit r25591.
2021-05-29 19:47:36 +00:00
283f524fcf Implements DrawRect in Canvas2D, removes CConsole background drawing with low level GL calls.
This was SVN commit r25590.
2021-05-29 12:31:14 +00:00
2f3837e0b5 Adds Canvas2D to encapsulate low level GL calls for 2D rendering.
Implements DrawLine for charts.

Differential Revision: https://code.wildfiregames.com/D4024
This was SVN commit r25588.
2021-05-28 16:35:57 +00:00
6f9a162dfa CList, COList, CDropdown, CText, CInput: Draw borders above the rest and improve scrollbar drawing order
Fixes: #6055
Differential Revision: https://code.wildfiregames.com/D4004
This was SVN commit r25587.
2021-05-28 16:32:04 +00:00
f7ad2daf62 Removes gui_solid material shader usages from scene rendering.
This was SVN commit r25582.
2021-05-27 20:13:47 +00:00
bd8c6b1572 Fix GetLoadedModsWIthVersions following 498f0d420b
Accidentally broke it in 498f0d420b and didn't notice because D3968
fixes it again.

This was SVN commit r25579.
2021-05-27 08:30:27 +00:00
b17e8f3043 Removes global g_xres and g_yres dependency from GUI objects.
Differential Revision: https://code.wildfiregames.com/D4014
This was SVN commit r25577.
2021-05-26 18:52:22 +00:00
8f4b3dfb16 Removes GL1 constants deprecated in GL3+ from HWDetect since they are not useful anymore.
This was SVN commit r25571.
2021-05-25 22:34:57 +00:00
cf454fe533 Removes unused BitBuf added in 5b5726ed4d.
Bit operations can be done via std::bitset. The current implementation
is too specific to have it just for a future. Refs 479f59e386,
5ca66fc757.

This was SVN commit r25569.
2021-05-25 19:42:06 +00:00
db9356944c Removes unused base32 encoding added in 5cc814759f.
For modern standards base64 costs a bit less space and might be
implemented on demand. base32 usage was introduced in e0dfbe719d and
removed in 93cffe9deb.

Refs a34b759720, 317f98a6c0.

This was SVN commit r25568.
2021-05-25 19:18:22 +00:00
38e085a8c0 Removes unused wutil command line arguments parsing added in 5383eff15c.
We already have a single place to access arguments, so we don't need
a platform dependent place for that.

Refs 3f58951808, 8c1bd05ab9.

This was SVN commit r25567.
2021-05-25 18:42:27 +00:00
007d30f4b4 Removes outdated user32.dll preload hack added in 7a889deca3 and became useless in bbcd9b34cc.
Refs 4b33f49da1, b242eafd02, 56bd5b59b4.

Tested By: Angen
Differential Revision: https://code.wildfiregames.com/D4007
This was SVN commit r25566.
2021-05-25 18:29:50 +00:00
424b3cdcab Fix 498f0d420b - re-add special-casing of mod & user mods
These do not have a mod.json, triggering spurious errors.

This was SVN commit r25548.
2021-05-25 07:50:04 +00:00
863ef0f88a Tweak sound distance attenuation & add configurability
Following D3108 / 876f6d5e50, sounds are attenuated by their actual
distance. However, as noted by players on A24, the dropoff is stark and,
when zoomed out, can easily result in not hearing things that are
happening in the middle of the screen.

The new default settings almost double the max-range, change the minimum
range to have greater dynamic range, and reduce the stereo depth
slightly to better match the default camera FOV.

These are stored per sound-grounp, possibly allowing future tweaks on a
per-soundgroup basis, and are configurable.

Tested by: Imarok
Discussed over mail with: Samulis, Porru

Differential Revision: https://code.wildfiregames.com/D3612
This was SVN commit r25547.
2021-05-25 06:19:25 +00:00