public object Load(AssetManager assets, VFS.VFSHandle handle, object parameters) { var filename = handle.FileName; using (var stream = handle.Open()) { Palette palette; // Read a CPS as binary (for palette.cps). if (filename.EndsWith(".CPS")) { return(new BinFile(CpsFile.ReadAsBytes(stream, out palette))); } else { return(new BinFile(stream)); } } }
public object Load(AssetManager assets, VFS.VFSHandle handle, object parameters) { string filename = handle.FileName; using (var stream = handle.Open()) if (filename.EndsWith(".CPS")) { return(CpsFile.Read(stream)); } else if (filename.EndsWith(".PCX")) { return(PcxFile.Read(stream)); } else { return(ShpFile.Read(stream)); } }