unify(ww3d2): Merge WW3D and move it to Core - #3012
Conversation
|
| Filename | Overview |
|---|---|
| Core/Libraries/Source/WWVegas/WW3D2/CMakeLists.txt | Adds the relocated WW3D implementation and header to the shared Core WW3D2 source set. |
| Core/Libraries/Source/WWVegas/WW3D2/ww3d.cpp | Relocates the existing Zero Hour WW3D implementation into Core and qualifies local WW3D2 includes. |
| Core/Libraries/Source/WWVegas/WW3D2/ww3d.h | Relocates the common WW3D interface into Core without content changes. |
| Generals/Code/Libraries/Source/WWVegas/WW3D2/CMakeLists.txt | Removes the obsolete per-game WW3D implementation from the Generals source list. |
| GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/CMakeLists.txt | Removes the obsolete per-game WW3D implementation from the Zero Hour source list. |
| scripts/cpp/unify_move_files.py | Records the completed WW3D source and header migration as disabled migration entries. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
Core["Core WW3D2<br/>shared ww3d.cpp / ww3d.h"]
G["Generals g_ww3d2"]
Z["Zero Hour z_ww3d2"]
GC["Generals WW3D consumers"]
ZC["Zero Hour WW3D consumers"]
Core --> G
Core --> Z
GC --> G
ZC --> Z
Reviews (3): Last reviewed commit: "unify(ww3d2): Move WW3D to Core" | Re-trigger Greptile
a0dd61d to
902892d
Compare
| #include "boxrobj.h" | ||
| #include "WW3D2/rinfo.h" | ||
| #include "WW3D2/assetmgr.h" | ||
| #include "WW3D2/boxrobj.h" |
There was a problem hiding this comment.
Instead of doing this maybe we help CMake see this path from the Core ww3d2 INTERFACE?
There was a problem hiding this comment.
I looked into this. corei_ww3d2 can only expose the Core WW3D2 directory, while these headers (rinfo.h, assetmgr.h, etc.) still live in the game-specific directories. We could add those directories privately to each game target, but that would introduce a new include-path convention. Currently, cross-directory WWVegas includes are folder-qualified, so I think these qualifications are appropriate until the remaining files are unified into Core.
There was a problem hiding this comment.
My expectation is that this was working before 3778f20
Given this change, it would mean that every move to Core would now need tweaking some header includes. It would be good to avoid this in this intermediate unification phase.
There was a problem hiding this comment.
Or maybe this needs a pass and complete what 3778f20 has missed? Or revert parts of it where intra lib includes do not need to have the folder.
Include for WW3D2 file inside WW3D2 lib does not necessarily need to specifiy the WW3D2 folder. This is true for all the WWVegas libs.
It's something I have missed in this review.
There was a problem hiding this comment.
Currently, cross-directory WWVegas includes are folder-qualified
I think this is the problem. Shall we revert that aspect?
902892d to
701dc6b
Compare
Generals and Zero Hour differ only by comments and the disabled WWShade
SHD_FLUSHhook.Now Generals uses the Zero Hour implementation, and
ww3d.cppandww3d.hare moved to Core usingunify_move_files.pyTodo: