First commit on new machine, some hlinting
This commit is contained in:
+2
-2
@@ -81,7 +81,7 @@ executables:
|
|||||||
- -fno-state-hack
|
- -fno-state-hack
|
||||||
- -funfolding-use-threshold1000
|
- -funfolding-use-threshold1000
|
||||||
#- -funfolding-keeness-factor1000
|
#- -funfolding-keeness-factor1000
|
||||||
- -fllvm
|
# - -fllvm
|
||||||
- -optlo-O3
|
- -optlo-O3
|
||||||
- -Wall
|
- -Wall
|
||||||
#- -Wcompat
|
#- -Wcompat
|
||||||
@@ -121,7 +121,7 @@ benchmarks:
|
|||||||
- -fno-state-hack
|
- -fno-state-hack
|
||||||
- -funfolding-use-threshold1000
|
- -funfolding-use-threshold1000
|
||||||
# - -funfolding-keeness-factor1000
|
# - -funfolding-keeness-factor1000
|
||||||
- -fllvm
|
# - -fllvm
|
||||||
#- -optlo-O3
|
#- -optlo-O3
|
||||||
main: Bench.hs
|
main: Bench.hs
|
||||||
source-dirs: bench
|
source-dirs: bench
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ worldPosToResOffset cfig cam p =
|
|||||||
(worldPosToScreen cam p & each %~ f)
|
(worldPosToScreen cam p & each %~ f)
|
||||||
+ 0.5 *^ ((getWindowSize _gr_world_res cfig :: V2 Int) & each %~ fromIntegral)
|
+ 0.5 *^ ((getWindowSize _gr_world_res cfig :: V2 Int) & each %~ fromIntegral)
|
||||||
where
|
where
|
||||||
f x = applyResFactorF (cfig ^. gr_world_res) x
|
f = applyResFactorF (cfig ^. gr_world_res)
|
||||||
|
|
||||||
-- | The mouse position in world coordinates.
|
-- | The mouse position in world coordinates.
|
||||||
mouseWorldPos :: Input -> Camera -> Point2
|
mouseWorldPos :: Input -> Camera -> Point2
|
||||||
|
|||||||
@@ -214,8 +214,8 @@ drawPathBetween u = concat $ do
|
|||||||
color rose (foldMap (arrowPath . map nodepos) nodelist)
|
color rose (foldMap (arrowPath . map nodepos) nodelist)
|
||||||
<> drawCrossCol green sp
|
<> drawCrossCol green sp
|
||||||
<> drawCrossCol cyan ep
|
<> drawCrossCol cyan ep
|
||||||
<> foldMap (color green . arrow sp) (nodepos <$> walkableNodeNear w sp)
|
<> foldMap ((color green . arrow sp) . nodepos) (walkableNodeNear w sp)
|
||||||
<> foldMap (color cyan . flip arrow ep) (nodepos <$> walkableNodeNear w ep)
|
<> foldMap ((color cyan . flip arrow ep) . nodepos) (walkableNodeNear w ep)
|
||||||
<> foldMap (color orange . arrow sp) (pointTowardsImpulse sp ep w)
|
<> foldMap (color orange . arrow sp) (pointTowardsImpulse sp ep w)
|
||||||
where
|
where
|
||||||
w = u ^. uvWorld
|
w = u ^. uvWorld
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{-# LANGUAGE LambdaCase #-}
|
{-# LANGUAGE LambdaCase #-}
|
||||||
|
{-# LANGUAGE TupleSections #-}
|
||||||
|
|
||||||
module Dodge.Item.AmmoSlots (
|
module Dodge.Item.AmmoSlots (
|
||||||
itemAmmoSlots,
|
itemAmmoSlots,
|
||||||
@@ -29,14 +30,15 @@ heldItemAmmoSlots = \case
|
|||||||
RIFLE -> singleAmmo BulletAmmo
|
RIFLE -> singleAmmo BulletAmmo
|
||||||
AUTORIFLE -> singleAmmo BulletAmmo
|
AUTORIFLE -> singleAmmo BulletAmmo
|
||||||
BURSTRIFLE -> singleAmmo BulletAmmo
|
BURSTRIFLE -> singleAmmo BulletAmmo
|
||||||
ALTERIFLE -> IM.fromList (zip [0..1] $ repeat BulletAmmo)
|
--ALTERIFLE -> IM.fromList (zip [0..1] $ repeat BulletAmmo)
|
||||||
|
ALTERIFLE -> IM.fromList $ [0..1] <&> (,BulletAmmo)
|
||||||
BANGROD -> singleAmmo BulletAmmo
|
BANGROD -> singleAmmo BulletAmmo
|
||||||
ELEPHANTGUN -> singleAmmo BulletAmmo
|
ELEPHANTGUN -> singleAmmo BulletAmmo
|
||||||
AMR -> singleAmmo BulletAmmo
|
AMR -> singleAmmo BulletAmmo
|
||||||
AUTOAMR -> singleAmmo BulletAmmo
|
AUTOAMR -> singleAmmo BulletAmmo
|
||||||
SNIPERRIFLE -> singleAmmo BulletAmmo
|
SNIPERRIFLE -> singleAmmo BulletAmmo
|
||||||
MINIGUNX _ -> singleAmmo BeltBulletAmmo
|
MINIGUNX _ -> singleAmmo BeltBulletAmmo
|
||||||
VOLLEYGUN i -> IM.fromList (zip [0..i-1] $ repeat BulletAmmo)
|
VOLLEYGUN i -> IM.fromList $ [0..i-1] <&> (,BulletAmmo)
|
||||||
POISONSPRAYER -> singleAmmo GasAmmo
|
POISONSPRAYER -> singleAmmo GasAmmo
|
||||||
FLAMETHROWER -> singleAmmo GasAmmo
|
FLAMETHROWER -> singleAmmo GasAmmo
|
||||||
FLAMETORRENT -> singleAmmo GasAmmo
|
FLAMETORRENT -> singleAmmo GasAmmo
|
||||||
|
|||||||
@@ -197,11 +197,12 @@ rightChildList t = foldl' f l (reverse $ t ^.. dtRight . each . dtValue . _2)
|
|||||||
leftRightCombine :: DTComb a -> DTComb a -> DTree a -> DTree a -> Maybe (DTree a)
|
leftRightCombine :: DTComb a -> DTComb a -> DTree a -> DTree a -> Maybe (DTree a)
|
||||||
leftRightCombine f f' t1 t2 = f t1 t2 <|> checkdepth t1 t2
|
leftRightCombine f f' t1 t2 = f t1 t2 <|> checkdepth t1 t2
|
||||||
where
|
where
|
||||||
checkdepth t t'@(DT x ls rs) = fromMaybe (checktop t t') $ do
|
--checkdepth t t'@(DT x ls rs) = fromMaybe (checktop t t') $ do
|
||||||
|
checkdepth t t'@(DT x ls rs) = fromMaybe (f' t t') $ do
|
||||||
t'' <- safeHead ls
|
t'' <- safeHead ls
|
||||||
tx <- checkdepth t t''
|
tx <- checkdepth t t''
|
||||||
return $ Just $ DT x (tx : tail ls) rs
|
return $ Just $ DT x (tx : tail ls) rs
|
||||||
checktop t t' = f' t t'
|
--checktop t t' = f' t t'
|
||||||
|
|
||||||
joinItemsInList :: (a -> a -> Maybe a) -> [a] -> [a]
|
joinItemsInList :: (a -> a -> Maybe a) -> [a] -> [a]
|
||||||
joinItemsInList f = fst . h . ([],)
|
joinItemsInList f = fst . h . ([],)
|
||||||
|
|||||||
+1
-1
@@ -385,7 +385,7 @@ doDrawing' win pdata u = do
|
|||||||
-- glBindTextureUnit 0 $ pdata ^. fboBase . _2 . _1 . unTO
|
-- glBindTextureUnit 0 $ pdata ^. fboBase . _2 . _1 . unTO
|
||||||
glBindTextureUnit 0 $ pdata ^. fboFullscreen . _2 . unTO
|
glBindTextureUnit 0 $ pdata ^. fboFullscreen . _2 . unTO
|
||||||
glBindFramebuffer GL_FRAMEBUFFER 0
|
glBindFramebuffer GL_FRAMEBUFFER 0
|
||||||
if (cfig ^. gr_upscale_filter) then do
|
if cfig ^. gr_upscale_filter then do
|
||||||
glUseProgram (pdata ^. textureAntiaShader)
|
glUseProgram (pdata ^. textureAntiaShader)
|
||||||
glGenerateTextureMipmap (pdata ^. fboBase . _2 . _1 . unTO)
|
glGenerateTextureMipmap (pdata ^. fboBase . _2 . _1 . unTO)
|
||||||
glUniform2f 0 (windowXFloat cfig) (windowYFloat cfig)
|
glUniform2f 0 (windowXFloat cfig) (windowYFloat cfig)
|
||||||
|
|||||||
+1
-1
@@ -128,7 +128,7 @@ helpPoly3D = picFormat . map f . polyToTris
|
|||||||
f (pos,col) = Verx pos col [] minBound PolyShad
|
f (pos,col) = Verx pos col [] minBound PolyShad
|
||||||
|
|
||||||
polysToPic :: [Polyhedra] -> Picture
|
polysToPic :: [Polyhedra] -> Picture
|
||||||
polysToPic = fold . concatMap polyToPics
|
polysToPic = foldMap (fold . polyToPics)
|
||||||
|
|
||||||
polyToEdges :: Polyhedra -> [(Point3,Point3,Point3,Point3)]
|
polyToEdges :: Polyhedra -> [(Point3,Point3,Point3,Point3)]
|
||||||
polyToEdges = map denormalEdges . constructEdges . map (map fst) . _pyFaces
|
polyToEdges = map denormalEdges . constructEdges . map (map fst) . _pyFaces
|
||||||
|
|||||||
Reference in New Issue
Block a user