unify(client): Merge and move GameClient source and include files to Core#2578
unify(client): Merge and move GameClient source and include files to Core#2578DevGeniusCode wants to merge 3 commits intoTheSuperHackers:mainfrom
Conversation
unify(client): Merge and move GameClient source and include files to Core
|
| Filename | Overview |
|---|---|
| Core/GameEngine/CMakeLists.txt | Uncomments 60+ GameClient include and source entries to include the newly unified files from Core. |
| Generals/Code/GameEngine/CMakeLists.txt | Comments out all GameClient entries that were moved to Core; Generals-specific files (Drawable.h, SelectionXlat.h, etc.) remain uncommented. |
| GeneralsMD/Code/GameEngine/CMakeLists.txt | Comments out all GameClient entries that were moved to Core; GeneralsMD-specific files (Drawable.h, SelectionXlat.h) remain in place and uncommented. |
| scripts/cpp/unify_move_files.py | Adds the batch of unify_file() calls for this PR (lines 442–548), all commented out after execution; prior history calls remain commented out. Script logic is correct. |
| Core/GameEngine/Include/GameClient/Display.h | Unified header moved from GeneralsMD; uses #pragma once, retains GPL + EA copyright headers, no functional changes. |
| Core/GameEngine/Source/GameClient/Display.cpp | Unified source moved from GeneralsMD; retains GPL + EA copyright headers, no functional changes. |
| GeneralsMD/Code/GameEngine/Include/GameClient/Drawable.h | GeneralsMD-specific file, not moved to Core; correctly uses "Command & Conquer Generals Zero Hour(tm)" header. |
| GeneralsMD/Code/GameEngine/Include/GameClient/SelectionXlat.h | GeneralsMD-specific file, not moved to Core; correctly uses "Command & Conquer Generals Zero Hour(tm)" header. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
subgraph Before["Before This PR"]
G_INC["Generals/Code/GameEngine/Include/GameClient/*.h\n~44 headers"]
G_SRC["Generals/Code/GameEngine/Source/GameClient/**/*.cpp\n~20 sources"]
MD_INC["GeneralsMD/Code/GameEngine/Include/GameClient/*.h\n~44 headers (identical)"]
MD_SRC["GeneralsMD/Code/GameEngine/Source/GameClient/**/*.cpp\n~20 sources (identical)"]
end
subgraph After["After This PR"]
CORE_INC["Core/GameEngine/Include/GameClient/*.h\n44 unified headers"]
CORE_SRC["Core/GameEngine/Source/GameClient/**/*.cpp\n20 unified sources"]
G_SPECIFIC["Generals/ (game-specific only)\nDrawable.h, SelectionXlat.h, etc."]
MD_SPECIFIC["GeneralsMD/ (game-specific only)\nDrawable.h, SelectionXlat.h, etc."]
end
G_INC -->|"moved + deleted"| CORE_INC
G_SRC -->|"moved + deleted"| CORE_SRC
MD_INC -->|"deleted (duplicate)"| CORE_INC
MD_SRC -->|"deleted (duplicate)"| CORE_SRC
CORE_INC --> G_SPECIFIC
CORE_INC --> MD_SPECIFIC
CORE_SRC --> G_SPECIFIC
CORE_SRC --> MD_SPECIFIC
CMAKE["CMakeLists.txt updates\nGenerals + GeneralsMD: commented out\nCore: uncommented"]
CMAKE --> CORE_INC
CMAKE --> CORE_SRC
Reviews (1): Last reviewed commit: "unify(client): Move several GameClient f..." | Re-trigger Greptile
|
This is way too much in one go and will cause massive merge conficts. |
I split |
|
Usually we do targeted moves. For example move Network related files, or INI related files. Not move whole Game and Engine. |
Summary
This PR unifies and moves various GameClient files from
GeneralsandGeneralsMDinto theCoredirectory.The primary goal of this change is to reduce code duplication across the two game versions. I have ensured that the logic remains intact and identical.
Key Changes
GameEngine/Source/GameClientandGameEngine/Include/GameClienttoCore.CMakeLists.txtinGenerals,GeneralsMD, andCoreto reflect the new file locations.Files Moved:
The move includes (but is not limited to):
Display,Anim2D,DebugDisplay,Image,RayEffect.AnimateWindowManager,GameWindowManager,GadgetCheckBox,GadgetListBox, etc.AnimatedParticleSysBoneClientUpdate,BeaconClientUpdate,SwayClientUpdate.CreditsMenu,DifficultySelect, andWOLscreens.