82 |
|
// Pathfinding grid cache size x8 |
83 |
|
if (patch_pathfinding) |
84 |
|
{ |
85 |
+ |
const char pathfinding[2] = {0x90 , 0xE9 }; |
86 |
|
DDrPatch_Byte (OniExe + 0x0010b03b, 0x20); |
87 |
|
DDrPatch_Byte (OniExe + 0x0010b04c, 0x20); |
88 |
+ |
|
89 |
+ |
//other stuff |
90 |
+ |
DDrPatch_Const(0x440789, pathfinding); |
91 |
|
} |
92 |
|
|
93 |
|
// Projectile awareness fixed |
102 |
|
// Forced DirectInput (for Windows NT) |
103 |
|
if (patch_directinput) |
104 |
|
DDrPatch_Byte (OniExe + 0x00002e6d, 0xeb); |
105 |
< |
|
105 |
> |
|
106 |
|
if (patch_wpfadetime) |
107 |
|
{ |
108 |
|
// Makes wp_fadetime actually have a function |
114 |
|
DDrPatch_Int16 ((OniExe + 0x0011ab0e), 0x12c0); |
115 |
|
} |
116 |
|
|
117 |
+ |
// FIXME: add switches |
118 |
+ |
//pathfinding fix |
119 |
+ |
|
120 |
+ |
|
121 |
+ |
|
122 |
|
|
123 |
|
// Hackish fix for Konoko not kicking guns |
124 |
|
// Don't use this, it breaks stairs. |
216 |
|
if (patch_disablecmdline) |
217 |
|
DDrPatch_Int32 (OniExe + 0x000d3570, 0xc3c03366); |
218 |
|
|
219 |
+ |
if (patch_bsl) |
220 |
+ |
{ |
221 |
+ |
//Calculating the value of the needed offset is much more reliable when the compiler does it for you. |
222 |
+ |
|
223 |
+ |
//TODO: fix moonshadow. |
224 |
+ |
Character * Chr = 0; |
225 |
+ |
int NoPath = (int)&(Chr[0].RegenHax) & 0x000000FF; |
226 |
+ |
const char regen_patch[] = |
227 |
+ |
{0x90, 0x90, 0x90, 0x90, 0x90, // mov al, _WPgRegenerationCheat -> NOOP |
228 |
+ |
0x90, 0x90, // test al, al -> NOOP |
229 |
+ |
0x90, 0x90, // jz short loc_51BB98 -> NOOP |
230 |
+ |
0x8B, 0x86, (char)NoPath, 0x01, 0x00, 0x00, // mov eax, [esi+Character.field_1E8] |
231 |
+ |
// -> mov eax, [esi+Character.RegenHax] |
232 |
+ |
0x85, 0xC0, // test eax, eax |
233 |
+ |
0x74, 0x21 // jnz 0x21 -> jz 0x21 |
234 |
+ |
}; |
235 |
+ |
DDrPatch_Const(0x0051BB64, regen_patch); |
236 |
+ |
} |
237 |
+ |
|
238 |
+ |
|
239 |
|
return true; |
240 |
|
} |
241 |
|
|
590 |
|
// Cheats always enabled |
591 |
|
if (patch_cheatsenabled) |
592 |
|
DDrPatch_MakeJump(ONrPersist_GetWonGame, DDrPersist_GetWonGame); |
593 |
< |
#if 0 |
593 |
> |
//#if 0 |
594 |
|
// Windowed mode |
595 |
< |
if (patch_usedaodangl) |
595 |
> |
// if (patch_usedaodangl) |
596 |
|
{ |
597 |
+ |
DDrPatch_NOOP((char*)0x004032B7, 6); |
598 |
+ |
DDrPatch_MakeCall((char*)0x004032B7, LIiP_SetCursorPosHook); |
599 |
+ |
|
600 |
+ |
DDrPatch_NOOP((char*)0x00403349, 6); |
601 |
+ |
DDrPatch_MakeCall((char*)0x00403349, LIiP_SetCursorPosHook); |
602 |
|
DDrPatch_MakeJump(ONrPlatform_Initialize, DDrPlatform_Initialize); |
603 |
|
DDrPatch_MakeJump(gl_platform_initialize, daodangl_platform_initialize); |
604 |
|
} |
605 |
< |
#endif |
605 |
> |
//#endif |
606 |
|
// Hacked windowed mode (for when daodangl isn't working properly) |
607 |
|
//if (patch_windowhack) |
608 |
|
|
609 |
< |
DDrWindowHack_Install(); |
609 |
> |
// DDrWindowHack_Install(); |
610 |
|
|
611 |
|
if (patch_daodaninit) |
612 |
|
DDrPatch_MakeCall(OniExe + 0x000d345a, DDrGame_Init); |