public static void WriteTileset(this BinaryStream stream, GbaTileset tileset, int bitDepth) { for (int i = 0; i < tileset.Count; i++) { stream.WriteTile(tileset[i], bitDepth); } }
public static GbaTileset ReadTileset(this BinaryStream stream, int count, int bitDepth) { var tileset = new GbaTileset(count, bitDepth); for (int i = 0; i < count; i++) { tileset[i] = stream.ReadTile(bitDepth); } return(tileset); }