Changeset 1000 for Daodan/src/Patches
- Timestamp:
- May 4, 2014, 8:17:11 PM (11 years ago)
- Location:
- Daodan/src/Patches
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
Daodan/src/Patches/Cheater.c
r995 r1000 253 253 case cheat_elderrune: 254 254 { 255 if (DDrConfig_GetOptOfType(" patches.d_regen", C_BOOL)->value.intBoolVal)255 if (DDrConfig_GetOptOfType("modding.d_regen", C_BOOL)->value.intBoolVal) 256 256 { 257 257 int* Regeneration = &ONgGameState->PlayerCharacter->RegenHax; -
Daodan/src/Patches/GL.c
r994 r1000 254 254 else 255 255 { 256 ConfigOption_t* co = DDrConfig_GetOptOfType(" options.border", C_BOOL);256 ConfigOption_t* co = DDrConfig_GetOptOfType("windows.border", C_BOOL); 257 257 if (co && co->value.intBoolVal) 258 258 { … … 318 318 static void ONICALL DD_GLiGamma_Restore(void) 319 319 { 320 ConfigOption_t* co = DDrConfig_GetOptOfType(" options.gamma", C_BOOL);320 ConfigOption_t* co = DDrConfig_GetOptOfType("graphics.gamma", C_BOOL); 321 321 if (co->value.intBoolVal) 322 322 { … … 330 330 static void ONICALL DD_GLiGamma_Initialize(void) 331 331 { 332 ConfigOption_t* co = DDrConfig_GetOptOfType(" options.gamma", C_BOOL);332 ConfigOption_t* co = DDrConfig_GetOptOfType("graphics.gamma", C_BOOL); 333 333 if (co->value.intBoolVal) 334 334 { … … 402 402 } 403 403 404 ConfigOption_t* co = DDrConfig_GetOptOfType(" options.gamma", C_BOOL);404 ConfigOption_t* co = DDrConfig_GetOptOfType("graphics.gamma", C_BOOL); 405 405 if (!M3gResolutionSwitch && co->value.intBoolVal) 406 406 { -
Daodan/src/Patches/Localization.c
r994 r1000 127 127 void DD_Localization() 128 128 { 129 char* lang = DDrConfig_GetOptOfType(" options.language", C_STRING)->value.stringVal;129 char* lang = DDrConfig_GetOptOfType("language.language", C_STRING)->value.stringVal; 130 130 char filename[50] = "daodan_locales/"; 131 131 strcpy(filename + strlen(filename), lang); -
Daodan/src/Patches/Patches.c
r995 r1000 18 18 static void ONICALL DD_ONiOGU_GammaSlider_SetRange(void* window, int min_value, int max_value) 19 19 { 20 ConfigOption_t* co = DDrConfig_GetOptOfType(" options.gamma", C_BOOL);20 ConfigOption_t* co = DDrConfig_GetOptOfType("graphics.gamma", C_BOOL); 21 21 WMrWindow_SetEnabled(window, M3gResolutionSwitch && co->value.intBoolVal); 22 22 WMrSlider_SetRange(window, min_value, max_value); … … 85 85 void ONICALL DDrGame_Init() 86 86 { 87 if (DDrConfig_GetOptOfType(" patches.usedaodanbsl", C_BOOL)->value.intBoolVal)87 if (DDrConfig_GetOptOfType("modding.daodanbsl", C_BOOL)->value.intBoolVal) 88 88 SLrDaodan_Initialize(); 89 89 } … … 292 292 // Windows key but has the possible side effect of allowing the screensaver 293 293 // to enable itself in-game. 294 if (DDrConfig_GetOptOfType(" patches.alttab", C_BOOL)->value.intBoolVal)294 if (DDrConfig_GetOptOfType("windows.alttab", C_BOOL)->value.intBoolVal) 295 295 { 296 296 // 0xC3 = ret, so makes those functions just have a "ret" instruction at their start … … 300 300 301 301 // Textures using ARGB8888 can be used 302 if (DDrConfig_GetOptOfType(" patches.argb8888", C_BOOL)->value.intBoolVal)302 if (DDrConfig_GetOptOfType("modding.argb8888", C_BOOL)->value.intBoolVal) 303 303 { 304 304 // Update conversion lookups in IMgConvertPixelType_List … … 311 311 // outro (ie., BKrMovie_Play() instead of ONrMovie_Play_Hardware() as the 312 312 // latter has problems on WINE). 313 if (DDrConfig_GetOptOfType(" patches.binkplay", C_BOOL)->value.intBoolVal)313 if (DDrConfig_GetOptOfType("graphics.binkplay", C_BOOL)->value.intBoolVal) 314 314 { 315 315 // push BINKBUFFERAUTO -> push BINKBUFFERDIBSECTION. … … 319 319 } 320 320 321 if (DDrConfig_GetOptOfType(" patches.d_regen", C_BOOL)->value.intBoolVal)321 if (DDrConfig_GetOptOfType("modding.d_regen", C_BOOL)->value.intBoolVal) 322 322 DD_Patch_Regeneration(); 323 323 324 324 // Cheats always enabled 325 if (DDrConfig_GetOptOfType(" patches.cheatsenabled", C_BOOL)->value.intBoolVal)325 if (DDrConfig_GetOptOfType("gameplay.cheatsenabled", C_BOOL)->value.intBoolVal) 326 326 { 327 327 DDrPatch_MakeJump((void*)ONrPersist_GetWonGame, (void*)DDrPersist_GetWonGame); … … 329 329 330 330 // Use Daodan's own cheattable 331 if (DDrConfig_GetOptOfType(" patches.cheattable", C_BOOL)->value.intBoolVal)331 if (DDrConfig_GetOptOfType("gameplay.cheattable", C_BOOL)->value.intBoolVal) 332 332 { 333 333 // In ONrGameState_HandleCheats: Replace pointers to orig cheattable … … 349 349 } 350 350 351 if (DDrConfig_GetOptOfType(" patches.chinese", C_BOOL)->value.intBoolVal)351 if (DDrConfig_GetOptOfType("language.chinese", C_BOOL)->value.intBoolVal) 352 352 DD_Patch_Chinese(); 353 353 354 354 // Limit cursor to Oni's window 355 if (DDrConfig_GetOptOfType(" patches.clipcursor", C_BOOL)->value.intBoolVal)355 if (DDrConfig_GetOptOfType("windows.clipcursor", C_BOOL)->value.intBoolVal) 356 356 { 357 357 // LIrMode_Set: replace LIrPlatform_Mode_Set call with our hook. … … 366 366 367 367 // Disables weapon cooldown exploit 368 if (DDrConfig_GetOptOfType(" patches.cooldowntimer", C_BOOL)->value.intBoolVal)368 if (DDrConfig_GetOptOfType("gameplay.cooldowntimer", C_BOOL)->value.intBoolVal) 369 369 { 370 370 // In WPrRelease: NoOp 4 MOVs … … 373 373 374 374 // Daodan device mode enumeration function 375 if (DDrConfig_GetOptOfType(" patches.daodandisplayenum", C_BOOL)->value.intBoolVal)375 if (DDrConfig_GetOptOfType("graphics.displayenum", C_BOOL)->value.intBoolVal) 376 376 { 377 377 DDrPatch_MakeJump((void*)gl_enumerate_valid_display_modes, (void*)DD_GLrEnumerateDisplayModes); … … 379 379 380 380 // Forced DirectInput (for Windows NT) 381 if (DDrConfig_GetOptOfType(" patches.directinput", C_BOOL)->value.intBoolVal)381 if (DDrConfig_GetOptOfType("windows.directinput", C_BOOL)->value.intBoolVal) 382 382 { 383 383 // LIrPlatform_Initialize: replace conditional jump by unconditional … … 386 386 387 387 // Disable Oni's command line parser so it doesn't interfere with ours 388 if (DDrConfig_GetOptOfType(" patches.disablecmdline", C_BOOL)->value.intBoolVal)388 if (DDrConfig_GetOptOfType("windows.disablecmdline", C_BOOL)->value.intBoolVal) 389 389 { 390 390 // Replace start of OniParseCommandLine with XOR eax,eax; RET … … 395 395 396 396 // Font texture cache doubled 397 if (DDrConfig_GetOptOfType(" patches.fonttexturecache", C_BOOL)->value.intBoolVal)397 if (DDrConfig_GetOptOfType("language.fonttexturecache", C_BOOL)->value.intBoolVal) 398 398 { 399 399 // Double two values in TMrGame_Initialize … … 403 403 404 404 // Allow HD screens on resolutions < 1024*768 405 if (DDrConfig_GetOptOfType(" patches.hdscreens_lowres", C_BOOL)->value.intBoolVal)405 if (DDrConfig_GetOptOfType("modding.hdscreens_lowres", C_BOOL)->value.intBoolVal) 406 406 { 407 407 DDrPatch_MakeJump((void*)M3rDraw_BigBitmap, (void*)DD_M3rDraw_BigBitmap); … … 409 409 410 410 // Allow for console to show on higher resolutions 411 if (DDrConfig_GetOptOfType(" patches.highres_console", C_BOOL)->value.intBoolVal)411 if (DDrConfig_GetOptOfType("devmode.highres_console", C_BOOL)->value.intBoolVal) 412 412 { 413 413 Oni_COrTextArea_Resize = DDrPatch_MakeDetour((void*)COrTextArea_Resize, (void*)DD_COrTextArea_Resize); … … 416 416 // Hackish fix for Konoko not kicking guns 417 417 // Don't use this, it breaks stairs. 418 if (DDrConfig_GetOptOfType(" patches.kickguns", C_BOOL)->value.intBoolVal)418 if (DDrConfig_GetOptOfType("gameplay.kickguns", C_BOOL)->value.intBoolVal) 419 419 { 420 420 // In ONrCharacter_EnablePhysics: Load different values to same addresses as before … … 424 424 425 425 // Disable loading the vtuneapi.dll 426 if (DDrConfig_GetOptOfType(" patches.killvtune", C_BOOL)->value.intBoolVal)426 if (DDrConfig_GetOptOfType("windows.killvtune", C_BOOL)->value.intBoolVal) 427 427 { 428 428 // Instantly return from UUrLoadVtuneAPI … … 431 431 432 432 // Now supports textures up to 512x512 433 if (DDrConfig_GetOptOfType(" patches.largetextures", C_BOOL)->value.intBoolVal)433 if (DDrConfig_GetOptOfType("modding.largetextures", C_BOOL)->value.intBoolVal) 434 434 { 435 435 DDrPatch_Byte((char*)(OniExe + 0x00005251), 0x10); … … 437 437 438 438 // Non-"_Final" levels are now valid 439 if (DDrConfig_GetOptOfType(" patches.levelplugins", C_BOOL)->value.intBoolVal)439 if (DDrConfig_GetOptOfType("modding.levelplugins", C_BOOL)->value.intBoolVal) 440 440 { 441 441 // Patch in TMrUtility_LevelInfo_Get: … … 444 444 445 445 // Weapon on ground shown with name and magazine contents 446 if (DDrConfig_GetOptOfType(" patches.newweap", C_BOOL)->value.intBoolVal)446 if (DDrConfig_GetOptOfType("graphics.newweap", C_BOOL)->value.intBoolVal) 447 447 { 448 448 //Makes it always say "Received weapon_name." … … 464 464 465 465 // Disable Multi-byte character awareness patch (multiple language support) 466 if (DDrConfig_GetOptOfType(" patches.nomultibyte", C_BOOL)->value.intBoolVal)466 if (DDrConfig_GetOptOfType("language.nomultibyte", C_BOOL)->value.intBoolVal) 467 467 { 468 468 // TSiContext_DrawLine: Replace conditional jumps by unconditional ones … … 489 489 490 490 // Fix options not visible in main menu when a game was started 491 if (DDrConfig_GetOptOfType(" patches.optionsvisible", C_BOOL)->value.intBoolVal)491 if (DDrConfig_GetOptOfType("graphics.optionsvisible", C_BOOL)->value.intBoolVal) 492 492 { 493 493 // replace WMrWindow_SetVisible calls … … 497 497 498 498 // Pathfinding grid cache size x8 499 if (DDrConfig_GetOptOfType(" patches.pathfinding", C_BOOL)->value.intBoolVal)499 if (DDrConfig_GetOptOfType("gameplay.pathfinding", C_BOOL)->value.intBoolVal) 500 500 { 501 501 // Replaces conditional jump (je) with unconditional jump … … 509 509 510 510 // Projectile awareness fixed 511 if (DDrConfig_GetOptOfType(" patches.projaware", C_BOOL)->value.intBoolVal)511 if (DDrConfig_GetOptOfType("gameplay.projaware", C_BOOL)->value.intBoolVal) 512 512 { 513 513 DDrPatch_Byte ((char*)(OniExe + 0x0009c07c), 0x6c); … … 518 518 519 519 // Safe startup message printer 520 if (DDrConfig_GetOptOfType(" patches.safeprintf", C_BOOL)->value.intBoolVal)520 if (DDrConfig_GetOptOfType("windows.safeprintf", C_BOOL)->value.intBoolVal) 521 521 { 522 522 DDrPatch_MakeJump((void*)UUrStartupMessage, (void*)DDrStartupMessage); … … 524 524 525 525 // Show all (also enemies') lasersights 526 if (DDrConfig_GetOptOfType(" patches.showalllasersights", C_BOOL)->value.intBoolVal)526 if (DDrConfig_GetOptOfType("graphics.showalllasersights", C_BOOL)->value.intBoolVal) 527 527 { 528 528 DDrPatch_NOOP((char*)(OniExe + 0x000E1957), 6 ); … … 530 530 531 531 // Allow bsl-var show_triggervolumes or ctrl+shift+x (devmode) to work 532 if (DDrConfig_GetOptOfType(" patches.showtriggervolumes", C_BOOL)->value.intBoolVal)532 if (DDrConfig_GetOptOfType("devmode.showtriggervolumes", C_BOOL)->value.intBoolVal) 533 533 { 534 534 Oni_ONrMechanics_Register = DDrPatch_MakeDetour((void*)ONrMechanics_Register, (void*)DD_ONrMechanics_Register); … … 537 537 538 538 // Experiment with allowing enemies to be thrown over railings 539 if (DDrConfig_GetOptOfType(" patches.throwtest", C_BOOL)->value.intBoolVal)539 if (DDrConfig_GetOptOfType("gameplay.throwtest", C_BOOL)->value.intBoolVal) 540 540 { 541 541 DDrPatch_NOOP((char*)(OniExe + 0x000dc190), 10); … … 543 543 544 544 // DaodanGL with windowed mode support 545 if (DDrConfig_GetOptOfType(" patches.usedaodangl", C_BOOL)->value.intBoolVal)545 if (DDrConfig_GetOptOfType("graphics.daodangl", C_BOOL)->value.intBoolVal) 546 546 { 547 547 // LIrPlatform_Mode_Set: GetWindowRect -> GetClientRect. … … 580 580 581 581 // Performance patch 582 if (DDrConfig_GetOptOfType(" patches.usegettickcount", C_BOOL)->value.intBoolVal)582 if (DDrConfig_GetOptOfType("windows.usegettickcount", C_BOOL)->value.intBoolVal) 583 583 { 584 584 DDrPatch_MakeJump((void*)UUrMachineTime_High, (void*)DDrMachineTime_High); … … 588 588 589 589 // Fix displaying the talking portraits in widescreen modes 590 if (DDrConfig_GetOptOfType(" patches.widescreenportraits", C_BOOL)->value.intBoolVal)590 if (DDrConfig_GetOptOfType("graphics.widescreenportraits", C_BOOL)->value.intBoolVal) 591 591 { 592 592 SLrDaodan_Patch(); … … 594 594 595 595 // Adds working function for existing BSL command wp_fadetime, sets fade time to 4800 596 if (DDrConfig_GetOptOfType(" patches.wpfadetime", C_BOOL)->value.intBoolVal)596 if (DDrConfig_GetOptOfType("gameplay.wpfadetime", C_BOOL)->value.intBoolVal) 597 597 { 598 598 // Makes wp_fadetime actually have a function (changes within WPrRelease) -
Daodan/src/Patches/Win32.c
r994 r1000 153 153 else 154 154 { 155 ConfigOption_t* co = DDrConfig_GetOptOfType(" options.border", C_BOOL);155 ConfigOption_t* co = DDrConfig_GetOptOfType("windows.border", C_BOOL); 156 156 int opt_border = 0; 157 157 if (co && co->value.intBoolVal) 158 158 opt_border = 1; 159 co = DDrConfig_GetOptOfType(" options.topmost", C_BOOL);159 co = DDrConfig_GetOptOfType("windows.topmost", C_BOOL); 160 160 int opt_topmost = 0; 161 161 if (co && co->value.intBoolVal)
Note:
See TracChangeset
for help on using the changeset viewer.