Correctly reduce left click item delay
This commit is contained in:
+2
-45
@@ -1,11 +1,8 @@
|
||||
module Shader.Poke
|
||||
( pokeVerxs
|
||||
-- , pokeSPics
|
||||
, pokeLayVerxs
|
||||
, pokeArrayOff
|
||||
-- , pokePoint33s
|
||||
-- , pokeShape
|
||||
, pokeShape'
|
||||
, pokeShape
|
||||
, pokeWallsWindowsFloor
|
||||
) where
|
||||
import Shader.Data
|
||||
@@ -54,11 +51,8 @@ pokeWallsWindowsFloor
|
||||
-> [ ( Point3 , Point3 ) ]
|
||||
-> IO (Int,Int,Int)
|
||||
pokeWallsWindowsFloor wlptr wiptr flptr wls wis fls = do
|
||||
--wlcounts1 <- S.foldM_ (pokeW wlptr) (return 0) return (S.each wls)
|
||||
wlcounts1 <- VFSM.foldlM' (pokeW wlptr) 0 (VFSM.fromList wls)
|
||||
--wlcounts2 <- S.foldM_ (pokeW wiptr) (return 0) return (S.each wis)
|
||||
wlcounts2 <- VFSM.foldlM' (pokeW wiptr) 0 (VFSM.fromList wis)
|
||||
--flcounts <- S.foldM_ (pokeF flptr) (return 0) return (S.each fls)
|
||||
flcounts <- VFSM.foldlM' (pokeF flptr) 0 (VFSM.fromList fls)
|
||||
return (wlcounts1,wlcounts2,flcounts)
|
||||
|
||||
@@ -86,33 +80,11 @@ pokeW ptr i' ((V2 a b,V2 c d),V4 e f g h) = do
|
||||
pokeElemOff ptr (i + 7) h
|
||||
return $ i' + 1
|
||||
|
||||
--pokeSPics
|
||||
-- :: MV.MVector (PrimState IO) FullShader
|
||||
-- -> UMV.MVector (PrimState IO) Int
|
||||
-- -> Ptr Float -> Ptr GLushort -> Ptr GLushort
|
||||
-- -> Stream (Of SPic) IO ()
|
||||
-- -> IO (Int,Int,Int)
|
||||
--pokeSPics vbos counts ptr iptr ieptr =
|
||||
-- S.foldM_ (\is (sh,pic) -> pokeLayVerxs vbos counts pic >> pokeShape' ptr iptr ieptr is sh)
|
||||
-- (return (0,0,0)) return
|
||||
|
||||
|
||||
pokeShape :: Ptr Float -> Ptr GLushort -> Ptr GLushort
|
||||
-> VFSM.Stream IO ShapeObj
|
||||
-> IO (Int,Int,Int)
|
||||
pokeShape ptr iptr ieptr = VFSM.foldlM' (pokeShapeObj ptr iptr ieptr) (0,0,0)
|
||||
|
||||
--pokeShape' :: Ptr Float -> Ptr GLushort -> Ptr GLushort
|
||||
-- -> (Int,Int,Int)
|
||||
-- -> Stream (Of ShapeObj) IO ()
|
||||
-- -> IO (Int,Int,Int)
|
||||
--pokeShape' ptr iptr ieptr is = S.foldM_ (pokeShapeObj ptr iptr ieptr) (return is) return
|
||||
--
|
||||
pokeShape' :: Ptr Float -> Ptr GLushort -> Ptr GLushort
|
||||
-> (Int,Int,Int)
|
||||
-> [ShapeObj]
|
||||
-> IO (Int,Int,Int)
|
||||
pokeShape' ptr iptr ieptr is = VFSM.foldlM' (pokeShapeObj ptr iptr ieptr) is . VFSM.fromList
|
||||
pokeShape ptr iptr ieptr is = VFSM.foldlM' (pokeShapeObj ptr iptr ieptr) is . VFSM.fromList
|
||||
|
||||
pokeShapeObj
|
||||
:: Ptr Float
|
||||
@@ -260,18 +232,3 @@ poke34 ptr (V3 a b c) (V4 d e f g) = do
|
||||
pokeArrayOff :: Ptr Float -> Int -> [Float] -> IO ()
|
||||
{-# INLINE pokeArrayOff #-}
|
||||
pokeArrayOff ptr i = pokeArray (plusPtr ptr (floatSize * i))
|
||||
|
||||
--pokePoint33s :: Ptr Float -> [(Point3,Point3)] -> IO Int
|
||||
--pokePoint33s ptr = S.foldM_ (pokePoint33 ptr) (return 0) return . S.each
|
||||
|
||||
--pokePoint33 :: Ptr Float -> Int -> (Point3,Point3) -> IO Int
|
||||
--pokePoint33 ptr n (V3 a b c,V3 d e f) = do
|
||||
-- pokeElemOff ptr (off 0) a
|
||||
-- pokeElemOff ptr (off 1) b
|
||||
-- pokeElemOff ptr (off 2) c
|
||||
-- pokeElemOff ptr (off 3) d
|
||||
-- pokeElemOff ptr (off 4) e
|
||||
-- pokeElemOff ptr (off 5) f
|
||||
-- return (n+1)
|
||||
-- where
|
||||
-- off i = n*6 + i
|
||||
|
||||
Reference in New Issue
Block a user