reducing warnings
This commit is contained in:
parent
0aff3e84ca
commit
f7d75db287
3 changed files with 9 additions and 13 deletions
|
@ -6,7 +6,6 @@ import GEGL
|
||||||
import BABL
|
import BABL
|
||||||
|
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
import Data.Maybe (catMaybes)
|
|
||||||
|
|
||||||
import Control.Monad (foldM)
|
import Control.Monad (foldM)
|
||||||
|
|
||||||
|
@ -36,7 +35,7 @@ load _ = do
|
||||||
, Property "height" $ PropertyDouble 600
|
, Property "height" $ PropertyDouble 600
|
||||||
, Property "color" $ PropertyColor $ GEGL.RGBA 0 0 0.1 1
|
, Property "color" $ PropertyColor $ GEGL.RGBA 0 0 0.1 1
|
||||||
]
|
]
|
||||||
ship <- gegl_node_new_child root $ Operation "gegl:svg-load"
|
shipNode <- gegl_node_new_child root $ Operation "gegl:svg-load"
|
||||||
[ Property "path" $ PropertyString "assets/ship.svg"
|
[ Property "path" $ PropertyString "assets/ship.svg"
|
||||||
, Property "width" $ PropertyInt 50
|
, Property "width" $ PropertyInt 50
|
||||||
, Property "height" $ PropertyInt 50
|
, Property "height" $ PropertyInt 50
|
||||||
|
@ -68,10 +67,10 @@ load _ = do
|
||||||
[ Property "width" $ PropertyDouble 800
|
[ Property "width" $ PropertyDouble 800
|
||||||
, Property "height" $ PropertyDouble 600
|
, Property "height" $ PropertyDouble 600
|
||||||
]
|
]
|
||||||
buffer <- gegl_buffer_new (Just $ GeglRectangle 0 0 800 600) =<<
|
nbuffer <- gegl_buffer_new (Just $ GeglRectangle 0 0 800 600) =<<
|
||||||
babl_format (PixelFormat BABL.RGBA CFfloat)
|
babl_format (PixelFormat BABL.RGBA CFfloat)
|
||||||
sink <- gegl_node_new_child root $ Operation "gegl:copy-buffer"
|
sink <- gegl_node_new_child root $ Operation "gegl:copy-buffer"
|
||||||
[ Property "buffer" $ PropertyBuffer buffer
|
[ Property "buffer" $ PropertyBuffer nbuffer
|
||||||
]
|
]
|
||||||
won <- gegl_node_new_child root $ textOperation
|
won <- gegl_node_new_child root $ textOperation
|
||||||
[ Property "string" $ PropertyString "YOU WON!"
|
[ Property "string" $ PropertyString "YOU WON!"
|
||||||
|
@ -120,8 +119,8 @@ load _ = do
|
||||||
menuOver <- gegl_node_new_child root $ defaultOverOperation
|
menuOver <- gegl_node_new_child root $ defaultOverOperation
|
||||||
gegl_node_link menuHeading menuTranslateHeading
|
gegl_node_link menuHeading menuTranslateHeading
|
||||||
gegl_node_link_many [menuText, menuTranslateText, menuOver]
|
gegl_node_link_many [menuText, menuTranslateText, menuOver]
|
||||||
gegl_node_connect_to menuTranslateHeading "output" menuOver "aux"
|
_ <- gegl_node_connect_to menuTranslateHeading "output" menuOver "aux"
|
||||||
gegl_node_link_many [ship, rotate, translate]
|
gegl_node_link_many [shipNode, rotate, translate]
|
||||||
gegl_node_link_many [bgover, pover, hover, sover, crop, fgover, pixelize, vignette, sink]
|
gegl_node_link_many [bgover, pover, hover, sover, crop, fgover, pixelize, vignette, sink]
|
||||||
-- _ <- gegl_node_connect_to translate "output" sover "aux"
|
-- _ <- gegl_node_connect_to translate "output" sover "aux"
|
||||||
_ <- gegl_node_connect_to pnop "output" pover "aux"
|
_ <- gegl_node_connect_to pnop "output" pover "aux"
|
||||||
|
@ -135,7 +134,7 @@ load _ = do
|
||||||
[ (KeyRoot, root)
|
[ (KeyRoot, root)
|
||||||
, (KeyTranslate, translate)
|
, (KeyTranslate, translate)
|
||||||
, (KeyRotate, rotate)
|
, (KeyRotate, rotate)
|
||||||
, (KeyShip, ship)
|
, (KeyShip, shipNode)
|
||||||
, (KeyPNop, pnop)
|
, (KeyPNop, pnop)
|
||||||
, (KeyHNop, hnop)
|
, (KeyHNop, hnop)
|
||||||
, (KeyCrop, crop)
|
, (KeyCrop, crop)
|
||||||
|
@ -165,13 +164,14 @@ load _ = do
|
||||||
, sRot = 0
|
, sRot = 0
|
||||||
, sFlange = rotate
|
, sFlange = rotate
|
||||||
}
|
}
|
||||||
, buffer = buffer
|
, buffer = nbuffer
|
||||||
, shots = ParticleSystem (ParticleStorage Nothing []) pnop buffer
|
, shots = ParticleSystem (ParticleStorage Nothing []) pnop nbuffer
|
||||||
-- , haskelloids = hs
|
-- , haskelloids = hs
|
||||||
, haskelloids = []
|
, haskelloids = []
|
||||||
, wonlost = False
|
, wonlost = False
|
||||||
, pixelSize = 3
|
, pixelSize = 3
|
||||||
, state = Menu
|
, state = Menu
|
||||||
|
, fade = FadeIn 1
|
||||||
}
|
}
|
||||||
|
|
||||||
insertHaskelloid :: [Maybe Haskelloid] -> Maybe Int -> (Double, Double) -> IO [Maybe Haskelloid]
|
insertHaskelloid :: [Maybe Haskelloid] -> Maybe Int -> (Double, Double) -> IO [Maybe Haskelloid]
|
||||||
|
|
|
@ -3,9 +3,7 @@
|
||||||
module Transitions where
|
module Transitions where
|
||||||
|
|
||||||
import Affection
|
import Affection
|
||||||
import qualified SDL
|
|
||||||
import GEGL
|
import GEGL
|
||||||
import BABL
|
|
||||||
|
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
import Data.Maybe (catMaybes)
|
import Data.Maybe (catMaybes)
|
||||||
|
|
|
@ -3,9 +3,7 @@
|
||||||
module Types where
|
module Types where
|
||||||
|
|
||||||
import Affection
|
import Affection
|
||||||
import qualified SDL
|
|
||||||
import GEGL
|
import GEGL
|
||||||
import BABL
|
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
|
|
||||||
data UserData = UserData
|
data UserData = UserData
|
||||||
|
|
Loading…
Reference in a new issue