Skip to content

Commit 3e1dfb5

Browse files
committed
Merge Feature-mass_effect
# Conflicts: # src/Core/Classes/UDefaultProperty.cs # src/Eliot.UELib.csproj # src/UnrealPackage.cs
2 parents 0f9bddd + 699a78b commit 3e1dfb5

13 files changed

+300
-32
lines changed

src/Branch/PackageObjectLegacyVersion.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ public enum PackageObjectLegacyVersion
159159

160160
NetObjectCountAdded = 322,
161161

162+
CompressionAdded = 334,
163+
162164
NumberAddedToName = 343,
163165

164166
// FIXME: Version 374-491; Delegate source type changed from Name to Object
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using UELib.Core;
2+
3+
namespace UELib.Branch.UE3.SFX.Classes
4+
{
5+
[UnrealRegisterClass]
6+
[BuildGeneration(BuildGeneration.SFX)]
7+
public class UStringRefProperty : UProperty
8+
{
9+
protected override void Deserialize()
10+
{
11+
base.Deserialize();
12+
}
13+
14+
/// <inheritdoc/>
15+
public override string GetFriendlyType()
16+
{
17+
return "stringref";
18+
}
19+
}
20+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
using UELib.Branch.UE3.SFX.Tokens;
2+
using UELib.Core.Tokens;
3+
using static UELib.Core.UStruct.UByteCodeDecompiler;
4+
5+
namespace UELib.Branch.UE3.SFX
6+
{
7+
public class EngineBranchSFX : DefaultEngineBranch
8+
{
9+
public EngineBranchSFX(BuildGeneration generation) : base(generation)
10+
{
11+
}
12+
13+
public override void Setup(UnrealPackage linker)
14+
{
15+
base.Setup(linker);
16+
17+
// FIXME: Temporary workaround
18+
if (linker.LicenseeVersion == 1008)
19+
{
20+
linker.Summary.LicenseeVersion = 112;
21+
}
22+
}
23+
24+
protected override void SetupSerializer(UnrealPackage linker)
25+
{
26+
SetupSerializer<PackageSerializerSFX>();
27+
}
28+
29+
protected override TokenMap BuildTokenMap(UnrealPackage linker)
30+
{
31+
var tokenMap = base.BuildTokenMap(linker);
32+
tokenMap[0x4F] = typeof(StringRefConstToken);
33+
// IfLocal
34+
tokenMap[0x63] = typeof(UnresolvedToken);
35+
// IfInstance
36+
tokenMap[0x64] = typeof(UnresolvedToken);
37+
// NamedFunction
38+
tokenMap[0x65] = typeof(UnresolvedToken);
39+
return tokenMap;
40+
}
41+
}
42+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
using UELib.Annotations;
2+
3+
namespace UELib.Branch.UE3.SFX
4+
{
5+
[UsedImplicitly]
6+
public class PackageSerializerSFX : PackageSerializerBase
7+
{
8+
public override void Serialize(IUnrealStream stream, UNameTableItem item)
9+
{
10+
stream.Write(item._Name);
11+
if (stream.LicenseeVersion >= 142 && stream.LicenseeVersion != 1008)
12+
{
13+
return;
14+
}
15+
16+
if (stream.LicenseeVersion >= 102)
17+
{
18+
stream.Write((uint)item._Flags);
19+
return;
20+
}
21+
22+
stream.Write(item._Flags);
23+
}
24+
25+
public override void Deserialize(IUnrealStream stream, UNameTableItem item)
26+
{
27+
stream.Read(out item._Name);
28+
if (stream.LicenseeVersion >= 142 && stream.LicenseeVersion != 1008)
29+
{
30+
return;
31+
}
32+
33+
if (stream.LicenseeVersion >= 102)
34+
{
35+
stream.Read(out item._Flags);
36+
return;
37+
}
38+
39+
stream.Read(out item._Flags);
40+
}
41+
42+
public override void Serialize(IUnrealStream stream, UImportTableItem item)
43+
{
44+
item.Serialize(stream);
45+
}
46+
47+
public override void Deserialize(IUnrealStream stream, UImportTableItem item)
48+
{
49+
item.Deserialize(stream);
50+
}
51+
52+
public override void Serialize(IUnrealStream stream, UExportTableItem item)
53+
{
54+
item.Serialize(stream);
55+
}
56+
57+
public override void Deserialize(IUnrealStream stream, UExportTableItem item)
58+
{
59+
item.Deserialize(stream);
60+
}
61+
}
62+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using UELib.Core;
2+
using UELib.ObjectModel.Annotations;
3+
using UELib.Tokens;
4+
5+
namespace UELib.Branch.UE3.SFX.Tokens
6+
{
7+
[ExprToken(ExprToken.StringConst)]
8+
public class StringRefConstToken : UStruct.UByteCodeDecompiler.Token
9+
{
10+
public int Value;
11+
12+
public override void Deserialize(IUnrealStream stream)
13+
{
14+
stream.Read(out Value);
15+
Decompiler.AlignSize(sizeof(int));
16+
}
17+
18+
public override string Decompile()
19+
{
20+
return base.Decompile();
21+
}
22+
}
23+
}

src/Core/Tables/UNameTableItem.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ public string Name
1616
get => _Name;
1717
set => _Name = value;
1818
}
19-
private string _Name;
19+
internal string _Name;
2020

2121
public ulong Flags
2222
{
2323
get => _Flags;
2424
set => _Flags = value;
2525
}
26-
private ulong _Flags;
26+
internal ulong _Flags;
2727

2828
public ushort NonCasePreservingHash;
2929
public ushort CasePreservingHash;

src/Decompiler/app.config

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/Eliot.UELib.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<DefineConstants>DECOMPILE;BINARYMETADATA;UE1;UE2;UE3;UE4;VENGEANCE;SWAT4;UNREAL2;INFINITYBLADE;BORDERLANDS2;GOW2;APB;SPECIALFORCE2;XIII;SINGULARITY;THIEF_DS;DEUSEX_IW;BORDERLANDS;MIRRORSEDGE;BIOSHOCK;HAWKEN;UT;DISHONORED;REMEMBERME;ALPHAPROTOCOL;VANGUARD;TERA;MKKE;TRANSFORMERS;XCOM2;DD2;DCUO;AA2;SPELLBORN;BATMAN;MOH;ROCKETLEAGUE;DNF;LSGAME;UNDYING;HP;DEVASTATION;BATTLEBORN;SPLINTERCELL;AHIT;GIGANTIC;ENDWAR;SG1</DefineConstants>
3+
<DefineConstants>DECOMPILE;BINARYMETADATA;UE1;UE2;UE3;UE4;VENGEANCE;SWAT4;UNREAL2;INFINITYBLADE;BORDERLANDS2;GOW2;APB;SPECIALFORCE2;XIII;SINGULARITY;THIEF_DS;DEUSEX_IW;BORDERLANDS;MIRRORSEDGE;BIOSHOCK;HAWKEN;UT;DISHONORED;REMEMBERME;ALPHAPROTOCOL;VANGUARD;TERA;MKKE;TRANSFORMERS;XCOM2;DD2;DCUO;AA2;SPELLBORN;BATMAN;MOH;ROCKETLEAGUE;DNF;LSGAME;UNDYING;HP;DEVASTATION;BATTLEBORN;SPLINTERCELL;AHIT;GIGANTIC;ENDWAR;SG1;MASS_EFFECT</DefineConstants>
44
<TargetFrameworks>net48;netstandard2.0</TargetFrameworks>
55
<OutputType>Library</OutputType>
66
<RootNamespace>UELib</RootNamespace>

src/Eliot.UELib.sln.DotSettings

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
22
<s:Boolean x:Key="/Default/CodeInspection/CodeAnnotations/NamespacesWithAnnotations/=UELib_002EAnnotations/@EntryIndexedValue">True</s:Boolean>
3+
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SFX/@EntryIndexedValue">SFX</s:String>
34
<s:Boolean x:Key="/Default/UserDictionary/Words/=Endian/@EntryIndexedValue">True</s:Boolean>
45
<s:Boolean x:Key="/Default/UserDictionary/Words/=parm/@EntryIndexedValue">True</s:Boolean>
56
<s:Boolean x:Key="/Default/UserDictionary/Words/=Parms/@EntryIndexedValue">True</s:Boolean>

src/UnrealBuild.cs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public enum BuildGeneration
1818
UE1,
1919

2020
/// <summary>
21-
/// Modified version for Harry Potter's Unreal Engine 1
21+
/// Modified version for Harry Potter's Unreal Engine 1.
2222
/// </summary>
2323
HP,
2424

@@ -30,7 +30,7 @@ public enum BuildGeneration
3030
UE2,
3131

3232
/// <summary>
33-
/// Heavily modified Unreal Engine 2 by Ion Storm for Thief: Deadly Shadows
33+
/// Heavily modified Unreal Engine 2 by Ion Storm for Thief: Deadly Shadows.
3434
/// </summary>
3535
Flesh,
3636

@@ -50,14 +50,14 @@ public enum BuildGeneration
5050
Vengeance,
5151

5252
/// <summary>
53-
/// Heavily modified Unreal Engine 2.5 for Splinter Cell
53+
/// Heavily modified Unreal Engine 2.5 for Splinter Cell.
5454
///
5555
/// Not yet supported.
5656
/// </summary>
5757
Lead,
5858

5959
/// <summary>
60-
/// Modified Unreal Engine 2 for Xbox e.g. Unreal Championship 2: The Liandri Conflict
60+
/// Modified Unreal Engine 2 for Xbox e.g. Unreal Championship 2: The Liandri Conflict.
6161
/// </summary>
6262
UE2X,
6363

@@ -68,17 +68,22 @@ public enum BuildGeneration
6868
/// </summary>
6969
UE3,
7070

71+
/// <summary>
72+
/// A modified Unreal Engine 3 for the Mass Effect series.
73+
/// </summary>
74+
SFX,
75+
7176
/// <summary>
7277
/// Rocksteady Studios
7378
///
74-
/// Heavily modified Unreal Engine 3 for the Arkham series
79+
/// Heavily modified Unreal Engine 3 for the Arkham series.
7580
/// </summary>
7681
RSS,
7782

7883
/// <summary>
7984
/// High Moon Studios
8085
///
81-
/// Heavily modified Unreal Engine 3 for Transformers and Deadpool etc
86+
/// Heavily modified Unreal Engine 3 for Transformers and Deadpool etc.
8287
/// </summary>
8388
HMS,
8489

0 commit comments

Comments
 (0)