From e5814a4b0c49934f2fb42f7ded6fbbaa9a19b737 Mon Sep 17 00:00:00 2001 From: Denis Date: Sun, 28 Nov 2021 00:04:16 +0100 Subject: [PATCH] Many changes once again --- BMGEditor/BMG.cs | 137 ++++++++++++++--- BMGEditor/BMGEditForm.Designer.cs | 39 ----- BMGEditor/BMGEditForm.resx | 120 --------------- BMGEditor/Bcsv.cs | 1 + BMGEditor/Program.cs | 11 +- BMGEditor/UI/BMGEditForm.Designer.cs | 138 ++++++++++++++++++ BMGEditor/UI/BMGEditForm.cs | 40 +++++ BMGEditor/UI/BMGEditForm.resx | 63 ++++++++ BMGEditor/{ => UI}/BcsvEditorForm.Designer.cs | 3 +- BMGEditor/{ => UI}/BcsvEditorForm.cs | 2 + BMGEditor/{ => UI}/BcsvEditorForm.resx | 0 BMGEditor/{ => UI}/MainForm.Designer.cs | 0 BMGEditor/{ => UI}/MainForm.cs | 4 + BMGEditor/{ => UI}/MainForm.resx | 0 BMGEditor/UI/TextEntryEditorForm.Designer.cs | 132 +++++++++++++++++ .../TextEntryEditorForm.cs} | 6 +- BMGEditor/UI/TextEntryEditorForm.resx | 60 ++++++++ 17 files changed, 570 insertions(+), 186 deletions(-) delete mode 100644 BMGEditor/BMGEditForm.Designer.cs delete mode 100644 BMGEditor/BMGEditForm.resx create mode 100644 BMGEditor/UI/BMGEditForm.Designer.cs create mode 100644 BMGEditor/UI/BMGEditForm.cs create mode 100644 BMGEditor/UI/BMGEditForm.resx rename BMGEditor/{ => UI}/BcsvEditorForm.Designer.cs (97%) rename BMGEditor/{ => UI}/BcsvEditorForm.cs (95%) rename BMGEditor/{ => UI}/BcsvEditorForm.resx (100%) rename BMGEditor/{ => UI}/MainForm.Designer.cs (100%) rename BMGEditor/{ => UI}/MainForm.cs (92%) rename BMGEditor/{ => UI}/MainForm.resx (100%) create mode 100644 BMGEditor/UI/TextEntryEditorForm.Designer.cs rename BMGEditor/{BMGEditForm.cs => UI/TextEntryEditorForm.cs} (68%) create mode 100644 BMGEditor/UI/TextEntryEditorForm.resx diff --git a/BMGEditor/BMG.cs b/BMGEditor/BMG.cs index 3b392e4..6411449 100644 --- a/BMGEditor/BMG.cs +++ b/BMGEditor/BMG.cs @@ -9,14 +9,20 @@ namespace BMGEditor public class BMG { private FileBase m_File; - private Int32 m_Signature = 0x4D455347; - private Int32 m_FileType = 0x626D6731; - private Byte m_ExpectedEncoding = 0x02; + private const Int32 m_Signature = 0x4D455347; + private const Int32 m_FileType = 0x626D6731; + private const Byte m_ExpectedEncoding = 0x02; - public BMG(FileBase file) + private const Int32 INF1magic = 0x494E4631; + private const Int32 DAT1magic = 0x44415431; + private const Int32 FLW1magic = 0x464C5731; + private const Int32 FLI1magic = 0x464C4931; + + public BMG(FileBase file, Bcsv tbl) { m_File = file; m_File.BigEndian = true; + m_File.Encoding = Encoding.BigEndianUnicode; m_File.Stream.Position = 0; Int32 headermagic1 = m_File.Reader.ReadInt32(); @@ -26,33 +32,124 @@ namespace BMGEditor UInt32 fileSize = m_File.Reader.ReadUInt32(); UInt32 numberOfSections = m_File.Reader.ReadUInt32(); Byte fileEncoding = m_File.Reader.ReadByte(); - Console.WriteLine("File size: " + fileSize); - Console.WriteLine("File sections: " + numberOfSections); - + if (fileEncoding != m_ExpectedEncoding) throw new Exception("sorry but no"); + m_File.Stream.Position = 0x20; + + //INF1 + Int32 INF1sectionMagic = m_File.Reader.ReadInt32(); + if (INF1sectionMagic != INF1magic) + { + throw new Exception("BMG File exists but isn't in the expected format"); + } + UInt32 INF1sectionSize = m_File.Reader.ReadUInt32(); + UInt16 INF1itemNumber = m_File.Reader.ReadUInt16(); + UInt16 INF1itemLength = m_File.Reader.ReadUInt16(); + m_File.Stream.Position += 0x04; + + Entries = new List(); + for (int i = 0; i < INF1itemNumber; i++) + { + TextEntry txtEntry = new TextEntry(); + txtEntry.entryNo = i; + txtEntry.offset = m_File.Reader.ReadUInt32(); + txtEntry.unk1 = m_File.Reader.ReadByte(); + txtEntry.cameraOpt = m_File.Reader.ReadByte(); + txtEntry.sndEffectOpt = m_File.Reader.ReadByte(); + txtEntry.unk2 = m_File.Reader.ReadByte(); + txtEntry.messageTriggerOpt = m_File.Reader.ReadByte(); + txtEntry.messageLayoutOpt = m_File.Reader.ReadByte(); + txtEntry.messageAreaOpt = m_File.Reader.ReadByte(); + + Entries.Add(txtEntry); + m_File.Stream.Position += 0x01; + } + m_File.Stream.Position += 0x10; + + //DAT1 + long DAT1sectionStart = m_File.Stream.Position; + Int32 DAT1sectionMagic = m_File.Reader.ReadInt32(); + UInt32 DAT1sectionSize = m_File.Reader.ReadUInt32(); + long strPoolStart = m_File.Stream.Position; + if (DAT1sectionMagic != DAT1magic) throw new Exception("BMG exists but isn\'t in the expected format"); + for (int j = 0; j < INF1itemNumber; j++) + { + m_File.Stream.Position = strPoolStart + Entries[j].offset; + Entries[j].text = ReadWideCharString(); + } + + int l = 0; + foreach (Bcsv.Entry bcsvEntry in tbl.Entries) + { + string entName = bcsvEntry[563954530].ToString(); + Entries[l].entryName = entName; + l++; + } + + //FLW1 + m_File.Stream.Position = DAT1sectionStart + DAT1sectionSize; + long FLW1sectionStart = m_File.Stream.Position; + Int32 FLW1sectionMagic = m_File.Reader.ReadInt32(); + if (FLW1sectionMagic != FLW1magic) throw new Exception("FLW1 section missing. Check your BMG file"); + UInt32 FLW1sectionSize = m_File.Reader.ReadUInt32(); + //FLI1 + m_File.Stream.Position = FLW1sectionStart + FLW1sectionSize; + long FLI1sectionStart = m_File.Stream.Position; + Int32 FLI1sectionMagic = m_File.Reader.ReadInt32(); + if (FLI1sectionMagic != FLI1magic) throw new Exception("FLI1 section missing. Check your BMG file"); + UInt32 FLI1sectionSize = m_File.Reader.ReadUInt32(); } public void Close() { m_File.Close(); } - } - /*public class BMGSection - { - Int32 sectionMagic; - public BMGSection() + public class TextEntry { + public int entryNo; + public string text; + public UInt32 offset; + public string entryName; + + //Properties + public byte unk1; + public byte cameraOpt; + public byte sndEffectOpt; + public byte unk2; + public byte messageTriggerOpt; + public byte messageLayoutOpt; + public byte messageAreaOpt; + } + + public string ReadWideCharString() + { + byte escSeqLength; + + string ret = ""; + char c; + while ((c = m_File.Reader.ReadChar()) != '\0') + { + if (c == 0x001A) + { + ret += "\"" + c; + escSeqLength = m_File.Reader.ReadByte(); + ret += $" {escSeqLength} "; + for (int k = 3; k < escSeqLength; k++) + { + ret += m_File.Reader.ReadByte() + " "; + } + ret += "\""; + } + else + ret += c; + } + return ret; + } - } - public class INF1Section : BMGSection - { - public INF1Section() - { - - } - }*/ + public List Entries; + } } diff --git a/BMGEditor/BMGEditForm.Designer.cs b/BMGEditor/BMGEditForm.Designer.cs deleted file mode 100644 index 84021fc..0000000 --- a/BMGEditor/BMGEditForm.Designer.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace BMGEditor -{ - partial class BMGEditForm - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(800, 450); - this.Text = "BMGEditForm"; - } - - #endregion - } -} \ No newline at end of file diff --git a/BMGEditor/BMGEditForm.resx b/BMGEditor/BMGEditForm.resx deleted file mode 100644 index 1af7de1..0000000 --- a/BMGEditor/BMGEditForm.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/BMGEditor/Bcsv.cs b/BMGEditor/Bcsv.cs index 87f5832..be34bd1 100644 --- a/BMGEditor/Bcsv.cs +++ b/BMGEditor/Bcsv.cs @@ -301,6 +301,7 @@ namespace BMGEditor return str; } + } diff --git a/BMGEditor/Program.cs b/BMGEditor/Program.cs index 2ddd1b1..49c2628 100644 --- a/BMGEditor/Program.cs +++ b/BMGEditor/Program.cs @@ -5,16 +5,21 @@ using System.Windows.Forms; namespace BMGEditor { + public static class Variables + { + public const string softwareName = "Luma"; + public const string softwareVersion = "v0.1"; + public const bool isBeta = true; + public const bool isPrivateBeta = true; + } internal static class Program { - /// - /// The main entry point for the application. - /// [STAThread] static void Main() { ApplicationConfiguration.Initialize(); Bcsv.PopulateHashtable(); + if (Variables.isBeta && Variables.isPrivateBeta) MessageBox.Show("This is a private beta, please don\'t leak it.", "Private", MessageBoxButtons.OK, MessageBoxIcon.Warning); Application.Run(new MainForm()); } } diff --git a/BMGEditor/UI/BMGEditForm.Designer.cs b/BMGEditor/UI/BMGEditForm.Designer.cs new file mode 100644 index 0000000..dce59a2 --- /dev/null +++ b/BMGEditor/UI/BMGEditForm.Designer.cs @@ -0,0 +1,138 @@ +namespace BMGEditor +{ + partial class BMGEditForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.quitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.panel1 = new System.Windows.Forms.Panel(); + this.entriesListBox = new System.Windows.Forms.ListBox(); + this.menuStrip1.SuspendLayout(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // menuStrip1 + // + this.menuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20); + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.fileToolStripMenuItem}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(800, 28); + this.menuStrip1.TabIndex = 0; + this.menuStrip1.Text = "menuStrip1"; + // + // fileToolStripMenuItem + // + this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.openToolStripMenuItem, + this.closeToolStripMenuItem, + this.saveToolStripMenuItem, + this.quitToolStripMenuItem}); + this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; + this.fileToolStripMenuItem.Size = new System.Drawing.Size(46, 24); + this.fileToolStripMenuItem.Text = "File"; + // + // openToolStripMenuItem + // + this.openToolStripMenuItem.Name = "openToolStripMenuItem"; + this.openToolStripMenuItem.Size = new System.Drawing.Size(128, 26); + this.openToolStripMenuItem.Text = "Open"; + // + // closeToolStripMenuItem + // + this.closeToolStripMenuItem.Name = "closeToolStripMenuItem"; + this.closeToolStripMenuItem.Size = new System.Drawing.Size(128, 26); + this.closeToolStripMenuItem.Text = "Close"; + // + // saveToolStripMenuItem + // + this.saveToolStripMenuItem.Name = "saveToolStripMenuItem"; + this.saveToolStripMenuItem.Size = new System.Drawing.Size(128, 26); + this.saveToolStripMenuItem.Text = "Save"; + // + // quitToolStripMenuItem + // + this.quitToolStripMenuItem.Name = "quitToolStripMenuItem"; + this.quitToolStripMenuItem.Size = new System.Drawing.Size(128, 26); + this.quitToolStripMenuItem.Text = "Quit"; + // + // panel1 + // + this.panel1.Controls.Add(this.entriesListBox); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 28); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(800, 422); + this.panel1.TabIndex = 1; + // + // entriesListBox + // + this.entriesListBox.Dock = System.Windows.Forms.DockStyle.Fill; + this.entriesListBox.FormattingEnabled = true; + this.entriesListBox.ItemHeight = 20; + this.entriesListBox.Location = new System.Drawing.Point(0, 0); + this.entriesListBox.Name = "entriesListBox"; + this.entriesListBox.Size = new System.Drawing.Size(800, 422); + this.entriesListBox.TabIndex = 0; + // + // BMGEditForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.panel1); + this.Controls.Add(this.menuStrip1); + this.MainMenuStrip = this.menuStrip1; + this.Name = "BMGEditForm"; + this.Text = "BMGEditForm"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.BMGEditForm_FormClosing); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem closeToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem quitToolStripMenuItem; + private System.Windows.Forms.ListBox entriesListBox; + } +} \ No newline at end of file diff --git a/BMGEditor/UI/BMGEditForm.cs b/BMGEditor/UI/BMGEditForm.cs new file mode 100644 index 0000000..5b782b6 --- /dev/null +++ b/BMGEditor/UI/BMGEditForm.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace BMGEditor +{ + public partial class BMGEditForm : Form + { + public BMGEditForm(RarcFilesystem arcFs) + { + InitializeComponent(); + Text = $"Text editor - {Variables.softwareName} {Variables.softwareVersion}"; + if (Variables.isBeta) Text += " [BETA]"; + + m_FileTbl = new Bcsv(arcFs.OpenFile($"{arcFs.rootName}/messageid.tbl")); + m_File = new BMG(arcFs.OpenFile($"{arcFs.rootName}/message.bmg"), m_FileTbl); + + foreach (BMG.TextEntry txtEntry in m_File.Entries) + { + entriesListBox.Items.Add(txtEntry.entryName); + } + } + + private BMG m_File = null; + private Bcsv m_FileTbl = null; + + private void BMGEditForm_FormClosing(object sender, FormClosingEventArgs e) + { + m_File.Close(); + m_FileTbl.Close(); + } + + } +} diff --git a/BMGEditor/UI/BMGEditForm.resx b/BMGEditor/UI/BMGEditForm.resx new file mode 100644 index 0000000..938108a --- /dev/null +++ b/BMGEditor/UI/BMGEditForm.resx @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/BMGEditor/BcsvEditorForm.Designer.cs b/BMGEditor/UI/BcsvEditorForm.Designer.cs similarity index 97% rename from BMGEditor/BcsvEditorForm.Designer.cs rename to BMGEditor/UI/BcsvEditorForm.Designer.cs index 5370bc1..b2a4529 100644 --- a/BMGEditor/BcsvEditorForm.Designer.cs +++ b/BMGEditor/UI/BcsvEditorForm.Designer.cs @@ -61,6 +61,7 @@ // dgvBcsv // this.dgvBcsv.AllowUserToResizeRows = false; + this.dgvBcsv.BackgroundColor = System.Drawing.SystemColors.Control; this.dgvBcsv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvBcsv.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvBcsv.Location = new System.Drawing.Point(0, 27); @@ -80,7 +81,7 @@ this.Controls.Add(this.tsToolbar); this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Name = "BcsvEditorForm"; - this.Text = "[DEBUG] BCSV editor"; + this.Text = "Entries Editor"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.BcsvEditorForm_FormClosing); this.tsToolbar.ResumeLayout(false); this.tsToolbar.PerformLayout(); diff --git a/BMGEditor/BcsvEditorForm.cs b/BMGEditor/UI/BcsvEditorForm.cs similarity index 95% rename from BMGEditor/BcsvEditorForm.cs rename to BMGEditor/UI/BcsvEditorForm.cs index 571340d..ebc355a 100644 --- a/BMGEditor/BcsvEditorForm.cs +++ b/BMGEditor/UI/BcsvEditorForm.cs @@ -14,6 +14,8 @@ namespace BMGEditor public BcsvEditorForm(RarcFilesystem arcFs) { InitializeComponent(); + Text += $" - {Variables.softwareName} {Variables.softwareVersion}"; + if (Variables.isBeta) Text += " [BETA]"; m_File = new Bcsv(arcFs.OpenFile($"{arcFs.rootName}/messageid.tbl")); dgvBcsv.Rows.Clear(); diff --git a/BMGEditor/BcsvEditorForm.resx b/BMGEditor/UI/BcsvEditorForm.resx similarity index 100% rename from BMGEditor/BcsvEditorForm.resx rename to BMGEditor/UI/BcsvEditorForm.resx diff --git a/BMGEditor/MainForm.Designer.cs b/BMGEditor/UI/MainForm.Designer.cs similarity index 100% rename from BMGEditor/MainForm.Designer.cs rename to BMGEditor/UI/MainForm.Designer.cs diff --git a/BMGEditor/MainForm.cs b/BMGEditor/UI/MainForm.cs similarity index 92% rename from BMGEditor/MainForm.cs rename to BMGEditor/UI/MainForm.cs index 89f33cf..bb129ec 100644 --- a/BMGEditor/MainForm.cs +++ b/BMGEditor/UI/MainForm.cs @@ -18,6 +18,8 @@ namespace BMGEditor public MainForm() { InitializeComponent(); + Text = $"{Variables.softwareName} {Variables.softwareVersion}"; + if (Variables.isBeta) this.Text += " [BETA]"; } private void openBcsvEditorBtn_Click(object sender, EventArgs e) @@ -49,6 +51,8 @@ namespace BMGEditor "Error while loading file", MessageBoxButtons.OK, MessageBoxIcon.Error); + arc.Close(); + return; } openBcsvEditorBtn.Enabled = true; diff --git a/BMGEditor/MainForm.resx b/BMGEditor/UI/MainForm.resx similarity index 100% rename from BMGEditor/MainForm.resx rename to BMGEditor/UI/MainForm.resx diff --git a/BMGEditor/UI/TextEntryEditorForm.Designer.cs b/BMGEditor/UI/TextEntryEditorForm.Designer.cs new file mode 100644 index 0000000..22886ec --- /dev/null +++ b/BMGEditor/UI/TextEntryEditorForm.Designer.cs @@ -0,0 +1,132 @@ +namespace BMGEditor.UI +{ + partial class TextEntryEditorForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.textBox1 = new System.Windows.Forms.TextBox(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.textBox3 = new System.Windows.Forms.TextBox(); + this.textBox4 = new System.Windows.Forms.TextBox(); + this.comboBox1 = new System.Windows.Forms.ComboBox(); + this.comboBox2 = new System.Windows.Forms.ComboBox(); + this.comboBox3 = new System.Windows.Forms.ComboBox(); + this.richTextBox1 = new System.Windows.Forms.RichTextBox(); + this.SuspendLayout(); + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(176, 35); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(125, 27); + this.textBox1.TabIndex = 0; + // + // textBox2 + // + this.textBox2.Location = new System.Drawing.Point(569, 35); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(125, 27); + this.textBox2.TabIndex = 1; + // + // textBox3 + // + this.textBox3.Location = new System.Drawing.Point(438, 35); + this.textBox3.Name = "textBox3"; + this.textBox3.Size = new System.Drawing.Size(125, 27); + this.textBox3.TabIndex = 2; + // + // textBox4 + // + this.textBox4.Location = new System.Drawing.Point(307, 35); + this.textBox4.Name = "textBox4"; + this.textBox4.Size = new System.Drawing.Size(125, 27); + this.textBox4.TabIndex = 3; + // + // comboBox1 + // + this.comboBox1.FormattingEnabled = true; + this.comboBox1.Location = new System.Drawing.Point(198, 123); + this.comboBox1.Name = "comboBox1"; + this.comboBox1.Size = new System.Drawing.Size(151, 28); + this.comboBox1.TabIndex = 4; + // + // comboBox2 + // + this.comboBox2.FormattingEnabled = true; + this.comboBox2.Location = new System.Drawing.Point(512, 123); + this.comboBox2.Name = "comboBox2"; + this.comboBox2.Size = new System.Drawing.Size(151, 28); + this.comboBox2.TabIndex = 5; + // + // comboBox3 + // + this.comboBox3.FormattingEnabled = true; + this.comboBox3.Location = new System.Drawing.Point(355, 123); + this.comboBox3.Name = "comboBox3"; + this.comboBox3.Size = new System.Drawing.Size(151, 28); + this.comboBox3.TabIndex = 6; + // + // richTextBox1 + // + this.richTextBox1.Location = new System.Drawing.Point(235, 234); + this.richTextBox1.Name = "richTextBox1"; + this.richTextBox1.Size = new System.Drawing.Size(125, 120); + this.richTextBox1.TabIndex = 7; + this.richTextBox1.Text = ""; + // + // TextEntryEditorForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.richTextBox1); + this.Controls.Add(this.comboBox3); + this.Controls.Add(this.comboBox2); + this.Controls.Add(this.comboBox1); + this.Controls.Add(this.textBox4); + this.Controls.Add(this.textBox3); + this.Controls.Add(this.textBox2); + this.Controls.Add(this.textBox1); + this.Name = "TextEntryEditorForm"; + this.Text = "TextEntryEditorForm"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.TextBox textBox3; + private System.Windows.Forms.TextBox textBox4; + private System.Windows.Forms.ComboBox comboBox1; + private System.Windows.Forms.ComboBox comboBox2; + private System.Windows.Forms.ComboBox comboBox3; + private System.Windows.Forms.RichTextBox richTextBox1; + } +} \ No newline at end of file diff --git a/BMGEditor/BMGEditForm.cs b/BMGEditor/UI/TextEntryEditorForm.cs similarity index 68% rename from BMGEditor/BMGEditForm.cs rename to BMGEditor/UI/TextEntryEditorForm.cs index e7dae08..0e38eb0 100644 --- a/BMGEditor/BMGEditForm.cs +++ b/BMGEditor/UI/TextEntryEditorForm.cs @@ -8,11 +8,11 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Forms; -namespace BMGEditor +namespace BMGEditor.UI { - public partial class BMGEditForm : Form + public partial class TextEntryEditorForm : Form { - public BMGEditForm(RarcFilesystem arcFs) + public TextEntryEditorForm(BMG.TextEntry txtEntry) { InitializeComponent(); } diff --git a/BMGEditor/UI/TextEntryEditorForm.resx b/BMGEditor/UI/TextEntryEditorForm.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/BMGEditor/UI/TextEntryEditorForm.resx @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file