Skip to content

Conversation

@xezon
Copy link

@xezon xezon commented Jan 28, 2026

This change moves ParticleSys and all ParticleEditor files to Core.

Additionally core_debugwindow now also installs for Generals and Zero Hour targets.

@xezon xezon added this to the Code foundation build up milestone Jan 28, 2026
@xezon xezon added Gen Relates to Generals ZH Relates to Zero Hour Tools Affects Tools only Unify Unifies code between Generals and Zero Hour labels Jan 28, 2026
@greptile-apps
Copy link

greptile-apps bot commented Jan 28, 2026

Greptile Overview

Greptile Summary

This PR moves ParticleSys and ParticleEditor from game-specific directories (Generals/GeneralsMD) to the shared Core directory, unifying duplicate code across both game versions.

Key Changes:

  • Moved ParticleSys.h and ParticleSys.cpp from Generals/GeneralsMD to Core
  • Moved entire ParticleEditor tool directory with 26 source files to Core
  • Updated CMakeLists.txt to reference Core implementations and remove game-specific builds
  • Updated install targets to use core_particleeditor and core_debugwindow instead of game-prefixed versions
  • Added core_debugwindow installation for Generals and Zero Hour targets
  • Documented file moves in unify_move_files.py script

The moved files are identical copies from GeneralsMD (Zero Hour) version, which explains why Core files use "Command & Conquer Generals Zero Hour(tm)" in headers. The CMakeLists.txt for Core ParticleEditor uses appropriate Core-prefixed dependencies (core_debug, core_profile, corei_* libraries).

Confidence Score: 5/5

  • This PR is safe to merge - pure code unification with no logic changes
  • This is a straightforward file move/unification PR with no functional changes. All modifications are build system updates to reference the new Core locations. The moved files are identical to their sources.
  • No files require special attention

Important Files Changed

Filename Overview
Core/GameEngine/CMakeLists.txt Uncommented ParticleSys.h and ParticleSys.cpp entries to enable Core implementation
Core/Tools/CMakeLists.txt Added ParticleEditor subdirectory to Core tools build
Core/Tools/ParticleEditor/CMakeLists.txt New CMakeLists.txt for Core ParticleEditor with updated target names and dependencies
Generals/CMakeLists.txt Updated install targets from g_particleeditor/g_debugwindow to core_particleeditor/core_debugwindow
GeneralsMD/CMakeLists.txt Updated install targets from z_particleeditor/z_debugwindow to core_particleeditor/core_debugwindow
Generals/Code/GameEngine/CMakeLists.txt Commented out ParticleSys.h and ParticleSys.cpp to use Core implementation
GeneralsMD/Code/GameEngine/CMakeLists.txt Commented out ParticleSys.h and ParticleSys.cpp to use Core implementation

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Script as unify_move_files.py
    participant ZH as GeneralsMD/Code
    participant Gen as Generals/Code
    participant Core as Core/
    participant Build as Build System

    Note over Dev,Build: File Unification Process
    
    Dev->>Script: Document file moves (commented)
    Dev->>ZH: Copy ParticleSys.h/cpp to Core
    Dev->>ZH: Copy ParticleEditor/* to Core
    
    Dev->>Core: Add ParticleSys to CMakeLists.txt
    Dev->>Core: Add ParticleEditor subdirectory
    Dev->>Core: Create ParticleEditor/CMakeLists.txt
    
    Dev->>Gen: Comment out ParticleSys files
    Dev->>Gen: Remove ParticleEditor subdirectory
    Dev->>ZH: Comment out ParticleSys files
    Dev->>ZH: Remove ParticleEditor subdirectory
    
    Dev->>Build: Update Generals install targets
    Note right of Build: g_particleeditor → core_particleeditor<br/>g_debugwindow → core_debugwindow
    
    Dev->>Build: Update GeneralsMD install targets
    Note right of Build: z_particleeditor → core_particleeditor<br/>z_debugwindow → core_debugwindow
    
    Build->>Core: Compile unified ParticleSys
    Build->>Core: Compile unified ParticleEditor
    Build->>Gen: Install core_particleeditor
    Build->>ZH: Install core_particleeditor
    
    Note over Dev,Build: Both games now use shared Core implementations
Loading

Copy link

@Skyaero42 Skyaero42 left a comment

Choose a reason for hiding this comment

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

Well done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Gen Relates to Generals Tools Affects Tools only 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