Remove legacy renderers.

This commit is contained in:
Paul Chote
2014-05-02 18:47:49 +12:00
parent 189f23e442
commit 03c3c3ae9b
37 changed files with 188 additions and 2675 deletions

View File

@@ -7,9 +7,7 @@ Windows
======= =======
* [.NET Framework >= 4.0 (Client Profile)](http://www.microsoft.com/en-us/download/details.aspx?id=17113) * [.NET Framework >= 4.0 (Client Profile)](http://www.microsoft.com/en-us/download/details.aspx?id=17113)
* [Cg Toolkit >= 2.2 (optional, for Cg renderer)](https://developer.nvidia.com/cg-toolkit-download) * [SDL 2 (included)](http://www.libsdl.org/download-2.0.php)
* [SDL 1.2 (included)](http://libsdl.org/download-1.2.php)
* [SDL 2 (optional)](http://www.libsdl.org/download-2.0.php)
* [FreeType (included)](http://gnuwin32.sourceforge.net/packages/freetype.htm) * [FreeType (included)](http://gnuwin32.sourceforge.net/packages/freetype.htm)
* [zlib (included)](http://gnuwin32.sourceforge.net/packages/zlib.htm) * [zlib (included)](http://gnuwin32.sourceforge.net/packages/zlib.htm)
* [OpenAL (included)](http://kcat.strangesoft.net/openal.html) * [OpenAL (included)](http://kcat.strangesoft.net/openal.html)
@@ -37,12 +35,10 @@ Debian/Ubuntu
------------- -------------
* mono-dmcs * mono-dmcs
* libmono-winforms2.0-cil * libmono-winforms4.0-cil
* cli-common-dev (>= 2.10) * cli-common-dev (>= 2.10)
* freetype * freetype
* openal * openal
* sdl
* nvidia-cg-toolkit (optional, for Cg renderer)
Slackware Slackware
--------- ---------
@@ -51,7 +47,6 @@ The following packages from slackbuilds.org are required, on 13.37 32-bit:
* libgdiplus * libgdiplus
* mono * mono
* openAL * openAL
* nvidia-cg-toolkit (optional, for Cg renderer)
openSUSE openSUSE
-------- --------
@@ -59,8 +54,7 @@ openSUSE
* mono-devel * mono-devel
* openal * openal
* freetype2 * freetype2
* SDL * SDL2
* cg (optional, for Cg renderer)
Gentoo Gentoo
------ ------
@@ -68,4 +62,3 @@ Gentoo
* dev-lang/mono * dev-lang/mono
* dev-dotnet/libgdiplus * dev-dotnet/libgdiplus
* media-libs/openal * media-libs/openal
* media-gfx/nvidia-cg-toolkit (optional, for Cg renderer)

View File

@@ -66,7 +66,7 @@ INSTALL_PROGRAM = $(INSTALL) -m755
INSTALL_DATA = $(INSTALL) -m644 INSTALL_DATA = $(INSTALL) -m644
# program targets # program targets
CORE = rcg rgl rsdl rsdl2 rnull game utility irc CORE = rsdl2 rnull game utility irc
TOOLS = editor tsbuild ralint TOOLS = editor tsbuild ralint
VERSION = $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || echo git-`git rev-parse --short HEAD`) VERSION = $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || echo git-`git rev-parse --short HEAD`)
@@ -94,28 +94,10 @@ PROGRAMS += irc
irc: $(irc_TARGET) irc: $(irc_TARGET)
# Renderer dlls # Renderer dlls
rsdl_SRCS := $(shell find OpenRA.Renderer.SdlCommon/ -iname '*.cs')
rsdl_TARGET = OpenRA.Renderer.SdlCommon.dll
rsdl_KIND = library
rsdl_DEPS = $(game_TARGET)
rsdl_LIBS = $(COMMON_LIBS) thirdparty/Tao/Tao.OpenGl.dll thirdparty/Tao/Tao.Sdl.dll $(rsdl_DEPS)
rcg_SRCS := $(shell find OpenRA.Renderer.Cg/ -iname '*.cs')
rcg_TARGET = OpenRA.Renderer.Cg.dll
rcg_KIND = library
rcg_DEPS = $(game_TARGET) $(rsdl_TARGET)
rcg_LIBS = $(COMMON_LIBS) thirdparty/Tao/Tao.Cg.dll thirdparty/Tao/Tao.OpenGl.dll $(rcg_DEPS)
rgl_SRCS := $(shell find OpenRA.Renderer.Gl/ -iname '*.cs')
rgl_TARGET = OpenRA.Renderer.Gl.dll
rgl_KIND = library
rgl_DEPS = $(game_TARGET) $(rsdl_TARGET)
rgl_LIBS = $(COMMON_LIBS) thirdparty/Tao/Tao.OpenGl.dll $(rgl_DEPS)
rsdl2_SRCS := $(shell find OpenRA.Renderer.Sdl2/ -iname '*.cs') rsdl2_SRCS := $(shell find OpenRA.Renderer.Sdl2/ -iname '*.cs')
rsdl2_TARGET = OpenRA.Renderer.Sdl2.dll rsdl2_TARGET = OpenRA.Renderer.Sdl2.dll
rsdl2_KIND = library rsdl2_KIND = library
rsdl2_DEPS = $(game_TARGET) $(rsdl_TARGET) $(rgl_TARGET) rsdl2_DEPS = $(game_TARGET)
rsdl2_LIBS = $(COMMON_LIBS) thirdparty/Tao/Tao.OpenGl.dll thirdparty/SDL2-CS.dll $(rsdl2_DEPS) rsdl2_LIBS = $(COMMON_LIBS) thirdparty/Tao/Tao.OpenGl.dll thirdparty/SDL2-CS.dll $(rsdl2_DEPS)
rnull_SRCS := $(shell find OpenRA.Renderer.Null/ -iname '*.cs') rnull_SRCS := $(shell find OpenRA.Renderer.Null/ -iname '*.cs')
@@ -123,8 +105,8 @@ rnull_TARGET = OpenRA.Renderer.Null.dll
rnull_KIND = library rnull_KIND = library
rnull_DEPS = $(game_TARGET) rnull_DEPS = $(game_TARGET)
rnull_LIBS = $(COMMON_LIBS) $(rnull_DEPS) rnull_LIBS = $(COMMON_LIBS) $(rnull_DEPS)
PROGRAMS += rcg rgl rsdl2 rnull rsdl PROGRAMS += rsdl2 rnull
renderers: $(rcg_TARGET) $(rgl_TARGET) $(rsdl2_TARGET) $(rnull_TARGET) $(rsdl_TARGET) renderers: $(rsdl2_TARGET) $(rnull_TARGET)
##### Official Mods ##### ##### Official Mods #####
@@ -323,7 +305,6 @@ install-core: default
@$(INSTALL_DATA) COPYING "$(DATA_INSTALL_DIR)/COPYING" @$(INSTALL_DATA) COPYING "$(DATA_INSTALL_DIR)/COPYING"
@$(CP_R) glsl "$(DATA_INSTALL_DIR)" @$(CP_R) glsl "$(DATA_INSTALL_DIR)"
@$(CP_R) cg "$(DATA_INSTALL_DIR)"
@$(CP_R) lua "$(DATA_INSTALL_DIR)" @$(CP_R) lua "$(DATA_INSTALL_DIR)"
@$(CP) *.ttf "$(DATA_INSTALL_DIR)" @$(CP) *.ttf "$(DATA_INSTALL_DIR)"
@$(CP) thirdparty/Tao/* "$(DATA_INSTALL_DIR)" @$(CP) thirdparty/Tao/* "$(DATA_INSTALL_DIR)"

View File

@@ -320,7 +320,7 @@ namespace OpenRA
} }
GlobalFileSystem.Mount("."); // Needed to access shaders GlobalFileSystem.Mount("."); // Needed to access shaders
var renderers = new[] { Settings.Graphics.Renderer, "Sdl2", "Gl", "Cg", null }; var renderers = new[] { Settings.Graphics.Renderer, "Sdl2", null };
foreach (var r in renderers) foreach (var r in renderers)
{ {
if (r == null) if (r == null)

View File

@@ -82,7 +82,7 @@ namespace OpenRA
public class GraphicSettings public class GraphicSettings
{ {
public string Renderer = "Gl"; public string Renderer = "Sdl2";
public WindowMode Mode = WindowMode.PseudoFullscreen; public WindowMode Mode = WindowMode.PseudoFullscreen;
public int2 FullscreenSize = new int2(0, 0); public int2 FullscreenSize = new int2(0, 0);
public int2 WindowedSize = new int2(1024, 768); public int2 WindowedSize = new int2(1024, 768);

View File

@@ -1,73 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Drawing;
using OpenRA;
using OpenRA.Graphics;
using OpenRA.Renderer.SdlCommon;
using Tao.Cg;
[assembly: Renderer(typeof(OpenRA.Renderer.Cg.DeviceFactory))]
namespace OpenRA.Renderer.Cg
{
public class DeviceFactory : IDeviceFactory
{
public IGraphicsDevice Create(Size size, WindowMode windowMode)
{
Console.WriteLine("Using SDL 1.2 with Cg renderer");
return new GraphicsDevice(size, windowMode);
}
}
public class GraphicsDevice : SdlGraphics
{
static string[] requiredExtensions =
{
"GL_ARB_vertex_program",
"GL_ARB_fragment_program",
"GL_ARB_vertex_buffer_object",
"GL_EXT_framebuffer_object"
};
internal IntPtr Context;
internal int VertexProfile, FragmentProfile;
static Tao.Cg.Cg.CGerrorCallbackFuncDelegate errorCallback = () =>
{
var err = Tao.Cg.Cg.cgGetError();
var msg = "Cg Error: {0}: {1}".F(err, Tao.Cg.Cg.cgGetErrorString(err));
ErrorHandler.WriteGraphicsLog(msg);
throw new InvalidOperationException("Cg Error. See graphics.log for details");
};
public GraphicsDevice(Size size, WindowMode window)
: base(size, window, requiredExtensions)
{
Context = Tao.Cg.Cg.cgCreateContext();
Tao.Cg.Cg.cgSetErrorCallback(errorCallback);
CgGl.cgGLRegisterStates(Context);
CgGl.cgGLSetManageTextureParameters(Context, true);
VertexProfile = CgGl.cgGLGetLatestProfile(CgGl.CG_GL_VERTEX);
FragmentProfile = CgGl.cgGLGetLatestProfile(CgGl.CG_GL_FRAGMENT);
}
public override void Quit()
{
Tao.Cg.Cg.cgDestroyContext(Context);
base.Quit();
}
public override IShader CreateShader(string name) { return new Shader(this, name); }
}
}

View File

@@ -1,114 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{67CF1A10-C5F6-48FA-B1A7-FE83BE4CE2CC}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OpenRA.Renderer.Cg</RootNamespace>
<AssemblyName>OpenRA.Renderer.Cg</AssemblyName>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="Tao.Cg, Version=2.0.0.0, Culture=neutral, PublicKeyToken=52fa5aba625fe731">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\thirdparty\Tao\Tao.Cg.dll</HintPath>
</Reference>
<Reference Include="Tao.OpenGl, Version=2.1.0.12, Culture=neutral, PublicKeyToken=1ca010269a4501ef">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\thirdparty\Tao\Tao.OpenGl.dll</HintPath>
</Reference>
<Reference Include="Tao.Sdl, Version=1.2.13.0, Culture=neutral, PublicKeyToken=9c7a200e36c0094e">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\thirdparty\Tao\Tao.Sdl.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="GraphicsDevice.cs" />
<Compile Include="Shader.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
<Project>{0DFB103F-2962-400F-8C6D-E2C28CCBA633}</Project>
<Name>OpenRA.Game</Name>
</ProjectReference>
<ProjectReference Include="..\OpenRA.Renderer.SdlCommon\OpenRA.Renderer.SdlCommon.csproj">
<Project>{52FD9F0B-B209-4ED7-8A32-AC8033363263}</Project>
<Name>OpenRA.Renderer.SdlCommon</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>

View File

@@ -1,344 +0,0 @@
<StyleCopSettings Version="105">
<Analyzers>
<Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules">
<Rules>
<Rule Name="ElementsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="EnumerationItemsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationMustContainValidXml">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustHaveSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementDocumentationMustHaveSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustHaveSummaryText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementDocumentationMustHaveSummaryText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustNotHaveDefaultSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParametersMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustMatchElementParameters">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustDeclareParameterName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementReturnValueMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementReturnValueDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="VoidReturnValueMustNotBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParametersMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParametersMustBeDocumentedPartialClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustMatchTypeParameters">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustDeclareParameterName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertySummaryDocumentationMustMatchAccessors">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertySummaryDocumentationMustOmitSetAccessorWithRestrictedAccess">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustNotBeCopiedAndPasted">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SingleLineCommentsMustNotUseDocumentationStyleSlashes">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationTextMustNotBeEmpty">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationTextMustContainWhitespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationMustMeetCharacterPercentage">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ConstructorSummaryDocumentationMustBeginWithStandardText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DestructorSummaryDocumentationMustBeginWithStandardText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationHeadersMustNotContainBlankLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncludedDocumentationXPathDoesNotExist">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncludeNodeDoesNotContainValidFileAndPath">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="InheritDocMustBeUsedWithInheritingClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustBeSpelledCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMustHaveHeader">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustShowCopyright">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustHaveCopyrightText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustContainFileName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderFileNameDocumentationMustMatchFileName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustHaveValidCompanyText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderFileNameDocumentationMustMatchTypeName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.SpacingRules">
<Rules>
<Rule Name="TabsMustNotBeUsed">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.LayoutRules">
<Rules>
<Rule Name="CurlyBracketsForMultiLineStatementsMustNotShareLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="StatementMustNotBeOnSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementMustNotBeOnSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CurlyBracketsMustNotBeOmitted">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustBeSeparatedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.OrderingRules">
<Rules>
<Rule Name="UsingDirectivesMustBePlacedWithinNamespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustAppearInTheCorrectOrder">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustBeOrderedByAccess">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.ReadabilityRules">
<Rules>
<Rule Name="CodeMustNotContainMultipleStatementsOnOneLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UseStringEmptyForEmptyStrings">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PrefixLocalCallsWithThis">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PrefixCallsCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParametersMustBeOnSameLineOrSeparateLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParameterMustFollowComma">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SplitParametersMustStartOnLineAfterDeclaration">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.MaintainabilityRules">
<Rules>
<Rule Name="AccessModifierMustBeDeclared">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FieldsMustBePrivate">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMayOnlyContainASingleClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ArithmeticExpressionsMustDeclarePrecedence">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
</Analyzers>
</StyleCopSettings>

View File

@@ -1,118 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.IO;
using OpenRA.FileSystem;
using OpenRA.Graphics;
using OpenRA.Renderer.SdlCommon;
namespace OpenRA.Renderer.Cg
{
public class Shader : IShader
{
IntPtr effect;
IntPtr technique;
GraphicsDevice dev;
public Shader(GraphicsDevice dev, string name)
{
this.dev = dev;
string code;
using (var file = new StreamReader(GlobalFileSystem.Open("cg{0}{1}.fx".F(Path.DirectorySeparatorChar, name))))
code = file.ReadToEnd();
effect = Tao.Cg.Cg.cgCreateEffect(dev.Context, code, null);
if (effect == IntPtr.Zero)
{
var err = Tao.Cg.Cg.cgGetErrorString(Tao.Cg.Cg.cgGetError());
var results = Tao.Cg.Cg.cgGetLastListing(dev.Context);
throw new InvalidOperationException(
"Cg compile failed ({0}):\n{1}".F(err, results));
}
technique = Tao.Cg.Cg.cgGetFirstTechnique(effect);
if (technique == IntPtr.Zero)
throw new InvalidOperationException("No techniques");
while (Tao.Cg.Cg.cgValidateTechnique(technique) == 0)
{
technique = Tao.Cg.Cg.cgGetNextTechnique(technique);
if (technique == IntPtr.Zero)
throw new InvalidOperationException("No valid techniques");
}
}
public void Render(Action a)
{
Tao.Cg.CgGl.cgGLEnableProfile(dev.VertexProfile);
Tao.Cg.CgGl.cgGLEnableProfile(dev.FragmentProfile);
var pass = Tao.Cg.Cg.cgGetFirstPass(technique);
while (pass != IntPtr.Zero)
{
Tao.Cg.Cg.cgSetPassState(pass);
a();
Tao.Cg.Cg.cgResetPassState(pass);
pass = Tao.Cg.Cg.cgGetNextPass(pass);
}
Tao.Cg.CgGl.cgGLDisableProfile(dev.FragmentProfile);
Tao.Cg.CgGl.cgGLDisableProfile(dev.VertexProfile);
}
public void SetTexture(string name, ITexture t)
{
var texture = (Texture)t;
var param = Tao.Cg.Cg.cgGetNamedEffectParameter(effect, name);
if (param != IntPtr.Zero && texture != null)
Tao.Cg.CgGl.cgGLSetupSampler(param, texture.ID);
}
public void SetVec(string name, float x)
{
var param = Tao.Cg.Cg.cgGetNamedEffectParameter(effect, name);
if (param != IntPtr.Zero)
Tao.Cg.CgGl.cgGLSetParameter1f(param, x);
}
public void SetVec(string name, float x, float y)
{
var param = Tao.Cg.Cg.cgGetNamedEffectParameter(effect, name);
if (param != IntPtr.Zero)
Tao.Cg.CgGl.cgGLSetParameter2f(param, x, y);
}
public void SetVec(string name, float[] vec, int length)
{
var param = Tao.Cg.Cg.cgGetNamedEffectParameter(effect, name);
if (param == IntPtr.Zero)
return;
switch (length)
{
case 1: Tao.Cg.CgGl.cgGLSetParameter1fv(param, vec); break;
case 2: Tao.Cg.CgGl.cgGLSetParameter2fv(param, vec); break;
case 3: Tao.Cg.CgGl.cgGLSetParameter3fv(param, vec); break;
case 4: Tao.Cg.CgGl.cgGLSetParameter4fv(param, vec); break;
default: throw new InvalidDataException("Invalid vector length");
}
}
public void SetMatrix(string name, float[] mtx)
{
if (mtx.Length != 16)
throw new InvalidDataException("Invalid 4x4 matrix");
var param = Tao.Cg.Cg.cgGetNamedEffectParameter(effect, name);
if (param != IntPtr.Zero)
Tao.Cg.CgGl.cgGLSetMatrixParameterfr(param, mtx);
}
}
}

View File

@@ -1,45 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Drawing;
using OpenRA;
using OpenRA.Graphics;
using OpenRA.Renderer.SdlCommon;
[assembly: Renderer(typeof(OpenRA.Renderer.Glsl.DeviceFactory))]
namespace OpenRA.Renderer.Glsl
{
public class DeviceFactory : IDeviceFactory
{
public IGraphicsDevice Create(Size size, WindowMode windowMode)
{
Console.WriteLine("Using SDL 1.2 with OpenGL renderer");
return new GraphicsDevice(size, windowMode);
}
}
public class GraphicsDevice : SdlGraphics
{
static string[] requiredExtensions =
{
"GL_ARB_vertex_shader",
"GL_ARB_fragment_shader",
"GL_ARB_vertex_buffer_object",
"GL_EXT_framebuffer_object"
};
public GraphicsDevice(Size size, WindowMode window)
: base(size, window, requiredExtensions) { }
public override IShader CreateShader(string name) { return new Shader(name); }
}
}

View File

@@ -1,102 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{E9C01A96-C3E2-4772-825B-A740AC513D31}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>OpenRA.Renderer.Glsl</RootNamespace>
<AssemblyName>OpenRA.Renderer.Gl</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ConsolePause>false</ConsolePause>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="Tao.OpenGl, Version=2.1.0.12, Culture=neutral, PublicKeyToken=1ca010269a4501ef">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\thirdparty\Tao\Tao.OpenGl.dll</HintPath>
</Reference>
<Reference Include="Tao.Sdl, Version=1.2.13.0, Culture=neutral, PublicKeyToken=9c7a200e36c0094e">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\thirdparty\Tao\Tao.Sdl.dll</HintPath>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="Tao.Cg, Version=2.0.0.0, Culture=neutral, PublicKeyToken=52fa5aba625fe731">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\thirdparty\Tao\Tao.Cg.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="GraphicsDevice.cs" />
<Compile Include="Shader.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
<Project>{0DFB103F-2962-400F-8C6D-E2C28CCBA633}</Project>
<Name>OpenRA.Game</Name>
</ProjectReference>
<ProjectReference Include="..\OpenRA.Renderer.SdlCommon\OpenRA.Renderer.SdlCommon.csproj">
<Project>{52FD9F0B-B209-4ED7-8A32-AC8033363263}</Project>
<Name>OpenRA.Renderer.SdlCommon</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
</Project>

View File

@@ -1,344 +0,0 @@
<StyleCopSettings Version="105">
<Analyzers>
<Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules">
<Rules>
<Rule Name="ElementsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="EnumerationItemsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationMustContainValidXml">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustHaveSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementDocumentationMustHaveSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustHaveSummaryText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementDocumentationMustHaveSummaryText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustNotHaveDefaultSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParametersMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustMatchElementParameters">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustDeclareParameterName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementReturnValueMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementReturnValueDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="VoidReturnValueMustNotBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParametersMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParametersMustBeDocumentedPartialClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustMatchTypeParameters">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustDeclareParameterName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertySummaryDocumentationMustMatchAccessors">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertySummaryDocumentationMustOmitSetAccessorWithRestrictedAccess">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustNotBeCopiedAndPasted">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SingleLineCommentsMustNotUseDocumentationStyleSlashes">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationTextMustNotBeEmpty">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationTextMustContainWhitespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationMustMeetCharacterPercentage">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ConstructorSummaryDocumentationMustBeginWithStandardText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DestructorSummaryDocumentationMustBeginWithStandardText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationHeadersMustNotContainBlankLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncludedDocumentationXPathDoesNotExist">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncludeNodeDoesNotContainValidFileAndPath">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="InheritDocMustBeUsedWithInheritingClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustBeSpelledCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMustHaveHeader">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustShowCopyright">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustHaveCopyrightText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustContainFileName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderFileNameDocumentationMustMatchFileName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustHaveValidCompanyText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderFileNameDocumentationMustMatchTypeName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.SpacingRules">
<Rules>
<Rule Name="TabsMustNotBeUsed">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.LayoutRules">
<Rules>
<Rule Name="CurlyBracketsForMultiLineStatementsMustNotShareLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="StatementMustNotBeOnSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementMustNotBeOnSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CurlyBracketsMustNotBeOmitted">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustBeSeparatedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.OrderingRules">
<Rules>
<Rule Name="UsingDirectivesMustBePlacedWithinNamespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustAppearInTheCorrectOrder">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustBeOrderedByAccess">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.ReadabilityRules">
<Rules>
<Rule Name="CodeMustNotContainMultipleStatementsOnOneLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UseStringEmptyForEmptyStrings">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PrefixLocalCallsWithThis">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PrefixCallsCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParametersMustBeOnSameLineOrSeparateLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParameterMustFollowComma">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SplitParametersMustStartOnLineAfterDeclaration">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.MaintainabilityRules">
<Rules>
<Rule Name="AccessModifierMustBeDeclared">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FieldsMustBePrivate">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMayOnlyContainASingleClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ArithmeticExpressionsMustDeclarePrecedence">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
</Analyzers>
</StyleCopSettings>

View File

@@ -12,7 +12,7 @@ using System;
using System.Diagnostics; using System.Diagnostics;
using Tao.OpenGl; using Tao.OpenGl;
namespace OpenRA.Renderer.SdlCommon namespace OpenRA.Renderer.Sdl2
{ {
public static class ErrorHandler public static class ErrorHandler
{ {

View File

@@ -15,7 +15,7 @@ using System.IO;
using OpenRA.Graphics; using OpenRA.Graphics;
using Tao.OpenGl; using Tao.OpenGl;
namespace OpenRA.Renderer.SdlCommon namespace OpenRA.Renderer.Sdl2
{ {
public class FrameBuffer : IFrameBuffer public class FrameBuffer : IFrameBuffer
{ {

View File

@@ -0,0 +1,84 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using OpenRA;
using OpenRA.Primitives;
namespace OpenRA.Renderer.Sdl2
{
public static class MultiTapDetection
{
static Cache<Keycode, TapHistory> keyHistoryCache =
new Cache<Keycode, TapHistory>(_ => new TapHistory(DateTime.Now - TimeSpan.FromSeconds(1)));
static Cache<byte, TapHistory> clickHistoryCache =
new Cache<byte, TapHistory>(_ => new TapHistory(DateTime.Now - TimeSpan.FromSeconds(1)));
public static int DetectFromMouse(byte button, int2 xy)
{
return clickHistoryCache[button].GetTapCount(xy);
}
public static int InfoFromMouse(byte button)
{
return clickHistoryCache[button].LastTapCount();
}
public static int DetectFromKeyboard(Keycode key)
{
return keyHistoryCache[key].GetTapCount(int2.Zero);
}
public static int InfoFromKeyboard(Keycode key)
{
return keyHistoryCache[key].LastTapCount();
}
}
class TapHistory
{
public Pair<DateTime, int2> FirstRelease, SecondRelease, ThirdRelease;
public TapHistory(DateTime now)
{
FirstRelease = SecondRelease = ThirdRelease = Pair.New(now, int2.Zero);
}
static bool CloseEnough(Pair<DateTime, int2> a, Pair<DateTime, int2> b)
{
return a.First - b.First < TimeSpan.FromMilliseconds(250)
&& (a.Second - b.Second).Length < 4;
}
public int GetTapCount(int2 xy)
{
FirstRelease = SecondRelease;
SecondRelease = ThirdRelease;
ThirdRelease = Pair.New(DateTime.Now, xy);
if (!CloseEnough(ThirdRelease, SecondRelease))
return 1;
if (!CloseEnough(SecondRelease, FirstRelease))
return 2;
return 3;
}
public int LastTapCount()
{
if (!CloseEnough(ThirdRelease, SecondRelease))
return 1;
if (!CloseEnough(SecondRelease, FirstRelease))
return 2;
return 3;
}
}
}

View File

@@ -44,6 +44,12 @@
<ItemGroup> <ItemGroup>
<Compile Include="Sdl2Input.cs" /> <Compile Include="Sdl2Input.cs" />
<Compile Include="Sdl2GraphicsDevice.cs" /> <Compile Include="Sdl2GraphicsDevice.cs" />
<Compile Include="Shader.cs" />
<Compile Include="ErrorHandler.cs" />
<Compile Include="FrameBuffer.cs" />
<Compile Include="MultiTapDetection.cs" />
<Compile Include="Texture.cs" />
<Compile Include="VertexBuffer.cs" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup> <ItemGroup>
@@ -51,13 +57,5 @@
<Project>{0DFB103F-2962-400F-8C6D-E2C28CCBA633}</Project> <Project>{0DFB103F-2962-400F-8C6D-E2C28CCBA633}</Project>
<Name>OpenRA.Game</Name> <Name>OpenRA.Game</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\OpenRA.Renderer.SdlCommon\OpenRA.Renderer.SdlCommon.csproj">
<Project>{52FD9F0B-B209-4ED7-8A32-AC8033363263}</Project>
<Name>OpenRA.Renderer.SdlCommon</Name>
</ProjectReference>
<ProjectReference Include="..\OpenRA.Renderer.Gl\OpenRA.Renderer.Gl.csproj">
<Project>{E9C01A96-C3E2-4772-825B-A740AC513D31}</Project>
<Name>OpenRA.Renderer.Gl</Name>
</ProjectReference>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -13,8 +13,6 @@ using System.Drawing;
using System.Linq; using System.Linq;
using OpenRA; using OpenRA;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Renderer.Glsl;
using OpenRA.Renderer.SdlCommon;
using SDL2; using SDL2;
using Tao.OpenGl; using Tao.OpenGl;

View File

@@ -9,7 +9,6 @@
#endregion #endregion
using System.Text; using System.Text;
using OpenRA.Renderer.SdlCommon;
using SDL2; using SDL2;
namespace OpenRA.Renderer.Sdl2 namespace OpenRA.Renderer.Sdl2
@@ -117,7 +116,7 @@ namespace OpenRA.Renderer.Sdl2
case SDL.SDL_EventType.SDL_MOUSEWHEEL: case SDL.SDL_EventType.SDL_MOUSEWHEEL:
{ {
// Retain compatibility with existing bogus behavior // Retain compatibility with existing bogus behavior
// TODO: Implement real scroll behavior after we drop SDL 1.2 support // TODO: Implement real scroll behavior. We've dropped SDL 1.2 support!
if (e.wheel.y == 0) if (e.wheel.y == 0)
break; break;

View File

@@ -14,10 +14,9 @@ using System.IO;
using System.Text; using System.Text;
using OpenRA.FileSystem; using OpenRA.FileSystem;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Renderer.SdlCommon;
using Tao.OpenGl; using Tao.OpenGl;
namespace OpenRA.Renderer.Glsl namespace OpenRA.Renderer.Sdl2
{ {
public class Shader : IShader public class Shader : IShader
{ {

View File

@@ -15,7 +15,7 @@ using System.IO;
using OpenRA.Graphics; using OpenRA.Graphics;
using Tao.OpenGl; using Tao.OpenGl;
namespace OpenRA.Renderer.SdlCommon namespace OpenRA.Renderer.Sdl2
{ {
public class Texture : ITexture public class Texture : ITexture
{ {

View File

@@ -13,7 +13,7 @@ using System.Runtime.InteropServices;
using OpenRA.Graphics; using OpenRA.Graphics;
using Tao.OpenGl; using Tao.OpenGl;
namespace OpenRA.Renderer.SdlCommon namespace OpenRA.Renderer.Sdl2
{ {
public class VertexBuffer<T> : IVertexBuffer<T> public class VertexBuffer<T> : IVertexBuffer<T>
where T : struct where T : struct

View File

@@ -1,81 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using OpenRA;
using OpenRA.Primitives;
public static class MultiTapDetection
{
static Cache<Keycode, TapHistory> keyHistoryCache =
new Cache<Keycode, TapHistory>(_ => new TapHistory(DateTime.Now - TimeSpan.FromSeconds(1)));
static Cache<byte, TapHistory> clickHistoryCache =
new Cache<byte, TapHistory>(_ => new TapHistory(DateTime.Now - TimeSpan.FromSeconds(1)));
public static int DetectFromMouse(byte button, int2 xy)
{
return clickHistoryCache[button].GetTapCount(xy);
}
public static int InfoFromMouse(byte button)
{
return clickHistoryCache[button].LastTapCount();
}
public static int DetectFromKeyboard(Keycode key)
{
return keyHistoryCache[key].GetTapCount(int2.Zero);
}
public static int InfoFromKeyboard(Keycode key)
{
return keyHistoryCache[key].LastTapCount();
}
}
class TapHistory
{
public Pair<DateTime, int2> FirstRelease, SecondRelease, ThirdRelease;
public TapHistory(DateTime now)
{
FirstRelease = SecondRelease = ThirdRelease = Pair.New(now, int2.Zero);
}
static bool CloseEnough(Pair<DateTime, int2> a, Pair<DateTime, int2> b)
{
return a.First - b.First < TimeSpan.FromMilliseconds(250)
&& (a.Second - b.Second).Length < 4;
}
public int GetTapCount(int2 xy)
{
FirstRelease = SecondRelease;
SecondRelease = ThirdRelease;
ThirdRelease = Pair.New(DateTime.Now, xy);
if (!CloseEnough(ThirdRelease, SecondRelease))
return 1;
if (!CloseEnough(SecondRelease, FirstRelease))
return 2;
return 3;
}
public int LastTapCount()
{
if (!CloseEnough(ThirdRelease, SecondRelease))
return 1;
if (!CloseEnough(SecondRelease, FirstRelease))
return 2;
return 3;
}
}

View File

@@ -1,99 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{52FD9F0B-B209-4ED7-8A32-AC8033363263}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>OpenRA.Renderer.SdlCommon</RootNamespace>
<AssemblyName>OpenRA.Renderer.SdlCommon</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="Tao.OpenGl, Version=2.1.0.12, Culture=neutral, PublicKeyToken=1ca010269a4501ef">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\thirdparty\Tao\Tao.OpenGl.dll</HintPath>
</Reference>
<Reference Include="Tao.Sdl, Version=1.2.13.0, Culture=neutral, PublicKeyToken=9c7a200e36c0094e">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\thirdparty\Tao\Tao.Sdl.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="ErrorHandler.cs" />
<Compile Include="MultiTapDetection.cs" />
<Compile Include="SdlGraphics.cs" />
<Compile Include="SdlInput.cs" />
<Compile Include="Texture.cs" />
<Compile Include="VertexBuffer.cs" />
<Compile Include="FrameBuffer.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
<Project>{0DFB103F-2962-400F-8C6D-E2C28CCBA633}</Project>
<Name>OpenRA.Game</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -1,223 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using OpenRA.Graphics;
using Tao.OpenGl;
using Tao.Sdl;
namespace OpenRA.Renderer.SdlCommon
{
public abstract class SdlGraphics : IGraphicsDevice
{
Size windowSize;
SdlInput input;
public Size WindowSize { get { return windowSize; } }
public SdlGraphics(Size size, WindowMode window, string[] extensions)
{
windowSize = size;
InitializeSdlGl(ref windowSize, window, extensions);
Gl.glEnableClientState(Gl.GL_VERTEX_ARRAY);
ErrorHandler.CheckGlError();
Gl.glEnableClientState(Gl.GL_TEXTURE_COORD_ARRAY);
ErrorHandler.CheckGlError();
Sdl.SDL_SetModState(0);
input = new SdlInput();
}
IntPtr InitializeSdlGl(ref Size size, WindowMode window, string[] requiredExtensions)
{
Sdl.SDL_Init(Sdl.SDL_INIT_NOPARACHUTE | Sdl.SDL_INIT_VIDEO);
Sdl.SDL_GL_SetAttribute(Sdl.SDL_GL_DOUBLEBUFFER, 1);
Sdl.SDL_GL_SetAttribute(Sdl.SDL_GL_RED_SIZE, 8);
Sdl.SDL_GL_SetAttribute(Sdl.SDL_GL_GREEN_SIZE, 8);
Sdl.SDL_GL_SetAttribute(Sdl.SDL_GL_BLUE_SIZE, 8);
Sdl.SDL_GL_SetAttribute(Sdl.SDL_GL_ALPHA_SIZE, 0);
int windowFlags = 0;
switch (window)
{
case WindowMode.Fullscreen:
windowFlags |= Sdl.SDL_FULLSCREEN;
break;
case WindowMode.PseudoFullscreen:
windowFlags |= Sdl.SDL_NOFRAME;
Environment.SetEnvironmentVariable("SDL_VIDEO_WINDOW_POS", "0,0");
break;
case WindowMode.Windowed:
Environment.SetEnvironmentVariable("SDL_VIDEO_CENTERED", "1");
break;
default:
break;
}
var info = (Sdl.SDL_VideoInfo)Marshal.PtrToStructure(
Sdl.SDL_GetVideoInfo(), typeof(Sdl.SDL_VideoInfo));
Console.WriteLine("Desktop resolution: {0}x{1}",
info.current_w, info.current_h);
if (size.Width == 0 && size.Height == 0)
{
Console.WriteLine("No custom resolution provided, using desktop resolution");
size = new Size(info.current_w, info.current_h);
}
Console.WriteLine("Using resolution: {0}x{1}", size.Width, size.Height);
var surf = Sdl.SDL_SetVideoMode(size.Width, size.Height, 0, Sdl.SDL_OPENGL | windowFlags);
if (surf == IntPtr.Zero)
Console.WriteLine("Failed to set video mode.");
Sdl.SDL_WM_SetCaption("OpenRA", "OpenRA");
Sdl.SDL_ShowCursor(0);
Sdl.SDL_EnableUNICODE(1);
Sdl.SDL_EnableKeyRepeat(Sdl.SDL_DEFAULT_REPEAT_DELAY, Sdl.SDL_DEFAULT_REPEAT_INTERVAL);
ErrorHandler.CheckGlError();
var extensions = Gl.glGetString(Gl.GL_EXTENSIONS);
if (extensions == null)
Console.WriteLine("Failed to fetch GL_EXTENSIONS, this is bad.");
var missingExtensions = requiredExtensions.Where(r => !extensions.Contains(r)).ToArray();
if (missingExtensions.Any())
{
ErrorHandler.WriteGraphicsLog("Unsupported GPU: Missing extensions: {0}"
.F(missingExtensions.JoinWith(",")));
throw new InvalidProgramException("Unsupported GPU. See graphics.log for details.");
}
return surf;
}
public virtual void Quit()
{
Sdl.SDL_Quit();
}
int ModeFromPrimitiveType(PrimitiveType pt)
{
switch (pt)
{
case PrimitiveType.PointList: return Gl.GL_POINTS;
case PrimitiveType.LineList: return Gl.GL_LINES;
case PrimitiveType.TriangleList: return Gl.GL_TRIANGLES;
case PrimitiveType.QuadList: return Gl.GL_QUADS;
}
throw new NotImplementedException();
}
public void DrawPrimitives(PrimitiveType pt, int firstVertex, int numVertices)
{
Gl.glDrawArrays(ModeFromPrimitiveType(pt), firstVertex, numVertices);
ErrorHandler.CheckGlError();
}
public void Clear()
{
Gl.glClearColor(0, 0, 0, 0);
ErrorHandler.CheckGlError();
Gl.glClear(Gl.GL_COLOR_BUFFER_BIT);
ErrorHandler.CheckGlError();
}
public void EnableDepthBuffer()
{
Gl.glClear(Gl.GL_DEPTH_BUFFER_BIT);
ErrorHandler.CheckGlError();
Gl.glEnable(Gl.GL_DEPTH_TEST);
ErrorHandler.CheckGlError();
}
public void DisableDepthBuffer()
{
Gl.glDisable(Gl.GL_DEPTH_TEST);
ErrorHandler.CheckGlError();
}
public void SetBlendMode(BlendMode mode)
{
Gl.glBlendEquation(Gl.GL_FUNC_ADD);
ErrorHandler.CheckGlError();
switch (mode)
{
case BlendMode.None:
Gl.glDisable(Gl.GL_BLEND);
break;
case BlendMode.Alpha:
Gl.glEnable(Gl.GL_BLEND);
ErrorHandler.CheckGlError();
Gl.glBlendFunc(Gl.GL_SRC_ALPHA, Gl.GL_ONE_MINUS_SRC_ALPHA);
break;
case BlendMode.Additive:
Gl.glEnable(Gl.GL_BLEND);
ErrorHandler.CheckGlError();
Gl.glBlendFunc(Gl.GL_ONE, Gl.GL_ONE);
break;
case BlendMode.Subtractive:
Gl.glEnable(Gl.GL_BLEND);
ErrorHandler.CheckGlError();
Gl.glBlendFunc(Gl.GL_ONE, Gl.GL_ONE);
ErrorHandler.CheckGlError();
Gl.glBlendEquation(Gl.GL_FUNC_REVERSE_SUBTRACT);
break;
case BlendMode.Multiply:
Gl.glEnable(Gl.GL_BLEND);
ErrorHandler.CheckGlError();
Gl.glBlendFuncSeparate(Gl.GL_DST_COLOR, Gl.GL_ZERO, Gl.GL_ONE, Gl.GL_ONE_MINUS_SRC_ALPHA);
ErrorHandler.CheckGlError();
break;
}
ErrorHandler.CheckGlError();
}
public void EnableScissor(int left, int top, int width, int height)
{
if (width < 0) width = 0;
if (height < 0) height = 0;
Gl.glScissor(left, windowSize.Height - (top + height), width, height);
ErrorHandler.CheckGlError();
Gl.glEnable(Gl.GL_SCISSOR_TEST);
ErrorHandler.CheckGlError();
}
public void DisableScissor()
{
Gl.glDisable(Gl.GL_SCISSOR_TEST);
ErrorHandler.CheckGlError();
}
public void SetLineWidth(float width)
{
Gl.glLineWidth(width);
ErrorHandler.CheckGlError();
}
public void Present() { Sdl.SDL_GL_SwapBuffers(); }
public void PumpInput(IInputHandler inputHandler) { input.PumpInput(inputHandler); }
public IVertexBuffer<Vertex> CreateVertexBuffer(int size) { return new VertexBuffer<Vertex>(size); }
public ITexture CreateTexture() { return new Texture(); }
public ITexture CreateTexture(Bitmap bitmap) { return new Texture(bitmap); }
public IFrameBuffer CreateFrameBuffer(Size s) { return new FrameBuffer(s); }
public abstract IShader CreateShader(string name);
}
}

View File

@@ -1,304 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System.Collections.Generic;
using Tao.Sdl;
namespace OpenRA.Renderer.SdlCommon
{
public class SdlInput
{
static readonly Dictionary<int, Keycode> KeyRemap = new Dictionary<int, Keycode>
{
{ Sdl.SDLK_BACKSPACE, Keycode.BACKSPACE },
{ Sdl.SDLK_TAB, Keycode.TAB },
{ Sdl.SDLK_CLEAR, Keycode.CLEAR },
{ Sdl.SDLK_RETURN, Keycode.RETURN },
{ Sdl.SDLK_PAUSE, Keycode.PAUSE },
{ Sdl.SDLK_ESCAPE, Keycode.ESCAPE },
{ Sdl.SDLK_SPACE, Keycode.SPACE },
{ Sdl.SDLK_EXCLAIM, Keycode.EXCLAIM },
{ Sdl.SDLK_QUOTEDBL, Keycode.QUOTEDBL },
{ Sdl.SDLK_HASH, Keycode.HASH },
{ Sdl.SDLK_DOLLAR, Keycode.DOLLAR },
{ Sdl.SDLK_AMPERSAND, Keycode.AMPERSAND },
{ Sdl.SDLK_QUOTE, Keycode.QUOTE },
{ Sdl.SDLK_LEFTPAREN, Keycode.LEFTPAREN },
{ Sdl.SDLK_RIGHTPAREN, Keycode.RIGHTPAREN },
{ Sdl.SDLK_ASTERISK, Keycode.ASTERISK },
{ Sdl.SDLK_PLUS, Keycode.PLUS },
{ Sdl.SDLK_COMMA, Keycode.COMMA },
{ Sdl.SDLK_MINUS, Keycode.MINUS },
{ Sdl.SDLK_PERIOD, Keycode.PERIOD },
{ Sdl.SDLK_SLASH, Keycode.SLASH },
{ Sdl.SDLK_0, Keycode.NUMBER_0 },
{ Sdl.SDLK_1, Keycode.NUMBER_1 },
{ Sdl.SDLK_2, Keycode.NUMBER_2 },
{ Sdl.SDLK_3, Keycode.NUMBER_3 },
{ Sdl.SDLK_4, Keycode.NUMBER_4 },
{ Sdl.SDLK_5, Keycode.NUMBER_5 },
{ Sdl.SDLK_6, Keycode.NUMBER_6 },
{ Sdl.SDLK_7, Keycode.NUMBER_7 },
{ Sdl.SDLK_8, Keycode.NUMBER_8 },
{ Sdl.SDLK_9, Keycode.NUMBER_9 },
{ Sdl.SDLK_COLON, Keycode.COLON },
{ Sdl.SDLK_SEMICOLON, Keycode.SEMICOLON },
{ Sdl.SDLK_LESS, Keycode.LESS },
{ Sdl.SDLK_EQUALS, Keycode.EQUALS },
{ Sdl.SDLK_GREATER, Keycode.GREATER },
{ Sdl.SDLK_QUESTION, Keycode.QUESTION },
{ Sdl.SDLK_AT, Keycode.AT },
{ Sdl.SDLK_LEFTBRACKET, Keycode.LEFTBRACKET },
{ Sdl.SDLK_BACKSLASH, Keycode.BACKSLASH },
{ Sdl.SDLK_RIGHTBRACKET, Keycode.RIGHTBRACKET },
{ Sdl.SDLK_CARET, Keycode.CARET },
{ Sdl.SDLK_UNDERSCORE, Keycode.UNDERSCORE },
{ Sdl.SDLK_BACKQUOTE, Keycode.BACKQUOTE },
{ Sdl.SDLK_a, Keycode.A },
{ Sdl.SDLK_b, Keycode.B },
{ Sdl.SDLK_c, Keycode.C },
{ Sdl.SDLK_d, Keycode.D },
{ Sdl.SDLK_e, Keycode.E },
{ Sdl.SDLK_f, Keycode.F },
{ Sdl.SDLK_g, Keycode.G },
{ Sdl.SDLK_h, Keycode.H },
{ Sdl.SDLK_i, Keycode.I },
{ Sdl.SDLK_j, Keycode.J },
{ Sdl.SDLK_k, Keycode.K },
{ Sdl.SDLK_l, Keycode.L },
{ Sdl.SDLK_m, Keycode.M },
{ Sdl.SDLK_n, Keycode.N },
{ Sdl.SDLK_o, Keycode.O },
{ Sdl.SDLK_p, Keycode.P },
{ Sdl.SDLK_q, Keycode.Q },
{ Sdl.SDLK_r, Keycode.R },
{ Sdl.SDLK_s, Keycode.S },
{ Sdl.SDLK_t, Keycode.T },
{ Sdl.SDLK_u, Keycode.U },
{ Sdl.SDLK_v, Keycode.V },
{ Sdl.SDLK_w, Keycode.W },
{ Sdl.SDLK_x, Keycode.X },
{ Sdl.SDLK_y, Keycode.Y },
{ Sdl.SDLK_z, Keycode.Z },
{ Sdl.SDLK_DELETE, Keycode.DELETE },
{ Sdl.SDLK_KP0, Keycode.KP_0 },
{ Sdl.SDLK_KP1, Keycode.KP_1 },
{ Sdl.SDLK_KP2, Keycode.KP_2 },
{ Sdl.SDLK_KP3, Keycode.KP_3 },
{ Sdl.SDLK_KP4, Keycode.KP_4 },
{ Sdl.SDLK_KP5, Keycode.KP_5 },
{ Sdl.SDLK_KP6, Keycode.KP_6 },
{ Sdl.SDLK_KP7, Keycode.KP_7 },
{ Sdl.SDLK_KP8, Keycode.KP_8 },
{ Sdl.SDLK_KP9, Keycode.KP_9 },
{ Sdl.SDLK_KP_PERIOD, Keycode.KP_PERIOD },
{ Sdl.SDLK_KP_DIVIDE, Keycode.KP_DIVIDE },
{ Sdl.SDLK_KP_MULTIPLY, Keycode.KP_MULTIPLY },
{ Sdl.SDLK_KP_MINUS, Keycode.KP_MINUS },
{ Sdl.SDLK_KP_PLUS, Keycode.KP_PLUS },
{ Sdl.SDLK_KP_ENTER, Keycode.KP_ENTER },
{ Sdl.SDLK_KP_EQUALS, Keycode.KP_EQUALS },
{ Sdl.SDLK_UP, Keycode.UP },
{ Sdl.SDLK_DOWN, Keycode.DOWN },
{ Sdl.SDLK_RIGHT, Keycode.RIGHT },
{ Sdl.SDLK_LEFT, Keycode.LEFT },
{ Sdl.SDLK_INSERT, Keycode.INSERT },
{ Sdl.SDLK_HOME, Keycode.HOME },
{ Sdl.SDLK_END, Keycode.END },
{ Sdl.SDLK_PAGEUP, Keycode.PAGEUP },
{ Sdl.SDLK_PAGEDOWN, Keycode.PAGEDOWN },
{ Sdl.SDLK_F1, Keycode.F1 },
{ Sdl.SDLK_F2, Keycode.F2 },
{ Sdl.SDLK_F3, Keycode.F3 },
{ Sdl.SDLK_F4, Keycode.F4 },
{ Sdl.SDLK_F5, Keycode.F5 },
{ Sdl.SDLK_F6, Keycode.F6 },
{ Sdl.SDLK_F7, Keycode.F7 },
{ Sdl.SDLK_F8, Keycode.F8 },
{ Sdl.SDLK_F9, Keycode.F9 },
{ Sdl.SDLK_F10, Keycode.F10 },
{ Sdl.SDLK_F11, Keycode.F11 },
{ Sdl.SDLK_F12, Keycode.F12 },
{ Sdl.SDLK_F13, Keycode.F13 },
{ Sdl.SDLK_F14, Keycode.F14 },
{ Sdl.SDLK_F15, Keycode.F15 },
{ Sdl.SDLK_NUMLOCK, Keycode.NUMLOCKCLEAR },
{ Sdl.SDLK_CAPSLOCK, Keycode.CAPSLOCK },
{ Sdl.SDLK_SCROLLOCK, Keycode.SCROLLLOCK },
{ Sdl.SDLK_RSHIFT, Keycode.RSHIFT },
{ Sdl.SDLK_LSHIFT, Keycode.LSHIFT },
{ Sdl.SDLK_RCTRL, Keycode.RCTRL },
{ Sdl.SDLK_LCTRL, Keycode.LCTRL },
{ Sdl.SDLK_RALT, Keycode.RALT },
{ Sdl.SDLK_LALT, Keycode.LALT },
{ Sdl.SDLK_RMETA, Keycode.RGUI },
{ Sdl.SDLK_LMETA, Keycode.LGUI },
{ Sdl.SDLK_LSUPER, Keycode.LGUI },
{ Sdl.SDLK_RSUPER, Keycode.RGUI },
{ Sdl.SDLK_MODE, Keycode.MODE },
{ Sdl.SDLK_HELP, Keycode.HELP },
{ Sdl.SDLK_PRINT, Keycode.PRINTSCREEN },
{ Sdl.SDLK_SYSREQ, Keycode.SYSREQ },
{ Sdl.SDLK_MENU, Keycode.MENU },
{ Sdl.SDLK_POWER, Keycode.POWER },
{ Sdl.SDLK_UNDO, Keycode.UNDO },
};
MouseButton lastButtonBits = (MouseButton)0;
static bool IsValidInput(char c)
{
return char.IsLetter(c) || char.IsDigit(c) ||
char.IsSymbol(c) || char.IsSeparator(c) ||
char.IsPunctuation(c);
}
MouseButton MakeButton(byte b)
{
return b == Sdl.SDL_BUTTON_LEFT ? MouseButton.Left
: b == Sdl.SDL_BUTTON_RIGHT ? MouseButton.Right
: b == Sdl.SDL_BUTTON_MIDDLE ? MouseButton.Middle
: b == Sdl.SDL_BUTTON_WHEELDOWN ? MouseButton.WheelDown
: b == Sdl.SDL_BUTTON_WHEELUP ? MouseButton.WheelUp
: 0;
}
Modifiers MakeModifiers(int raw)
{
return ((raw & Sdl.KMOD_ALT) != 0 ? Modifiers.Alt : 0)
| ((raw & Sdl.KMOD_CTRL) != 0 ? Modifiers.Ctrl : 0)
| ((raw & Sdl.KMOD_META) != 0 ? Modifiers.Meta : 0)
| ((raw & Sdl.KMOD_SHIFT) != 0 ? Modifiers.Shift : 0);
}
public void PumpInput(IInputHandler inputHandler)
{
Game.HasInputFocus = 0 != (Sdl.SDL_GetAppState() & Sdl.SDL_APPINPUTFOCUS);
var mods = MakeModifiers(Sdl.SDL_GetModState());
inputHandler.ModifierKeys(mods);
MouseInput? pendingMotion = null;
Sdl.SDL_Event e;
while (Sdl.SDL_PollEvent(out e) != 0)
{
switch (e.type)
{
case Sdl.SDL_QUIT:
Game.Exit();
break;
case Sdl.SDL_MOUSEBUTTONDOWN:
{
if (pendingMotion != null)
{
inputHandler.OnMouseInput(pendingMotion.Value);
pendingMotion = null;
}
var button = MakeButton(e.button.button);
lastButtonBits |= button;
var pos = new int2(e.button.x, e.button.y);
inputHandler.OnMouseInput(new MouseInput(
MouseInputEvent.Down, button, pos, mods,
MultiTapDetection.DetectFromMouse(e.button.button, pos)));
break;
}
case Sdl.SDL_MOUSEBUTTONUP:
{
if (pendingMotion != null)
{
inputHandler.OnMouseInput(pendingMotion.Value);
pendingMotion = null;
}
var button = MakeButton(e.button.button);
lastButtonBits &= ~button;
var pos = new int2(e.button.x, e.button.y);
inputHandler.OnMouseInput(new MouseInput(
MouseInputEvent.Up, button, pos, mods,
MultiTapDetection.InfoFromMouse(e.button.button)));
break;
}
case Sdl.SDL_MOUSEMOTION:
{
pendingMotion = new MouseInput(
MouseInputEvent.Move, lastButtonBits,
new int2(e.motion.x, e.motion.y), mods, 0);
break;
}
case Sdl.SDL_KEYDOWN:
case Sdl.SDL_KEYUP:
{
// Drop unknown keys
Keycode keyCode;
if (!KeyRemap.TryGetValue(e.key.keysym.sym, out keyCode))
{
// Try parsing it as text
var c = (char)e.key.keysym.unicode;
if (IsValidInput(c))
inputHandler.OnTextInput(c.ToString());
break;
}
var type = e.type == Sdl.SDL_KEYDOWN ?
KeyInputEvent.Down : KeyInputEvent.Up;
var tapCount = e.type == Sdl.SDL_KEYDOWN ?
MultiTapDetection.DetectFromKeyboard(keyCode) :
MultiTapDetection.InfoFromKeyboard(keyCode);
var keyEvent = new KeyInput
{
Event = type,
Key = keyCode,
Modifiers = mods,
UnicodeChar = (char)e.key.keysym.unicode,
MultiTapCount = tapCount
};
// Special case workaround for windows users
if (e.key.keysym.sym == Sdl.SDLK_F4 && mods.HasModifier(Modifiers.Alt) &&
Platform.CurrentPlatform == PlatformType.Windows)
{
Game.Exit();
}
else
inputHandler.OnKeyInput(keyEvent);
if (IsValidInput(keyEvent.UnicodeChar))
inputHandler.OnTextInput(keyEvent.UnicodeChar.ToString());
break;
}
}
}
if (pendingMotion != null)
{
inputHandler.OnMouseInput(pendingMotion.Value);
pendingMotion = null;
}
ErrorHandler.CheckGlError();
}
}
}

View File

@@ -1,344 +0,0 @@
<StyleCopSettings Version="105">
<Analyzers>
<Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules">
<Rules>
<Rule Name="ElementsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="EnumerationItemsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationMustContainValidXml">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustHaveSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementDocumentationMustHaveSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustHaveSummaryText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementDocumentationMustHaveSummaryText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustNotHaveDefaultSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParametersMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustMatchElementParameters">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustDeclareParameterName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementReturnValueMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementReturnValueDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="VoidReturnValueMustNotBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParametersMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParametersMustBeDocumentedPartialClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustMatchTypeParameters">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustDeclareParameterName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertySummaryDocumentationMustMatchAccessors">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertySummaryDocumentationMustOmitSetAccessorWithRestrictedAccess">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustNotBeCopiedAndPasted">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SingleLineCommentsMustNotUseDocumentationStyleSlashes">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationTextMustNotBeEmpty">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationTextMustContainWhitespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationMustMeetCharacterPercentage">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ConstructorSummaryDocumentationMustBeginWithStandardText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DestructorSummaryDocumentationMustBeginWithStandardText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationHeadersMustNotContainBlankLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncludedDocumentationXPathDoesNotExist">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncludeNodeDoesNotContainValidFileAndPath">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="InheritDocMustBeUsedWithInheritingClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustBeSpelledCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMustHaveHeader">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustShowCopyright">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustHaveCopyrightText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustContainFileName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderFileNameDocumentationMustMatchFileName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustHaveValidCompanyText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderFileNameDocumentationMustMatchTypeName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.SpacingRules">
<Rules>
<Rule Name="TabsMustNotBeUsed">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.LayoutRules">
<Rules>
<Rule Name="CurlyBracketsForMultiLineStatementsMustNotShareLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="StatementMustNotBeOnSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementMustNotBeOnSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CurlyBracketsMustNotBeOmitted">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustBeSeparatedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.OrderingRules">
<Rules>
<Rule Name="UsingDirectivesMustBePlacedWithinNamespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustAppearInTheCorrectOrder">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustBeOrderedByAccess">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.ReadabilityRules">
<Rules>
<Rule Name="CodeMustNotContainMultipleStatementsOnOneLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UseStringEmptyForEmptyStrings">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PrefixLocalCallsWithThis">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PrefixCallsCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParametersMustBeOnSameLineOrSeparateLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParameterMustFollowComma">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SplitParametersMustStartOnLineAfterDeclaration">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.MaintainabilityRules">
<Rules>
<Rule Name="AccessModifierMustBeDeclared">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FieldsMustBePrivate">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMayOnlyContainASingleClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ArithmeticExpressionsMustDeclarePrecedence">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
</Analyzers>
</StyleCopSettings>

View File

@@ -7,8 +7,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.RA", "OpenRA.Mo
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.Cnc", "OpenRA.Mods.Cnc\OpenRA.Mods.Cnc.csproj", "{2881135D-4D62-493E-8F83-5EEE92CCC6BE}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.Cnc", "OpenRA.Mods.Cnc\OpenRA.Mods.Cnc.csproj", "{2881135D-4D62-493E-8F83-5EEE92CCC6BE}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Renderer.Cg", "OpenRA.Renderer.Cg\OpenRA.Renderer.Cg.csproj", "{67CF1A10-C5F6-48FA-B1A7-FE83BE4CE2CC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Editor", "OpenRA.Editor\OpenRA.Editor.csproj", "{00038B75-405B-44F5-8691-BD2546DBE224}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Editor", "OpenRA.Editor\OpenRA.Editor.csproj", "{00038B75-405B-44F5-8691-BD2546DBE224}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.TilesetBuilder", "OpenRA.TilesetBuilder\OpenRA.TilesetBuilder.csproj", "{1A8E50CC-EE32-4E57-8842-0C39C8EA7541}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.TilesetBuilder", "OpenRA.TilesetBuilder\OpenRA.TilesetBuilder.csproj", "{1A8E50CC-EE32-4E57-8842-0C39C8EA7541}"
@@ -19,10 +17,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Utility", "OpenRA.Ut
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Renderer.Null", "OpenRA.Renderer.Null\OpenRA.Renderer.Null.csproj", "{0C4AEC1A-E7D5-4114-8CCD-3EEC82872981}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Renderer.Null", "OpenRA.Renderer.Null\OpenRA.Renderer.Null.csproj", "{0C4AEC1A-E7D5-4114-8CCD-3EEC82872981}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Renderer.Gl", "OpenRA.Renderer.Gl\OpenRA.Renderer.Gl.csproj", "{E9C01A96-C3E2-4772-825B-A740AC513D31}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Renderer.SdlCommon", "OpenRA.Renderer.SdlCommon\OpenRA.Renderer.SdlCommon.csproj", "{52FD9F0B-B209-4ED7-8A32-AC8033363263}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.D2k", "OpenRA.Mods.D2k\OpenRA.Mods.D2k.csproj", "{C0B0465C-6BE2-409C-8770-3A9BF64C4344}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.D2k", "OpenRA.Mods.D2k\OpenRA.Mods.D2k.csproj", "{C0B0465C-6BE2-409C-8770-3A9BF64C4344}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.TS", "OpenRA.Mods.TS\OpenRA.Mods.TS.csproj", "{5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.TS", "OpenRA.Mods.TS\OpenRA.Mods.TS.csproj", "{5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}"
@@ -64,37 +58,6 @@ Global
Release|Mixed Platforms = Release|Mixed Platforms Release|Mixed Platforms = Release|Mixed Platforms
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Debug|Any CPU.ActiveCfg = Debug|x86
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Debug|Any CPU.Build.0 = Debug|x86
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Debug|Mixed Platforms.Build.0 = Debug|x86
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release|Any CPU.ActiveCfg = Release|x86
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release|Mixed Platforms.ActiveCfg = Release|x86
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release|Mixed Platforms.Build.0 = Release|x86
{4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Release|Any CPU.Build.0 = Release|Any CPU
{4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Release|Any CPU.Build.0 = Release|Any CPU
{2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{67CF1A10-C5F6-48FA-B1A7-FE83BE4CE2CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{67CF1A10-C5F6-48FA-B1A7-FE83BE4CE2CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{67CF1A10-C5F6-48FA-B1A7-FE83BE4CE2CC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{67CF1A10-C5F6-48FA-B1A7-FE83BE4CE2CC}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{67CF1A10-C5F6-48FA-B1A7-FE83BE4CE2CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{67CF1A10-C5F6-48FA-B1A7-FE83BE4CE2CC}.Release|Any CPU.Build.0 = Release|Any CPU
{67CF1A10-C5F6-48FA-B1A7-FE83BE4CE2CC}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{67CF1A10-C5F6-48FA-B1A7-FE83BE4CE2CC}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{00038B75-405B-44F5-8691-BD2546DBE224}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {00038B75-405B-44F5-8691-BD2546DBE224}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{00038B75-405B-44F5-8691-BD2546DBE224}.Debug|Any CPU.Build.0 = Debug|Any CPU {00038B75-405B-44F5-8691-BD2546DBE224}.Debug|Any CPU.Build.0 = Debug|Any CPU
{00038B75-405B-44F5-8691-BD2546DBE224}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {00038B75-405B-44F5-8691-BD2546DBE224}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@@ -103,30 +66,6 @@ Global
{00038B75-405B-44F5-8691-BD2546DBE224}.Release|Any CPU.Build.0 = Release|Any CPU {00038B75-405B-44F5-8691-BD2546DBE224}.Release|Any CPU.Build.0 = Release|Any CPU
{00038B75-405B-44F5-8691-BD2546DBE224}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {00038B75-405B-44F5-8691-BD2546DBE224}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{00038B75-405B-44F5-8691-BD2546DBE224}.Release|Mixed Platforms.Build.0 = Release|Any CPU {00038B75-405B-44F5-8691-BD2546DBE224}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{1A8E50CC-EE32-4E57-8842-0C39C8EA7541}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1A8E50CC-EE32-4E57-8842-0C39C8EA7541}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1A8E50CC-EE32-4E57-8842-0C39C8EA7541}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{1A8E50CC-EE32-4E57-8842-0C39C8EA7541}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{1A8E50CC-EE32-4E57-8842-0C39C8EA7541}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1A8E50CC-EE32-4E57-8842-0C39C8EA7541}.Release|Any CPU.Build.0 = Release|Any CPU
{1A8E50CC-EE32-4E57-8842-0C39C8EA7541}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{1A8E50CC-EE32-4E57-8842-0C39C8EA7541}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{F9FA4D9F-2302-470A-8A07-6E37F488C124}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F9FA4D9F-2302-470A-8A07-6E37F488C124}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F9FA4D9F-2302-470A-8A07-6E37F488C124}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{F9FA4D9F-2302-470A-8A07-6E37F488C124}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{F9FA4D9F-2302-470A-8A07-6E37F488C124}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F9FA4D9F-2302-470A-8A07-6E37F488C124}.Release|Any CPU.Build.0 = Release|Any CPU
{F9FA4D9F-2302-470A-8A07-6E37F488C124}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{F9FA4D9F-2302-470A-8A07-6E37F488C124}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{F33337BE-CB69-4B24-850F-07D23E408DDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F33337BE-CB69-4B24-850F-07D23E408DDF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F33337BE-CB69-4B24-850F-07D23E408DDF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{F33337BE-CB69-4B24-850F-07D23E408DDF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{F33337BE-CB69-4B24-850F-07D23E408DDF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F33337BE-CB69-4B24-850F-07D23E408DDF}.Release|Any CPU.Build.0 = Release|Any CPU
{F33337BE-CB69-4B24-850F-07D23E408DDF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{F33337BE-CB69-4B24-850F-07D23E408DDF}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{0C4AEC1A-E7D5-4114-8CCD-3EEC82872981}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0C4AEC1A-E7D5-4114-8CCD-3EEC82872981}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0C4AEC1A-E7D5-4114-8CCD-3EEC82872981}.Debug|Any CPU.Build.0 = Debug|Any CPU {0C4AEC1A-E7D5-4114-8CCD-3EEC82872981}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0C4AEC1A-E7D5-4114-8CCD-3EEC82872981}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {0C4AEC1A-E7D5-4114-8CCD-3EEC82872981}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@@ -135,54 +74,29 @@ Global
{0C4AEC1A-E7D5-4114-8CCD-3EEC82872981}.Release|Any CPU.Build.0 = Release|Any CPU {0C4AEC1A-E7D5-4114-8CCD-3EEC82872981}.Release|Any CPU.Build.0 = Release|Any CPU
{0C4AEC1A-E7D5-4114-8CCD-3EEC82872981}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {0C4AEC1A-E7D5-4114-8CCD-3EEC82872981}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{0C4AEC1A-E7D5-4114-8CCD-3EEC82872981}.Release|Mixed Platforms.Build.0 = Release|Any CPU {0C4AEC1A-E7D5-4114-8CCD-3EEC82872981}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{E9C01A96-C3E2-4772-825B-A740AC513D31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Debug|Any CPU.ActiveCfg = Debug|x86
{E9C01A96-C3E2-4772-825B-A740AC513D31}.Debug|Any CPU.Build.0 = Debug|Any CPU {0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Debug|Any CPU.Build.0 = Debug|x86
{E9C01A96-C3E2-4772-825B-A740AC513D31}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{E9C01A96-C3E2-4772-825B-A740AC513D31}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Debug|Mixed Platforms.Build.0 = Debug|x86
{E9C01A96-C3E2-4772-825B-A740AC513D31}.Release|Any CPU.ActiveCfg = Release|Any CPU {0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release|Any CPU.ActiveCfg = Release|x86
{E9C01A96-C3E2-4772-825B-A740AC513D31}.Release|Any CPU.Build.0 = Release|Any CPU {0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release|Mixed Platforms.ActiveCfg = Release|x86
{E9C01A96-C3E2-4772-825B-A740AC513D31}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release|Mixed Platforms.Build.0 = Release|x86
{E9C01A96-C3E2-4772-825B-A740AC513D31}.Release|Mixed Platforms.Build.0 = Release|Any CPU {1A8E50CC-EE32-4E57-8842-0C39C8EA7541}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{52FD9F0B-B209-4ED7-8A32-AC8033363263}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1A8E50CC-EE32-4E57-8842-0C39C8EA7541}.Debug|Any CPU.Build.0 = Debug|Any CPU
{52FD9F0B-B209-4ED7-8A32-AC8033363263}.Debug|Any CPU.Build.0 = Debug|Any CPU {1A8E50CC-EE32-4E57-8842-0C39C8EA7541}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{52FD9F0B-B209-4ED7-8A32-AC8033363263}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {1A8E50CC-EE32-4E57-8842-0C39C8EA7541}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{52FD9F0B-B209-4ED7-8A32-AC8033363263}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {1A8E50CC-EE32-4E57-8842-0C39C8EA7541}.Release|Any CPU.ActiveCfg = Release|Any CPU
{52FD9F0B-B209-4ED7-8A32-AC8033363263}.Release|Any CPU.ActiveCfg = Release|Any CPU {1A8E50CC-EE32-4E57-8842-0C39C8EA7541}.Release|Any CPU.Build.0 = Release|Any CPU
{52FD9F0B-B209-4ED7-8A32-AC8033363263}.Release|Any CPU.Build.0 = Release|Any CPU {1A8E50CC-EE32-4E57-8842-0C39C8EA7541}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{52FD9F0B-B209-4ED7-8A32-AC8033363263}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {1A8E50CC-EE32-4E57-8842-0C39C8EA7541}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{52FD9F0B-B209-4ED7-8A32-AC8033363263}.Release|Mixed Platforms.Build.0 = Release|Any CPU {2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Debug|Any CPU.Build.0 = Debug|Any CPU {2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Release|Any CPU.ActiveCfg = Release|Any CPU {2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Release|Any CPU.Build.0 = Release|Any CPU
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Release|Any CPU.Build.0 = Release|Any CPU {2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}.Release|Any CPU.Build.0 = Release|Any CPU
{5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{021DDD6A-A608-424C-9A9A-252D8A9989E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{021DDD6A-A608-424C-9A9A-252D8A9989E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{021DDD6A-A608-424C-9A9A-252D8A9989E0}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{021DDD6A-A608-424C-9A9A-252D8A9989E0}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{021DDD6A-A608-424C-9A9A-252D8A9989E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{021DDD6A-A608-424C-9A9A-252D8A9989E0}.Release|Any CPU.Build.0 = Release|Any CPU
{021DDD6A-A608-424C-9A9A-252D8A9989E0}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{021DDD6A-A608-424C-9A9A-252D8A9989E0}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{85B48234-8B31-4BE6-AF9C-665CC6866841}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{85B48234-8B31-4BE6-AF9C-665CC6866841}.Debug|Any CPU.Build.0 = Debug|Any CPU
{85B48234-8B31-4BE6-AF9C-665CC6866841}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{85B48234-8B31-4BE6-AF9C-665CC6866841}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{85B48234-8B31-4BE6-AF9C-665CC6866841}.Release|Any CPU.ActiveCfg = Release|Any CPU
{85B48234-8B31-4BE6-AF9C-665CC6866841}.Release|Any CPU.Build.0 = Release|Any CPU
{85B48234-8B31-4BE6-AF9C-665CC6866841}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{85B48234-8B31-4BE6-AF9C-665CC6866841}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{33D03738-C154-4028-8EA8-63A3C488A651}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {33D03738-C154-4028-8EA8-63A3C488A651}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{33D03738-C154-4028-8EA8-63A3C488A651}.Debug|Any CPU.Build.0 = Debug|Any CPU {33D03738-C154-4028-8EA8-63A3C488A651}.Debug|Any CPU.Build.0 = Debug|Any CPU
{33D03738-C154-4028-8EA8-63A3C488A651}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {33D03738-C154-4028-8EA8-63A3C488A651}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@@ -191,6 +105,64 @@ Global
{33D03738-C154-4028-8EA8-63A3C488A651}.Release|Any CPU.Build.0 = Release|Any CPU {33D03738-C154-4028-8EA8-63A3C488A651}.Release|Any CPU.Build.0 = Release|Any CPU
{33D03738-C154-4028-8EA8-63A3C488A651}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {33D03738-C154-4028-8EA8-63A3C488A651}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{33D03738-C154-4028-8EA8-63A3C488A651}.Release|Mixed Platforms.Build.0 = Release|Any CPU {33D03738-C154-4028-8EA8-63A3C488A651}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Release|Any CPU.Build.0 = Release|Any CPU
{4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}.Release|Any CPU.Build.0 = Release|Any CPU
{5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{85B48234-8B31-4BE6-AF9C-665CC6866841}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{85B48234-8B31-4BE6-AF9C-665CC6866841}.Debug|Any CPU.Build.0 = Debug|Any CPU
{85B48234-8B31-4BE6-AF9C-665CC6866841}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{85B48234-8B31-4BE6-AF9C-665CC6866841}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{85B48234-8B31-4BE6-AF9C-665CC6866841}.Release|Any CPU.ActiveCfg = Release|Any CPU
{85B48234-8B31-4BE6-AF9C-665CC6866841}.Release|Any CPU.Build.0 = Release|Any CPU
{85B48234-8B31-4BE6-AF9C-665CC6866841}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{85B48234-8B31-4BE6-AF9C-665CC6866841}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Release|Any CPU.Build.0 = Release|Any CPU
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{F33337BE-CB69-4B24-850F-07D23E408DDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F33337BE-CB69-4B24-850F-07D23E408DDF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F33337BE-CB69-4B24-850F-07D23E408DDF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{F33337BE-CB69-4B24-850F-07D23E408DDF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{F33337BE-CB69-4B24-850F-07D23E408DDF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F33337BE-CB69-4B24-850F-07D23E408DDF}.Release|Any CPU.Build.0 = Release|Any CPU
{F33337BE-CB69-4B24-850F-07D23E408DDF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{F33337BE-CB69-4B24-850F-07D23E408DDF}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{F9FA4D9F-2302-470A-8A07-6E37F488C124}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F9FA4D9F-2302-470A-8A07-6E37F488C124}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F9FA4D9F-2302-470A-8A07-6E37F488C124}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{F9FA4D9F-2302-470A-8A07-6E37F488C124}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{F9FA4D9F-2302-470A-8A07-6E37F488C124}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F9FA4D9F-2302-470A-8A07-6E37F488C124}.Release|Any CPU.Build.0 = Release|Any CPU
{F9FA4D9F-2302-470A-8A07-6E37F488C124}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{F9FA4D9F-2302-470A-8A07-6E37F488C124}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{021DDD6A-A608-424C-9A9A-252D8A9989E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{021DDD6A-A608-424C-9A9A-252D8A9989E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{021DDD6A-A608-424C-9A9A-252D8A9989E0}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{021DDD6A-A608-424C-9A9A-252D8A9989E0}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{021DDD6A-A608-424C-9A9A-252D8A9989E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{021DDD6A-A608-424C-9A9A-252D8A9989E0}.Release|Any CPU.Build.0 = Release|Any CPU
{021DDD6A-A608-424C-9A9A-252D8A9989E0}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{021DDD6A-A608-424C-9A9A-252D8A9989E0}.Release|Mixed Platforms.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
EndGlobalSection EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = OpenRA.Game\OpenRA.Game.csproj StartupItem = OpenRA.Game\OpenRA.Game.csproj

View File

@@ -1,50 +0,0 @@
// OpenRA world lines shader
// Author: C. Forbes
//--------------------------------------------------------
float2 Scroll;
float2 r1, r2; // matrix elements
struct VertexIn {
float4 Position: POSITION;
float4 Color: TEXCOORD0;
};
struct VertexOut {
float4 Position: POSITION;
float4 Color: COLOR0;
};
VertexOut Simple_vp(VertexIn v) {
VertexOut o;
float2 p = (v.Position.xy - Scroll.xy) * r1 + r2;
o.Position = float4(p.x,p.y,0,1);
o.Color = v.Color;
return o;
}
float4 Simple_fp(VertexOut f) : COLOR0 {
return f.Color;
}
technique high_quality {
pass p0 {
DepthTestEnable = false;
//CullMode = None;
//FillMode = Wireframe;
VertexProgram = compile latest Simple_vp();
FragmentProgram = compile latest Simple_fp();
BlendEquation = FuncAdd;
BlendFunc = int2( SrcAlpha, OneMinusSrcAlpha );
}
}
technique high_quality_cg21 {
pass p0 {
DepthTestEnable = false;
VertexProgram = compile arbvp1 Simple_vp();
FragmentProgram = compile arbfp1 Simple_fp();
}
}

View File

@@ -1,56 +0,0 @@
// OpenRA ui shader for non-SHP sprites (mostly just chrome)
// Author: C. Forbes
//--------------------------------------------------------
float2 Scroll;
float2 r1, r2; // matrix elements
sampler2D DiffuseTexture = sampler_state {
MinFilter = Nearest;
MagFilter = Nearest;
};
struct VertexIn {
float4 Position: POSITION;
float4 Tex0: TEXCOORD0;
};
struct VertexOut {
float4 Position: POSITION;
float2 Tex0: TEXCOORD0;
};
struct FragmentIn {
float2 Tex0: TEXCOORD0;
};
VertexOut Simple_vp(VertexIn v) {
VertexOut o;
float2 p = (v.Position.xy - Scroll.xy) * r1 + r2;
o.Position = float4(p.x,p.y,0,1);
o.Tex0 = v.Tex0.xy;
return o;
}
float4 Simple_fp(FragmentIn f) : COLOR0 {
float4 r = tex2D(DiffuseTexture, f.Tex0);
return r;
}
technique high_quality {
pass p0 {
DepthTestEnable = false;
CullFaceEnable = false;
VertexProgram = compile latest Simple_vp();
FragmentProgram = compile latest Simple_fp();
}
}
technique high_quality_cg21 {
pass p0 {
DepthTestEnable = false;
CullFaceEnable = false;
VertexProgram = compile arbvp1 Simple_vp();
FragmentProgram = compile arbfp1 Simple_fp();
}
}

View File

@@ -1,72 +0,0 @@
// OpenRA test shader
// Author: C. Forbes
//--------------------------------------------------------
float2 Scroll;
float2 r1, r2; // matrix elements
sampler2D DiffuseTexture = sampler_state {
MinFilter = Nearest;
MagFilter = Nearest;
WrapS = Repeat;
WrapT = Repeat;
};
sampler2D Palette = sampler_state {
MinFilter = Nearest;
MagFilter = Nearest;
WrapS = Repeat;
WrapT = Repeat;
};
struct VertexIn {
float4 Position: POSITION;
float4 Tex0: TEXCOORD0;
};
struct VertexOut {
float4 Position: POSITION;
float3 Tex0: TEXCOORD0;
float4 ChannelMask: TEXCOORD1;
};
float4 DecodeChannelMask( float x )
{
if (x > 0)
return (x > 0.5f) ? float4(1,0,0,0) : float4(0,1,0,0);
else
return (x <-0.5f) ? float4(0,0,0,1) : float4(0,0,1,0);
}
VertexOut Simple_vp(VertexIn v) {
VertexOut o;
float2 p = (v.Position.xy - Scroll.xy) * r1 + r2;
o.Position = float4(p.x,p.y,0,1);
o.Tex0 = float3(v.Tex0.x, v.Tex0.y, v.Tex0.z);
o.ChannelMask = DecodeChannelMask( v.Tex0.w );
return o;
}
float4 Palette_fp(VertexOut f) : COLOR0 {
float4 x = tex2D(DiffuseTexture, f.Tex0.xy);
float2 p = float2( dot(x, f.ChannelMask), f.Tex0.z );
return tex2D(Palette, p);
}
technique low_quality {
pass p0 {
DepthTestEnable = false;
CullFaceEnable = false;
VertexProgram = compile latest Simple_vp();
FragmentProgram = compile latest Palette_fp();
}
}
technique low_quality_cg21 {
pass p0 {
DepthTestEnable = false;
CullFaceEnable = false;
VertexProgram = compile arbvp1 Simple_vp();
FragmentProgram = compile arbfp1 Palette_fp();
}
}

View File

@@ -1,78 +0,0 @@
mat4x4 View;
mat4x4 TransformMatrix;
float2 PaletteRows;
float4 LightDirection;
float3 AmbientLight, DiffuseLight;
sampler2D DiffuseTexture = sampler_state {
MinFilter = Nearest;
MagFilter = Nearest;
WrapS = Repeat;
WrapT = Repeat;
};
sampler2D Palette = sampler_state {
MinFilter = Nearest;
MagFilter = Nearest;
WrapS = Repeat;
WrapT = Repeat;
};
struct VertexIn {
float4 Position: POSITION;
float4 Tex0: TEXCOORD0;
};
struct VertexOut {
float4 Position: POSITION;
float2 Tex0: TEXCOORD0;
float4 ColorChannel: TEXCOORD1;
float4 NormalsChannel: TEXCOORD2;
};
float4 DecodeChannelMask(float x)
{
if (x > 0)
return (x > 0.5f) ? float4(1,0,0,0) : float4(0,1,0,0);
else
return (x <-0.5f) ? float4(0,0,0,1) : float4(0,0,1,0);
}
VertexOut Simple_vp(VertexIn v) {
VertexOut o;
o.Position = mul(mul(v.Position, TransformMatrix), View);
o.Tex0 = v.Tex0.xy;
o.ColorChannel = DecodeChannelMask(v.Tex0.z);
o.NormalsChannel = DecodeChannelMask(v.Tex0.w);
return o;
}
float4 Simple_fp(VertexOut f) : COLOR0 {
float4 x = tex2D(DiffuseTexture, f.Tex0.xy);
vec4 color = tex2D(Palette, float2(dot(x, f.ColorChannel), PaletteRows.x));
if (color.a < 0.01)
discard;
float4 normal = (2.0*tex2D(Palette, vec2(dot(x, f.NormalsChannel), PaletteRows.y)) - 1.0);
float3 intensity = AmbientLight + DiffuseLight*max(dot(normal, LightDirection), 0.0);
return float4(intensity*color.rgb, color.a);
}
technique high_quality {
pass p0 {
DepthTestEnable = true;
CullFaceEnable = false;
VertexProgram = compile latest Simple_vp();
FragmentProgram = compile latest Simple_fp();
}
}
technique high_quality_cg21 {
pass p0 {
DepthTestEnable = true;
CullFaceEnable = false;
VertexProgram = compile arbvp1 Simple_vp();
FragmentProgram = compile arbfp1 Simple_fp();
}
}

View File

@@ -20,17 +20,6 @@ cp -rv $2/* $3/* "OpenRA.app/Contents/Resources/" || exit 3
rm OpenRA.app/Contents/Resources/OpenRA.ico rm OpenRA.app/Contents/Resources/OpenRA.ico
rm OpenRA.app/Contents/Resources/OpenRA.Editor.exe rm OpenRA.app/Contents/Resources/OpenRA.Editor.exe
# SDL2 is the only supported renderer
rm -rf OpenRA.app/Contents/Resources/cg
rm OpenRA.app/Contents/Resources/OpenRA.Renderer.Cg.dll
rm OpenRA.app/Contents/Resources/Tao.Sdl.*
rm OpenRA.app/Contents/Resources/Tao.Cg.*
# Change the .config to use the packaged SDL
sed "s/\/Library\/Frameworks\/SDL2.framework/./" OpenRA.app/Contents/Resources/SDL2-CS.dll.config > temp
mv temp OpenRA.app/Contents/Resources/SDL2-CS.dll.config
rm temp
# Package app bundle into a zip and clean up # Package app bundle into a zip and clean up
zip OpenRA-$1 -r -9 OpenRA.app zip OpenRA-$1 -r -9 OpenRA.app
mv OpenRA-$1.zip $4 mv OpenRA-$1.zip $4

View File

@@ -29,9 +29,9 @@ markdown DOCUMENTATION.md > DOCUMENTATION.html
# List of files that are packaged on all platforms # List of files that are packaged on all platforms
FILES=('OpenRA.Game.exe' 'OpenRA.Editor.exe' 'OpenRA.Utility.exe' \ FILES=('OpenRA.Game.exe' 'OpenRA.Editor.exe' 'OpenRA.Utility.exe' \
'OpenRA.Renderer.SdlCommon.dll' 'OpenRA.Renderer.Sdl2.dll' 'OpenRA.Renderer.Cg.dll' 'OpenRA.Renderer.Gl.dll' 'OpenRA.Renderer.Null.dll' 'OpenRA.Irc.dll' \ 'OpenRA.Renderer.Sdl2.dll' 'OpenRA.Renderer.Null.dll' 'OpenRA.Irc.dll' \
'FreeSans.ttf' 'FreeSansBold.ttf' 'lua' \ 'FreeSans.ttf' 'FreeSansBold.ttf' 'lua' \
'cg' 'glsl' 'mods/common' 'mods/ra' 'mods/cnc' 'mods/d2k' 'mods/modchooser' \ 'glsl' 'mods/common' 'mods/ra' 'mods/cnc' 'mods/d2k' 'mods/modchooser' \
'AUTHORS' 'COPYING' \ 'AUTHORS' 'COPYING' \
'README.html' 'CONTRIBUTING.html' 'DOCUMENTATION.html' 'CHANGELOG.html' \ 'README.html' 'CONTRIBUTING.html' 'DOCUMENTATION.html' 'CHANGELOG.html' \
'global mix database.dat' 'GeoLite2-Country.mmdb') 'global mix database.dat' 'GeoLite2-Country.mmdb')

View File

@@ -67,8 +67,6 @@ Section "Game" GAME
File "${SRCDIR}\OpenRA.Game.exe" File "${SRCDIR}\OpenRA.Game.exe"
File "${SRCDIR}\OpenRA.Utility.exe" File "${SRCDIR}\OpenRA.Utility.exe"
File "${SRCDIR}\OpenRA.Renderer.Null.dll" File "${SRCDIR}\OpenRA.Renderer.Null.dll"
File "${SRCDIR}\OpenRA.Renderer.SdlCommon.dll"
File "${SRCDIR}\OpenRA.Renderer.Gl.dll"
File "${SRCDIR}\OpenRA.Renderer.Sdl2.dll" File "${SRCDIR}\OpenRA.Renderer.Sdl2.dll"
File "${SRCDIR}\OpenRA.Irc.dll" File "${SRCDIR}\OpenRA.Irc.dll"
File "${SRCDIR}\ICSharpCode.SharpZipLib.dll" File "${SRCDIR}\ICSharpCode.SharpZipLib.dll"
@@ -190,8 +188,6 @@ Function ${UN}Clean
Delete $INSTDIR\OpenRA.Utility.exe Delete $INSTDIR\OpenRA.Utility.exe
Delete $INSTDIR\OpenRA.Editor.exe Delete $INSTDIR\OpenRA.Editor.exe
Delete $INSTDIR\OpenRA.Renderer.Null.dll Delete $INSTDIR\OpenRA.Renderer.Null.dll
Delete $INSTDIR\OpenRA.Renderer.SdlCommon.dll
Delete $INSTDIR\OpenRA.Renderer.Gl.dll
Delete $INSTDIR\OpenRA.Renderer.Sdl2.dll Delete $INSTDIR\OpenRA.Renderer.Sdl2.dll
Delete $INSTDIR\OpenRA.Irc.dll Delete $INSTDIR\OpenRA.Irc.dll
Delete $INSTDIR\ICSharpCode.SharpZipLib.dll Delete $INSTDIR\ICSharpCode.SharpZipLib.dll

Binary file not shown.

View File

@@ -1,12 +0,0 @@
<configuration>
<dllmap dll="cg.dll">
<dllentry os="linux" dll="libCg.so" />
<dllentry os="windows" dll="cg.dll" />
<dllentry os="osx" dll="/Library/Frameworks/Cg.framework/Cg" />
</dllmap>
<dllmap dll="cgGL.dll">
<dllentry os="linux" dll="libCgGL.so" />
<dllentry os="windows" dll="cgGL.dll" />
<dllentry os="osx" dll="/Library/Frameworks/Cg.framework/Cg" />
</dllmap>
</configuration>

Binary file not shown.

View File

@@ -1,37 +0,0 @@
<configuration>
<dllmap dll="SDL.dll">
<dllentry os="linux" dll="libSDL-1.2.so.0"/>
<dllentry os="windows" dll="SDL.dll"/>
<dllentry os="osx" dll="/Library/Frameworks/SDL.framework/SDL" />
</dllmap>
<dllmap dll="SDL_image.dll">
<dllentry os="linux" dll="libSDL_image-1.2.so.0" />
<dllentry os="windows" dll="SDL_image.dll"/>
<dllentry os="osx" dll="/Library/Frameworks/SDL_image.framework/SDL_image" />
</dllmap>
<dllmap dll="SDL_mixer.dll">
<dllentry os="linux" dll="libSDL_mixer-1.2.so.0" />
<dllentry os="windows" dll="SDL_mixer.dll"/>
<dllentry os="osx" dll="/Library/Frameworks/SDL_mixer.framework/SDL_mixer" />
</dllmap>
<dllmap dll="SDL_ttf.dll">
<dllentry os="linux" dll="libSDL_ttf-2.0.so.0" />
<dllentry os="windows" dll="SDL_ttf.dll"/>
<dllentry os="osx" dll="/Library/Frameworks/SDL_ttf.framework/SDL_ttf" />
</dllmap>
<dllmap dll="SDL_net.dll">
<dllentry os="linux" dll="libSDL_net-1.2.so.0" />
<dllentry os="windows" dll="SDL_net.dll"/>
<dllentry os="osx" dll="/Library/Frameworks/SDL_net.framework/SDL_net" />
</dllmap>
<dllmap dll="smpeg.dll">
<dllentry os="linux" dll="libsmpeg-0.4.so.0" />
<dllentry os="windows" dll="smpeg.dll"/>
<dllentry os="osx" dll="/Library/Frameworks/smpeg.framework/smpeg" />
</dllmap>
<dllmap dll="SDL_gfx.dll">
<dllentry os="linux" dll="libSDL_gfx.so.4" />
<dllentry os="windows" dll="SDL_gfx.dll"/>
<dllentry os="osx" dll="/Library/Frameworks/SDL_gfx.framework/SDL_gfx" />
</dllmap>
</configuration>