First commit on new machine, some hlinting

This commit is contained in:
2025-12-21 18:43:52 +00:00
parent eac80d2b43
commit 2fbaa47c0b
7 changed files with 14 additions and 11 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ worldPosToResOffset cfig cam p =
(worldPosToScreen cam p & each %~ f)
+ 0.5 *^ ((getWindowSize _gr_world_res cfig :: V2 Int) & each %~ fromIntegral)
where
f x = applyResFactorF (cfig ^. gr_world_res) x
f = applyResFactorF (cfig ^. gr_world_res)
-- | The mouse position in world coordinates.
mouseWorldPos :: Input -> Camera -> Point2
+2 -2
View File
@@ -214,8 +214,8 @@ drawPathBetween u = concat $ do
color rose (foldMap (arrowPath . map nodepos) nodelist)
<> drawCrossCol green sp
<> drawCrossCol cyan ep
<> foldMap (color green . arrow sp) (nodepos <$> walkableNodeNear w sp)
<> foldMap (color cyan . flip arrow ep) (nodepos <$> walkableNodeNear w ep)
<> foldMap ((color green . arrow sp) . nodepos) (walkableNodeNear w sp)
<> foldMap ((color cyan . flip arrow ep) . nodepos) (walkableNodeNear w ep)
<> foldMap (color orange . arrow sp) (pointTowardsImpulse sp ep w)
where
w = u ^. uvWorld
+4 -2
View File
@@ -1,4 +1,5 @@
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TupleSections #-}
module Dodge.Item.AmmoSlots (
itemAmmoSlots,
@@ -29,14 +30,15 @@ heldItemAmmoSlots = \case
RIFLE -> singleAmmo BulletAmmo
AUTORIFLE -> 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
ELEPHANTGUN -> singleAmmo BulletAmmo
AMR -> singleAmmo BulletAmmo
AUTOAMR -> singleAmmo BulletAmmo
SNIPERRIFLE -> singleAmmo BulletAmmo
MINIGUNX _ -> singleAmmo BeltBulletAmmo
VOLLEYGUN i -> IM.fromList (zip [0..i-1] $ repeat BulletAmmo)
VOLLEYGUN i -> IM.fromList $ [0..i-1] <&> (,BulletAmmo)
POISONSPRAYER -> singleAmmo GasAmmo
FLAMETHROWER -> singleAmmo GasAmmo
FLAMETORRENT -> singleAmmo GasAmmo
+3 -2
View File
@@ -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 f f' t1 t2 = f t1 t2 <|> checkdepth t1 t2
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
tx <- checkdepth t t''
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 f = fst . h . ([],)
+1 -1
View File
@@ -385,7 +385,7 @@ doDrawing' win pdata u = do
-- glBindTextureUnit 0 $ pdata ^. fboBase . _2 . _1 . unTO
glBindTextureUnit 0 $ pdata ^. fboFullscreen . _2 . unTO
glBindFramebuffer GL_FRAMEBUFFER 0
if (cfig ^. gr_upscale_filter) then do
if cfig ^. gr_upscale_filter then do
glUseProgram (pdata ^. textureAntiaShader)
glGenerateTextureMipmap (pdata ^. fboBase . _2 . _1 . unTO)
glUniform2f 0 (windowXFloat cfig) (windowYFloat cfig)