Commit Graph

32 Commits

Author SHA1 Message Date
Matthias Mailänder
cf43581bac measure sprite font performance 2014-11-01 16:13:54 +01:00
Alexander Fast
070d00c678 Fixes year numbers in license text in file headers. 2014-08-21 11:27:52 +02:00
RoosterDragon
8a60880cf1 Tackle the last of the low hanging fruit for memory allocations in the main game loop.
- Avoid calling string.Split twice in SprintFont.Measure.
- Change ActorsInBox method of ActorMap and ScreenMap to avoid allocating and intermediate list. As a bonus this allows the sequence to be lazily consumed. Also avoid LINQ in these methods.
- In FrozenUnderFog.TickRender, the method exits early if no players are visible so the attempt at lazy generation was not needed.
- Unwrap a LINQ Any call in ClassicProductionQueue.Tick.
- Merge some successive Where calls in ProximityCapturable into single predicates.
2014-06-22 17:29:45 +01:00
RoosterDragon
22abf9b4c4 Remove and sort usings. 2014-06-18 21:43:35 +01:00
ScottNZ
90894aa03e Use var everywhere 2014-06-15 22:17:34 +12:00
ScottNZ
dbffce81a6 Remove unused usings 2014-06-15 22:16:40 +12:00
RoosterDragon
a598a01108 Fixed IDisposable implementation and usage.
- Implement IDisposable interface correctly, with sealed classes where possible for simplicity.
- Add using statement around undisposed local variables.
2014-06-10 11:23:55 +01:00
RoosterDragon
b733465f33 General uncontroversial cleanup:
- Made private methods static where possible (runtime can elide checking the object for null).
- Declared attribute classes as sealed (allows reflection on attributes to complete faster).
- Moved some static cctor's into field initializers (static cctor's are slower than static field initializers).
- Made classes static if they contained only static methods (can't create instances of useless objects).
- Use inferable Exts.Lazy and not new Lazy<T>().
- Added required STAThread attribute to CrashDialog.
- Removed unused parameters in private methods.
- Added Serializable attribute to exceptions.
- Added parameter name in calls to ArgumentNullException.
- Use of as operator instead of is + cast.
- Changed (x as Foo).Bar anti-pattern into ((Foo)x).Bar. Results in sensible cast exceptions on error rather than null dereferences.
- Removed unused method in NullShader.
2014-05-23 15:50:54 +01:00
Paul Chote
4935266945 Merge FileFormats dll into Game and reorganise namespaces. 2014-04-17 01:20:47 +12:00
ScottNZ
00ec1ca87a Remove unused usings 2013-11-12 19:39:33 +13:00
Paul Chote
013ad0617e Allow sheets to wrap an ITexture directly. 2013-06-15 19:16:07 +12:00
Paul Chote
0e1c12131a Generalize SheetBuilder overflow behavior. 2013-06-15 19:16:07 +12:00
Paul Chote
4ebe547a05 Allow SheetBuilder to generate 1/2/4 channel sheets.
This makes the SpriteFont RBGA sprite hack explicit,
and adds a DualIndexed option to be used by the voxel
renderer.
2013-05-15 20:18:41 +12:00
Paul Chote
891158ca44 Allow SheetBuilder to throw an exception on sheet overflow.
This removes unnecessary checks from TerrainRenderer
and will be used in the voxel renderer.
2013-05-15 20:18:41 +12:00
Matthias Mailänder
63893e97e7 use SharpFont instead of custom Tao.FreeType 2013-04-02 12:46:25 +02:00
Chris Forbes
bc6af1841b fix indents everywhere 2011-10-18 15:10:17 +13:00
Chris Forbes
55036cd58c fix trailing whitespace everywhere 2011-09-26 08:40:39 +13:00
Chris Forbes
69ea44310b remove another 40M/min of boxing junk by specializing the key comparer on SpriteFont's dict 2011-03-06 08:59:25 +13:00
Paul Chote
094907c1a9 Update copyright header. Normalize line endings to LF. 2011-02-13 10:38:57 +13:00
Chris Forbes
db63724aeb add contrast surround to timer & chat which are displayed straight over the world 2011-01-08 12:21:12 +13:00
Chris Forbes
49a645cd2d fix ubuntu-64 support (Tao.FreeType was quite bogus.) 2010-10-05 17:42:13 +13:00
Paul Chote
8e42dd95fc RGBASpriteRender doesn't care about palettes 2010-08-25 20:15:44 +12:00
Chris Forbes
0a041fe425 use byte[] backing for Sheet. bitmap backing is still available for Chrome RGBA hack. 2010-08-19 19:22:03 +12:00
alzeih
2f9f539857 big pile of Render refactoring 2010-07-21 18:59:33 +12:00
alzeih
222b29cec6 Bye Bye Chrome! 2010-07-21 17:57:06 +12:00
Chris Forbes
d5f12dd8ee trim down license spam in all files 2010-07-18 16:48:21 +12:00
Chris Forbes
09b58f46d9 remove some spikes 2010-06-13 21:42:14 +12:00
alzeih
3001d58ba0 text has colour 2010-06-13 21:39:08 +12:00
Bob
0f98df9a88 remove SpriteRenderer arg to DrawText; create only one SpriteRenderer for each Shader 2010-04-11 20:59:04 +12:00
Paul Chote
ba857835b4 "Awesome tooltips" for special powers 2010-04-11 08:52:30 +12:00
Chris Forbes
93702c183a improved batching behavior of text rendering 2010-04-09 21:34:22 +12:00
alzeih
7881deca30 Everything is now OpenRA, not OpenRa 2010-02-27 21:10:22 +13:00