Commit Graph

486 Commits

Author SHA1 Message Date
reaperrr
2f69711341 Rename ActorMap *UnitsAt* occurences to *ActorsAt*
These enumerate actors in general, not just mobile actors (which the term 'unit' usually refers to).
2015-10-16 00:07:06 +02:00
Pavel Penev
642468ce0c Add MapGrid class
MapGrid is a mod Manifest field which includes (and thus makes redundant) TileSize, TileShape, SubCells info and MaximumTerrainHeight.
2015-09-27 04:14:43 +03:00
RoosterDragon
6b62aa1ad5 Add missing sync interfaces. 2015-09-21 22:17: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
atlimit8
8250f223c4 More HashSet trait fields & Lint support 2015-09-05 16:59:30 -05:00
RoosterDragon
dab53f403d Provide a hand-written enumerator for ActorMap.GetUnitsAt(CPos). 2015-08-31 20:43:19 +01:00
RoosterDragon
18478646d4 Avoid multiple ToMPos calls in ActorMap. 2015-08-31 20:43:18 +01:00
RoosterDragon
d415d3ba4e Reduce allocations in the main game loop.
- Cache the shroud projection even for flat maps to avoid allocating single element arrays.
- Avoid LINQ in shroud and map projection queries to avoid enumerator allocations.
- Avoid LINQ in calculation of sync values.
- Cache enumerables in ProductionQueue.
- Cache delegate in HackyAI.
2015-08-18 21:17:28 +01:00
Matthias Mailänder
118782a85e check palette references 2015-08-17 21:36:45 +02:00
Matthias Mailänder
dc477c3ced add missing sequence reference 2015-08-15 09:59:53 +02:00
abcdefg30
dae70321c2 Merge pull request #8792 from deniz1a/reveal-shroud
Changes shroud lobby setting from disabling shroud to revealing it.
2015-08-12 22:04:15 +02:00
Paul Chote
c1fcd5fb47 Prevent shroud from being revealed outside the map cordon.
Fixes #8947.
2015-08-04 23:12:19 +01:00
deniz1a
7efbf0633e Changes shroud lobby setting from disabling shroud to revealing it. 2015-08-04 17:31:06 +03:00
Paul Chote
0b4543919d Account for disabled shroud/fog in ShroudRenderer.
Fixes #8827.
2015-08-03 21:07:02 +01:00
Oliver Brakmann
9e2f06aa2d Merge pull request #8876 from pchote/music
Refine the music playlist code.
2015-08-02 15:49:13 +02:00
Paul Chote
5f2c62634c Merge pull request #8817 from penev92/bleed_cleanups
Touch up a few files
2015-08-02 09:30:43 +01:00
Paul Chote
9b3ef9e7f7 Move MusicPlaylist to Mods.Common. 2015-08-01 22:56:07 +01:00
Zimmermann Gyula
1d80c37fda Add support for hiding music tracks. 2015-08-01 22:41:25 +01:00
Paul Chote
a8ddc4e360 Always start the game with a random song.
This fixes the issue where games will always start
with shellmap theme.
2015-08-01 20:52:20 +01:00
Paul Chote
fb0e2c5cc3 Introduce background music concept. 2015-08-01 20:52:20 +01:00
Oliver Brakmann
dff56f6c20 Merge pull request #8781 from pchote/heightmap-shroud
Add plumbing for heighmap-aware shroud and map bounds checks.
2015-07-28 15:35:51 +02:00
Pavel Penev
7701980b76 Simple code style cleanups 2015-07-28 14:21:17 +03: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
2b3c65334d Correct Contains check in ActorMap. 2015-07-27 18:43:51 +01:00
Zimmermann Gyula
8f43ae96ae Fix Observers crashing during win/lose the game. 2015-07-25 14:04:47 +02:00
David Jiménez
5109848215 Changes to improve understandability of code 2015-07-18 15:05:12 +02:00
penev92
2e04fb5ddd Rename Faction trait members
Rename Faction.Race to Faction.InternalName
2015-07-14 18:50:39 +03:00
penev92
a1af5386e0 Rename the Country trait to Faction 2015-07-14 18:50:31 +03:00
Zimmermann Gyula
57e684d1d9 Implements victory and defeat music. 2015-07-13 15:42:13 +02:00
Zimmermann Gyula
32c29e7dd6 Removes the MapMusic checkbox. 2015-07-12 17:27:12 +02:00
Zimmermann Gyula
60fafaa5a7 Refactors the music player. 2015-07-12 17:27:02 +02:00
Matthias Mailänder
56e9bcd96e rename RangeSquard to LengthSquared 2015-07-09 21:16:01 +02:00
Matthias Mailänder
413baf9d8b rename WDist.Range to WDist.Length 2015-07-09 10:55:38 +02:00
Matthias Mailänder
7447e0bf93 rename WRange to WDist 2015-07-09 10:55:38 +02:00
Paul Chote
8206c3c453 Enable VisibilityType for shroud revealing.
VisibilityType.Footprint reveals from each footprint cell.

VisibilityType.CenterPosition reveals from the
actor’s CenterPosition only (as the original
games did).
2015-07-04 17:07:05 +01:00
Paul Chote
7d8ee64ce5 Reorganize shroud cell queries.
This is in preparation for a future PR that will
remove GetVisOrigins.
2015-06-21 17:01:45 +01:00
Paul Chote
10716f8979 Move shrouded/revealed tile calculation outside Shroud. 2015-06-21 16:58:07 +01:00
Paul Chote
b5550102db Move world state tracking to Creates/RevealsShroud. 2015-06-21 16:58:06 +01:00
Oliver Brakmann
2d920c43fb Merge pull request #8511 from Mailaender/rm-openra-editor
Dropped the legacy WinForms map editor
2015-06-20 23:35:23 +02:00
Matthias Mailänder
7424f32b2f document Country trait 2015-06-20 22:22:59 +02:00
Matthias Mailänder
ac970cdb44 remove the WinForms map editor 2015-06-20 13:45:44 +02:00
Paul Chote
0677c309f3 Move Shroud.IsTargetable to Player. 2015-06-19 22:02:08 +01:00
Paul Chote
0a2757d0e0 Remove Shroud.IsExplored(Actor) and IsVisible(Actor). 2015-06-19 22:01:48 +01: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
da3abb4e2e Tweak shroud revealing logic
The per-actor visibility now tracks all cells
inside the map area (including those outside the
currently visible bounds), but the shroud/fog is
only cleared if the cell is inside the currently
visible bounds.
2015-06-15 18:06:42 +01:00
Oliver Brakmann
ce1eed6bcc Merge pull request #8432 from pchote/shroud-wpos
Add WPos shroud visibility queries.
2015-06-07 21:57:39 +02:00
Paul Chote
66dd3c553c Introduce WPos versions of FogObscures and ShroudObscures. 2015-06-07 19:50:02 +01:00
Paul Chote
cac7ec39f4 Rework shroud rendering using TerrainSpriteLayer. 2015-06-07 17:02:56 +01:00