Hlinting
This commit is contained in:
@@ -154,11 +154,11 @@ createLightMap pdata rot zoom (tranx,trany) (winx,winy) wallPoints lightPoints
|
||||
-- bind buffer for floor light circle
|
||||
let lightPtr = (\(_,ptr,_) -> ptr) $ head
|
||||
$ _vaoBufferTargets $ _shaderVAO $ _lightSourceShader pdata
|
||||
(x',y') = zTran $ rotateV (0 - rot) $ (x,y) -.- (tranx,trany)
|
||||
(x',y') = zTran $ rotateV (negate rot) $ (x,y) -.- (tranx,trany)
|
||||
zTran (a,b) = (a*2*zoom / winx, b*2*zoom / winy)
|
||||
pokeFourOff lightPtr 0 (x',y',r,lum)
|
||||
-- stencil out walls
|
||||
colorMask $= (Color4 Disabled Disabled Disabled Disabled)
|
||||
colorMask $= Color4 Disabled Disabled Disabled Disabled
|
||||
clear [StencilBuffer]
|
||||
cullFace $= Just Back
|
||||
stencilOp $= (OpKeep,OpKeep,OpIncr)
|
||||
|
||||
+3
-2
@@ -8,6 +8,7 @@ import Geometry
|
||||
|
||||
import Data.Bifunctor
|
||||
import Data.List
|
||||
import Data.Maybe (isNothing)
|
||||
|
||||
-- todo: refactor out the layer check somehow
|
||||
-- consider generalising to alternative rather than using LTree
|
||||
@@ -48,14 +49,14 @@ picToLTree j (OverPic f f' r f'' (OverPic g g' s g'' pic))
|
||||
picToLTree j (OverPic f f' r f'' (Pictures ps))
|
||||
= LBranches (map (picToLTree j . OverPic f f' r f'') ps)
|
||||
picToLTree j (OverPic f f' r f'' pic)
|
||||
= (overPos f . overSca f' . overRot r . overCol f'') <$> picToLTree j pic
|
||||
= overPos f . overSca f' . overRot r . overCol f'' <$> picToLTree j pic
|
||||
picToLTree (Just j) (OnLayer i pic) | j == i = picToLTree Nothing pic
|
||||
| otherwise = LBranches []
|
||||
picToLTree Nothing (OnLayer _ pic) = picToLTree Nothing pic
|
||||
|
||||
filtB :: Maybe Int -> Int -> LTree RenderType -> LTree RenderType
|
||||
{-# INLINE filtB #-}
|
||||
filtB mx i t | Just i == mx || Nothing == mx = t
|
||||
filtB mx i t | Just i == mx || isNothing mx = t
|
||||
| otherwise = LBranches []
|
||||
|
||||
doubleLine :: [a] -> [a]
|
||||
|
||||
Reference in New Issue
Block a user