Commit Graph

8251 Commits

Author SHA1 Message Date
492a109b68 Removes redundant ogl_tex quality option after 4de89c3db1.
This was SVN commit r26367.
2022-02-13 21:53:02 +00:00
aaf378f041 Moves backend capabilities to CDevice.
This was SVN commit r26366.
2022-02-13 21:46:03 +00:00
4de89c3db1 Moves texture management to CDeviceCommandContext, adds quality options.
Comments By: nwtour, Stan
Tested By: nwtour, Stan
Differential Revision: https://code.wildfiregames.com/D4488
This was SVN commit r26365.
2022-02-13 19:30:28 +00:00
936fb5a172 Replace checkrefs.pl by a python script. This makes it easier to run on Windows for non technical persons.
- Add support for tips
- Fix other scripts not writing to the correct output (they were writing
info messages to stderr)

Based on a patch by: @mammadori	and @cyrille
Differential Revision: https://code.wildfiregames.com/D3213
This was SVN commit r26350.
2022-02-12 15:43:42 +00:00
bb
9696b18a72 Happy new year bb.
See previous commit

This was SVN commit r26339.
2022-02-10 16:38:24 +00:00
bb
505bead1da Some minor improvements for the localization scripts
Comments By: Stan
Reviewed By Freagarach

Differential Revision: D4397
This was SVN commit r26338.
2022-02-10 16:18:49 +00:00
f55282fc96 Add a python equivalent to validate.pl.
Refs: D3213

This was SVN commit r26334.
2022-02-09 23:06:40 +00:00
adcd1d105c Improve the validator.py script. Fix false positives with particles and variants. Use a logger instead.
This was SVN commit r26333.
2022-02-09 22:07:36 +00:00
Angen
0a72a02ea0 Make scale variables constant
b4fbbed379

This was SVN commit r26307.
2022-02-06 11:11:35 +00:00
a17fad722a Moves framebuffer management to CDeviceCommandContext.
Tested By: Langbart, nwtour
Differential Revision: https://code.wildfiregames.com/D4475
This was SVN commit r26302.
2022-02-05 16:59:23 +00:00
ea72437739 Move GenericName, History and Icon from the civ-JSON to cmpIdentity.
Since the players/civs already have cmpIdentity, use it.
This forces civs to have corresponding XML in the `special/players/`
folder.

Also moves the files from `special/player/` to `special/players/`
consistent with other folders. And moves the generic `player.xml` one
level up.

Differential revision: https://code.wildfiregames.com/D4473
Help and comments by: @Stan, @wraitii
This was SVN commit r26298.
2022-02-05 06:24:45 +00:00
37aa0456c8 Fixes missed assignment to currentTech in ParticleRenderer added in 5adbe4f1a3.
This was SVN commit r26296.
2022-02-04 16:27:35 +00:00
ac77d1c3e0 Moves scissor test management to DeviceCommandContext.
This was SVN commit r26288.
2022-02-01 17:58:21 +00:00
aeaf495da3 Renames GL::CTexture levelCount to MIPLevelCount to match Tex.
This was SVN commit r26287.
2022-02-01 16:48:24 +00:00
a1f98b016b Moves depth and stencil tests to PipelineState and DeviceCommandContext.
Differential Revision: https://code.wildfiregames.com/D4471
This was SVN commit r26286.
2022-02-01 16:38:55 +00:00
709e8292b0 Moves color mask, depth mask and function management from CShaderPass to DeviceCommandContext.
Tested By: Langbart
Comments By: Stan
Differential Revision: https://code.wildfiregames.com/D4465
This was SVN commit r26284.
2022-01-31 20:10:06 +00:00
22db9202f1 Fixes EOL in PipelineState files after 5adbe4f1a3.
This was SVN commit r26283.
2022-01-31 11:47:58 +00:00
8c068aab07 Removes possibility to link lowlevel library dynamically.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4470
This was SVN commit r26281.
2022-01-31 06:53:30 +00:00
02c96903c5 Renames sgn function to Sign to fit the naming of other MathUtil functions.
This was SVN commit r26276.
2022-01-30 20:51:01 +00:00
0e403632cf Allow giving different weights to different templates when pushing.
This makes it possible to make units heavier, which both push more & get
pushed less by other units.
In particular, the diff does it for siege units & elephants.

