Merge pull request #30 from neos7/master

Added checkbox to disable rendering of drawables and minor fields renamed
This commit is contained in:
dexyfex 2018-08-15 08:50:44 +10:00 committed by GitHub
commit 4da1e3d8c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 54 additions and 34 deletions

View File

@ -718,16 +718,16 @@ namespace CodeWalker.GameFiles
//public float TranslationX { get; set; }
//public float TranslationY { get; set; }
//public float TranslationZ { get; set; }
public uint Unknown_1Ch { get; set; } // 0x00000000
public float Unknown_20h { get; set; } // 1.0
public float Unknown_24h { get; set; } // 1.0
public float Unknown_28h { get; set; } // 1.0
public float Unknown_2Ch { get; set; } // 1.0
public ushort Unknown_30h { get; set; } //limb end index? IK chain?
public uint Unknown_1Ch { get; set; } // 0x00000000 RHW?
public float ScaleX { get; set; } // 1.0
public float ScaleY { get; set; } // 1.0
public float ScaleZ { get; set; } // 1.0
public float Unknown_2Ch { get; set; } // 1.0 RHW?
public ushort NextSiblingIndex { get; set; } //limb end index? IK chain?
public short ParentIndex { get; set; }
public uint Unknown_34h { get; set; } // 0x00000000
public ulong NamePointer { get; set; }
public ushort Unknown_40h { get; set; }
public ushort Flags { get; set; }
public ushort Unknown_42h { get; set; }
public ushort Id { get; set; }
public ushort Unknown_46h { get; set; }
@ -756,15 +756,15 @@ namespace CodeWalker.GameFiles
//this.TranslationY = reader.ReadSingle();
//this.TranslationZ = reader.ReadSingle();
this.Unknown_1Ch = reader.ReadUInt32();
this.Unknown_20h = reader.ReadSingle();
this.Unknown_24h = reader.ReadSingle();
this.Unknown_28h = reader.ReadSingle();
this.ScaleX = reader.ReadSingle();
this.ScaleY = reader.ReadSingle();
this.ScaleZ = reader.ReadSingle();
this.Unknown_2Ch = reader.ReadSingle();
this.Unknown_30h = reader.ReadUInt16();
this.NextSiblingIndex = reader.ReadUInt16();
this.ParentIndex = reader.ReadInt16();
this.Unknown_34h = reader.ReadUInt32();
this.NamePointer = reader.ReadUInt64();
this.Unknown_40h = reader.ReadUInt16();
this.Flags = reader.ReadUInt16();
this.Unknown_42h = reader.ReadUInt16();
this.Id = reader.ReadUInt16();
this.Unknown_46h = reader.ReadUInt16();
@ -796,15 +796,15 @@ namespace CodeWalker.GameFiles
//writer.Write(this.TranslationY);
//writer.Write(this.TranslationZ);
writer.Write(this.Unknown_1Ch);
writer.Write(this.Unknown_20h);
writer.Write(this.Unknown_24h);
writer.Write(this.Unknown_28h);
writer.Write(this.ScaleX);
writer.Write(this.ScaleY);
writer.Write(this.ScaleZ);
writer.Write(this.Unknown_2Ch);
writer.Write(this.Unknown_30h);
writer.Write(this.NextSiblingIndex);
writer.Write(this.ParentIndex);
writer.Write(this.Unknown_34h);
writer.Write(this.NamePointer);
writer.Write(this.Unknown_40h);
writer.Write(this.Flags);
writer.Write(this.Unknown_42h);
writer.Write(this.Id);
writer.Write(this.Unknown_46h);
@ -968,12 +968,8 @@ namespace CodeWalker.GameFiles
public float Unknown_50h { get; set; } // -pi
public float Unknown_54h { get; set; } // pi
public float Unknown_58h { get; set; } // 1.0
public float Unknown_5Ch { get; set; }
public float Unknown_60h { get; set; }
public float Unknown_64h { get; set; }
public float Unknown_68h { get; set; }
public float Unknown_6Ch { get; set; }
public float Unknown_70h { get; set; }
public Vector3 Min { get; set; }
public Vector3 Max { get; set; }
public float Unknown_74h { get; set; } // pi
public float Unknown_78h { get; set; } // -pi
public float Unknown_7Ch { get; set; } // pi

View File

@ -98,7 +98,7 @@ namespace CodeWalker.Rendering
public bool renderinteriors = true;
public bool renderproxies = false;
public bool renderchildents = false;//when rendering single ymap, render root only or not...
public bool renderentities = true;
public bool rendergrass = true;
public bool renderdistlodlights = true;
@ -1595,13 +1595,16 @@ namespace CodeWalker.Rendering
}
}
for (int i = 0; i < renderworldrenderables.Count; i++)
if(renderentities)
{
var rent = renderworldrenderables[i];
var ent = rent.Entity;
var arch = ent.Archetype;
for (int i = 0; i < renderworldrenderables.Count; i++)
{
var rent = renderworldrenderables[i];
var ent = rent.Entity;
var arch = ent.Archetype;
RenderArchetype(arch, ent, rent.Renderable, false);
RenderArchetype(arch, ent, rent.Renderable, false);
}
}

26
WorldForm.Designer.cs generated
View File

