C# Class fCraft.MapConversion.MapXMap

Inheritance: IMapConverter
Show file Open project: fragmer/fCraft Class Usage Examples

Public Methods

Method Description
Claims ( string path ) : bool

Allows validating the map format while using minimal resources.

ClaimsName ( string fileName ) : bool

Returns true if the filename (or directory name) matches this format's expectations.

Load ( string path ) : Map

Fully loads map from specified location.

LoadHeader ( string path ) : Map

Attempts to load map dimensions from specified location.

Save ( Map mapToSave, string path ) : bool

Saves given map at the given location.

Private Methods

Method Description
LoadInternal ( Stream stream, bool readLayers ) : Map
ReadString ( BinaryReader reader ) : string
WriteString ( BinaryWriter writer, string str ) : void

Method Details

Claims() public method

Allows validating the map format while using minimal resources.
public Claims ( string path ) : bool
path string
return bool

ClaimsName() public method

Returns true if the filename (or directory name) matches this format's expectations.
public ClaimsName ( string fileName ) : bool
fileName string
return bool

Load() public method

Fully loads map from specified location.
public Load ( string path ) : Map
path string
return Map

LoadHeader() public method

Attempts to load map dimensions from specified location.
public LoadHeader ( string path ) : Map
path string
return Map

Save() public method

Saves given map at the given location.
public Save ( Map mapToSave, string path ) : bool
mapToSave Map
path string
return bool