Commit Graph

277 Commits

Author SHA1 Message Date
abcdefg30
889e2152a4 Cache ProjectedCellBounds during load time 2020-07-08 18:37:50 +02:00
abcdefg30
173aae1f81 Directly check the map bounds instead of converting to PPos 2020-07-08 18:37:50 +02:00
Paul Chote
b3ee8b447e Reduce duplication between Map and PlayerRadarTerrain. 2020-07-07 22:12:22 +02:00
Paul Chote
5f588561b6 Rewrite TS minimap rendering:
* Rename LeftColor and RightColor to MinColor and MaxColor
  These are mapped from LowRadarColor and HighRadarColor in
  the original inis, and appear to be used to set the bounding
  values for selecting a random colour, NOT for left/right
  pixels (which caused noticeably wrong banding).

* Adjust brightness based on terrain height.
  MinHeightColorBrightness and MaxHeightColorBrightness
  were chosen by trial/error to match the original
  map preview rendering.
2020-07-07 22:12:22 +02:00
Paul Chote
6adf45bcb4 Convert IFacing.Facing and TurnSpeed to WAngle. 2020-06-12 18:35:41 +02:00
Matthias Mailänder
607d9b2d5c Fix index out of bounds exception for off world aircraft. 2020-06-02 19:25:53 +01:00
Paul Chote
626b40f31b Account for ramps in terrain height calculations. 2020-05-28 09:41:55 -05:00
Paul Chote
4614f6febe Cache cell ramps to avoid repeated tileset lookups. 2020-05-28 09:41:55 -05:00
Paul Chote
cc05621c10 Draw editor terrain/resource preview as part of the world. 2020-01-12 18:30:50 +01:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
reaperrr
b0a7865cfa Reduce Map.Contains(CPos) cost in legacy mods
If a mod uses rectangular maps and no height levels,
checking if the CPos is within Bounds
should be enough and cheaper than the whole ToMPos
conversion and checks.
2019-08-07 14:02:18 +02:00
Paul Chote
ebf2ce32c0 Make sure braces for multi-line statements are on their own lines. 2019-06-08 19:26:53 +02:00
Paul Chote
5f157c572f Restore newlines between top-level map.yaml blocks. 2019-05-02 13:40:22 +02:00
Mustafa Alperen Seki
9fef2c01ec Add AppearsOnMapPreview
Allows preplaced actors to be rendered on map preview when saving the
map.

Also removes requirements for ResourceLayer in OpenRA.Game and moves it
to OpenRA.Mods.Common.
2019-04-04 19:37:19 +02:00
abcdefg30
0524a59b6b Fix map preview generation for isometric terrain 2019-03-08 21:21:10 +01:00
Paul Chote
ab4a7e3558 Replace System.Drawing primitives with our own. 2019-03-04 18:26:42 +00:00
Paul Chote
5f212a99fe Convert Map.SavePreview to new Png code. 2019-02-24 14:02:19 +01:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
Andre Mohren
b1a44086a0 Removed unused using directives. 2018-11-17 17:23:22 +00:00
Taryn Hill
5899636e10 Fix SubCell indexing in Map.CenterOfSubCell and MapGrid.OffsetOfSubCell 2018-11-02 22:42:51 +00:00
Paul Chote
4d664d4f74 Report custom map rule errors in the lint output. 2018-06-15 23:39:48 +02:00
Paul Chote
91295f9c68 Add IReadOnlyFileSystem.IsExternalModFile. 2018-05-01 00:46:57 +02:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
RoosterDragon
be761de768 Compute map UIDs without copying all data to a MemoryStream.
We can use MergedStream to create a single combined stream with all the input and pass this to the hash function. This saves copying all the data into a MemoryStream to achieve the same goal, which requires more memory and allocations.
2017-12-17 19:20:12 +01:00
RoosterDragon
2dd1bd2d39 Initialize map inverse cell projections with capacity 1.
This prevents the capacity being set to 4 when the first item is added. For flat maps, the inverse projection will only ever be of size 1, thus this is sufficient capacity. For isometric maps, 1 is often sufficient, we only need more near height changes where the discontinuity means multiple cells may project back. We can pay for some reallocations to expand the size in these cases.

On flat maps, this reduces the memory required by the backing array 4x.
2017-12-11 01:38:17 +01:00
Paul Chote
f4c2b36778 Fix height calculations in custom terrain layers. 2017-09-17 15:35:40 +02:00
rob-v
f29d2028fe Fix missing-failing logging of Ruleset (Yaml)Exceptions 2017-06-25 18:45:12 +02:00
Paul Chote
17089f2aee Rename VoxelSequences to ModelSequences. 2017-06-14 18:56:06 +02:00
Paul Chote
e1cd00c1dd Add backend plumbing for model loaders. 2017-06-14 18:56:06 +02:00
Paul Chote
cdf2df58a0 Define RectangularIsometric world coordinate scale along the cell axis. 2017-05-07 13:45:30 +01:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
Paul Chote
06b9741807 Reveal the top tiles of cliffs too. 2016-11-13 12:31:21 +00:00
Paul Chote
b6809c97f2 Add a CellLayer with the height of each projected cell. 2016-11-11 16:44:12 +00:00
Paul Chote
9e8b18e7be Extract a common SHA1 helper. 2016-10-02 12:53:41 +01:00
abcdefg30
72ce367522 Fix a wrong string.Format index in the Map ctor 2016-05-24 21:01:01 +02:00
Paul Chote
96eda08677 Replace map type with a category list. 2016-03-27 12:16:55 +01:00
Paul Chote
3e00d72255 Rework map data load/save. 2016-03-21 23:15:12 +00:00
Matthias Mailänder
dd0d8c86c6 Merge pull request #10942 from pchote/remove-map-lazyness
Remove map lazyness.
2016-03-21 20:23:47 +01:00
Paul Chote
4052da3ea6 Move Map.TilesByDistance to MapGrid and make non-static. 2016-03-20 21:41:04 +00:00
Paul Chote
e6b28c2a00 Remove Map.AssetExists. 2016-03-18 20:23:52 +00:00
Paul Chote
1e5065e06a Remove lazy loading of map rules. 2016-03-18 20:23:52 +00:00
Paul Chote
4a7ef68b39 Remove Map.SpawnPoints. 2016-03-18 20:16:25 +00:00
Paul Chote
65df25b1a4 Remove lazy loading of binary map data. 2016-03-18 20:16:24 +00:00
Paul Chote
e79fbe1bb9 Reference SubCells directly from MapGrid. 2016-03-16 18:57:07 +00:00
abcdefg30
e1b2f5a280 Merge pull request #10901 from pchote/server-maps
Remove Map usage from the server and mission browser.
2016-03-13 11:24:04 +01:00
Paul Chote
6c319d53dd Remove an obsolete comment from Map. 2016-03-12 20:01:39 +00:00
Paul Chote
be5eee0227 Allow rules to be constructed from a MapPreview. 2016-03-12 20:01:39 +00:00
Paul Chote
7993068c8f Remove Map.SequenceProvider. 2016-03-12 19:46:20 +00:00
abcdefg30
d7bdc840d6 Merge pull request #10909 from pchote/remove-ruleset-cache
Remove ruleset cache
2016-03-12 20:41:03 +01:00
abcdefg30
6c4d24e505 Merge pull request #10851 from obrakmann/prod-from-map-edge_ground-units-fixes
Fix ProductionFromMapEdge to work properly with ground units
2016-03-12 20:37:02 +01:00