Ejemplo n.º 1
0
        public object Load(DataSourceBase ds, List <FormatParameter> parameters)
        {
            //Remember to set source stream to begining
            ds.Stream.Seek(0, SeekOrigin.Begin);

            var tileSetBuilder = TileSetBuilder.NewTileSet();
            var blkReader      = new BLKReader(tileSetBuilder);

            return(blkReader.Read(ds.Stream));
        }
Ejemplo n.º 2
0
        public object Load(DataSourceBase ds, List <FormatParameter> parameters)
        {
            var tileSize    = (int)parameters.FirstOrDefault(item => item.Name == "TILE_SIZE").Value;
            var bitPlanesNo = (int)parameters.FirstOrDefault(item => item.Name == "BIT_PLANES_NO").Value;

            //Remember to set source stream to begining
            ds.Stream.Seek(0, SeekOrigin.Begin);

            var tileSetBuilder = TileSetBuilder.NewTileSet();
            var reader         = new ACBMTileSetReader(tileSetBuilder, tileSize, bitPlanesNo);

            return(reader.Read(ds.Stream));
        }
Ejemplo n.º 3
0
        public Tiling BuildTiling(List <PriorityTile> tileSet)
        {
            TileSetBuilder builder = new TileSetBuilder(tileSet);
            var            set     = (TileSet)builder.Build();

            TilingBuilder tilingBuilder = new TilingBuilder(width, height, set);

            tilingBuilder.FullTile = fullTile;
            if (prevPortals[0] != null)
            {
                return((Tiling)tilingBuilder.BuildTiling(prevPortals));
            }
            return((Tiling)tilingBuilder.BuildTiling());
        }
Ejemplo n.º 4
0
 public BLKReader(TileSetBuilder builder)
 {
     Builder = builder;
 }
Ejemplo n.º 5
0
 public ACBMTileSetReader(TileSetBuilder builder, int tileSize, int bitPlanesNo)
 {
     Builder      = builder;
     _tileSize    = tileSize;
     _bitPlanesNo = bitPlanesNo;
 }