Skip to content

Commit 3e0b48d

Browse files
authored
Merge pull request #289 from Thraka/develop
9.2.2 Release
2 parents 5170dfd + 250d757 commit 3e0b48d

File tree

8 files changed

+42
-39
lines changed

8 files changed

+42
-39
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,12 @@ SadConsole uses NuGet for its .NET dependencies:
5050

5151
## Latest changes
5252

53-
**v9.2.1 (01/04/2022)**
53+
**v9.2.2 (01/22/2022)**
5454

55-
(v9.2.1 fixes API documentation generation, all other changes are for 9.2.0)
55+
(v9.2.2 Fix conversion of Mirror to SpriteEffects)\
56+
(v9.2.1 Fix API documentation generation)
57+
58+
**9.2.0**
5659

5760
### Breaking changes
5861

SadConsole.Host.MonoGame/Extensions.cs

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,25 @@ namespace SadConsole.Host.MonoGame
77
{
88
public static class Extensions
99
{
10+
/// <summary>
11+
/// Converts a <see cref="Mirror"/> type to a MonoGame <see cref="Microsoft.Xna.Framework.Graphics.SpriteEffects"/> type.
12+
/// </summary>
13+
/// <param name="mirror">The value to convert.</param>
14+
/// <returns>The MonoGame equivalent.</returns>
1015
public static Microsoft.Xna.Framework.Graphics.SpriteEffects ToMonoGame(this Mirror mirror)
1116
{
12-
switch (mirror)
13-
{
14-
case Mirror.None:
15-
return Microsoft.Xna.Framework.Graphics.SpriteEffects.None;
16-
case Mirror.Vertical:
17-
return Microsoft.Xna.Framework.Graphics.SpriteEffects.FlipVertically;
18-
case Mirror.Horizontal:
19-
return Microsoft.Xna.Framework.Graphics.SpriteEffects.FlipHorizontally;
20-
default:
21-
return Microsoft.Xna.Framework.Graphics.SpriteEffects.None;
22-
}
17+
Microsoft.Xna.Framework.Graphics.SpriteEffects result = Microsoft.Xna.Framework.Graphics.SpriteEffects.None;
18+
19+
if (mirror == Mirror.None)
20+
return result;
21+
22+
if ((mirror & Mirror.Vertical) == Mirror.Vertical)
23+
result |= Microsoft.Xna.Framework.Graphics.SpriteEffects.FlipVertically;
24+
25+
if ((mirror & Mirror.Horizontal) == Mirror.Horizontal)
26+
result |= Microsoft.Xna.Framework.Graphics.SpriteEffects.FlipHorizontally;
27+
28+
return result;
2329
}
2430
}
2531
}

SadConsole.Host.MonoGame/SadConsole.Host.MonoGame.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
<TargetFrameworks>netstandard2.1;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
55
<RootNamespace>SadConsole.Host.MonoGame</RootNamespace>
66
<DocumentationFile>SadConsole.Host.MonoGame.xml</DocumentationFile>
7-
<Version>9.2.1</Version>
7+
<Version>9.2.2</Version>
88
<Version Condition="'$(Configuration)'=='Debug'">$(Version)-debug</Version>
99
<Authors>Thraka</Authors>
1010
<Company>SadLogic</Company>
1111
<NeutralLanguage>en-US</NeutralLanguage>
1212
<AssemblyTitle>SadConsole (.NET Standard)</AssemblyTitle>
1313
<Description>A graphics hosting library for SadConsole. Targets MonoGame and .NET Standard 2.1.</Description>
14-
<Copyright>Copyright © 2020 Steve De George JR (Thraka)</Copyright>
14+
<Copyright>Copyright © 2022 Steve De George JR (Thraka)</Copyright>
1515
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1616
<PackageId>SadConsole.Host.MonoGame</PackageId>
1717
<PackageIcon>nugeticon.png</PackageIcon>
@@ -25,7 +25,7 @@
2525
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
2626
<EmbedAllSources>true</EmbedAllSources>
2727
<PackageTags>monogame;roguelike;cli;xna;game;development;console;ansi;ascii;textmode;sadconsole</PackageTags>
28-
<PackageReleaseNotes>Various little fixes. Updates for SadConsole 9.2.1</PackageReleaseNotes>
28+
<PackageReleaseNotes>Fix mirror on glyphs.</PackageReleaseNotes>
2929
</PropertyGroup>
3030

