diff --git a/FModel/PakReader/Parsers/Objects/EAnimationCompressionFormat.cs b/FModel/PakReader/Parsers/Objects/EAnimationCompressionFormat.cs new file mode 100644 index 00000000..be2adda0 --- /dev/null +++ b/FModel/PakReader/Parsers/Objects/EAnimationCompressionFormat.cs @@ -0,0 +1,14 @@ +namespace PakReader.Parsers.Objects +{ + public enum EAnimationCompressionFormat + { + ACF_None, + ACF_Float96NoW, + ACF_Fixed48NoW, + ACF_IntervalFixed32NoW, + ACF_Fixed32NoW, + ACF_Float32NoW, + ACF_Identity, + ACF_MAX, + } +} diff --git a/FModel/PakReader/Parsers/Objects/EAnimationKeyFormat.cs b/FModel/PakReader/Parsers/Objects/EAnimationKeyFormat.cs new file mode 100644 index 00000000..7f685078 --- /dev/null +++ b/FModel/PakReader/Parsers/Objects/EAnimationKeyFormat.cs @@ -0,0 +1,10 @@ +namespace PakReader.Parsers.Objects +{ + public enum EAnimationKeyFormat : byte + { + AKF_ConstantKeyLerp, + AKF_VariableKeyLerp, + AKF_PerTrackCompression, + AKF_MAX, + } +} diff --git a/FModel/PakReader/Parsers/Objects/FBox.cs b/FModel/PakReader/Parsers/Objects/FBox.cs new file mode 100644 index 00000000..68e2e6bd --- /dev/null +++ b/FModel/PakReader/Parsers/Objects/FBox.cs @@ -0,0 +1,19 @@ +namespace PakReader.Parsers.Objects +{ + public readonly struct FBox : IUStruct + { + /** Holds the box's minimum point. */ + public readonly FVector Min; + /** Holds the box's maximum point. */ + public readonly FVector Max; + /** Holds a flag indicating whether this box is valid. */ + public readonly bool bIsValid; + + internal FBox(PackageReader reader) + { + Min = new FVector(reader); + Max = new FVector(reader); + bIsValid = reader.ReadByte() != 0; + } + } +} diff --git a/FModel/PakReader/Parsers/Objects/FChunkHeader.cs b/FModel/PakReader/Parsers/Objects/FChunkHeader.cs new file mode 100644 index 00000000..33e747b6 --- /dev/null +++ b/FModel/PakReader/Parsers/Objects/FChunkHeader.cs @@ -0,0 +1,16 @@ +using System.IO; + +namespace PakReader.Parsers.Objects +{ + public readonly struct FChunkHeader : IUStruct + { + public readonly uint ChunkId; + public readonly uint ChunkDataSize; + + internal FChunkHeader(BinaryReader reader) + { + ChunkId = reader.ReadUInt32(); + ChunkDataSize = reader.ReadUInt32(); + } + } +} diff --git a/FModel/PakReader/Parsers/Objects/FCompressedOffsetData.cs b/FModel/PakReader/Parsers/Objects/FCompressedOffsetData.cs new file mode 100644 index 00000000..179b2207 --- /dev/null +++ b/FModel/PakReader/Parsers/Objects/FCompressedOffsetData.cs @@ -0,0 +1,14 @@ +namespace PakReader.Parsers.Objects +{ + public readonly struct FCompressedOffsetData : IUStruct + { + public readonly int[] OffsetData; + public readonly int StripSize; + + internal FCompressedOffsetData(PackageReader reader) + { + OffsetData = reader.ReadTArray(() => reader.ReadInt32()); + StripSize = reader.ReadInt32(); + } + } +} diff --git a/FModel/PakReader/Parsers/Objects/FCompressedSegment.cs b/FModel/PakReader/Parsers/Objects/FCompressedSegment.cs new file mode 100644 index 00000000..44bd8672 --- /dev/null +++ b/FModel/PakReader/Parsers/Objects/FCompressedSegment.cs @@ -0,0 +1,22 @@ +namespace PakReader.Parsers.Objects +{ + public readonly struct FCompressedSegment : IUStruct + { + public readonly int StartFrame; + public readonly int NumFrames; + public readonly int ByteStreamOffset; + public readonly EAnimationCompressionFormat TranslationCompressionFormat; + public readonly EAnimationCompressionFormat RotationCompressionFormat; + public readonly EAnimationCompressionFormat ScaleCompressionFormat; + + internal FCompressedSegment(PackageReader reader) + { + StartFrame = reader.ReadInt32(); + NumFrames = reader.ReadInt32(); + ByteStreamOffset = reader.ReadInt32(); + TranslationCompressionFormat = (EAnimationCompressionFormat)reader.ReadByte(); + RotationCompressionFormat = (EAnimationCompressionFormat)reader.ReadByte(); + ScaleCompressionFormat = (EAnimationCompressionFormat)reader.ReadByte(); + } + } +} diff --git a/FModel/PakReader/Parsers/Objects/FFactChunk.cs b/FModel/PakReader/Parsers/Objects/FFactChunk.cs new file mode 100644 index 00000000..122863cc --- /dev/null +++ b/FModel/PakReader/Parsers/Objects/FFactChunk.cs @@ -0,0 +1,18 @@ +using System.IO; + +namespace PakReader.Parsers.Objects +{ + public readonly struct FFactChunk : IUStruct + { + public readonly uint TotalSamples; // total samples per channel + public readonly uint DelaySamplesInputOverlap; // samples of input and overlap delay + public readonly uint DelaySamplesInputOverlapEncoder; // samples of input and overlap and encoder delay + + internal FFactChunk(BinaryReader reader) + { + TotalSamples = reader.ReadUInt32(); + DelaySamplesInputOverlap = reader.ReadUInt32(); + DelaySamplesInputOverlapEncoder = reader.ReadUInt32(); + } + } +} diff --git a/FModel/PakReader/Parsers/Objects/FRiffWaveHeader.cs b/FModel/PakReader/Parsers/Objects/FRiffWaveHeader.cs new file mode 100644 index 00000000..2694e64e --- /dev/null +++ b/FModel/PakReader/Parsers/Objects/FRiffWaveHeader.cs @@ -0,0 +1,18 @@ +using System.IO; + +namespace PakReader.Parsers.Objects +{ + public readonly struct FRiffWaveHeader : IUStruct + { + public readonly uint ChunkId; + public readonly uint ChunkDataSize; + public readonly uint TypeId; + + internal FRiffWaveHeader(BinaryReader reader) + { + ChunkId = reader.ReadUInt32(); + ChunkDataSize = reader.ReadUInt32(); + TypeId = reader.ReadUInt32(); + } + } +} diff --git a/FModel/PakReader/Parsers/Objects/FSampleChunk.cs b/FModel/PakReader/Parsers/Objects/FSampleChunk.cs new file mode 100644 index 00000000..615305a3 --- /dev/null +++ b/FModel/PakReader/Parsers/Objects/FSampleChunk.cs @@ -0,0 +1,36 @@ +using System.IO; + +namespace PakReader.Parsers.Objects +{ + public readonly struct FSampleChunk : IUStruct + { + public readonly uint Manufacturer; + public readonly uint Product; + public readonly uint SamplePeriod; + public readonly uint MidiUnityNote; + public readonly uint MidiPitchFraction; + public readonly uint SmpteFormat; + public readonly uint SmpteOffset; + public readonly uint SampleLoops; + public readonly uint SamplerData; + public readonly FSampleLoop[] SampleLoop; + + internal FSampleChunk(BinaryReader reader) + { + Manufacturer = reader.ReadUInt32(); + Product = reader.ReadUInt32(); + SamplePeriod = reader.ReadUInt32(); + MidiUnityNote = reader.ReadUInt32(); + MidiPitchFraction = reader.ReadUInt32(); + SmpteFormat = reader.ReadUInt32(); + SmpteOffset = reader.ReadUInt32(); + SampleLoops = reader.ReadUInt32(); + SamplerData = reader.ReadUInt32(); + SampleLoop = new FSampleLoop[2] + { + new FSampleLoop(reader), + new FSampleLoop(reader) + }; + } + } +} diff --git a/FModel/PakReader/Parsers/Objects/FSampleLoop.cs b/FModel/PakReader/Parsers/Objects/FSampleLoop.cs new file mode 100644 index 00000000..19c483a2 --- /dev/null +++ b/FModel/PakReader/Parsers/Objects/FSampleLoop.cs @@ -0,0 +1,24 @@ +using System.IO; + +namespace PakReader.Parsers.Objects +{ + public readonly struct FSampleLoop : IUStruct + { + public readonly uint Identifier; + public readonly uint Type; + public readonly uint Start; + public readonly uint End; + public readonly uint Fraction; + public readonly uint PlayCount; + + internal FSampleLoop(BinaryReader reader) + { + Identifier = reader.ReadUInt32(); + Type = reader.ReadUInt32(); + Start = reader.ReadUInt32(); + End = reader.ReadUInt32(); + Fraction = reader.ReadUInt32(); + PlayCount = reader.ReadUInt32(); + } + } +} diff --git a/FModel/PakReader/Parsers/Objects/UScriptStruct.cs b/FModel/PakReader/Parsers/Objects/UScriptStruct.cs index 2e9f5153..5500722b 100644 --- a/FModel/PakReader/Parsers/Objects/UScriptStruct.cs +++ b/FModel/PakReader/Parsers/Objects/UScriptStruct.cs @@ -21,7 +21,7 @@ namespace PakReader.Parsers.Objects "Vector4" => new FVector4(reader), "Vector2D" => new FVector2D(reader), "Box2D" => new FBox2D(reader), - "Box" => new FVector(reader), + "Box" => new FBox(reader), "Vector" => new FVector(reader), "Rotator" => new FRotator(reader), "IntPoint" => new FIntPoint(reader), diff --git a/FModel/PakReader/Parsers/PropertyTagData/BaseProperty.cs b/FModel/PakReader/Parsers/PropertyTagData/BaseProperty.cs index 67a7f1a3..e4d06a01 100644 --- a/FModel/PakReader/Parsers/PropertyTagData/BaseProperty.cs +++ b/FModel/PakReader/Parsers/PropertyTagData/BaseProperty.cs @@ -18,9 +18,6 @@ namespace PakReader.Parsers.PropertyTagData "DoubleProperty" => new DoubleProperty(reader, tag), "ArrayProperty" => new ArrayProperty(reader, tag), "StructProperty" => new StructProperty(reader, tag), - // No code in UE4 source despite these being technically serializable properties - //"VectorProperty" => new VectorProperty(reader, tag), - //"RotatorProperty" => new RotatorProperty(reader, tag), "StrProperty" => new StrProperty(reader, tag), "TextProperty" => new TextProperty(reader, tag), "InterfaceProperty" => new InterfaceProperty(reader, tag), diff --git a/FModel/Windows/CustomNotifier/CustomNotifier.xaml b/FModel/Windows/CustomNotifier/CustomNotifier.xaml index 5e4edf5f..c30e349d 100644 --- a/FModel/Windows/CustomNotifier/CustomNotifier.xaml +++ b/FModel/Windows/CustomNotifier/CustomNotifier.xaml @@ -7,7 +7,7 @@ xmlns:vm="clr-namespace:FModel.ViewModels.Notifier" xmlns:core="clr-namespace:ToastNotifications.Core;assembly=ToastNotifications" mc:Ignorable="d" - d:DesignHeight="60" d:DesignWidth="250" MaxWidth="250" MaxHeight="60" Background="#FF232930" + d:DesignHeight="60" d:DesignWidth="250" MaxWidth="250" MaxHeight="70" Background="#FF232930" d:DataContext="{d:DesignInstance vm:NotifierViewModel, IsDesignTimeCreatable=False}" MouseLeftButtonUp="NotificationDisplayPart_MouseLeftButtonUp"> diff --git a/README.md b/README.md index 5256168f..c440be42 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Over time, new features got added and new users discovered the program. - [Introduction](#introduction) - [Features](#features) -- [Installation](#installation-) +- [Installation](#installation--) - [Acknowledgments](#acknowledgments) - [Support](#support-) @@ -44,7 +44,7 @@ A few of the things you can do with FModel: * Audio Player - OGG / WAV files -## Installation [![](https://img.shields.io/github/downloads/iAmAsval/FModel/latest/total.svg?label=v3.1.0)](https://github.com/iAmAsval/FModel/releases/latest/download/FModel.zip) +## Installation [![](https://img.shields.io/github/downloads/iAmAsval/FModel/latest/total?label=latest-release&logo=GitHub)](https://github.com/iAmAsval/FModel/releases/latest/download/FModel.zip) [![](https://img.shields.io/github/downloads/iAmAsval/FModel/total?label=all-releases&logo=GitHub)](https://github.com/iAmAsval/FModel/releases) To use FModel, you need to have [.NET Core 3.1](https://dotnet.microsoft.com/download/dotnet-core/thank-you/runtime-desktop-3.1.3-windows-x64-installer) installed on your computer * **[Download](https://github.com/iAmAsval/FModel/releases/latest/download/FModel.zip)** the latest version.