Increase number of drawable elements

This commit is contained in:
2022-07-04 20:50:01 +01:00
parent 6972256751
commit 914c452afb
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -41,7 +41,6 @@ import qualified Data.Set as Set
import Padding
--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 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 _fsPos _fsDir (const _fsSPic)) (filtOn _fsPos _shapes) )
<> (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 btSPic (filtOn _btPos _buttons) )
<> (S.each $ fmap mcSPic (filtOn _mcPos _machines) )
<> S.yield (anyTargeting cfig w )
where
filtOn f g = IM.filter (pointIsClose . f) (g w)
filtOn' f g = S.filter (pointIsClose . f) $ S.each (g w)
pointIsClose = cullPoint cfig w
anyTargeting :: Configuration -> World -> SPic
+2 -2
View File
@@ -21,8 +21,8 @@ glushortSize = sizeOf (0 :: GLushort)
numDrawableElements :: Int
{-# INLINE numDrawableElements #-}
numDrawableElements = 60000
numDrawableElements = 6 * numSubElements
numSubElements :: Int
{-# INLINE numSubElements #-}
numSubElements = 10000
numSubElements = 100000