public void WriteVec4D(Address adr, Vec4D val)
 {
     API_WriteProcessMemory(adr, BitConverter.GetBytes(val.x));
     API_WriteProcessMemory(adr.OffsetBy(4), BitConverter.GetBytes(val.y));
     API_WriteProcessMemory(adr.OffsetBy(8), BitConverter.GetBytes(val.z));
     API_WriteProcessMemory(adr.OffsetBy(12), BitConverter.GetBytes(val.w));
 }
        public Vec4D ReadVec4D(Address adr)
        {
            byte[] bufferX = API_ReadProcessMemory(adr, sizeof(float));
            byte[] bufferY = API_ReadProcessMemory(adr.OffsetBy(4), sizeof(float));
            byte[] bufferZ = API_ReadProcessMemory(adr.OffsetBy(8), sizeof(float));
            byte[] bufferW = API_ReadProcessMemory(adr.OffsetBy(12), sizeof(float));
            Vec4D  res     = new Vec4D();

            res.x = BitConverter.ToSingle(bufferX, 0);
            res.y = BitConverter.ToSingle(bufferY, 0);
            res.z = BitConverter.ToSingle(bufferZ, 0);
            res.w = BitConverter.ToSingle(bufferW, 0);
            return(res);
        }
Beispiel #3
0
 public void WriteVec4D(Vec4D val)
 {
     callback.WriteVec4D(address, val);
 }