| 76 |
|
return result; |
| 77 |
|
} |
| 78 |
|
|
| 79 |
+ |
|
| 80 |
+ |
int FLrHook_DebugNameTextureInit(short width, short height, int type, int allocated, int flags, char* name, void** output) |
| 81 |
+ |
{ |
| 82 |
+ |
//flags = (1 << 10); |
| 83 |
+ |
type = 1; |
| 84 |
+ |
//DDrPatch_Byte( 0x005EB83C + 3, 0xff ); |
| 85 |
+ |
DDrPatch_Int32((int*)(OniExe + 0x001EB83C), 0xFF000000 ); |
| 86 |
+ |
return M3rTextureMap_New(width, height, type, allocated, flags, name, output); |
| 87 |
+ |
} |
| 88 |
+ |
|
| 89 |
+ |
short FLrHook_DebugNameShadeHack( Character* Char ) |
| 90 |
+ |
{ |
| 91 |
+ |
return TSrContext_SetShade(*(void**)(OniExe + 0x001EB844), ONrCharacter_GetHealthShade( Char->Health, Char->MaxHealth )); |
| 92 |
+ |
//return TSrContext_SetShade(*(void**)0x005EB844, 0xFFFFFFFF); |
| 93 |
+ |
} |
| 94 |
+ |
|
| 95 |
+ |
|
| 96 |
|
// Disable UUrPlatform_Initalize/Terminate, this enables the Alt-Tab and the |
| 97 |
|
// Windows key but has the possible side effect of allowing the screensaver |
| 98 |
|
// to enable itself in-game. |
| 434 |
|
DDrPatch_MakeJump((void*)(OniExe + 0x000245A0), (void*)DDrPrintWarning); |
| 435 |
|
} |
| 436 |
|
|
| 437 |
+ |
//Fix crappy ai2_shownames |
| 438 |
+ |
void DD_Patch_ShowNames() |
| 439 |
+ |
{ |
| 440 |
+ |
//Set distance above head to 4.0 |
| 441 |
+ |
DDrPatch_Int32((int*)(OniExe + 0x0008C998), 0x005296C8); |
| 442 |
+ |
//texture height |
| 443 |
+ |
DDrPatch_Byte((char*)(OniExe + 0x0008C9DF), 0x3F ); |
| 444 |
+ |
//texture width |
| 445 |
+ |
DDrPatch_NOOP((char*)(OniExe + 0x0008C9CA), 6 ); |
| 446 |
+ |
|
| 447 |
+ |
/* |
| 448 |
+ |
// Crashes game. |
| 449 |
+ |
//Set the text color to whatever we like ;) |
| 450 |
+ |
DDrPatch_NOOP((char*)(OniExe + 0x0008C898), 6 ); |
| 451 |
+ |
DDrPatch_Byte((char*)(OniExe + 0x0008C898), 0x8B ); |
| 452 |
+ |
DDrPatch_Byte((char*)(OniExe + 0x0008C899), 0xCE ); |
| 453 |
+ |
|
| 454 |
+ |
DDrPatch_MakeCall((void*)(OniExe + 0x0008C8A3), FLrHook_DebugNameShadeHack); |
| 455 |
+ |
|
| 456 |
+ |
//Make the background black for additive blending |
| 457 |
+ |
DDrPatch_MakeCall((void*)(OniExe + 0x0008C802), FLrHook_DebugNameTextureInit ); |
| 458 |
+ |
*/ |
| 459 |
+ |
} |
| 460 |
+ |
|
| 461 |
|
bool DD_Patch_Init() |
| 462 |
|
{ |
| 463 |
|
DDrStartupMessage("Daodan: Patching engine"); |
| 560 |
|
|
| 561 |
|
DD_Patch_PrintWarning(); |
| 562 |
|
|
| 563 |
< |
//Fix crappy ai2_shownames |
| 523 |
< |
if(1) |
| 524 |
< |
{ |
| 525 |
< |
//Set distance above head to 4.0 |
| 526 |
< |
DDrPatch_Int32((int*)(OniExe + 0x0008C998), 0x005296C8); |
| 527 |
< |
//texture height |
| 528 |
< |
DDrPatch_Byte((char*)(OniExe + 0x0008C9DF), 0x3F ); |
| 529 |
< |
//texture width |
| 530 |
< |
DDrPatch_NOOP((char*)(OniExe + 0x0008C9CA), 6 ); |
| 531 |
< |
/* Crashes game. Perhaps only valid with the additional FLr-callhooks? Those |
| 532 |
< |
didn't exist in source though. |
| 533 |
< |
//Set the text color to whatever we like ;) |
| 534 |
< |
DDrPatch_NOOP((char*)(OniExe + 0x0008C898), 6 ); |
| 535 |
< |
DDrPatch_Byte((char*)(OniExe + 0x0008C898), 0x8B ); |
| 536 |
< |
DDrPatch_Byte((char*)(OniExe + 0x0008C899), 0xCE ); |
| 537 |
< |
*/ |
| 538 |
< |
//FLATLINE? DDrPatch_MakeCall((void*)(OniExe + 0x0008C8A3), FLrHook_DebugNameShadeHack); |
| 539 |
< |
|
| 540 |
< |
//Make the background black for additive blending |
| 541 |
< |
//FLATLINE? DDrPatch_MakeCall((void*)(OniExe + 0x0008C802), FLrHook_DebugNameTextureInit ); |
| 542 |
< |
} |
| 563 |
> |
DD_Patch_ShowNames(); |
| 564 |
|
|
| 565 |
|
if(1) |
| 566 |
|
{ |