Gamma control
This commit is contained in:
@@ -686,7 +686,7 @@ class PatchApplier710 : public PatchApplier {
|
||||
{
|
||||
InjectCode((void*)(0x14011e44e), { 0xf3, 0x0f, 0x10, 0x05, 0x8a, 0xcf, 0x9c, 0x00 }); // hijack xmm0
|
||||
InjectCode((void*)(0x14011e46b), { 0xf3, 0x0f, 0x11, 0x44, 0x24, 0x20 }); // get value from xmm0 instead of xmm1
|
||||
float startPos = (float)nLagCompensation / 1000.0;
|
||||
float startPos = (float)nLagCompensation / 1000.0f;
|
||||
InjectCode((void*)(0x140aeB3e0), { *((uint8_t*)(&startPos)), *((uint8_t*)(&startPos)+1), *((uint8_t*)(&startPos) + 2), *((uint8_t*)(&startPos) + 3) });
|
||||
|
||||
printf("[Patches] Lag Compensation: %f\n", startPos);
|
||||
@@ -765,6 +765,15 @@ class PatchApplier710 : public PatchApplier {
|
||||
InjectCode((void*)(0x140300a88), { 0x90, 0x90, 0x90 }); // NOPs
|
||||
}
|
||||
|
||||
// gamma
|
||||
if (nGamma != 100)
|
||||
{
|
||||
float gamma_float = (float)nGamma / 100.0f;
|
||||
InjectCode((void*)(0x1404a863b), { *((uint8_t*)(&gamma_float)), *((uint8_t*)(&gamma_float) + 1), *((uint8_t*)(&gamma_float) + 2), *((uint8_t*)(&gamma_float) + 3) });
|
||||
|
||||
printf("[Patches] Gamma: %f\n", gamma_float);
|
||||
}
|
||||
|
||||
// modpack redirection
|
||||
/*{
|
||||
wchar_t* mpstr = NULL;
|
||||
|
||||
@@ -107,6 +107,7 @@ auto nForceExpressions = GetPrivateProfileIntW(L"patches", L"force_expressions",
|
||||
auto nForceLook = GetPrivateProfileIntW(L"patches", L"force_look", 0, CONFIG_FILE);
|
||||
auto nNpr1 = GetPrivateProfileIntW(L"graphics", L"npr1", 0, CONFIG_FILE);
|
||||
auto nReflections = GetPrivateProfileIntW(L"graphics", L"reflections", TRUE, CONFIG_FILE);
|
||||
auto nGamma = GetPrivateProfileIntW(L"graphics", L"gamma", 100, CONFIG_FILE);
|
||||
auto nShadows = GetPrivateProfileIntW(L"graphics", L"shadows", TRUE, CONFIG_FILE);
|
||||
auto nPunchthrough = GetPrivateProfileIntW(L"graphics", L"punchthrough", TRUE, CONFIG_FILE);
|
||||
auto nGlare = GetPrivateProfileIntW(L"graphics", L"glare", TRUE, CONFIG_FILE);
|
||||
|
||||
@@ -122,6 +122,12 @@ char config_template[] =
|
||||
"DOF=1\n"
|
||||
"# Reflections\n"
|
||||
"Reflections=1\n"
|
||||
"Reflect_Res_Width = 512\n"
|
||||
"Reflect_Res_Height = 256\n"
|
||||
"Refract_Res_Width = 512\n"
|
||||
"Refract_Res_Height = 256\n"
|
||||
"# Gamma -- 100=default, 125=console-like\n"
|
||||
"Gamma = 100\n"
|
||||
"# Shadows\n"
|
||||
"Shadows=1\n"
|
||||
"# Transparent Meshes\n"
|
||||
|
||||
Reference in New Issue
Block a user