Commit Graph

66 Commits

Author SHA1 Message Date
RoosterDragon
14c0d011ea Fix SA1414 2023-04-08 16:51:51 +03:00
Paul Chote
7cd4272350 Access sequences from Map. 2023-03-10 20:11:33 +02:00
RoosterDragon
53e9f44972 Spelling fixes 2023-03-02 20:11:54 +02:00
Gustas
8d0fe52dd8 Remove unnecessary parentheses 2023-02-27 08:36:47 +02:00
abcdefg30
5bf7fe852c Remove the copyright year numbers 2023-01-11 11:58:54 +02:00
Vapre
63499c6334 ShroudRenderer, fix, no shroud or fog in editor. 2022-09-03 19:20:25 +02:00
Vapre
57ce88cc9a ShroudRenderer, fix, render Shroud if fog disabled. 2022-09-02 20:13:56 -05:00
Vapre
6e547469d6 Shroud, combine IsVisible and IsExplored into a single function. 2022-08-28 18:50:51 +02:00
abcdefg30
6a31b1f9f3 Update the copyright header year 2022-05-28 00:35:10 -05:00
Andre Mohren
6810469634 Updated copyright years. 2021-06-29 18:33:21 -05:00
Matthias Mailänder
5a0bcc01a6 Add a lint check for trait placement on hardcoded actor names. 2021-04-11 20:20:00 +02:00
teinarss
6b74093c04 Add readonly to structs 2021-03-14 15:17:57 +01:00
Paul Chote
a90e6940ab Add sequence scale and alpha support to ShroudRenderer. 2021-03-12 21:52:16 +01:00
Paul Chote
96c3825b6a Add alpha support to TerrainSpriteLayer. 2021-03-12 21:52:16 +01:00
Paul Chote
d52ba83f96 Replace terniary null checks with coalescing. 2021-03-08 18:11:25 +01:00
teinarss
ed295ae315 Change throw exceptions to use nameof in parameter 2021-02-28 18:43:51 +01:00
Paul Chote
f6b40b2bce Allow sequences to define a Scale factor. 2021-01-21 18:22:11 +01:00
Paul Chote
142870d78a Support multiple sheets in TerrainSpriteLayer. 2021-01-16 22:09:08 +01:00
Paul Chote
b0aa32cd1b Support multiple palettes in TerrainSpriteLayer. 2021-01-16 22:09:08 +01:00
teinarss
2c9a36b9a3 Update float3 to readonly and use in modifier for parameters. 2020-12-02 20:37:50 +01:00
Vapre
63d597e4ad ShroudRenderer UpdateShroud only when at least one cell is dirty.
UpdateShroud shows up in profile reports as one of the most
active methods (2.3% CPU time, main mono thread).

This commit introduces `anyCellDirty` to indicate that at lease one
of the cells was marked as dirty.

Avoiding the need to traverse all projected cells of the map
to find any dirty cell.

This reduces the number of shroud updates by at least 50% during a
test game. I assume this is related to renders occurring more
often than logic ticks(?).
2020-10-25 23:01:19 +01:00
Paul Chote
cd9bf53e1a Use nameof() to reference image fields. 2020-09-12 17:52:46 +02:00
Andre Mohren
006a87692a Removed unused imports. 2020-07-28 18:22:51 +02:00
Paul Chote
01e955ca37 Implement TS-style terrain lighting. 2020-07-13 14:02:02 +02:00
abcdefg30
889e2152a4 Cache ProjectedCellBounds during load time 2020-07-08 18:37:50 +02:00
Paul Chote
86f61298e6 Replace ITraitInfo interface with TraitInfo class. 2020-05-21 13:01:04 +02:00
tovl
695d9a6cb1 Centralize shroud changes in one pass to improve performance. 2020-01-12 04:50:25 +01:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
Paul Chote
78a70be0d4 Fix and enable SA1133, SA1134 style rules. 2019-05-24 10:47:57 +02:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
reaperrr
9aaf800bca Require explicit INotifyActorDisposing 2017-09-28 13:14:08 +02:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
Paul Chote
11805bb567 Rename and tweak post-render interfaces. 2016-08-22 17:40:05 +01:00
Paul Chote
e54917a0b2 Fix depth-enabled shroud rendering. 2016-04-15 09:42:29 -04:00
Paul Chote
2915db67c4 Add depth buffer support to sprites and sequences. 2016-04-15 09:42:29 -04:00
Paul Chote
7993068c8f Remove Map.SequenceProvider. 2016-03-12 19:46:20 +00:00
Paul Chote
e71225496b Clarify GPL version. 2016-02-21 16:30:48 +00:00
Paul Chote
b396965fd9 Update licence header year. 2016-02-21 16:27:31 +00:00
abcdefg30
d416138cec Merge pull request #10542 from RoosterDragon/simplify
General Cleanup
2016-01-18 11:37:30 +01:00
RoosterDragon
8e89a6a696 Simplify names, remove unused usings, remove redundant casts. 2016-01-17 21:35:36 +00:00
RoosterDragon
21fd4df586 Invalidate shroud when enabling/disabled the shroud.
This ensures when shroud is toggled during a replay, the shroud renderer and radar update correctly.
2016-01-09 23:07:32 +00:00
RoosterDragon
b0619a3e25 Added comments in performance sensitive code. 2015-12-13 16:24:54 +00:00
Matthias Mailänder
322358ff3d also check shroud sequences 2015-08-17 21:36:55 +02:00
Matthias Mailänder
118782a85e check palette references 2015-08-17 21:36:45 +02:00
Paul Chote
0b4543919d Account for disabled shroud/fog in ShroudRenderer.
Fixes #8827.
2015-08-03 21:07:02 +01:00
Paul Chote
86ba26e013 Convert shroud calculations and rendering to PPos. 2015-07-27 19:34:50 +01:00
Paul Chote
e8794032e0 Introduce initial PPos plumbing.
PPos is best thought of as a cell grid applied in
screen space.  Multiple cells with different
terrain heights may be projected to the same PPos,
or to multiple PPos if they do not align with the
screen grid.

PPos coordinates are used primarily for map edge
checks and shroud / visibility queries.
2015-07-27 19:34:49 +01:00
Paul Chote
2156a234db Render shroud outside map bounds.
Fixes a regression from #8337.
2015-06-15 18:06:43 +01:00
Paul Chote
293c7fb840 Disable shroud in the map editor. 2015-06-11 21:27:33 +01:00