Commit Graph

78 Commits

Author SHA1 Message Date
Matthias Mailänder
24deec2a7b fix CodeLineMustNotEndWithWhitespace 2015-01-25 18:41:29 +01:00
abcdefg30
8ca61aa917 Updated all year numbers 2015-01-09 21:18:05 +01:00
Hellhake
fa72e04042 Remove BOM 2015-01-01 22:51:12 +01:00
Paul Chote
91807cb53c Remove redundant StyleCop definitions. 2014-12-25 10:10:57 +01:00
Paul Chote
3086cc6154 Disable SA1024 and SA1035.
These rules generate many false positives, and do not help with code readability within OpenRA.
2014-12-25 10:10:57 +01:00
Paul Chote
713ddb7b9c Merge pull request #6718 from huwpascoe/tilebuilder
Fixed DPI scaling issues with tilebuilder
2014-11-10 22:25:35 +13:00
Paul Chote
c3b6f9bef6 Rename TileTemplate -> TerrainTemplateInfo. 2014-11-05 09:39:55 +13:00
huwpascoe
c3514e98eb Fixed DPI scaling issues with tilebuilder 2014-10-19 21:58:22 +01:00
Paul Chote
fad0215842 Merge pull request #6698 from RoosterDragon/memory-savings
Small memory savings
2014-10-12 11:43:08 +13:00
Paul Chote
4f44cc1969 Load assets using absolute paths. Fixes #6717. 2014-10-11 11:02:30 +13:00
RoosterDragon
59b3cd154d Change indexes into tile arrays to be stored as bytes to save memory.
The index value needs only be big enough to handle all defined terrain types. This is a low number so we can save memory by defining it as a byte. This particularly saves memory for the CustomTerrain field in the Map class, which defines a cell layer for the map using tile indexes, so we can reduce the size of that layer 4x as a result.
2014-10-09 20:03:01 +01:00
steelphase
628463f920 remove copy local
remove copy local from project references
2014-10-08 02:29:14 -04:00
Alexander Fast
070d00c678 Fixes year numbers in license text in file headers. 2014-08-21 11:27:52 +02:00
RoosterDragon
7030d8b2b6 Changed HardwarePalette.ApplyModifiers to be more efficient.
- Add separate ImmutablePalette and MutablePalette classes since the distinction is extremely important to HardwarePalette.
- Keep a cache of palettes in HardwarePalette to avoid reallocation them every time ApplyModifiers is called.
- Palettes that are not allowed to be modified are copied to the buffer once when added, rather than every time ApplyModifiers is called.
- The AdjustPalette method now takes a read-only dictionary to prevent the dictionary being messed with.
- Added a constant for the palette size to remove its usage as a magic number in several areas.
- The ColorPreviewManagerWidget is annoying in that it needs to actually permanently update a palette after it has been added. To allow this, HardwarePalette now allows a palette to be replaced after initialization. The WorldRenderer therefore now also updates the PaletteReference it created earlier with the new palette to prevent stale data being used elsewhere.
2014-06-28 01:11:48 +01:00
RoosterDragon
38617dc0a9 Run StyleCop on the smaller projects.
Also add a copy of the rules to the CrashDialog and Irc projects.
2014-06-23 00:03:37 +01:00
RoosterDragon
e0d8d8cf80 Clean up project settings.
- Create single platform config named x86 and have all projects target x86.
- Remove Release config (broken anyway).
- For the Debug config, ensure TRACE and DEBUG constants are set and unsafe code is allowed for all projects (same as the makefile).
- Warn level 4 and optimizations off were removed from the config automatically by VS (it assumes these values by default, and these match the makefile).
- The CrashDialog project can reuse the icon from the Game project as long as the path is set correctly.
- Fix TS project so it builds (I know it's going but its annoying that the project must be unloaded).
2014-06-20 19:29:54 +01:00
ScottNZ
90894aa03e Use var everywhere 2014-06-15 22:17:34 +12:00
Pavlos Touboulidis
092352729f Change terrain type from string based dictionaries to arrays 2014-06-13 11:20:54 +03:00
Paul Chote
f6f366c4b3 Merge pull request #5401 from RoosterDragon/nodesdict
Changed MiniYaml.NodesDict property into a method.
2014-06-12 17:34:59 +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
2e992a7310 Changed MiniYaml.NodesDict property into a method.
Method is now called ToDictionary.
- Cached a few invocations into locals which should prevent some redundant evaluation.
- Added ToDictionary overloads that take projection functions for the keys and elements, since several callsites were doing a subsequent Linq.ToDictionary call to get this.
2014-06-09 17:06:42 +01:00
RoosterDragon
0c8bdff5be Formatting fixes.
Spaces to tabs, indents, etc.
2014-05-26 18:10:59 +01:00
ScottNZ
40e9fb93d6 Revert project file changes by RoosterDragon which would cause the TD mod to fail to load for some reason on Windows (de7a837d94, #5403).
VS will also generate a warning if it tries to source an icon from somewhere not in the project directory, so added it to the CrashDialog folder.
2014-05-26 00:07:30 +12:00
Chris Forbes
5eb61dbdd2 Merge pull request #5411 from RoosterDragon/general-clean
General Cleanup
2014-05-25 11:03:03 +12: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
RoosterDragon
de7a837d94 Unify settings for solution and project setups.
Create a single solution platform named x86.
Ensure both Debug and Release configs build to the root for all projects.
Ensure all Release configs generate pdbs.
2014-05-23 08:16:09 +01:00
Pavlos Touboulidis
63ec6d60e7 Refactoring to remove static Rules & SequenceProvider 2014-05-17 14:32:03 +03:00
Paul Chote
4935266945 Merge FileFormats dll into Game and reorganise namespaces. 2014-04-17 01:20:47 +12:00
Matthias Mailänder
67cd0645a4 update to .NET 4.0 2014-04-09 20:20:26 +12:00
ScottNZ
1394c1dcee Remove some misc redundancies 2013-11-12 19:39:39 +13:00
ScottNZ
00ec1ca87a Remove unused usings 2013-11-12 19:39:33 +13:00
Paul Chote
f83ad88d2a Use Manifest.TileSize everywhere. 2013-08-15 17:43:12 +12:00
Matthias Mailänder
4603f0bbf6 StyleCop clean TilesetBuilder
adapt Makefile after TilesetBuilder file renamings

remove dead TilesetBuilder code
2013-08-07 15:52:22 +02:00
Matthias Mailänder
79355bbb32 remove unused AssemblyInfos 2013-08-07 15:42:29 +02:00
Matthias Mailänder
f02bfbf0c2 disable StyleCop rules SA1115 and SA1116
closes #3562
2013-08-07 13:50:23 +02:00
Matthias Mailänder
a35a046ede disable more StyleCop rules based on @pchote's wishlist 2013-07-11 20:29:00 +02:00
Matthias Mailänder
8bb5b5700b added StyleCop support
with some rules we disagree with disabled
2013-07-08 19:42:32 +02:00
Matthias Mailänder
0a82bfe552 format TODO: uniformly to auto-generate task list in MonoDevelop 2013-03-27 09:45:17 +01:00
ew07002
d1f12ff801 Add some usability features to the TilesetBuilder
- title bar shows tile position (x, y and tile nr (from left top))
 - make 'overlays' button a toggle button and properly sync state with
   tileset surface
 - add export option for 'Template CellID <-> tile number' mapping
 - overlay pen color is now white (todo: make configurable)
2012-07-23 09:33:57 +12:00
Matthias Mailänder
c75c72b525 made palette shadowindex configurable 2012-07-01 19:37:57 +12:00
James Dunne
aac78773f4 Upgraded to VS2010 2012-06-26 20:39:56 -05:00
Matthias Mailänder
d3915ad291 string AcceptsSmudgeType replaces boolean AcceptSmudge
because Dune 2000 has different craters for rock and sand
2012-06-27 13:19:52 +12:00
Matthias Mailänder
722c7a5f7d +resampled sounds, readded and completed Arrakis tileset
all tilesets combined into one without redundancy
2012-06-14 21:09:44 +02:00
Matthias Mailänder
f9cbd1bbbf experimenting with auto-downloader, sandworm 2012-06-10 21:13:40 +02:00
Matthias Mailänder
4ed74c6cc0 adding in-game GUI gamefile extractor/converter
also fixing EOL for TilesetBuilder with monoDevelop
2012-06-09 19:53:59 +02:00
Matthias Mailänder
f140c6ec9c added TilesetBuilder command line, added Tileset extractor
removing all copyrighted raw tileset files
2012-06-08 19:31:10 +02:00
Matthias Mailänder
8f1d06ff31 added TilesetBuilder2 and fixed it for Dune 2000
does not support TerrainTypes other than "clear" yet
2012-06-07 19:22:45 +02:00
Chris Forbes
d57dfd1997 tidy 2011-12-27 21:23:25 +13: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