Exemple #1
0
 private void CopySTMfromUDK(MemoryStream m, UDKObject u, int idx)
 {
     UDKLibWV.Classes.StaticMesh stm = new UDKLibWV.Classes.StaticMesh(u, idx);
     m.Write(BitConverter.GetBytes((int)0), 0, 4);
     WriteName(m, pcc.FindNameOrAdd("BodySetup"));
     WriteName(m, pcc.FindNameOrAdd("ObjectProperty"));
     WriteInt(m, 4);
     WriteInt(m, 0);
     WriteInt(m, 0);
     WriteName(m, pcc.FindNameOrAdd("UseSimpleBoxCollision"));
     WriteName(m, pcc.FindNameOrAdd("BoolProperty"));
     WriteInt(m, 0);
     WriteInt(m, 0);
     m.WriteByte(1);
     WriteName(m, pcc.FindNameOrAdd("None"));
     m.Write(stm.Bounds1, 0, stm.Bounds1.Length);
     WriteInt(m, 0);
     m.Write(stm.Bounds2, 0, stm.Bounds2.Length);
     m.Write(stm.Surfs, 0, stm.Surfs.Length);
     m.Write(stm.Faces, 0, stm.Faces.Length);
     WriteInt(m, 18);
     WriteInt(m, 1);
     WriteInt(m, 0);
     WriteInt(m, 0);
     WriteInt(m, 0);
     WriteInt(m, 0);
     m.Write(stm.Mats, 0, stm.Mats.Length);
     m.Write(stm.Tris, 0, 8);
     WriteInt(m, 1);
     m.Write(stm.Tris, 0, stm.Tris.Length);            
     m.Write(stm.Unk3, 0, stm.Unk3.Length);
     WriteInt(m, 0);
     m.Write(stm.UVs, 0, stm.UVs.Length);
     WriteInt(m, 0);
     WriteInt(m, 0);
     WriteInt(m, 4);
     WriteInt(m, 0);
     WriteInt(m, 4);
     m.Write(stm.Unk4, 4, 8);
     m.Write(stm.Indexes1, 0, stm.Indexes1.Length);
     WriteInt(m, 2);
     WriteInt(m, 0);
     WriteInt(m, 0x10);
     WriteInt(m, 0);
     WriteInt(m, 0);
     WriteInt(m, 1);
     WriteInt(m, 0);
     WriteInt(m, 0);
     WriteInt(m, 0);
     WriteInt(m, 0);
     WriteInt(m, 0);
     WriteInt(m, 0);
     WriteInt(m, 0);
     WriteInt(m, 0);
     WriteInt(m, 0);
     WriteInt(m, 0);
     WriteInt(m, 0);
 }
Exemple #2
0
 private void listBox7_SelectedIndexChanged(object sender, EventArgs e)
 {
     int n = listBox7.SelectedIndex;
     if (n == -1 || importudk == null)
         return;
     int idx = Objects[n];
     UDKLibWV.Classes.StaticMesh stm = new UDKLibWV.Classes.StaticMesh(importudk, idx);
     string s = "Bound Size 1 = " + stm.Bounds1.Length + " bytes \n";
     s += "Bound Size 2 = " + stm.Bounds2.Length + " bytes \n";
     s += "Surfaces Size = " + stm.Surfs.Length + " bytes \n";
     s += "Unk1 Size = " + stm.Unk1.Length + " bytes \n";
     s += "Unk2 Size = " + stm.Unk2.Length + " bytes \n";
     s += "Mats Size = " + stm.Mats.Length + " bytes \n";
     s += "Tris Size = " + stm.Tris.Length + " bytes \n";
     s += "Unk3 Size = " + stm.Unk3.Length + " bytes \n";
     s += "UVs Size = " + stm.UVs.Length + " bytes \n";
     s += "Unk4 Size = " + stm.Unk4.Length + " bytes \n";
     s += "Indexes 1 Size = " + stm.Indexes1.Length + " bytes \n";
     s += "Indexes 2 Size = " + stm.Indexes2.Length + " bytes \n";
     s += "Indexes 3 Size = " + stm.Indexes3.Length + " bytes \n";
     s += "Rest Size = " + stm.Rest.Length + " bytes \n";
     richTextBox1.Text = s;
 }