Add tilemap floors to rooms

This commit is contained in:
2021-06-15 14:56:32 +02:00
parent 73bd407c49
commit da631e3b37
31 changed files with 181 additions and 66 deletions
+1 -5
View File
@@ -5,6 +5,7 @@ module Picture.Tree
where
import Picture.Data
import Geometry
import Geometry.Data
import Data.Bifunctor
import Data.List
@@ -68,11 +69,6 @@ white, black :: Color
white = (1,1,1,1)
black = (0,0,0,1)
polyToTris :: [s] -> [s]
{-# INLINE polyToTris #-}
polyToTris (a:b:c:as) = a : intercalate [a] (zipWith (\x y->[x,y]) (init (b:c:as)) (c:as))
polyToTris _ = []
scaleT :: (Float,Float) -> (Point3,Point4,Point3) -> (Point3,Point4,Point3)
{-# INLINE scaleT #-}
scaleT (x,y) (a,b,(o,s,t)) = (a,b,(o,s*x,t*y))