9aed6d844eaf49ae819025f23a81e45777962e68
The last seam of the decomposition, and the one the earlier ones were groundwork for: every draw method already took a WorldCoordinates, read mode state through BuildModeController and selection through SelectionController, and used the shared shapes in WorldPrimitives, so the move needed almost no rewriting. paintGL is now a call sequence. The split is the world-space / screen-space line already drawn by the WorldCoordinates work: the renderer draws everything positioned in tiles, while the pause and deconstruct vignettes and the replay overlay - which never took a WorldCoordinates because they are anchored to the viewport - stay with the widget. WorldRenderFrame is what keeps the renderer independent of the widget. It reads the simulation directly, but the rest of what it draws is interaction state the widget owns: the selection, the active build mode, live beams, the copy-settings feedback, the box-select rectangle. Those are gathered per frame and passed by reference, so the renderer holds no copy a later click could invalidate, and it knows nothing about input. Three more queries had to stop belonging to the view first, because the renderer and the click path both need them: buildingsInBox and collectTunnelTiles move to FactoryQueries, and makeTunnelLookup with the TunnelTileMap and QPointCompare it needs move to TunnelCompletion, which already owned that concept. Two small things fell out of leaving QWidget. The port-item clip region used QWidget::rect() and now takes the painter's own viewport. drawDebugOverlay puts translated text on screen, so the renderer declares tr() via Q_DECLARE_TR_FUNCTIONS rather than becoming a QObject. drawDebugOverlay stays in the renderer despite being screen-anchored: it is drawn mid-sequence, so moving it out would put it on top of the ships instead of under them. The simulation reference is non-const only because EntityAdmin's component accessors are; the renderer never writes it. Draw order is unchanged, and so is behaviour. GameWorldView.cpp is 1431 lines, from 3265 when this branch started. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JcReq7hVk4KUPhTDKWAG7K
Description
No description provided
Languages
C++
96%
CMake
2.2%
Python
1.2%
C
0.6%