Remove RenderType datatype
This commit is contained in:
@@ -9,7 +9,7 @@ import Dodge.Picture.Layer
|
||||
import Dodge.Render.HUD
|
||||
import Dodge.Render.MenuScreen
|
||||
import Geometry
|
||||
import Geometry.Data
|
||||
--import Geometry.Data
|
||||
import Picture
|
||||
import Polyhedra.Data
|
||||
|
||||
@@ -19,8 +19,6 @@ import Control.Lens
|
||||
import Data.Maybe
|
||||
import Data.List (partition)
|
||||
import qualified Data.IntMap.Lazy as IM
|
||||
import Foreign.Ptr
|
||||
import Foreign.Storable
|
||||
|
||||
worldPictures :: World -> Picture
|
||||
worldPictures w =
|
||||
@@ -215,23 +213,6 @@ wallsToList :: [((Point2,Point2),Point4)] -> [Float]
|
||||
wallsToList = concatMap (\(((V2 a b),(V2 c d)),(V4 e f g h)) -> [a,b,c,d,e,f,g,h])
|
||||
|
||||
|
||||
pokeWalls :: Ptr Float -> [((Point2,Point2),Point4)] -> IO Int
|
||||
pokeWalls ptr vals0 = go vals0 0
|
||||
where
|
||||
go [] n = return n
|
||||
go ( (((V2 a b),(V2 c d)),(V4 e f g h)):vals) n = do
|
||||
pokeElemOff ptr (off 0) a
|
||||
pokeElemOff ptr (off 1) b
|
||||
pokeElemOff ptr (off 2) c
|
||||
pokeElemOff ptr (off 3) d
|
||||
pokeElemOff ptr (off 4) e
|
||||
pokeElemOff ptr (off 5) f
|
||||
pokeElemOff ptr (off 6) g
|
||||
pokeElemOff ptr (off 7) h
|
||||
go vals (n+1)
|
||||
where
|
||||
off i = n*8 + i
|
||||
|
||||
lightsForGloom :: World -> [(Point3,Float,Float)]
|
||||
lightsForGloom w = map getLS (IM.elems $ _lightSources w) ++ map getTLS (_tempLightSources w)
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user