2 using System.Collections.Generic;
4 using Microsoft.Xna.Framework;
5 using Microsoft.Xna.Framework.Graphics;
6 using Microsoft.Xna.Framework.Content.Pipeline;
7 using Microsoft.Xna.Framework.Content.Pipeline.Graphics;
9 using TImport = MapProcessorLib.MapSourceCode;
11 namespace MapProcessorLib
14 /// This class will be instantiated by the XNA Framework Content Pipeline
15 /// to import a file from disk into the specified type, TImport.
17 /// This should be part of a Content Pipeline Extension Library project.
19 [ContentImporter(".cfmap", DisplayName = "CarFire Map Importer", DefaultProcessor = "PassThroughProcessor")]
20 public class MapImporter : ContentImporter<TImport>
22 public override TImport Import(string filename, ContentImporterContext context)
24 string[] lines = System.IO.File.ReadAllLines(filename);
25 return new MapSourceCode(lines);