mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-14 20:54:16 +01:00
Add some Additional Information to Mdl display, discard some padding when reading mdl files.
This commit is contained in:
parent
36c77034a4
commit
8df4bb0781
4 changed files with 315 additions and 241 deletions
|
|
@ -83,8 +83,8 @@ public partial class MdlFile : IWritable
|
|||
public Shape[] Shapes;
|
||||
|
||||
// Raw, unparsed data.
|
||||
public byte[] RemainingData;
|
||||
|
||||
public byte[] RemainingData;
|
||||
|
||||
public bool Valid { get; }
|
||||
|
||||
public MdlFile(byte[] data)
|
||||
|
|
@ -181,6 +181,9 @@ public partial class MdlFile : IWritable
|
|||
for (var i = 0; i < modelHeader.BoneCount; i++)
|
||||
BoneBoundingBoxes[i] = MdlStructs.BoundingBoxStruct.Read(r);
|
||||
|
||||
var runtimePadding = header.RuntimeSize + FileHeaderSize + header.StackSize - r.BaseStream.Position;
|
||||
if (runtimePadding > 0)
|
||||
r.ReadBytes((int)runtimePadding);
|
||||
RemainingData = r.ReadBytes((int)(r.BaseStream.Length - r.BaseStream.Position));
|
||||
Valid = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue