public bool WriteValueToWatch(int handle, double val) { IWatch32Bit watch = GetWatch(handle); if (watch.type == WatchTypes.T_INT) { memHacker.WriteInteger(GetAddress(watch), (int)val); } else if (watch.type == WatchTypes.T_SHORT) { memHacker.WriteShort(GetAddress(watch), (short)val); } else if (watch.type == WatchTypes.T_BYTE) { memHacker.WriteShort(GetAddress(watch), (byte)val); } else if (watch.type == WatchTypes.T_FLOAT) { memHacker.WriteInteger(GetAddress(watch), (int)(val * 4096)); } else { return(false); } return(true); }
public int GetAddress(IWatch32Bit watch) { int address = (int)watch.offsets[0]; for (int i = 1; i < watch.offsets.Length; i++) { address = ReadInteger(address) + watch.offsets[i]; } return(address); }
private int GetAddress(IWatch32Bit watch) { int address = watch.offsets[0]; for (int i = 1; i < watch.offsets.Length; i++) { address = memHacker.ReadInteger(address) + watch.offsets[i]; } return(address); }
public SimpleWatchDisplay(IWatch32Bit watch, string name) { this.watch = watch; this.watchName = name; digitsPastRadix = 0; displayAsFixedPoint = false; displayAsHex = false; displayAsSigned = true; displayFixedPointExact = true; this.AutoSize = true; SetText(name + ": ?"); }
public long GetCEAddress(IWatch32Bit watch) { return(DSAddressToCEAddress(GetAddress(watch))); }
public void UpdateValue(IWatch32Bit watch) { watch.updateValue(memHacker.ReadInteger(GetAddress(watch))); }
public int AddWatch(IWatch32Bit w) { vars.Add(_nextWatchID, w); _nextWatchID++; return(_nextWatchID - 1); }