| 52 |
|
bool patch_daodaninit = true; |
| 53 |
|
bool patch_bsl = true; |
| 54 |
|
bool patch_cheater = true; |
| 55 |
< |
|
| 56 |
< |
// bool patch_newweapon = true; |
| 57 |
< |
|
| 55 |
> |
bool patch_newweapon = true; |
| 56 |
|
bool opt_usedaodanbsl = true; |
| 57 |
|
bool opt_border = true; |
| 58 |
|
bool opt_shadow = false; |
| 186 |
|
} |
| 187 |
|
|
| 188 |
|
//Test newweap patch |
| 189 |
< |
// if (patch_newweapon) { |
| 189 |
> |
if (patch_newweapon) { |
| 190 |
|
|
| 191 |
|
//Makes it always say "Recieved weapon_name." |
| 192 |
|
//Needs check for loc_4DFC66 |
| 193 |
< |
DDrPatch_NOOP( OniExe + 0x000E4DF8,2); |
| 193 |
> |
//DDrPatch_NOOP( OniExe + 0x000E4DF8,2); |
| 194 |
|
|
| 195 |
|
//Adds Weapon name and ammo meter to pickup autoprompt |
| 196 |
|
DDrPatch_NOOP( OniExe + 0x000FAC73, 9); |
| 200 |
|
//Moves location of colors |
| 201 |
|
//DDrPatch_Int32( 0x0042E3D5, (int)&DDrDSayColors ); |
| 202 |
|
//DDrPatch_Int32( 0x0042E3DA, (int)&DDrDSayColors ); |
| 203 |
< |
// } |
| 203 |
> |
} |
| 204 |
|
|
| 205 |
|
// Disable loading the vtuneapi.dll |
| 206 |
|
if (patch_killvtune) |
| 283 |
|
opt_sound = !_stricmp(inifile_cleanstr(value), "true"); |
| 284 |
|
else if (!_stricmp(name, "switch")) |
| 285 |
|
M3gResolutionSwitch = !_stricmp(inifile_cleanstr(value), "true"); |
| 286 |
+ |
//else if (!_stricmp(name, "devmode")) |
| 287 |
+ |
//turn_dev_mode_on = !_stricmp(inifile_cleanstr(value), "true"); |
| 288 |
|
else |
| 289 |
|
DDrStartupMessage("unrecognised option \"%s\"", name); |
| 290 |
|
break; |
| 343 |
|
patch_bsl = !_stricmp(inifile_cleanstr(value), "true"); |
| 344 |
|
else if (!_stricmp(name, "cheater")) |
| 345 |
|
patch_cheater = !_stricmp(inifile_cleanstr(value), "true"); |
| 346 |
+ |
else if (!_stricmp(name, "newweap")) |
| 347 |
+ |
patch_newweapon = !_stricmp(inifile_cleanstr(value), "true"); |
| 348 |
|
else |
| 349 |
|
DDrStartupMessage("unrecognised patch \"%s\"", name); |
| 350 |
|
break; |
| 466 |
|
|
| 467 |
|
void DDrConfig() |
| 468 |
|
{ |
| 469 |
< |
/* if (GetFileAttributes("daodan.ini") == INVALID_FILE_ATTRIBUTES) |
| 469 |
> |
|
| 470 |
> |
if (GetFileAttributes("daodan.ini") == INVALID_FILE_ATTRIBUTES) |
| 471 |
|
{ |
| 472 |
+ |
FILE* fp; |
| 473 |
|
DDrStartupMessage("daodan.ini doesn't exist, creating"); |
| 474 |
< |
FILE* fp = fopen("daodan.ini", "w"); |
| 474 |
> |
fp = fopen("daodan.ini", "w"); |
| 475 |
|
if (fp) |
| 476 |
|
{ |
| 477 |
|
fputs("[Options]\n", fp); |
| 481 |
|
|
| 482 |
|
DDrStartupMessage("parsing daodan.ini..."); |
| 483 |
|
if (!inifile_read("daodan.ini", DDrIniCallback)) |
| 484 |
< |
DDrStartupMessage("error reading daodan.ini, check your syntax!");*/ |
| 484 |
> |
DDrStartupMessage("error reading daodan.ini, check your syntax!"); |
| 485 |
|
DDrStartupMessage("finished parsing"); |
| 486 |
|
} |
| 487 |
|
|
| 594 |
|
// Cheats always enabled |
| 595 |
|
if (patch_cheatsenabled) |
| 596 |
|
DDrPatch_MakeJump(ONrPersist_GetWonGame, DDrPersist_GetWonGame); |
| 597 |
< |
//#if 0 |
| 597 |
> |
|
| 598 |
|
// Windowed mode |
| 599 |
< |
// if (patch_usedaodangl) |
| 599 |
> |
if (patch_usedaodangl) |
| 600 |
|
{ |
| 601 |
|
DDrPatch_NOOP((char*)0x004032B7, 6); |
| 602 |
|
DDrPatch_MakeCall((char*)0x004032B7, LIiP_SetCursorPosHook); |
| 606 |
|
DDrPatch_MakeJump(ONrPlatform_Initialize, DDrPlatform_Initialize); |
| 607 |
|
DDrPatch_MakeJump(gl_platform_initialize, daodangl_platform_initialize); |
| 608 |
|
} |
| 605 |
– |
//#endif |
| 609 |
|
// Hacked windowed mode (for when daodangl isn't working properly) |
| 610 |
< |
//if (patch_windowhack) |
| 611 |
< |
|
| 609 |
< |
// DDrWindowHack_Install(); |
| 610 |
> |
else if (patch_windowhack) |
| 611 |
> |
DDrWindowHack_Install(); |
| 612 |
|
|
| 613 |
|
if (patch_daodaninit) |
| 614 |
|
DDrPatch_MakeCall(OniExe + 0x000d345a, DDrGame_Init); |