public byte[] GetBytes() { byte[] data = new byte[BackgroundTileset.TileCount * 16]; for (int j = 0; j < BackgroundTileset.TileCount; j++) { BackgroundTile tile = this.GetTile(j); Buffer.BlockCopy(tile.Graphics, 0, data, j * 16, tile.Graphics.Length); } return(data); }
public BackgroundTile GetTileInstance(int tileId, byte properties, bool front) { BackgroundTile tile = this.Tileset[tileId]; return(new BackgroundTile(tile.Graphics, tile.Palettes, properties, front)); }