Skip to content

Commit dd24342

Browse files
committed
chore: compress multi-line comment blocks in ported modules
Collapse 4 explainer blocks (AltTabFullscreen, ViewmodelShading, DofFix x2) to one line each. Removes restated rationale and 'before this change' framing; keeps the non-obvious WHY.
1 parent f3bf262 commit dd24342

3 files changed

Lines changed: 5 additions & 11 deletions

File tree

Addictol/Source/Modules/AdModuleAltTabFullscreen.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ namespace Addictol
3131
D3D_FEATURE_LEVEL* a_outFeatureLevel,
3232
ID3D11DeviceContext** a_outContext) noexcept
3333
{
34-
// Force borderless-windowed when the engine requested exclusive fullscreen.
35-
// The vanilla alt-tab hang is rooted in exclusive-mode ResizeBuffers re-entry;
36-
// never entering exclusive eliminates the bug class entirely.
34+
// Force borderless-windowed; staying out of exclusive avoids the alt-tab ResizeBuffers re-entry hang.
3735
DXGI_SWAP_CHAIN_DESC patchedDesc{};
3836
const DXGI_SWAP_CHAIN_DESC* descToUse = a_desc;
3937
if (a_desc && !a_desc->Windowed)

Addictol/Source/Modules/AdModuleDofFix.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ namespace Addictol
88
{
99
static REX::TOML::Bool<> bFixesDofFix{ "Fixes"sv, "bDofFix"sv, true };
1010

11-
// Worker takes 5 args; the 5th lives at [rsp+0x28] in the caller frame. The hook must declare and
12-
// forward all five or the original reads garbage when it reaches its 5th-arg load.
13-
// OG arg2 is the effect pointer directly; NG/AE arg2 is an index into effectList._data (+0x18).
11+
// Worker takes 5 args (5th at [rsp+0x28]); forward all five or the original loads garbage.
12+
// OG arg2 is the effect pointer; NG/AE arg2 is an index into effectList._data (+0x18).
1413
using TRenderEffect = void(__fastcall*)(void*, std::uintptr_t, std::int32_t, std::int32_t, void*);
1514
static TRenderEffect OriginalRenderEffect = nullptr;
1615

@@ -79,9 +78,7 @@ namespace Addictol
7978

8079
g_workerArgIsEffectPtr = RELEX::IsRuntimeOG();
8180

82-
// Camera + accumulator the engine passes to BSShaderUtil::RenderScene
83-
// in DrawWorld::Imagespace; reusing them keeps the viewmodel re-render
84-
// identical to what the vanilla pipeline already issues elsewhere.
81+
// Reuse the engine's camera + accumulator from BSShaderUtil::RenderScene for pipeline parity.
8582
g_viewmodelCameraGlobal = reinterpret_cast<void**>(REL::ID{ 300623, 2712879 }.address());
8683
g_viewmodelAccumGlobal = reinterpret_cast<void**>(REL::ID{ 726120, 2712936 }.address());
8784

Addictol/Source/Modules/AdModuleViewmodelShading.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ namespace Addictol
2020
static RE::BSShaderManager::State** g_stateGlobal = nullptr;
2121
static RE::BSShaderAccumulator** g_accumulatorGlobal = nullptr;
2222

23-
// Add forwardLightOffset.xyz onto eyePosition.xyz; the original write at
24-
// +0x570/+0x574/+0x578 omitted this term, breaking 1st-person specular.
23+
// Add forwardLightOffset.xyz onto eyePosition.xyz (vanilla omits this term, breaking 1st-person specular).
2524
static void __fastcall HookMove1stPersonToOrigin() noexcept
2625
{
2726
if (OriginalMove1stPersonToOrigin)

0 commit comments

Comments
 (0)