packages feed

layers-game 0.5 → 0.5.1

raw patch · 8 files changed

+38/−40 lines, 8 filesdep ~GLFW-bdep ~Gamginedep ~ListZipper

Dependency ranges changed: GLFW-b, Gamgine, ListZipper, OpenGLRaw, cmdargs, composition, data-lens, mtl, pretty-show

Files

layers-game.cabal view
@@ -1,5 +1,5 @@ name: layers-game-version: 0.5+version: 0.5.1 cabal-version: >=1.6 build-type: Simple license: BSD3@@ -59,25 +59,24 @@ extra-source-files:     src/Utils.cpp     layers.png- + source-repository head     type: git     location: https://github.com/dan-t/layers- + executable layers+    main-is: Main.hs     build-depends:         base >3 && <5,-        mtl >=2.1.3.1 && <2.3,-        pretty-show >=1.6.7 && <1.7,-        cmdargs >=0.10.7 && <0.11,-        data-lens >=2.10.4 && <2.11,-        OpenGLRaw >=1.4.0.0 && <1.6,-        GLFW-b >=1.0 && <1.5,-        ListZipper >=1.2.0.2 && <1.3,-        composition >=1.0.1.0 && <1.1,-        Gamgine >=0.4 && <0.6-    main-is: Main.hs-    buildable: True+        mtl >=2.1.3.1,+        pretty-show >=1.6.7,+        cmdargs >=0.10.7,+        data-lens >=2.10.4,+        OpenGLRaw >=3.0.0.0,+        GLFW-b >=1.0,+        ListZipper >=1.2.0.2,+        composition >=1.0.1.0,+        Gamgine >=0.4     cpp-options: -DCABAL     cc-options: -Wno-unused-result     extensions: CPP@@ -132,5 +131,4 @@         Callback.MouseButton         Event     ghc-options: -pgmPcpphs -optP--cpp- - +
src/Entity/Render.hs view
@@ -1,7 +1,7 @@  module Entity.Render where import Control.Monad (when, forM_)-import qualified Graphics.Rendering.OpenGL.Raw as GL+import qualified Graphics.GL as GL import Gamgine.Control ((?)) import qualified Gamgine.Gfx as G import qualified Gamgine.Math.Box as B@@ -61,16 +61,16 @@       GL.glTranslatef <<< interpolateAnimationPos frac posOrAnim       GL.glColor3f <<< G.rgb 0.7 0.7 0.7 >> G.drawBox bound       GL.glLineWidth 4-      G.withPolyMode GL.gl_LINE $ GL.glColor3f <<< G.rgb 0.4 0.4 0.4 >> G.drawBox bound+      G.withPolyMode GL.GL_LINE $ GL.glColor3f <<< G.rgb 0.4 0.4 0.4 >> G.drawBox bound  render E.InactiveLayerScope        RS.RenderState {RS.nextFrameFraction = frac}        E.Platform {E.platformPosition = posOrAnim, E.platformBound = bound} = do    G.withPushedMatrix $ do       GL.glTranslatef <<< interpolateAnimationPos frac posOrAnim-      G.withBlend GL.gl_SRC_ALPHA GL.gl_ONE_MINUS_SRC_ALPHA $ do+      G.withBlend GL.GL_SRC_ALPHA GL.GL_ONE_MINUS_SRC_ALPHA $ do          GL.glColor4f <<<< G.rgba 0.0 0.0 0.1 0.2 >> G.drawBox bound-         G.withPolyMode GL.gl_LINE $ GL.glColor4f <<<< G.rgba 0.0 0.0 0.3 0.2 >> G.drawBox bound+         G.withPolyMode GL.GL_LINE $ GL.glColor4f <<<< G.rgba 0.0 0.0 0.3 0.2 >> G.drawBox bound  render _ _ _ = return () @@ -79,7 +79,7 @@ renderBound bound = do    GL.glColor3f <<< G.rgb 0 0 0    GL.glLineWidth 1-   G.withPolyMode GL.gl_LINE $ G.drawBoxTree bound+   G.withPolyMode GL.GL_LINE $ G.drawBoxTree bound   renderWalk :: (Double,Double) -> Vect -> Double -> GL.GLuint -> IO ()@@ -89,8 +89,8 @@       GL.glTranslatef <<< translation       GL.glRotatef <<<< G.xyzw angle 0 0 (-1)       G.withTexture2d texture $-         G.withBlend GL.gl_SRC_ALPHA GL.gl_ONE_MINUS_SRC_ALPHA $-            G.withPrimitive GL.gl_QUADS $ do+         G.withBlend GL.GL_SRC_ALPHA GL.GL_ONE_MINUS_SRC_ALPHA $+            G.withPrimitive GL.GL_QUADS $ do                let coords   = G.quadTexCoords 1 1                    vertices = G.quad (sizeX * (-0.5), sizeY * (-0.5)) (sizeX * 0.5, sizeY * 0.5)                GL.glColor3f <<< G.rgb 1 1 1
src/Level/Render.hs view
@@ -3,7 +3,7 @@ #include "Utils.cpp" import Data.Foldable (foldrM) import Control.Monad (forM_, mapM_)-import qualified Graphics.Rendering.OpenGL.Raw as GL+import qualified Graphics.GL as GL import qualified Ressources as R import qualified Gamgine.Gfx as G import Gamgine.Math.Vect as V@@ -40,7 +40,7 @@ renderBackground :: (Double,Double) -> GL.GLuint -> IO () renderBackground (sizeX, sizeY) texId  = do    G.withTexture2d texId $-      G.withPrimitive GL.gl_QUADS $ do+      G.withPrimitive GL.GL_QUADS $ do          let coords   = G.quadTexCoords 100 100              vertices = G.quad (0,0) (max 2000 sizeX, max 1000 sizeY)          GL.glColor3f <<< G.rgb 1 1 1
src/Main.hs view
@@ -8,7 +8,7 @@ import qualified Control.Monad.State as ST import Control.Monad (when, void) import qualified Graphics.UI.GLFW as GLFW-import qualified Graphics.Rendering.OpenGL.Raw as GL+import qualified Graphics.GL as GL import Gamgine.Control ((?)) import qualified Gamgine.Engine as EG import qualified Gamgine.Lens.IORef as GR@@ -112,8 +112,8 @@  clearGLState :: AP.AppST () clearGLState = io $ do-   GL.glClear (fromIntegral GL.gl_COLOR_BUFFER_BIT)-   GL.glMatrixMode GL.gl_MODELVIEW+   GL.glClear (fromIntegral GL.GL_COLOR_BUFFER_BIT)+   GL.glMatrixMode GL.GL_MODELVIEW    GL.glLoadIdentity  @@ -147,7 +147,7 @@          (w, h) <- getL AP.windowSizeL          (r, t) <- getL AP.frustumSizeL 	 GL.glViewport 0 0 (fromIntegral w) (fromIntegral h)-	 GL.glMatrixMode GL.gl_PROJECTION+	 GL.glMatrixMode GL.GL_PROJECTION 	 GL.glLoadIdentity 	 GL.glOrtho 0 (G.floatToFloat r) 0 (G.floatToFloat t) (-1) 1 
src/Rendering/Renderer.hs view
@@ -1,7 +1,7 @@  module Rendering.Renderer where import Control.Monad (forM_)-import qualified Graphics.Rendering.OpenGL.Raw as GL+import qualified Graphics.GL as GL import qualified Gamgine.Gfx as G import Gamgine.Gfx ((<<), (<<<<), (<<<)) import qualified Gamgine.Coroutine as CO@@ -44,8 +44,8 @@          let (minX, minY) = (px, py)              (maxX, maxY) = (px + sx, py + sy)          G.withTexture2d texId $-            G.withBlend GL.gl_SRC_ALPHA GL.gl_ONE_MINUS_SRC_ALPHA $-               G.withPrimitive GL.gl_QUADS $ do+            G.withBlend GL.GL_SRC_ALPHA GL.GL_ONE_MINUS_SRC_ALPHA $+               G.withPrimitive GL.GL_QUADS $ do                   let coords   = G.quadTexCoords 1 1                       vertices = G.quad (minX,minY) (maxX,maxY)                   GL.glColor4f <<<< color@@ -61,8 +61,8 @@       GL.glTranslatef <<< G.xyz (sizeX * 0.5) (sizeY * 0.5) 0       GL.glTranslatef <<< pos       G.withTexture2d texId $-         G.withBlend GL.gl_SRC_ALPHA GL.gl_ONE_MINUS_SRC_ALPHA $-            G.withPrimitive GL.gl_QUADS $ do+         G.withBlend GL.GL_SRC_ALPHA GL.GL_ONE_MINUS_SRC_ALPHA $+            G.withPrimitive GL.GL_QUADS $ do                let coords   = G.quadTexCoords 1 1                    vertices = G.quad (sizeX * (-0.5), sizeY * (-0.5)) (sizeX * 0.5, sizeY * 0.5)                GL.glColor3f <<< G.rgb 1 1 1
src/Rendering/Ressources.hs view
@@ -3,7 +3,7 @@ module Rendering.Ressources where import Control.Applicative ((<$>)) import Data.Maybe (fromJust)-import qualified Graphics.Rendering.OpenGL.Raw as GL+import qualified Graphics.GL as GL import qualified Gamgine.Font.GLF as GLF import qualified Gamgine.Gfx as G import qualified Gamgine.State.RenderState as RS@@ -39,7 +39,7 @@        mkTexture file = do          tex <- R.getImageFilePath file-         G.makeTexture2d tex GL.gl_REPEAT+         G.makeTexture2d tex GL.GL_REPEAT        mkFont file = do          font <- R.getFontFilePath file
src/States/DefiningAnimation.hs view
@@ -9,7 +9,7 @@ import qualified Data.List as L import qualified Gamgine.Math.Vect as V import Gamgine.Control ((?))-import qualified Graphics.Rendering.OpenGL.Raw as GL+import qualified Graphics.GL as GL import qualified Gamgine.Gfx as Gfx import Gamgine.Gfx ((<<<)) import qualified Gamgine.State.State as ST@@ -64,7 +64,7 @@             gd' <- GR.render rs gd             GL.glLineWidth 2             GL.glColor3f <<< Gfx.rgb 0 0 0-            Gfx.draw GL.gl_LINE_STRIP (path da ++ [mousePos da])+            Gfx.draw GL.GL_LINE_STRIP (path da ++ [mousePos da])             return $ (gd', mkState da),           ST.keyEvent = (, mkState da) .: flip const,
src/States/IntroRunning.hs view
@@ -4,7 +4,7 @@ #include "Utils.cpp" import Control.Applicative ((<$>)) import Data.Composition ((.:))-import qualified Graphics.Rendering.OpenGL.Raw as GL+import qualified Graphics.GL as GL import qualified Gamgine.Gfx as G import Gamgine.Gfx ((<<<)) import qualified Gamgine.Font.GLF as GLF@@ -33,7 +33,7 @@ render :: RS.RenderState -> a -> IO a render RS.RenderState {RS.ressources = res, RS.frustumSize = (fx, fy)} gd = do    G.withPushedMatrix $ do-      GL.glMatrixMode GL.gl_MODELVIEW+      GL.glMatrixMode GL.GL_MODELVIEW       GL.glLoadIdentity        G.withPushedMatrix $ do