// ClassicalSharp copyright 2014-2016 UnknownShadow200 | Licensed under MIT using System; using System.IO; namespace ClassicalSharp.Map { /// Exports and/or imports a world and metadata associated /// with to and/or from a particular file format. public abstract class IMapFileFormat { /// Whether a world can be exported to a file in this format. public virtual bool SupportsLoading { get { return false; } } /// Whether a world can be imported from a file in this format. public virtual bool SupportsSaving { get { return false; } } /// Replaces the current world from a stream that contains a world in this format. public virtual byte[] Load( Stream stream, Game game, out int width, out int height, out int length ) { width = 0; height = 0; length = 0; return null; } /// Exports the current world to a file in this format. public virtual void Save( Stream stream, Game game ) { } } }