Commit Graph

3740 Commits

Author SHA1 Message Date
Paul Chote
a4083f4597 Merge pull request #5794 from Mailaender/lint-map-cordons
Added a new Lint check for invalid map cordons
2014-07-03 23:43:41 +12:00
Matthias Mailänder
884fbc0ea9 add a new lint check for invalid map cordons 2014-07-03 10:56:59 +02:00
RoosterDragon
3a30748f05 Reduce working set by releasing buffers for sheets.
Sheets carry a managed buffer of data that allows updates to be made without having to constantly fetch and set data to the texture memory of the video card. This is useful for things like SheetBuilder which make small progressive changes to sheets.

However these buffers are often large and are kept alive because sheets are referenced by the sprites that use them. If this buffer is explicitly null'ed when it is no longer needed then the GC can reclaim it. Sometimes a buffer need not even be created because the object using the sheet only works on the texture directly anyway.

In practise, this reduced memory consumed by such buffers from ~165 MiB to ~112 MiB (at the start of a new RA skirmish mission).
2014-07-02 17:25:56 +01:00
Matthias Mailänder
40cd491bff Merge pull request #5778 from pchote/isometric
Add support for diamond cell grids
2014-07-01 16:59:22 +02:00
Matthias Mailänder
b05e4217cf document SelfHealing prerequisites 2014-07-01 09:12:11 +02:00
Matthias Mailänder
362c86764f document the buildable and country trait 2014-07-01 09:08:08 +02:00
Paul Chote
0d625b6af6 Fix sprite overlap outside the map border. 2014-07-01 00:40:42 +12:00
Paul Chote
a30c8b53a7 Add support for diamond cell grids. 2014-06-30 23:44:23 +12:00
Paul Chote
af0e948a67 Use map.Contains for the observer shroud check.
Checking against the bounds directly is no longer valid.
2014-06-30 11:24:41 +12:00
Matthias Mailänder
5130723fcd remove the overly complicated configurable MCV actor name hack 2014-06-28 15:17:06 +02:00
Matthias Mailänder
aae428be2b throw with a more helpful error than NullReferenceException
closes #5622
2014-06-28 15:17:05 +02:00
Matthias Mailänder
ba1fa7cd81 new check for undefined actors 2014-06-28 09:50:50 +02:00
Matthias Mailänder
7fa51712ec Merge pull request #5758 from pchote/cell-world-conversions
Generalize cell/world coordinate conversions.
2014-06-28 08:27:18 +02:00
RoosterDragon
7030d8b2b6 Changed HardwarePalette.ApplyModifiers to be more efficient.
- Add separate ImmutablePalette and MutablePalette classes since the distinction is extremely important to HardwarePalette.
- Keep a cache of palettes in HardwarePalette to avoid reallocation them every time ApplyModifiers is called.
- Palettes that are not allowed to be modified are copied to the buffer once when added, rather than every time ApplyModifiers is called.
- The AdjustPalette method now takes a read-only dictionary to prevent the dictionary being messed with.
- Added a constant for the palette size to remove its usage as a magic number in several areas.
- The ColorPreviewManagerWidget is annoying in that it needs to actually permanently update a palette after it has been added. To allow this, HardwarePalette now allows a palette to be replaced after initialization. The WorldRenderer therefore now also updates the PaletteReference it created earlier with the new palette to prevent stale data being used elsewhere.
2014-06-28 01:11:48 +01:00
Matthias Mailänder
7fa8cc10e9 Merge pull request #5763 from obrakmann/build-shift+keypress
Make Shift+<Hotkey> queue five units/buildings. Fixes #5544.
2014-06-27 22:18:50 +02:00
Matthias Mailänder
e9ee4a1e15 Update ShroudRenderer.cs
fix typo
2014-06-27 13:30:57 +02:00
Paul Chote
d7f1b1c9e2 Remove CVec -> WVec conversion. 2014-06-27 23:30:41 +12:00
Paul Chote
a256e722d5 Remove conversions between legacy and world types. 2014-06-27 23:30:41 +12:00
Paul Chote
9487f49cd5 Replace WPos.ToCPos -> Map.CellContaining. 2014-06-27 23:30:40 +12:00
Paul Chote
4bc09692e0 Remove WVec.ToCVec. 2014-06-27 23:30:40 +12:00
Paul Chote
7b52fa52b6 Replace CPos.CenterPosition -> Map.CenterOfCell. 2014-06-27 23:30:40 +12:00
Paul Chote
b6d1d26eeb Add World parameter to Util.BetweenCells. 2014-06-27 23:30:40 +12:00
Paul Chote
086ec07eb6 Add World parameter to Target.FromCell. 2014-06-27 23:30:40 +12:00
Paul Chote
e4ea012b9e Add World parameter to Target.FromOrder. 2014-06-27 23:30:40 +12:00
Paul Chote
b52cdd4b45 Remove redundant FindActorsInBox helpers. 2014-06-27 23:30:40 +12:00
Paul Chote
8f046c7c5a Support split sprites for fog/shroud. 2014-06-27 22:28:33 +12:00
Paul Chote
8c4dcb7fe0 Configurable ShroudRenderer palettes and readonly state. 2014-06-27 22:28:33 +12:00
Paul Chote
78f8c94df8 Make PathDistance struct immutable. 2014-06-27 22:07:03 +12:00
Paul Chote
5560f276ca Map: Rename IsInMap -> Contains. 2014-06-27 22:07:03 +12:00
Paul Chote
e0df669de9 Bridgelayer: Keys.Contains -> ContainsKey. 2014-06-27 22:07:03 +12:00
Paul Chote
441971f6d7 Use CellLayer for pathfinding. 2014-06-27 22:07:03 +12:00
Paul Chote
c5a13d4e65 Remove CellBounds from BuildableTerrainLayer and SmudgeLayer 2014-06-27 22:07:03 +12:00
Paul Chote
997216aef0 Use CellLayer for terrain. 2014-06-27 22:07:02 +12:00
Paul Chote
ce331a28e8 Use CellLayer for custom terrain. 2014-06-27 22:07:02 +12:00
Paul Chote
c5b4d643af Use CellLayer for BridgeLayer. 2014-06-27 22:07:02 +12:00
Paul Chote
fb3477d630 Use CellLayer for BuildingInfluence. 2014-06-27 22:07:02 +12:00
Paul Chote
7c463c414c Use CellLayer for DomainIndex. 2014-06-27 22:07:02 +12:00
Paul Chote
baf27bc4cd Use CellLayers for shroud. 2014-06-27 22:07:02 +12:00
Paul Chote
5a00757eab Use CellLayers for pathfinder debug. 2014-06-27 19:20:46 +12:00
Paul Chote
97a61273dd Bring PathSearch in line with the current code style. 2014-06-27 19:20:46 +12:00
Paul Chote
2026747f2a Use Map.IsInMap(CPos) for things that are checking CPos. 2014-06-27 19:20:46 +12:00
Paul Chote
e825205542 Stylecop BridgeLayer. 2014-06-27 19:20:46 +12:00
Paul Chote
a9635e8c4a Refund the *old* player when a production structure is captured. 2014-06-26 23:14:14 +12:00
Paul Chote
4db2cf6b2b Propagate race to produced actors. 2014-06-26 23:14:14 +12:00
Paul Chote
4b2663015b Fix CanBuild not checking DeveloperMode.AllTech. 2014-06-26 23:14:14 +12:00
Paul Chote
749a947d3f Avoid repeated queries of DeveloperMode. 2014-06-26 23:14:14 +12:00
Paul Chote
2af123034d Use ExtraData for SetStance and SetUnitStance. 2014-06-26 23:14:13 +12:00
Paul Chote
7d24053f52 Introduce Order.SuppressVisualFeedback to cleanly disable flashes. 2014-06-26 23:14:13 +12:00
Paul Chote
d318d7c5e3 Add HackyAI support for multiple structure queues. 2014-06-26 23:14:13 +12:00
Matthias Mailänder
74be133e40 Use Prerequisites: ~disabled for unbuildable actors. 2014-06-26 23:14:13 +12:00