9 |
|
#include "../Daodan_Persistence.h" |
10 |
|
#include "../Daodan_Utility.h" |
11 |
|
#include "../Daodan_Win32.h" |
12 |
< |
#ifdef FLATLINE |
13 |
< |
#include "../Flatline_BSL.h" |
14 |
< |
#include "../Flatline_Hooks.h" |
15 |
< |
#endif |
12 |
> |
#include "../flatline/Flatline_BSL.h" |
13 |
> |
#include "../flatline/Flatline_Hooks.h" |
14 |
|
#include "../Oni.h" |
15 |
|
|
16 |
|
typedef int (__cdecl *CHINESEPROC)(DWORD ThreadId); |
41 |
|
{ |
42 |
|
if (opt_usedaodanbsl) |
43 |
|
SLrDaodan_Initialize(); |
44 |
+ |
if (patch_flatline) |
45 |
+ |
SLrFlatline_Initialize(); |
46 |
|
} |
47 |
|
|
48 |
|
|
80 |
|
} |
81 |
|
|
82 |
|
|
83 |
< |
int FLrHook_DebugNameTextureInit(short width, short height, int type, int allocated, int flags, char* name, void** output) |
83 |
> |
int DD_Patch_DebugNameTextureInit(short width, short height, int type, int allocated, int flags, char* name, void** output) |
84 |
|
{ |
85 |
|
//flags = (1 << 10); |
86 |
|
type = 1; |
89 |
|
return M3rTextureMap_New(width, height, type, allocated, flags, name, output); |
90 |
|
} |
91 |
|
|
92 |
< |
short FLrHook_DebugNameShadeHack( Character* Char ) |
92 |
> |
short DD_Patch_DebugNameShadeHack( Character* Char ) |
93 |
|
{ |
94 |
|
return TSrContext_SetShade(*(void**)(OniExe + 0x001EB844), ONrCharacter_GetHealthShade( Char->Health, Char->MaxHealth )); |
95 |
|
//return TSrContext_SetShade(*(void**)0x005EB844, 0xFFFFFFFF); |
243 |
|
DDrPatch_Int32 ((int*)(OniExe + 0x000d3570), 0xc3c03366); |
244 |
|
} |
245 |
|
|
246 |
+ |
// Enable flatline multiplayer code |
247 |
+ |
void DD_Patch_Flatline() |
248 |
+ |
{ |
249 |
+ |
DDrPatch_NOOP((char*)(OniExe + 0x000E1957), 6 ); |
250 |
+ |
DDrPatch_MakeCall((void*)(OniExe + 0x000E17F6), FLrHook_Lasers ); |
251 |
+ |
|
252 |
+ |
|
253 |
+ |
//Flatline related stuff |
254 |
+ |
DDrPatch_MakeCall((void*)(OniExe + 0x000FBCEA), DDrText_Hook); |
255 |
+ |
|
256 |
+ |
DDrPatch_Int32((int*)(OniExe + 0x000B24D2), FLrSpawnHack); |
257 |
+ |
|
258 |
+ |
DDrPatch_NOOP((char*)(OniExe + 0x000C26CB), 6); |
259 |
+ |
|
260 |
+ |
DDrPatch_MakeCall((void*)(OniExe + 0x000C26CB), FLrHook_DoorOpen); |
261 |
+ |
DDrPatch_MakeCall((void*)(OniExe + 0x000EE3CF), FLrHook_ConsoleActivate); |
262 |
+ |
} |
263 |
+ |
|
264 |
|
// Font texture cache doubled |
265 |
|
void DD_Patch_FontTextureCache() |
266 |
|
{ |
472 |
|
DDrPatch_Byte((char*)(OniExe + 0x0008C898), 0x8B ); |
473 |
|
DDrPatch_Byte((char*)(OniExe + 0x0008C899), 0xCE ); |
474 |
|
|
475 |
< |
DDrPatch_MakeCall((void*)(OniExe + 0x0008C8A3), FLrHook_DebugNameShadeHack); |
475 |
> |
DDrPatch_MakeCall((void*)(OniExe + 0x0008C8A3), DD_Patch_DebugNameShadeHack); |
476 |
|
|
477 |
|
//Make the background black for additive blending |
478 |
< |
DDrPatch_MakeCall((void*)(OniExe + 0x0008C802), FLrHook_DebugNameTextureInit ); |
478 |
> |
DDrPatch_MakeCall((void*)(OniExe + 0x0008C802), DD_Patch_DebugNameTextureInit ); |
479 |
|
*/ |
480 |
|
} |
481 |
|
|
516 |
|
if (patch_daodandisplayenum) |
517 |
|
DD_Patch_DaodanDisplayEnum(); |
518 |
|
|
501 |
– |
if (patch_daodaninit) |
502 |
– |
DD_Patch_DaodanInit(); |
503 |
– |
|
519 |
|
if (patch_directinput) |
520 |
|
DD_Patch_DirectInput(); |
521 |
|
|
574 |
|
DD_Patch_WpFadetime(); |
575 |
|
|
576 |
|
|
577 |
+ |
DD_Patch_DaodanInit(); |
578 |
+ |
|
579 |
|
DD_Patch_GammaSlider(); |
580 |
|
|
581 |
|
DD_Patch_PrintWarning(); |
583 |
|
|
584 |
|
DD_Patch_ShowNames(); |
585 |
|
|
586 |
< |
#ifdef FLATLINE |
587 |
< |
DDrPatch_NOOP((char*)(OniExe + 0x000E1957), 6 ); |
571 |
< |
DDrPatch_MakeCall((void*)(OniExe + 0x000E17F6), FLrHook_Lasers ); |
572 |
< |
|
573 |
< |
|
574 |
< |
|
575 |
< |
//Flatline related stuff |
576 |
< |
DDrPatch_MakeCall((void*)(OniExe + 0x000FBCEA), DDrText_Hook); |
577 |
< |
|
578 |
< |
DDrPatch_Int32((int*)(OniExe + 0x000B24D2), FLrSpawnHack); |
579 |
< |
|
580 |
< |
DDrPatch_NOOP((char*)(OniExe + 0x000C26CB), 6); |
581 |
< |
|
582 |
< |
DDrPatch_MakeCall((void*)(OniExe + 0x000C26CB), FLrHook_DoorOpen); |
583 |
< |
DDrPatch_MakeCall((void*)(OniExe + 0x000EE3CF), FLrHook_ConsoleActivate); |
584 |
< |
#endif |
586 |
> |
if (patch_flatline) |
587 |
> |
DD_Patch_Flatline(); |
588 |
|
|
589 |
|
return true; |
590 |
|
} |