Cleanup warnings

This commit is contained in:
jgk
2021-05-17 22:39:18 +02:00
parent d7fcdbf550
commit 69f915a894
102 changed files with 1243 additions and 1185 deletions
+4 -3
View File
@@ -11,7 +11,7 @@ import Dodge.Picture.Layer
import Dodge.Base
import Dodge.Creature.Action
import Dodge.Config.KeyConfig
import Dodge.Room.Placement
--import Dodge.Room.Placement
import Dodge.LightSources
import Dodge.LevelGen
import Dodge.Creature.Inanimate
@@ -77,18 +77,19 @@ spaceAction w = if _carteDisplay w
Nothing -> w
where
theLoc = fst (_seenLocations w IM.! _selLocation w) w
updateTopCloseObject i w = w & closeActiveObjects %~ ( Right (_buttons w IM.! i) : ) . tail
updateTopCloseObject i = closeActiveObjects %~ ( Right (_buttons w IM.! i) : ) . tail
pauseGame :: World -> World
pauseGame w = w {_menuLayers = [PauseMenu]}
toggleMap :: World -> World
toggleMap w = w & carteDisplay %~ not
escapeMap :: World -> World
escapeMap w = w & carteDisplay .~ False
dropLight :: World -> World
dropLight w = placeLS ls dec pos 0 w
where --(rot, g) = randomR (-pi,pi) $ _randGen w
i = newCrKey w -- to give different lights different keys
pos = _crPos(you w)
ls = lightAt pos 0
dec = onLayer PtLayer $ color white $ circleSolid 8
+6 -3
View File
@@ -13,7 +13,7 @@ import Dodge.Layout
import Preload.Update
import Data.Maybe
import qualified Data.Set as S
--import qualified Data.Set as S
import Control.Lens
import SDL
@@ -62,8 +62,8 @@ handlePressedKeyInMenu mState scode w = case mState of
startLevel = unpause . storeLevel
dec x = max 0 (x - 0.1)
inc x = min 1 (x + 0.1)
pushMenu ml w = Just $ w & menuLayers %~ (ml :)
popMenu w = Just $ w & menuLayers %~ tail
pushMenu ml w' = Just $ w' & menuLayers %~ (ml :)
popMenu w' = Just $ w' & menuLayers %~ tail
sw = w & sideEffects %~ (setVol (_config w) : )
startNewGame = Just $ w
& menuLayers .~ [WaitMessage "GENERATING..." 1]
@@ -80,9 +80,12 @@ updateFramebufferSize w = w & sideEffects
(x,y) = (round $ getWindowX w, round $ getWindowY w)
divRes = w ^. config . shadow_resolution
cycleResolution :: (Eq a, Num a, Num p) => a -> p
cycleResolution 1 = 2
cycleResolution 2 = 4
cycleResolution 4 = 1
cycleResolution _ = 1
storeLevel :: World -> World
storeLevel w = case _storedLevel w of
+8 -9
View File
@@ -3,15 +3,14 @@ module Dodge.Event.Test
)
where
import Dodge.Data
import Dodge.Base
import Dodge.Default
import Picture
import Geometry
import qualified Data.IntMap as IM
import Control.Lens
--import Dodge.Base
--import Dodge.Default
--import Picture
--import Geometry
--
--import qualified Data.IntMap as IM
--import Control.Lens
testEvent :: World -> World
testEvent w = w
--testEvent :: World -> World