Raincat 1.2.1 → 1.2.3
raw patch · 5 files changed
+126/−103 lines, 5 filesdep −extensible-exceptionsdep ~GLUTdep ~OpenGLdep ~base
Dependencies removed: extensible-exceptions
Dependency ranges changed: GLUT, OpenGL, base, containers, mtl, random, sdl2, sdl2-image, sdl2-mixer, time
Files
- README +0/−73
- README.md +95/−0
- Raincat.cabal +25/−17
- src/Error/Error.hs +2/−10
- src/Level/Level.hs +4/−3
− README
@@ -1,73 +0,0 @@-Raincat-Game Creation Society - Fall 08-www.gamecreation.org---HOW TO START THE GAME:------------------------./raincat--COMPILATION:------------------------runhaskell Setup.lhs --user configure-runhaskell Setup.lhs build-runhaskell Setup.lhs install--Alternative method: cabal install Raincat--CHANGELOG:------------Version 1.2:- - Ported to SDL2-Version 1.1:- - Changed initial item placement from click to select, click to place- to drag n' drop.- - Replaced eraser tool with right click to erase an item- - Now properly detecting mouse clicks after window resize-Version 1.0:- - Initial version---NOTES:--------The Raincat executable was compiled with GHC 6.12.1 on Arch Linux i686-and on Ubuntu 9.10. If you are having problems running the game, the-win32 build runs under wine.--Runtimes for the following libraries are assumed to be installed:-GLUT-OpenGL-SDL2-SDL2_image-SDL2_mixer---TROUBLESHOOTING:------------------If you receive the error:-"user error (Mix_LoadMUS SDL message: Module format not recognized)"-when trying to run Raincat, this is because your SDL-mixer library-was not compiled with mp3 support. You will need to recompile that-with mp3 support or otherwise obtain a copy with mp3 support in order-to run the game.---PROJECT TEAM:---------------Garrick Chin - Project Leader/Programmer/Level Designer-Susan Lin - Artist-SooHyun Jang - Artist-Anthony Maurice - Programmer-William Wang - Programmer-Andrew Zheng - Programmer-Rachel Berkowitz - Music Composer-Spencer Ying - Artist/Level Designer-Tal Stramer - Level Editor Programmer---OTHER CONTRIBUTORS:---------------------Mikhail Pobolovets - Programmer-Sergei Trofimovich - Programmer-Raahul Kumar - Programmer-Alvaro F. García - Programmer
+ README.md view
@@ -0,0 +1,95 @@+# Raincat+Game Creation Society - Fall 08++https://www.gamecreation.org/++### Screenshot+++### Installation (Snap Store)+Raincat is available in the Snap Store at: [](https://snapcraft.io/raincat)++It can be installed with:+```+sudo snap install raincat+```++After installation, Raincat can be launched from the Raincat desktop launcher, or with:+```+snap run raincat+```++### Compilation+You can compile locally with `runhaskell`:+```+runhaskell Setup.lhs --user configure+runhaskell Setup.lhs build+runhaskell Setup.lhs install+```++Compiling from Hackage with `cabal`:+```+cabal install Raincat+```++### Starting the game (compiled)+```+./raincat+```++### Changelog+```+Version 1.2:+ - Ported to SDL2+Version 1.1:+ - Changed initial item placement from click to select, click to place+ to drag n' drop.+ - Replaced eraser tool with right click to erase an item+ - Now properly detecting mouse clicks after window resize+Version 1.0:+ - Initial version+```++### Notes+The Raincat executable was compiled with GHC 6.12.1 on Arch Linux i686+and on Ubuntu 9.10. If you are having problems running the game, the+win32 build runs under wine.++Runtimes for the following libraries are assumed to be installed:+* GLUT+* OpenGL+* SDL2+* SDL2_image+* SDL2_mixer++### Troubleshooting+If you receive the error:+```+user error (Mix_LoadMUS SDL message: Module format not recognized)+```+when trying to run Raincat, this is because your SDL-mixer library+was not compiled with mp3 support. You will need to recompile that+with mp3 support or otherwise obtain a copy with mp3 support in order+to run the game.++### Project Team+```+Garrick Chin - Project Leader/Programmer/Level Designer+Susan Lin - Artist+SooHyun Jang - Artist+Anthony Maurice - Programmer+William Wang - Programmer+Andrew Zheng - Programmer+Rachel Berkowitz - Music Composer+Spencer Ying - Artist/Level Designer+Tal Stramer - Level Editor Programmer+```++### Other Contributors+```+Mikhail Pobolovets - Programmer+Sergei Trofimovich - Programmer+Raahul Kumar - Programmer+Alvaro F. García - Programmer+Alex Haydock - Packaging (Snapcraft)+```
Raincat.cabal view
@@ -1,8 +1,8 @@+cabal-version: 3.0 name: Raincat-version: 1.2.1-cabal-version: >= 1.8+version: 1.2.3 build-type: Simple-license: BSD3+license: BSD-3-Clause license-file: LICENSE copyright: Garrick Chin 2008-2010 maintainer: Mikhail S. Pobolovets <styx.mp@gmail.com>@@ -22,8 +22,8 @@ Sergei Trofimovich stability: stable-tested-with: GHC==7.6.2-data-files: LICENSE README+tested-with: GHC == { 8.10.7, 9.6.3 }+data-files: LICENSE README.md data/effects/*.png data/cat/cat-walk/*.png data/cat/cat-idle/*.png data/music/*.ogg data/levels/skyline/*.lvl data/levels/movement1/*.lvl data/cat/cat-springboots/*.png data/levels/movement2/*.lvl data/levels/pinball/*.lvl@@ -38,26 +38,34 @@ data/cat/cat-upside-down-umbrella/*.png data/cat/cat-shield/*.png data/levels/river/*.png data/levels/pool/*.lvl data/items/*.png -data-dir: "" extra-source-files: Setup.lhs +source-repository head+ type: git+ location: https://github.com/styx/Raincat.git+ executable raincat+ default-language: Haskell2010 main-is: Main.hs buildable: True ghc-options: -Wall hs-source-dirs: src build-depends:- base >= 3 && < 5,- containers,- extensible-exceptions,- mtl,- random,- time,- GLUT,- OpenGL,- sdl2,- sdl2-image,- sdl2-mixer+ -- Specifying ghc-8.10 dependencies as a lower+ -- bound. Chances are high that older and newer+ -- dependencies will Just Work.+ base ^>= 4.14 || ^>= 4.15 || ^>= 4.16 || ^>= 4.17 || ^>= 4.18 || ^>= 4.19,+ containers ^>= 0.6,+ mtl ^>= 2.2 || ^>= 2.3,+ random ^>= 1.2,+ time ^>= 1.9 || ^>= 1.10 || ^>= 1.11 || ^>= 1.12,+ -- non-ghc packages:+ GLUT ^>= 2.7,+ OpenGL ^>= 3.0,+ sdl2 ^>= 2.5,+ sdl2-image ^>= 2.1,+ sdl2-mixer ^>= 1.2+ autogen-modules: Paths_Raincat other-modules: Cat.Cat Error.Error
src/Error/Error.hs view
@@ -1,9 +1,8 @@ {-# LANGUAGE DeriveDataTypeable #-}-module Error.Error (RaincatError(..), throwEx, catchEx, showError) where+module Error.Error (RaincatError(..), showError) where import Data.Typeable-import Control.Exception.Extensible as EE-import Control.Monad.Error+import Control.Exception as E data RaincatError = BadLevelData String@@ -11,14 +10,7 @@ | BadRectData deriving (Typeable, Show) -instance Error RaincatError where instance Exception RaincatError where--throwEx :: RaincatError -> a-throwEx = EE.throw--catchEx :: IO a -> (RaincatError -> IO a) -> IO a-catchEx = EE.catch showError :: RaincatError -> String showError err = case err of
src/Level/Level.hs view
@@ -17,6 +17,7 @@ import Nxt.Types import System.IO+import qualified Control.Exception as CE import qualified Error.Error as E import Settings.DisplaySettings import Nxt.Graphics hiding (end)@@ -107,20 +108,20 @@ "firehydrantRight" -> leveldata {levelFireHydrantsR = parseRect coord : fireHydrantsR} "puddle" -> leveldata {levelPuddles = parseRect coord : puddles} "polygon" -> leveldata {levelPolys = poly : polys}- _ -> E.throwEx (E.BadLevelData obj)+ _ -> CE.throw (E.BadLevelData obj) parseShape (numShapes-1) inh newLevelData -- parseVerts parseVerts :: [Double] -> [Vector2d] parseVerts [] = []-parseVerts (_x:[]) = E.throwEx E.BadVerticesData+parseVerts (_x:[]) = CE.throw E.BadVerticesData parseVerts (x:y:vs) = (x,y):parseVerts vs -- parseRect parseRect :: [Double] -> Rect parseRect coords = if length coords /= 8- then E.throwEx E.BadRectData+ then CE.throw E.BadRectData else Rect bottomLX bottomLY width height where bottomLX = head coords bottomLY = coords !! 1