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 347 by rossy, Tue Jun 9 12:42:24 2009 UTC vs.
Revision 348 by rossy, Wed Jun 10 12:04:27 2009 UTC

# Line 23 | Line 23 | HMODULE DDrONiModule;
23   bool patch_fonttexturecache = true;
24   bool patch_largetextures = true;
25   bool patch_pathfinding = true;
26 + bool patch_levelplugins = true;
27   bool patch_projaware = true;
28 + bool patch_directinput = true;
29   bool patch_wpfadetime = true;
30   bool patch_kickguns = false;
31   bool patch_cooldowntimer = true;
# Line 36 | Line 38 | bool patch_cheattable = true;
38   bool patch_safeprintf = true;
39   bool patch_daodandisplayenum = true;
40   bool patch_usegettickcount = true;
41 + bool patch_cheatsenabled = true;
42   bool patch_usedaodangl = false;
43  
44   bool DDrPatch_Init()
# Line 54 | Line 57 | bool DDrPatch_Init()
57                  DDrPatch_Byte  (OniExe + 0x00005251, 0x10);
58          
59          // Non-"_Final" levels are now valid
60 <        DDrPatch_Byte  (OniExe + 0x000206a8, 0x01);
60 >        if (patch_levelplugins)
61 >                DDrPatch_Byte  (OniExe + 0x000206a8, 0x01);
62          
63          // Pathfinding grid cache size x8
64          if (patch_pathfinding)
# Line 73 | Line 77 | bool DDrPatch_Init()
77          }
78          
79          // Forced DirectInput (for Windows NT)
80 <        DDrPatch_Byte  (OniExe + 0x00002e6d, 0xeb);
80 >        if (patch_directinput)
81 >                DDrPatch_Byte  (OniExe + 0x00002e6d, 0xeb);
82          
83          if (patch_wpfadetime)
84          {
# Line 177 | Line 182 | bool DDrIniCallback(char* section, bool
182                                  patch_pathfinding = !stricmp(value, "true");
183                          else if (!stricmp(name, "projaware"))
184                                  patch_projaware = !stricmp(value, "true");
185 +                        else if (!stricmp(name, "levelplugins"))
186 +                                patch_levelplugins = !stricmp(value, "true");
187 +                        else if (!stricmp(name, "directinput"))
188 +                                patch_directinput = !stricmp(value, "true");
189                          else if (!stricmp(name, "wpfadetime"))
190                                  patch_wpfadetime = !stricmp(value, "true");
191                          else if (!stricmp(name, "kickguns"))
# Line 199 | Line 208 | bool DDrIniCallback(char* section, bool
208                                  patch_daodandisplayenum = !stricmp(value, "true");
209                          else if (!stricmp(name, "usegettickcount"))
210                                  patch_usegettickcount = !stricmp(value, "true");
211 +                        else if (!stricmp(name, "cheatsenabled"))
212 +                                patch_cheatsenabled = !stricmp(value, "true");
213                          else if (!stricmp(name, "usedaodangl"))
214                                  patch_usedaodangl = !stricmp(value, "true");
215                          else
# Line 221 | Line 232 | bool DDrIniCallback(char* section, bool
232                                  DDrPatch_StrDup(OniExe + 0x0010fb6e, value);
233                          else if (!stricmp(name, "blam"))
234                                  DDrPatch_StrDup(OniExe + 0x0010fb73, value);
235 +                        else if (!stricmp(name, "shapeshifter_on"))
236 +                                DDr_CheatTable[0].message_on = strdup(value);
237 +                        else if (!stricmp(name, "shapeshifter_off"))
238 +                                DDr_CheatTable[0].message_off = strdup(value);
239 +                        else if (!stricmp(name, "liveforever_on"))
240 +                                DDr_CheatTable[1].message_on = strdup(value);
241 +                        else if (!stricmp(name, "liveforever_off"))
242 +                                DDr_CheatTable[1].message_off = strdup(value);
243 +                        else if (!stricmp(name, "touchofdeath_on"))
244 +                                DDr_CheatTable[2].message_on = strdup(value);
245 +                        else if (!stricmp(name, "touchofdeath_off"))
246 +                                DDr_CheatTable[2].message_off = strdup(value);
247 +                        else if (!stricmp(name, "canttouchthis_on"))
248 +                                DDr_CheatTable[3].message_on = strdup(value);
249 +                        else if (!stricmp(name, "canttouchthis_off"))
250 +                                DDr_CheatTable[3].message_off = strdup(value);
251 +                        else if (!stricmp(name, "fatloot_on"))
252 +                                DDr_CheatTable[4].message_off = strdup(value);
253                          else
254                                  DDrStartupMessage("unrecognised language item \"%s\"", name);
255                          break;
# Line 273 | Line 302 | void __cdecl DDrMain(int argc, char* arg
302          }
303          
304          // Cheats always enabled
305 <        DDrPatch_MakeJump(ONrPersist_GetWonGame, DDrPersist_GetWonGame);
305 >        if (patch_cheatsenabled)
306 >                DDrPatch_MakeJump(ONrPersist_GetWonGame, DDrPersist_GetWonGame);
307          
308          // Windowed mode
309          if (patch_usedaodangl)

Diff Legend

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