From c56e53d33fdd3d75a5875932c67f93f749083604 Mon Sep 17 00:00:00 2001 From: justin Date: Sat, 25 Jun 2022 18:57:50 +0100 Subject: [PATCH] Commit before looking into pathfinding --- src/Shader/Poke.hs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Shader/Poke.hs b/src/Shader/Poke.hs index ae3341c05..c06e56e14 100644 --- a/src/Shader/Poke.hs +++ b/src/Shader/Poke.hs @@ -89,12 +89,12 @@ pokeShape -> IO () pokeShape ptr iptr ieptr counts = VS.mapM_ (pokeShapeObj ptr iptr ieptr counts) . VS.fromList -pokeShapeObj +pokeShapeObj :: Ptr Float -> Ptr GLushort -> Ptr GLushort -> UMV.MVector (PrimState IO) Int - -> ShapeObj + -> ShapeObj -> IO () pokeShapeObj ptr iptr ieptr counts (ShapeObj shType shVerts) = case shType of TopPrism size -> pokeTopPrism (size - 2) ptr iptr ieptr counts shVerts @@ -130,14 +130,12 @@ pokeTopPrismIndex nv iptr counts ioff = do UMV.unsafeModify counts (+1) 1 memoTopPrismEdgeIndices :: V.Vector (UV.Vector Int) -memoTopPrismEdgeIndices = V.generate 10 f - where - f n = UV.fromList $ topPrismEdgeIndices (n + 2) +memoTopPrismEdgeIndices = V.generate 10 + $ UV.fromList . topPrismEdgeIndices . (+ 2) memoTopPrismIndices :: V.Vector (UV.Vector Int) -memoTopPrismIndices = V.generate 10 f - where - f n = UV.fromList $ topPrismIndices (n + 2) +memoTopPrismIndices = V.generate 10 + $ UV.fromList . topPrismIndices . (+ 2) topPrismEdgeIndices :: Int -> [Int] topPrismEdgeIndices n = concatMap f [0..n-1]