-
Notifications
You must be signed in to change notification settings - Fork 246
.pr_agent_accepted_suggestions
| PR 3159 (2026-08-16) |
[maintainability] Signed diffuse parameter
Signed diffuse parameter
`writeScorchToBuffer` takes `diffuse` as signed `Int` even though it is computed as `UnsignedInt` and stored in `VertexFormatXYZDUV1::diffuse` (unsigned). This introduces an implementation-defined unsigned→signed conversion and makes the API type-inaccurate (can also trigger signedness warnings).writeScorchToBuffer(...) accepts diffuse as Int, but the caller produces an UnsignedInt color and the vertex format stores diffuse as unsigned. Keeping this parameter signed forces an implementation-defined conversion and misrepresents what the value is.
-
updateScorchescomputesUnsignedInt diffuse = DX8Wrapper::Convert_Color_Clamp(...)and passes it towriteScorchToBuffer. -
VertexFormatXYZDUV1::diffuseis declared asunsigned.
- Change the
diffuseparameter type in both declaration and definition fromInttoUnsignedInt(preferred, since it matches the rest of the codebase) or tounsigned. - Ensure the call site remains unchanged (it already has
UnsignedInt diffuse).
- Core/GameEngineDevice/Include/W3DDevice/GameClient/W3DScorch.h[78-82]
- Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DScorch.cpp[154-170]
| PR 3158 (2026-08-16) |
[maintainability] Flag semantic mismatch
Flag semantic mismatch
Shell::popImmediate(Bool suppressInit) forwards suppressInit into doPop(Bool impendingPush), where the parameter name/meaning differs (it controls whether newTop->runInit runs). This semantic mismatch is introduced by the PR and makes the public API intent harder to follow at the call site.popImmediate(Bool suppressInit) passes its new flag directly into doPop(Bool impendingPush). Although the polarity currently matches the desired behavior (TRUE => skip newTop->runInit), the different naming/abstraction (suppressInit vs impendingPush) is confusing and brittle.
doPop currently uses its boolean to decide whether to run init on the newly exposed top layout. The PR repurposes this parameter by forwarding suppressInit positionally, which obscures intent.
- Core/GameEngine/Source/GameClient/GUI/Shell/Shell.cpp[428-714]
- Core/GameEngine/Include/GameClient/Shell.h[131-170]
Pick one:
- Rename the
doPopparameter (declaration + definition) to reflect what it actually controls (e.g.,suppressInitorrunInit), and update call sites accordingly. - Keep
doPop(impendingPush)but make the mapping explicit inpopImmediate, e.g.:
-
doPop(/*impendingPush=*/suppressInit);(or) -
const Bool impendingPush = suppressInit; doPop(impendingPush);This preserves behavior while making intent unambiguous.
| PR 3140 (2026-08-14) |
[correctness] Stale smudge count
Stale smudge count
The new early-return path in W3DSmudgeManager::render exits before updating m_smudgeCountLastFrame, so SmudgeManager::getSmudgeCountLastFrame() can return a previous-frame value when there are no smudges/sets. This breaks the contract of a “last frame” counter on frames where the global smudge set is empty.W3DSmudgeManager::render now returns early when there are no smudge sets or no smudges in the global set, but it does so before updating m_smudgeCountLastFrame. This leaves SmudgeManager::getSmudgeCountLastFrame() returning a stale non-zero value on subsequent empty frames.
m_smudgeCountLastFrame is only assigned later in render after the visibility pass. With the new early return, that assignment is skipped entirely.
- Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DSmudge.cpp[311-317]
- Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DSmudge.cpp[429-436]
Set m_smudgeCountLastFrame = 0; before returning from the new early-return condition (or otherwise ensure it is updated on all return paths that represent “no smudges rendered this frame”).
[reliability] Support check never runs
Support check never runs
The early return can prevent testHardwareSupport() from ever being called when the global smudge set remains empty, leaving m_hardwareSupportStatus stuck at SMUDGE_SUPPORT_UNKNOWN. Since getHardwareSupport() treats UNKNOWN as supported, upstream code may keep smudge-related processing enabled even on unsupported hardware until at least one smudge exists.W3DSmudgeManager::render now returns before calling testHardwareSupport() when the smudge-set list is empty or the global set has zero smudges. This can leave m_hardwareSupportStatus as SMUDGE_SUPPORT_UNKNOWN indefinitely, while getHardwareSupport() reports support for all states except SMUDGE_SUPPORT_NO.
-
SmudgeManagerinitializesm_hardwareSupportStatustoSMUDGE_SUPPORT_UNKNOWN. -
getHardwareSupport()returns true for UNKNOWN. - Multiple call sites gate smudge work on
getHardwareSupport(). -
testHardwareSupport()is the codepath that transitions UNKNOWN -> YES/NO.
- Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DSmudge.cpp[311-320]
- Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DSmudge.cpp[203-221]
- Core/GameEngine/Include/GameClient/Smudge.h[106-113]
- Core/GameEngine/Source/GameClient/System/Smudge.cpp[36-40]
Preserve the perf win (skipping Flush/visibility pass/backbuffer copy) while still allowing capability detection by:
- Calling
testHardwareSupport()before the early-return check (it is effectively one-time work due to internal caching), or - Calling
testHardwareSupport()only whenm_hardwareSupportStatus == SMUDGE_SUPPORT_UNKNOWNeven if returning early. Either approach avoids leaving hardware support permanently UNKNOWN in smudge-free sessions.
- How to Get Involved
- How to Contribution
- Replays for testing
- New Configuration Options
- In-Game Debug Commands
- Community forks
- License
- Credits
- Changelog
- FAQ
- Known Issues
- Contact & Community
-
Visual Studio 6 Guides:
-
Visual Studio 2022 Guides:
- DirectX
- STLport
- Max4SDK
- NVASM
- Benchmark
- MilesSoundSystem
- Bink
- SafeDisk
- Asimp3
- GameSpy
- ZLib
- LZHCompress