Add slime crit, start work on slink crit
This commit is contained in:
+16
-7
@@ -133,11 +133,12 @@ pokeShapeObj ::
|
||||
IO (Int, Int, Int)
|
||||
{-# INLINE pokeShapeObj #-}
|
||||
pokeShapeObj shadowtest ptr iptr ieptr counts surf@(Surface shtype shVerts col _ _) = case shtype of
|
||||
FlatFaces size -> pokeBox blockshadows col size ptr iptr ieptr counts shVerts
|
||||
RoundedFaces size -> pokeRoundedFaces blockshadows col size ptr iptr ieptr counts shVerts
|
||||
Cylinder size -> pokeCylinder blockshadows col size ptr iptr ieptr counts shVerts
|
||||
FlatFaces size -> pokeBox t col size ptr iptr ieptr counts shVerts
|
||||
RoundedFaces size -> pokeRoundedFaces t col size ptr iptr ieptr counts shVerts
|
||||
Cylinder size -> pokeCylinder t col size ptr iptr ieptr counts shVerts
|
||||
Cone n -> pokeCone t col n ptr iptr ieptr counts shVerts
|
||||
where
|
||||
blockshadows = shadowtest surf
|
||||
t = shadowtest surf
|
||||
|
||||
pokeRoundedFaces ::
|
||||
Bool ->
|
||||
@@ -167,7 +168,7 @@ pokeRoundedFaces sfid col size ptr iptr ieptr (nv, nsi, nei) (tc : bc : svs) = d
|
||||
where
|
||||
xdata
|
||||
| sfid = 0 -- this records whether the shadow should be shown or not
|
||||
-- honestly, I think things where faster without this
|
||||
-- honestly, I think things were faster without this
|
||||
| otherwise = 1
|
||||
pokeRoundedFaces _ _ _ _ _ _ _ _ = undefined
|
||||
|
||||
@@ -211,11 +212,19 @@ pokeRoundedCurve xdata col ptr tc bc = go True
|
||||
go False (x : xs) n = pokeJustV xdata bc col ptr n x >>= go True xs
|
||||
go _ [] n = return n
|
||||
|
||||
pokeCone :: Bool -> Color -> Int -> Ptr Float -> Ptr GLuint -> Ptr GLuint
|
||||
-> (Int,Int,Int) -> [Point3] -> IO (Int,Int,Int)
|
||||
pokeCone t c n ptr iptr ieptr (nv,nsi,nei) (p:ps) = do
|
||||
nv' <- undefined t c n ptr iptr ieptr (nv,nsi,nei) (p:ps)
|
||||
nsi' <- undefined
|
||||
nei' <- undefined
|
||||
return (nv', nsi', nei')
|
||||
pokeCone _ _ _ _ _ _ _ _ = undefined
|
||||
|
||||
-- I am not completely sure the normals are correct here
|
||||
-- they assume that we do actually have a cylinder, with normals for the caps
|
||||
-- that can be determined by the first two vertices
|
||||
pokeCylinderCaps :: Float -> Point4 -> Ptr Float -> [Point3] -> Int
|
||||
-> IO Int
|
||||
pokeCylinderCaps :: Float -> Point4 -> Ptr Float -> [Point3] -> Int -> IO Int
|
||||
{-# INLINE pokeCylinderCaps #-}
|
||||
pokeCylinderCaps xdata col ptr (a:b:as) = go True (a:b:as)
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user