예제 #1
0
        public BBLM ReturnData()
        {
            BBLM Data = new BBLM();

            Data.Entries     = new List <Entry>();
            Data.Unknown1    = UInt64.Parse(textBox0x08.Text, NumberStyles.HexNumber);
            Data.ScaleFactor = Convert.ToSingle(textBox0x10.Text);
            Data.RGB         = UInt32.Parse(textBox0x14.Text, NumberStyles.HexNumber);
            Data.blurrRGB    = UInt32.Parse(textBox0x18.Text, NumberStyles.HexNumber);
            Data.Unknown2    = UInt16.Parse(textBox0x1C.Text, NumberStyles.HexNumber);
            Data.Unknown3    = UInt16.Parse(textBox0x1E.Text, NumberStyles.HexNumber);
            Data.Entries.Add(new Entry()
            {
                Unknown1 = Convert.ToSingle(textBox0x20.Text),
                Unknown2 = Convert.ToSingle(textBox0x24.Text),
                Unknown3 = UInt32.Parse(textBox0x28.Text, NumberStyles.HexNumber),
                Unknown4 = UInt32.Parse(textBox0x2C.Text, NumberStyles.HexNumber),
                Unknown5 = UInt32.Parse(textBox0x30.Text, NumberStyles.HexNumber),
                Unknown6 = UInt32.Parse(textBox0x34.Text, NumberStyles.HexNumber),
                Unknown7 = UInt32.Parse(textBox0x38.Text, NumberStyles.HexNumber),
                Unknown8 = UInt32.Parse(textBox0x3C.Text, NumberStyles.HexNumber),
            });
            Data.Entries.Add(new Entry()
            {
                Unknown1 = Convert.ToSingle(textBox0x40.Text),
                Unknown2 = Convert.ToSingle(textBox0x44.Text),
                Unknown3 = UInt32.Parse(textBox0x48.Text, NumberStyles.HexNumber),
                Unknown4 = UInt32.Parse(textBox0x4C.Text, NumberStyles.HexNumber),
                Unknown5 = UInt32.Parse(textBox0x50.Text, NumberStyles.HexNumber),
                Unknown6 = UInt32.Parse(textBox0x54.Text, NumberStyles.HexNumber),
                Unknown7 = UInt32.Parse(textBox0x58.Text, NumberStyles.HexNumber),
                Unknown8 = UInt32.Parse(textBox0x5C.Text, NumberStyles.HexNumber),
            });
            Data.Entries.Add(new Entry()
            {
                Unknown1 = Convert.ToSingle(textBox0x60.Text),
                Unknown2 = Convert.ToSingle(textBox0x64.Text),
                Unknown3 = UInt32.Parse(textBox0x68.Text, NumberStyles.HexNumber),
                Unknown4 = UInt32.Parse(textBox0x6C.Text, NumberStyles.HexNumber),
                Unknown5 = UInt32.Parse(textBox0x70.Text, NumberStyles.HexNumber),
                Unknown6 = UInt32.Parse(textBox0x74.Text, NumberStyles.HexNumber),
                Unknown7 = UInt32.Parse(textBox0x78.Text, NumberStyles.HexNumber),
                Unknown8 = UInt32.Parse(textBox0x7C.Text, NumberStyles.HexNumber),
            });
            Data.Unknown4 = UInt32.Parse(textBox0x80.Text, NumberStyles.HexNumber);
            Data.Unknown5 = UInt32.Parse(textBox0x84.Text, NumberStyles.HexNumber);
            Data.Unknown6 = UInt32.Parse(textBox0x88.Text, NumberStyles.HexNumber);
            Data.Unknown7 = UInt32.Parse(textBox0x8C.Text, NumberStyles.HexNumber);
            Data.Unknown8 = UInt32.Parse(textBox0x90.Text, NumberStyles.HexNumber);
            Data.Unknown9 = UInt32.Parse(textBox0x94.Text);
            Data.float1   = Convert.ToSingle(textBox0x98.Text);
            Data.float2   = Convert.ToSingle(textBox0x9C.Text);
            Data.float3   = Convert.ToSingle(textBox0xA0.Text);

            return(Data);
        }
