i tried things but ended up with nothing

This commit is contained in:
iAmAsval 2020-06-16 01:09:55 +02:00
parent 091c5aa189
commit 2016eb7e99
14 changed files with 195 additions and 7 deletions

View File

@ -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,
}
}

View File

@ -0,0 +1,10 @@
namespace PakReader.Parsers.Objects
{
public enum EAnimationKeyFormat : byte
{
AKF_ConstantKeyLerp,
AKF_VariableKeyLerp,
AKF_PerTrackCompression,
AKF_MAX,
}
}

View File

@ -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;
}
}
}

View File

@ -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();
}
}
}

View File

@ -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();
}
}
}

View File

@ -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();
}
}
}

View File

@ -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();
}
}
}

View File

@ -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();
}
}
}

View File

@ -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)
};
}
}
}

View File

@ -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();
}
}
}

View File

@ -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),

View File

@ -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),

View File

@ -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">
<Grid>

View File

@ -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.