--- Daodan/src/Daodan_Patch.h 2009/06/09 12:00:41 346 +++ Daodan/src/Daodan_Patch.h 2014/08/25 23:21:09 1008 @@ -1,19 +1,22 @@ -#pragma once #ifndef DAODAN_PATCH_H #define DAODAN_PATCH_H -#include +#include "stdint.h" #define DDrPatch_Const(d, c) DDrPatch_String(d, c, sizeof(c)) -#define OniExe ((void*)0x00400000) +#define OniExe ((char*)0x00400000) bool DDrPatch_MakeJump(void* from, void* to); bool DDrPatch_MakeCall(void* from, void* to); -bool DDrPatch_String(char* dest, const char* string, int length); -bool DDrPatch_Byte(char* dest, char value); -bool DDrPatch_Int32(int* dest, int value); -bool DDrPatch_Int16(short* dest, short value); -bool DDrPatch_StrDup(int* dest, const char* value); +void* DDrPatch_MakeDetour(void* from, void* to); +bool DDrPatch_String(char* dest, const unsigned char* string, int length); +bool DDrPatch_Byte(char* dest, unsigned char value); +bool DDrPatch_Int32(int* dest, unsigned int value); +bool DDrPatch_Int16(short* dest, unsigned short value); +bool DDrPatch_NOOP(char* dest, unsigned int length); +void* DDrPatch_ExecutableASM(char* from, char* nextInst, const unsigned char* code, int length); + +void DDrPatch_PrintDisasm(void* addr, int instLimit, int sizeLimit); #endif