This improves movement for these units in crowd situation, since they
will now basically not move when other regular units push into them.

Supported By: asterix, marder
Refs #6127

Differential Revision: https://code.wildfiregames.com/D4452
This was SVN commit r26275.
2022-01-30 14:22:27 +00:00
4df03ed2d2 Run the AI in the same Compartment as the simulation. Let the AI access Sim data.
This is a paradigm change for AI computation.
Historically, the AI was intended to be run in a separate thread from
the simulation. The idea was that slow AI wouldn't stop the renderer
from being smooth.

In that original design, the AI received a copy of the game world and
used that to run its logic. This meant the simulation could safely do
whatever it wanted in the meantime. This copy was done via AIProxy &
AIInterface.

This design ended up having significant flaws:
- The copying impacts the simulation negatively, particularly because
AIProxy subscribes to a lot of messages (sometimes sent exclusively to
it). This time cannot be threaded, and impacts MP games without AIs.
- Copying the data is increasingly difficult. Modifiers are a headache,
LOS is not implemented. Lots of logic is duplicated.

The intended benefits of the design also failed to realise somewhat:
- The AI was never threaded, and in fact, it is probably better to try
and thread Sim + AI from the renderer than just the AI, at which point
threading the AI specifically brings little benefit.

The new design is much simpler and straighforward, but this has some
side-effects:
- The AI can now change the simulation. This can be used for cheating,
or possibly for a tutorial AI.
- The AI runs in the same GC zone as the simulation, which may lead to
more frequent Sim GCs (but overall we might expect a reduction in
temporary objects).
- The AI state was essentially cached, so replacing some functions with
Engine.QueryInterface might be slower. The tradeoff should be balanced
by lower AIProxy computation times.

Future work:
- Threading some specific AI tasks could still be worthwhile, but should
be done in specific worker threads, allowed to run over several turns if
needed.

Technical note: the AI 'global' is in its own Realm, which means name
collisions with the same are not possible.

Other notes:
- The RL Interface uses the AI Interface and thus will gradually lose
some data there. Given that the RL Interface can now request data
however, this should be dine.

Refs #5962, #2370

Differential Revision: https://code.wildfiregames.com/D3769
This was SVN commit r26274.
2022-01-30 13:33:34 +00:00
0779c64052 Add tests for fixed::FromFraction
Differential Revision: https://code.wildfiregames.com/D4458
This was SVN commit r26273.
2022-01-30 12:57:08 +00:00
d740b4f335 Fix bug where 'archive' XMB files could end up being written to the user mod
Users sometimes ended up with bad (wrong version) XMB files in the user
mod. This resulted in A25 loading a black screen.
There is a combination of unfortunate code paths that lead to this. The
core issue is that:
- cdd75deafb changed the XMB loading code that if there is an error in
Init from a cached XMB, it reports an error. This error happens to be
silent, because the GUI expects CXeromyces to do its own error reporting
(a pretty poor decision, all in all, but whatever). This explained why
the black screen showed no errors.
- The code flow attemps to load an 'archive' XMB first, then only a
loose cache. _But_ if the XMB that fails to load is an archive (which
generally never happens except when using incompatible mods, which is
generally less easy in A25 since we added code to stop that), then the
game will try to recreate the XMB as an 'archived' path, not a 'loose
cache' path as it would usually do.
- Because the 'archived' path already exists in the VFS, the game will
attempt to overwrite that. It so happens that in non-dev copies, this
writes to the user mod.
- Because the user-mod is always loaded, this was unexpected for users.

