Add tilemap floors to rooms
This commit is contained in:
@@ -4,14 +4,14 @@ Rendering of a picture.
|
||||
-}
|
||||
module Picture.Render
|
||||
where
|
||||
|
||||
import Shader
|
||||
import Shader.Data
|
||||
import Shader.Poke
|
||||
--import MatrixHelper
|
||||
import Data.Preload.Render
|
||||
import Picture.Data
|
||||
import Geometry
|
||||
--import Geometry
|
||||
import Geometry.Data
|
||||
|
||||
--import Control.Lens
|
||||
import Control.Monad
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
module Picture.Texture
|
||||
where
|
||||
import Geometry.Data
|
||||
--import Geometry
|
||||
import Picture.Data
|
||||
--import Data.Tile
|
||||
|
||||
tileToRender :: [Point3] -> [Point3] -> [RenderType]
|
||||
tileToRender [a,b,c,d] [x,y,z,w] =
|
||||
@@ -13,3 +15,4 @@ tileToRender [a,b,c,d] [x,y,z,w] =
|
||||
, Render3x3 (w,d)
|
||||
]
|
||||
tileToRender _ _ = undefined
|
||||
|
||||
|
||||
+1
-5
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user