public InternalShrapnelEditor(AssetSHRP asset, ArchiveEditorFunctions archive) { InitializeComponent(); TopMost = true; this.asset = asset; this.archive = archive; propertyGridAsset.SelectedObject = asset; labelAssetName.Text = $"[{asset.AHDR.assetType.ToString()}] {asset.ToString()}"; }
private void ReverseSHRP(ref List <byte> bytes, Section_AHDR AHDR) { for (int i = 0; i < 3; i++) { bytes.AddRange(Reverse(reader.ReadInt32())); } AssetSHRP SHRP = new AssetSHRP(AHDR, previousGame, previousEndianness == Endianness.Big ? Platform.GameCube : Platform.Xbox); foreach (var entry in SHRP.GetEntries()) { bytes.AddRange(entry.ToReverseByteArray()); } }
private void SetupForShrp(AssetSHRP asset) { AddRow(); AddRow(); AddRow(); foreach (var i in new int[] { 3, 4, 5, 6, 8, 9 }) { Button buttonAdd = new Button() { Dock = DockStyle.Fill, Text = $"Add Type {i}", AutoSize = true }; buttonAdd.Click += (object sender, EventArgs e) => { asset.AddEntry(i); propertyGridAsset.Refresh(); archive.UnsavedChanges = true; }; tableLayoutPanel1.Controls.Add(buttonAdd); } }