Move debug pictures out of data

This commit is contained in:
2025-10-14 11:23:39 +01:00
parent cadaf00797
commit 7a431f6eec
4 changed files with 179 additions and 162 deletions
+6 -8
View File
@@ -1,5 +1,8 @@
{-# LANGUAGE LambdaCase #-}
module Dodge.Render.ShapePicture (worldSPic) where
import Dodge.Debug
import qualified Data.Map.Strict as M
import Control.Lens
import Data.Foldable
import Data.Strict.Tuple
@@ -110,8 +113,7 @@ extraPics cfig u =
<> _flares lw
<> foldMap drawLightSource (_lightSources lw)
<> viewClipBounds cfig w
-- <> showEnabledDebugs cfig
<> foldMap (foldMap _debugPic) (_uvDebug u) -- debug messages are in fixed coord pics
<> foldMap (drawDebug u) (M.keys $ _uvDebug u)
where
w = u ^. uvWorld
lw = w ^. cWorld . lWorld
@@ -124,14 +126,10 @@ floorItemSPic itm flit =
(itemSPic itm)
btSPic :: Button -> SPic
btSPic bt =
uncurryV translateSPxy (_btPos bt) $
rotateSP (_btRot bt) (drawButton bt)
btSPic bt = uncurryV translateSPxy (_btPos bt) $ rotateSP (_btRot bt) (drawButton bt)
mcSPic :: CWorld -> Machine -> SPic
mcSPic cw mc =
uncurryV translateSPxy (_mcPos mc) $
rotateSP (_mcDir mc) (drawMachine cw mc)
mcSPic cw mc = uncurryV translateSPxy (_mcPos mc) $ rotateSP (_mcDir mc) (drawMachine cw mc)
drawBullet :: Bullet -> Picture
drawBullet pt =