@ -109,6 +109,7 @@ namespace CodeWalker
this.tabPage4 = new System.Windows.Forms.TabPage();
this.OptionsTabControl = new System.Windows.Forms.TabControl();
this.tabPage8 = new System.Windows.Forms.TabPage();
this.RenderEntitiesCheckBox = new System.Windows.Forms.CheckBox();
this.AdvancedSettingsButton = new System.Windows.Forms.Button();
this.ControlSettingsButton = new System.Windows.Forms.Button();
this.MapViewDetailLabel = new System.Windows.Forms.Label();
@ -1295,6 +1296,7 @@ namespace CodeWalker
//
// tabPage8
//
this.tabPage8.Controls.Add(this.RenderEntitiesCheckBox);
this.tabPage8.Controls.Add(this.AdvancedSettingsButton);
this.tabPage8.Controls.Add(this.ControlSettingsButton);
this.tabPage8.Controls.Add(this.MapViewDetailLabel);
@ -1327,6 +1329,19 @@ namespace CodeWalker
this.tabPage8.Text = "General";
this.tabPage8.UseVisualStyleBackColor = true;
//
// EntitiesCheckBox
//
this.RenderEntitiesCheckBox.AutoSize = true;
this.RenderEntitiesCheckBox.Checked = true;
this.RenderEntitiesCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.RenderEntitiesCheckBox.Location = new System.Drawing.Point(10, 32);
this.RenderEntitiesCheckBox.Name = "EntitiesCheckBox";
this.RenderEntitiesCheckBox.Size = new System.Drawing.Size(89, 17);
this.RenderEntitiesCheckBox.TabIndex = 67;
this.RenderEntitiesCheckBox.Text = "Show entities";
this.RenderEntitiesCheckBox.UseVisualStyleBackColor = true;
this.RenderEntitiesCheckBox.CheckedChanged += new System.EventHandler(this.RenderEntitiesCheckBox_CheckedChanged);
//
// AdvancedSettingsButton
//
this.AdvancedSettingsButton.Location = new System.Drawing.Point(101, 456);
@ -1411,7 +1426,7 @@ namespace CodeWalker
this.WaterQuadsCheckBox.AutoSize = true;
this.WaterQuadsCheckBox.Checked = true;
this.WaterQuadsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.WaterQuadsCheckBox.Location = new System.Drawing.Point(10, 104);
this.WaterQuadsCheckBox.Location = new System.Drawing.Point(10, 129);
this.WaterQuadsCheckBox.Name = "WaterQuadsCheckBox";
this.WaterQuadsCheckBox.Size = new System.Drawing.Size(114, 17);
this.WaterQuadsCheckBox.TabIndex = 39;
@ -1440,7 +1455,7 @@ namespace CodeWalker
// TimedEntitiesAlwaysOnCheckBox
//
this.TimedEntitiesAlwaysOnCheckBox.AutoSize = true;
this.TimedEntitiesAlwaysOnCheckBox.Location = new System.Drawing.Point(131, 58);
this.TimedEntitiesAlwaysOnCheckBox.Location = new System.Drawing.Point(131, 83);
this.TimedEntitiesAlwaysOnCheckBox.Name = "TimedEntitiesAlwaysOnCheckBox";
this.TimedEntitiesAlwaysOnCheckBox.Size = new System.Drawing.Size(58, 17);
this.TimedEntitiesAlwaysOnCheckBox.TabIndex = 37;
@ -1453,7 +1468,7 @@ namespace CodeWalker
this.GrassCheckBox.AutoSize = true;
this.GrassCheckBox.Checked = true;
this.GrassCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.GrassCheckBox.Location = new System.Drawing.Point(10, 35);
this.GrassCheckBox.Location = new System.Drawing.Point(10, 57);
this.GrassCheckBox.Name = "GrassCheckBox";
this.GrassCheckBox.Size = new System.Drawing.Size(81, 17);
this.GrassCheckBox.TabIndex = 35;
@ -1466,7 +1481,7 @@ namespace CodeWalker
this.InteriorsCheckBox.AutoSize = true;
this.InteriorsCheckBox.Checked = true;
this.InteriorsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.InteriorsCheckBox.Location = new System.Drawing.Point(10, 81);
this.InteriorsCheckBox.Location = new System.Drawing.Point(10, 106);
this.InteriorsCheckBox.Name = "InteriorsCheckBox";
this.InteriorsCheckBox.Size = new System.Drawing.Size(92, 17);
this.InteriorsCheckBox.TabIndex = 38;
@ -1586,7 +1601,7 @@ namespace CodeWalker
this.TimedEntitiesCheckBox.AutoSize = true;
this.TimedEntitiesCheckBox.Checked = true;
this.TimedEntitiesCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.TimedEntitiesCheckBox.Location = new System.Drawing.Point(10, 58);
this.TimedEntitiesCheckBox.Location = new System.Drawing.Point(10, 83);
this.TimedEntitiesCheckBox.Name = "TimedEntitiesCheckBox";
this.TimedEntitiesCheckBox.Size = new System.Drawing.Size(117, 17);
this.TimedEntitiesCheckBox.TabIndex = 36;
@ -3581,5 +3596,6 @@ namespace CodeWalker
private System.Windows.Forms.ToolStripMenuItem ToolbarSnapToGroundGridButton;
private System.Windows.Forms.NumericUpDown SnapGridSizeUpDown;
private System.Windows.Forms.Label label26;
private System.Windows.Forms.CheckBox RenderEntitiesCheckBox;
}
}

View File

@ -7624,6 +7624,11 @@ namespace CodeWalker
{
SnapGridSize = (float)SnapGridSizeUpDown.Value;
}
private void RenderEntitiesCheckBox_CheckedChanged(object sender, EventArgs e)
{
Renderer.renderentities = RenderEntitiesCheckBox.Checked;
}
}
public enum WorldControlMode