Fixing this is rather simple: the game should never attempt to write
'archive' XMBs in that function. Added explicit barrier, which shouldn't
matter performance-wise but fixes the issue by writing in the proper
place, and also properly recovering in case of read failure.
I will note that the game will still try to load the archived file, and
recreate it every time, but I don't think that's a particularly big
deal, in general having engine-incompatible mods in the future should be
harder because of A25 changes there.
(NB: users that have used both A24 and A25 should perhaps still be
advised to check their user mod folder, otherwise they'll end up
recreating those files forever).

Reported by: dave_k
Fixes #6320

Differential Revision: https://code.wildfiregames.com/D4275
This was SVN commit r26272.
2022-01-30 12:50:43 +00:00
e0d98cd94d Call SetTerrainDirty on CModelAbstract without going through CmpVisualActor
The UnitManager already lists all units, so we do not need to go through
the visual actor of entities to update them. This is faster and
decouples simulation & graphics code slightly.

Further, the simulation does not need to know about texture changes (see
also 410d2e883a), so remove those calls in Atlas.

Differential Revision: https://code.wildfiregames.com/D4455
This was SVN commit r26270.
2022-01-29 08:28:04 +00:00
410d2e883a Remove leftover terrain-based movement cost code.
6581796103 removed the ability for terrain to affect movement speed. The
JPS pathfinder cannot support it, and the approach was poor anyways,
coupling rendering data with simulation data.
This lets us remove the dependency on CTerrainTextureManager everywhere.

Tested by: langbart
Differential Revision: https://code.wildfiregames.com/D4459
This was SVN commit r26269.
2022-01-29 08:22:28 +00:00
1e07283bac Disables possibility to mix shader types with a single backend.
Differential Revision: https://code.wildfiregames.com/D4463
This was SVN commit r26264.
2022-01-28 06:34:34 +00:00
285e542a0a Removes redundant comment about alpha test in shaders forgotten in 5cbd46de94.
This was SVN commit r26260.
2022-01-27 17:32:07 +00:00
d4d1bc039f Moves culling mode and front face state management to DeviceCommandContext.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4456
This was SVN commit r26259.
2022-01-27 17:25:37 +00:00
83d251406c Move BuildAnimation to CSkeletalAnimMgr / CObjectEntry
There is no need to have BuildAnimation in CModel when everything is
done in CObjectEntry anyways.
This removes a pointer in every CModel object, which is nice.

Accepted By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D4454
This was SVN commit r26254.
2022-01-26 14:55:19 +00:00
27f64b80ed Remove unused variable following 330b570ba8
Forgotten in that diff.

Reported by: vladislavbelov
This was SVN commit r26250.
2022-01-25 18:47:38 +00:00
330b570ba8 Remove RENDERDATA_UPDATE_COLOR, which is not used, and cleanup.
RENDERDATA_UPDATE_COLOR was used to precompute lightEnv-dependent data
on the CPU. This is no longer done following engine upgrades, and in
particular d7d02a4740 which explictly always did this on the GPU.

ModelAbstract had a 'SetDirtyRec' hack for it because of decals, which
can also be removed. The 'dirty' bit of CRenderableObject is renderdata
for the specific item, never its props, so it never actually needs to be
recursive.

CheckLightEnv is also useless as a result, and removed.

Differential Revision: https://code.wildfiregames.com/D4453
This was SVN commit r26249.
2022-01-25 16:59:29 +00:00
acb043f4a2 Adds a rasterization state to the renderer backend pipeline state.
This was SVN commit r26248.
2022-01-25 16:28:58 +00:00
158cf8ea8d UnitMotion pushing improvements
The main change is the introduction of a 'pushing pressure' counter on
units. This counter increases when units get pushed around, and
decreases over time. In essence, units under high pressure move slower &
are harder to push around.
The major effect is that units can now get bogged down when very dense
groups start colliding. This makes movement more realistic, makes unit
movement more 'chokepointy', and generally improves the mathematical
soundness of the system (lower values are easier to handle for our 200ms
turns).

