Skip to content

unify(w3ddisplay): Merge most of W3DDisplay - #3260

Open
stephanmeesters wants to merge 7 commits into
TheSuperHackers:mainfrom
stephanmeesters:unify/w3ddisplay
Open

unify(w3ddisplay): Merge most of W3DDisplay#3260
stephanmeesters wants to merge 7 commits into
TheSuperHackers:mainfrom
stephanmeesters:unify/w3ddisplay

Conversation

@stephanmeesters

@stephanmeesters stephanmeesters commented Sep 6, 2026

Copy link
Copy Markdown

Generals gains

  • New selectors for dumpStats to provide additional debug statistics.
  • Write terrain LOD to the stats displayed when using -displayDebug startup parameter.
  • Make the camera zoom unlimited during letterbox (black bars). I suspect this may be useful for MSG_META_DEMO_TOGGLE_LETTERBOX, or maybe some scripts in ZH maps need it. Tested with a few Generals cinematics and they appeared the same.
  • Notify shroud has changed to TheTerrainRenderObject in setShroudLevel(...). This appears to be related to updating W3DPropBuffer. Should not affect Generals as number of props is always zero.
  • Set "far attenuation" on light pulse (short lived dynamic point light). Requires a merge of LightEnvironmentClass before that flag becomes active in Generals.

Note: this is not a full merge of W3DDisplay. Does not unify code touched by #2709.

AI disclosure: AI was used to trace the impact of each of these changes.

@stephanmeesters stephanmeesters added Unify Unifies code between Generals and Zero Hour Gen Relates to Generals labels Sep 6, 2026
@qodo-free-for-open-source-projects

This comment was marked as spam.

@qodo-free-for-open-source-projects

This comment was marked as spam.

@greptile-apps

greptile-apps Bot commented Sep 6, 2026

Copy link
Copy Markdown

Greptile Summary

This PR ports selected W3D display behavior into the Generals variant:

  • Expands performance-statistics output and adds periodic/statistical warnings.
  • Displays terrain LOD and additional drawable physics information.
  • Updates terrain shroud notifications and dynamic-light attenuation.
  • Removes tactical-view zoom limits while letterbox mode is active.
  • Corrects several existing comments and minor formatting details.

Confidence Score: 4/5

The functional changes appear mergeable, but the newly introduced historical-date comments must be corrected to satisfy the repository’s explicit requirement.

The only accepted new issue is an explicit comment-format rule violation. The earlier zero-interval and nullable-object findings were resolved after stephanmeesters deferred them to issue #3261. The spike-flag thread was manually resolved without explanation.

Files Needing Attention: Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp

Important Files Changed

Filename Overview
Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp Adds display diagnostics, camera, lighting, and shroud behavior; newly added historical-date comments violate an explicit repository rule.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    Logic[Game and terrain state] --> Display[W3DDisplay]
    Stats[Debug statistics] --> Display
    Display --> Terrain[Terrain and shroud rendering]
    Display --> Lights[Dynamic light pulses]
    Display --> Camera[Letterbox and camera limits]
    Display --> Frame[Rendered frame and debug overlay]
Loading
Prompt To Fix All With AI
### Issue 1
Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp:2192
**Historical dates violate requirement**

This new comment contains the historical date `8-06-03`. The new letterbox comments at lines 2201 and 2217 similarly contain dates from 2002 and 2003. This violates the repository directive that newly created code comments must not reference dates before 2026, so the comments must be corrected before merging.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (2): Last reviewed commit: "Add physics behavior statistics" | Re-trigger Greptile

@qodo-free-for-open-source-projects

This comment was marked as spam.

@greptile-apps

This comment was marked as spam.

@greptile-apps

This comment was marked as spam.

@xezon

xezon commented Sep 6, 2026

Copy link
Copy Markdown

Maybe we wait until after #2709 and then merge the rest here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Gen Relates to Generals Unify Unifies code between Generals and Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants