| 1 | 
 – | 
 #pragma once | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 1 | 
   | 
 #ifndef DAODAN_PATCH_H | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 2 | 
   | 
 #define DAODAN_PATCH_H | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 3 | 
   | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 | 4 | 
 < | 
 #include "bool.h" | 
 
 
 
 
 
 
 
 
 
 | 4 | 
 > | 
 #include "stdint.h" | 
 
 
 
 
 
 
 
 
 
 
 
 | 5 | 
   | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 6 | 
   | 
 #define DDrPatch_Const(d, c) DDrPatch_String(d, c, sizeof(c)) | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 7 | 
   | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 9 | 
   | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 10 | 
   | 
 bool DDrPatch_MakeJump(void* from, void* to); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 11 | 
   | 
 bool DDrPatch_MakeCall(void* from, void* to); | 
 
 
 
 
 
 
 
 
 | 12 | 
 + | 
 void* DDrPatch_MakeDetour(void* from, void* to); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 13 | 
   | 
 bool DDrPatch_String(char* dest, const unsigned char* string, int length); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 14 | 
   | 
 bool DDrPatch_Byte(char* dest, unsigned char value); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 15 | 
   | 
 bool DDrPatch_Int32(int* dest, unsigned int value); |