ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/Daodan/src/Daodan_Patch.h
Revision: 1008
Committed: Mon Aug 25 23:21:09 2014 UTC (11 years, 1 month ago) by alloc
Content type: text/x-chdr
File size: 794 byte(s)
Log Message:
Daodan 3.9: Added AI awareness patch (fixes #36)

File Contents

# Content
1 #ifndef DAODAN_PATCH_H
2 #define DAODAN_PATCH_H
3
4 #include "stdint.h"
5
6 #define DDrPatch_Const(d, c) DDrPatch_String(d, c, sizeof(c))
7
8 #define OniExe ((char*)0x00400000)
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);
16 bool DDrPatch_Int16(short* dest, unsigned short value);
17 bool DDrPatch_NOOP(char* dest, unsigned int length);
18 void* DDrPatch_ExecutableASM(char* from, char* nextInst, const unsigned char* code, int length);
19
20 void DDrPatch_PrintDisasm(void* addr, int instLimit, int sizeLimit);
21
22 #endif