--- Daodan/src/Daodan.c 2009/07/21 03:33:07 447 +++ Daodan/src/Daodan.c 2009/08/10 09:09:53 452 @@ -47,6 +47,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; @@ -194,61 +195,60 @@ bool DDrIniCallback(char* section, bool { case s_options: if (!stricmp(name, "usedaodanbsl")) - opt_usedaodanbsl = !stricmp(value, "true"); + opt_usedaodanbsl = !stricmp(inifile_cleanstr(value), "true"); break; case s_patch: if (!stricmp(name, "fonttexturecache")) - patch_fonttexturecache = !stricmp(value, "true"); + patch_fonttexturecache = !stricmp(inifile_cleanstr(value), "true"); else if (!stricmp(name, "largetextures")) - patch_largetextures = !stricmp(value, "true"); + patch_largetextures = !stricmp(inifile_cleanstr(value), "true"); else if (!stricmp(name, "levelplugins")) - patch_levelplugins = !stricmp(value, "true"); + patch_levelplugins = !stricmp(inifile_cleanstr(value), "true"); else if (!stricmp(name, "pathfinding")) - patch_pathfinding = !stricmp(value, "true"); + patch_pathfinding = !stricmp(inifile_cleanstr(value), "true"); else if (!stricmp(name, "projaware")) - patch_projaware = !stricmp(value, "true"); + patch_projaware = !stricmp(inifile_cleanstr(value), "true"); else if (!stricmp(name, "directinput")) - patch_directinput = !stricmp(value, "true"); + patch_directinput = !stricmp(inifile_cleanstr(value), "true"); else if (!stricmp(name, "wpfadetime")) - patch_wpfadetime = !stricmp(value, "true"); + patch_wpfadetime = !stricmp(inifile_cleanstr(value), "true"); else if (!stricmp(name, "kickguns")) - patch_kickguns = !stricmp(value, "true"); + patch_kickguns = !stricmp(inifile_cleanstr(value), "true"); else if (!stricmp(name, "cooldowntimer")) - patch_cooldowntimer = !stricmp(value, "true"); + patch_cooldowntimer = !stricmp(inifile_cleanstr(value), "true"); else if (!stricmp(name, "throwtest")) - patch_throwtest = !stricmp(value, "true"); + patch_throwtest = !stricmp(inifile_cleanstr(value), "true"); else if (!stricmp(name, "alttab")) - patch_alttab = !stricmp(value, "true"); + patch_alttab = !stricmp(inifile_cleanstr(value), "true"); else if (!stricmp(name, "particledisablebit")) - patch_particledisablebit = !stricmp(value, "true"); + patch_particledisablebit = !stricmp(inifile_cleanstr(value), "true"); else if (!stricmp(name, "multibyte")) - patch_multibyte = !stricmp(value, "true"); + patch_multibyte = !stricmp(inifile_cleanstr(value), "true"); else if (!stricmp(name, "cheattable")) - patch_cheattable = !stricmp(value, "true"); + patch_cheattable = !stricmp(inifile_cleanstr(value), "true"); else if (!stricmp(name, "argb8888")) - patch_argb8888 = !stricmp(value, "true"); + patch_argb8888 = !stricmp(inifile_cleanstr(value), "true"); else if (!stricmp(name, "safeprintf")) - patch_safeprintf = !stricmp(value, "true"); + patch_safeprintf = !stricmp(inifile_cleanstr(value), "true"); else if (!stricmp(name, "daodandisplayenum")) - patch_daodandisplayenum = !stricmp(value, "true"); + patch_daodandisplayenum = !stricmp(inifile_cleanstr(value), "true"); else if (!stricmp(name, "usegettickcount")) - patch_usegettickcount = !stricmp(value, "true"); + patch_usegettickcount = !stricmp(inifile_cleanstr(value), "true"); else if (!stricmp(name, "cheatsenabled")) - patch_cheatsenabled = !stricmp(value, "true"); + patch_cheatsenabled = !stricmp(inifile_cleanstr(value), "true"); else if (!stricmp(name, "usedaodangl")) - patch_usedaodangl = !stricmp(value, "true"); + patch_usedaodangl = !stricmp(inifile_cleanstr(value), "true"); else if (!stricmp(name, "windowhack")) - patch_windowhack = !stricmp(value, "true"); + patch_windowhack = !stricmp(inifile_cleanstr(value), "true"); else if (!stricmp(name, "daodaninit")) - patch_daodaninit = !stricmp(value, "true"); + patch_daodaninit = !stricmp(inifile_cleanstr(value), "true"); else if (!stricmp(name, "bsl")) - patch_bsl = !stricmp(value, "true"); + 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; - case s_bsl: - - break; case s_language: if (!stricmp(name, "savepoint")) { @@ -308,13 +308,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); @@ -357,6 +357,7 @@ bool DDrIniCallback(char* section, bool else DDrStartupMessage("unrecognised language item \"%s\"", name); break; + case s_bsl: default: break; } @@ -433,6 +434,9 @@ void __cdecl DDrMain(int argc, char* arg if (patch_bsl) SLrDaodan_Patch(); + if (patch_cheater) + DDrPatch_MakeCall(OniExe + 0x000f618f, DDrCheater); + init_daodan_gl(); ONiMain(argc, argv);