Skip to content

unify(client): Move W3DDevice GameClient files to Core#2580

Closed
DevGeniusCode wants to merge 6 commits intoTheSuperHackers:mainfrom
DevGeniusCode:unify-client-device
Closed

unify(client): Move W3DDevice GameClient files to Core#2580
DevGeniusCode wants to merge 6 commits intoTheSuperHackers:mainfrom
DevGeniusCode:unify-client-device

Conversation

@DevGeniusCode
Copy link
Copy Markdown

@DevGeniusCode DevGeniusCode commented Apr 11, 2026

⚠️ Note: This branch builds upon PR #2578. Merging this PR will safely encompass both sets of changes.

Summary
Following the previous unification, this PR moves the W3DDevice GameClient files from Generals and GeneralsMD into the Core directory.

  • Relocated ~61*2 files (including W3D GUI, Shadows, Core Systems, and Shaders).
  • Updated CMakeLists.txt to reflect the new paths.
  • Zero functional changes – all moved files were completely identical.

@DevGeniusCode DevGeniusCode added Gen Relates to Generals Unify Unifies code between Generals and Zero Hour labels Apr 11, 2026
@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Apr 11, 2026

Greptile Summary

This PR moves ~35 W3DDevice GameClient files (headers, sources, and shaders) from Generals/Code/ and GeneralsMD/Code/ into Core/GameEngine/ and Core/GameEngineDevice/, updating all four CMakeLists.txt files accordingly. The PR declares zero functional changes, and the file contents verify that — only file locations and CMake wiring change. The included Python helper script (scripts/cpp/unify_move_files.py) automates the move/comment-toggle pattern and has been used correctly here.

Confidence Score: 5/5

Safe to merge — pure file reorganisation with no functional changes and correct CMake wiring.

All moved files are confirmed to carry GPL headers and #pragma once guards. CMakeLists.txt changes correctly comment-out game-specific entries and uncomment Core entries. The helper script logic is sound. No P0/P1 findings were identified.

No files require special attention.

Important Files Changed

Filename Overview
Core/GameEngine/CMakeLists.txt Uncomments ~35 previously-inactive GameClient header and source entries that now live in Core/; no structural issues found.
Core/GameEngineDevice/CMakeLists.txt Uncomments W3DDevice GUI, Gadget, Shadow, and misc sources; mirrors the GameEngine change with no errors detected.
Generals/Code/GameEngine/CMakeLists.txt Comments out the same ~35 entries that now live in Core; Generals-specific files (Drawable.h, CampaignManager.h, etc.) remain active.
GeneralsMD/Code/GameEngine/CMakeLists.txt Comments out the unified set; GeneralsMD-specific files (Drawable.h, SelectionXlat.h, etc.) stay active as expected.
scripts/cpp/unify_move_files.py Helper script that moves files and patches CMakeLists; logic is correct — reads lines, updates in-place, writes once. No functional bugs detected.
Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DDynamicLight.cpp New Core copy of W3DDynamicLight; GPL header present, content matches the GeneralsMD original.
Core/GameEngine/Include/GameClient/Shadow.h New Core copy; uses #pragma once, GPL header present, content is identical to the GeneralsMD original.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["Generals/Code/GameEngine\n(~35 headers + sources)"] -->|"deleted / commented-out\nin CMakeLists"| C
    B["GeneralsMD/Code/GameEngine\n(~35 identical headers + sources)"] -->|"deleted / commented-out\nin CMakeLists"| C
    C["Core/GameEngine\n(new canonical location)"]

    D["Generals/Code/GameEngineDevice\n(W3D GUI, Gadgets, Shadow, Shaders)"] -->|"deleted / commented-out\nin CMakeLists"| F
    E["GeneralsMD/Code/GameEngineDevice\n(W3D GUI, Gadgets, Shadow, Shaders)"] -->|"deleted / commented-out\nin CMakeLists"| F
    F["Core/GameEngineDevice\n(new canonical location)"]

    G["scripts/cpp/unify_move_files.py"] -->|"automates move +\nCMake patch"| C
    G -->|"automates move +\nCMake patch"| F

    style C fill:#2d6a2d,color:#fff
    style F fill:#2d6a2d,color:#fff
    style G fill:#555,color:#fff
Loading

Reviews (1): Last reviewed commit: "unify(client): Move several GameEngineDe..." | Re-trigger Greptile

@xezon
Copy link
Copy Markdown

xezon commented Apr 11, 2026

It is too much in one go. It will cause massive conflicts with other changes. Break it down into smaller units one at a time.

@xezon xezon closed this Apr 11, 2026
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