Refactor, try to limit dependencies

This commit is contained in:
2022-07-28 00:59:56 +01:00
parent 8aa5c17ab9
commit 160560af5f
418 changed files with 15104 additions and 13342 deletions
+10 -8
View File
@@ -1,20 +1,22 @@
module Dodge.RadarBlip where
import Dodge.Data.RadarBlip
import Geometry.Data
import LensHelp
import Picture
updateRadarBlip :: RadarBlip -> Maybe RadarBlip
updateRadarBlip rb
| _rbTime rb <= 0 = Nothing
| otherwise = Just $ rb & rbTime -~ 1
updateRadarBlip rb
| _rbTime rb <= 0 = Nothing
| otherwise = Just $ rb & rbTime -~ 1
drawBlip :: RadarBlip -> Picture
drawBlip pt = setDepth (-0.5)
. setLayer DebugLayer
. uncurryV translate p
. color (withAlpha (fromIntegral t / fromIntegral maxt) col)
$ circleSolid r
drawBlip pt =
setDepth (-0.5)
. setLayer DebugLayer
. uncurryV translate p
. color (withAlpha (fromIntegral t / fromIntegral maxt) col)
$ circleSolid r
where
p = _rbPos pt
t = _rbTime pt