mirror of
https://github.com/4sval/FModel.git
synced 2026-04-21 00:57:46 -05:00
added Io CurveTable support
This commit is contained in:
parent
af5241b82d
commit
120d07fbdf
|
|
@ -1,6 +1,7 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using FModel.PakReader.IO;
|
||||
using FModel.PakReader.Parsers.Objects;
|
||||
|
||||
namespace FModel.PakReader.Parsers.Class
|
||||
|
|
@ -12,10 +13,7 @@ namespace FModel.PakReader.Parsers.Class
|
|||
|
||||
internal UCurveTable(PackageReader reader)
|
||||
{
|
||||
if (!(reader is IoPackageReader))
|
||||
{
|
||||
_ = new UObject(reader); //will break
|
||||
}
|
||||
new UObject(reader); //will break
|
||||
|
||||
int NumRows = reader.ReadInt32();
|
||||
CurveTableMode = (ECurveTableMode)reader.ReadByte();
|
||||
|
|
@ -35,6 +33,29 @@ namespace FModel.PakReader.Parsers.Class
|
|||
}
|
||||
}
|
||||
|
||||
internal UCurveTable(IoPackageReader reader, IReadOnlyDictionary<int, PropertyInfo> properties)
|
||||
{
|
||||
reader.ReadUInt16(); // don't ask me
|
||||
reader.ReadUInt32(); // what is this
|
||||
|
||||
int NumRows = reader.ReadInt32();
|
||||
CurveTableMode = (ECurveTableMode)reader.ReadByte();
|
||||
|
||||
RowMap = new Dictionary<string, object>();
|
||||
for (int i = 0; i < NumRows; i++)
|
||||
{
|
||||
int num = 1;
|
||||
string RowName = reader.ReadFName().String ?? "";
|
||||
string baseName = RowName;
|
||||
while (RowMap.ContainsKey(RowName))
|
||||
{
|
||||
RowName = $"{baseName}_NK{num++:00}";
|
||||
}
|
||||
|
||||
RowMap[RowName] = new UObject(reader, properties, true);
|
||||
}
|
||||
}
|
||||
|
||||
public object this[string key] => RowMap[key];
|
||||
public IEnumerable<string> Keys => RowMap.Keys;
|
||||
public IEnumerable<object> Values => RowMap.Values;
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ namespace FModel.PakReader.Parsers
|
|||
{
|
||||
var nextIndex = FakeImportMap.Count;
|
||||
FakeImportMap[realImportIndex] = new FObjectResource(new FName(export.ObjectName.String), new FPackageIndex(this, -(nextIndex + 1)));
|
||||
var outerResource = new FObjectResource(new FName(string.Concat(package.Reader.Summary.Name.String, ".", export.ObjectName.String)), new FPackageIndex());
|
||||
var outerResource = new FObjectResource(new FName(package.Reader.Summary.Name.String), new FPackageIndex());
|
||||
FakeImportMap.Add(outerResource);
|
||||
}
|
||||
}
|
||||
|
|
@ -152,7 +152,7 @@ namespace FModel.PakReader.Parsers
|
|||
"Texture2D" => new UTexture2D(this, properties, _ubulk,
|
||||
ExportMap.Sum(e => (long) e.CookedSerialSize) + beginExportOffset),
|
||||
"VirtualTexture2D" => new UTexture2D(this, properties, _ubulk, ExportMap.Sum(e => (long) e.CookedSerialSize) + beginExportOffset),
|
||||
//"CurveTable" => new UCurveTable(this),
|
||||
"CurveTable" => new UCurveTable(this, properties),
|
||||
"DataTable" => new UDataTable(this, properties, exportType.String),
|
||||
//"FontFace" => new UFontFace(this, ubulk),
|
||||
"SoundWave" => new USoundWave(this, properties, _ubulk, ExportMap.Sum(e => (long) e.CookedSerialSize) + beginExportOffset),
|
||||
|
|
|
|||
2
FModel/Properties/Resources.Designer.cs
generated
2
FModel/Properties/Resources.Designer.cs
generated
|
|
@ -775,7 +775,7 @@ namespace FModel.Properties {
|
|||
/// Recherche une chaîne localisée semblable à • Maiky ♥ • HYPEX ♥
|
||||
///• VenomLeaks ♥ • JayKeyFN ♥
|
||||
///• Fevers ♥ • Netu ♥
|
||||
///• Quentin Bellus • Yanteh
|
||||
///• Quentin • Yanteh
|
||||
///• Shiina • SexyNutella
|
||||
///• Alexander • imatrix
|
||||
///• Frenzy Leaks • LlamaLeaks
|
||||
|
|
|
|||
|
|
@ -354,7 +354,7 @@ It's now the most used free software to leak on Fortnite.</value>
|
|||
<value>• Maiky ♥ • HYPEX ♥
|
||||
• VenomLeaks ♥ • JayKeyFN ♥
|
||||
• Fevers ♥ • Netu ♥
|
||||
• Quentin Bellus • Yanteh
|
||||
• Quentin • Yanteh
|
||||
• Shiina • SexyNutella
|
||||
• Alexander • imatrix
|
||||
• Frenzy Leaks • LlamaLeaks
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user