1
0
mirror of synced 2024-12-11 07:16:05 +01:00

Support negative start frames for bflan

This commit is contained in:
KillzXGaming 2019-09-12 19:34:12 -04:00
parent c38ae37562
commit 8372179173
2 changed files with 5 additions and 4 deletions

View File

@ -210,10 +210,10 @@ namespace LayoutBXLYT
public List<string> Groups { get; set; } public List<string> Groups { get; set; }
[DisplayName("Start"), CategoryAttribute("Frames")] [DisplayName("Start"), CategoryAttribute("Frames")]
public ushort StartFrame { get; set; } public short StartFrame { get; set; }
[DisplayName("End"), CategoryAttribute("Frames")] [DisplayName("End"), CategoryAttribute("Frames")]
public ushort EndFrame { get; set; } public short EndFrame { get; set; }
[DisplayName("Animation Order"), CategoryAttribute("Parameters")] [DisplayName("Animation Order"), CategoryAttribute("Parameters")]
public ushort AnimationOrder { get; set; } public ushort AnimationOrder { get; set; }
@ -245,8 +245,8 @@ namespace LayoutBXLYT
ushort groupCount = reader.ReadUInt16(); ushort groupCount = reader.ReadUInt16();
uint animNameOffset = reader.ReadUInt32(); uint animNameOffset = reader.ReadUInt32();
uint groupNamesOffset = reader.ReadUInt32(); uint groupNamesOffset = reader.ReadUInt32();
StartFrame = reader.ReadUInt16(); StartFrame = reader.ReadInt16();
EndFrame = reader.ReadUInt16(); EndFrame = reader.ReadInt16();
ChildBinding = reader.ReadBoolean(); ChildBinding = reader.ReadBoolean();
UnknownData = reader.ReadBytes((int)(startPos + animNameOffset - reader.Position)); UnknownData = reader.ReadBytes((int)(startPos + animNameOffset - reader.Position));

View File

@ -66,6 +66,7 @@ namespace LayoutBXLYT
var bflanInfo = header.AnimationInfo; var bflanInfo = header.AnimationInfo;
var animContent = new AnimContent(); var animContent = new AnimContent();
animInfo.animContent = new AnimContent[1];
animInfo.animContent[0] = animContent; animInfo.animContent[0] = animContent;
animInfo.startFrame = bflanInfo.FrameSize; animInfo.startFrame = bflanInfo.FrameSize;