Partially working ellipse shader
This commit is contained in:
@@ -21,6 +21,20 @@ import qualified Data.Set as S
|
||||
|
||||
-- }}}
|
||||
--
|
||||
leftPad :: Int -> a -> [a] -> [a]
|
||||
leftPad i x xs = reverse $ take i $ reverse xs ++ repeat x
|
||||
|
||||
rightPad :: Int -> a -> [a] -> [a]
|
||||
rightPad i x xs = take i $ xs ++ repeat x
|
||||
|
||||
midPad :: Int -> a -> [a] -> [a] -> [a]
|
||||
midPad i x xs ys = xs ++ replicate j x ++ ys
|
||||
where j = i - (length xs + length ys)
|
||||
|
||||
midPadL :: Int -> a -> [a] -> [a] -> [a]
|
||||
midPadL i x xs ys = take j (xs ++ repeat x) ++ ys
|
||||
where j = i - length ys
|
||||
|
||||
you :: World -> Creature
|
||||
you w = _creatures w IM.! _yourID w
|
||||
|
||||
|
||||
Reference in New Issue
Block a user