gloss-game 0.3.2.0 → 0.3.3.0
raw patch · 2 files changed
+6/−6 lines, 2 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Graphics.Gloss.Game: animationPicture :: Float -> Animation -> Maybe Picture
+ Graphics.Gloss.Game: animationPicture :: Animation -> Float -> Maybe Picture
Files
- Graphics/Gloss/Game.hs +5/−5
- gloss-game.cabal +1/−1
Graphics/Gloss/Game.hs view
@@ -189,13 +189,13 @@ noAnimation :: Animation noAnimation = animation [] 1 0 -animationPicture :: Float -> Animation -> Maybe Picture-animationPicture now (Animation pics delay start)- | start > now = Nothing+animationPicture :: Animation -> Float -> Maybe Picture+animationPicture (Animation pics delay start) time+ | start > time = Nothing | i >= length pics = Nothing | otherwise = Just $ pics !! i where- i = round ((now - start) / delay)+ i = round ((time - start) / delay) -- |A scene describes the rendering of a world state — i.e., which picture should be draw depending on the current time -- and of the state of the world.@@ -221,7 +221,7 @@ -- animating :: (world -> Animation) -> Picture -> Scene world animating anim defaultPic- = Picturing (\currentTime world -> fromMaybe defaultPic $ animationPicture currentTime (anim world))+ = Picturing (\currentTime world -> fromMaybe defaultPic $ animationPicture (anim world) currentTime) -- |Move a scene in dependences on a world-dependent location. --
gloss-game.cabal view
@@ -1,5 +1,5 @@ Name: gloss-game-Version: 0.3.2.0+Version: 0.3.3.0 Cabal-version: >= 1.6 Tested-with: GHC >= 7.6 Build-type: Simple