Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions resource/NewVegasReloaded.dll.defaults.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ RenderPreTonemapping = true # Toggle rendering of some effects in HDR before the
ReplaceIntro = false # Controls rendering of the main menu custom video.
ScreenshotKey = 87 # Keycode for custom screenshot hotkey (removes HUD and saves as jpg).
HDRScreenshot = false # Save screenshots in fbx (use with DXVK HDR)
DisableShadowManagement = false

[_Main.Main.Precipitations]
RemovePrecipitations = false # Disables vanilla rain and other precipitations.
Expand Down
11 changes: 7 additions & 4 deletions src/NewVegas/Hooks/Hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,13 @@ void AttachHooks() {
SafeWriteJump(Jumpers::RenderInterface::Hook, (UInt32)RenderInterfaceHook);
SafeWriteJump(Jumpers::SetRegionEditorName::Hook, (UInt32)SetRegionEditorNameHook);
SafeWriteJump(Jumpers::SetWeatherEditorName::Hook, (UInt32)SetWeatherEditorNameHook);
SafeWriteJump(Jumpers::Shadows::RenderShadowMapHook, (UInt32)RenderShadowMapHook);
// SafeWriteJump(Jumpers::Shadows::RenderShadowMap1Hook, (UInt32)RenderShadowMap1Hook);
SafeWriteJump(Jumpers::Shadows::AddCastShadowFlagHook, (UInt32)AddCastShadowFlagHook);
SafeWriteJump(Jumpers::Shadows::LeavesNodeNameHook, (UInt32)LeavesNodeNameHook);
if (!(SettingsMain->Main.DisableShadowManagement) ) {
SafeWriteJump(Jumpers::Shadows::RenderShadowMapHook, (UInt32)RenderShadowMapHook);
// SafeWriteJump(Jumpers::Shadows::RenderShadowMap1Hook, (UInt32)RenderShadowMap1Hook);
SafeWriteJump(Jumpers::Shadows::AddCastShadowFlagHook, (UInt32)AddCastShadowFlagHook);
SafeWriteJump(Jumpers::Shadows::LeavesNodeNameHook, (UInt32)LeavesNodeNameHook);
}

SafeWriteCall(Jumpers::MainMenuMusic::Fix1, (UInt32)MainMenuMusicFix);
SafeWriteCall(Jumpers::MainMenuMusic::Fix2, (UInt32)MainMenuMusicFix);

Expand Down
2 changes: 1 addition & 1 deletion src/NewVegas/Hooks/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ bool __fastcall ReadSettingHook(INISettingCollection* This, UInt32 edx, GameSett
Setting->pValue = (char*)MainMenuMovie;
else if ((!strcmp(Setting->Name, "SMainMenuMusic:General") || !strcmp(Setting->Name, "STitleMusic:Loading")) && TheSettingManager->SettingsMain.Main.ReplaceIntro)
Setting->pValue = (char*)MainMenuMusic;
else if (!strcmp(Setting->Name, "bDoCanopyShadowPass:Display") || !strcmp(Setting->Name, "bDoActorShadows:Display") || !strcmp(Setting->Name, "iActorShadowCountExt:Display") || !strcmp(Setting->Name, "iActorShadowCountInt:Display"))
else if ( (!strcmp(Setting->Name, "bDoCanopyShadowPass:Display") || !strcmp(Setting->Name, "bDoActorShadows:Display") || !strcmp(Setting->Name, "iActorShadowCountExt:Display") || !strcmp(Setting->Name, "iActorShadowCountInt:Display") ) && !(TheSettingManager->SettingsMain.Main.DisableShadowManagement))
Setting->iValue = 0;
else if (!strcmp(Setting->Name, "iMultiSample:Display") && Setting->iValue < 2 && TheSettingManager->SettingsMain.Main.ForceMSAA)
Setting->iValue = 2;
Expand Down
6 changes: 4 additions & 2 deletions src/Oblivion/Hooks/Hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,10 @@ void AttachHooks() {
SafeWriteJump(Jumpers::HitEvent::Hook, (UInt32)HitEventHook);
SafeWriteJump(Jumpers::NewAnimSequenceSingle::Hook, (UInt32)NewAnimSequenceSingleHook);
SafeWriteJump(Jumpers::RemoveSequence::Hook, (UInt32)RemoveSequenceHook);
SafeWriteJump(Jumpers::Shadows::RenderShadowMapHook, (UInt32)RenderShadowMapHook);
SafeWriteJump(Jumpers::Shadows::AddCastShadowFlagHook, (UInt32)AddCastShadowFlagHook);
if (!SettingsMain->Main.DisableShadowManagement) {
SafeWriteJump(Jumpers::Shadows::RenderShadowMapHook, (UInt32)RenderShadowMapHook);
SafeWriteJump(Jumpers::Shadows::AddCastShadowFlagHook, (UInt32)AddCastShadowFlagHook);
}
// SafeWriteJump(Jumpers::WaterHeightMap::Hook, (UInt32)WaterHeightMapHook);
SafeWriteJump(Jumpers::EndProcess::Hook, (UInt32)EndProcessHook);

Expand Down
1 change: 1 addition & 0 deletions src/core/SettingManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ void SettingManager::LoadSettings() {
SettingsMain.Main.ForceReflections = GetSettingI("Main.Main.Water", "ForceReflections");
SettingsMain.Main.MemoryHeapManagement = GetSettingI("Main.Main.Memory", "HeapManagement");
SettingsMain.Main.MemoryTextureManagement = GetSettingI("Main.Main.Memory", "TextureManagement");
SettingsMain.Main.DisableShadowManagement = GetSettingI("Main.Main.Misc", "DisableShadowManagement");
SettingsMain.Main.AnisotropicFilter = GetSettingI("Main.Main.Misc", "AnisotropicFilter");
SettingsMain.Main.FarPlaneDistance = GetSettingF("Main.Main.Misc", "FarPlaneDistance");
SettingsMain.Main.ScreenshotKey = GetSettingI("Main.Main.Misc", "ScreenshotKey");
Expand Down
1 change: 1 addition & 0 deletions src/core/SettingManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ struct SettingsMainStruct {
bool RemovePrecipitations;
bool MemoryHeapManagement;
bool MemoryTextureManagement;
bool DisableShadowManagement;
bool ReplaceIntro;
bool SkipFog;
bool RenderEffects;
Expand Down