예제 #1
0
        public TileSet ReadCompressedTileSet(int bitDepth)
        {
            ByteArraySource decomp = ReadCompressed();
            GbaReader reader = new GbaReader(decomp);

            return reader.ReadTileSet(decomp.Length / bitDepth / 8, bitDepth);
        }
예제 #2
0
        public TileGrid ReadCompressedTileGrid(int width, int height, int tileWidth, int tileHeight)
        {
            ByteArraySource decomp = ReadCompressed();
            GbaReader reader = new GbaReader(decomp);

            // Check for correct size
            if (decomp.Length != width * height * 2)
                throw new Exception($"Decompressed block to {decomp.Length} bytes, but expected {width * height * 2} bytes");

            return reader.ReadTileGrid(width, height, tileWidth, tileHeight);
        }
예제 #3
0
 protected void InitializeGba()
 {
     IGbaReader reader = new GbaReader(Source);
     Header = reader.ReadHeader();
 }