Skip to content

Commit

Permalink
Support MonoGame 3.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
discosultan committed Aug 2, 2022
1 parent 5729589 commit 3a2d542
Show file tree
Hide file tree
Showing 32 changed files with 212 additions and 34 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Penumbra allows users to easily add 2D lighting with shadowing effects to their

The following is required to successfully compile the Penumbra MonoGame solution:

- Visual studio 2019+
- MonoGame 3.8+
- Visual studio 2022+
- MonoGame 3.8.1+
- [DirectX End-User Runtimes (June 2010)](http://www.microsoft.com/en-us/download/details.aspx?id=8109) (to compile effect shaders)

### Using Penumbra
Expand Down
36 changes: 36 additions & 0 deletions Samples/FarseerPhysics/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-mgcb": {
"version": "3.8.1.303",
"commands": [
"mgcb"
]
},
"dotnet-mgcb-editor": {
"version": "3.8.1.303",
"commands": [
"mgcb-editor"
]
},
"dotnet-mgcb-editor-linux": {
"version": "3.8.1.303",
"commands": [
"mgcb-editor-linux"
]
},
"dotnet-mgcb-editor-windows": {
"version": "3.8.1.303",
"commands": [
"mgcb-editor-windows"
]
},
"dotnet-mgcb-editor-mac": {
"version": "3.8.1.303",
"commands": [
"mgcb-editor-mac"
]
}
}
}
6 changes: 3 additions & 3 deletions Samples/FarseerPhysics/FarseerPhysics.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<DefineConstants>WINDOWS</DefineConstants>
<ApplicationIcon>Icon.ico</ApplicationIcon>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.0.1641" />
<PackageReference Include="MonoGame.Framework.WindowsDX" Version="3.8.0.1641" />
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.1.303" />
<PackageReference Include="MonoGame.Framework.WindowsDX" Version="3.8.1.303" />
</ItemGroup>

<ItemGroup>
Expand Down
36 changes: 36 additions & 0 deletions Samples/HelloPenumbra/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-mgcb": {
"version": "3.8.1.303",
"commands": [
"mgcb"
]
},
"dotnet-mgcb-editor": {
"version": "3.8.1.303",
"commands": [
"mgcb-editor"
]
},
"dotnet-mgcb-editor-linux": {
"version": "3.8.1.303",
"commands": [
"mgcb-editor-linux"
]
},
"dotnet-mgcb-editor-windows": {
"version": "3.8.1.303",
"commands": [
"mgcb-editor-windows"
]
},
"dotnet-mgcb-editor-mac": {
"version": "3.8.1.303",
"commands": [
"mgcb-editor-mac"
]
}
}
}
6 changes: 3 additions & 3 deletions Samples/HelloPenumbra/HelloPenumbra.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<DefineConstants>WINDOWS</DefineConstants>
<ApplicationIcon>Icon.ico</ApplicationIcon>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.0.1641" />
<PackageReference Include="MonoGame.Framework.WindowsDX" Version="3.8.0.1641" />
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.1.303" />
<PackageReference Include="MonoGame.Framework.WindowsDX" Version="3.8.1.303" />
</ItemGroup>

<ItemGroup>
Expand Down
36 changes: 36 additions & 0 deletions Samples/Platformer2D/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-mgcb": {
"version": "3.8.1.303",
"commands": [
"mgcb"
]
},
"dotnet-mgcb-editor": {
"version": "3.8.1.303",
"commands": [
"mgcb-editor"
]
},
"dotnet-mgcb-editor-linux": {
"version": "3.8.1.303",
"commands": [
"mgcb-editor-linux"
]
},
"dotnet-mgcb-editor-windows": {
"version": "3.8.1.303",
"commands": [
"mgcb-editor-windows"
]
},
"dotnet-mgcb-editor-mac": {
"version": "3.8.1.303",
"commands": [
"mgcb-editor-mac"
]
}
}
}
6 changes: 3 additions & 3 deletions Samples/Platformer2D/Platformer2D.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<DefineConstants>WINDOWS</DefineConstants>
<ApplicationIcon>Icon.ico</ApplicationIcon>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.0.1641" />
<PackageReference Include="MonoGame.Framework.WindowsDX" Version="3.8.0.1641" />
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.1.303" />
<PackageReference Include="MonoGame.Framework.WindowsDX" Version="3.8.1.303" />
</ItemGroup>

<ItemGroup>
Expand Down
36 changes: 36 additions & 0 deletions Samples/Sandbox/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-mgcb": {
"version": "3.8.1.303",
"commands": [
"mgcb"
]
},
"dotnet-mgcb-editor": {
"version": "3.8.1.303",
"commands": [
"mgcb-editor"
]
},
"dotnet-mgcb-editor-linux": {
"version": "3.8.1.303",
"commands": [
"mgcb-editor-linux"
]
},
"dotnet-mgcb-editor-windows": {
"version": "3.8.1.303",
"commands": [
"mgcb-editor-windows"
]
},
"dotnet-mgcb-editor-mac": {
"version": "3.8.1.303",
"commands": [
"mgcb-editor-mac"
]
}
}
}
6 changes: 3 additions & 3 deletions Samples/Sandbox/Sandbox.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<DefineConstants>WINDOWS</DefineConstants>
<ApplicationIcon>Icon.ico</ApplicationIcon>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.0.1641" />
<PackageReference Include="MonoGame.Framework.WindowsDX" Version="3.8.0.1641" />
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.1.303" />
<PackageReference Include="MonoGame.Framework.WindowsDX" Version="3.8.1.303" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Samples/Shared/Common/Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MonoGame.Framework.WindowsDX" Version="3.8.0.1641" />
<PackageReference Include="MonoGame.Framework.WindowsDX" Version="3.8.1.303" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<IsPackable>false</IsPackable>
<DefineConstants>WINDOWS;XNA</DefineConstants>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MonoGame.Framework.WindowsDX" Version="3.8.0.1641" />
<PackageReference Include="MonoGame.Framework.WindowsDX" Version="3.8.1.303" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<IsPackable>false</IsPackable>
<DefineConstants>WINDOWS;XNA</DefineConstants>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MonoGame.Framework.WindowsDX" Version="3.8.0.1641" />
<PackageReference Include="MonoGame.Framework.WindowsDX" Version="3.8.1.303" />
</ItemGroup>

