spice 0.3.2.1 → 0.3.2.2
raw patch · 8 files changed
+10/−22 lines, 8 files
Files
- spice.cabal +1/−1
- src/FRP/Spice/Config.hs +4/−1
- src/FRP/Spice/Graphics/Color.hs +0/−5
- src/FRP/Spice/Graphics/Element.hs +0/−2
- src/FRP/Spice/Graphics/Geometry.hs +1/−7
- src/FRP/Spice/Graphics/Scene.hs +1/−4
- src/FRP/Spice/Input/Backend.hs +0/−1
- src/FRP/Spice/Input/Mouse.hs +3/−1
spice.cabal view
@@ -1,5 +1,5 @@ name: spice -version: 0.3.2.1 +version: 0.3.2.2 synopsis: An FRP-based game engine written in Haskell. description: An FRP-based game engine written in Haskell. - See the homepage for more information. homepage: http://github.com/crockeo/spice
src/FRP/Spice/Config.hs view
@@ -27,7 +27,6 @@ > getWindowWidth = 640 > getWindowHeight = 480 > getWindowFullscreen = False - > getWindowResizeable = False > getWindowTitle = "Spice Application" -} defaultWindowConfig :: WindowConfig @@ -37,5 +36,9 @@ , getWindowTitle = "Spice Application" } +{-| + A default instance for @'WindowConfig'@. Equivalent to calling + @'defaultWindowConfig'@. +-} instance Default WindowConfig where def = defaultWindowConfig
src/FRP/Spice/Graphics/Color.hs view
@@ -4,15 +4,10 @@ -} module FRP.Spice.Graphics.Color where --------------------- --- Global Imports -- -import Graphics.Rendering.OpenGL (Color4 (..), color) - ------------------- -- Local Imports -- import FRP.Spice.Graphics.Element import FRP.Spice.Graphics.Scene -import FRP.Spice.Graphics.Utils ---------- -- Code --
src/FRP/Spice/Graphics/Element.hs view
@@ -26,11 +26,9 @@ Converting an @'Element'@ into its matching OpenGL call. -} renderElement :: Element -> IO () - renderElement (RenderPrimitive mode vertecies) = renderPrimitive mode $ forM_ vertecies $ \(Vector x y) -> vertex $ Vertex2 (togl x) (togl y) - renderElement (SetColor r g b a) = color $ Color4 (togl r) (togl g) (togl b) (togl a)
src/FRP/Spice/Graphics/Geometry.hs view
@@ -9,18 +9,12 @@ -------------------- -- Global Imports -- -import Graphics.Rendering.OpenGL ( PrimitiveMode (..) - , Vertex2 (..) - , renderPrimitive - , vertex - ) -import Control.Monad +import Graphics.Rendering.OpenGL ------------------- -- Local Imports -- import FRP.Spice.Graphics.Element import FRP.Spice.Graphics.Scene -import FRP.Spice.Graphics.Utils import FRP.Spice.Math.Vector ----------
src/FRP/Spice/Graphics/Scene.hs view
@@ -1,7 +1,4 @@-module FRP.Spice.Graphics.Scene ( Scene - , fromElements - , renderScene - ) where +module FRP.Spice.Graphics.Scene where -------------------- -- Global Imports --
src/FRP/Spice/Input/Backend.hs view
@@ -16,7 +16,6 @@ import qualified FRP.Spice.Input.MousePosition as MousePosition import qualified FRP.Spice.Input.Keyboard as Keyboard import qualified FRP.Spice.Input.Mouse as Mouse -import FRP.Spice.Config import FRP.Spice.Input import FRP.Spice.Math
src/FRP/Spice/Input/Mouse.hs view
@@ -14,7 +14,9 @@ ---------- -- Code -- --- Adding an instance of Ord to MouseButton so it can be used with the map +{-| + Adding an instance of Ord to MouseButton so it can be used with the map. +-} instance Ord MouseButton where mb1 <= mb2 = fromEnum mb1 < fromEnum mb2