public override void SetAndRefreshData(Structures.BlockBase blockBase) { base.SetAndRefreshData(blockBase); _roomImageHeader = (RoomImageHeader)blockBase; ZBuffers.Text = _roomImageHeader.NumberOfZBuffers.ToString(); }
public override void SetAndRefreshData(Structures.BlockBase blockBase) { base.SetAndRefreshData(blockBase); _valuePaddingBlock = (ValuePaddingBlock)blockBase; Value.Text = string.Format("{0} (0x{1})", _valuePaddingBlock.Value, _valuePaddingBlock.Value.ToString("X").PadLeft(2, '0')); Padding.Text = string.Format("{0} (0x{1})", _valuePaddingBlock.Padding, _valuePaddingBlock.Padding.ToString("X").PadLeft(2, '0')); }
public override void SetAndRefreshData(Structures.BlockBase blockBase) { base.SetAndRefreshData(blockBase); _roomHeader = (RoomHeader)blockBase; Width.Text = _roomHeader.Width.ToString(); Height.Text = _roomHeader.Height.ToString(); NumberObjects.Text = _roomHeader.NumObjects.ToString(); }
public override void SetAndRefreshData(Structures.BlockBase blockBase) { base.SetAndRefreshData(blockBase); _paletteData = (PaletteData)blockBase; for (int i = 0; i < 255; i++) { Color backColor = _paletteData.Colors[i]; PaletteTable.Controls[i].BackColor = backColor; ((PaletteColor)PaletteTable.Controls[i]).ColorChanged += (sender, index, color) => _paletteData.Colors[index] = color; toolTip1.SetToolTip(PaletteTable.Controls[i], string.Format("R: {0}, G:{1}, B:{2}", backColor.R, backColor.G, backColor.B)); } }
public override void SetAndRefreshData(Structures.BlockBase blockBase) { base.SetAndRefreshData(blockBase); _notImplementedDataBlock = (NotImplementedDataBlock)blockBase; if (AutomaticLoadData.Checked) { LoadBinaryData(); } else { var x = new DynamicByteProvider(new byte[0]); hexBox1.ByteProvider = x; } }
public override void SetAndRefreshData(Structures.BlockBase blockBase) { base.SetAndRefreshData(blockBase); _directoryItem = (DirectoryOfItems)blockBase; NumberOfItems.Text = _directoryItem.NumOfItems.ToString(); RoomsInfo.Items.Clear(); foreach (DirectoryItem colorCycle in _directoryItem.Rooms) { var item = RoomsInfo.Items.Add(colorCycle.Number.ToString()); item.SubItems.Add(colorCycle.Offset.ToString()); } RoomsInfo.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); }
public override void SetAndRefreshData(Structures.BlockBase blockBase) { base.SetAndRefreshData(blockBase); _zPlane = (ZPlane)blockBase; StripCount.Text = "Number of Strips: " + _zPlane.Strips.Count; Strips.Items.Clear(); foreach (ZPlaneStripData zPlaneStripData in _zPlane.Strips) { ListViewItem item = Strips.Items.Add(zPlaneStripData.OffSet.ToString()); item.SubItems.Add(zPlaneStripData.ImageData.Length.ToString()); } Strips.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); }
public override void SetAndRefreshData(Structures.BlockBase blockBase) { base.SetAndRefreshData(blockBase); _imageData = (ImageBomp)blockBase; Unknown.Text = _imageData.Unknown.ToString(); ImageWidth.Text = _imageData.Width.ToString(); ImageHeight.Text = _imageData.Height.ToString(); Padding1.Text = _imageData.Padding[0].ToString(); Padding2.Text = _imageData.Padding[1].ToString(); DataSize.Text = _imageData.Data.Length.ToString(); var x = new DynamicByteProvider(_imageData.Data); ImageData.ByteProvider = x; }
public override void SetAndRefreshData(Structures.BlockBase blockBase) { base.SetAndRefreshData(blockBase); _stripTable = (ImageStripTable)blockBase; StripCount.Text = "Number of Strips: " + _stripTable.Strips.Count; Strips.Items.Clear(); foreach (StripData colorCycle in _stripTable.Strips) { ListViewItem item = Strips.Items.Add(colorCycle.OffSet.ToString()); item.SubItems.Add(string.Format("{0} (0x{1})", colorCycle.CodecId, colorCycle.CodecId.ToString("X").PadLeft(2, '0'))); item.SubItems.Add(colorCycle.ImageData.Length.ToString()); item.SubItems.Add(Enum.GetName(typeof(CompressionTypes), colorCycle.CompressionType)); item.SubItems.Add(Enum.GetName(typeof(RenderingDirections), colorCycle.RenderdingDirection)); item.SubItems.Add(colorCycle.Transparent.ToString()); item.SubItems.Add(string.Format("{0} (0x{1})", colorCycle.ParamSubtraction, colorCycle.ParamSubtraction.ToString("X").PadLeft(2, '0'))); } Strips.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); }
public override void SetAndRefreshData(Structures.BlockBase blockBase) { base.SetAndRefreshData(blockBase); _objectImageHeader = (ObjectImageHeader)blockBase; Id.Text = _objectImageHeader.Id.ToString(); LocationHeigth.Text = _objectImageHeader.Height.ToString(); LocationWidth.Text = _objectImageHeader.Width.ToString(); NumHotspots.Text = _objectImageHeader.NumHotspots.ToString(); NumImages.Text = _objectImageHeader.NumImages.ToString(); NumZPlanes.Text = _objectImageHeader.NumZPlanes.ToString(); Unknown.Text = _objectImageHeader.Unknown.ToString(); LocationX.Text = _objectImageHeader.X.ToString(); LocationY.Text = _objectImageHeader.Y.ToString(); Hotspots.Items.Clear(); foreach (Hotspot hotspot in _objectImageHeader.Hotspots) { ListViewItem item = Hotspots.Items.Add(hotspot.X.ToString()); item.SubItems.Add(hotspot.Y.ToString()); } }
public override void SetAndRefreshData(Structures.BlockBase blockBase) { base.SetAndRefreshData(blockBase); if (ReferenceEquals(_diskBlock, blockBase)) { return; } _loading = true; _diskBlock = (DiskBlock)blockBase; var roomBlock = (RoomBlock)_diskBlock.Childrens.Single(r => r.GetType() == typeof(RoomBlock)); //Configurando as palettas Padrão PalettesData pals = roomBlock.GetPALS(); List <PaletteData> paletteDatas = null; if (pals != null) { paletteDatas = pals.GetWRAP().GetAPALs(); } Palettes.Items.Clear(); if (paletteDatas != null) { for (int i = 0; i < paletteDatas.Count; i++) { Palettes.Items.Add("Palette #" + i); } } else { Palettes.Items.Add("Palette #0"); } if (Palettes.SelectedIndex < 0) { Palettes.SelectedIndex = 0; } Palettes.Visible = Palettes.Items.Count != 1; //Termino de configuração das palettas padrão TreeImages.Nodes.Clear(); _roomImages = new Dictionary <string, RoomBlockImageControl>(); CreateInfos = new Dictionary <string, ClassCreateInfo>(); TreeNode backgroundNode = null; RoomImage RMIM = roomBlock.GetRMIM(); if (RMIM.GetIM00().GetSMAP().Strips.Count > 0) { var createInfo = new ClassCreateInfo(); createInfo.ImageType = ImageType.Background; createInfo.ControlId = "Background"; CreateInfos.Add("Background", createInfo); backgroundNode = TreeImages.Nodes.Add("Background", "Room Background"); } List <ZPlane> zPlanes = RMIM.GetIM00().GetZPlanes(); for (int i = 0; i < zPlanes.Count; i++) { string planeKey = "Background ZPlane " + (i + 1); var createInfo = new ClassCreateInfo(); createInfo.ImageType = ImageType.ZPlane; createInfo.ControlId = planeKey; createInfo.ZPlaneIndex = i; CreateInfos.Add(planeKey, createInfo); if (backgroundNode == null) { TreeImages.Nodes.Add(planeKey, "Background Z-Plane " + (i + 1)); } else { backgroundNode.Nodes.Add(planeKey, "Z-Plane " + (i + 1)); } } //Objetos List <ObjectImage> OBIMs = roomBlock.GetOBIMs(); for (int i = 0; i < OBIMs.Count; i++) { TreeNode nodeObject = TreeImages.Nodes.Add("_object" + i, "Object " + i); ObjectImage item = OBIMs[i]; List <ImageData> IMXX = item.GetIMxx(); for (int j = 0; j < IMXX.Count; j++) { ImageData image = IMXX[j]; string objectImageKey = string.Format("Object #{0}-{1}", i, j); TreeNode nodeImage = nodeObject.Nodes.Add(objectImageKey, "Image " + j); var createInfo = new ClassCreateInfo(); createInfo.ImageType = ImageType.Object; createInfo.ControlId = objectImageKey; createInfo.ObjectIndex = i; createInfo.ImageIndex = j; CreateInfos.Add(objectImageKey, createInfo); List <ZPlane> objectZPlanes = image.GetZPlanes(); for (int k = 0; k < objectZPlanes.Count; k++) { string objectZPlaneKey = string.Format("Object #{0}-{1} ZPlane {2}", i, j, (k + 1)); nodeImage.Nodes.Add(objectZPlaneKey, "Z-Plane " + k); createInfo = new ClassCreateInfo(); createInfo.ImageType = ImageType.ObjectsZPlane; createInfo.ControlId = objectZPlaneKey; createInfo.ObjectIndex = i; createInfo.ImageIndex = j; createInfo.ZPlaneIndex = k; CreateInfos.Add(objectZPlaneKey, createInfo); } } //Remove os itens se não tiver nenhuma imagem neles, só serve para poluir a tela. if (nodeObject.Nodes.Count == 0) { TreeImages.Nodes.Remove(nodeObject); } } //Costumes List <Costume> costumesList = _diskBlock.Childrens.OfType <Costume>().ToList(); for (int i = 0; i < costumesList.Count; i++) { TreeNode costume = TreeImages.Nodes.Add("_costume" + i, string.Format("Costume {0}", i.ToString().PadLeft(3, '0'))); Costume currentCostume = costumesList[i]; for (int j = 0; j < currentCostume.Pictures.Count; j++) { //Vamos filtras apenas os frames que tem imagem para decodificar. if (currentCostume.Pictures[j].ImageData.Length == 0 || currentCostume.Pictures[j].ImageData.Length == 1 && currentCostume.Pictures[j].ImageData[0] == 0) { continue; } string costumeKey = string.Format("Costume #{0}-{1}", i, j); var createInfo = new ClassCreateInfo(); createInfo.ImageType = ImageType.Costume; createInfo.Costume = currentCostume; createInfo.ControlId = costumeKey; createInfo.ImageIndex = j; CreateInfos.Add(costumeKey, createInfo); costume.Nodes.Add(costumeKey, string.Format("Frame {0}", j.ToString().PadLeft(2, '0'))); } } TreeImages.ExpandAll(); TreeImages.SelectedNode = TreeImages.Nodes[0]; _loading = false; }