</Project>
36 changes: 36 additions & 0 deletions Source/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-mgcb": {
"version": "3.8.1.303",
"commands": [
"mgcb"
]
},
"dotnet-mgcb-editor": {
"version": "3.8.1.303",
"commands": [
"mgcb-editor"
]
},
"dotnet-mgcb-editor-linux": {
"version": "3.8.1.303",
"commands": [
"mgcb-editor-linux"
]
},
"dotnet-mgcb-editor-windows": {
"version": "3.8.1.303",
"commands": [
"mgcb-editor-windows"
]
},
"dotnet-mgcb-editor-mac": {
"version": "3.8.1.303",
"commands": [
"mgcb-editor-mac"
]
}
}
}
Binary file modified Source/Content/bin/DesktopGL/Content.DesktopGL/PenumbraHull.xnb
Binary file not shown.
Binary file modified Source/Content/bin/DesktopGL/Content.DesktopGL/PenumbraLight.xnb
Binary file not shown.
Binary file modified Source/Content/bin/DesktopGL/Content.DesktopGL/PenumbraShadow.xnb
Binary file not shown.
Binary file modified Source/Content/bin/DesktopGL/Content.DesktopGL/PenumbraTexture.xnb
Binary file not shown.
Binary file modified Source/Content/bin/DesktopGL/Content.WindowsDX/PenumbraHull.xnb
Binary file not shown.
Binary file modified Source/Content/bin/DesktopGL/Content.WindowsDX/PenumbraLight.xnb
Binary file not shown.
Binary file modified Source/Content/bin/DesktopGL/Content.WindowsDX/PenumbraShadow.xnb
Binary file not shown.
Binary file modified Source/Content/bin/DesktopGL/Content.WindowsDX/PenumbraTexture.xnb
Binary file not shown.
Binary file modified Source/Content/bin/Windows/Content.DesktopGL/PenumbraHull.xnb
Binary file not shown.
Binary file modified Source/Content/bin/Windows/Content.DesktopGL/PenumbraLight.xnb
Binary file not shown.
Binary file modified Source/Content/bin/Windows/Content.DesktopGL/PenumbraShadow.xnb
Binary file not shown.
Binary file modified Source/Content/bin/Windows/Content.DesktopGL/PenumbraTexture.xnb
Binary file not shown.
Binary file modified Source/Content/bin/Windows/Content.WindowsDX/PenumbraHull.xnb
Binary file not shown.
Binary file modified Source/Content/bin/Windows/Content.WindowsDX/PenumbraLight.xnb
Binary file not shown.
Binary file modified Source/Content/bin/Windows/Content.WindowsDX/PenumbraShadow.xnb
Binary file not shown.
Binary file modified Source/Content/bin/Windows/Content.WindowsDX/PenumbraTexture.xnb
Binary file not shown.
10 changes: 4 additions & 6 deletions Source/Geometry/BoundingRectangle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ public bool Intersects(BoundingRectangle other)

public bool Intersects(ref BoundingRectangle other)
{
Vector2 d1, d2;
Vector2.Subtract(ref other.Min, ref Max, out d1);
Vector2.Subtract(ref Min, ref other.Max, out d2);
Vector2.Subtract(ref other.Min, ref Max, out Vector2 d1);
Vector2.Subtract(ref Min, ref other.Max, out Vector2 d2);

if (d1.X > 0.0f || d1.Y > 0.0f)
return false;
Expand Down Expand Up @@ -51,13 +50,12 @@ public static void Transform(ref BoundingRectangle bounds, ref Matrix transform,
Vector2.Transform(ref c3, ref transform, out c3);
Vector2.Transform(ref c4, ref transform, out c4);

Vector2 min, max;

Vector2.Min(ref c1, ref c2, out min);
Vector2.Min(ref c1, ref c2, out Vector2 min);
Vector2.Min(ref min, ref c3, out min);
Vector2.Min(ref min, ref c4, out min);

Vector2.Max(ref c1, ref c2, out max);
Vector2.Max(ref c1, ref c2, out Vector2 max);
Vector2.Max(ref max, ref c3, out max);
Vector2.Max(ref max, ref c4, out max);

Expand Down
8 changes: 4 additions & 4 deletions Source/MonoGame.Penumbra.DesktopGL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<DefineConstants>DESKTOPGL</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageId>MonoGame.Penumbra.DesktopGL</PackageId>
<Title>MonoGame.Penumbra</Title>
<Version>2.1.0</Version>
<Version>3.0.0</Version>
<Authors>Jaanus Varus</Authors>
<Description>Penumbra allows users to easily add 2D lighting and shadow effects to their games.</Description>
<PackageTags>monogame penumbra lighting shadowing 2d</PackageTags>
<RepositoryUrl>https://github.com/discosultan/penumbra</RepositoryUrl>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.0.1641" />
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.0.1641" />
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.1.303" />
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.303" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading

0 comments on commit 3a2d542

Please sign in to comment.