Skip to content

unify(messagestream): Move all client message translator files to Core#2805

Open
xezon wants to merge 1 commit into
TheSuperHackers:mainfrom
xezon:xezon/unify-messagestream
Open

unify(messagestream): Move all client message translator files to Core#2805
xezon wants to merge 1 commit into
TheSuperHackers:mainfrom
xezon:xezon/unify-messagestream

Conversation

@xezon

@xezon xezon commented Jun 18, 2026

Copy link
Copy Markdown

This change moves all client message translator files to Core.

All these files have been previously merged and are logically identical between Generals and Zero Hour.

@xezon xezon added this to the Code foundation build up milestone Jun 18, 2026
@xezon xezon added Gen Relates to Generals ZH Relates to Zero Hour Unify Unifies code between Generals and Zero Hour labels Jun 18, 2026
@xezon xezon force-pushed the xezon/unify-messagestream branch from ed6ec7e to 54fdcc9 Compare June 18, 2026 17:16
@greptile-apps

greptile-apps Bot commented Jun 18, 2026

Copy link
Copy Markdown

Greptile Summary

This PR moves 9 message-translator headers, 9 MessageStream .cpp files, and GameClientDispatch.cpp from game-specific directories into Core/GameEngine, consolidating the shared code that was already identical between Generals and Zero Hour.

  • All three CMakeLists files are updated consistently: files are commented out in Generals/ and GeneralsMD/ and uncommented in Core/, so both targets continue to receive the functionality through the Core library.
  • The unify_move_files.py script is extended with 19 unify_file(Game.ZEROHOUR, …) calls, which correctly deletes the Generals duplicate, moves the Zero Hour copy to Core, and updates all three CMakeLists in one operation.
  • Moved files retain their GPL headers, EA copyright notices, and #pragma once guards unchanged.

Confidence Score: 5/5

Safe to merge — this is a mechanical file consolidation with no logic changes.

All moved files are bit-for-bit identical to their Generals/Zero Hour originals, CMakeLists changes in all three projects are symmetric and correct, and the unify script properly handles deletion of the Generals duplicate and the move of the Zero Hour copy to Core.

No files require special attention.

Important Files Changed

Filename Overview
Core/GameEngine/CMakeLists.txt Uncomments 9 MessageStream source files, GameClientDispatch.cpp, and 9 header files, activating them in the Core build target.
Generals/Code/GameEngine/CMakeLists.txt Comments out 9 MessageStream source files, GameClientDispatch.cpp, and 9 headers, removing them from the Generals-specific build; they are now provided by Core.
GeneralsMD/Code/GameEngine/CMakeLists.txt Comments out the same 9 MessageStream source files, GameClientDispatch.cpp, and 9 headers, mirroring the Generals change; Zero Hour now consumes these via the Core library.
scripts/cpp/unify_move_files.py Adds 19 unify_file() calls documenting the operations performed in this PR; uses the correct function (handles both Generals + Zero Hour deletion/move) with the correct Game.ZEROHOUR source.
Core/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp Moved from GeneralsMD to Core unchanged; GPL header, EA copyright, and #pragma once all present and correct.
Core/GameEngine/Source/GameClient/GameClientDispatch.cpp Moved from GeneralsMD to Core unchanged; all headers and include guards are intact.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph Before
        G[Generals/Code/GameEngine\nMessageStream/*.cpp\nGameClientDispatch.cpp\nInclude/GameClient/*.h]
        ZH[GeneralsMD/Code/GameEngine\nMessageStream/*.cpp\nGameClientDispatch.cpp\nInclude/GameClient/*.h]
    end

    subgraph After
        C[Core/GameEngine\nMessageStream/*.cpp\nGameClientDispatch.cpp\nInclude/GameClient/*.h]
        GB[Generals CMakeLists\nfiles commented out]
        ZHB[GeneralsMD CMakeLists\nfiles commented out]
        CB[Core CMakeLists\nfiles uncommented]
    end

    G -- "duplicate deleted" --> X((Removed))
    ZH -- "moved to Core" --> C
    C --> CB
    GB -- "links Core library" --> C
    ZHB -- "links Core library" --> C
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    subgraph Before
        G[Generals/Code/GameEngine\nMessageStream/*.cpp\nGameClientDispatch.cpp\nInclude/GameClient/*.h]
        ZH[GeneralsMD/Code/GameEngine\nMessageStream/*.cpp\nGameClientDispatch.cpp\nInclude/GameClient/*.h]
    end

    subgraph After
        C[Core/GameEngine\nMessageStream/*.cpp\nGameClientDispatch.cpp\nInclude/GameClient/*.h]
        GB[Generals CMakeLists\nfiles commented out]
        ZHB[GeneralsMD CMakeLists\nfiles commented out]
        CB[Core CMakeLists\nfiles uncommented]
    end

    G -- "duplicate deleted" --> X((Removed))
    ZH -- "moved to Core" --> C
    C --> CB
    GB -- "links Core library" --> C
    ZHB -- "links Core library" --> C
Loading

Reviews (2): Last reviewed commit: "unify(messagestream): Move all client me..." | Re-trigger Greptile

@xezon

xezon commented Jun 18, 2026

Copy link
Copy Markdown
Author

@greptileai re-review this pull

@Skyaero42 Skyaero42 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ez

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 ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants