This commit is contained in:
2023-05-20 15:06:05 +01:00
parent 6c71e1d5bb
commit f2183e9954
25 changed files with 69 additions and 86 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ import Picture
drawCarte :: Configuration -> World -> Picture
drawCarte cfig w =
pictures $
fold $
toTopLeft cfig (renderListAt 0 0 locs) :
mapOverlay w
++ [mainListCursor white iPos cfig]
+1 -1
View File
@@ -23,7 +23,7 @@ drawInputMenu ::
String ->
Picture
drawInputMenu cfig title footer =
pictures
fold
[ darkenBackground cfig
, drawTitle cfig title
, drawFooterText cfig red footer
+3 -3
View File
@@ -3,12 +3,12 @@ module Dodge.Render.Outline
import Picture
hackOutline :: Color -> Float -> Picture -> Picture
hackOutline col x pic = pictures
(map (color col)
hackOutline col x pic = foldMap
(color col)
[ translate x 0 pic
, translate (-x) 0 pic
, translate 0 x pic
, translate 0 (-x) pic
]
) <> pic
<> pic
+2 -2
View File
@@ -78,7 +78,7 @@ mouseCursorType u
- w ^. wCam . camRot
mousePlus :: Picture
mousePlus = pictures [line [V2 (-5) 0, V2 5 0], line [V2 0 (-5), V2 0 5]]
mousePlus = fold [line [V2 (-5) 0, V2 5 0], line [V2 0 (-5), V2 0 5]]
drawPlus :: Float -> Picture
drawPlus x = pictures [line [V2 (- x) 0, V2 x 0], line [V2 0 (- x), V2 0 x]]
drawPlus x = fold [line [V2 (- x) 0, V2 x 0], line [V2 0 (- x), V2 0 x]]
+18 -18
View File
@@ -80,7 +80,7 @@ drawCreature cr = case _crType cr of
Barreloid{} ->
picAtCrPos1
( setDepth 20 $
pictures
fold
[ color orange $ circleSolid 10
, setDepth 0.049 . color (greyN 0.5) $ circleSolid 8
, color (greyN 0.5) $ circleSolid 8
@@ -119,25 +119,25 @@ cullPoint cfig w p
extraPics :: Configuration -> Universe -> Picture
extraPics cfig u =
pictures (_decorations lw)
fold (_decorations lw)
<> setLayer FixedCoordLayer (fixedCoordPictures u)
<> concatMapPic drawTractorBeam (_tractorBeams lw)
<> concatMapPic drawLinearShockwave (_linearShockwaves lw)
<> concatMapPic drawShockwave (_shockwaves lw)
<> concatMapPic drawLaser (_lasersToDraw lw)
<> concatMapPic drawTeslaArc (_teslaArcs lw)
<> concatMapPic drawRadarSweep (_radarSweeps lw)
<> concatMapPic drawFlame (_flames lw)
<> concatMapPic drawEnergyBall (_energyBalls lw)
<> concatMapPic drawSpark (_sparks lw)
<> concatMapPic drawBul (_bullets lw)
<> concatMapPic drawBlip (_radarBlips lw)
<> concatMapPic drawFlare (_flares lw)
<> concatMapPic (dbArg (drawBeam . _bmDraw)) (_positronBeams $ _beams lw)
<> concatMapPic (dbArg (drawBeam . _bmDraw)) (_electronBeams $ _beams lw)
<> concatMapPic (dbArg (drawLightSource . _lsPict)) (_lightSources lw)
<> foldMap drawTractorBeam (_tractorBeams lw)
<> foldMap drawLinearShockwave (_linearShockwaves lw)
<> foldMap drawShockwave (_shockwaves lw)
<> foldMap drawLaser (_lasersToDraw lw)
<> foldMap drawTeslaArc (_teslaArcs lw)
<> foldMap drawRadarSweep (_radarSweeps lw)
<> foldMap drawFlame (_flames lw)
<> foldMap drawEnergyBall (_energyBalls lw)
<> foldMap drawSpark (_sparks lw)
<> foldMap drawBul (_bullets lw)
<> foldMap drawBlip (_radarBlips lw)
<> foldMap drawFlare (_flares lw)
<> foldMap (dbArg (drawBeam . _bmDraw)) (_positronBeams $ _beams lw)
<> foldMap (dbArg (drawBeam . _bmDraw)) (_electronBeams $ _beams lw)
<> foldMap (dbArg (drawLightSource . _lsPict)) (_lightSources lw)
<> testPic cfig w
<> concatMapPic ppDraw (_pressPlates lw)
<> foldMap ppDraw (_pressPlates lw)
<> viewClipBounds cfig w
<> debugDraw cfig w
<> foldMap (`_debugPic` u) (_uvDebug u)