ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/Daodan/src/Daodan.c
(Generate patch)

Comparing Daodan/src/Daodan.c (file contents):
Revision 466 by rossy, Sat Oct 17 11:49:49 2009 UTC vs.
Revision 476 by gumby, Tue Nov 3 10:38:47 2009 UTC

# Line 7 | Line 7
7   #include "Daodan_Cheater.h"
8   #include "Daodan_Persistence.h"
9   #include "Daodan_BSL.h"
10 + #include "Daodan_Console.h"
11  
12   #include "Daodan_WindowHack.h"
13  
# Line 46 | Line 47 | bool patch_safeprintf = true;
47   bool patch_daodandisplayenum = true;
48   bool patch_usegettickcount = true;
49   bool patch_cheatsenabled = true;
50 < bool patch_usedaodangl = false;
51 < bool patch_windowhack = true;
50 > bool patch_usedaodangl = true;
51 > bool patch_windowhack = false;
52   bool patch_daodaninit = true;
53   bool patch_bsl = true;
54   bool patch_cheater = true;
55  
56 + // bool patch_newweapon = true;
57 +
58   bool opt_usedaodanbsl = true;
59 + bool opt_border = true;
60 + bool opt_shadow = false;
61 + bool opt_topmost = false;
62  
63   bool DDrPatch_Init()
64   {
# Line 170 | Line 176 | bool DDrPatch_Init()
176                  DDrPatch_Byte  (OniExe + 0x00135af0, 0x07);
177                  DDrPatch_Byte  (OniExe + 0x00135af4, 0x0B);
178          }
179 +
180 +        //Test newweap patch
181 + //      if (patch_newweapon) {
182 +                
183 +                //Makes it always say "Recieved weapon_name."
184 +                //Needs check for loc_4DFC66
185 +                DDrPatch_NOOP( OniExe + 0x000E4DF8,2);
186 +
187 +                //Adds Weapon name and ammo meter to pickup autoprompt
188 +                DDrPatch_NOOP( OniExe + 0x000FAC73, 9);
189 +                DDrPatch_NOOP( OniExe + 0x000FAC80, 5);
190 +                DDrPatch_MakeCall( OniExe + 0xFAC85, DDrWeapon2Message);
191 +                
192 +                //Moves location of colors
193 +                DDrPatch_Int32( OniExe + 0x0002E3D5, (int)&DDrDSayColors[0].Char );
194 +                DDrPatch_Int32( OniExe + 0x0002E3DA, (int)&DDrDSayColors[0].Char );
195 + //      }
196          
197          // Disable loading the vtuneapi.dll
198          if (patch_killvtune)
# Line 212 | Line 235 | bool DDrIniCallback(char* section, bool
235                  case s_options:
236                          if (!stricmp(name, "usedaodanbsl"))
237                                  opt_usedaodanbsl = !stricmp(inifile_cleanstr(value), "true");
238 +                        else if (!stricmp(name, "border"))
239 +                                opt_border = !stricmp(inifile_cleanstr(value), "true");
240 +                        else if (!stricmp(name, "shadow"))
241 +                                opt_shadow = !stricmp(inifile_cleanstr(value), "true");
242 +                        else if (!stricmp(name, "topmost"))
243 +                                opt_topmost = !stricmp(inifile_cleanstr(value), "true");
244 +                        else if (!stricmp(name, "multibyte"))
245 +                                patch_multibyte = !stricmp(inifile_cleanstr(value), "true");
246                          else if (!stricmp(name, "debug"))
247                                  AKgDebug_DebugMaps = !stricmp(inifile_cleanstr(value), "true");
248                          else if (!stricmp(name, "debugfiles"))
# Line 449 | Line 480 | void __cdecl DDrMain(int argc, char* arg
480                                  *option = '\0';
481                                  falseoption = (option[1] == 'n' || option[1] == 'N') && (option[2] = 'o' || option[2] == 'O');
482                                  if (i < (argc - 1) && argv[i + 1][0] != '-')
483 <                                        DDrIniCallback(section, true, option + (falseoption ? 3 : 1), argv[++i]);
483 >                                        DDrIniCallback(section, true, option + 1, argv[++i]);
484                                  else
485                                          DDrIniCallback(section, true, option + (falseoption ? 3 : 1), (falseoption ? "false" : "true"));
486                                  *option = '.';
# Line 459 | Line 490 | void __cdecl DDrMain(int argc, char* arg
490                                  falseoption = (section[0] == 'n' || section[0] == 'N') && (section[1] = 'o' || section[1] == 'O');
491                                  ini_section = s_options;
492                                  if (i < (argc - 1) && argv[i + 1][0] != '-')
493 <                                        DDrIniCallback(NULL, false, section + (falseoption ? 2 : 0), argv[++i]);
493 >                                        DDrIniCallback(NULL, false, section, argv[++i]);
494                                  else
495                                          DDrIniCallback(NULL, false, section + (falseoption ? 2 : 0), (falseoption ? "false" : "true"));
496                          }

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)