(broken) commit

This commit is contained in:
2023-03-27 10:25:21 +01:00
parent 7a36b69818
commit 2c13f52ce8
6 changed files with 378 additions and 307 deletions
+3 -5
View File
@@ -7,10 +7,10 @@ module Dodge.Base.Window (
screenBox,
) where
import Control.Lens
import Dodge.Data.Camera
import Dodge.Data.Config
import Geometry
import Control.Lens
-- | A box covering the screen in world coordinates
screenPolygon :: Configuration -> Camera -> [Point2]
@@ -45,8 +45,8 @@ screenPolygonBord xbord ybord cfig w = [tr, tl, bl, br]
bl = theTransform (V2 (- hw) (- hh))
halfWidth, halfHeight :: Configuration -> Float
halfWidth = (0.5 *) . windowXFloat
halfHeight = (0.5 *) . windowYFloat
halfWidth = (0.5 *) . windowXFloat
halfHeight = (0.5 *) . windowYFloat
-- | A box of the size of the screen in screen centered coordinates
screenBox :: Configuration -> [Point2]
@@ -54,5 +54,3 @@ screenBox w = rectNSWE hh (- hh) (- hw) hw
where
hw = halfWidth w
hh = halfHeight w