2 |
|
#include "Daodan_Patch.h" |
3 |
|
#include "Daodan_Utility.h" |
4 |
|
|
5 |
+ |
#include "Oni.h" |
6 |
|
#include "BFW_Utility.h" |
7 |
|
|
8 |
|
HMODULE DDrDLLModule; |
55 |
|
return true; |
56 |
|
} |
57 |
|
|
58 |
+ |
void DDrMain(int argc, char* argv[]) |
59 |
+ |
{ |
60 |
+ |
DDrPatch_Init(); |
61 |
+ |
|
62 |
+ |
// Safe startup message printer |
63 |
+ |
DDrPatch_MakeJump(UUrStartupMessage, DDrStartupMessage); |
64 |
+ |
|
65 |
+ |
ONiMain(argc, argv); |
66 |
+ |
} |
67 |
+ |
|
68 |
|
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved) |
69 |
|
{ |
70 |
|
switch (fdwReason) |
73 |
|
DDrDLLModule = hinstDLL; |
74 |
|
DDrONiModule = GetModuleHandle(NULL); |
75 |
|
|
76 |
< |
DDrPatch_MakeJump(UUrStartupMessage, DDrStartupMessage); |
77 |
< |
DDrPatch_Init(); |
76 |
> |
DDrPatch_MakeCall((void*)0x00400000 + 0x0010fb49, DDrMain); |
77 |
> |
|
78 |
|
break; |
79 |
|
} |
80 |
|
return TRUE; |