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 451 by rossy, Sun Jul 26 12:04:44 2009 UTC vs.
Revision 459 by rossy, Mon Aug 24 11:32:06 2009 UTC

# Line 38 | Line 38 | bool patch_particledisablebit = false;
38   bool patch_multibyte = false;
39   bool patch_cheattable = true;
40   bool patch_argb8888 = true;
41 + bool patch_killvtune = true;
42  
43   bool patch_safeprintf = true;
44   bool patch_daodandisplayenum = true;
# Line 47 | Line 48 | bool patch_usedaodangl = false;
48   bool patch_windowhack = true;
49   bool patch_daodaninit = true;
50   bool patch_bsl = true;
51 + bool patch_cheater = true;
52  
53   bool opt_usedaodanbsl = true;
54  
# Line 160 | Line 162 | bool DDrPatch_Init()
162                  DDrPatch_Int32 (OniExe + 0x000f617a, (int)&DDr_CheatTable[0].message_on);
163          }
164          
165 +        // ARGB8888 textures
166          if (patch_argb8888)
167          {
168                  DDrPatch_Byte  (OniExe + 0x00135af0, 0x07);
169                  DDrPatch_Byte  (OniExe + 0x00135af4, 0x0B);
170          }
171          
172 +        // Disable loading the vtuneapi.dll
173 +        if (patch_killvtune)
174 +                DDrPatch_Byte  (OniExe + 0x00026340, 0xC3);
175 +        
176          return true;
177   }
178  
# Line 227 | Line 234 | bool DDrIniCallback(char* section, bool
234                                  patch_cheattable = !stricmp(inifile_cleanstr(value), "true");
235                          else if (!stricmp(name, "argb8888"))
236                                  patch_argb8888 = !stricmp(inifile_cleanstr(value), "true");
237 +                        else if (!stricmp(name, "killvtune"))
238 +                                patch_killvtune = !stricmp(inifile_cleanstr(value), "true");
239                          else if (!stricmp(name, "safeprintf"))
240                                  patch_safeprintf = !stricmp(inifile_cleanstr(value), "true");
241                          else if (!stricmp(name, "daodandisplayenum"))
# Line 243 | Line 252 | bool DDrIniCallback(char* section, bool
252                                  patch_daodaninit = !stricmp(inifile_cleanstr(value), "true");
253                          else if (!stricmp(name, "bsl"))
254                                  patch_bsl = !stricmp(inifile_cleanstr(value), "true");
255 +                        else if (!stricmp(name, "cheater"))
256 +                                patch_cheater = !stricmp(inifile_cleanstr(value), "true");
257                          else
258                                  DDrStartupMessage("unrecognised patch \"%s\"", name);
259                          break;
# Line 305 | Line 316 | bool DDrIniCallback(char* section, bool
316                          {
317                                  char* str = strdup(value);
318                                  DDr_CheatTable[11].message_on = str;
319 <                                DDr_CheatTable[cheat_devmodex].message_on = str;
319 >                                DDr_CheatTable[cheat_x].message_on = str;
320                          }
321                          else if (!stricmp(name, "devmode_off"))
322                          {
323                                  char* str = strdup(value);
324                                  DDr_CheatTable[11].message_off = str;
325 <                                DDr_CheatTable[cheat_devmodex].message_off = str;
325 >                                DDr_CheatTable[cheat_x].message_off = str;
326                          }
327                          else if (!stricmp(name, "reservoirdogs_on"))
328                                  DDr_CheatTable[12].message_on = strdup(value);
# Line 431 | Line 442 | void __cdecl DDrMain(int argc, char* arg
442          if (patch_bsl)
443                  SLrDaodan_Patch();
444          
445 +        if (patch_cheater)
446 +        {
447 +                DDrPatch_MakeCall(OniExe + 0x000f618f, DDrCheater);
448 +                DDrPatch_Int16(OniExe + 0x000deb45, 0x5590);
449 +                DDrPatch_MakeCall(OniExe + 0x000deb47, FallingFrames);
450 +                DDrPatch_MakeJump(OniExe + 0x0010f021, DDrCheater_LevelLoad);
451 +        }
452 +        
453          init_daodan_gl();
454          
455          ONiMain(argc, argv);

Diff Legend

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