Skip to content

Commit

Permalink
Finish Release-1.3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
EliotVU committed May 26, 2022
2 parents 9a8a6a0 + d45f235 commit f999c24
Show file tree
Hide file tree
Showing 13 changed files with 371 additions and 177 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ This is a table of games that are confirmed to be compatible with the current st
| Unreal Mission Pack: Return to Na Pali | 226b | 68/000 | |
| Unreal Tournament | 338-436 | 68/000 | |
| Deus Ex | Unknown | Unknown | |
| Thief: Deadly Shadows | Thief | 95/133 | LinkedData not supported |
| Deus Ex: Invisible War | Thief | 95/069 | LinkedData not supported |
| | | | |
| | | | |
| XIII | Unknown | 100/058 | |
Expand Down
17 changes: 6 additions & 11 deletions src/BinaryMetaData.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Diagnostics;
using UELib.Annotations;

Expand Down Expand Up @@ -45,14 +44,16 @@ public struct BinaryField : IUnrealDecompilable
[PublicAPI]
public string Decompile()
{
return Tag != null ? Tag.ToString() : "NULL";
return Tag != null
? $"({Tag.GetType()}) : {Tag}"
: "NULL";
}
}

/// <summary>
/// Stack of all deserialized fields.
/// </summary>
[PublicAPI] public Stack<BinaryField> Fields;
[PublicAPI] public Stack<BinaryField> Fields = new Stack<BinaryField>(1);

/// <summary>
/// Adds a new field to the @Fields stack.
Expand All @@ -61,16 +62,10 @@ public string Decompile()
/// <param name="tag">Value of the field</param>
/// <param name="position">Position in bytes where the field is read from</param>
/// <param name="size">Size in bytes of the field</param>
[Conditional("DEBUG"), Conditional("BINARYMETADATA")]
[PublicAPI]
public void AddField(string name, object tag, long position, long size)
{
Debug.Assert(size > 0, String.Format("Invalid {0} binary field!", name));
if (Fields == null)
{
Fields = new Stack<BinaryField>(1);
}

Debug.Assert(size > 0);
Fields.Push
(
new BinaryField
Expand Down
2 changes: 1 addition & 1 deletion src/ByteCodeDecompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private void SetupMemorySizes()
if (Buffer.Version >= vNameSizeTo8) _NameMemorySize = sizeof(int) + sizeof(int);
#if TERA
// Tera's reported version is false (partial upgrade?)
if (Package.Build != UnrealPackage.GameBuild.BuildName.Tera) return;
if (Package.Build == UnrealPackage.GameBuild.BuildName.Tera) return;
#endif
const short vObjectSizeTo8 = 587;
if (Buffer.Version >= vObjectSizeTo8) _ObjectMemorySize = sizeof(long);
Expand Down
7 changes: 6 additions & 1 deletion src/Core/Classes/UClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,12 @@ protected override void Deserialize()
}
}
}

#if BATMAN
if (_Buffer.Package.Build == UnrealPackage.GameBuild.BuildName.BatmanUDK)
{
_Buffer.Skip(sizeof(int));
}
#endif
if (Package.Version >= UnrealPackage.VDLLBIND)
{
if (!Package.Build.Flags.HasFlag(BuildFlags.NoDLLBind))
Expand Down
Loading

0 comments on commit f999c24

Please sign in to comment.