Skip to content

Commit f19f111

Browse files
committed
Add node address to ReadNodeInfo. (fixes #19)
1 parent 75359bb commit f19f111

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

ReClass.NET/Nodes/BaseHexCommentNode.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,11 @@ protected int AddComment(ViewInfo view, int x, int y, float fvalue, IntPtr ivalu
7575

7676
if (view.Settings.ShowCommentPluginInfo)
7777
{
78+
var nodeAddress = view.Address.Add(Offset);
79+
7880
foreach (var reader in NodeInfoReader)
7981
{
80-
var info = reader.ReadNodeInfo(this, ivalue, view.Memory);
82+
var info = reader.ReadNodeInfo(this, nodeAddress, ivalue, view.Memory);
8183
if (info != null)
8284
{
8385
x = AddText(view, x, y, view.Settings.PluginColor, HotSpot.ReadOnlyId, info) + view.Font.Width;

ReClass.NET/Nodes/INodeInfoReader.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,16 @@ public interface INodeInfoReader
1212
/// </summary>
1313
/// <param name="node">The current node.</param>
1414
/// <param name="nodeAddress">The absolute address of the node.</param>
15+
/// /// <param name="nodeValue">The memory value of the node as <see cref="IntPtr"/>.</param>
1516
/// <param name="memory">The current <see cref="MemoryBuffer"/>.</param>
1617
/// <returns>Custom informations about the node or null.</returns>
17-
string ReadNodeInfo(BaseNode node, IntPtr nodeAddress, MemoryBuffer memory);
18+
string ReadNodeInfo(BaseNode node, IntPtr nodeAddress, IntPtr nodeValue, MemoryBuffer memory);
1819
}
1920

2021
[ContractClassFor(typeof(INodeInfoReader))]
2122
internal abstract class NodeInfoReaderContract : INodeInfoReader
2223
{
23-
public string ReadNodeInfo(BaseNode node, IntPtr nodeAddress, MemoryBuffer memory)
24+
public string ReadNodeInfo(BaseNode node, IntPtr nodeAddress, IntPtr nodeValue, MemoryBuffer memory)
2425
{
2526
Contract.Requires(node != null);
2627
Contract.Requires(memory != null);

0 commit comments

Comments
 (0)