예제 #2
0
        public void AddData(BBLM Data)
        {
            textBox0x08.Text = HexUtil.Hex64(Data.Unknown1);
            textBox0x10.Text = Data.ScaleFactor.ToString();
            textBox0x14.Text = HexUtil.Hex32(Data.RGB);
            textBox0x18.Text = HexUtil.Hex32(Data.blurrRGB);
            textBox0x1C.Text = HexUtil.Hex16(Data.Unknown2);
            textBox0x1E.Text = HexUtil.Hex16(Data.Unknown3);

            textBox0x20.Text = Data.Entries[0].Unknown1.ToString();
            textBox0x24.Text = Data.Entries[0].Unknown2.ToString();
            textBox0x28.Text = HexUtil.Hex32(Data.Entries[0].Unknown3);
            textBox0x2C.Text = HexUtil.Hex32(Data.Entries[0].Unknown4);
            textBox0x30.Text = HexUtil.Hex32(Data.Entries[0].Unknown5);
            textBox0x34.Text = HexUtil.Hex32(Data.Entries[0].Unknown6);
            textBox0x38.Text = HexUtil.Hex32(Data.Entries[0].Unknown7);
            textBox0x3C.Text = HexUtil.Hex32(Data.Entries[0].Unknown8);

            textBox0x40.Text = Data.Entries[1].Unknown1.ToString();
            textBox0x44.Text = Data.Entries[1].Unknown2.ToString();
            textBox0x48.Text = HexUtil.Hex32(Data.Entries[1].Unknown3);
            textBox0x4C.Text = HexUtil.Hex32(Data.Entries[1].Unknown4);
            textBox0x50.Text = HexUtil.Hex32(Data.Entries[1].Unknown5);
            textBox0x54.Text = HexUtil.Hex32(Data.Entries[1].Unknown6);
            textBox0x58.Text = HexUtil.Hex32(Data.Entries[1].Unknown7);
            textBox0x5C.Text = HexUtil.Hex32(Data.Entries[1].Unknown8);

            textBox0x60.Text = Data.Entries[2].Unknown1.ToString();
            textBox0x64.Text = Data.Entries[2].Unknown2.ToString();
            textBox0x68.Text = HexUtil.Hex32(Data.Entries[2].Unknown3);
            textBox0x6C.Text = HexUtil.Hex32(Data.Entries[2].Unknown4);
            textBox0x70.Text = HexUtil.Hex32(Data.Entries[2].Unknown5);
            textBox0x74.Text = HexUtil.Hex32(Data.Entries[2].Unknown6);
            textBox0x78.Text = HexUtil.Hex32(Data.Entries[2].Unknown7);
            textBox0x7C.Text = HexUtil.Hex32(Data.Entries[2].Unknown8);

            textBox0x80.Text = HexUtil.Hex32(Data.Unknown4);
            textBox0x84.Text = HexUtil.Hex32(Data.Unknown5);
            textBox0x88.Text = HexUtil.Hex32(Data.Unknown6);
            textBox0x8C.Text = HexUtil.Hex32(Data.Unknown7);
            textBox0x90.Text = HexUtil.Hex32(Data.Unknown8);
            textBox0x94.Text = HexUtil.Hex32(Data.Unknown9);
            textBox0x98.Text = Data.float1.ToString();
            textBox0x9C.Text = Data.float2.ToString();
            textBox0xA0.Text = Data.float3.ToString();
        }
예제 #3
0
        public void WriteBBLM(string FilePath)
        {
            FileName = FilePath;
            BigEndianWriter Writer = new BigEndianWriter(File.Open(FilePath, FileMode.Create));
            BBLM            b      = bblmComponent1.ReturnData();

            Writer.WriteChars("PBLM".ToCharArray(), 0, 4);
            Writer.WriteUInt32(0xA4);
            Writer.WriteUInt64(b.Unknown1);
            Writer.WriteSingle(b.ScaleFactor);
            Writer.WriteUInt32(b.RGB);
            Writer.WriteUInt32(b.blurrRGB);
            Writer.WriteUInt16(b.Unknown2);
            Writer.WriteUInt16(b.Unknown3);
            for (int i = 0; i < b.Entries.Count; i++)
            {
                Writer.WriteSingle(b.Entries[i].Unknown1);
                Writer.WriteSingle(b.Entries[i].Unknown2);
                Writer.WriteUInt32(b.Entries[i].Unknown3);
                Writer.WriteUInt32(b.Entries[i].Unknown4);
                Writer.WriteUInt32(b.Entries[i].Unknown5);
                Writer.WriteUInt32(b.Entries[i].Unknown6);
                Writer.WriteUInt32(b.Entries[i].Unknown7);
                Writer.WriteUInt32(b.Entries[i].Unknown8);
            }
            Writer.WriteUInt32(b.Unknown4);
            Writer.WriteUInt32(b.Unknown5);
            Writer.WriteUInt32(b.Unknown6);
            Writer.WriteUInt32(b.Unknown7);
            Writer.WriteUInt32(b.Unknown8);
            Writer.WriteSingle(b.Unknown9);
            Writer.WriteSingle(b.float1);
            Writer.WriteSingle(b.float2);
            Writer.WriteSingle(b.float3);
            Writer.Close();
        }
예제 #4
0
 public BBLMEditor()
 {
     InitializeComponent();
     this.Text = this.Text + " | " + Version + " | By Wexos";
     BBLM      = new BBLM();
 }