@@ -9,20 +9,20 @@ namespace FrostbitePlugin
99 /// <summary>A custom node info reader which outputs Frostbite type infos.</summary>
1010 public class FrostBiteNodeInfoReader : INodeInfoReader
1111 {
12- public string ReadNodeInfo ( BaseHexCommentNode node , IntPtr nodeAddress , IntPtr nodeValue , MemoryBuffer memory )
12+ public string ReadNodeInfo ( BaseHexCommentNode node , IRemoteMemoryReader reader , MemoryBuffer memory , IntPtr nodeAddress , IntPtr nodeValue )
1313 {
1414 // 1. try the direct value
15- var info = ReadPtrInfo ( nodeValue , memory ) ;
15+ var info = ReadPtrInfo ( nodeValue , reader ) ;
1616 if ( ! string . IsNullOrEmpty ( info ) )
1717 {
1818 return info ;
1919 }
2020
2121 // 2. try indirect pointer
22- var indirectPtr = memory . Process . ReadRemoteIntPtr ( nodeValue ) ;
22+ var indirectPtr = reader . ReadRemoteIntPtr ( nodeValue ) ;
2323 if ( indirectPtr . MayBeValid ( ) )
2424 {
25- info = ReadPtrInfo ( indirectPtr , memory ) ;
25+ info = ReadPtrInfo ( indirectPtr , reader ) ;
2626 if ( ! string . IsNullOrEmpty ( info ) )
2727 {
2828 return $ "Ptr -> { info } ";
@@ -32,10 +32,10 @@ public string ReadNodeInfo(BaseHexCommentNode node, IntPtr nodeAddress, IntPtr n
3232 var weakTempPtr = indirectPtr - IntPtr . Size ;
3333 if ( weakTempPtr . MayBeValid ( ) )
3434 {
35- var weakPtr = memory . Process . ReadRemoteIntPtr ( weakTempPtr ) ;
35+ var weakPtr = reader . ReadRemoteIntPtr ( weakTempPtr ) ;
3636 if ( weakPtr . MayBeValid ( ) )
3737 {
38- info = ReadPtrInfo ( weakPtr , memory ) ;
38+ info = ReadPtrInfo ( weakPtr , reader ) ;
3939 if ( ! string . IsNullOrEmpty ( info ) )
4040 {
4141 return $ "WeakPtr -> { info } ";
@@ -47,26 +47,26 @@ public string ReadNodeInfo(BaseHexCommentNode node, IntPtr nodeAddress, IntPtr n
4747 return null ;
4848 }
4949
50- private static string ReadPtrInfo ( IntPtr value , MemoryBuffer memory )
50+ private static string ReadPtrInfo ( IntPtr value , IRemoteMemoryReader process )
5151 {
52- var getTypeFnPtr = memory . Process . ReadRemoteIntPtr ( value ) ;
52+ var getTypeFnPtr = process . ReadRemoteIntPtr ( value ) ;
5353 if ( getTypeFnPtr . MayBeValid ( ) )
5454 {
5555#if RECLASSNET64
56- var offset = memory . Process . ReadRemoteInt32 ( getTypeFnPtr + 3 ) ;
56+ var offset = process . ReadRemoteInt32 ( getTypeFnPtr + 3 ) ;
5757 var typeInfoPtr = getTypeFnPtr + offset + 7 ;
5858#else
59- var typeInfoPtr = memory . Process . ReadRemoteIntPtr ( getTypeFnPtr + 1 ) ;
59+ var typeInfoPtr = process . ReadRemoteIntPtr ( getTypeFnPtr + 1 ) ;
6060#endif
6161 if ( typeInfoPtr . MayBeValid ( ) )
6262 {
63- var typeInfoDataPtr = memory . Process . ReadRemoteIntPtr ( typeInfoPtr ) ;
63+ var typeInfoDataPtr = process . ReadRemoteIntPtr ( typeInfoPtr ) ;
6464 if ( typeInfoDataPtr . MayBeValid ( ) )
6565 {
66- var namePtr = memory . Process . ReadRemoteIntPtr ( typeInfoDataPtr ) ;
66+ var namePtr = process . ReadRemoteIntPtr ( typeInfoDataPtr ) ;
6767 if ( namePtr . MayBeValid ( ) )
6868 {
69- var info = memory . Process . ReadRemoteStringUntilFirstNullCharacter ( Encoding . UTF8 , namePtr , 64 ) ;
69+ var info = process . ReadRemoteStringUntilFirstNullCharacter ( Encoding . UTF8 , namePtr , 64 ) ;
7070 if ( info . Length > 0 && info [ 0 ] . IsPrintable ( ) )
7171 {
7272 return info ;
0 commit comments