Monadius 0.93 → 0.94
raw patch · 3 files changed
+43/−30 lines, 3 filesdep ~GLUTdep ~OpenGLdep ~arraynew-uploader
Dependency ranges changed: GLUT, OpenGL, array, base, directory
Files
- Monadius.cabal +38/−24
- Monadius/Main.hs +3/−4
- Monadius/Monadius.hs +2/−2
Monadius.cabal view
@@ -1,29 +1,43 @@-name: Monadius-version: 0.93--license: GPL-license-file: LICENSE-author: Hideyuki Tanaka & Takayuki Muranushi-maintainer: Takayuki Muranushi <muranushi@gmail.com>+Name: Monadius+Version: 0.94 -stability: Stable-category: Game-synopsis: 2-D arcade scroller-description: A fast-paced 2-D scrolling vector graphics clone of the arcade game Gradius;+Synopsis: 2-D arcade scroller+Description: A fast-paced 2-D scrolling vector graphics clone of the arcade game Gradius; it is dedicated to the 20th anniversary of Gradius series.- .- The Darcs repo is available at <http://code.haskell.org/monadius/>.-homepage: http://www.geocities.jp/takascience/haskell/monadius_en.html -build-depends: base<4, array, directory, GLUT, OpenGL-build-type: Simple-data-files: readme-e.txt, readme-j.txt-tested-with: GHC==6.8.2+License: GPL+License-file: LICENSE -executable: monadius-main-is: Main.hs-hs-source-dirs: Monadius-other-modules: Demo, Game, Monadius, Recorder, Util+Author: Takayuki Muranushi & Hideyuki Tanaka+Maintainer: Hideyuki Tanaka <tanaka.hideyuki@gmail.com> -ghc-options: -Wall-ghc-prof-options: -prof -auto-all+Stability: Stable+Category: Game++Homepage: http://www.geocities.jp/takascience/haskell/monadius_en.html++Build-type: Simple+Cabal-version: >= 1.6++Data-files: readme-e.txt, readme-j.txt++Executable monadius+ Build-depends: base >= 4 && < 5+ , array >= 0.3 && < 0.4+ , directory >= 1.1 && < 1.2+ , GLUT >= 2.1 && < 2.2+ , OpenGL >= 2.2 && < 2.3++ Hs-source-dirs: Monadius+ Ghc-options: -Wall++ Main-is: Main.hs+ Other-modules: Demo+ , Game+ , Monadius+ , Recorder+ , Util++Source-repository head+ type: git+ location: git://github.com/tanakh/monadius.git
Monadius/Main.hs view
@@ -8,7 +8,6 @@ module Main (main) where import Graphics.UI.GLUT hiding (position) -import Graphics.Rendering.OpenGL.GLU import Control.Exception -- (catch, ExitException(), throwIO) import Control.Monad (mplus, zipWithM_) import System.Exit -- (ExitSuccess()) @@ -50,7 +49,7 @@ main = do args <- getArgs putDebugStrLn $ show args - getArgsAndInitialize + _ <- getArgsAndInitialize keystate <- newIORef [] (recMode,keys,rss,repName) <- if isJust $ getReplayFilename args then do @@ -95,7 +94,7 @@ mainLoop destroyWindow curwnd - `catch` (\_ -> return ()) + `catch` (\(SomeException _) -> return ()) where getReplayFilename [] = Nothing @@ -109,7 +108,7 @@ removesuffix str = if '.' `elem` str then (removesuffix . init) str else str exitLoop :: IO a -exitLoop = throwIO $ ExitException ExitSuccess +exitLoop = exitWith ExitSuccess initMatrix :: IO () initMatrix = do
Monadius/Monadius.hs view
@@ -670,10 +670,10 @@ -- and every object will continue to hold the same tag. issueTag :: Int -> [GameObject] -> (Int,[GameObject]) issueTag nt [] = (nt,[]) - issueTag nt (x:xs) = (newNextTag,taggedX:taggedXs) + issueTag nt (x:xs) = (newNextTag',taggedX:taggedXs) where (nextTagForXs,taggedX) = if(isNothing $ tag x) then (nt+1,x{tag = Just nt}) else (nt,x) - (newNextTag,taggedXs) = issueTag nextTagForXs xs + (newNextTag',taggedXs) = issueTag nextTagForXs xs collide :: [GameObject] -> [GameObject] -- collide a list of GameObjects and return the result.