Checkboxes for entity & cargen flags in project window, fix for backwards heads

This commit is contained in:
dexyfex
2017-09-23 21:46:49 +10:00
Unverified
parent efc05e1485
commit 5fbe3891cd
6 changed files with 958 additions and 642 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ namespace CodeWalker.GameFiles
{
[TypeConverter(typeof(ExpandableObjectConverter))] public class YddFile : GameFile, PackedFile
{
//public DrawableDictionary DrawableDict { get; set; }
public DrawableDictionary DrawableDict { get; set; }
public Dictionary<uint, Drawable> Dict { get; set; }
public Drawable[] Drawables { get; set; }
@@ -36,7 +36,7 @@ namespace CodeWalker.GameFiles
ResourceDataReader rd = new ResourceDataReader(resentry, data);
DrawableDictionary DrawableDict = rd.ReadBlock<DrawableDictionary>();
DrawableDict = rd.ReadBlock<DrawableDictionary>();
//MemoryUsage = 0; //uses decompressed filesize now...
//if (DrawableDict != null)
+19
View File
@@ -565,6 +565,22 @@ namespace CodeWalker.GameFiles
this.Transformations = reader.ReadStructsAt<SharpDX.Matrix>(this.TransformationsPointer, this.BonesCount);
this.ParentIndices = reader.ReadUshortsAt(this.ParentIndicesPointer, this.BonesCount);
this.Unknown_40h_Data = reader.ReadUshortsAt(this.Unknown_40h_Pointer, this.Count4);
if ((Bones != null) && (ParentIndices != null))
{
var maxcnt = Math.Min(Bones.Count, ParentIndices.Length);
for (int i = 0; i < maxcnt; i++)
{
var bone = Bones[i];
var pind = ParentIndices[i];
if (pind < Bones.Count)
{
bone.Parent = Bones[pind];
}
}
}
}
/// <summary>
@@ -717,6 +733,9 @@ namespace CodeWalker.GameFiles
// reference data
public string Name { get; set; }
public Bone Parent { get; set; }
/// <summary>
/// Reads the data-block from a stream.
/// </summary>