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; |
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() |
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) |
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 |
|
{ |
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")) |
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 |
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; |
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) |