Cleanup compiler warnings

This commit is contained in:
2024-10-22 10:48:44 +01:00
parent c0b1092fb6
commit 65f05b93f8
10 changed files with 72 additions and 161 deletions
+7 -5
View File
@@ -1,3 +1,4 @@
{-# OPTIONS -Wno-incomplete-uni-patterns #-}
{-# LANGUAGE TupleSections #-}
module Dodge.HeldUse (
@@ -5,8 +6,8 @@ module Dodge.HeldUse (
mcUseHeld,
) where
import Control.Monad
import Color
import Control.Monad
import Data.Maybe
import Dodge.Base.Collide
import Dodge.Base.Coordinate
@@ -162,6 +163,7 @@ makeMuzzleFlare mz itmtree cr = case mz ^. mzFlareType of
pos = _crPos cr + rotateV (_crDir cr) (_mzPos mz + aimingWeaponZeroPos cr itm)
dir = _crDir cr + _mzRot mz
--{-# OPTIONS -Wno-incomplete-uni-patterns #-}
muzFlareAt :: Color -> Point3 -> Float -> World -> World
muzFlareAt col tranv dir w =
w & randGen .~ g
@@ -169,10 +171,10 @@ muzFlareAt col tranv dir w =
where
thepic =
setLayer BloomNoZWrite . translate3 tranv . color col . rotate dir . polygon $
[ V2 0 0
, V2 a (- b)
, V2 c d
]
[ V2 0 0
, V2 a (- b)
, V2 c d
]
thestate = replicateM 4 $ state $ randomR (2, 20)
(a : b : c : d : _, g) = runState thestate $ _randGen w -- randomRs (2, 20) (_randGen w)