From bd8df0030599d4eae13191273e895681ec1505af Mon Sep 17 00:00:00 2001 From: Colin McMillen Date: Wed, 14 Jul 2021 17:18:08 -0400 Subject: [PATCH] LinesOfSight: FNA compatibility. --- Shared/LinesOfSight.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Shared/LinesOfSight.cs b/Shared/LinesOfSight.cs index f7b3331..3a45ae0 100644 --- a/Shared/LinesOfSight.cs +++ b/Shared/LinesOfSight.cs @@ -2,6 +2,10 @@ using Microsoft.Xna.Framework.Graphics; using System; +// Disables "GraphicsDevice.DrawIndexedPrimitives(...) is obsolete." warning. +// MonoGame has obsoleted this function, but FNA needs it. +#pragma warning disable CS0618 + namespace SemiColinGames { public sealed class LinesOfSight : IDisposable { @@ -119,7 +123,8 @@ namespace SemiColinGames { foreach (EffectPass pass in lightingEffect.CurrentTechnique.Passes) { pass.Apply(); - graphics.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, indices.Length, 0, indices.Length / 3); + graphics.DrawIndexedPrimitives( + PrimitiveType.TriangleList, 0, 0, indices.Length, 0, indices.Length / 3); } }