| 47 |
|
bool patch_windowhack = true; |
| 48 |
|
bool patch_daodaninit = true; |
| 49 |
|
bool patch_bsl = true; |
| 50 |
+ |
bool patch_cheater = true; |
| 51 |
|
|
| 52 |
|
bool opt_usedaodanbsl = true; |
| 53 |
|
|
| 195 |
|
{ |
| 196 |
|
case s_options: |
| 197 |
|
if (!stricmp(name, "usedaodanbsl")) |
| 198 |
< |
opt_usedaodanbsl = !stricmp(value, "true"); |
| 198 |
> |
opt_usedaodanbsl = !stricmp(inifile_cleanstr(value), "true"); |
| 199 |
|
break; |
| 200 |
|
case s_patch: |
| 201 |
|
if (!stricmp(name, "fonttexturecache")) |
| 202 |
< |
patch_fonttexturecache = !stricmp(value, "true"); |
| 202 |
> |
patch_fonttexturecache = !stricmp(inifile_cleanstr(value), "true"); |
| 203 |
|
else if (!stricmp(name, "largetextures")) |
| 204 |
< |
patch_largetextures = !stricmp(value, "true"); |
| 204 |
> |
patch_largetextures = !stricmp(inifile_cleanstr(value), "true"); |
| 205 |
|
else if (!stricmp(name, "levelplugins")) |
| 206 |
< |
patch_levelplugins = !stricmp(value, "true"); |
| 206 |
> |
patch_levelplugins = !stricmp(inifile_cleanstr(value), "true"); |
| 207 |
|
else if (!stricmp(name, "pathfinding")) |
| 208 |
< |
patch_pathfinding = !stricmp(value, "true"); |
| 208 |
> |
patch_pathfinding = !stricmp(inifile_cleanstr(value), "true"); |
| 209 |
|
else if (!stricmp(name, "projaware")) |
| 210 |
< |
patch_projaware = !stricmp(value, "true"); |
| 210 |
> |
patch_projaware = !stricmp(inifile_cleanstr(value), "true"); |
| 211 |
|
else if (!stricmp(name, "directinput")) |
| 212 |
< |
patch_directinput = !stricmp(value, "true"); |
| 212 |
> |
patch_directinput = !stricmp(inifile_cleanstr(value), "true"); |
| 213 |
|
else if (!stricmp(name, "wpfadetime")) |
| 214 |
< |
patch_wpfadetime = !stricmp(value, "true"); |
| 214 |
> |
patch_wpfadetime = !stricmp(inifile_cleanstr(value), "true"); |
| 215 |
|
else if (!stricmp(name, "kickguns")) |
| 216 |
< |
patch_kickguns = !stricmp(value, "true"); |
| 216 |
> |
patch_kickguns = !stricmp(inifile_cleanstr(value), "true"); |
| 217 |
|
else if (!stricmp(name, "cooldowntimer")) |
| 218 |
< |
patch_cooldowntimer = !stricmp(value, "true"); |
| 218 |
> |
patch_cooldowntimer = !stricmp(inifile_cleanstr(value), "true"); |
| 219 |
|
else if (!stricmp(name, "throwtest")) |
| 220 |
< |
patch_throwtest = !stricmp(value, "true"); |
| 220 |
> |
patch_throwtest = !stricmp(inifile_cleanstr(value), "true"); |
| 221 |
|
else if (!stricmp(name, "alttab")) |
| 222 |
< |
patch_alttab = !stricmp(value, "true"); |
| 222 |
> |
patch_alttab = !stricmp(inifile_cleanstr(value), "true"); |
| 223 |
|
else if (!stricmp(name, "particledisablebit")) |
| 224 |
< |
patch_particledisablebit = !stricmp(value, "true"); |
| 224 |
> |
patch_particledisablebit = !stricmp(inifile_cleanstr(value), "true"); |
| 225 |
|
else if (!stricmp(name, "multibyte")) |
| 226 |
< |
patch_multibyte = !stricmp(value, "true"); |
| 226 |
> |
patch_multibyte = !stricmp(inifile_cleanstr(value), "true"); |
| 227 |
|
else if (!stricmp(name, "cheattable")) |
| 228 |
< |
patch_cheattable = !stricmp(value, "true"); |
| 228 |
> |
patch_cheattable = !stricmp(inifile_cleanstr(value), "true"); |
| 229 |
|
else if (!stricmp(name, "argb8888")) |
| 230 |
< |
patch_argb8888 = !stricmp(value, "true"); |
| 230 |
> |
patch_argb8888 = !stricmp(inifile_cleanstr(value), "true"); |
| 231 |
|
else if (!stricmp(name, "safeprintf")) |
| 232 |
< |
patch_safeprintf = !stricmp(value, "true"); |
| 232 |
> |
patch_safeprintf = !stricmp(inifile_cleanstr(value), "true"); |
| 233 |
|
else if (!stricmp(name, "daodandisplayenum")) |
| 234 |
< |
patch_daodandisplayenum = !stricmp(value, "true"); |
| 234 |
> |
patch_daodandisplayenum = !stricmp(inifile_cleanstr(value), "true"); |
| 235 |
|
else if (!stricmp(name, "usegettickcount")) |
| 236 |
< |
patch_usegettickcount = !stricmp(value, "true"); |
| 236 |
> |
patch_usegettickcount = !stricmp(inifile_cleanstr(value), "true"); |
| 237 |
|
else if (!stricmp(name, "cheatsenabled")) |
| 238 |
< |
patch_cheatsenabled = !stricmp(value, "true"); |
| 238 |
> |
patch_cheatsenabled = !stricmp(inifile_cleanstr(value), "true"); |
| 239 |
|
else if (!stricmp(name, "usedaodangl")) |
| 240 |
< |
patch_usedaodangl = !stricmp(value, "true"); |
| 240 |
> |
patch_usedaodangl = !stricmp(inifile_cleanstr(value), "true"); |
| 241 |
|
else if (!stricmp(name, "windowhack")) |
| 242 |
< |
patch_windowhack = !stricmp(value, "true"); |
| 242 |
> |
patch_windowhack = !stricmp(inifile_cleanstr(value), "true"); |
| 243 |
|
else if (!stricmp(name, "daodaninit")) |
| 244 |
< |
patch_daodaninit = !stricmp(value, "true"); |
| 244 |
> |
patch_daodaninit = !stricmp(inifile_cleanstr(value), "true"); |
| 245 |
|
else if (!stricmp(name, "bsl")) |
| 246 |
< |
patch_bsl = !stricmp(value, "true"); |
| 246 |
> |
patch_bsl = !stricmp(inifile_cleanstr(value), "true"); |
| 247 |
> |
else if (!stricmp(name, "cheater")) |
| 248 |
> |
patch_cheater = !stricmp(inifile_cleanstr(value), "true"); |
| 249 |
|
else |
| 250 |
|
DDrStartupMessage("unrecognised patch \"%s\"", name); |
| 251 |
|
break; |
| 249 |
– |
case s_bsl: |
| 250 |
– |
|
| 251 |
– |
break; |
| 252 |
|
case s_language: |
| 253 |
|
if (!stricmp(name, "savepoint")) |
| 254 |
|
{ |
| 308 |
|
{ |
| 309 |
|
char* str = strdup(value); |
| 310 |
|
DDr_CheatTable[11].message_on = str; |
| 311 |
< |
DDr_CheatTable[cheat_devmodex].message_on = str; |
| 311 |
> |
DDr_CheatTable[cheat_x].message_on = str; |
| 312 |
|
} |
| 313 |
|
else if (!stricmp(name, "devmode_off")) |
| 314 |
|
{ |
| 315 |
|
char* str = strdup(value); |
| 316 |
|
DDr_CheatTable[11].message_off = str; |
| 317 |
< |
DDr_CheatTable[cheat_devmodex].message_off = str; |
| 317 |
> |
DDr_CheatTable[cheat_x].message_off = str; |
| 318 |
|
} |
| 319 |
|
else if (!stricmp(name, "reservoirdogs_on")) |
| 320 |
|
DDr_CheatTable[12].message_on = strdup(value); |
| 357 |
|
else |
| 358 |
|
DDrStartupMessage("unrecognised language item \"%s\"", name); |
| 359 |
|
break; |
| 360 |
+ |
case s_bsl: |
| 361 |
|
default: |
| 362 |
|
break; |
| 363 |
|
} |
| 434 |
|
if (patch_bsl) |
| 435 |
|
SLrDaodan_Patch(); |
| 436 |
|
|
| 437 |
+ |
if (patch_cheater) |
| 438 |
+ |
{ |
| 439 |
+ |
DDrPatch_MakeCall(OniExe + 0x000f618f, DDrCheater); |
| 440 |
+ |
DDrPatch_Int16(OniExe + 0x000deb45, 0x5590); |
| 441 |
+ |
DDrPatch_MakeCall(OniExe + 0x000deb47, FallingFrames); |
| 442 |
+ |
DDrPatch_MakeJump(OniExe + 0x0010f021, DDrCheater_LevelLoad); |
| 443 |
+ |
} |
| 444 |
+ |
|
| 445 |
|
init_daodan_gl(); |
| 446 |
|
|
| 447 |
|
ONiMain(argc, argv); |