Skip to content

Commit 04d1a73

Browse files
committed
Formatting.
1 parent 64f840f commit 04d1a73

File tree

2 files changed

+21
-27
lines changed

2 files changed

+21
-27
lines changed
Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,21 @@
1-
using System;
2-
using System.Text;
3-
using System.Diagnostics;
4-
using System.Globalization;
5-
using System.Runtime.InteropServices;
6-
using System.Runtime.CompilerServices;
7-
8-
using UELib.Core;
9-
using UELib.Decoding;
10-
using UELib.Annotations;
1+
using UELib.Decoding;
112

123
namespace UELib.Branch.UE3.HUXLEY
134
{
145
public class CryptoDecoderHuxley : IBufferDecoder
156
{
16-
private uint Key;
7+
private readonly uint _Key;
178

189
public CryptoDecoderHuxley(string name)
1910
{
20-
for (var i = 0; i < name.Length; i++)
11+
for (int i = 0; i < name.Length; i++)
2112
{
22-
Key *= 16;
23-
Key ^= name[i];
13+
_Key *= 16;
14+
_Key ^= name[i];
2415
}
2516
}
2617

27-
public CryptoDecoderHuxley(uint key)
28-
{
29-
Key = key;
30-
}
18+
public CryptoDecoderHuxley(uint key) => _Key = key;
3119

3220
public void PreDecode(IUnrealStream stream)
3321
{
@@ -39,18 +27,22 @@ public void DecodeBuild(IUnrealStream stream, UnrealPackage.GameBuild build)
3927

4028
public void DecodeRead(long position, byte[] buffer, int index, int count)
4129
{
42-
for (var i = index; i + 4 <= count; i += 4)
30+
for (int i = index; i + 4 <= count; i += 4)
4331
{
44-
for (var j = 0; j < 4; j++)
45-
buffer[i + j] = (byte)(Key >> (j * 8) ^ buffer[i + j]);
46-
47-
for (var j = 0; j < 4; j++)
48-
buffer[i + j] = (byte)(count >> (j * 8) ^ buffer[i + j]);
32+
for (int j = 0; j < 4; j++)
33+
{
34+
buffer[i + j] = (byte)((_Key >> (j * 8)) ^ buffer[i + j]);
35+
}
36+
37+
for (int j = 0; j < 4; j++)
38+
{
39+
buffer[i + j] = (byte)((count >> (j * 8)) ^ buffer[i + j]);
40+
}
4941
}
5042
}
5143

5244
public unsafe void DecodeByte(long position, byte* b)
5345
{
5446
}
5547
}
56-
}
48+
}

src/Core/Classes/Props/UProperty.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Diagnostics.Contracts;
23
using UELib.Annotations;
34
using UELib.Branch;
45
using UELib.Flags;
@@ -226,8 +227,9 @@ protected override void Deserialize()
226227
#if HUXLEY
227228
if (Package.Build == UnrealPackage.GameBuild.BuildName.Huxley)
228229
{
229-
var unknown = _Buffer.ReadObject();
230-
Record(nameof(unknown), unknown);
230+
// A property linked to the "Core.Object.LazyLoadPropertyInfo" struct.
231+
var partLoadInfoProperty = _Buffer.ReadObject();
232+
Record(nameof(partLoadInfoProperty), partLoadInfoProperty);
231233
}
232234
#endif
233235
#if R6

0 commit comments

Comments
 (0)