Skip to content

Commit 4617ff0

Browse files
committed
Sync with latest ReClass.NET source.
1 parent b3c8103 commit 4617ff0

File tree

2 files changed

+9
-20
lines changed

2 files changed

+9
-20
lines changed

WeakPtrCodeGenerator.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44

55
namespace FrostbitePlugin
66
{
7-
public class WeakPtrCodeGenerator : ICustomCppCodeGenerator
7+
public class WeakPtrCodeGenerator : CustomCppCodeGenerator
88
{
9-
public bool CanHandle(BaseNode node)
9+
public override bool CanHandle(BaseNode node)
1010
{
1111
return node is WeakPtrNode;
1212
}
1313

14-
public BaseNode TransformNode(BaseNode node)
14+
public override BaseNode TransformNode(BaseNode node)
1515
{
1616
return node;
1717
}
1818

19-
public string GetTypeDefinition(BaseNode node, GetTypeDefinitionFunc defaultGetTypeDefinitionFunc, ResolveWrappedTypeFunc defaultResolveWrappedTypeFunc, ILogger logger)
19+
public override string GetTypeDefinition(BaseNode node, GetTypeDefinitionFunc defaultGetTypeDefinitionFunc, ResolveWrappedTypeFunc defaultResolveWrappedTypeFunc, ILogger logger)
2020
{
2121
return $"fb::WeakPtr<class {((ClassNode)((WeakPtrNode)node).InnerNode).Name}>";
2222
}

WeakPtrNode.cs

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@ public class WeakPtrNode : BaseClassWrapperNode
1111
{
1212
private readonly MemoryBuffer memory = new MemoryBuffer();
1313

14-
/// <summary>Size of the node in bytes.</summary>
1514
public override int MemorySize => IntPtr.Size;
1615

17-
/// <summary>Disable the cycle check for pointers.</summary>
1816
protected override bool PerformCycleCheck => false;
1917

2018
public override void GetUserInterfaceInfo(out string name, out Image icon)
@@ -23,7 +21,6 @@ public override void GetUserInterfaceInfo(out string name, out Image icon)
2321
icon = Properties.Resources.logo_frostbite;
2422
}
2523

26-
/// <summary>Called when the node was created. Creates a new class as inner node.</summary>
2724
public override void Initialize()
2825
{
2926
var node = ClassNode.Create();
@@ -32,11 +29,6 @@ public override void Initialize()
3229
InnerNode = node;
3330
}
3431

35-
/// <summary>Draws this node.</summary>
36-
/// <param name="view">The view information.</param>
37-
/// <param name="x">The x coordinate.</param>
38-
/// <param name="y">The y coordinate.</param>
39-
/// <returns>The pixel size the node occupies.</returns>
4032
public override Size Draw(ViewInfo view, int x, int y)
4133
{
4234
if (IsHidden && !IsWrapped)
@@ -49,7 +41,7 @@ public override Size Draw(ViewInfo view, int x, int y)
4941

5042
AddSelection(view, x, y, view.Font.Height);
5143

52-
x = AddOpenClose(view, x, y);
44+
x = AddOpenCloseIcon(view, x, y);
5345
x = AddIcon(view, x, y, Icons.Pointer, -1, HotSpotType.None);
5446

5547
var tx = x;
@@ -64,9 +56,9 @@ public override Size Draw(ViewInfo view, int x, int y)
6456

6557
AddComment(view, x, y);
6658

67-
DrawInvalidMemoryIndicator(view, y);
68-
AddTypeDrop(view, y);
69-
AddDelete(view, y);
59+
DrawInvalidMemoryIndicatorIcon(view, y);
60+
AddContextDropDownIcon(view, y);
61+
AddDeleteIcon(view, y);
7062

7163
y += view.Font.Height;
7264

@@ -80,7 +72,7 @@ public override Size Draw(ViewInfo view, int x, int y)
8072
ptr = view.Memory.Process.ReadRemoteObject<IntPtr>(ptr);
8173
if (!ptr.IsNull())
8274
{
83-
ptr = ptr - IntPtr.Size;
75+
ptr -= IntPtr.Size;
8476
}
8577
}
8678

@@ -101,9 +93,6 @@ public override Size Draw(ViewInfo view, int x, int y)
10193
return size;
10294
}
10395

104-
/// <summary>Calculates the height of the node.</summary>
105-
/// <param name="view">The view information.</param>
106-
/// <returns>The calculated height.</returns>
10796
public override int CalculateDrawnHeight(ViewInfo view)
10897
{
10998
if (IsHidden && !IsWrapped)

0 commit comments

Comments
 (0)