Skip to content

unify(worldbuilder): Move unified WorldBuilder to Core - #3026

Open
OmarAglan wants to merge 3 commits into
TheSuperHackers:mainfrom
OmarAglan:unify/worldbuilder-core
Open

unify(worldbuilder): Move unified WorldBuilder to Core#3026
OmarAglan wants to merge 3 commits into
TheSuperHackers:mainfrom
OmarAglan:unify/worldbuilder-core

Conversation

@OmarAglan

@OmarAglan OmarAglan commented Jul 28, 2026

Copy link
Copy Markdown

Merge with Rebase

After the Generals and Zero Hour WorldBuilder implementations are synchronized, keeping duplicate editor trees would allow them to drift apart again. The shared implementation should live in Core while each game keeps its own executable target and configuration.

This pull moves the unified implementation to Core:

  • WorldBuilder source files, headers and shared resources move to Core/Tools/WorldBuilder.
  • A new corei_worldbuilder interface target provides the shared implementation to both games.
  • The Generals and Zero Hour WorldBuilder directories become thin executable wrappers.
  • Each game keeps its target name, dependencies, output name and compile definition.
  • Both game-specific splash bitmaps remain available and are selected by RTS_GENERALS or RTS_ZEROHOUR.

No editor behavior is intentionally changed here. The implementation was synchronized in #3025; this pull only gives the shared files a single owner.

This branch is based on #3025, so GitHub will show the first two commits in the series until #3024 and #3025 are merged with rebase.

Testing

  • git diff --check
  • CMake configure and generation succeeded for the shared interface and both wrappers
  • Confirmed generated resource rules contain the correct game compile definition
  • Confirmed resource preprocessing selects WorldBuilderV.bmp for Generals and WorldBuilderZH.bmp for Zero Hour
  • Confirmed the Core CMake manifest contains all 198 source and header files
  • Confirmed this move is one commit on top of unify(worldbuilder): Merge Generals and Zero Hour WorldBuilder #3025
  • Full Generals WorldBuilder build Pass with out errors.

Note: i Used Chatgpt Codex In some aspects, to be known.

@greptile-apps

greptile-apps Bot commented Jul 28, 2026

Copy link
Copy Markdown

Greptile Summary

The PR centralizes the shared WorldBuilder implementation in Core while retaining game-specific executable wrappers.

  • Adds the corei_worldbuilder interface target containing shared sources, headers, resources, precompiled headers, and platform dependencies.
  • Replaces the Generals and Zero Hour WorldBuilder trees with thin wrappers that retain their target names, engine dependencies, compile definitions, and output names.
  • Selects the appropriate Generals or Zero Hour splash resource at resource-compilation time.
  • Synchronizes the Generals engine interfaces and polygon-trigger serialization needed by the shared editor.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete blocking or independently actionable defects identified in the changed paths.

The shared target preserves the former per-game sources, dependencies, PCH configuration, resources, target identities, and game-specific definitions, while the accompanying Generals compatibility changes align the interfaces consumed by the unified implementation.

Important Files Changed

Filename Overview
Core/Tools/WorldBuilder/CMakeLists.txt Defines the shared interface target and propagates the complete WorldBuilder source, resource, PCH, include, and platform-link configuration.
Core/Tools/CMakeLists.txt Registers the shared WorldBuilder directory whenever either game’s tools are enabled.
Generals/Code/Tools/WorldBuilder/CMakeLists.txt Reduces the Generals editor to a wrapper while preserving its engine links, compile definition, and output name.
GeneralsMD/Code/Tools/WorldBuilder/CMakeLists.txt Reduces the Zero Hour editor to a wrapper while preserving its additional debug/profile dependencies and output identity.
Core/Tools/WorldBuilder/res/WorldBuilder.rc Consolidates editor resources and selects the game-specific splash bitmap through the consuming target’s compile definition.
Generals/Code/GameEngine/Source/GameLogic/Map/PolygonTrigger.cpp Brings Generals polygon-trigger layer serialization up to the interface expected by the unified editor.
Core/Tools/WorldBuilder/src/WHeightMapEdit.cpp Provides the synchronized shared height-map editor implementation, including game-specific blend-tile serialization behavior.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    Shared["corei_worldbuilder<br/>shared sources, headers, resources"]
    Generals["g_worldbuilder<br/>RTS_GENERALS"]
    ZeroHour["z_worldbuilder<br/>RTS_ZEROHOUR"]
    GEngine["Generals engine/device"]
    ZEngine["Zero Hour engine/device"]
    GSplash["WorldBuilderV.bmp"]
    ZSplash["WorldBuilderZH.bmp"]

    Shared --> Generals
    Shared --> ZeroHour
    GEngine --> Generals
    ZEngine --> ZeroHour
    Generals --> GSplash
    ZeroHour --> ZSplash
Loading

Reviews (1): Last reviewed commit: "unify(worldbuilder): Move WorldBuilder t..." | Re-trigger Greptile

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant