예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
        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 + ": ?");
        }
예제 #5
0
 public long GetCEAddress(IWatch32Bit watch)
 {
     return(DSAddressToCEAddress(GetAddress(watch)));
 }
예제 #6
0
 public void UpdateValue(IWatch32Bit watch)
 {
     watch.updateValue(memHacker.ReadInteger(GetAddress(watch)));
 }
예제 #7
0
 public int AddWatch(IWatch32Bit w)
 {
     vars.Add(_nextWatchID, w);
     _nextWatchID++;
     return(_nextWatchID - 1);
 }