gloss-raster 1.10.2.4 → 1.11.1.1
raw patch · 3 files changed
+23/−21 lines, 3 filesdep ~basedep ~glossdep ~gloss-renderingPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, gloss, gloss-rendering
API changes (from Hackage documentation)
- Graphics.Gloss.Raster.Array: FullScreen :: (Int, Int) -> Display
+ Graphics.Gloss.Raster.Array: FullScreen :: Display
- Graphics.Gloss.Raster.Field: FullScreen :: (Int, Int) -> Display
+ Graphics.Gloss.Raster.Field: FullScreen :: Display
Files
- Graphics/Gloss/Raster/Array.hs +4/−3
- Graphics/Gloss/Raster/Field.hs +16/−15
- gloss-raster.cabal +3/−3
Graphics/Gloss/Raster/Array.hs view
@@ -35,6 +35,7 @@ import Graphics.Gloss.Interface.Pure.Game import Graphics.Gloss.Interface.IO.Animate import Graphics.Gloss.Interface.IO.Game+import Graphics.Gloss.Interface.Environment import Graphics.Gloss.Rendering import Data.Word import System.IO.Unsafe@@ -279,10 +280,10 @@ {-# INLINE unpackColor #-} -sizeOfDisplay :: Display -> (Int, Int)+sizeOfDisplay :: Display -> IO (Int, Int) sizeOfDisplay display = case display of- InWindow _ s _ -> s- FullScreen s -> s+ InWindow _ s _ -> return s+ FullScreen -> getScreenSize {-# INLINE sizeOfDisplay #-}
Graphics/Gloss/Raster/Field.hs view
@@ -37,7 +37,7 @@ import Graphics.Gloss.Data.Bitmap import Graphics.Gloss.Interface.Pure.Game import Graphics.Gloss.Interface.IO.Animate-import Graphics.Gloss.Rendering+import Graphics.Gloss.Interface.Environment import Data.Word import System.IO.Unsafe import Unsafe.Coerce@@ -67,7 +67,7 @@ -- | Construct a color from red, green, blue components. rgb8w :: Word8 -> Word8 -> Word8 -> Color-rgb8w r g b = makeRawColorI (fromIntegral r) (fromIntegral g) (fromIntegral b) 255+rgb8w r g b = makeColorI (fromIntegral r) (fromIntegral g) (fromIntegral b) 255 {-# INLINE rgb8w #-} @@ -77,7 +77,7 @@ -- however if your components are out of range then the picture you get will -- be implementation dependent. rgb' :: Float -> Float -> Float -> Color-rgb' r g b = makeRawColor r g b 1.0+rgb' r g b = makeColor r g b 1.0 {-# INLINE rgb' #-} @@ -87,7 +87,7 @@ -- however if your components are out of range then the picture you get will -- be implementation dependent. rgbI' :: Int -> Int -> Int -> Color-rgbI' r g b = makeRawColorI r g b 255+rgbI' r g b = makeColorI r g b 255 {-# INLINE rgbI' #-} @@ -111,14 +111,14 @@ then error $ "Graphics.Gloss.Raster.Field: invalid pixel scale factor " P.++ show (zoomX, zoomY) else - let (winSizeX, winSizeY) = sizeOfDisplay display-- {-# INLINE frame #-}- frame !time- = return+ do (winSizeX, winSizeY) <- sizeOfDisplay display+ + let frame !time+ = return $ makePicture winSizeX winSizeY zoomX zoomY (makePixel time) - in animateFixedIO display black frame (const $ return ())+ animateFixedIO display black frame (const $ return ())+ {-# INLINE animateField #-} -- INLINE so the repa functions fuse with the users client functions. @@ -147,8 +147,8 @@ if zoomX < 1 || zoomY < 1 then error $ "Graphics.Gloss.Raster.Field: invalid pixel scale factor " P.++ show (zoomX, zoomY)- else let (winSizeX, winSizeY) = sizeOfDisplay display- in winSizeX `seq` winSizeY `seq`+ else do (winSizeX, winSizeY) <- sizeOfDisplay display+ winSizeX `seq` winSizeY `seq` play display black stepRate initWorld (\world -> @@ -159,11 +159,11 @@ {-# INLINE playField #-} -sizeOfDisplay :: Display -> (Int, Int)+sizeOfDisplay :: Display -> IO (Int, Int) sizeOfDisplay display = case display of- InWindow _ s _ -> s- FullScreen s -> s+ InWindow _ s _ -> return s+ FullScreen -> getScreenSize {-# INLINE sizeOfDisplay #-} @@ -269,3 +269,4 @@ , word8OfFloat (g * 255) , word8OfFloat (b * 255)) {-# INLINE unpackColor #-}+
gloss-raster.cabal view
@@ -1,5 +1,5 @@ Name: gloss-raster-Version: 1.10.2.4+Version: 1.11.1.1 License: MIT License-file: LICENSE Author: Ben Lippmeier@@ -32,8 +32,8 @@ ghc-prim >= 0.4 && < 0.6, containers == 0.5.*, repa == 3.4.*,- gloss == 1.10.*,- gloss-rendering == 1.10.*+ gloss == 1.11.*,+ gloss-rendering == 1.11.* ghc-options: -Odph -fno-liberate-case