Windows-specific fixes 3

MS PLOX
This commit is contained in:
juanjp600
2017-12-25 18:35:21 -03:00
parent 44d096d20c
commit 5374c0f9a6
3 changed files with 43 additions and 67 deletions
@@ -230,49 +230,32 @@
<Compile Include="Source\Utils\TextureLoader.cs" /> <Compile Include="Source\Utils\TextureLoader.cs" />
<Compile Include="Source\Utils\ToolBox.cs" /> <Compile Include="Source\Utils\ToolBox.cs" />
</ItemGroup> </ItemGroup>
<Choose> <ItemGroup>
<When Condition=" '$(Configuration)'=='ReleaseWindows' Or '$(Configuration)'=='DebugWindows' "> <Reference Condition="$(DefineConstants.Contains('WINDOWS'))" Include="MonoGame.Framework.WindowsDX">
<ItemGroup> <HintPath>..\..\Libraries\NuGet\MonoGame.Framework.WindowsDX.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath>
<Reference Include="MonoGame.Framework.WindowsDX"> </Reference>
<HintPath>..\..\Libraries\NuGet\MonoGame.Framework.WindowsDX.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath> <Reference Condition="$(DefineConstants.Contains('WINDOWS'))" Include="SharpDX">
</Reference> <HintPath>..\..\Libraries\NuGet\SharpDX.4.0.1\lib\net45\SharpDX.dll</HintPath>
<Reference Include="SharpDX"> </Reference>
<HintPath>..\..\Libraries\NuGet\SharpDX.4.0.1\lib\net45\SharpDX.dll</HintPath> <Reference Condition="$(DefineConstants.Contains('WINDOWS'))" Include="NVorbis">
</Reference> <HintPath>..\..\Libraries\NuGet\NVorbis.0.8.5.0\lib\NVorbis.dll</HintPath>
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL"> </Reference>
<SpecificVersion>False</SpecificVersion> <Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\OpenTK.2.0.0\lib\net20\OpenTK.dll</HintPath> <SpecificVersion>False</SpecificVersion>
</Reference> <HintPath>..\..\Libraries\NuGet\OpenTK.2.0.0\lib\net20\OpenTK.dll</HintPath>
<Reference Include="System" /> </Reference>
<Reference Include="System.Drawing" /> <Reference Include="System" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Drawing" />
<Reference Include="System.XML" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.XML" />
<Reference Include="RestSharp"> <Reference Include="System.Xml.Linq" />
<HintPath>..\..\Libraries\NuGet\RestSharp.105.2.3\lib\net45\RestSharp.dll</HintPath> <Reference Include="RestSharp">
</Reference> <HintPath>..\..\Libraries\NuGet\RestSharp.105.2.3\lib\net45\RestSharp.dll</HintPath>
</ItemGroup> </Reference>
</When> <Reference Condition="$(DefineConstants.Contains('LINUX'))" Include="MonoGame.Framework.DesktopGL">
<When Condition=" '$(Configuration)'=='ReleaseLinux' Or '$(Configuration)'=='DebugLinux' "> <HintPath>..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath>
<ItemGroup> </Reference>
<Reference Include="MonoGame.Framework.DesktopGL"> </ItemGroup>
<HintPath>..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath>
</Reference>
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Libraries\NuGet\OpenTK.2.0.0\lib\net20\OpenTK.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.XML" />
<Reference Include="System.Xml.Linq" />
<Reference Include="RestSharp">
<HintPath>..\..\Libraries\NuGet\RestSharp.105.2.3\lib\net45\RestSharp.dll</HintPath>
</Reference>
</ItemGroup>
</When>
</Choose>
<ItemGroup> <ItemGroup>
<Content Include="freetype6.dll"> <Content Include="freetype6.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
@@ -7,7 +7,6 @@ using System.Xml.Linq;
using System.Windows; using System.Windows;
using System.Xml; using System.Xml;
using System.Text; using System.Text;
using System.Windows.Forms;
namespace Barotrauma namespace Barotrauma
{ {
@@ -16,10 +15,10 @@ namespace Barotrauma
class Emitter : ISerializableEntity class Emitter : ISerializableEntity
{ {
public float EmitTimer; public float EmitTimer;
[Editable(), Serialize("0.0,0.0", false)] [Editable(), Serialize("0.0,0.0", false)]
public Vector2 AngleRange { get; private set; } public Vector2 AngleRange { get; private set; }
[Editable(), Serialize("0.0,0.0", false)] [Editable(), Serialize("0.0,0.0", false)]
public Vector2 VelocityRange { get; private set; } public Vector2 VelocityRange { get; private set; }
@@ -77,7 +76,7 @@ namespace Barotrauma
cam = new Camera(); cam = new Camera();
guiRoot = new GUIFrame(Rectangle.Empty, null, null); guiRoot = new GUIFrame(Rectangle.Empty, null, null);
leftPanel = new GUIFrame(new Rectangle(0, 0, 150, GameMain.GraphicsHeight), "GUIFrameLeft", guiRoot); leftPanel = new GUIFrame(new Rectangle(0, 0, 150, GameMain.GraphicsHeight), "GUIFrameLeft", guiRoot);
leftPanel.Padding = new Vector4(10.0f, 20.0f, 10.0f, 20.0f); leftPanel.Padding = new Vector4(10.0f, 20.0f, 10.0f, 20.0f);
@@ -151,7 +150,7 @@ namespace Barotrauma
} }
private void SerializeAll() private void SerializeAll()
{ {
XDocument doc = XMLExtensions.TryLoadXml(GameMain.ParticleManager.ConfigFile); XDocument doc = XMLExtensions.TryLoadXml(GameMain.ParticleManager.ConfigFile);
if (doc == null || doc.Root == null) return; if (doc == null || doc.Root == null) return;
@@ -180,6 +179,7 @@ namespace Barotrauma
private void SerializeToClipboard(ParticlePrefab prefab) private void SerializeToClipboard(ParticlePrefab prefab)
{ {
#if WINDOWS
if (prefab == null) return; if (prefab == null) return;
XmlWriterSettings settings = new XmlWriterSettings(); XmlWriterSettings settings = new XmlWriterSettings();
@@ -198,6 +198,7 @@ namespace Barotrauma
} }
Clipboard.SetText(sb.ToString()); Clipboard.SetText(sb.ToString());
#endif
} }
public override void Update(double deltaTime) public override void Update(double deltaTime)
@@ -180,25 +180,17 @@
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<Choose> <ItemGroup>
<When Condition=" '$(Configuration)'=='ReleaseWindows' Or '$(Configuration)'=='DebugWindows' "> <Reference Condition="$(DefineConstants.Contains('WINDOWS'))" Include="MonoGame.Framework.WindowsDX">
<ItemGroup> <HintPath>..\NuGet\MonoGame.Framework.WindowsDX.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath>
<Reference Include="MonoGame.Framework.WindowsDX"> </Reference>
<HintPath>..\NuGet\MonoGame.Framework.WindowsDX.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath> <Reference Condition="$(DefineConstants.Contains('WINDOWS'))" Include="SharpDX">
</Reference> <HintPath>..\NuGet\SharpDX.4.0.1\lib\net45\SharpDX.dll</HintPath>
<Reference Include="SharpDX"> </Reference>
<HintPath>..\NuGet\SharpDX.4.0.1\lib\net45\SharpDX.dll</HintPath> <Reference Condition="$(DefineConstants.Contains('LINUX'))" Include="MonoGame.Framework.DesktopGL">
</Reference> <HintPath>..\NuGet\MonoGame.Framework.DesktopGL.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath>
</ItemGroup> </Reference>
</When> </ItemGroup>
<When Condition=" '$(Configuration)'=='ReleaseLinux' Or '$(Configuration)'=='DebugLinux' ">
<ItemGroup>
<Reference Include="MonoGame.Framework.DesktopGL">
<HintPath>..\NuGet\MonoGame.Framework.DesktopGL.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath>
</Reference>
</ItemGroup>
</When>
</Choose>
<ItemGroup /> <ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.