Commit Graph

30 Commits

Author SHA1 Message Date
RoosterDragon
082ea6ba73 Refactor animation classes.
Specify pause function in constructors of Animation if required, and remove the unused pause function from AnimationWithOffset.

Cleanup Animation.cs and reduce code duplication.
2015-12-05 16:58:26 +00:00
Matthias Mailänder
41b488779a fix crash when disguising the spy as infantry without stand2 2015-07-12 22:20:52 +02:00
Paul Chote
8f93d7b5d7 Simplify and fix animation glitches. 2015-04-25 22:52:14 +02:00
Paul Chote
d3783f0244 Introduce ISpriteSequence interface. 2015-03-09 19:19:00 +00:00
Paul Chote
e9caf7f6e6 Initialise frame time when playing a new sequence.
Fixes #3706, #6389.
2015-02-20 16:54:04 +00:00
abcdefg30
8ca61aa917 Updated all year numbers 2015-01-09 21:18:05 +01:00
Hellhake
5a97a4b63b Fix StyleCop warnings in OpenRA.Game 2015-01-02 12:11:01 +01:00
Paul Chote
2b91a2363b Fix make animations. 2014-07-08 16:56:09 +12:00
Matthias Mailänder
565ea05bd7 fix problem with cnc nuke leaking the long idle sequence Tick
and avoid magic numbers
2014-07-06 09:23:31 +02:00
RoosterDragon
a0db80cb6a Changes to reduce allocations in the main loop.
Targeted some methods that generated allocated a lot of memory in the main game loop:
- Actor.Render - Changed LINQ calls into equivalent loops. No allocation for delegates.
- Animation.Render - Returned an array rather than a yield expression. The array uses less memory than the complier generated enumerable.
- FrozenActor and FrozenUnderFog - Materialize the footprint into an array: The enumerable is not-trivial to evaluate is and evaluated many times inside the Tick function. The memory needed is minimal. Changed LINQ into equivalent loops to prevent delegate allocation. Should result in overall much faster calls.
- Widget.GetEventBounds - Changed LINQ calls into equivalent loops.
- MobileInfo.CanEnterCell - Changed LINQ calls into equivalent loops. Don't materialize list of blocking actors every time, instead enumerate them and only when they need to be checked.
- FrozenUnderFog.TickRender - Generate the renderables lazily and also remove a no-op Select call.
2014-05-23 14:48:11 +01:00
Pavlos Touboulidis
b560268495 Change animations to use the proper SequenceProvider
Remove references to the global "Game" and use the SequenceProvider
of the current world/map.
2014-05-17 14:33:16 +03:00
Pavlos Touboulidis
63ec6d60e7 Refactoring to remove static Rules & SequenceProvider 2014-05-17 14:32:03 +03:00
Matthias Mailänder
01a3162725 allow animations to pause on low power
closes #2949
2014-04-20 14:47:53 +02:00
Paul Chote
be7fc57cdd Introduce IRenderable.IsDecoration and AsDecoration.
These are used to filter *Renderables that shouldn't
be copied for things like highlight or shadow.
2013-08-10 22:25:05 +12:00
Paul Chote
cdef41adb4 Specify sprite positions as center pos + offset. Fixes #3611. 2013-08-01 22:23:21 +12:00
Paul Chote
adea353e2b Support split shadows for TS and RA2. 2013-07-15 20:59:36 +12:00
Paul Chote
847f93246c Remove unnecessary properties from Sequence. 2013-07-15 20:58:25 +12:00
Paul Chote
9a47c6a303 Allow sequences to define a custom z offset. 2013-07-15 20:57:14 +12:00
Paul Chote
15688eed13 Allow Animation to generate its own Renderables. 2013-07-15 20:54:02 +12:00
Paul Chote
6dd62d7806 Fix Animation formatting (no code changes). 2013-05-15 19:24:18 +12:00
Chris Forbes
55036cd58c fix trailing whitespace everywhere 2011-09-26 08:40:39 +13:00
Paul Chote
b0425aff3b Renormalize line endings and fix copyright headers again. 2011-04-07 21:15:42 +12:00
Chris Forbes
ea022a0e06 change PlayThen and PlayRepeating definitions to not allocate Action objects like crazy 2011-03-05 21:52:34 +13:00
Paul Chote
094907c1a9 Update copyright header. Normalize line endings to LF. 2011-02-13 10:38:57 +13:00
Chris Forbes
9c20fba4a0 fix spy crashing things when disguised as a unit with fewer idle anims 2010-12-04 11:02:53 +13:00
Chris Forbes
d5f12dd8ee trim down license spam in all files 2010-07-18 16:48:21 +12:00
Chris Forbes
9297aedfcc don't explode on taking damage to <50% while selling 2010-05-06 01:25:48 +12:00
Chris Forbes
2547045881 less misleading name; further reduce speed of NUKE anim 2010-03-07 14:19:05 +13:00
Chris Forbes
2456739148 custom animation framerates 2010-03-07 14:12:58 +13:00
alzeih
7881deca30 Everything is now OpenRA, not OpenRa 2010-02-27 21:10:22 +13:00