Commit Graph

61 Commits

Author SHA1 Message Date
Paul Chote
290e214638 Remove unexpected RenderSprite.FactionImage fallback. 2020-09-12 17:52:46 +02:00
teinarss
19b02875c7 Use Tuple syntax 2020-08-15 10:37:10 +01:00
Paul Chote
b856613194 Add ISingleInstanceInit interface.
Inits that are logically singletons (e.g. actor
location or owner) should implement this interface
to avoid runtime inconsistencies.

Duplicate instances are rejected at init-time,
allowing simpler queries when they are used.
2020-06-19 17:57:56 +02:00
Paul Chote
6adf45bcb4 Convert IFacing.Facing and TurnSpeed to WAngle. 2020-06-12 18:35:41 +02:00
Paul Chote
7c6ec577dc Rewrite ActorInit queries. 2020-05-28 19:04:53 +02:00
Paul Chote
86f61298e6 Replace ITraitInfo interface with TraitInfo class. 2020-05-21 13:01:04 +02:00
Paul Chote
fe58ed1283 Animation facing -> WAngle. 2020-05-09 10:20:23 -05: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
Paul Chote
ab4a7e3558 Replace System.Drawing primitives with our own. 2019-03-04 18:26:42 +00: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
Paul Chote
6f5d035e79 Introduce IMouseBounds and split/rework mouse rectangles.
The render bounds for an actor now include the area covered
by bibs, shadows, and any other widgets. In many cases this
area is much larger than we really want to consider for
tooltips and mouse selection.

An optional Margin is added to Selectable to support cases
like infantry, where we want the mouse area of the actor
to be larger than the drawn selection box.
2017-12-11 19:45:07 +01:00
Paul Chote
8fcc80b05a Use IRender.ScreenBounds in ScreenMap.
Traits are now required to trigger a ScreenMap update whenever they
believe that their ScreenBounds have changed.
2017-12-11 19:45:07 +01:00
Paul Chote
86bfe28ade Add ScreenBounds method to IRender interface.
This method is expected to return Rectangles that cover
the region where Renderables returned by Render may exist.
2017-12-11 19:45:07 +01:00
reaperrr
56b6aabbb8 Use new IAutoRenderSize for determining actor render bounds 2017-11-21 01:00:09 +02:00
reaperrr
28e1f391e0 Make ITick require explicit implementation 2017-09-16 15:51:37 +02:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
Paul Chote
842e004ec5 Add a RenderSprites.UnnormalizeSequence helper. 2016-12-10 11:52:05 +00:00
Paul Chote
eb5b50185c Add IActorPreviewInitModifier interface. 2016-06-15 20:36:25 +01:00
reaperrr
fd5a597966 Move Render traits to Traits.Render namespace 2016-04-15 20:43:04 +02: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
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
atlimit8
9acf121eb1 Replace ActorInfo.Traits.WithInterface with ActorInfo.TraitInfos<T>() 2015-09-21 15:50:57 -05:00
atlimit8
09984683a7 Add ActorInfo.TraitInfo[OrDefault]<T>() requiring ITraitIfo types 2015-09-19 09:56:14 -05:00
reaperrr
c272e790e5 Remove RenderSimple
All traits inheriting from it have been removed, and WithSpriteBody can
now take its place.
2015-09-09 00:16:21 +02:00
Pavel Penev
256929073c Clean up some trait info loading code
Remove some methods that traits define to load their YAML values on their own.
2015-09-01 22:52:22 +03:00
Pavel Penev
09f67d18bb Some internal "race" to "faction" renaming 2015-08-22 23:34:36 +03:00
Pavel Penev
663c9239df Mop up remaining "race" private variables 2015-08-18 00:26:11 +03:00
Pavel Penev
b6b107de46 Rename RenderSpritesInfo.RaceImages 2015-08-18 00:26:05 +03:00
Matthias Mailänder
118782a85e check palette references 2015-08-17 21:36:45 +02:00
penev92
7c1ef2231d Rename RaceInit to FactionInit 2015-07-25 00:39:31 +03: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
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
7faebe874a check for missing sequence entries using lint 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
reaperrr
0e3a53bec7 Added WithFacingSpriteBody trait.
Extracted AutoSelectionSize into its own trait.

RenderUnit -> RenderSprites + WithFacingSpriteBody upgrade rule

Remove RenderSimple dependencies of ThrowsParticle
and WithHarvestAnimation.
2015-06-04 14:42:08 +02:00
Matthias Mailänder
5b5b0c02dd add trait documentation 2015-05-24 13:37:04 +02:00
Paul Chote
b1dc5012c3 Don’t crash if IQBO isn’t present on an actor. 2015-05-15 17:08:32 +01:00
Paul Chote
c0282bdff9 Remove Owner from ActorPreviews. 2015-05-10 00:01:43 +01:00
Matthias Mailänder
4e950024d3 Merge pull request #8046 from obrakmann/fix_missing_infantry_in_legacy_editor
Fix missing infantry in the legacy editor
2015-04-27 21:28:43 +02:00
Oliver Brakmann
22cd68e8f9 Fix missing infantry in the legacy editor
The editor is looking for actor types that implement ILegacyEditorRender, but infantry units don't anymore since #7638.

This moves ILegacyEditorRender to the root of the Render* inheritance tree, so that all actor types have access to it.
2015-04-27 17:52:14 +02:00
Paul Chote
614f96046c Remove RenderSprites animation keys. 2015-04-27 19:38:23 +12:00
abcdefg30
f84882ce9c Replace spaces with tabs 2015-03-23 17:27:53 +01:00
Paul Chote
4ea55809ca Decompose RenderInfantry into WithInfantryBody and RenderSprites. 2015-03-21 13:04:17 +00:00
RoosterDragon
1515ac54f6 Enforce a line length limit. 2015-03-19 17:20:34 +00:00