Exemple #1
0
        public byte[] GetTileSetData(TileSetDataType tsetType)
        {
            var dataOffset = (int)tsetType * 0x4000;
            var data       = new byte[0x4000];

            using (MemoryStream ms = new MemoryStream(tilesetData))
            {
                ms.Position = dataOffset;
                ms.Read(data, 0, 0x4000);
            }

            return(data);
        }
Exemple #2
0
        public void SetTileSetData(TileSetDataType tsetType, byte[] data)
        {
            var dataOffset = (int)tsetType * 0x4000;

            using (MemoryStream ms = new MemoryStream(tilesetData))
            {
                using (BinaryWriter bw = new BinaryWriter(ms))
                {
                    ms.Seek(dataOffset, SeekOrigin.Begin);
                    bw.Write(data);
                }
            }
        }
Exemple #3
0
        public long GetCompressedTileSetData(ref byte[] data, TileSetDataType tsetType)
        {
            var uncompData = GetTileSetData(tsetType);

            return(DataHelper.CompressData(ref data, uncompData));
        }