Peds form progress, playing peds animations and loading some textures

This commit is contained in:
dexy
2019-11-07 23:14:39 +11:00
Unverified
parent 8bfca3a338
commit 465b21d7ac
9 changed files with 687 additions and 395 deletions
+355 -286
View File
@@ -76,33 +76,38 @@
this.PedNameComboBox = new System.Windows.Forms.ComboBox();
this.StatsUpdateTimer = new System.Windows.Forms.Timer(this.components);
this.ToolsPedTabPage = new System.Windows.Forms.TabPage();
this.ToolsTabControl = new System.Windows.Forms.TabControl();
this.ToolsPanel = new System.Windows.Forms.Panel();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.CompHeadComboBox = new System.Windows.Forms.ComboBox();
this.label6 = new System.Windows.Forms.Label();
this.CompBerdComboBox = new System.Windows.Forms.ComboBox();
this.label7 = new System.Windows.Forms.Label();
this.CompHairComboBox = new System.Windows.Forms.ComboBox();
this.label8 = new System.Windows.Forms.Label();
this.CompUpprComboBox = new System.Windows.Forms.ComboBox();
this.label9 = new System.Windows.Forms.Label();
this.CompLowrComboBox = new System.Windows.Forms.ComboBox();
this.label12 = new System.Windows.Forms.Label();
this.CompHandComboBox = new System.Windows.Forms.ComboBox();
this.label13 = new System.Windows.Forms.Label();
this.CompFeetComboBox = new System.Windows.Forms.ComboBox();
this.label15 = new System.Windows.Forms.Label();
this.CompTeefComboBox = new System.Windows.Forms.ComboBox();
this.label16 = new System.Windows.Forms.Label();
this.CompAccsComboBox = new System.Windows.Forms.ComboBox();
this.label17 = new System.Windows.Forms.Label();
this.CompTaskComboBox = new System.Windows.Forms.ComboBox();
this.label18 = new System.Windows.Forms.Label();
this.CompDeclComboBox = new System.Windows.Forms.ComboBox();
this.label20 = new System.Windows.Forms.Label();
this.CompJbibComboBox = new System.Windows.Forms.ComboBox();
this.label18 = new System.Windows.Forms.Label();
this.CompDeclComboBox = new System.Windows.Forms.ComboBox();
this.label17 = new System.Windows.Forms.Label();
this.CompTaskComboBox = new System.Windows.Forms.ComboBox();
this.label16 = new System.Windows.Forms.Label();
this.CompAccsComboBox = new System.Windows.Forms.ComboBox();
this.label15 = new System.Windows.Forms.Label();
this.CompTeefComboBox = new System.Windows.Forms.ComboBox();
this.label13 = new System.Windows.Forms.Label();
this.CompFeetComboBox = new System.Windows.Forms.ComboBox();
this.label12 = new System.Windows.Forms.Label();
this.CompHandComboBox = new System.Windows.Forms.ComboBox();
this.label9 = new System.Windows.Forms.Label();
this.CompLowrComboBox = new System.Windows.Forms.ComboBox();
this.label8 = new System.Windows.Forms.Label();
this.CompUpprComboBox = new System.Windows.Forms.ComboBox();
this.label7 = new System.Windows.Forms.Label();
this.CompHairComboBox = new System.Windows.Forms.ComboBox();
this.label6 = new System.Windows.Forms.Label();
this.CompBerdComboBox = new System.Windows.Forms.ComboBox();
this.label5 = new System.Windows.Forms.Label();
this.CompHeadComboBox = new System.Windows.Forms.ComboBox();
this.label4 = new System.Windows.Forms.Label();
this.ToolsTabControl = new System.Windows.Forms.TabControl();
this.ToolsPanel = new System.Windows.Forms.Panel();
this.label21 = new System.Windows.Forms.Label();
this.ClipDictComboBox = new System.Windows.Forms.ComboBox();
this.label22 = new System.Windows.Forms.Label();
this.ClipComboBox = new System.Windows.Forms.ComboBox();
this.label23 = new System.Windows.Forms.Label();
this.ConsolePanel.SuspendLayout();
this.ToolsOptionsTabPage.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.TimeOfDayTrackBar)).BeginInit();
@@ -651,6 +656,11 @@
//
// ToolsPedTabPage
//
this.ToolsPedTabPage.Controls.Add(this.label23);
this.ToolsPedTabPage.Controls.Add(this.label22);
this.ToolsPedTabPage.Controls.Add(this.ClipComboBox);
this.ToolsPedTabPage.Controls.Add(this.label21);
this.ToolsPedTabPage.Controls.Add(this.ClipDictComboBox);
this.ToolsPedTabPage.Controls.Add(this.label20);
this.ToolsPedTabPage.Controls.Add(this.CompJbibComboBox);
this.ToolsPedTabPage.Controls.Add(this.label18);
@@ -685,6 +695,279 @@
this.ToolsPedTabPage.Text = "Ped";
this.ToolsPedTabPage.UseVisualStyleBackColor = true;
//
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(22, 373);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(29, 13);
this.label20.TabIndex = 26;
this.label20.Text = "Jbib:";
//
// CompJbibComboBox
//
this.CompJbibComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CompJbibComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CompJbibComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CompJbibComboBox.FormattingEnabled = true;
this.CompJbibComboBox.Location = new System.Drawing.Point(54, 370);
this.CompJbibComboBox.Name = "CompJbibComboBox";
this.CompJbibComboBox.Size = new System.Drawing.Size(182, 21);
this.CompJbibComboBox.TabIndex = 25;
this.CompJbibComboBox.SelectedIndexChanged += new System.EventHandler(this.CompJbibComboBox_SelectedIndexChanged);
//
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(19, 346);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(32, 13);
this.label18.TabIndex = 24;
this.label18.Text = "Decl:";
//
// CompDeclComboBox
//
this.CompDeclComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CompDeclComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CompDeclComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CompDeclComboBox.FormattingEnabled = true;
this.CompDeclComboBox.Location = new System.Drawing.Point(54, 343);
this.CompDeclComboBox.Name = "CompDeclComboBox";
this.CompDeclComboBox.Size = new System.Drawing.Size(182, 21);
this.CompDeclComboBox.TabIndex = 23;
this.CompDeclComboBox.SelectedIndexChanged += new System.EventHandler(this.CompDeclComboBox_SelectedIndexChanged);
//
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(17, 319);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(34, 13);
this.label17.TabIndex = 22;
this.label17.Text = "Task:";
//
// CompTaskComboBox
//
this.CompTaskComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CompTaskComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CompTaskComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CompTaskComboBox.FormattingEnabled = true;
this.CompTaskComboBox.Location = new System.Drawing.Point(54, 316);
this.CompTaskComboBox.Name = "CompTaskComboBox";
this.CompTaskComboBox.Size = new System.Drawing.Size(182, 21);
this.CompTaskComboBox.TabIndex = 21;
this.CompTaskComboBox.SelectedIndexChanged += new System.EventHandler(this.CompTaskComboBox_SelectedIndexChanged);
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(17, 292);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(34, 13);
this.label16.TabIndex = 20;
this.label16.Text = "Accs:";
//
// CompAccsComboBox
//
this.CompAccsComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CompAccsComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CompAccsComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CompAccsComboBox.FormattingEnabled = true;
this.CompAccsComboBox.Location = new System.Drawing.Point(54, 289);
this.CompAccsComboBox.Name = "CompAccsComboBox";
this.CompAccsComboBox.Size = new System.Drawing.Size(182, 21);
this.CompAccsComboBox.TabIndex = 19;
this.CompAccsComboBox.SelectedIndexChanged += new System.EventHandler(this.CompAccsComboBox_SelectedIndexChanged);
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(19, 265);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(32, 13);
this.label15.TabIndex = 18;
this.label15.Text = "Teef:";
//
// CompTeefComboBox
//
this.CompTeefComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CompTeefComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CompTeefComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CompTeefComboBox.FormattingEnabled = true;
this.CompTeefComboBox.Location = new System.Drawing.Point(54, 262);
this.CompTeefComboBox.Name = "CompTeefComboBox";
this.CompTeefComboBox.Size = new System.Drawing.Size(182, 21);
this.CompTeefComboBox.TabIndex = 17;
this.CompTeefComboBox.SelectedIndexChanged += new System.EventHandler(this.CompTeefComboBox_SelectedIndexChanged);
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(20, 238);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(31, 13);
this.label13.TabIndex = 16;
this.label13.Text = "Feet:";
//
// CompFeetComboBox
//
this.CompFeetComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CompFeetComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CompFeetComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CompFeetComboBox.FormattingEnabled = true;
this.CompFeetComboBox.Location = new System.Drawing.Point(54, 235);
this.CompFeetComboBox.Name = "CompFeetComboBox";
this.CompFeetComboBox.Size = new System.Drawing.Size(182, 21);
this.CompFeetComboBox.TabIndex = 15;
this.CompFeetComboBox.SelectedIndexChanged += new System.EventHandler(this.CompFeetComboBox_SelectedIndexChanged);
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(15, 211);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(36, 13);
this.label12.TabIndex = 14;
this.label12.Text = "Hand:";
//
// CompHandComboBox
//
this.CompHandComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CompHandComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CompHandComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CompHandComboBox.FormattingEnabled = true;
this.CompHandComboBox.Location = new System.Drawing.Point(54, 208);
this.CompHandComboBox.Name = "CompHandComboBox";
this.CompHandComboBox.Size = new System.Drawing.Size(182, 21);
this.CompHandComboBox.TabIndex = 13;
this.CompHandComboBox.SelectedIndexChanged += new System.EventHandler(this.CompHandComboBox_SelectedIndexChanged);
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(18, 184);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(33, 13);
this.label9.TabIndex = 12;
this.label9.Text = "Lowr:";
//
// CompLowrComboBox
//
this.CompLowrComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CompLowrComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CompLowrComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CompLowrComboBox.FormattingEnabled = true;
this.CompLowrComboBox.Location = new System.Drawing.Point(54, 181);
this.CompLowrComboBox.Name = "CompLowrComboBox";
this.CompLowrComboBox.Size = new System.Drawing.Size(182, 21);
this.CompLowrComboBox.TabIndex = 11;
this.CompLowrComboBox.SelectedIndexChanged += new System.EventHandler(this.CompLowrComboBox_SelectedIndexChanged);
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(18, 157);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(33, 13);
this.label8.TabIndex = 10;
this.label8.Text = "Uppr:";
//
// CompUpprComboBox
//
this.CompUpprComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CompUpprComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CompUpprComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CompUpprComboBox.FormattingEnabled = true;
this.CompUpprComboBox.Location = new System.Drawing.Point(54, 154);
this.CompUpprComboBox.Name = "CompUpprComboBox";
this.CompUpprComboBox.Size = new System.Drawing.Size(182, 21);
this.CompUpprComboBox.TabIndex = 9;
this.CompUpprComboBox.SelectedIndexChanged += new System.EventHandler(this.CompUpprComboBox_SelectedIndexChanged);
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(22, 130);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(29, 13);
this.label7.TabIndex = 8;
this.label7.Text = "Hair:";
//
// CompHairComboBox
//
this.CompHairComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CompHairComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CompHairComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CompHairComboBox.FormattingEnabled = true;
this.CompHairComboBox.Location = new System.Drawing.Point(54, 127);
this.CompHairComboBox.Name = "CompHairComboBox";
this.CompHairComboBox.Size = new System.Drawing.Size(182, 21);
this.CompHairComboBox.TabIndex = 7;
this.CompHairComboBox.SelectedIndexChanged += new System.EventHandler(this.CompHairComboBox_SelectedIndexChanged);
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(19, 103);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(32, 13);
this.label6.TabIndex = 6;
this.label6.Text = "Berd:";
//
// CompBerdComboBox
//
this.CompBerdComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CompBerdComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CompBerdComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CompBerdComboBox.FormattingEnabled = true;
this.CompBerdComboBox.Location = new System.Drawing.Point(54, 100);
this.CompBerdComboBox.Name = "CompBerdComboBox";
this.CompBerdComboBox.Size = new System.Drawing.Size(182, 21);
this.CompBerdComboBox.TabIndex = 5;
this.CompBerdComboBox.SelectedIndexChanged += new System.EventHandler(this.CompBerdComboBox_SelectedIndexChanged);
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(15, 76);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(36, 13);
this.label5.TabIndex = 4;
this.label5.Text = "Head:";
//
// CompHeadComboBox
//
this.CompHeadComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CompHeadComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CompHeadComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CompHeadComboBox.FormattingEnabled = true;
this.CompHeadComboBox.Location = new System.Drawing.Point(54, 73);
this.CompHeadComboBox.Name = "CompHeadComboBox";
this.CompHeadComboBox.Size = new System.Drawing.Size(182, 21);
this.CompHeadComboBox.TabIndex = 3;
this.CompHeadComboBox.SelectedIndexChanged += new System.EventHandler(this.CompHeadComboBox_SelectedIndexChanged);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(3, 53);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(69, 13);
this.label4.TabIndex = 2;
this.label4.Text = "Components:";
//
// ToolsTabControl
//
this.ToolsTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@@ -715,278 +998,59 @@
this.ToolsPanel.TabIndex = 7;
this.ToolsPanel.Visible = false;
//
// label4
// label21
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(3, 53);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(69, 13);
this.label4.TabIndex = 2;
this.label4.Text = "Components:";
this.label21.AutoSize = true;
this.label21.Location = new System.Drawing.Point(2, 445);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(49, 13);
this.label21.TabIndex = 28;
this.label21.Text = "Clip Dict:";
//
// label5
// ClipDictComboBox
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(12, 76);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(36, 13);
this.label5.TabIndex = 4;
this.label5.Text = "Head:";
//
// CompHeadComboBox
//
this.CompHeadComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
this.ClipDictComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CompHeadComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CompHeadComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CompHeadComboBox.FormattingEnabled = true;
this.CompHeadComboBox.Location = new System.Drawing.Point(54, 73);
this.CompHeadComboBox.Name = "CompHeadComboBox";
this.CompHeadComboBox.Size = new System.Drawing.Size(182, 21);
this.CompHeadComboBox.TabIndex = 3;
this.CompHeadComboBox.SelectedIndexChanged += new System.EventHandler(this.CompHeadComboBox_SelectedIndexChanged);
this.ClipDictComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.ClipDictComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource;
this.ClipDictComboBox.FormattingEnabled = true;
this.ClipDictComboBox.Location = new System.Drawing.Point(54, 442);
this.ClipDictComboBox.Name = "ClipDictComboBox";
this.ClipDictComboBox.Size = new System.Drawing.Size(182, 21);
this.ClipDictComboBox.TabIndex = 27;
this.ClipDictComboBox.TextChanged += new System.EventHandler(this.ClipDictComboBox_TextChanged);
//
// label6
// label22
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(16, 103);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(32, 13);
this.label6.TabIndex = 6;
this.label6.Text = "Berd:";
this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(24, 472);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(27, 13);
this.label22.TabIndex = 30;
this.label22.Text = "Clip:";
//
// CompBerdComboBox
// ClipComboBox
//
this.CompBerdComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
this.ClipComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CompBerdComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CompBerdComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CompBerdComboBox.FormattingEnabled = true;
this.CompBerdComboBox.Location = new System.Drawing.Point(54, 100);
this.CompBerdComboBox.Name = "CompBerdComboBox";
this.CompBerdComboBox.Size = new System.Drawing.Size(182, 21);
this.CompBerdComboBox.TabIndex = 5;
this.CompBerdComboBox.SelectedIndexChanged += new System.EventHandler(this.CompBerdComboBox_SelectedIndexChanged);
this.ClipComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.ClipComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.ClipComboBox.FormattingEnabled = true;
this.ClipComboBox.Location = new System.Drawing.Point(54, 469);
this.ClipComboBox.Name = "ClipComboBox";
this.ClipComboBox.Size = new System.Drawing.Size(182, 21);
this.ClipComboBox.TabIndex = 29;
this.ClipComboBox.SelectedIndexChanged += new System.EventHandler(this.ClipComboBox_SelectedIndexChanged);
this.ClipComboBox.TextChanged += new System.EventHandler(this.ClipComboBox_TextChanged);
//
// label7
// label23
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(19, 130);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(29, 13);
this.label7.TabIndex = 8;
this.label7.Text = "Hair:";
//
// CompHairComboBox
//
this.CompHairComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CompHairComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CompHairComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CompHairComboBox.FormattingEnabled = true;
this.CompHairComboBox.Location = new System.Drawing.Point(54, 127);
this.CompHairComboBox.Name = "CompHairComboBox";
this.CompHairComboBox.Size = new System.Drawing.Size(182, 21);
this.CompHairComboBox.TabIndex = 7;
this.CompHairComboBox.SelectedIndexChanged += new System.EventHandler(this.CompHairComboBox_SelectedIndexChanged);
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(15, 157);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(33, 13);
this.label8.TabIndex = 10;
this.label8.Text = "Uppr:";
//
// CompUpprComboBox
//
this.CompUpprComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CompUpprComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CompUpprComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CompUpprComboBox.FormattingEnabled = true;
this.CompUpprComboBox.Location = new System.Drawing.Point(54, 154);
this.CompUpprComboBox.Name = "CompUpprComboBox";
this.CompUpprComboBox.Size = new System.Drawing.Size(182, 21);
this.CompUpprComboBox.TabIndex = 9;
this.CompUpprComboBox.SelectedIndexChanged += new System.EventHandler(this.CompUpprComboBox_SelectedIndexChanged);
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(15, 184);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(33, 13);
this.label9.TabIndex = 12;
this.label9.Text = "Lowr:";
//
// CompLowrComboBox
//
this.CompLowrComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CompLowrComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CompLowrComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CompLowrComboBox.FormattingEnabled = true;
this.CompLowrComboBox.Location = new System.Drawing.Point(54, 181);
this.CompLowrComboBox.Name = "CompLowrComboBox";
this.CompLowrComboBox.Size = new System.Drawing.Size(182, 21);
this.CompLowrComboBox.TabIndex = 11;
this.CompLowrComboBox.SelectedIndexChanged += new System.EventHandler(this.CompLowrComboBox_SelectedIndexChanged);
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(12, 211);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(36, 13);
this.label12.TabIndex = 14;
this.label12.Text = "Hand:";
//
// CompHandComboBox
//
this.CompHandComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CompHandComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CompHandComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CompHandComboBox.FormattingEnabled = true;
this.CompHandComboBox.Location = new System.Drawing.Point(54, 208);
this.CompHandComboBox.Name = "CompHandComboBox";
this.CompHandComboBox.Size = new System.Drawing.Size(182, 21);
this.CompHandComboBox.TabIndex = 13;
this.CompHandComboBox.SelectedIndexChanged += new System.EventHandler(this.CompHandComboBox_SelectedIndexChanged);
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(17, 238);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(31, 13);
this.label13.TabIndex = 16;
this.label13.Text = "Feet:";
//
// CompFeetComboBox
//
this.CompFeetComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CompFeetComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CompFeetComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CompFeetComboBox.FormattingEnabled = true;
this.CompFeetComboBox.Location = new System.Drawing.Point(54, 235);
this.CompFeetComboBox.Name = "CompFeetComboBox";
this.CompFeetComboBox.Size = new System.Drawing.Size(182, 21);
this.CompFeetComboBox.TabIndex = 15;
this.CompFeetComboBox.SelectedIndexChanged += new System.EventHandler(this.CompFeetComboBox_SelectedIndexChanged);
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(16, 265);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(32, 13);
this.label15.TabIndex = 18;
this.label15.Text = "Teef:";
//
// CompTeefComboBox
//
this.CompTeefComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CompTeefComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CompTeefComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CompTeefComboBox.FormattingEnabled = true;
this.CompTeefComboBox.Location = new System.Drawing.Point(54, 262);
this.CompTeefComboBox.Name = "CompTeefComboBox";
this.CompTeefComboBox.Size = new System.Drawing.Size(182, 21);
this.CompTeefComboBox.TabIndex = 17;
this.CompTeefComboBox.SelectedIndexChanged += new System.EventHandler(this.CompTeefComboBox_SelectedIndexChanged);
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(14, 292);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(34, 13);
this.label16.TabIndex = 20;
this.label16.Text = "Accs:";
//
// CompAccsComboBox
//
this.CompAccsComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CompAccsComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CompAccsComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CompAccsComboBox.FormattingEnabled = true;
this.CompAccsComboBox.Location = new System.Drawing.Point(54, 289);
this.CompAccsComboBox.Name = "CompAccsComboBox";
this.CompAccsComboBox.Size = new System.Drawing.Size(182, 21);
this.CompAccsComboBox.TabIndex = 19;
this.CompAccsComboBox.SelectedIndexChanged += new System.EventHandler(this.CompAccsComboBox_SelectedIndexChanged);
//
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(14, 319);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(34, 13);
this.label17.TabIndex = 22;
this.label17.Text = "Task:";
//
// CompTaskComboBox
//
this.CompTaskComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CompTaskComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CompTaskComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CompTaskComboBox.FormattingEnabled = true;
this.CompTaskComboBox.Location = new System.Drawing.Point(54, 316);
this.CompTaskComboBox.Name = "CompTaskComboBox";
this.CompTaskComboBox.Size = new System.Drawing.Size(182, 21);
this.CompTaskComboBox.TabIndex = 21;
this.CompTaskComboBox.SelectedIndexChanged += new System.EventHandler(this.CompTaskComboBox_SelectedIndexChanged);
//
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(16, 346);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(32, 13);
this.label18.TabIndex = 24;
this.label18.Text = "Decl:";
//
// CompDeclComboBox
//
this.CompDeclComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CompDeclComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CompDeclComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CompDeclComboBox.FormattingEnabled = true;
this.CompDeclComboBox.Location = new System.Drawing.Point(54, 343);
this.CompDeclComboBox.Name = "CompDeclComboBox";
this.CompDeclComboBox.Size = new System.Drawing.Size(182, 21);
this.CompDeclComboBox.TabIndex = 23;
this.CompDeclComboBox.SelectedIndexChanged += new System.EventHandler(this.CompDeclComboBox_SelectedIndexChanged);
//
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(19, 373);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(29, 13);
this.label20.TabIndex = 26;
this.label20.Text = "Jbib:";
//
// CompJbibComboBox
//
this.CompJbibComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CompJbibComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CompJbibComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CompJbibComboBox.FormattingEnabled = true;
this.CompJbibComboBox.Location = new System.Drawing.Point(54, 370);
this.CompJbibComboBox.Name = "CompJbibComboBox";
this.CompJbibComboBox.Size = new System.Drawing.Size(182, 21);
this.CompJbibComboBox.TabIndex = 25;
this.CompJbibComboBox.SelectedIndexChanged += new System.EventHandler(this.CompJbibComboBox_SelectedIndexChanged);
this.label23.AutoSize = true;
this.label23.Location = new System.Drawing.Point(3, 422);
this.label23.Name = "label23";
this.label23.Size = new System.Drawing.Size(56, 13);
this.label23.TabIndex = 31;
this.label23.Text = "Animation:";
//
// PedsForm
//
@@ -1103,5 +1167,10 @@
private System.Windows.Forms.ComboBox CompJbibComboBox;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.ComboBox CompDeclComboBox;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.ComboBox ClipComboBox;
private System.Windows.Forms.Label label21;
private System.Windows.Forms.ComboBox ClipDictComboBox;
private System.Windows.Forms.Label label23;
}
}
+228 -68
View File
@@ -74,12 +74,6 @@ namespace CodeWalker.Peds
string SelectedPedName = string.Empty;
MetaHash SelectedPedHash = 0;//ped name hash
CPedModelInfo__InitData SelectedPedInit = null; //ped init data
YddFile SelectedPedYdd = null; //ped drawables
YftFile SelectedPedYft = null; //ped skeleton YFT
PedFile SelectedPedYmt = null; //ped variation info
Drawable SelectedHead = null;
Drawable SelectedBerd = null;
@@ -94,8 +88,24 @@ namespace CodeWalker.Peds
Drawable SelectedDecl = null;
Drawable SelectedJbib = null;
[TypeConverter(typeof(ExpandableObjectConverter))] public class PedSelection
{
public string Name { get; set; } = string.Empty;
public MetaHash NameHash { get; set; } = 0;//ped name hash
public CPedModelInfo__InitData InitData { get; set; } = null; //ped init data
public YddFile Ydd { get; set; } = null; //ped drawables
public YtdFile Ytd { get; set; } = null; //ped textures
public YcdFile Ycd { get; set; } = null; //ped animations
public YftFile Yft { get; set; } = null; //ped skeleton YFT
public PedFile Ymt { get; set; } = null; //ped variation info
public Dictionary<MetaHash, RpfFileEntry> DrawableFilesDict { get; set; } = null;
public Dictionary<MetaHash, RpfFileEntry> TextureFilesDict { get; set; } = null;
public RpfFileEntry[] DrawableFiles { get; set; } = null;
public RpfFileEntry[] TextureFiles { get; set; } = null;
public ClipMapEntry AnimClip { get; set; } = null;
}
PedSelection SelectedPed = new PedSelection();
@@ -118,9 +128,9 @@ namespace CodeWalker.Peds
//Renderer.renderclouds = true;
//Renderer.individualcloudfrag = "Contrails";
Renderer.rendermoon = false;
Renderer.renderskeletons = true;
Renderer.SelectionFlagsTestAll = true;
Renderer.renderskeletons = false;
//Renderer.SelectionFlagsTestAll = true;
Renderer.swaphemisphere = true;
}
public void InitScene(Device device)
@@ -146,8 +156,8 @@ namespace CodeWalker.Peds
camera.CurrentDistance = 2.0f;
camera.TargetRotation.Y = 0.2f;
camera.CurrentRotation.Y = 0.2f;
camera.TargetRotation.X = 0.5f * (float)Math.PI;
camera.CurrentRotation.X = 0.5f * (float)Math.PI;
camera.TargetRotation.X = 1.0f * (float)Math.PI;
camera.CurrentRotation.X = 1.0f * (float)Math.PI;
LoadSettings();
@@ -454,8 +464,8 @@ namespace CodeWalker.Peds
rad = Math.Max(0.01f, rad*0.1f);
camera.FollowEntity.Position = pos;
camera.TargetDistance = rad * 1.6f;
camera.CurrentDistance = rad * 1.6f;
camera.TargetDistance = rad * 1.2f;
camera.CurrentDistance = rad * 1.2f;
camera.ZFar = Math.Min(rad * 200.0f, 12000.0f);
camera.ZNear = Math.Min(camera.ZFar * 5e-5f, 0.5f);
@@ -614,8 +624,23 @@ namespace CodeWalker.Peds
}
else
{
PedNameComboBox.Items.Clear();
ClipComboBox.Items.Clear();
ClipDictComboBox.Items.Clear();
var ycds = GameFileCache.YcdDict.Values.ToList();
ycds.Sort((a, b) => { return a.Name.CompareTo(b.Name); });
ClipDictComboBox.AutoCompleteCustomSource.Clear();
List<string> ycdlist = new List<string>();
foreach (var ycde in ycds)
{
ycdlist.Add(ycde.GetShortName());
}
ClipDictComboBox.AutoCompleteCustomSource.AddRange(ycdlist.ToArray());
ClipDictComboBox.Text = "";
PedNameComboBox.Items.Clear();
var peds = GameFileCache.PedsInitDict.Values.ToList();
peds.Sort((a, b) => { return a.Name.CompareTo(b.Name); });
foreach (var ped in peds)
@@ -624,7 +649,9 @@ namespace CodeWalker.Peds
}
if (peds.Count > 0)
{
PedNameComboBox.SelectedIndex = 0;
var ind = PedNameComboBox.FindString("A_F_M_Beach_01"); // //A_C_Pug
PedNameComboBox.SelectedIndex = Math.Max(ind, 0);
//PedNameComboBox.SelectedIndex = 0;
}
}
@@ -688,12 +715,15 @@ namespace CodeWalker.Peds
var pednamel = pedname.ToLowerInvariant();
MetaHash pedhash = JenkHash.GenHash(pednamel);
SelectedPedName = string.Empty;
SelectedPedHash = 0;
SelectedPedInit = null;
SelectedPedYdd = null;
SelectedPedYft = null;
SelectedPedYmt = null;
SelectedPed.Name = string.Empty;
SelectedPed.NameHash = 0;
SelectedPed.InitData = null;
SelectedPed.Ydd = null;
SelectedPed.Ytd = null;
SelectedPed.Ycd = null;
SelectedPed.Yft = null;
SelectedPed.Ymt = null;
SelectedPed.AnimClip = null;
ClearCombo(CompHeadComboBox); SelectedHead = null;
ClearCombo(CompBerdComboBox); SelectedBerd = null;
ClearCombo(CompHairComboBox); SelectedHair = null;
@@ -707,51 +737,89 @@ namespace CodeWalker.Peds
ClearCombo(CompDeclComboBox); SelectedDecl = null;
ClearCombo(CompJbibComboBox); SelectedJbib = null;
DetailsPropertyGrid.SelectedObject = null;
CPedModelInfo__InitData initdata = null;
if (!GameFileCache.PedsInitDict.TryGetValue(pedhash, out initdata)) return;
bool pedchange = SelectedPedHash != pedhash;
SelectedPedName = pedname;
SelectedPedHash = pedhash;
SelectedPedInit = initdata;
SelectedPedYdd = GameFileCache.GetYdd(pedhash);
SelectedPedYft = GameFileCache.GetYft(pedhash);
GameFileCache.PedVariationsDict?.TryGetValue(pedhash, out SelectedPedYmt);
var ycdhash = JenkHash.GenHash(initdata.ClipDictionaryName.ToLowerInvariant());
while ((SelectedPedYdd != null) && (!SelectedPedYdd.Loaded))
bool pedchange = SelectedPed.NameHash != pedhash;
SelectedPed.Name = pedname;
SelectedPed.NameHash = pedhash;
SelectedPed.InitData = initdata;
SelectedPed.Ydd = GameFileCache.GetYdd(pedhash);
SelectedPed.Ytd = GameFileCache.GetYtd(pedhash);
SelectedPed.Ycd = GameFileCache.GetYcd(ycdhash);
SelectedPed.Yft = GameFileCache.GetYft(pedhash);
PedFile pedFile = null;
GameFileCache.PedVariationsDict?.TryGetValue(pedhash, out pedFile);
SelectedPed.Ymt = pedFile;
Dictionary<MetaHash, RpfFileEntry> peddict = null;
GameFileCache.PedDrawableDicts.TryGetValue(SelectedPed.NameHash, out peddict);
SelectedPed.DrawableFilesDict = peddict;
SelectedPed.DrawableFiles = SelectedPed.DrawableFilesDict?.Values.ToArray();
GameFileCache.PedTextureDicts.TryGetValue(SelectedPed.NameHash, out peddict);
SelectedPed.TextureFilesDict = peddict;
SelectedPed.TextureFiles = SelectedPed.TextureFilesDict?.Values.ToArray();
while ((SelectedPed.Ydd != null) && (!SelectedPed.Ydd.Loaded))
{
Thread.Sleep(20);//kinda hacky
SelectedPedYdd = GameFileCache.GetYdd(SelectedPedHash);
SelectedPed.Ydd = GameFileCache.GetYdd(pedhash);
}
while ((SelectedPedYft != null) && (!SelectedPedYft.Loaded))
while ((SelectedPed.Ytd != null) && (!SelectedPed.Ytd.Loaded))
{
Thread.Sleep(20);//kinda hacky
SelectedPedYft = GameFileCache.GetYft(SelectedPedHash);
SelectedPed.Ytd = GameFileCache.GetYtd(pedhash);
}
while ((SelectedPed.Ycd != null) && (!SelectedPed.Ycd.Loaded))
{
Thread.Sleep(20);//kinda hacky
SelectedPed.Ycd = GameFileCache.GetYcd(ycdhash);
}
while ((SelectedPed.Yft != null) && (!SelectedPed.Yft.Loaded))
{
Thread.Sleep(20);//kinda hacky
SelectedPed.Yft = GameFileCache.GetYft(pedhash);
}
LoadModel(SelectedPedYft, pedchange);
LoadModel(SelectedPed.Yft, pedchange);
var vi = SelectedPedYmt?.VariationInfo;
var vi = SelectedPed.Ymt?.VariationInfo;
if (vi != null)
{
PopulateCompCombo(CompHeadComboBox, vi.GetVariations(0));
PopulateCompCombo(CompBerdComboBox, vi.GetVariations(1));
PopulateCompCombo(CompHairComboBox, vi.GetVariations(2));
PopulateCompCombo(CompUpprComboBox, vi.GetVariations(3));
PopulateCompCombo(CompLowrComboBox, vi.GetVariations(4));
PopulateCompCombo(CompHandComboBox, vi.GetVariations(5));
PopulateCompCombo(CompFeetComboBox, vi.GetVariations(6));
PopulateCompCombo(CompTeefComboBox, vi.GetVariations(7));
PopulateCompCombo(CompAccsComboBox, vi.GetVariations(8));
PopulateCompCombo(CompTaskComboBox, vi.GetVariations(9));
PopulateCompCombo(CompDeclComboBox, vi.GetVariations(10));
PopulateCompCombo(CompJbibComboBox, vi.GetVariations(11));
PopulateCompCombo(CompHeadComboBox, vi.GetComponentData(0));
PopulateCompCombo(CompBerdComboBox, vi.GetComponentData(1));
PopulateCompCombo(CompHairComboBox, vi.GetComponentData(2));
PopulateCompCombo(CompUpprComboBox, vi.GetComponentData(3));
PopulateCompCombo(CompLowrComboBox, vi.GetComponentData(4));
PopulateCompCombo(CompHandComboBox, vi.GetComponentData(5));
PopulateCompCombo(CompFeetComboBox, vi.GetComponentData(6));
PopulateCompCombo(CompTeefComboBox, vi.GetComponentData(7));
PopulateCompCombo(CompAccsComboBox, vi.GetComponentData(8));
PopulateCompCombo(CompTaskComboBox, vi.GetComponentData(9));
PopulateCompCombo(CompDeclComboBox, vi.GetComponentData(10));
PopulateCompCombo(CompJbibComboBox, vi.GetComponentData(11));
}
ClipDictComboBox.Text = SelectedPed.InitData?.ClipDictionaryName ?? "";
ClipComboBox.Text = "idle";
MetaHash cliphash = JenkHash.GenHash("idle");
ClipMapEntry cme = null;
SelectedPed.Ycd?.ClipMap?.TryGetValue(cliphash, out cme);
SelectedPed.AnimClip = cme;
DetailsPropertyGrid.SelectedObject = SelectedPed;
}
public void LoadModel(YftFile yft, bool movecamera = true)
@@ -775,18 +843,19 @@ namespace CodeWalker.Peds
private void ClearCombo(ComboBox c)
{
c.Items.Clear();
c.Items.Add("");
c.Text = string.Empty;
}
private void PopulateCompCombo(ComboBox c, MUnk_3538495220 vars)
private void PopulateCompCombo(ComboBox c, MUnk_3538495220 compData)
{
if (vars?.Variations == null) return;
foreach (var item in vars.Variations)
if (compData?.DrawblData3 == null) return;
foreach (var item in compData.DrawblData3)
{
c.Items.Add(item.GetDrawableName());
}
if (vars.Variations.Length > 0)
if (compData.DrawblData3.Length > 0)
{
c.SelectedIndex = 0;
c.SelectedIndex = 1;
}
}
@@ -794,20 +863,21 @@ namespace CodeWalker.Peds
private Drawable GetComponentDrawable(string name)
{
if (string.IsNullOrEmpty(name)) return null;
var namel = name.ToLowerInvariant();
MetaHash hash = JenkHash.GenHash(namel);
Drawable d;
if (SelectedPedYdd?.Dict != null)
if (SelectedPed.Ydd?.Dict != null)
{
if (SelectedPedYdd.Dict.TryGetValue(hash, out d)) return d;
if (SelectedPed.Ydd.Dict.TryGetValue(hash, out d)) return d;
}
Dictionary<MetaHash, RpfFileEntry> peddict = null;
if (GameFileCache.PedDrawableDicts.TryGetValue(SelectedPedHash, out peddict))
if (SelectedPed.DrawableFilesDict != null)
{
RpfFileEntry file = null;
if (peddict.TryGetValue(hash, out file))
if (SelectedPed.DrawableFilesDict.TryGetValue(hash, out file))
{
var ydd = GameFileCache.GetFileUncached<YddFile>(file);
while ((ydd != null) && (!ydd.Loaded))
@@ -1011,31 +1081,65 @@ namespace CodeWalker.Peds
private void RenderPed()
{
YftFile yft = SelectedPedYft;// GameFileCache.GetYft(SelectedModelHash);
YftFile yft = SelectedPed.Yft;// GameFileCache.GetYft(SelectedModelHash);
if (yft != null)
{
if (yft.Loaded)
{
if (yft.Fragment != null)
{
var f = yft.Fragment;
var txdhash = 0u;// SelectedVehicleHash;// yft.RpfFileEntry?.ShortNameHash ?? 0;
//var f = yft.Fragment;
//var txdhash = 0u;// SelectedVehicleHash;// yft.RpfFileEntry?.ShortNameHash ?? 0;
//var namelower = yft.RpfFileEntry?.GetShortNameLower();
Archetype arch = null;// TryGetArchetype(hash);
Renderer.RenderFragment(arch, null, f, txdhash);
//Archetype arch = null;// TryGetArchetype(hash);
//Renderer.RenderFragment(arch, null, f, txdhash);
//seldrwbl = f.Drawable;
}
}
}
var vi = SelectedPed.Ymt?.VariationInfo;
if (vi != null)
{
RenderPedComponent(SelectedHead, vi.GetComponentData(0));
RenderPedComponent(SelectedBerd, vi.GetComponentData(1));
RenderPedComponent(SelectedHair, vi.GetComponentData(2));
RenderPedComponent(SelectedUppr, vi.GetComponentData(3));
RenderPedComponent(SelectedLowr, vi.GetComponentData(4));
RenderPedComponent(SelectedHand, vi.GetComponentData(5));
RenderPedComponent(SelectedFeet, vi.GetComponentData(6));
RenderPedComponent(SelectedTeef, vi.GetComponentData(7));
RenderPedComponent(SelectedAccs, vi.GetComponentData(8));
RenderPedComponent(SelectedTask, vi.GetComponentData(9));
RenderPedComponent(SelectedDecl, vi.GetComponentData(10));
RenderPedComponent(SelectedJbib, vi.GetComponentData(11));
}
}
}
private void RenderPedComponent(Drawable drawable, MUnk_3538495220 compData)
{
if (drawable == null) return;
if (compData == null) return;
var td = SelectedPed.Ytd?.TextureDict;
var ac = SelectedPed.AnimClip;
var skel = SelectedPed.Yft?.Fragment?.Drawable?.Skeleton;
if (skel != null)
{
drawable.Skeleton = skel;
}
Renderer.RenderDrawable(drawable, null, null, 0, td, ac);
}
@@ -1598,7 +1702,63 @@ namespace CodeWalker.Peds
SelectedJbib = GetComponentDrawable(CompJbibComboBox.Text);
}
private void ClipDictComboBox_TextChanged(object sender, EventArgs e)
{
var ycdhash = JenkHash.GenHash(ClipDictComboBox.Text.ToLowerInvariant());
var ycd = GameFileCache.GetYcd(ycdhash);
while ((ycd != null) && (!ycd.Loaded))
{
Thread.Sleep(20);//kinda hacky
ycd = GameFileCache.GetYcd(ycdhash);
}
SelectedPed.Ycd = ycd;
ClipComboBox.Items.Clear();
ClipComboBox.Items.Add("");
if (ycd?.ClipMapEntries == null)
{
ClipComboBox.SelectedIndex = 0;
SelectedPed.AnimClip = null;
return;
}
foreach (var cme in ycd.ClipMapEntries)
{
var animclip = cme.Clip as ClipAnimation;
if (animclip != null)
{
ClipComboBox.Items.Add(animclip.ShortName);
continue;
}
var animcliplist = cme.Clip as ClipAnimationList;
if (animcliplist?.Animations?.Data != null)
{
ClipComboBox.Items.Add(animcliplist.ShortName);
continue;
}
}
}
private void ClipComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
var name = ClipComboBox.Text;
MetaHash cliphash = JenkHash.GenHash(name);
ClipMapEntry cme = null;
SelectedPed.Ycd?.ClipMap?.TryGetValue(cliphash, out cme);
SelectedPed.AnimClip = cme;
}
private void ClipComboBox_TextChanged(object sender, EventArgs e)
{
ClipComboBox_SelectedIndexChanged(sender, e);
}
}
}