Other changes:
- The logic to detect units crossing each other's path has been
reworked. Units that run towards each other should not more obviously
avoid each other.
- New parameters: 'Spread' is a measure of how strong the pushing effect
is based on distance. With the current settings, static-pushing is
rather 'on/off', whereas moving-pushing is more gradual (and thus the
max influence distance was increased when moving).
- Default values have been tweaked for lower overlap.
- Units only looked at other units within their grid region. This led to
overlap near grid-borders. Units now look at neighboring grid elements,
which largely removes this issue. While this may be slower, the
performance of pushing was largely negligible before, so it is unlikely
to become a main cause of lag (and overlap was generally disliked by
players).
- Units no longer orient in the direction of pushing, but instead keep
facing their target. This can look slightly odd under very heavy pushing
forces, but vastly improves behaviour of very slow units such as rams
(since they spend much less time turning around). As a side-effect,
clean up angle code following acc780bcbb .

Engine changes:
- Add a debug rendering mode at compile-time to help understand what is
happening.
- Make it possible to constexpr initialise fractional fixed numbers by
using FromFraction

The 'pressure' change was inspired by alre's suggestion at
https://wildfiregames.com/forum/topic/56436-for-a-better-unit-movement/#comment-461987

Refs #6127

Differential Revision: https://code.wildfiregames.com/D4439
This was SVN commit r26245.
2022-01-24 15:36:13 +00:00
4ce609bb1f Uses MIPs for terrain textures previews following e4455a8e8f.
Comments By: Stan
Differential Revision: https://code.wildfiregames.com/D4447
This was SVN commit r26239.
2022-01-24 07:00:55 +00:00
c114bab396 Removes mem_get_ptr from the Tex::get_data comment forgotten in 63086f4e26.
This was SVN commit r26237.
2022-01-23 11:59:35 +00:00
ad5377bc0e Fixes fancy water shores drawing after 1d9a8b2b0b.
Reported By: wraitii
This was SVN commit r26231.
2022-01-20 17:31:21 +00:00
41fe3aafa4 Fixes minimap texture scissoring rect following b5d85e279f. Fixes #6382
This was SVN commit r26229.
2022-01-19 17:40:26 +00:00
5adbe4f1a3 Moves blend state management to DeviceCommandContext. Fixes #6420
Tested By: Langbart
Comments By: Stan
Differential Revision: https://code.wildfiregames.com/D4441
This was SVN commit r26228.
2022-01-19 17:28:47 +00:00
40e75f9c89 Removes binding additional attribute for water shader added in 1d9a8b2b0b.
Reported By: Freagarach
This was SVN commit r26223.
2022-01-15 16:47:42 +00:00
a4a647e9f0 Removes unused variable in ParticleRenderer after fc223e3540.
This was SVN commit r26222.
2022-01-15 16:29:26 +00:00
971b734873 Moves hardcoded blend state in debug overlay and water to their techniques.
This was SVN commit r26218.
2022-01-14 18:44:40 +00:00
fc223e3540 Moves hardcoded blend state in ParticleRenderer to the transparent particles technique.
This was SVN commit r26217.
2022-01-14 18:18:28 +00:00
829e37371b Moves hardcoded blend state in CCanvas2D to its technique.
This was SVN commit r26216.
2022-01-14 17:44:42 +00:00
1d9a8b2b0b Splits water surface and shore drawing functions and fixes their switch.
Differential Revision: https://code.wildfiregames.com/D4436
This was SVN commit r26215.
2022-01-14 17:34:58 +00:00
9aedcade7f Draws slider button only inside its element.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4435
This was SVN commit r26213.
2022-01-14 06:50:44 +00:00
5cbd46de94 Removes deprecated GL alpha test.
In GL3.0 alpha test mode was deprecated and removed in GL3.3. We should
use discard/kill in shaders instead.
In shaders alpha test was removed in d3a24c26ba, in FFP it was removed
with FFP in b7e6811ea6.

