| 8 |
|
#include "Daodan_Persistence.h" |
| 9 |
|
#include "Daodan_BSL.h" |
| 10 |
|
#include "Daodan_Console.h" |
| 11 |
< |
|
| 11 |
> |
#include "Daodan_Update.h" |
| 12 |
|
#include "Flatline_BSL.h" |
| 13 |
|
#include "Flatline_Hooks.h" |
| 14 |
|
#include "Daodan_WindowHack.h" |
| 60 |
|
bool opt_shadow = false; |
| 61 |
|
bool opt_topmost = false; |
| 62 |
|
|
| 63 |
+ |
typedef int (__cdecl *CHINESEPROC)(DWORD WINAPI); |
| 64 |
+ |
bool patch_chinese = false; |
| 65 |
|
bool DDrPatch_Init() |
| 66 |
|
{ |
| 67 |
|
DDrStartupMessage("patching engine"); |
| 237 |
|
DDrPatch_Const(0x0051BB64, regen_patch); |
| 238 |
|
} |
| 239 |
|
|
| 240 |
+ |
if(patch_chinese) |
| 241 |
+ |
{ |
| 242 |
+ |
HMODULE dll = LoadLibrary("xfhsm_oni.dll"); |
| 243 |
+ |
if( dll ) |
| 244 |
+ |
{ |
| 245 |
+ |
void* proc = GetProcAddress( dll, "InstallHook" ); |
| 246 |
+ |
if(proc) |
| 247 |
+ |
{ |
| 248 |
+ |
((CHINESEPROC)proc)(GetCurrentThreadId()); |
| 249 |
+ |
} |
| 250 |
+ |
} |
| 251 |
+ |
} |
| 252 |
+ |
|
| 253 |
|
//Fix crappy ai2_shownames |
| 254 |
|
if(1) |
| 255 |
|
{ |
| 398 |
|
DDrStartupMessage("unrecognised patch \"%s\"", name); |
| 399 |
|
break; |
| 400 |
|
case s_language: |
| 401 |
< |
if (!_stricmp(name, "savepoint")) |
| 401 |
> |
if (!_stricmp(name, "chinese")) |
| 402 |
> |
patch_chinese = true; |
| 403 |
> |
else if (!_stricmp(name, "savepoint")) |
| 404 |
|
{ |
| 405 |
|
char* str = _strdup(value); |
| 406 |
|
DDrPatch_Int32(OniExe + 0x000fd730, (int)str); |
| 590 |
|
opt_ignore_private_data = false; |
| 591 |
|
opt_sound = true; |
| 592 |
|
|
| 593 |
+ |
DDrStartupMessage("checking for updates..."); |
| 594 |
+ |
|
| 595 |
+ |
DDr_CheckForUpdates(argc, argv); |
| 596 |
+ |
|
| 597 |
|
DDrConfig(); |
| 598 |
|
DDrStartupMessage("parsing command line..."); |
| 599 |
|
for (i = 1; i < argc; i ++) |