private void comboDepth_SelectedIndexChanged(object sender, EventArgs e) { if ((this.comboDepth.Text != this.oldDepth) && !this.stopUpdating) { byte[] buffer; this.oldDepth = this.comboDepth.Text; this.tile.rahc.depth = (this.comboDepth.Text == "4 bpp") ? ColorDepth.Depth4Bit : ColorDepth.Depth8Bit; if (this.comboDepth.Text == "4 bpp") { buffer = Convertir.Bit8ToBit4(Convertir.TilesToBytes(this.tile.rahc.tileData.tiles, 0)); if (this.tile.order != NCGR.TileOrder.NoTiled) { this.tile.rahc.tileData.nPalette = new byte[this.tile.rahc.tileData.tiles.Length]; } else { this.tile.rahc.tileData.tiles = new byte[][] { buffer }; this.tile.rahc.tileData.nPalette = new byte[this.tile.rahc.tileData.tiles[0].Length]; } } else { buffer = Convertir.Bit4ToBit8(Convertir.TilesToBytes(this.tile.rahc.tileData.tiles, 0)); if (this.tile.order != NCGR.TileOrder.NoTiled) { this.tile.rahc.tileData.nPalette = new byte[this.tile.rahc.tileData.tiles.Length]; } else { this.tile.rahc.tileData.tiles = new byte[][] { buffer }; this.tile.rahc.tileData.nPalette = new byte[this.tile.rahc.tileData.tiles[0].Length]; } } this.UpdateImage(); } }