Skip to content

Commit

Permalink
GetRuntimeReader from runtime types
Browse files Browse the repository at this point in the history
  • Loading branch information
nkast committed Jun 22, 2024
1 parent 86c6ec7 commit 38b81be
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 40 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;
using MonoGame.Extended.BitmapFonts;

namespace MonoGame.Extended.Content.Pipeline.BitmapFonts
{
Expand Down Expand Up @@ -43,20 +44,12 @@ protected override void Write(ContentWriter writer, BitmapFontProcessorResult re

public override string GetRuntimeType(TargetPlatform targetPlatform)
{
#if KNI
return "MonoGame.Extended.BitmapFonts.BitmapFont, KNI.Extended";
#else
return "MonoGame.Extended.BitmapFonts.BitmapFont, MonoGame.Extended";
#endif
return typeof(BitmapFont).AssemblyQualifiedName;
}

public override string GetRuntimeReader(TargetPlatform targetPlatform)
{
#if KNI
return "MonoGame.Extended.BitmapFonts.BitmapFontReader, KNI.Extended";
#else
return "MonoGame.Extended.BitmapFonts.BitmapFontReader, MonoGame.Extended";
#endif
return typeof(BitmapFontReader).AssemblyQualifiedName;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.IO;
using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;
using MonoGame.Extended.Graphics;

namespace MonoGame.Extended.Content.Pipeline.TextureAtlases
{
Expand Down Expand Up @@ -34,20 +35,12 @@ protected override void Write(ContentWriter writer, TexturePackerProcessorResult

public override string GetRuntimeType(TargetPlatform targetPlatform)
{
#if KNI
return "MonoGame.Extended.Graphics.Texture2DAtlas, KNI.Extended";
#else
return "MonoGame.Extended.Graphics.Texture2DAtlas, MonoGame.Extended";
#endif
return typeof(Texture2DAtlas).AssemblyQualifiedName;
}

public override string GetRuntimeReader(TargetPlatform targetPlatform)
{
#if KNI
return "MonoGame.Extended.Content.ContentReaders.Texture2DAtlasReader, KNI.Extended";
#else
return "MonoGame.Extended.Content.ContentReaders.Texture2DAtlasReader, MonoGame.Extended";
#endif
return typeof(ContentReaders.Texture2DAtlasReader).AssemblyQualifiedName;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,12 @@ public class TiledMapTilesetWriter : ContentTypeWriter<TiledMapTilesetContentIte
{
public override string GetRuntimeReader(TargetPlatform targetPlatform)
{
#if KNI
return "MonoGame.Extended.Tiled.TiledMapTilesetReader, KNI.Extended.Tiled";
#else
return "MonoGame.Extended.Tiled.TiledMapTilesetReader, MonoGame.Extended.Tiled";
#endif
return typeof(TiledMapTilesetReader).AssemblyQualifiedName;
}

public override string GetRuntimeType(TargetPlatform targetPlatform)
{
#if KNI
return "MonoGame.Extended.Tiled.TiledMapTileset, KNI.Extended.Tiled";
#else
return "MonoGame.Extended.Tiled.TiledMapTileset, MonoGame.Extended.Tiled";
#endif
return typeof(TiledMapTileset).AssemblyQualifiedName;
}

protected override void Write(ContentWriter writer, TiledMapTilesetContentItem contentItem)
Expand Down
12 changes: 2 additions & 10 deletions source/MonoGame.Extended.Content.Pipeline/Tiled/TiledMapWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,20 +222,12 @@ public static TiledMapObjectType GetObjectType(TiledMapObjectContent content)

public override string GetRuntimeType(TargetPlatform targetPlatform)
{
#if KNI
return "MonoGame.Extended.Tiled.TiledMap, KNI.Extended.Tiled";
#else
return "MonoGame.Extended.Tiled.TiledMap, MonoGame.Extended.Tiled";
#endif
return typeof(TiledMap).AssemblyQualifiedName;
}

public override string GetRuntimeReader(TargetPlatform targetPlatform)
{
#if KNI
return "MonoGame.Extended.Tiled.TiledMapReader, KNI.Extended.Tiled";
#else
return "MonoGame.Extended.Tiled.TiledMapReader, MonoGame.Extended.Tiled";
#endif
return typeof(TiledMapReader).AssemblyQualifiedName;
}
}
}

0 comments on commit 38b81be

Please sign in to comment.