18 |
|
// slider in windowed mode. |
19 |
|
static void ONICALL DD_ONiOGU_GammaSlider_SetRange(void* window, int min_value, int max_value) |
20 |
|
{ |
21 |
< |
WMrWindow_SetEnabled(window, M3gResolutionSwitch && opt_gamma); |
21 |
> |
ConfigOption_t* co = DDrConfig_GetOptOfType("options.gamma", C_BOOL); |
22 |
> |
WMrWindow_SetEnabled(window, M3gResolutionSwitch && co->value.intBoolVal); |
23 |
|
WMrSlider_SetRange(window, min_value, max_value); |
24 |
|
} |
25 |
|
|
79 |
|
|
80 |
|
void ONICALL DDrGame_Init() |
81 |
|
{ |
82 |
< |
if (opt_usedaodanbsl) |
82 |
> |
ConfigOption_t* co = DDrConfig_GetOptOfType("options.usedaodanbsl", C_BOOL); |
83 |
> |
if (co->value.intBoolVal) |
84 |
|
SLrDaodan_Initialize(); |
85 |
|
} |
86 |
|
|
288 |
|
HMODULE dll; |
289 |
|
DWORD err; |
290 |
|
|
291 |
< |
DDrStartupMessage("Daodan: Loading chinese DLL"); |
291 |
> |
STARTUPMESSAGE("Loading chinese DLL", 0); |
292 |
|
dll = LoadLibrary("xfhsm_oni.dll"); |
293 |
|
err = GetLastError(); |
294 |
|
if( dll ) |
301 |
|
} else { |
302 |
|
char msg[100]; |
303 |
|
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, 0, msg, 100, NULL); |
304 |
< |
DDrStartupMessage("Daodan: Loading DLL failed with error %i: %s", err, msg); |
304 |
> |
STARTUPMESSAGE("Loading DLL failed with error %i: %s", err, msg); |
305 |
|
} |
306 |
|
} |
307 |
|
} |
607 |
|
|
608 |
|
bool DD_Patch_Init() |
609 |
|
{ |
610 |
< |
DDrStartupMessage("Daodan: Patching engine"); |
610 |
> |
STARTUPMESSAGE("Patching engine", 0); |
611 |
|
|
612 |
< |
if (patch_alttab) |
612 |
> |
if (DDrConfig_GetOptOfType("patches.alttab", C_BOOL)->value.intBoolVal) |
613 |
|
DD_Patch_AltTab(); |
614 |
|
|
615 |
< |
if (patch_argb8888) |
615 |
> |
if (DDrConfig_GetOptOfType("patches.argb8888", C_BOOL)->value.intBoolVal) |
616 |
|
DD_Patch_ARGB8888(); |
617 |
|
|
618 |
< |
if (patch_binkplay) |
618 |
> |
if (DDrConfig_GetOptOfType("patches.binkplay", C_BOOL)->value.intBoolVal) |
619 |
|
DD_Patch_BinkPlay(); |
620 |
|
|
621 |
< |
if (patch_bsl) |
621 |
> |
if (DDrConfig_GetOptOfType("patches.bsl", C_BOOL)->value.intBoolVal) |
622 |
|
DD_Patch_BSL(); |
623 |
|
|
624 |
< |
if (patch_cheater) |
624 |
> |
if (DDrConfig_GetOptOfType("patches.cheater", C_BOOL)->value.intBoolVal) |
625 |
|
DD_Patch_Cheater(); |
626 |
|
|
627 |
< |
if (patch_cheatsenabled) |
627 |
> |
if (DDrConfig_GetOptOfType("patches.cheatsenabled", C_BOOL)->value.intBoolVal) |
628 |
|
DD_Patch_CheatsEnabled(); |
629 |
|
|
630 |
< |
if (patch_cheattable) |
630 |
> |
if (DDrConfig_GetOptOfType("patches.cheattable", C_BOOL)->value.intBoolVal) |
631 |
|
DD_Patch_CheatTable(); |
632 |
|
|
633 |
< |
if (patch_chinese) |
633 |
> |
if (DDrConfig_GetOptOfType("patches.chinese", C_BOOL)->value.intBoolVal) |
634 |
|
DD_Patch_Chinese(); |
635 |
|
|
636 |
< |
if (patch_clipcursor) |
636 |
> |
if (DDrConfig_GetOptOfType("patches.clipcursor", C_BOOL)->value.intBoolVal) |
637 |
|
DD_Patch_ClipCursor(); |
638 |
|
|
639 |
< |
if (patch_cooldowntimer) |
639 |
> |
if (DDrConfig_GetOptOfType("patches.cooldowntimer", C_BOOL)->value.intBoolVal) |
640 |
|
DD_Patch_CooldownTimer(); |
641 |
|
|
642 |
< |
if (patch_daodandisplayenum) |
642 |
> |
if (DDrConfig_GetOptOfType("patches.daodandisplayenum", C_BOOL)->value.intBoolVal) |
643 |
|
DD_Patch_DaodanDisplayEnum(); |
644 |
|
|
645 |
< |
if (patch_directinput) |
645 |
> |
if (DDrConfig_GetOptOfType("patches.directinput", C_BOOL)->value.intBoolVal) |
646 |
|
DD_Patch_DirectInput(); |
647 |
|
|
648 |
< |
if (patch_disablecmdline) |
648 |
> |
if (DDrConfig_GetOptOfType("patches.disablecmdline", C_BOOL)->value.intBoolVal) |
649 |
|
DD_Patch_DisableCmdLine(); |
650 |
|
|
651 |
< |
if (patch_fonttexturecache) |
651 |
> |
if (DDrConfig_GetOptOfType("patches.fonttexturecache", C_BOOL)->value.intBoolVal) |
652 |
|
DD_Patch_FontTextureCache(); |
653 |
|
|
654 |
< |
if (patch_getcmdline) |
654 |
> |
if (DDrConfig_GetOptOfType("patches.getcmdline", C_BOOL)->value.intBoolVal) |
655 |
|
DD_Patch_GetCmdLine(); |
656 |
|
|
657 |
< |
if (patch_hdscreens_lowres) |
657 |
> |
if (DDrConfig_GetOptOfType("patches.hdscreens_lowres", C_BOOL)->value.intBoolVal) |
658 |
|
DD_Patch_HDScreens_LowRes(); |
659 |
|
|
660 |
< |
if (patch_highres_console) |
660 |
> |
if (DDrConfig_GetOptOfType("patches.highres_console", C_BOOL)->value.intBoolVal) |
661 |
|
DD_Patch_HighresConsole(); |
662 |
|
|
663 |
< |
if (patch_kickguns) |
663 |
> |
if (DDrConfig_GetOptOfType("patches.kickguns", C_BOOL)->value.intBoolVal) |
664 |
|
DD_Patch_KickGuns(); |
665 |
|
|
666 |
|
//if (patch_killvtune) |
667 |
|
// DD_Patch_KillVTune(); |
668 |
|
|
669 |
< |
if (patch_largetextures) |
669 |
> |
if (DDrConfig_GetOptOfType("patches.largetextures", C_BOOL)->value.intBoolVal) |
670 |
|
DD_Patch_LargeTextures(); |
671 |
|
|
672 |
< |
if (patch_levelplugins) |
672 |
> |
if (DDrConfig_GetOptOfType("patches.levelplugins", C_BOOL)->value.intBoolVal) |
673 |
|
DD_Patch_LevelPlugins(); |
674 |
|
|
675 |
< |
if (patch_newweapon) |
675 |
> |
if (DDrConfig_GetOptOfType("patches.newweap", C_BOOL)->value.intBoolVal) |
676 |
|
DD_Patch_NewWeap(); |
677 |
|
|
678 |
< |
if (patch_nomultibyte) |
678 |
> |
if (DDrConfig_GetOptOfType("patches.nomultibyte", C_BOOL)->value.intBoolVal) |
679 |
|
DD_Patch_NoMultiByte(); |
680 |
|
|
681 |
< |
if(patch_optionsvisible) |
681 |
> |
if (DDrConfig_GetOptOfType("patches.optionsvisible", C_BOOL)->value.intBoolVal) |
682 |
|
DD_Patch_OptionsVisible(); |
683 |
|
|
684 |
< |
if (patch_particledisablebit) |
684 |
> |
if (DDrConfig_GetOptOfType("patches.particledisablebit", C_BOOL)->value.intBoolVal) |
685 |
|
DD_Patch_ParticleDisableBit(); |
686 |
|
|
687 |
< |
if (patch_pathfinding) |
687 |
> |
if (DDrConfig_GetOptOfType("patches.pathfinding", C_BOOL)->value.intBoolVal) |
688 |
|
DD_Patch_PathFinding(); |
689 |
|
|
690 |
< |
if (patch_projaware) |
690 |
> |
if (DDrConfig_GetOptOfType("patches.projaware", C_BOOL)->value.intBoolVal) |
691 |
|
DD_Patch_ProjAware(); |
692 |
|
|
693 |
< |
if (patch_safeprintf) |
693 |
> |
if (DDrConfig_GetOptOfType("patches.safeprintf", C_BOOL)->value.intBoolVal) |
694 |
|
DD_Patch_SafePrintf(); |
695 |
|
|
696 |
< |
if (patch_showalllasersights) |
696 |
> |
if (DDrConfig_GetOptOfType("patches.showalllasersights", C_BOOL)->value.intBoolVal) |
697 |
|
DD_Patch_ShowAllLasersights(); |
698 |
|
|
699 |
< |
if (patch_showtriggervolumes) |
699 |
> |
if (DDrConfig_GetOptOfType("patches.showtriggervolumes", C_BOOL)->value.intBoolVal) |
700 |
|
DD_Patch_ShowTriggerVolumes(); |
701 |
|
|
702 |
< |
if (patch_throwtest) |
702 |
> |
if (DDrConfig_GetOptOfType("patches.throwtest", C_BOOL)->value.intBoolVal) |
703 |
|
DD_Patch_Throwtest(); |
704 |
|
|
705 |
< |
if (patch_usedaodangl) |
705 |
> |
if (DDrConfig_GetOptOfType("patches.usedaodangl", C_BOOL)->value.intBoolVal) |
706 |
|
DD_Patch_UseDaodanGL(); |
707 |
|
|
708 |
< |
if (patch_usegettickcount) |
708 |
> |
if (DDrConfig_GetOptOfType("patches.usegettickcount", C_BOOL)->value.intBoolVal) |
709 |
|
DD_Patch_UseGetTickCount(); |
710 |
|
|
711 |
< |
if (patch_wpfadetime) |
711 |
> |
if (DDrConfig_GetOptOfType("patches.wpfadetime", C_BOOL)->value.intBoolVal) |
712 |
|
DD_Patch_WpFadetime(); |
713 |
|
|
714 |
|
|