using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Content.Pipeline.Graphics;
using Microsoft.Xna.Framework.Content.Pipeline.Processors;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;
using TWrite = MapProcessorLib.MapSourceCode;
namespace MapProcessorLib
{
///
/// This class will be instantiated by the XNA Framework Content Pipeline
/// to write the specified data type into binary .xnb format.
///
/// This should be part of a Content Pipeline Extension Library project.
///
[ContentTypeWriter]
public class MapWriter : ContentTypeWriter
{
protected override void Write(ContentWriter output, TWrite value)
{
output.Write(value.Lines.Length);
foreach (string line in value.Lines)
{
output.Write(line);
}
}
public override string GetRuntimeReader(TargetPlatform targetPlatform)
{
return "CarFire.MapReader, CarFire";
}
}
}