Commit Graph

47 Commits

Author SHA1 Message Date
RoosterDragon
a6cda967c2 Formatted all files.
Automatically formatted all files via VS. This generally corrects indentation, removes trailing whitespace and corrects misplaced tabs or spaces. Manually tweaked a few files where required.
2015-01-06 21:28:50 +00:00
Matthias Mailänder
cddb956fee Merge pull request #7245 from Hellhake/stylecop-rest
Fix StyleCop warnings in Editor, Renderer.Sdl2, Utility, Test
2015-01-02 16:53:22 +01:00
Hellhake
bce017494d Fix StyleCop warnings in OpenRA.Renderer.Sdl2 2015-01-02 16:07:58 +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
1317101662 Add support for hardware cursors. 2014-12-23 22:09:22 +13:00
RoosterDragon
9cbac2d5e1 Clean up style of files affected by the last commit. 2014-12-22 17:34:02 +00:00
RoosterDragon
f0f02dff5c Dispose of graphics resources deterministically.
Textures, FrameBuffers and VertexBuffers allocated by the Sdl2 Renderer were only being released via finalizers. This could lead to OpenGL out of memory errors since resources may not be cleaned up in a timely manner. To avoid this, IDisposable has been implemented and transitively applied to classes that use these resources.

As a side-effect some static state is no longer static, particularly in Renderer, in order to facilitate this change and just for nicer design in general.

Also dispose some bitmaps.
2014-12-22 17:34:01 +00:00
Paul Chote
6b1505b71d Add an aspect ratio correction flag to VqaPlayerWidget. 2014-10-11 23:05:34 +13:00
steelphase
628463f920 remove copy local
remove copy local from project references
2014-10-08 02:29:14 -04:00
ImagoTrigger
eb2124bb89 Adds ability to paste text (ctrl/cmd+v) into chat. 2014-09-13 09:41:59 +12:00
Alexander Fast
070d00c678 Fixes year numbers in license text in file headers. 2014-08-21 11:27:52 +02: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
Matthias Mailänder
0e1f98c2a9 Merge pull request #5600 from RoosterDragon/auto-restart
Offer user quick restart if settings change
2014-06-20 08:56:08 +02:00
RoosterDragon
22abf9b4c4 Remove and sort usings. 2014-06-18 21:43:35 +01:00
RoosterDragon
52b09bdfe8 If changed settings require a restart, offer the user to do it now.
Add a dialog when closing the settings screen asking the user if they would like to restart the game now in order to apply any settings that are only applied after restarting the game. The game is reloaded in-process by spinning up a new AppDomain in order to reset state.
2014-06-18 21:36:56 +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
Matthias Mailänder
fa0e4c3d0d what if there is no vendor info to remove from version string 2014-06-14 08:25:46 +02:00
Matthias Mailänder
2cc1d34078 remove redundant OpenGL version check to avoid NREs 2014-06-14 08:25:46 +02:00
Matthias Mailänder
7b5476aca7 don't crash there yet when OpenGL version parsing fails
closes #5595
2014-06-14 08:25:26 +02:00
Gordon Martin
89c9499909 Removing requirement to restart game after applying changes to mouse focus option. The setting now defaults to 'false' as it is likely to be disruptive to players who are used to the usual behaviour in windowed mode. 2014-06-12 22:57:25 +01:00
Paul Chote
e347cdfb32 Merge pull request #5410 from RoosterDragon/IDisposable
Disposable fixup
2014-06-11 10:55:44 +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
Gordon Martin
5eab479c34 Adding SDL2 window grab on loading the game. Made this behaviour configurable in the 'Input' tab of the Settings menu
Updated settings file for TD to expose the new 'Lock mouse to window' display configuration option

A text label notes that modifying the 'Lock mouse' check box requires a restart
2014-06-09 19:10:05 +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
Saticmotion
1bf3f3e03e The engine now uses the SDL2.0 scroll events properly.
Scroll speed is now a user preference.
2014-05-16 13:56:22 +02:00
reaperrr
f7506b8a79 Fix warning message when compiling under Windows (MSBuild/VS). 2014-05-13 14:45:53 +02:00
Matthias Mailänder
f8bb956496 check for OpenGL version 2.0+ 2014-05-08 06:38:09 +02:00
Matthias Mailänder
ce78683782 give a hint when someone forgot to install drivers on Windows 2014-05-08 06:38:09 +02:00
Matthias Mailänder
a5422feced only query for the extension we need 2014-05-08 06:38:09 +02:00
Matthias Mailänder
dc2d1287a7 port Tao.OpenGl to OpenTK.Graphics.OpenGL and avoid Arb
closes #4540
2014-05-08 06:38:05 +02:00
Paul Chote
03c3c3ae9b Remove legacy renderers. 2014-05-02 23:38:47 +12:00
Paul Chote
4935266945 Merge FileFormats dll into Game and reorganise namespaces. 2014-04-17 01:20:47 +12:00
Paul Chote
a92cf920c6 Fix a visual glitch in OSX. 2014-04-13 12:05:38 +12:00
Paul Chote
f62721bdd6 Upgrade to SDL 2.0.3 and latest SDL2-CS (e8731ef). 2014-04-13 12:05:37 +12:00
Matthias Mailänder
67cd0645a4 update to .NET 4.0 2014-04-09 20:20:26 +12:00
Paul Chote
089973280d Add Multiply blend mode for D2K move-flash and shroud. 2013-12-11 19:22:54 +13: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
Matthias Mailänder
5d35dc0cc0 reflect that renderers are input + rendering in console output 2013-11-09 11:06:16 +01:00
Paul Chote
b1a60eface Add SDL2 renderer based on SDL2# wrapper. Closes #3315.
SDL2# binary was built from commit 70af91f84493a924a3c1da46ae6209bb5f7222e3.
2013-10-30 22:52:18 +13:00