--- Daodan/src/Daodan.c 2009/10/17 11:49:49 466 +++ Daodan/src/Daodan.c 2009/11/03 10:38:47 476 @@ -7,6 +7,7 @@ #include "Daodan_Cheater.h" #include "Daodan_Persistence.h" #include "Daodan_BSL.h" +#include "Daodan_Console.h" #include "Daodan_WindowHack.h" @@ -46,13 +47,18 @@ bool patch_safeprintf = true; bool patch_daodandisplayenum = true; bool patch_usegettickcount = true; bool patch_cheatsenabled = true; -bool patch_usedaodangl = false; -bool patch_windowhack = true; +bool patch_usedaodangl = true; +bool patch_windowhack = false; bool patch_daodaninit = true; bool patch_bsl = true; bool patch_cheater = true; +// bool patch_newweapon = true; + bool opt_usedaodanbsl = true; +bool opt_border = true; +bool opt_shadow = false; +bool opt_topmost = false; bool DDrPatch_Init() { @@ -170,6 +176,23 @@ bool DDrPatch_Init() DDrPatch_Byte (OniExe + 0x00135af0, 0x07); DDrPatch_Byte (OniExe + 0x00135af4, 0x0B); } + + //Test newweap patch +// if (patch_newweapon) { + + //Makes it always say "Recieved weapon_name." + //Needs check for loc_4DFC66 + DDrPatch_NOOP( OniExe + 0x000E4DF8,2); + + //Adds Weapon name and ammo meter to pickup autoprompt + DDrPatch_NOOP( OniExe + 0x000FAC73, 9); + DDrPatch_NOOP( OniExe + 0x000FAC80, 5); + DDrPatch_MakeCall( OniExe + 0xFAC85, DDrWeapon2Message); + + //Moves location of colors + DDrPatch_Int32( OniExe + 0x0002E3D5, (int)&DDrDSayColors[0].Char ); + DDrPatch_Int32( OniExe + 0x0002E3DA, (int)&DDrDSayColors[0].Char ); +// } // Disable loading the vtuneapi.dll if (patch_killvtune) @@ -212,6 +235,14 @@ bool DDrIniCallback(char* section, bool case s_options: if (!stricmp(name, "usedaodanbsl")) opt_usedaodanbsl = !stricmp(inifile_cleanstr(value), "true"); + else if (!stricmp(name, "border")) + opt_border = !stricmp(inifile_cleanstr(value), "true"); + else if (!stricmp(name, "shadow")) + opt_shadow = !stricmp(inifile_cleanstr(value), "true"); + else if (!stricmp(name, "topmost")) + opt_topmost = !stricmp(inifile_cleanstr(value), "true"); + else if (!stricmp(name, "multibyte")) + patch_multibyte = !stricmp(inifile_cleanstr(value), "true"); else if (!stricmp(name, "debug")) AKgDebug_DebugMaps = !stricmp(inifile_cleanstr(value), "true"); else if (!stricmp(name, "debugfiles")) @@ -449,7 +480,7 @@ void __cdecl DDrMain(int argc, char* arg *option = '\0'; falseoption = (option[1] == 'n' || option[1] == 'N') && (option[2] = 'o' || option[2] == 'O'); if (i < (argc - 1) && argv[i + 1][0] != '-') - DDrIniCallback(section, true, option + (falseoption ? 3 : 1), argv[++i]); + DDrIniCallback(section, true, option + 1, argv[++i]); else DDrIniCallback(section, true, option + (falseoption ? 3 : 1), (falseoption ? "false" : "true")); *option = '.'; @@ -459,7 +490,7 @@ void __cdecl DDrMain(int argc, char* arg falseoption = (section[0] == 'n' || section[0] == 'N') && (section[1] = 'o' || section[1] == 'O'); ini_section = s_options; if (i < (argc - 1) && argv[i + 1][0] != '-') - DDrIniCallback(NULL, false, section + (falseoption ? 2 : 0), argv[++i]); + DDrIniCallback(NULL, false, section, argv[++i]); else DDrIniCallback(NULL, false, section + (falseoption ? 2 : 0), (falseoption ? "false" : "true")); }