public TileSet ReadCompressedTileSet(int bitDepth) { ByteArraySource decomp = ReadCompressed(); GbaReader reader = new GbaReader(decomp); return reader.ReadTileSet(decomp.Length / bitDepth / 8, bitDepth); }
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); }
protected void InitializeGba() { IGbaReader reader = new GbaReader(Source); Header = reader.ReadHeader(); }