diff --git a/src/swarm-topography/Swarm/Game/Scenario/Topography/Structure/Assembly.hs b/src/swarm-topography/Swarm/Game/Scenario/Topography/Structure/Assembly.hs index 4b2fa8c4d..ab8079e50 100644 --- a/src/swarm-topography/Swarm/Game/Scenario/Topography/Structure/Assembly.hs +++ b/src/swarm-topography/Swarm/Game/Scenario/Topography/Structure/Assembly.hs @@ -22,7 +22,6 @@ import Data.Map qualified as M import Data.Set qualified as Set import Data.Text (Text) import Data.Text qualified as T -import Debug.Trace (trace) import Linear.Affine import Swarm.Game.Location import Swarm.Game.Scenario.Topography.Area @@ -123,18 +122,8 @@ overlayGridExpanded -- The 'childAdjustedOrigin' is the sum of origin adjustments -- to completely assemble some substructure. (PositionedGrid childAdjustedOrigin overlayArea) = - trace - ( unwords - [ "Merging base grid at position" - , show $ gridPosition baseGrid - , "with overlay grid at position" - , show $ gridPosition positionedOverlay - ] - ) - result + baseGrid <> positionedOverlay where - result = baseGrid <> positionedOverlay - reorientedOverlayCells = applyOrientationTransform orientation overlayArea placementAdjustedByOrigin = yamlPlacementOffset .+^ asVector childAdjustedOrigin positionedOverlay = PositionedGrid placementAdjustedByOrigin reorientedOverlayCells diff --git a/src/swarm-topography/Swarm/Game/Scenario/Topography/Structure/Overlay.hs b/src/swarm-topography/Swarm/Game/Scenario/Topography/Structure/Overlay.hs index d2ee7e33a..08496e241 100644 --- a/src/swarm-topography/Swarm/Game/Scenario/Topography/Structure/Overlay.hs +++ b/src/swarm-topography/Swarm/Game/Scenario/Topography/Structure/Overlay.hs @@ -16,8 +16,7 @@ import Control.Applicative import Data.Function (on) import Data.Int (Int32) import Data.Tuple (swap) -import Debug.Trace (trace) -import Linear hiding (trace) +import Linear (V2 (..)) import Swarm.Game.Location import Swarm.Game.Scenario.Topography.Area import Swarm.Game.Scenario.Topography.Grid @@ -118,19 +117,7 @@ instance (Alternative f) => Semigroup (PositionedGrid (f a)) where a1@(PositionedGrid baseLoc baseGrid) <> a2@(PositionedGrid overlayLoc overlayGrid) = PositionedGrid newUpperLeftCornerPosition combinedGrid where - mergedSize2 = computeMergedArea $ OverlayPair a1 a2 - mergedSize = - trace - ( unwords - [ "Merged size for " - , show a1 - , "and" - , show a2 - , ":" - , show mergedSize2 - ] - ) - mergedSize2 + mergedSize = computeMergedArea $ OverlayPair a1 a2 combinedGrid = zipGridRows mergedSize paddedOverlayPair -- We create a vector from the overlay position,