Tiled Fix (#349)

* Tiled fix.

* Remove bat file.
This commit is contained in:
Lucas Girouard-Stranks
2017-03-05 09:18:11 +10:00
committed by Dylan Wilson
parent df61d36661
commit 3a164d5385
160 changed files with 1093 additions and 713 deletions
Binary file not shown.
@@ -42,16 +42,8 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework, Version=3.5.1.1679, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NVorbis, Version=0.8.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\NVorbis.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\OpenTK.dll</HintPath>
<Reference Include="MonoGame.Framework, Version=3.6.0.1625, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
@@ -63,6 +55,7 @@
<ItemGroup>
<None Include="app.config" />
<None Include="Content\logo-square-128.png" />
<None Include="MonoGame.Framework.dll.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="SDL2.dll" os="osx" target="libSDL2-2.0.0.dylib"/>
<dllmap dll="soft_oal.dll" os="osx" target="libopenal.1.dylib" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86" target="./x86/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86" target="./x86/libopenal.so.1" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86-64" target="./x64/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86-64" target="./x64/libopenal.so.1" />
</configuration>
+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MonoGame.Framework.DesktopGL" version="3.5.1.1679" targetFramework="net45" />
<package id="MonoGame.Framework.DesktopGL" version="3.6.0.1625" targetFramework="net45" />
</packages>
@@ -51,6 +51,6 @@
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:montserrat-32_0.png
/build:montserrat-32_0.png
@@ -45,16 +45,8 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework, Version=3.5.1.1679, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NVorbis, Version=0.8.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\NVorbis.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\OpenTK.dll</HintPath>
<Reference Include="MonoGame.Framework, Version=3.6.0.1625, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
@@ -65,6 +57,8 @@
<None Include="Content\montserrat-32_0.png" />
<None Include="Content\logo-square-128-copy.png" />
<Content Include="Icon.ico" />
<None Include="MonoGame.Framework.dll.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<MonoGameContentReference Include="Content\Content.mgcb" />
@@ -81,7 +75,6 @@
</ItemGroup>
<ItemGroup>
<None Include="Content\montserrat-32.fnt" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.targets" />
+18 -27
View File
@@ -1,5 +1,4 @@
using System;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
@@ -25,13 +24,13 @@ namespace Demo.Batching
private readonly GraphicsDeviceManager _graphicsDeviceManager;
private Batcher2D _batcher;
private readonly StringBuilder _stringBuilder = new StringBuilder();
private SpriteBatch _spriteBatch;
private BitmapFont _bitmapFont;
private Texture2D _spriteTexture1;
private Texture2D _spriteTexture2;
private Vector2 _spriteOrigin;
private DefaultEffect2D _effect;
private Vector2 _spriteScale;
private DefaultEffect _effect;
private readonly Random _random = new Random();
private readonly FramesPerSecondCounter _fpsCounter = new FramesPerSecondCounter();
@@ -52,8 +51,8 @@ namespace Demo.Batching
{
// also disable v-sync so max frames can be measured otherwise draw frames would be capped to the screen's refresh rate
SynchronizeWithVerticalRetrace = false,
PreferredBackBufferWidth = 1024,
PreferredBackBufferHeight = 768
PreferredBackBufferWidth = 800,
PreferredBackBufferHeight = 600
};
}
@@ -61,7 +60,11 @@ namespace Demo.Batching
{
var graphicsDevice = GraphicsDevice;
_effect = new DefaultEffect2D(graphicsDevice);
_effect = new DefaultEffect(graphicsDevice)
{
TextureEnabled = true,
VertexColorEnabled = true
};
_batcher = new Batcher2D(graphicsDevice);
_spriteBatch = new SpriteBatch(graphicsDevice);
_bitmapFont = Content.Load<BitmapFont>("montserrat-32");
@@ -70,6 +73,7 @@ namespace Demo.Batching
_spriteTexture1 = Content.Load<Texture2D>("logo-square-128");
_spriteTexture2 = Content.Load<Texture2D>("logo-square-128-copy");
_spriteOrigin = new Vector2(_spriteTexture1.Width * 0.5f, _spriteTexture1.Height * 0.5f);
_spriteScale = new Vector2(0.5f);
var viewport = GraphicsDevice.Viewport;
@@ -99,13 +103,13 @@ namespace Demo.Batching
var sprite = _sprites[index];
if (index % 2 == 0)
sprite.Rotation = (sprite.Rotation + MathHelper.ToRadians(1)) % MathHelper.TwoPi;
sprite.Rotation = (sprite.Rotation + MathHelper.ToRadians(0.5f)) % MathHelper.TwoPi;
else
sprite.Rotation = (sprite.Rotation - MathHelper.ToRadians(1) + MathHelper.TwoPi) % MathHelper.TwoPi;
sprite.Rotation = (sprite.Rotation - MathHelper.ToRadians(0.5f) + MathHelper.TwoPi) % MathHelper.TwoPi;
sprite.Color = ColorHelper.FromHsl(sprite.Rotation / MathHelper.TwoPi, 0.5f, 0.3f);
sprite.TransformMatrix = Matrix2D.CreateFrom(sprite.Position, sprite.Rotation, null, _spriteOrigin);
sprite.TransformMatrix = Matrix2D.CreateFrom(sprite.Position, sprite.Rotation, _spriteScale, _spriteOrigin);
_sprites[index] = sprite;
}
@@ -117,9 +121,11 @@ namespace Demo.Batching
protected override void Draw(GameTime gameTime)
{
Window.Title = _fpsCounter.FramesPerSecond.ToString();
var graphicsDevice = GraphicsDevice;
graphicsDevice.Clear(Color.Black);
graphicsDevice.Clear(Color.CornflowerBlue);
// update the matrices
_worldMatrix = Matrix.Identity;
@@ -131,21 +137,6 @@ namespace Demo.Batching
DrawSpritesWithBatcher2D();
//DrawSpritesWithSpriteBatch();
//_batcher.Begin(viewMatrix: _viewMatrix, projectionMatrix: _projectionMatrix);
//// use StringBuilder to prevent garbage
//_stringBuilder.Clear();
//_stringBuilder.Append("FPS: ");
//_stringBuilder.Append(_fpsCounter.FramesPerSecond); // but, this StringBulder method causes a small amount of garbage...
//_batcher.DrawString(_bitmapFont, _stringBuilder, Vector2.Zero);
//_stringBuilder.Clear();
//_stringBuilder.Append("Draw Calls: ");
//_stringBuilder.Append(GraphicsDevice.Metrics.DrawCount);
//_batcher.DrawString(_bitmapFont, _stringBuilder, new Vector2(0, _bitmapFont.LineHeight));
//_batcher.End();
base.Draw(gameTime);
_fpsCounter.Draw(gameTime);
@@ -153,7 +144,7 @@ namespace Demo.Batching
private void DrawSpritesWithBatcher2D()
{
_batcher.Begin(viewMatrix: _viewMatrix, projectionMatrix: _projectionMatrix);
_batcher.Begin(_viewMatrix, _projectionMatrix, effect: _effect);
// ReSharper disable once ForCanBeConvertedToForeach
for (var index = 0; index < _sprites.Length; index++)
@@ -175,7 +166,7 @@ namespace Demo.Batching
for (var index = 0; index < _sprites.Length; index++)
{
var sprite = _sprites[index];
_spriteBatch.Draw(sprite.Texture, sprite.Position, rotation: sprite.Rotation, origin: _spriteOrigin, color: sprite.Color);
_spriteBatch.Draw(sprite.Texture, sprite.Position, null, sprite.Color, sprite.Rotation, _spriteOrigin, _spriteScale, SpriteEffects.None, 0);
}
_spriteBatch.End();
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="SDL2.dll" os="osx" target="libSDL2-2.0.0.dylib"/>
<dllmap dll="soft_oal.dll" os="osx" target="libopenal.1.dylib" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86" target="./x86/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86" target="./x86/libopenal.so.1" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86-64" target="./x64/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86-64" target="./x64/libopenal.so.1" />
</configuration>
+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MonoGame.Framework.DesktopGL" version="3.5.1.1679" targetFramework="net45" />
<package id="MonoGame.Framework.DesktopGL" version="3.6.0.1625" targetFramework="net45" />
</packages>
@@ -41,16 +41,8 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework, Version=3.5.1.1679, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NVorbis, Version=0.8.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\NVorbis.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\OpenTK.dll</HintPath>
<Reference Include="MonoGame.Framework, Version=3.6.0.1625, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
@@ -65,9 +57,9 @@
<None Include="Content\impact-32.fnt" />
<None Include="Content\logo-square-512.png" />
<None Include="Content\montserrat-32_0.png" />
<None Include="Content\test.spritefont" />
<None Include="Content\vignette.png" />
<None Include="Content\montserrat-32.fnt" />
<None Include="MonoGame.Framework.dll.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
@@ -82,6 +74,10 @@
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\MonoGame.Extended.Graphics\MonoGame.Extended.Graphics.csproj">
<Project>{9B3AB8A1-78AA-471A-AFD0-B10B932115BC}</Project>
<Name>MonoGame.Extended.Graphics</Name>
</ProjectReference>
<ProjectReference Include="..\..\MonoGame.Extended\MonoGame.Extended.csproj">
<Project>{41724c52-3d50-45bb-81eb-3c8a247eafd1}</Project>
<Name>MonoGame.Extended</Name>
+1
View File
@@ -3,6 +3,7 @@ using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using MonoGame.Extended;
using MonoGame.Extended.BitmapFonts;
using MonoGame.Extended.Graphics.Effects;
using MonoGame.Extended.Shapes;
using MonoGame.Extended.ViewportAdapters;
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="SDL2.dll" os="osx" target="libSDL2-2.0.0.dylib"/>
<dllmap dll="soft_oal.dll" os="osx" target="libopenal.1.dylib" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86" target="./x86/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86" target="./x86/libopenal.so.1" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86-64" target="./x64/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86-64" target="./x64/libopenal.so.1" />
</configuration>
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MonoGame.Framework.DesktopGL" version="3.5.1.1679" targetFramework="net45" />
<package id="MonoGame.Framework.DesktopGL" version="3.6.0.1625" targetFramework="net45" />
</packages>
+3 -10
View File
@@ -42,16 +42,8 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework, Version=3.5.1.1679, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NVorbis, Version=0.8.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\NVorbis.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\OpenTK.dll</HintPath>
<Reference Include="MonoGame.Framework, Version=3.6.0.1625, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
@@ -72,6 +64,7 @@
<None Include="Content\logo-square-128.png" />
<None Include="Content\montserrat-32_0.png" />
<None Include="Content\montserrat-32.fnt" />
<None Include="MonoGame.Framework.dll.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="SDL2.dll" os="osx" target="libSDL2-2.0.0.dylib"/>
<dllmap dll="soft_oal.dll" os="osx" target="libopenal.1.dylib" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86" target="./x86/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86" target="./x86/libopenal.so.1" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86-64" target="./x64/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86-64" target="./x64/libopenal.so.1" />
</configuration>
+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MonoGame.Framework.DesktopGL" version="3.5.1.1679" targetFramework="net45" />
<package id="MonoGame.Framework.DesktopGL" version="3.6.0.1625" targetFramework="net45" />
</packages>
@@ -42,16 +42,8 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework, Version=3.5.1.1679, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NVorbis, Version=0.8.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\NVorbis.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\OpenTK.dll</HintPath>
<Reference Include="MonoGame.Framework, Version=3.6.0.1625, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
@@ -64,6 +56,7 @@
<ItemGroup>
<None Include="app.config" />
<None Include="Content\logo-square-128.png" />
<None Include="MonoGame.Framework.dll.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="SDL2.dll" os="osx" target="libSDL2-2.0.0.dylib"/>
<dllmap dll="soft_oal.dll" os="osx" target="libopenal.1.dylib" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86" target="./x86/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86" target="./x86/libopenal.so.1" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86-64" target="./x64/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86-64" target="./x64/libopenal.so.1" />
</configuration>
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MonoGame.Framework.DesktopGL" version="3.5.1.1679" targetFramework="net45" />
<package id="MonoGame.Framework.DesktopGL" version="3.6.0.1625" targetFramework="net45" />
</packages>
+3 -10
View File
@@ -42,22 +42,14 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework, Version=3.5.1.1679, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\MonoGame.Framework.dll</HintPath>
<Reference Include="MonoGame.Framework, Version=3.6.0.1625, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NVorbis, Version=0.8.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\NVorbis.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\OpenTK.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Xml" />
</ItemGroup>
@@ -93,6 +85,7 @@
<Content Include="Content\title-screen.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="MonoGame.Framework.dll.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="SDL2.dll" os="osx" target="libSDL2-2.0.0.dylib"/>
<dllmap dll="soft_oal.dll" os="osx" target="libopenal.1.dylib" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86" target="./x86/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86" target="./x86/libopenal.so.1" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86-64" target="./x64/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86-64" target="./x64/libopenal.so.1" />
</configuration>
+1 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MonoGame.Framework.DesktopGL" version="3.5.1.1679" targetFramework="net45" />
<package id="MonoGame.Framework.DesktopGL" version="3.6.0.1625" targetFramework="net45" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
</packages>
@@ -42,16 +42,8 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework, Version=3.5.1.1679, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NVorbis, Version=0.8.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\NVorbis.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\OpenTK.dll</HintPath>
<Reference Include="MonoGame.Framework, Version=3.6.0.1625, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
@@ -66,6 +58,7 @@
<None Include="Content\montserrat-32_0.png" />
<None Include="Content\vignette.png" />
<None Include="Content\montserrat-32.fnt" />
<None Include="MonoGame.Framework.dll.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="SDL2.dll" os="osx" target="libSDL2-2.0.0.dylib"/>
<dllmap dll="soft_oal.dll" os="osx" target="libopenal.1.dylib" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86" target="./x86/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86" target="./x86/libopenal.so.1" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86-64" target="./x64/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86-64" target="./x64/libopenal.so.1" />
</configuration>
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MonoGame.Framework.DesktopGL" version="3.5.1.1679" targetFramework="net45" />
<package id="MonoGame.Framework.DesktopGL" version="3.6.0.1625" targetFramework="net45" />
</packages>
@@ -42,16 +42,8 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework, Version=3.5.1.1679, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NVorbis, Version=0.8.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\NVorbis.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\OpenTK.dll</HintPath>
<Reference Include="MonoGame.Framework, Version=3.6.0.1625, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
@@ -66,6 +58,7 @@
<None Include="Content\DefaultFont.spritefont" />
<None Include="Content\logo-square-128.png" />
<None Include="Content\TitleFont.spritefont" />
<None Include="MonoGame.Framework.dll.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="SDL2.dll" os="osx" target="libSDL2-2.0.0.dylib"/>
<dllmap dll="soft_oal.dll" os="osx" target="libopenal.1.dylib" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86" target="./x86/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86" target="./x86/libopenal.so.1" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86-64" target="./x64/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86-64" target="./x64/libopenal.so.1" />
</configuration>
+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MonoGame.Framework.DesktopGL" version="3.5.1.1679" targetFramework="net45" />
<package id="MonoGame.Framework.DesktopGL" version="3.6.0.1625" targetFramework="net45" />
</packages>
@@ -42,16 +42,8 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework, Version=3.5.1.1679, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NVorbis, Version=0.8.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\NVorbis.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\OpenTK.dll</HintPath>
<Reference Include="MonoGame.Framework, Version=3.6.0.1625, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
@@ -63,6 +55,7 @@
<ItemGroup>
<None Include="app.config" />
<None Include="Content\logo-square-128.png" />
<None Include="MonoGame.Framework.dll.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="SDL2.dll" os="osx" target="libSDL2-2.0.0.dylib"/>
<dllmap dll="soft_oal.dll" os="osx" target="libopenal.1.dylib" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86" target="./x86/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86" target="./x86/libopenal.so.1" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86-64" target="./x64/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86-64" target="./x64/libopenal.so.1" />
</configuration>
+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MonoGame.Framework.DesktopGL" version="3.5.1.1679" targetFramework="net45" />
<package id="MonoGame.Framework.DesktopGL" version="3.6.0.1625" targetFramework="net45" />
</packages>
@@ -55,16 +55,8 @@
<Compile Include="Services\TiledObjectToEntityService.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework, Version=3.5.1.1679, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NVorbis, Version=0.8.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\NVorbis.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\OpenTK.dll</HintPath>
<Reference Include="MonoGame.Framework, Version=3.6.0.1625, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
@@ -80,6 +72,7 @@
<None Include="app.config" />
<None Include="Content\level-1.tmx" />
<None Include="Content\logo-square-128.png" />
<None Include="MonoGame.Framework.dll.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="SDL2.dll" os="osx" target="libSDL2-2.0.0.dylib"/>
<dllmap dll="soft_oal.dll" os="osx" target="libopenal.1.dylib" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86" target="./x86/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86" target="./x86/libopenal.so.1" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86-64" target="./x64/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86-64" target="./x64/libopenal.so.1" />
</configuration>
@@ -11,7 +11,7 @@ using MonoGame.Extended.Entities;
using MonoGame.Extended.Entities.Systems;
using MonoGame.Extended.Screens;
using MonoGame.Extended.Tiled;
using MonoGame.Extended.Tiled.Graphics;
using MonoGame.Extended.Graphics;
using MonoGame.Extended.ViewportAdapters;
namespace Demo.Platformer.Screens
+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MonoGame.Framework.DesktopGL" version="3.5.1.1679" targetFramework="net45" />
<package id="MonoGame.Framework.DesktopGL" version="3.6.0.1625" targetFramework="net45" />
</packages>
@@ -42,16 +42,8 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework, Version=3.5.1.1679, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NVorbis, Version=0.8.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\NVorbis.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\OpenTK.dll</HintPath>
<Reference Include="MonoGame.Framework, Version=3.6.0.1625, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
@@ -67,6 +59,7 @@
<None Include="Content\logo-square-512.png" />
<None Include="Content\montserrat-32_0.png" />
<None Include="Content\montserrat-32.fnt" />
<None Include="MonoGame.Framework.dll.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="SDL2.dll" os="osx" target="libSDL2-2.0.0.dylib"/>
<dllmap dll="soft_oal.dll" os="osx" target="libopenal.1.dylib" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86" target="./x86/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86" target="./x86/libopenal.so.1" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86-64" target="./x64/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86-64" target="./x64/libopenal.so.1" />
</configuration>
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MonoGame.Framework.DesktopGL" version="3.5.1.1679" targetFramework="net45" />
<package id="MonoGame.Framework.DesktopGL" version="3.6.0.1625" targetFramework="net45" />
</packages>
+3 -10
View File
@@ -51,16 +51,8 @@
<Compile Include="Screens\VideoOptionsScreen.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework, Version=3.5.1.1679, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NVorbis, Version=0.8.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\NVorbis.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\OpenTK.dll</HintPath>
<Reference Include="MonoGame.Framework, Version=3.6.0.1625, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
@@ -69,6 +61,7 @@
<ItemGroup>
<None Include="Content\montserrat-32_0.png" />
<Content Include="Icon.ico" />
<None Include="MonoGame.Framework.dll.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="SDL2.dll" os="osx" target="libSDL2-2.0.0.dylib"/>
<dllmap dll="soft_oal.dll" os="osx" target="libopenal.1.dylib" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86" target="./x86/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86" target="./x86/libopenal.so.1" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86-64" target="./x64/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86-64" target="./x64/libopenal.so.1" />
</configuration>
+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MonoGame.Framework.DesktopGL" version="3.5.1.1679" targetFramework="net45" />
<package id="MonoGame.Framework.DesktopGL" version="3.6.0.1625" targetFramework="net45" />
</packages>
@@ -50,16 +50,8 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework, Version=3.5.1.1679, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NVorbis, Version=0.8.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\NVorbis.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\OpenTK.dll</HintPath>
<Reference Include="MonoGame.Framework, Version=3.6.0.1625, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
@@ -68,6 +60,8 @@
<ItemGroup>
<None Include="Content\Fonts\montserrat-32_0.png" />
<Content Include="Icon.ico" />
<None Include="MonoGame.Framework.dll.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<None Include="Content\black.png" />
@@ -92,7 +86,6 @@
<None Include="Content\playerShip1_blue.png" />
<None Include="Content\regular-explosion.png" />
<None Include="Content\Screens\TitleScreen.xml" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<MonoGameContentReference Include="Content\Content.mgcb" />
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="SDL2.dll" os="osx" target="libSDL2-2.0.0.dylib"/>
<dllmap dll="soft_oal.dll" os="osx" target="libopenal.1.dylib" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86" target="./x86/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86" target="./x86/libopenal.so.1" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86-64" target="./x64/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86-64" target="./x64/libopenal.so.1" />
</configuration>
+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MonoGame.Framework.DesktopGL" version="3.5.1.1679" targetFramework="net45" />
<package id="MonoGame.Framework.DesktopGL" version="3.6.0.1625" targetFramework="net45" />
</packages>
@@ -43,16 +43,8 @@
<Compile Include="Zombie.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework, Version=3.5.1.1679, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NVorbis, Version=0.8.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\NVorbis.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\OpenTK.dll</HintPath>
<Reference Include="MonoGame.Framework, Version=3.6.0.1625, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
@@ -75,6 +67,7 @@
<None Include="Content\Backgrounds\hills.png" />
<None Include="Content\Sprites\zombie.png" />
<None Include="Content\Sprites\zombie-atlas.json" />
<None Include="MonoGame.Framework.dll.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
@@ -9,7 +9,7 @@ using MonoGame.Extended.Collisions;
using MonoGame.Extended.Sprites;
using MonoGame.Extended.TextureAtlases;
using MonoGame.Extended.Tiled;
using MonoGame.Extended.Tiled.Graphics;
using MonoGame.Extended.Graphics;
using MonoGame.Extended.ViewportAdapters;
namespace Demo.SpriteSheetAnimations
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="SDL2.dll" os="osx" target="libSDL2-2.0.0.dylib"/>
<dllmap dll="soft_oal.dll" os="osx" target="libopenal.1.dylib" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86" target="./x86/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86" target="./x86/libopenal.so.1" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86-64" target="./x64/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86-64" target="./x64/libopenal.so.1" />
</configuration>
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MonoGame.Framework.DesktopGL" version="3.5.1.1679" targetFramework="net45" />
<package id="MonoGame.Framework.DesktopGL" version="3.6.0.1625" targetFramework="net45" />
</packages>
+3 -10
View File
@@ -42,16 +42,8 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework, Version=3.5.1.1679, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NVorbis, Version=0.8.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\NVorbis.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\OpenTK.dll</HintPath>
<Reference Include="MonoGame.Framework, Version=3.6.0.1625, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
@@ -68,6 +60,7 @@
<None Include="Content\logo-square-128.png" />
<None Include="Content\particle.png" />
<None Include="Content\spike_ball.png" />
<None Include="MonoGame.Framework.dll.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="SDL2.dll" os="osx" target="libSDL2-2.0.0.dylib"/>
<dllmap dll="soft_oal.dll" os="osx" target="libopenal.1.dylib" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86" target="./x86/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86" target="./x86/libopenal.so.1" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86-64" target="./x64/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86-64" target="./x64/libopenal.so.1" />
</configuration>
+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MonoGame.Framework.DesktopGL" version="3.5.1.1679" targetFramework="net45" />
<package id="MonoGame.Framework.DesktopGL" version="3.6.0.1625" targetFramework="net45" />
</packages>
@@ -0,0 +1,24 @@
using Microsoft.Xna.Framework.Graphics;
using MonoGame.Extended.Graphics.Effects;
namespace Demo.TiledMaps
{
public class CustomEffect : DefaultEffect, ITiledMapEffect
{
public CustomEffect(GraphicsDevice graphicsDevice)
: base(graphicsDevice)
{
}
public CustomEffect(GraphicsDevice graphicsDevice, byte[] byteCode)
: base(graphicsDevice, byteCode)
{
}
public CustomEffect(Effect cloneSource)
: base(cloneSource)
{
}
}
}
@@ -37,21 +37,14 @@
<ApplicationIcon>Icon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Compile Include="CustomEffect.cs" />
<Compile Include="Game1.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework, Version=3.5.1.1679, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NVorbis, Version=0.8.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\NVorbis.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\OpenTK.dll</HintPath>
<Reference Include="MonoGame.Framework, Version=3.6.0.1625, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
@@ -83,6 +76,7 @@
<None Include="Content\monogame-extended-logo.png" />
<None Include="Content\montserrat-32_0.png" />
<None Include="Content\rpg_maker_vx_rtp_tileset_by_telles0808.png" />
<None Include="MonoGame.Framework.dll.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
+15 -5
View File
@@ -5,9 +5,10 @@ using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using MonoGame.Extended;
using MonoGame.Extended.BitmapFonts;
using MonoGame.Extended.Graphics;
using MonoGame.Extended.Graphics.Effects;
using MonoGame.Extended.Sprites;
using MonoGame.Extended.Tiled;
using MonoGame.Extended.Tiled.Graphics;
using MonoGame.Extended.ViewportAdapters;
namespace Demo.TiledMaps
@@ -27,6 +28,7 @@ namespace Demo.TiledMaps
private KeyboardState _previousKeyboardState = Keyboard.GetState();
private bool _showHelp;
private TiledMap _map;
private Effect _customEffect;
private Queue<string> _availableMaps;
@@ -34,13 +36,13 @@ namespace Demo.TiledMaps
{
_graphicsDeviceManager = new GraphicsDeviceManager(this)
{
SynchronizeWithVerticalRetrace = true,
SynchronizeWithVerticalRetrace = false,
PreferredBackBufferWidth = 1024,
PreferredBackBufferHeight = 768
};
Content.RootDirectory = "Content";
IsMouseVisible = true;
IsFixedTimeStep = true;
IsFixedTimeStep = false;
}
protected override void Initialize()
@@ -50,7 +52,6 @@ namespace Demo.TiledMaps
_mapRenderer = new TiledMapRenderer(GraphicsDevice);
Window.AllowUserResizing = true;
Window.Position = Point.Zero;
_fpsCounter = new FramesPerSecondCounter();
@@ -69,6 +70,15 @@ namespace Demo.TiledMaps
_map = LoadNextMap();
_camera.LookAt(new Vector2(_map.WidthInPixels, _map.HeightInPixels) * 0.5f);
var effect = new CustomEffect(GraphicsDevice)
{
Alpha = 0.5f,
TextureEnabled = true,
VertexColorEnabled = false
};
_customEffect = effect;
}
private TiledMap LoadNextMap()
@@ -178,7 +188,7 @@ namespace Demo.TiledMaps
var viewMatrix = _camera.GetViewMatrix();
var projectionMatrix = Matrix.CreateOrthographicOffCenter(0, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height, 0, 0f, -1f);
_mapRenderer.Draw(_map, ref viewMatrix, ref projectionMatrix);
_mapRenderer.Draw(_map, ref viewMatrix, ref projectionMatrix, _customEffect);
DrawText();
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="SDL2.dll" os="osx" target="libSDL2-2.0.0.dylib"/>
<dllmap dll="soft_oal.dll" os="osx" target="libopenal.1.dylib" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86" target="./x86/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86" target="./x86/libopenal.so.1" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86-64" target="./x64/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86-64" target="./x64/libopenal.so.1" />
</configuration>
+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MonoGame.Framework.DesktopGL" version="3.5.1.1679" targetFramework="net45" />
<package id="MonoGame.Framework.DesktopGL" version="3.6.0.1625" targetFramework="net45" />
</packages>
@@ -43,16 +43,8 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework, Version=3.5.1.1679, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NVorbis, Version=0.8.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\NVorbis.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\OpenTK.dll</HintPath>
<Reference Include="MonoGame.Framework, Version=3.6.0.1625, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MonoGame.Framework.DesktopGL.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
@@ -66,6 +58,7 @@
<None Include="Content\logo-square-128.png" />
<None Include="Content\vignette.png" />
<None Include="Content\montserrat-32.fnt" />
<None Include="MonoGame.Framework.dll.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="SDL2.dll" os="osx" target="libSDL2-2.0.0.dylib"/>
<dllmap dll="soft_oal.dll" os="osx" target="libopenal.1.dylib" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86" target="./x86/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86" target="./x86/libopenal.so.1" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86-64" target="./x64/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86-64" target="./x64/libopenal.so.1" />
</configuration>
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MonoGame.Framework.DesktopGL" version="3.5.1.1679" targetFramework="net45" />
<package id="MonoGame.Framework.DesktopGL" version="3.6.0.1625" targetFramework="net45" />
</packages>
@@ -45,11 +45,6 @@
<Compile Include="IActorTarget.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework">
<HintPath>..\..\Dependencies\MonoGame.Framework.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MonoGame.Extended.Tiled\MonoGame.Extended.Tiled.csproj">
<Project>{07B2ADE2-73E3-41C4-AEA1-D5566A5AB902}</Project>
@@ -60,6 +55,14 @@
<Name>MonoGame.Extended</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework, Version=3.6.0.1625, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MonoGame.Framework.Portable.3.6.0.1625\lib\portable-net45+win8+wpa81\MonoGame.Framework.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.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.
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MonoGame.Framework.Portable" version="3.6.0.1625" targetFramework="portable45-net45+win8+wpa81" />
</packages>
@@ -1,7 +1,8 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using MonoGame.Extended.Content.Pipeline.Tiled;
namespace MonoGame.Extended.Content.Pipeline.Tiled.Graphics
namespace MonoGame.Extended.Content.Pipeline.Graphics
{
public class TiledMapLayerAnimatedModelContent : TiledMapLayerModelContent
{
@@ -1,12 +1,13 @@
using System.IO;
using System.Diagnostics;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using MonoGame.Extended.Content.Pipeline.Tiled;
using MonoGame.Extended.Tiled;
namespace MonoGame.Extended.Content.Pipeline.Tiled.Graphics
namespace MonoGame.Extended.Content.Pipeline.Graphics
{
public class TiledMapLayerModelContent
{
@@ -116,14 +117,14 @@ namespace MonoGame.Extended.Content.Pipeline.Tiled.Graphics
_vertices.Add(vertexBottomLeft);
_vertices.Add(vertexBottomRight);
Debug.Assert(Vertices.Count <= TiledMapConstants.MaximumVerticesPerModel);
Debug.Assert(Vertices.Count <= TiledMapHelper.MaximumVerticesPerModel);
}
public void AddTileIndices()
{
var indexOffset = Vertices.Count;
Debug.Assert(3 + indexOffset <= TiledMapConstants.MaximumVerticesPerModel);
Debug.Assert(3 + indexOffset <= TiledMapHelper.MaximumVerticesPerModel);
_indices.Add((ushort)(0 + indexOffset));
_indices.Add((ushort)(1 + indexOffset));
@@ -132,7 +133,7 @@ namespace MonoGame.Extended.Content.Pipeline.Tiled.Graphics
_indices.Add((ushort)(3 + indexOffset));
_indices.Add((ushort)(2 + indexOffset));
Debug.Assert(Indices.Count <= TiledMapConstants.MaximumIndicesPerModel);
Debug.Assert(Indices.Count <= TiledMapHelper.MaximumIndicesPerModel);
}
}
}
@@ -7,7 +7,7 @@
<ProjectGuid>{96BE0F14-3DC8-43B9-992F-654BD36CC3C7}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MonoGame.Extended.Content.Pipeline.Tiled</RootNamespace>
<RootNamespace>MonoGame.Extended.Content.Pipeline</RootNamespace>
<AssemblyName>MonoGame.Extended.Content.Pipeline.Tiled</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
@@ -60,49 +60,54 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ContentWriterExtensions.cs" />
<Compile Include="..\MonoGame.Extended.Tiled\Tiled\TiledMapHelper.cs">
<Link>Tiled\TiledMapHelper.cs</Link>
</Compile>
<Compile Include="..\MonoGame.Extended.Tiled\Tiled\TiledMapLayerType.cs">
<Link>Tiled\TiledMapLayerType.cs</Link>
</Compile>
<Compile Include="..\MonoGame.Extended.Tiled\Tiled\TiledMapObjectType.cs">
<Link>Tiled\TiledMapObjectType.cs</Link>
</Compile>
<Compile Include="..\MonoGame.Extended.Tiled\Tiled\TiledMapTile.cs">
<Link>Tiled\TiledMapTile.cs</Link>
</Compile>
<Compile Include="..\MonoGame.Extended.Tiled\Tiled\TiledMapTileFlipFlags.cs">
<Link>Tiled\TiledMapTileFlipFlags.cs</Link>
</Compile>
<Compile Include="Tiled\ContentWriterExtensions.cs" />
<Compile Include="Graphics\TiledMapLayerAnimatedModelContent.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Graphics\TiledMapLayerModelContent.cs" />
<Compile Include="TiledMapConstants.cs" />
<Compile Include="TiledMapEllipseContent.cs" />
<Compile Include="TiledMapImageContent.cs" />
<Compile Include="TiledMapImageLayerContent.cs" />
<Compile Include="TiledMapLayerContent.cs" />
<Compile Include="TiledMapContent.cs" />
<Compile Include="TiledMapImporter.cs" />
<Compile Include="TiledMapObjectDrawOrderContent.cs" />
<Compile Include="TiledMapProcessor.cs" />
<Compile Include="TiledMapWriter.cs" />
<Compile Include="TiledMapObjectContent.cs" />
<Compile Include="TiledMapObjectLayerContent.cs" />
<Compile Include="TiledMapOrientationContent.cs" />
<Compile Include="TiledMapPolygonContent.cs" />
<Compile Include="TiledMapPolylineContent.cs" />
<Compile Include="TiledMapPropertyContent.cs" />
<Compile Include="TiledMapTileDrawOrderContent.cs" />
<Compile Include="TiledMapTerrainContent.cs" />
<Compile Include="TiledMapTileContent.cs" />
<Compile Include="TiledMapTileLayerContent.cs" />
<Compile Include="TiledMapTileLayerDataContent.cs" />
<Compile Include="TiledMapTileOffsetContent.cs" />
<Compile Include="TiledMapTilesetContent.cs" />
<Compile Include="TiledMapTilesetTileContent.cs" />
<Compile Include="TiledMapTilesetTileAnimationFrameContent.cs" />
<Compile Include="Tiled\TiledMapEllipseContent.cs" />
<Compile Include="Tiled\TiledMapImageContent.cs" />
<Compile Include="Tiled\TiledMapImageLayerContent.cs" />
<Compile Include="Tiled\TiledMapLayerContent.cs" />
<Compile Include="Tiled\TiledMapContent.cs" />
<Compile Include="Tiled\TiledMapImporter.cs" />
<Compile Include="Tiled\TiledMapObjectDrawOrderContent.cs" />
<Compile Include="Tiled\TiledMapProcessor.cs" />
<Compile Include="Tiled\TiledMapWriter.cs" />
<Compile Include="Tiled\TiledMapObjectContent.cs" />
<Compile Include="Tiled\TiledMapObjectLayerContent.cs" />
<Compile Include="Tiled\TiledMapOrientationContent.cs" />
<Compile Include="Tiled\TiledMapPolygonContent.cs" />
<Compile Include="Tiled\TiledMapPolylineContent.cs" />
<Compile Include="Tiled\TiledMapPropertyContent.cs" />
<Compile Include="Tiled\TiledMapTileDrawOrderContent.cs" />
<Compile Include="Tiled\TiledMapTerrainContent.cs" />
<Compile Include="Tiled\TiledMapTileLayerContent.cs" />
<Compile Include="Tiled\TiledMapTileLayerDataContent.cs" />
<Compile Include="Tiled\TiledMapTileOffsetContent.cs" />
<Compile Include="Tiled\TiledMapTilesetContent.cs" />
<Compile Include="Tiled\TiledMapTilesetTileContent.cs" />
<Compile Include="Tiled\TiledMapTilesetTileAnimationFrameContent.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MonoGame.Extended.Content.Pipeline\MonoGame.Extended.Content.Pipeline.csproj">
<Project>{28CD24BD-432C-4987-9E9D-65CFCF120EA0}</Project>
<Name>MonoGame.Extended.Content.Pipeline</Name>
</ProjectReference>
<ProjectReference Include="..\MonoGame.Extended.Graphics\MonoGame.Extended.Graphics.csproj">
<Project>{9B3AB8A1-78AA-471A-AFD0-B10B932115BC}</Project>
<Name>MonoGame.Extended.Graphics</Name>
</ProjectReference>
<ProjectReference Include="..\MonoGame.Extended.Tiled\MonoGame.Extended.Tiled.csproj">
<Project>{07b2ade2-73e3-41c4-aea1-d5566a5ab902}</Project>
<Name>MonoGame.Extended.Tiled</Name>
</ProjectReference>
<ProjectReference Include="..\MonoGame.Extended\MonoGame.Extended.csproj">
<Project>{41724C52-3D50-45BB-81EB-3C8A247EAFD1}</Project>
<Name>MonoGame.Extended</Name>
@@ -111,6 +116,9 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Connected Services\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\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.
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.Xml.Serialization;
using MonoGame.Extended.Content.Pipeline.Tiled.Graphics;
namespace MonoGame.Extended.Content.Pipeline.Tiled
{
@@ -1,6 +1,6 @@
using System.Collections.Generic;
using System.Xml.Serialization;
using MonoGame.Extended.Content.Pipeline.Tiled.Graphics;
using MonoGame.Extended.Content.Pipeline.Graphics;
using MonoGame.Extended.Tiled;
namespace MonoGame.Extended.Content.Pipeline.Tiled
@@ -5,7 +5,7 @@ using System.IO;
using System.IO.Compression;
using System.Linq;
using Microsoft.Xna.Framework.Content.Pipeline;
using MonoGame.Extended.Content.Pipeline.Tiled.Graphics;
using MonoGame.Extended.Content.Pipeline.Graphics;
using MonoGame.Extended.Tiled;
using MonoGame.Utilities;
using CompressionMode = System.IO.Compression.CompressionMode;
@@ -25,8 +25,6 @@ namespace MonoGame.Extended.Content.Pipeline.Tiled
throw new NullReferenceException();
Environment.CurrentDirectory = newWorkingDirectory;
var models = new List<TiledMapLayerModelContent>();
foreach (var layer in map.Layers)
{
var imageLayer = layer as TiledMapImageLayerContent;
@@ -122,56 +120,60 @@ namespace MonoGame.Extended.Content.Pipeline.Tiled
IReadOnlyList<TiledMapTileContent> tileLayerData, int mapWidth, int mapHeight)
{
for (var y = 0; y < mapHeight; y++)
for (var x = mapWidth - 1; x >= 0; x--)
{
var dataIndex = x + y * mapWidth;
if (tileLayerData[dataIndex].GlobalIdentifier == 0)
continue;
var tile = new TiledMapTile(tileLayerData[dataIndex].GlobalIdentifier, (ushort)x, (ushort)y);
yield return tile;
}
for (var x = mapWidth - 1; x >= 0; x--)
{
var dataIndex = x + y * mapWidth;
var globalIdentifier = tileLayerData[dataIndex].GlobalIdentifier;
if (globalIdentifier == 0)
continue;
var tile = new TiledMapTile(globalIdentifier, (ushort) x, (ushort) y);
yield return tile;
}
}
private static IEnumerable<TiledMapTile> CreateTilesInLeftUpOrder(
IReadOnlyList<TiledMapTileContent> tileLayerData, int mapWidth, int mapHeight)
{
for (var y = mapHeight - 1; y >= 0; y--)
for (var x = mapWidth - 1; x >= 0; x--)
{
var dataIndex = x + y * mapWidth;
if (tileLayerData[dataIndex].GlobalIdentifier == 0)
continue;
var tile = new TiledMapTile(tileLayerData[dataIndex].GlobalIdentifier, (ushort)x, (ushort)y);
yield return tile;
}
for (var x = mapWidth - 1; x >= 0; x--)
{
var dataIndex = x + y * mapWidth;
var globalIdentifier = tileLayerData[dataIndex].GlobalIdentifier;
if (globalIdentifier == 0)
continue;
var tile = new TiledMapTile(globalIdentifier, (ushort) x, (ushort) y);
yield return tile;
}
}
private static IEnumerable<TiledMapTile> CreateTilesInRightDownOrder(
IReadOnlyList<TiledMapTileContent> tileLayerData, int mapWidth, int mapHeight)
{
for (var y = 0; y < mapHeight; y++)
for (var x = 0; x < mapWidth; x++)
{
var dataIndex = x + y * mapWidth;
if (tileLayerData[dataIndex].GlobalIdentifier == 0)
continue;
var tile = new TiledMapTile(tileLayerData[dataIndex].GlobalIdentifier, (ushort)x, (ushort)y);
yield return tile;
}
for (var x = 0; x < mapWidth; x++)
{
var dataIndex = x + y * mapWidth;
var globalIdentifier = tileLayerData[dataIndex].GlobalIdentifier;
if (globalIdentifier == 0)
continue;
var tile = new TiledMapTile(globalIdentifier, (ushort) x, (ushort) y);
yield return tile;
}
}
private static IEnumerable<TiledMapTile> CreateTilesInRightUpOrder(
IReadOnlyList<TiledMapTileContent> tileLayerData, int mapWidth, int mapHeight)
{
for (var y = mapHeight - 1; y >= 0; y--)
for (var x = mapWidth - 1; x >= 0; x--)
{
var dataIndex = x + y * mapWidth;
if (tileLayerData[dataIndex].GlobalIdentifier == 0)
continue;
var tile = new TiledMapTile(tileLayerData[dataIndex].GlobalIdentifier, (ushort)x, (ushort)y);
yield return tile;
}
for (var x = mapWidth - 1; x >= 0; x--)
{
var dataIndex = x + y * mapWidth;
var globalIdentifier = tileLayerData[dataIndex].GlobalIdentifier;
if (globalIdentifier == 0)
continue;
var tile = new TiledMapTile(globalIdentifier, (ushort) x, (ushort) y);
yield return tile;
}
}
private static List<TiledMapTileContent> DecodeBase64Data(TiledMapTileLayerDataContent data, int width,
@@ -188,11 +190,14 @@ namespace MonoGame.Extended.Content.Pipeline.Tiled
data.Tiles = new List<TiledMapTileContent>();
for (var y = 0; y < width; y++)
for (var x = 0; x < height; x++)
for (var x = 0; x < height; x++)
{
var gid = reader.ReadUInt32();
tileList.Add(new TiledMapTileContent
{
var gid = reader.ReadUInt32();
tileList.Add(new TiledMapTileContent(gid));
}
GlobalIdentifier = gid
});
}
}
}
@@ -204,7 +209,7 @@ namespace MonoGame.Extended.Content.Pipeline.Tiled
return data.Value
.Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries)
.Select(uint.Parse)
.Select(gid => new TiledMapTileContent(gid))
.Select(x => new TiledMapTileContent {GlobalIdentifier = x})
.ToList();
}
@@ -242,7 +247,7 @@ namespace MonoGame.Extended.Content.Pipeline.Tiled
// regardless, each model is going to require one draw call to render at runtime
var modelsByTileset = new Dictionary<TiledMapTilesetContent, List<TiledMapLayerModelContent>>();
// loop through all the tiles in the proper render order, building the geometry for each tile
// by processing the tiles in the correct rendering order we ensure the geometry for the tiles will be rendered correctly later using the painter's algorithm
foreach (var tile in tiles)
@@ -259,7 +264,7 @@ namespace MonoGame.Extended.Content.Pipeline.Tiled
// check if this tile is animated
var tilesetTile = tileset.Tiles.FirstOrDefault(x => x.LocalIdentifier == localTileIdentifier);
var isAnimatedTile = (tilesetTile?.Frames != null) && (tilesetTile.Frames.Count > 0);
var isAnimatedTile = tilesetTile?.Frames != null && tilesetTile.Frames.Count > 0;
// check if we already have built a list of models for this tileset
TiledMapLayerModelContent model;
@@ -288,11 +293,10 @@ namespace MonoGame.Extended.Content.Pipeline.Tiled
: new TiledMapLayerModelContent(layerName, tileset);
models.Add(model);
modelsByTileset.Add(tileset, models);
}
// check if the current model is full
if (model.Vertices.Count + TiledMapConstants.VerticesPerTile > TiledMapConstants.MaximumVerticesPerModel)
if (model.Vertices.Count + TiledMapHelper.VerticesPerTile > TiledMapHelper.MaximumVerticesPerModel)
{
// if the current model is full, we need to start a new one
model = isAnimatedTile
@@ -304,7 +308,7 @@ namespace MonoGame.Extended.Content.Pipeline.Tiled
// if the tile is animated, record the index of animated tile for the tilset so we can get the correct texture coordinates at runtime
if (isAnimatedTile)
{
var animatedModel = (TiledMapLayerAnimatedModelContent)model;
var animatedModel = (TiledMapLayerAnimatedModelContent) model;
animatedModel.AddAnimatedTile(tilesetTile);
}
@@ -314,7 +318,8 @@ namespace MonoGame.Extended.Content.Pipeline.Tiled
// build the geometry for the tile
var position = GetTilePosition(map, tile);
var sourceRectangle = TiledMapHelper.GetTileSourceRectangle(localTileIdentifier, tileset.TileWidth, tileset.TileHeight, tileset.Columns, tileset.Margin, tileset.Spacing);
var sourceRectangle = TiledMapHelper.GetTileSourceRectangle(localTileIdentifier, tileset.TileWidth,
tileset.TileHeight, tileset.Columns, tileset.Margin, tileset.Spacing);
var flipFlags = tile.Flags;
model.AddTileIndices();
model.AddTileVertices(position, sourceRectangle, flipFlags);
@@ -3,6 +3,11 @@ using System.Xml.Serialization;
namespace MonoGame.Extended.Content.Pipeline.Tiled
{
public struct TiledMapTileContent
{
[XmlAttribute(AttributeName = "gid")] public uint GlobalIdentifier;
}
public class TiledMapTileLayerDataContent
{
[XmlAttribute(AttributeName = "encoding")]
@@ -1,7 +1,5 @@
using System.Collections.Generic;
using System.Xml.Serialization;
using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Content.Pipeline.Graphics;
namespace MonoGame.Extended.Content.Pipeline.Tiled
{
@@ -5,7 +5,7 @@ using System.IO;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;
using MonoGame.Extended.Content.Pipeline.Tiled.Graphics;
using MonoGame.Extended.Content.Pipeline.Graphics;
using MonoGame.Extended.Tiled;
namespace MonoGame.Extended.Content.Pipeline.Tiled
@@ -271,12 +271,12 @@ namespace MonoGame.Extended.Content.Pipeline.Tiled
public override string GetRuntimeType(TargetPlatform targetPlatform)
{
return typeof(TiledMap).AssemblyQualifiedName;
return "MonoGame.Extended.Tiled.TiledMap, MonoGame.Extended.Tiled";
}
public override string GetRuntimeReader(TargetPlatform targetPlatform)
{
return typeof(TiledMapReader).AssemblyQualifiedName;
return "MonoGame.Extended.Tiled.TiledMapReader, MonoGame.Extended.Tiled";
}
}
}
@@ -1,19 +0,0 @@
namespace MonoGame.Extended.Content.Pipeline.Tiled
{
public static class TiledMapConstants
{
// 4 vertices per tile
public const int VerticesPerTile = 4;
// 2 triangles per tile (mesh), with each triangle indexing 3 out of 4 vertices, so 6 vertices
public const int IndicesPerTile = 6;
// by using ushort type for indices we are limited to indexing vertices from 0 to 65535
// this limits us on how many vertices can fit inside a single vertex buffer (65536 vertices)
public const int MaximumVerticesPerModel = ushort.MaxValue + 1;
// and thus, we know how many tiles we can fit inside a vertex or index buffer (16384 tiles)
public const int MaximumTilesPerGeometryContent = MaximumVerticesPerModel / VerticesPerTile;
// and thus, we also know the maximum number of indices we can fit inside a single index buffer (98304 indices)
public const int MaximumIndicesPerModel = MaximumTilesPerGeometryContent * IndicesPerTile;
// these optimal maximum numbers of course are not considering texture bindings which would practically lower the actual number of tiles per vertex / index buffer
// thus, the reason why it is a good to have ONE giant tileset (at least per layer)
}
}
@@ -1,33 +0,0 @@
using System.Xml.Serialization;
using MonoGame.Extended.Graphics;
using MonoGame.Extended.Tiled;
namespace MonoGame.Extended.Content.Pipeline.Tiled
{
public struct TiledMapTileContent
{
[XmlAttribute(AttributeName = "gid")] public uint GlobalIdentifier;
private const uint _flippedHorizontallyFlag = 0x80000000;
private const uint _flippedVerticallyFlag = 0x40000000;
private const uint _flippedDiagonallyFlag = 0x20000000;
private const uint _allFlippedFlags = _flippedHorizontallyFlag | _flippedVerticallyFlag | _flippedDiagonallyFlag;
public int GlobalIdentifierWithoutFlags => (int)(GlobalIdentifier & ~_allFlippedFlags);
public bool IsFlippedHorizontally => (GlobalIdentifier & _flippedHorizontallyFlag) != 0;
public bool IsFlippedVertically => (GlobalIdentifier & _flippedVerticallyFlag) != 0;
public bool IsFlippedDiagonally => (GlobalIdentifier & _flippedDiagonallyFlag) != 0;
public bool IsBlank => GlobalIdentifier == 0;
public FlipFlags Flags => (FlipFlags)((GlobalIdentifier & _allFlippedFlags) >> 29);
internal TiledMapTileContent(uint globalTileIdentifierWithFlags)
{
GlobalIdentifier = globalTileIdentifierWithFlags;
}
public override string ToString()
{
return $"GlobalIdentifier: {GlobalIdentifierWithoutFlags}, Flags: {Flags}";
}
}
}
@@ -1,6 +1,5 @@
using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;
using MonoGame.Extended.Animations.SpriteSheets;
namespace MonoGame.Extended.Content.Pipeline.Animations
{
@@ -9,7 +8,7 @@ namespace MonoGame.Extended.Content.Pipeline.Animations
{
public override string GetRuntimeReader(TargetPlatform targetPlatform)
{
return typeof(SpriteSheetAnimationFactoryReader).AssemblyQualifiedName;
return "MonoGame.Extended.Animations.SpriteSheets.SpriteSheetAnimationFactoryReader, MonoGame.Extended";
}
protected override void Write(ContentWriter writer, AstridAnimatorProcessorResult input)
@@ -1,6 +1,5 @@
using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;
using MonoGame.Extended.BitmapFonts;
namespace MonoGame.Extended.Content.Pipeline.BitmapFonts
{
@@ -34,12 +33,12 @@ namespace MonoGame.Extended.Content.Pipeline.BitmapFonts
public override string GetRuntimeType(TargetPlatform targetPlatform)
{
return typeof(BitmapFont).AssemblyQualifiedName;
return "MonoGame.Extended.BitmapFonts.BitmapFont, MonoGame.Extended";
}
public override string GetRuntimeReader(TargetPlatform targetPlatform)
{
return typeof(BitmapFontReader).AssemblyQualifiedName;
return "MonoGame.Extended.BitmapFonts.BitmapFontReader, MonoGame.Extended";
}
}
}
@@ -87,12 +87,6 @@
<Compile Include="TextureAtlases\TexturePackerSize.cs" />
<Compile Include="TextureAtlases\TexturePackerWriter.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MonoGame.Extended\MonoGame.Extended.csproj">
<Project>{41724c52-3d50-45bb-81eb-3c8a247eafd1}</Project>
<Name>MonoGame.Extended</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
@@ -2,7 +2,6 @@
using System.IO;
using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;
using MonoGame.Extended.TextureAtlases;
namespace MonoGame.Extended.Content.Pipeline.TextureAtlases
{
@@ -35,12 +34,12 @@ namespace MonoGame.Extended.Content.Pipeline.TextureAtlases
public override string GetRuntimeType(TargetPlatform targetPlatform)
{
return typeof(TextureAtlas).AssemblyQualifiedName;
return "MonoGame.Extended.TextureAtlases.TextureAtlas, MonoGame.Extended";
}
public override string GetRuntimeReader(TargetPlatform targetPlatform)
{
return typeof(TextureAtlasReader).AssemblyQualifiedName;
return "MonoGame.Extended.TextureAtlases.TextureAtlasReader, MonoGame.Extended";
}
}
}
@@ -1,74 +0,0 @@
using Microsoft.Xna.Framework.Graphics;
namespace MonoGame.Extended.Graphics.Effects
{
/// <summary>
/// An <see cref="Effect" /> that allows 2D objects, within a 3D context, to be represented on a 2D monitor.
/// </summary>
/// <seealso cref="MatrixChainEffect" />
/// <seealso cref="ITexture2DEffect" />
public class DefaultEffect2D : MatrixChainEffect, ITexture2DEffect
{
private Texture2D _texture;
private bool _textureIsDirty;
private EffectParameter _textureParameter;
/// <summary>
/// Initializes a new instance of the <see cref="DefaultEffect2D" /> class.
/// </summary>
/// <param name="graphicsDevice">The graphics device.</param>
public DefaultEffect2D(GraphicsDevice graphicsDevice)
: base(graphicsDevice, EffectResource.DefaultEffect2D.Bytecode)
{
CacheEffectParameters();
}
/// <summary>
/// Initializes a new instance of the <see cref="DefaultEffect2D" /> class.
/// </summary>
/// <param name="cloneSource">The clone source.</param>
public DefaultEffect2D(Effect cloneSource)
: base(cloneSource)
{
CacheEffectParameters();
}
/// <summary>
/// Gets or sets the <see cref="Texture2D" />.
/// </summary>
/// <value>
/// The <see cref="Texture2D" />.
/// </value>
public Texture2D Texture
{
get { return _texture; }
set
{
_texture = value;
_textureIsDirty = true;
}
}
private void CacheEffectParameters()
{
_textureParameter = Parameters["Texture"];
}
/// <summary>
/// Computes derived parameter values immediately before applying the effect.
/// </summary>
protected override bool OnApply()
{
var result = base.OnApply();
// ReSharper disable once InvertIf
if (_textureIsDirty)
{
_textureParameter.SetValue(_texture);
_textureIsDirty = false;
}
return result;
}
}
}
@@ -1,50 +0,0 @@
float4x4 WorldViewProjection;
Texture2D Texture : register(t0);
sampler TextureSampler : register(s0)
{
Texture = (Texture);
};
struct VertexShaderInput
{
float4 Position : POSITION0;
float4 Color : COLOR0;
float2 TexureCoordinate : TEXCOORD0;
};
struct VertexShaderOutput
{
float4 Position : SV_Position;
float4 Color : COLOR0;
float2 TexureCoordinate : TEXCOORD0;
};
struct PixelShaderOutput
{
float4 Color : COLOR0;
};
VertexShaderOutput VertexShaderFunction(VertexShaderInput input)
{
VertexShaderOutput output;
output.Position = mul(input.Position, WorldViewProjection);
output.Color = input.Color;
output.TexureCoordinate = input.TexureCoordinate;
return output;
}
PixelShaderOutput PixelShaderFunction(VertexShaderOutput input)
{
PixelShaderOutput output;
output.Color = tex2D(TextureSampler, input.TexureCoordinate) * input.Color;
return output;
}
technique
{
pass
{
VertexShader = compile vs_2_0 VertexShaderFunction();
PixelShader = compile ps_2_0 PixelShaderFunction();
}
}
@@ -1,6 +0,0 @@
:: Can only use 2MGFX.exe on Windows...
SET PATH=%PATH%;C:\Program Files (x86)\MSBuild\MonoGame\v3.0\Tools
2MGFX.exe %cd%\DefaultEffect2D.fx %cd%\DefaultEffect2D.mgfxo
pause
@@ -24,6 +24,16 @@ namespace MonoGame.Extended.Graphics
private Matrix? _viewMatrix;
private Matrix? _projectionMatrix;
/// <summary>
/// The array of <see cref="TDrawCallInfo" /> structs currently enqueued.
/// </summary>
protected TDrawCallInfo[] DrawCalls;
/// <summary>
/// The number of <see cref="TDrawCallInfo" /> structs currently enqueued.
/// </summary>
protected int EnqueuedDrawCallCount;
/// <summary>
/// Gets the <see cref="GraphicsDevice" /> associated with this <see cref="Batcher{TDrawCallInfo}" />.
/// </summary>
@@ -41,16 +51,6 @@ namespace MonoGame.Extended.Graphics
/// </value>
public bool HasBegun { get; internal set; }
/// <summary>
/// Gets or sets the number of <see cref="TDrawCallInfo" /> structs currently enqueued.
/// </summary>
/// <value>
/// The number of <see cref="TDrawCallInfo" /> structs currently enqueued.
/// </value>
protected int EnqueuedDrawCallCount { get; set; }
protected TDrawCallInfo[] DrawCalls { get; }
/// <summary>
/// Initializes a new instance of the <see cref="Batcher{TDrawCallInfo}" /> class.
/// </summary>
@@ -285,6 +285,7 @@ namespace MonoGame.Extended.Graphics
var oldRasterizerState = GraphicsDevice.RasterizerState;
GraphicsDevice.BlendState = _blendState;
GraphicsDevice.SamplerStates[0] = _samplerState;
GraphicsDevice.DepthStencilState = _depthStencilState;
GraphicsDevice.RasterizerState = _rasterizerState;

Some files were not shown because too many files have changed in this diff Show More