Migrated from Make to Cabal
This commit is contained in:
parent
e03de6bfe6
commit
d3e50ab004
5 changed files with 28 additions and 26 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -1,7 +1,2 @@
|
||||||
*.hi
|
|
||||||
*.o
|
|
||||||
*~
|
*~
|
||||||
*.chs.h
|
dist
|
||||||
Bindings/*.hs
|
|
||||||
|
|
||||||
HTanks
|
|
||||||
|
|
14
HTanks.hs
14
HTanks.hs
|
@ -165,13 +165,13 @@ simulationStep = do
|
||||||
shootingtanks = map (\(tank, _, n) -> (tank, n)) $ filter (\(tank, shoot, _) -> shoot && (shootsLeft tank) > 0) $ ts
|
shootingtanks = map (\(tank, _, n) -> (tank, n)) $ filter (\(tank, shoot, _) -> shoot && (shootsLeft tank) > 0) $ ts
|
||||||
newtanks = map (\(tank, shoot, _) -> if shoot then tank {shootsLeft = (shootsLeft tank) - 1} else tank) $ ts
|
newtanks = map (\(tank, shoot, _) -> if shoot then tank {shootsLeft = (shootsLeft tank) - 1} else tank) $ ts
|
||||||
newshoots = map (\(tank, n) -> Shoot
|
newshoots = map (\(tank, n) -> Shoot
|
||||||
{ shootX = posx tank
|
{ shootX = posx tank
|
||||||
, shootY = posy tank
|
, shootY = posy tank
|
||||||
, shootDir = aim tank
|
, shootDir = aim tank
|
||||||
, shootSpeed = tankShootSpeed tank
|
, shootSpeed = tankShootSpeed tank
|
||||||
, bouncesLeft = tankShootBounces tank
|
, bouncesLeft = tankShootBounces tank
|
||||||
, shootTank = n
|
, shootTank = n
|
||||||
}) shootingtanks
|
}) shootingtanks
|
||||||
|
|
||||||
|
|
||||||
modify $ \state -> state {players = p}
|
modify $ \state -> state {players = p}
|
||||||
|
|
13
Makefile
13
Makefile
|
@ -1,13 +0,0 @@
|
||||||
HSCFILES = Bindings/GLX.hsc Bindings/GLPng.hsc
|
|
||||||
HSFILES = $(HSCFILES:%.hsc=%.hs) GLDriver.hs GLX.hs Texture.hs Player.hs DefaultPlayer.hs CPUPlayer.hs Level.hs Game.hs Render.hs HTanks.hs
|
|
||||||
|
|
||||||
all: HTanks
|
|
||||||
|
|
||||||
HTanks : $(HSFILES)
|
|
||||||
ghc -threaded --make HTanks -lGL -lglpng
|
|
||||||
|
|
||||||
%.hs : %.hsc
|
|
||||||
hsc2hs $<
|
|
||||||
|
|
||||||
clean :
|
|
||||||
rm -f HTanks $(HSFILES:%.hs=%.o) $(HSFILES:%.hs=%.hi) $(HSCFILES:%.hsc=%.hs)
|
|
3
Setup.lhs
Normal file
3
Setup.lhs
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env runhaskell
|
||||||
|
> import Distribution.Simple
|
||||||
|
> main = defaultMain
|
17
htanks.cabal
Normal file
17
htanks.cabal
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
name: htanks
|
||||||
|
version: 0.0
|
||||||
|
synopsis: <Project description>
|
||||||
|
description: <Project description>
|
||||||
|
category: Game
|
||||||
|
license: GPL-3
|
||||||
|
license-file: LICENSE
|
||||||
|
author: Matthias Schiffer
|
||||||
|
maintainer: matthias@gamezock.de
|
||||||
|
build-depends: base >= 4, syb, containers, mtl, time, X11, OpenGL
|
||||||
|
build-type: Simple
|
||||||
|
|
||||||
|
executable: HTanks
|
||||||
|
main-is: HTanks.hs
|
||||||
|
other-modules: Bindings.GLX, Bindings.GLPng
|
||||||
|
ghc-options: -threaded
|
||||||
|
extra-libraries: glpng
|
Reference in a new issue