--- Daodan/src/Daodan.c 2009/07/26 12:04:44 451 +++ Daodan/src/Daodan.c 2009/08/24 11:32:06 459 @@ -38,6 +38,7 @@ bool patch_particledisablebit = false; bool patch_multibyte = false; bool patch_cheattable = true; bool patch_argb8888 = true; +bool patch_killvtune = true; bool patch_safeprintf = true; bool patch_daodandisplayenum = true; @@ -47,6 +48,7 @@ bool patch_usedaodangl = false; bool patch_windowhack = true; bool patch_daodaninit = true; bool patch_bsl = true; +bool patch_cheater = true; bool opt_usedaodanbsl = true; @@ -160,12 +162,17 @@ bool DDrPatch_Init() DDrPatch_Int32 (OniExe + 0x000f617a, (int)&DDr_CheatTable[0].message_on); } + // ARGB8888 textures if (patch_argb8888) { DDrPatch_Byte (OniExe + 0x00135af0, 0x07); DDrPatch_Byte (OniExe + 0x00135af4, 0x0B); } + // Disable loading the vtuneapi.dll + if (patch_killvtune) + DDrPatch_Byte (OniExe + 0x00026340, 0xC3); + return true; } @@ -227,6 +234,8 @@ bool DDrIniCallback(char* section, bool patch_cheattable = !stricmp(inifile_cleanstr(value), "true"); else if (!stricmp(name, "argb8888")) patch_argb8888 = !stricmp(inifile_cleanstr(value), "true"); + else if (!stricmp(name, "killvtune")) + patch_killvtune = !stricmp(inifile_cleanstr(value), "true"); else if (!stricmp(name, "safeprintf")) patch_safeprintf = !stricmp(inifile_cleanstr(value), "true"); else if (!stricmp(name, "daodandisplayenum")) @@ -243,6 +252,8 @@ bool DDrIniCallback(char* section, bool patch_daodaninit = !stricmp(inifile_cleanstr(value), "true"); else if (!stricmp(name, "bsl")) patch_bsl = !stricmp(inifile_cleanstr(value), "true"); + else if (!stricmp(name, "cheater")) + patch_cheater = !stricmp(inifile_cleanstr(value), "true"); else DDrStartupMessage("unrecognised patch \"%s\"", name); break; @@ -305,13 +316,13 @@ bool DDrIniCallback(char* section, bool { char* str = strdup(value); DDr_CheatTable[11].message_on = str; - DDr_CheatTable[cheat_devmodex].message_on = str; + DDr_CheatTable[cheat_x].message_on = str; } else if (!stricmp(name, "devmode_off")) { char* str = strdup(value); DDr_CheatTable[11].message_off = str; - DDr_CheatTable[cheat_devmodex].message_off = str; + DDr_CheatTable[cheat_x].message_off = str; } else if (!stricmp(name, "reservoirdogs_on")) DDr_CheatTable[12].message_on = strdup(value); @@ -431,6 +442,14 @@ void __cdecl DDrMain(int argc, char* arg if (patch_bsl) SLrDaodan_Patch(); + if (patch_cheater) + { + DDrPatch_MakeCall(OniExe + 0x000f618f, DDrCheater); + DDrPatch_Int16(OniExe + 0x000deb45, 0x5590); + DDrPatch_MakeCall(OniExe + 0x000deb47, FallingFrames); + DDrPatch_MakeJump(OniExe + 0x0010f021, DDrCheater_LevelLoad); + } + init_daodan_gl(); ONiMain(argc, argv);