packages feed

apecs-brillo 0.1.0 → 0.1.1

raw patch · 8 files changed

+94/−71 lines, 8 filesdep +apecs-brillodep +brillo-renderingdep ~apecsdep ~apecs-physicsdep ~basesetup-changedPVP ok

version bump matches the API change (PVP)

Dependencies added: apecs-brillo, brillo-rendering

Dependency ranges changed: apecs, apecs-physics, base, brillo, linear

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,2 +1,5 @@-## [0.1.0]+## [0.1.1]+Brillo update patch +## [0.1.0]+IDK, made this
LICENSE view
@@ -1,30 +1,11 @@-Copyright Jonas Carpay and Execute (c) 2017--All rights reserved.+Copyright (c) 2017 Jonas Carpay, Execute  -Redistribution and use in source and binary forms, with or without-modification, are permitted provided that the following conditions are met:+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -    * Redistributions of source code must retain the above copyright-      notice, this list of conditions and the following disclaimer.+1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -    * Redistributions in binary form must reproduce the above-      copyright notice, this list of conditions and the following-      disclaimer in the documentation and/or other materials provided-      with the distribution.+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -    * Neither the name of Jonas Carpay nor Execute nor the names of other-      contributors may be used to endorse or promote products derived-      from this software without specific prior written permission.+3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
README.md view
@@ -1,3 +1,3 @@ # apecs-brillo -Tools for simple [brillo](http://hackage.haskell.org/package/brillo)-based rendering.+Apecs' gloss package, but adapted for brillo
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
apecs-brillo.cabal view
@@ -1,37 +1,66 @@-name:               apecs-brillo-version:            0.1.0-synopsis:           Simple brillo renderer for apecs-homepage:           https://github.com/fl215/apecs-brillo-license:            BSD3-license-file:       LICENSE-author:             Execute-maintainer:         execute@erisws.com-copyright:          Jonas Carpay, Execute-category:           Game engine-build-type:         Simple-extra-source-files:+cabal-version: 2.2++-- This file has been generated from package.yaml by hpack version 0.39.1.+--+-- see: https://github.com/sol/hpack++name:           apecs-brillo+version:        0.1.1+synopsis:       Apecs' gloss package, but adapted for brillo+description:    Please see the README on Codeberg at <https://codeberg.org/dpwiz-apprentice/apecs-brillo#readme>+category:       Game engine+author:         Execute+maintainer:     execute@erisws.com+copyright:      2017 Jonas Carpay, Execute+license:        BSD-3-Clause+license-file:   LICENSE+build-type:     Simple+extra-doc-files:     README.md-  , CHANGELOG.md-cabal-version:      >=1.10-description:-  apecs-gloss but instead it's for brillo.+    CHANGELOG.md +source-repository head+  type: git+  location: https://codeberg.org/dpwiz-apprentice/apecs-brillo+ library-  hs-source-dirs:   src   exposed-modules:-    Apecs.Brillo-    Apecs.Physics.Brillo-+      Apecs.Brillo+      Apecs.Physics.Brillo+  other-modules:+      Paths_apecs_brillo+  autogen-modules:+      Paths_apecs_brillo+  hs-source-dirs:+      src+  ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints   build-depends:-      apecs          >=0.7  && <0.10-    , apecs-physics  >=0.3  && <0.5-    , base           >=4.9  && <5-    , containers     >=0.5  && <0.8-    , brillo         ==1.13.3-    , linear         >=1.20 && <2-+      apecs >=0.7 && <0.10+    , apecs-physics >=0.3 && <5+    , base >=4.7 && <5+    , brillo ==2.*+    , brillo-rendering ==2.*+    , containers >=0.5 && <0.8+    , linear >=1.2 && <2   default-language: Haskell2010 -source-repository head-  type:     git-  location: https://github.com/fl215/apecs-brillo+test-suite apecs-brillo-test+  type: exitcode-stdio-1.0+  main-is: Spec.hs+  other-modules:+      Paths_apecs_brillo+  autogen-modules:+      Paths_apecs_brillo+  hs-source-dirs:+      test+  ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-N+  build-depends:+      apecs >=0.7 && <0.10+    , apecs-brillo+    , apecs-physics >=0.3 && <5+    , base >=4.7 && <5+    , brillo ==2.*+    , brillo-rendering ==2.*+    , containers >=0.5 && <0.8+    , linear >=1.2 && <2+  default-language: Haskell2010
src/Apecs/Brillo.hs view
@@ -6,12 +6,13 @@   , module G   ) where -import           Data.Semigroup                   (Semigroup (..))-import           Brillo.Interface.IO.Game         as G-import           Linear.V2-import           Linear.Vector+import Data.Semigroup (Semigroup (..))+import Brillo+import Brillo.Interface.IO.Game as G+import Linear.V2+import Linear.Vector -import           Apecs+import Apecs  data Camera = Camera   { camOffset :: V2 Float
src/Apecs/Physics/Brillo.hs view
@@ -9,15 +9,14 @@   , module Apecs.Brillo   ) where -import           Control.Monad                         (foldM)-import           Data.Semigroup                        (Semigroup (..))-import           Brillo.Geometry.Angle                 (radToDeg)-import           Brillo.Interface.IO.Simulate          (simulateIO)--import           Apecs-import           Apecs.Physics+import Control.Monad (foldM)+import Data.Semigroup (Semigroup (..))+import Brillo.Geometry.Angle (radToDeg)+import Brillo.Interface.IO.Simulate (simulateIO) -import           Apecs.Brillo+import Apecs+import Apecs.Physics+import Apecs.Brillo  convexToPicture :: Convex -> Picture convexToPicture (Convex [V2 x y] radius) = Translate (realToFrac x) (realToFrac y) $ Circle (realToFrac radius)@@ -34,7 +33,7 @@  Rotate (negate . radToDeg . realToFrac $ theta)  drawBody :: Has w IO Physics => (Body, Transform, ShapeList) -> System w Picture-drawBody (btype, transform, ShapeList shapes) = color shColor . worldTransform transform <$> foldM foldfn mempty shapes+drawBody (btype, transform, ShapeList shapes) = Color shColor . worldTransform transform <$> foldM foldfn mempty shapes   where foldfn pic shapeEty = do           Shape _ convex <- get shapeEty           return . mappend pic $ convexToPicture convex
+ test/Spec.hs view
@@ -0,0 +1,8 @@+module Spec where++import Apecs+import Apecs.Brillo.Physics++test :: IO ()+test = putStrLn "tests not done yet"+