Dota2Patcher
 
Loading...
Searching...
No Matches
Memory.cpp File Reference
#include <tlhelp32.h>
#include <psapi.h>
#include "ProcessHandle.h"
#include "Memory.h"

Macros

#define InRange(x, a, b)   (x >= a && x <= b)
 
#define getBit(x)   (InRange((x & (~0x20)), 'A', 'F') ? ((x & (~0x20)) - 'A' + 0xA): (InRange(x, '0', '9') ? x - '0': 0))
 
#define getByte(x)   (getBit(x[0]) << 4 | getBit(x[1]))
 

Macro Definition Documentation

◆ getBit

#define getBit (   x)    (InRange((x & (~0x20)), 'A', 'F') ? ((x & (~0x20)) - 'A' + 0xA): (InRange(x, '0', '9') ? x - '0': 0))

◆ getByte

#define getByte (   x)    (getBit(x[0]) << 4 | getBit(x[1]))

◆ InRange

#define InRange (   x,
  a,
 
)    (x >= a && x <= b)