3131
<PropertyGroup>
@@ -34,7 +34,7 @@
3434

3535
<ItemGroup>
3636
<ProjectReference Condition=" '$(UseProjectReferences)' == 'true' " Include="..\SadConsole\SadConsole.csproj" />
37-
<PackageReference Condition=" '$(UseProjectReferences)' != 'true' " Include="SadConsole" Version="9.2.1" />
37+
<PackageReference Condition=" '$(UseProjectReferences)' != 'true' " Include="SadConsole" Version="9.2.2" />
3838
<PackageReference Include="TheSadRogue.Primitives" Version="1.1.1" />
3939
<PackageReference Include="TheSadRogue.Primitives.MonoGame" Version="1.0.0" />
4040
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.0.1641" />

SadConsole.Host.MonoGame/SadConsole.Host.MonoGame.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

SadConsole/GlyphMirror.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ public enum Mirror
99
/// <summary>
1010
/// No mirroring set.
1111
/// </summary>
12-
None,
12+
None = 0,
1313

1414
/// <summary>
1515
/// Mirror vertically.
1616
/// </summary>
17-
Vertical,
17+
Vertical = 1,
1818

1919
/// <summary>
2020
/// Mirror horizontally.
2121
/// </summary>
22-
Horizontal
22+
Horizontal = 2,
2323
}
2424
}

SadConsole/SadConsole.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<TargetFrameworks>netstandard2.1;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
55
<AssemblyName>SadConsole</AssemblyName>
66
<DocumentationFile>SadConsole.xml</DocumentationFile>
7-
<Version>9.2.1</Version>
7+
<Version>9.2.2</Version>
88
<Version Condition="'$(Configuration)'=='Debug'">$(Version)-debug</Version>
99
<Authors>Thraka</Authors>
1010
<Company>SadLogic</Company>
@@ -26,7 +26,7 @@
2626
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
2727
<EmbedAllSources>true</EmbedAllSources>
2828
<PackageTags>roguelike;cli;game;development;console;ansi;ascii;textmode;monogame;sfml;sadconsole</PackageTags>
29-
<PackageReleaseNotes>9.2.0 contains lots of changes, including breaking changes. See NuGet or GitHub documentation for more information. 9.2.1 only fixes API documentation</PackageReleaseNotes>
29+
<PackageReleaseNotes>9.2.0 contains lots of changes, including breaking changes. See NuGet or GitHub documentation for more information. 9.2.1 only fixes API documentation. 9.2.2 hardcodes the mirror enum values.</PackageReleaseNotes>
3030
</PropertyGroup>
3131

3232
<!--

SadConsole/SadConsole.xml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2082,23 +2082,6 @@
20822082
<param name="height">The viewable height of the surface.</param>
20832083
<param name="clear">When <see langword="true"/>, resets every cell to the <see cref="P:SadConsole.Console.DefaultForeground"/>, <see cref="P:SadConsole.Console.DefaultBackground"/> and glyph 0.</param>
20842084
</member>
2085-
<member name="T:SadConsole.Debug.Screen">
2086-
<summary>
2087-
A debugging screen that takes the place of the active <see cref="P:SadConsole.GameHost.Screen"/> and displays information about SadConsole.
2088-
</summary>
2089-
</member>
2090-
<member name="M:SadConsole.Debug.Screen.Show(SadConsole.IFont,SadRogue.Primitives.Point)">
2091-
<summary>
2092-
Displays the debugger.
2093-
</summary>
2094-
<param name="font">The font to use the debugging screen.</param>
2095-
<param name="fontSize">The size of the font.</param>
2096-
</member>
2097-
<member name="M:SadConsole.Debug.Screen.Show">
2098-
<summary>
2099-
Shows the debug screen with the default font and size.
2100-
</summary>
2101-
</member>
21022085
<member name="T:SadConsole.DrawCalls.DrawCallCustom">
21032086
<summary>
21042087
A draw call that invokes an <see cref="T:System.Action"/> delegate.

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## v9.2.2 (01/XX/2022)
2+
3+
- [MonoGame] Fix conversion of Mirror to SpriteEffects.
4+
15
## v9.2.1 (01/04/2022)
26

37
- Rebuild RELEASE build to fix API documentation generation.

0 commit comments

Comments
 (0)