Differential Revision: https://code.wildfiregames.com/D4434
This was SVN commit r26211.
2022-01-13 17:50:28 +00:00
a2ab6b9b72 Allow to cap FPS up to the current max refresh rates of gaming screens: 360Hz
Patch by: @OptimusShepard
Reviewed by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D4366
This was SVN commit r26207.
2022-01-13 14:30:23 +00:00
712b7ebf9a Remove JS_New in favour of JS::Construct in preparation for SM91
Spidermonkey 91, the next ESR, removes JS_New in favour or
JS::Construct.
See
https://github.com/mozilla-spidermonkey/spidermonkey-embedding-examples/blob/migration-guide/docs/Migration%20Guide.md#object-construction
and
https://bugzilla.mozilla.org/show_bug.cgi?id=1491055

This change is SM78 compatible and therefore done beforehand.

Tested by: Freagarach
Refs #5986

Differential Revision: https://code.wildfiregames.com/D4427
This was SVN commit r26205.
2022-01-12 16:51:32 +00:00
6d28c44f0f Removes unused method from CShaderTechnique.
This was SVN commit r26201.
2022-01-11 16:02:27 +00:00
9757cc2539 Removes direct shader binding, uses BeginPass always following e1374252b7.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4431
This was SVN commit r26199.
2022-01-11 05:56:44 +00:00
2e38c117d2 Fixes comments of CLOSTexture and CTerritoryTexture following 57ba7c4a1c.
This was SVN commit r26197.
2022-01-10 17:58:51 +00:00
0cda752ec3 Uses CVertexBufferManager handle instead of raw VBChunk pointer management.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4430
This was SVN commit r26196.
2022-01-10 16:51:43 +00:00
795fb070af Removes asking GL of current bind framebuffer to avoid syncs.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4422
This was SVN commit r26193.
2022-01-09 07:36:56 +00:00
95318d34ff Removes redundant layer check added in f715b73f4f.
Reported By: Freagarach
This was SVN commit r26189.
2022-01-08 13:44:40 +00:00
9924450d36 Moves default GL state setup to GL device.
This was SVN commit r26187.
2022-01-07 22:21:22 +00:00
5610c71fc6 Fixes rendering big screenshot pieces onto screen, refs 52a8793450.
This was SVN commit r26186.
2022-01-07 20:15:48 +00:00
f715b73f4f Uploads cube textures in SkyManager via DeviceCommandContext.
Commented By: Stan
Differential Revision: https://code.wildfiregames.com/D4421
This was SVN commit r26185.
2022-01-07 20:00:41 +00:00
15c40861b4 Separates terrain alphamap combining and uploading.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4419
This was SVN commit r26184.
2022-01-07 14:33:54 +00:00
9d7457da9b Removes ogl_tex usage from CRenderer.
This was SVN commit r26181.
2022-01-06 23:23:36 +00:00
b061a7ead4 Optimizes FBO usages for LOSTexture and water shore foam.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4418
This was SVN commit r26180.
2022-01-06 22:44:54 +00:00
9bc3dd4699 Fixes terrain overlay texture upload after fd976456d7.
Reported By: nwtour
This was SVN commit r26176.
2022-01-06 14:16:32 +00:00
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
cee0ce48eb Disables redundant mipmap generation for postprocessing.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4417
This was SVN commit r26174.
2022-01-06 11:09:42 +00:00
27c8771a3a Fixes debug drawing of a null shadow texture introduced in 36107cb7e1, appeared after abc3190c03.
Reported By: nwtour
This was SVN commit r26173.
2022-01-06 11:04:45 +00:00
f07fa81661 Renames LOS framebuffer object to follow CC.
This was SVN commit r26171.
2022-01-05 15:37:59 +00:00
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