Skip to content

unify(ww3d2): Merge WW3D and move it to Core#3012

Open
bobtista wants to merge 2 commits into
TheSuperHackers:mainfrom
bobtista:bobtista/unify/ww3d-to-core
Open

unify(ww3d2): Merge WW3D and move it to Core#3012
bobtista wants to merge 2 commits into
TheSuperHackers:mainfrom
bobtista:bobtista/unify/ww3d-to-core

Conversation

@bobtista

Copy link
Copy Markdown

Generals and Zero Hour differ only by comments and the disabled WWShade SHD_FLUSH hook.

Now Generals uses the Zero Hour implementation, and ww3d.cpp and ww3d.h are moved to Core using unify_move_files.py

Todo:

  • Confirm both implementations are identical before moving
  • Configure both game targets
  • Replicate to Generals

@bobtista bobtista self-assigned this Jul 25, 2026
@bobtista bobtista added the Unify Unifies code between Generals and Zero Hour label Jul 25, 2026
@greptile-apps

greptile-apps Bot commented Jul 25, 2026

Copy link
Copy Markdown

Greptile Summary

Centralizes the shared WW3D implementation in Core.

  • Moves ww3d.cpp and ww3d.h from the Zero Hour tree into Core.
  • Configures both game-specific WW3D targets to compile the Core implementation exactly once.
  • Updates WW3D consumers in both game trees to use the shared include path.
  • Records the completed move in the manual unification script.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
Core/Libraries/Source/WWVegas/WW3D2/CMakeLists.txt Enables the centralized WW3D implementation through the Core interface source list.
Core/Libraries/Source/WWVegas/WW3D2/ww3d.cpp Moves the Zero Hour WW3D implementation into Core and qualifies shared WW3D include paths.
Core/Libraries/Source/WWVegas/WW3D2/ww3d.h Relocates the shared WW3D public interface without changing its contents.
Generals/Code/Libraries/Source/WWVegas/WW3D2/CMakeLists.txt Disables the local implementation so the Generals target compiles the Core source once.
GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/CMakeLists.txt Disables the local implementation so the Zero Hour target compiles the Core source once.
scripts/cpp/unify_move_files.py Adds commented historical entries documenting the completed WW3D unification operation.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    Core["Core WW3D2<br/>ww3d.cpp / ww3d.h"]
    Generals["Generals g_ww3d2"]
    ZeroHour["Zero Hour z_ww3d2"]
    GConsumers["Generals WW3D consumers"]
    ZConsumers["Zero Hour WW3D consumers"]
    Core --> Generals
    Core --> ZeroHour
    Generals --> GConsumers
    ZeroHour --> ZConsumers
Loading

Reviews (2): Last reviewed commit: "unify(ww3d2): Move WW3D to Core" | Re-trigger Greptile

@bobtista
bobtista force-pushed the bobtista/unify/ww3d-to-core branch from a0dd61d to 902892d Compare July 25, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Unify Unifies code between Generals and Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant