packages feed

layers-game 0.4.1 → 0.4.2

raw patch · 6 files changed

+9/−11 lines, 6 filesdep ~Gamgine

Dependency ranges changed: Gamgine

Files

layers-game.cabal view
@@ -1,5 +1,5 @@ name: layers-game-version: 0.4.1+version: 0.4.2 cabal-version: >=1.6 build-type: Simple license: BSD3@@ -75,7 +75,7 @@         GLFW-b >=1.0 && <1.5,         ListZipper >=1.2.0.2 && <1.3,         composition >=1.0.1.0 && <1.1,-        Gamgine ==0.3.*+        Gamgine ==0.4.*     main-is: Main.hs     buildable: True     cpp-options: -DCABAL
src/Callback/Common.hs view
@@ -3,4 +3,4 @@ import qualified Data.IORef as R import qualified Utils as LU -mousePosition win appRef = R.readIORef appRef >>= LU.mousePosInLevelCoords win+mousePosition _ appRef = R.readIORef appRef >>= LU.mousePosInLevelCoords
src/Callback/Key.hs view
@@ -30,9 +30,8 @@             writeFile saveTo (show . TF.toFileData $ gdata)             putStrLn $ "layers: Levels data written to file '" ++ saveTo ++ "'" -      callback win key _ keyState _ = do+      callback win key _ keyState mods = do          mpos <- CC.mousePosition win appDataRef-         mods <- II.pressedModifiers win          case keyState of               GLFW.KeyState'Pressed  -> do                  let keyInfo = KI.KeyInfo key II.Pressed mpos mods
src/Callback/MouseButton.hs view
@@ -14,8 +14,7 @@ newMouseButtonCallback :: AP.AppDataRef -> GLFW.MouseButtonCallback newMouseButtonCallback appDataRef = callback    where-      callback win button buttonState _ = do+      callback win button buttonState mods = do          mpos <- CC.mousePosition win appDataRef-         mods <- II.pressedModifiers win          let mouseInfo = MI.MouseInfo button (buttonState == GLFW.MouseButtonState'Pressed ? II.Pressed $ II.Released) mpos mods          R.modifyIORef appDataRef (AP.handleMouseEvent mouseInfo)
src/States/EditModeRunning.hs view
@@ -74,4 +74,4 @@         _ -> GR.keyEvent ki gd     where-      shiftPressed = L.any (== KI.Shift) (KI.modifiers ki)+      shiftPressed = GLFW.modifierKeysShift $ KI.modifiers ki
src/Utils.hs view
@@ -34,9 +34,9 @@          interpolateFrame factor (E.playerPosition player) (E.playerVelocity player)  -mousePosInLevelCoords :: GLFW.Window -> AP.AppData -> IO V.Vect-mousePosInLevelCoords win appData = do-   (x, y) <- GLFW.getCursorPos win+mousePosInLevelCoords :: AP.AppData -> IO V.Vect+mousePosInLevelCoords appData = do+   (x, y) <- GLFW.getCursorPos $ AP.window appData    return $ windowToLevelCoords (floor x, floor y) appData