Increase number of drawable elements
This commit is contained in:
@@ -41,7 +41,6 @@ import qualified Data.Set as Set
|
|||||||
import Padding
|
import Padding
|
||||||
--import Data.Foldable
|
--import Data.Foldable
|
||||||
|
|
||||||
-- TODO only filter out shapes outside the range of the furthest shown light source
|
|
||||||
worldSPic :: Configuration -> World -> Stream (Of SPic) IO ()
|
worldSPic :: Configuration -> World -> Stream (Of SPic) IO ()
|
||||||
worldSPic cfig w
|
worldSPic cfig w
|
||||||
= (S.yield (mempty, extraPics cfig w) )
|
= (S.yield (mempty, extraPics cfig w) )
|
||||||
@@ -49,13 +48,14 @@ worldSPic cfig w
|
|||||||
<> (S.each $ fmap (shiftDraw _blPos _blDir _blDraw) (filtOn _blPos _blocks) )
|
<> (S.each $ fmap (shiftDraw _blPos _blDir _blDraw) (filtOn _blPos _blocks) )
|
||||||
<> (S.each $ fmap (shiftDraw _fsPos _fsDir (const _fsSPic)) (filtOn _fsPos _shapes) )
|
<> (S.each $ fmap (shiftDraw _fsPos _fsDir (const _fsSPic)) (filtOn _fsPos _shapes) )
|
||||||
<> (S.each $ fmap (dbArg _cpPict) (filtOn _cpPos _corpses) )
|
<> (S.each $ fmap (dbArg _cpPict) (filtOn _cpPos _corpses) )
|
||||||
<> (S.each $ fmap (dbArg _crPict) (filtOn _crPos _creatures) )
|
<> (S.map (dbArg _crPict) (filtOn' _crPos _creatures) )
|
||||||
<> (S.each $ fmap floorItemSPic (filtOn _flItPos _floorItems) )
|
<> (S.each $ fmap floorItemSPic (filtOn _flItPos _floorItems) )
|
||||||
<> (S.each $ fmap btSPic (filtOn _btPos _buttons) )
|
<> (S.each $ fmap btSPic (filtOn _btPos _buttons) )
|
||||||
<> (S.each $ fmap mcSPic (filtOn _mcPos _machines) )
|
<> (S.each $ fmap mcSPic (filtOn _mcPos _machines) )
|
||||||
<> S.yield (anyTargeting cfig w )
|
<> S.yield (anyTargeting cfig w )
|
||||||
where
|
where
|
||||||
filtOn f g = IM.filter (pointIsClose . f) (g w)
|
filtOn f g = IM.filter (pointIsClose . f) (g w)
|
||||||
|
filtOn' f g = S.filter (pointIsClose . f) $ S.each (g w)
|
||||||
pointIsClose = cullPoint cfig w
|
pointIsClose = cullPoint cfig w
|
||||||
|
|
||||||
anyTargeting :: Configuration -> World -> SPic
|
anyTargeting :: Configuration -> World -> SPic
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ glushortSize = sizeOf (0 :: GLushort)
|
|||||||
|
|
||||||
numDrawableElements :: Int
|
numDrawableElements :: Int
|
||||||
{-# INLINE numDrawableElements #-}
|
{-# INLINE numDrawableElements #-}
|
||||||
numDrawableElements = 60000
|
numDrawableElements = 6 * numSubElements
|
||||||
|
|
||||||
numSubElements :: Int
|
numSubElements :: Int
|
||||||
{-# INLINE numSubElements #-}
|
{-# INLINE numSubElements #-}
|
||||||
numSubElements = 10000
|
numSubElements = 100000
|
||||||
|
|||||||
Reference in New Issue
Block a user