Commit Graph

249 Commits

Author SHA1 Message Date
Paul Chote
24f166595f Convert lobby dropdowns to new options backend. 2016-06-04 10:06:18 +01:00
Paul Chote
eb884ca76f Convert lobby checkboxes to new options backend. 2016-06-04 10:03:06 +01:00
Paul Chote
35af6b5b91 Apply minor style fixes to DeveloperMode. 2016-05-14 18:54:44 +01:00
Paul Chote
7e49ae7eb0 Prepare DeveloperMode code for trait-defined lobby options. 2016-05-14 18:54:44 +01:00
Paul Chote
a0b5b5ce66 Move initial map exploration to Shroud. 2016-05-14 18:54:44 +01:00
Oliver Brakmann
87e1acfc9f Re-implement the insufficient funds warning in a simpler manner 2016-04-11 19:06:18 +02:00
Paul Chote
e34864fe40 Use DefaultCash for the default cash. 2016-03-07 21:41:12 +00:00
Paul Chote
aed8518e04 Move cheats option to rules. 2016-03-07 21:41:12 +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
RoosterDragon
36e09990ca Fix Map.Contains checks for maps with height.
If a cell lacked any valid projected cells, then it is off the map entirely. The previous logic would think such a cell was within the map as none of projected cells were out of bounds (as there were no projected cells to fail the check).
2016-02-06 17:55:27 +00:00
RoosterDragon
68eda63008 Add some debugging code to catch frozen actors without footprints. 2016-01-26 20:45:04 +00:00
RoosterDragon
8e89a6a696 Simplify names, remove unused usings, remove redundant casts. 2016-01-17 21:35:36 +00:00
Oliver Brakmann
aaeb715006 Merge pull request #10246 from penev92/terrainPalettes
Allow tile templates to define their own palette
2016-01-17 21:39:28 +01:00
Pavel Penev
861d1368a4 Unhardcode internal terrain palette name from all over the codebase 2016-01-17 19:02:16 +02:00
RoosterDragon
a232eff7fd Replace IRemoveFrozenActor with FrozenActorLayer.Remove.
The IRemoveFrozenActor interface is replaced with a Remove method on FrozenActorLayer. IRemoveFrozenActor is a performance problem for FrozenActorLayer.Tick as it incurs a large cache miss penalty in order to load and enumerate the array of these interfaces for every frozen actor. Instead, we invert control and allow traits to remove frozen actors directly which eliminates the performance penalty.
2016-01-17 00:13:06 +00:00
RoosterDragon
c98df23b57 Create FrozenActor.RefreshState method for better encapsulation and reuse of this logic. 2016-01-17 00:13:06 +00:00
RoosterDragon
0dc51f79a0 Fix FrozenActorLayer.FootprintBounds.
The size of the bounds was too small (as rectangle has exclusive edges on the right and bottom). This meant some intersection tests would fail and thus the frozen actor was not found when searching the partition bins.
2016-01-03 23:48:28 +00:00
RoosterDragon
8ec03ab3b7 Spatially partition frozen actor layer.
Track changes in the shroud in a spatial partition in frozen actor layer. This allows us to run the expensive visibility updates only on frozen actors with a footprint in affected partitions, rather than on all frozen actors every time.
2015-12-28 21:49:57 +00:00
Sean Hunt
8f4ec87b63 Factor silos needed warning to a new trait. 2015-12-27 14:40:37 -05:00
Paul Chote
fef25c7269 Add IndexedPlayerPalette for original campaign colors. 2015-12-21 15:05:28 +00:00
Oliver Brakmann
71478aa2b8 Merge pull request #9734 from RoosterDragon/auto-target-perf
Improve AutoTarget performance
2015-12-20 19:53:17 +01:00
Oliver Brakmann
879ccaf4f8 Fix the StartsRevealed option of FrozenUnderFog being ignored 2015-12-18 20:32:10 +01:00
atlimit8
bee590a057 Merge pull request #10208 from RoosterDragon/perf-comments
Added some performance comments
2015-12-13 20:46:07 -06:00
RoosterDragon
b0619a3e25 Added comments in performance sensitive code. 2015-12-13 16:24:54 +00:00
RoosterDragon
dcf375a412 Store Targetables in Actor.
This can be used to avoid several lookups for these traits, as well as allow Actor to provide specialised methods to deal with target types efficiently. This also reduces some code duplication.
2015-12-12 20:55:17 +00:00
RoosterDragon
cbc090dd38 Ensure frozen actors are rendered on the first tick they become visible.
The previous lazy rendering means the snapshot of the render state might be more up to date then when the frozen actor actually did become visible. Now, we take this snapshot as soon as needed. We still retain the performance of only doing this rendering when needed by avoiding extra rendering until the visibility cycles again.
2015-12-12 19:54:25 +00:00
Pavel Penev
6217ec0360 Add a ShowActorTags property to DeveloperMode 2015-12-07 01:41:15 +02:00
Paul Chote
9ae811e0c0 Prevent frozen actors leaking through shroud. 2015-11-08 20:53:47 +00:00
Paul Chote
83949b250a Add a visualisation mode for depth sprites.
For now this displays the raw sprites.  It will
eventually be repurposed for rendering the proper
depth data.
2015-10-17 22:35:47 +01:00
Pavel Penev
7fa7ebe657 Merge pull request #9384 from Mailaender/lint-player-palettes
Added a lint check for player palette references.
2015-09-27 18:44:55 +03:00
Matthias Mailänder
defba7aece lint check player palette reference
and tell which actor is affected when a problem is found
2015-09-27 14:57:58 +02:00
Oliver Brakmann
d667271ab7 Merge pull request #9262 from RoosterDragon/frozen-unify-dict
Speed up FrozenUnderFog.Tick
2015-09-26 20:45:58 +02:00
Paul Chote
ef55d646f7 Unstatic the Sound class. 2015-09-20 14:11:06 +01:00
RoosterDragon
ebf113dfb7 Remove Shroud.IsVisibleTest and IsExploredTest.
These are no longer any faster than the regular checks, so there's no need to keep them.
2015-09-06 21:13:32 +01:00
RoosterDragon
592004e738 Unify the player dictionaries in FrozenUnderFog.
This improves the performance of FrozenUnderFog.Tick as only one lookup needs to be done rather than two.
2015-09-05 16:10:00 +01:00
RoosterDragon
901e604cf3 Replace arrays with sets.
In places where arrays were being treated as a set, just create a set directly. This reveals the intention of such collections better, and also improves performance by allowing set based methods to be used.
2015-09-03 20:09:24 +01:00
atlimit8
fadfd179cb Cache FrozenActor ITargetable.TargetTypes union 2015-09-02 23:19:00 -05:00
abcdefg30
87580d0aab Add a GpsRemoveFrozenActor trait 2015-08-22 21:36:30 +02:00
Matthias Mailänder
9a861bdfba Merge pull request #8700 from deniz1a/rename-disable-shroud
Renames "Disable Shroud & Fog" debug option to "Observer view".
2015-08-20 20:41:01 +02:00
Matthias Mailänder
118782a85e check palette references 2015-08-17 21:36:45 +02:00
deniz1a
2abd1b5350 Renames "Disable Shroud & Fog" debug option to "Disable visibility checks". 2015-08-02 00:30:42 +03:00
Paul Chote
86ba26e013 Convert shroud calculations and rendering to PPos. 2015-07-27 19:34:50 +01:00
penev92
bb648decc3 Rename Player.Country to Player.Faction 2015-07-15 04:06:52 +03:00
penev92
2e04fb5ddd Rename Faction trait members
Rename Faction.Race to Faction.InternalName
2015-07-14 18:50:39 +03:00
Paul Chote
6738b8b977 Undo an invalid optimisation.
Fixes a regression from #7746.
2015-06-15 18:06:43 +01:00
Paul Chote
aee951c86f Remove region assumptions from fast shroud tests. 2015-06-15 18:06:42 +01:00
Paul Chote
585a43fd8f Rename Actor.Destroy/Destroyed to Dispose/Disposed. 2015-05-29 19:08:38 +01:00
deniz1a
106286da23 Prevents satellite icons from being drawn over frozen actors. 2015-05-25 06:31:04 +03:00
Paul Chote
7eae157ad8 Rework player palette loading. 2015-05-10 00:01:14 +01:00