Skip to content

Commit

Permalink
new mem addr
Browse files Browse the repository at this point in the history
  • Loading branch information
miatribe committed Sep 20, 2017
1 parent 7f67967 commit 2a5183e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions GutterLines/MemRead.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ public class MemRead

private int processNum;
private Process curProcess;
private const int latAddress = 0x00D26694;
private const int lonAddress = 0x00D26698;
private const int nameAddress = 0x00D3CBE0;
private const int latAddress = 0x00D2DE74;
private const int lonAddress = 0x00D2DE78;
private const int nameAddress = 0x00D44630;

public void GetProcess()
{
Expand Down Expand Up @@ -52,14 +52,14 @@ public GameInfo GetValues()
}
}

public static string ReadString(IntPtr process, IntPtr baseAddress)
private static string ReadString(IntPtr process, IntPtr baseAddress)
{
var buffer = new byte[8];
ReadProcessMemory(process, baseAddress, buffer, 8, out IntPtr bytesRead);
return System.Text.Encoding.Default.GetString(buffer).Replace("\0",string.Empty);
}

public static int ReadInt(IntPtr process, IntPtr baseAddress)
private static int ReadInt(IntPtr process, IntPtr baseAddress)
{
var buffer = new byte[4];
ReadProcessMemory(process, baseAddress, buffer, 4, out IntPtr bytesRead);
Expand Down

0 comments on commit 2a5183e

Please sign in to comment.