summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/Rendering
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI/Framework/Rendering')
-rw-r--r--src/SMAPI/Framework/Rendering/SDisplayDevice.cs8
-rw-r--r--src/SMAPI/Framework/Rendering/SXnaDisplayDevice.cs4
2 files changed, 4 insertions, 8 deletions
diff --git a/src/SMAPI/Framework/Rendering/SDisplayDevice.cs b/src/SMAPI/Framework/Rendering/SDisplayDevice.cs
index 8718bcb1..37996b0f 100644
--- a/src/SMAPI/Framework/Rendering/SDisplayDevice.cs
+++ b/src/SMAPI/Framework/Rendering/SDisplayDevice.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
@@ -27,7 +25,7 @@ namespace StardewModdingAPI.Framework.Rendering
/// <param name="tile">The tile to draw.</param>
/// <param name="location">The tile position to draw.</param>
/// <param name="layerDepth">The layer depth at which to draw.</param>
- public override void DrawTile(Tile tile, Location location, float layerDepth)
+ public override void DrawTile(Tile? tile, Location location, float layerDepth)
{
// identical to XnaDisplayDevice
if (tile == null)
@@ -58,7 +56,7 @@ namespace StardewModdingAPI.Framework.Rendering
/// <param name="tile">The tile being drawn.</param>
private SpriteEffects GetSpriteEffects(Tile tile)
{
- return tile.Properties.TryGetValue("@Flip", out PropertyValue propertyValue) && int.TryParse(propertyValue, out int value)
+ return tile.Properties.TryGetValue("@Flip", out PropertyValue? propertyValue) && int.TryParse(propertyValue, out int value)
? (SpriteEffects)value
: SpriteEffects.None;
}
@@ -67,7 +65,7 @@ namespace StardewModdingAPI.Framework.Rendering
/// <param name="tile">The tile being drawn.</param>
private float GetRotation(Tile tile)
{
- if (!tile.Properties.TryGetValue("@Rotation", out PropertyValue propertyValue) || !int.TryParse(propertyValue, out int value))
+ if (!tile.Properties.TryGetValue("@Rotation", out PropertyValue? propertyValue) || !int.TryParse(propertyValue, out int value))
return 0;
value %= 360;
diff --git a/src/SMAPI/Framework/Rendering/SXnaDisplayDevice.cs b/src/SMAPI/Framework/Rendering/SXnaDisplayDevice.cs
index 21edaedd..94b13378 100644
--- a/src/SMAPI/Framework/Rendering/SXnaDisplayDevice.cs
+++ b/src/SMAPI/Framework/Rendering/SXnaDisplayDevice.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
@@ -91,7 +89,7 @@ namespace StardewModdingAPI.Framework.Rendering
/// <param name="tile">The tile to draw.</param>
/// <param name="location">The tile position to draw.</param>
/// <param name="layerDepth">The layer depth at which to draw.</param>
- public virtual void DrawTile(Tile tile, Location location, float layerDepth)
+ public virtual void DrawTile(Tile? tile, Location location, float layerDepth)
{
if (tile == null)
return;