Remove RenderType datatype
This commit is contained in:
+1
-1
@@ -65,7 +65,7 @@ data World = World
|
||||
, _wallsZone :: IM.IntMap (IM.IntMap (IM.IntMap Wall))
|
||||
, _forceFields :: IM.IntMap ForceField
|
||||
, _floorItems :: IM.IntMap FloorItem
|
||||
, _floorTiles :: [RenderType]
|
||||
, _floorTiles :: [(Point3,Point3)]
|
||||
, _randGen :: StdGen
|
||||
, _mousePos :: !Point2
|
||||
, _testString :: String
|
||||
|
||||
+1
-1
@@ -123,7 +123,7 @@ wallsFromRooms =
|
||||
where
|
||||
f i (x,y) = defaultWall {_wlLine = (x,y) , _wlID = i}
|
||||
|
||||
floorsFromRooms :: [Room] -> [RenderType]
|
||||
floorsFromRooms :: [Room] -> [(Point3,Point3)]
|
||||
floorsFromRooms = concatMap (concatMap tToRender . _rmFloor)
|
||||
|
||||
divideWall :: Wall -> [Wall]
|
||||
|
||||
@@ -9,7 +9,7 @@ import Dodge.Room.Data
|
||||
import Dodge.Room.Link
|
||||
import Dodge.Layout.Tree.Polymorphic
|
||||
import Geometry
|
||||
import Geometry.Data
|
||||
--import Geometry.Data
|
||||
|
||||
import Data.Tree
|
||||
import Data.Sequence hiding (zipWith)
|
||||
|
||||
@@ -19,7 +19,7 @@ import Dodge.LevelGen.TriggerDoor
|
||||
import Dodge.LevelGen.Switch
|
||||
import Dodge.LevelGen.Data
|
||||
import Geometry
|
||||
import Geometry.Data
|
||||
--import Geometry.Data
|
||||
import Picture
|
||||
import Polyhedra
|
||||
import qualified IntMapHelp as IM
|
||||
|
||||
@@ -6,7 +6,7 @@ module Dodge.LevelGen.StaticWalls
|
||||
where
|
||||
import Dodge.Data
|
||||
import Geometry
|
||||
import Geometry.Data
|
||||
--import Geometry.Data
|
||||
import FoldableHelp
|
||||
|
||||
--import Control.Lens
|
||||
|
||||
@@ -5,7 +5,7 @@ import Dodge.SoundLogic
|
||||
import Dodge.Picture.Layer
|
||||
import Picture
|
||||
import Geometry
|
||||
import Geometry.Data
|
||||
--import Geometry.Data
|
||||
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
import Control.Lens
|
||||
|
||||
@@ -5,7 +5,7 @@ module Dodge.Picture
|
||||
where
|
||||
import Geometry
|
||||
import Geometry.Vector3D
|
||||
import Geometry.Data
|
||||
--import Geometry.Data
|
||||
import Picture
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Helpers for random generation.
|
||||
module Dodge.RandomHelp where
|
||||
import Geometry
|
||||
import Geometry.Vector3D
|
||||
import Geometry.Data
|
||||
--import Geometry.Data
|
||||
|
||||
import System.Random
|
||||
import Control.Monad.State
|
||||
|
||||
+2
-3
@@ -12,11 +12,10 @@ import Dodge.Base.Window
|
||||
import Dodge.Render.Picture
|
||||
--import Dodge.Render.PerspectiveMatrix
|
||||
import Geometry
|
||||
import Geometry.Data
|
||||
--import Geometry.Data
|
||||
--import Picture
|
||||
import Render
|
||||
import Data.Preload.Render
|
||||
import Picture.Data
|
||||
import Shader
|
||||
import Shader.Poke
|
||||
import Shader.Data
|
||||
@@ -90,7 +89,7 @@ doDrawing pdata w = do
|
||||
let shads = _pictureShaders pdata
|
||||
renderLayer 0 shads vnums
|
||||
|
||||
nTextArrayVs <- pokePoint33s (shadVBOptr $ _textureArrayShader pdata) (map _unRender3x3 $ _floorTiles w)
|
||||
nTextArrayVs <- pokePoint33s (shadVBOptr $ _textureArrayShader pdata) (_floorTiles w)
|
||||
bindShaderBuffers [_textureArrayShader pdata] [nTextArrayVs]
|
||||
drawShader (_textureArrayShader pdata) nTextArrayVs
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import Dodge.Config.Data
|
||||
--import Dodge.Base (halfWidth,halfHeight)
|
||||
import Picture
|
||||
import Geometry
|
||||
import Geometry.Data
|
||||
--import Geometry.Data
|
||||
|
||||
menuScreen
|
||||
:: Configuration
|
||||
|
||||
@@ -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
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ import Dodge.Room.Door
|
||||
import Dodge.Room.Airlock
|
||||
import Dodge.Room.LongDoor
|
||||
import Geometry
|
||||
import Geometry.Data
|
||||
--import Geometry.Data
|
||||
import Picture
|
||||
import Tile
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ module Dodge.Room.Corridor
|
||||
import Dodge.Room.Data
|
||||
import Dodge.Default.Room
|
||||
import Geometry
|
||||
import Geometry.Data
|
||||
--import Geometry.Data
|
||||
import Tile
|
||||
|
||||
import Data.Bifunctor
|
||||
|
||||
@@ -5,7 +5,7 @@ import Dodge.Picture
|
||||
import Dodge.Base
|
||||
import Picture
|
||||
import Geometry
|
||||
import Geometry.Data
|
||||
--import Geometry.Data
|
||||
import Geometry.Vector3D
|
||||
import Polyhedra
|
||||
import Polyhedra.Data
|
||||
|
||||
@@ -12,7 +12,7 @@ import Dodge.LevelGen.Data
|
||||
import Dodge.Room.Data
|
||||
import Dodge.RandomHelp
|
||||
import Geometry
|
||||
import Geometry.Data
|
||||
--import Geometry.Data
|
||||
import Data.Tile
|
||||
|
||||
import System.Random
|
||||
|
||||
Reference in New Issue
Block a user