Broken commit (removed loadKeyConfig)
This commit is contained in:
@@ -1,7 +1,22 @@
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
module Dodge.LevelGen.Data
|
||||
where
|
||||
( PSType (..)
|
||||
, PlacementSpot (..)
|
||||
, Placement (..)
|
||||
, sPS
|
||||
-- lenses
|
||||
, placementSpot
|
||||
, psType
|
||||
, psPos
|
||||
, psRot
|
||||
, putID
|
||||
, pwPoly
|
||||
, pwWall
|
||||
, unPutCrit
|
||||
, groupPlacementID
|
||||
, groupUpdate
|
||||
) where
|
||||
import Dodge.Data
|
||||
import Picture
|
||||
import Polyhedra.Data
|
||||
@@ -36,9 +51,7 @@ data Placement
|
||||
= SinglePlacement {_placementSpot :: PlacementSpot }
|
||||
| GroupedPlacement
|
||||
{_groupPlacementID :: Int
|
||||
-- ,_groupPlacementUpdate :: World -> Placement -> (World, Placement)
|
||||
,_groupUpdate :: World -> [Placement] -> World
|
||||
-- ,_groupPlacementFunc :: [PSType] -> PSType -> World -> World
|
||||
,_placementSpot :: PlacementSpot
|
||||
}
|
||||
sPS :: Point2 -> Float -> PSType -> Placement
|
||||
|
||||
@@ -65,7 +65,7 @@ addSoundToDoor i pld hwd (x:ys) = f x : ys
|
||||
where
|
||||
g dm w
|
||||
| dist wp pld > 2 && dist wp hwd > 2
|
||||
= soundFrom (WallSound i) (fromIntegral doorSound) 1 0 $ dm w
|
||||
= soundFrom (WallSound i) doorSound 1 0 $ dm w
|
||||
| otherwise = dm w
|
||||
where
|
||||
wp = snd $ _wlLine (_walls w IM.! i)
|
||||
|
||||
@@ -12,7 +12,7 @@ import qualified Data.IntMap.Strict as IM
|
||||
import Data.Graph.Inductive hiding ((&))
|
||||
--import Data.Graph.Inductive.NodeMap
|
||||
|
||||
pairsToGraph :: (Ord a, Eq a, Eq b) => (a -> a -> b) -> [(a,a)] -> Gr a b
|
||||
pairsToGraph :: (Ord a, Eq b) => (a -> a -> b) -> [(a,a)] -> Gr a b
|
||||
pairsToGraph f pairs =
|
||||
let nodes' = nub (map fst pairs ++ map snd pairs)
|
||||
pairs' = map (\(x,y)->(x,y,f x y)) pairs
|
||||
|
||||
Reference in New Issue
Block a user