packages feed

nehe-tuts 0.1 → 0.1.1

raw patch · 11 files changed

+229/−1 lines, 11 filesbinary-added

Files

+ Data/Crate.bmp view

binary file changed (absent → 196662 bytes)

+ Data/NeHe.bmp view

binary file changed (absent → 196662 bytes)

+ Data/Star.bmp view

binary file changed (absent → 49206 bytes)

+ Data/cube.bmp view

binary file changed (absent → 49220 bytes)

+ Data/glass.bmp view

binary file changed (absent → 49220 bytes)

+ Data/mud.bmp view

binary file changed (absent → 196662 bytes)

+ Data/tim.bmp view

binary file changed (absent → 196662 bytes)

+ Data/world.txt view
@@ -0,0 +1,160 @@++NUMPOLLIES 36++// Floor 1+-3.0  0.0 -3.0 0.0 6.0+-3.0  0.0  3.0 0.0 0.0+ 3.0  0.0  3.0 6.0 0.0++-3.0  0.0 -3.0 0.0 6.0+ 3.0  0.0 -3.0 6.0 6.0+ 3.0  0.0  3.0 6.0 0.0++// Ceiling 1+-3.0  1.0 -3.0 0.0 6.0+-3.0  1.0  3.0 0.0 0.0+ 3.0  1.0  3.0 6.0 0.0+-3.0  1.0 -3.0 0.0 6.0+ 3.0  1.0 -3.0 6.0 6.0+ 3.0  1.0  3.0 6.0 0.0++// A1++-2.0  1.0  -2.0 0.0 1.0+-2.0  0.0  -2.0 0.0 0.0+-0.5  0.0  -2.0 1.5 0.0+-2.0  1.0  -2.0 0.0 1.0+-0.5  1.0  -2.0 1.5 1.0+-0.5  0.0  -2.0 1.5 0.0++// A2++ 2.0  1.0  -2.0 2.0 1.0+ 2.0  0.0  -2.0 2.0 0.0+ 0.5  0.0  -2.0 0.5 0.0+ 2.0  1.0  -2.0 2.0 1.0+ 0.5  1.0  -2.0 0.5 1.0+ 0.5  0.0  -2.0 0.5 0.0++// B1++-2.0  1.0  2.0 2.0  1.0+-2.0  0.0   2.0 2.0 0.0+-0.5  0.0   2.0 0.5 0.0+-2.0  1.0  2.0 2.0  1.0+-0.5  1.0  2.0 0.5  1.0+-0.5  0.0   2.0 0.5 0.0++// B2++ 2.0  1.0  2.0 2.0  1.0+ 2.0  0.0   2.0 2.0 0.0+ 0.5  0.0   2.0 0.5 0.0+ 2.0  1.0  2.0 2.0  1.0+ 0.5  1.0  2.0 0.5  1.0+ 0.5  0.0   2.0 0.5 0.0++// C1++-2.0  1.0  -2.0 0.0  1.0+-2.0  0.0   -2.0 0.0 0.0+-2.0  0.0   -0.5 1.5 0.0+-2.0  1.0  -2.0 0.0  1.0+-2.0  1.0  -0.5 1.5  1.0+-2.0  0.0   -0.5 1.5 0.0++// C2++-2.0  1.0   2.0 2.0 1.0+-2.0  0.0   2.0 2.0 0.0+-2.0  0.0   0.5 0.5 0.0+-2.0  1.0  2.0 2.0 1.0+-2.0  1.0  0.5 0.5 1.0+-2.0  0.0   0.5 0.5 0.0++// D1++2.0  1.0  -2.0 0.0 1.0+2.0  0.0   -2.0 0.0 0.0+2.0  0.0   -0.5 1.5 0.0+2.0  1.0  -2.0 0.0 1.0+2.0  1.0  -0.5 1.5 1.0+2.0  0.0   -0.5 1.5 0.0++// D2++2.0  1.0  2.0 2.0 1.0+2.0  0.0   2.0 2.0 0.0+2.0  0.0   0.5 0.5 0.0+2.0  1.0  2.0 2.0 1.0+2.0  1.0  0.5 0.5 1.0+2.0  0.0   0.5 0.5 0.0++// Upper hallway - L+-0.5  1.0  -3.0 0.0 1.0+-0.5  0.0   -3.0 0.0 0.0+-0.5  0.0   -2.0 1.0 0.0+-0.5  1.0  -3.0 0.0 1.0+-0.5  1.0  -2.0 1.0 1.0+-0.5  0.0   -2.0 1.0 0.0++// Upper hallway - R+0.5  1.0  -3.0 0.0 1.0+0.5  0.0   -3.0 0.0 0.0+0.5  0.0   -2.0 1.0 0.0+0.5  1.0  -3.0 0.0 1.0+0.5  1.0  -2.0 1.0 1.0+0.5  0.0   -2.0 1.0 0.0++// Lower hallway - L+-0.5  1.0  3.0 0.0 1.0+-0.5  0.0   3.0 0.0 0.0+-0.5  0.0   2.0 1.0 0.0+-0.5  1.0  3.0 0.0 1.0+-0.5  1.0  2.0 1.0 1.0+-0.5  0.0   2.0 1.0 0.0++// Lower hallway - R+0.5  1.0  3.0 0.0 1.0+0.5  0.0   3.0 0.0 0.0+0.5  0.0   2.0 1.0 0.0+0.5  1.0  3.0 0.0 1.0+0.5  1.0  2.0 1.0 1.0+0.5  0.0   2.0 1.0 0.0+++// Left hallway - Lw++-3.0  1.0  0.5 1.0 1.0+-3.0  0.0   0.5 1.0 0.0+-2.0  0.0   0.5 0.0 0.0+-3.0  1.0  0.5 1.0 1.0+-2.0  1.0  0.5 0.0 1.0+-2.0  0.0   0.5 0.0 0.0++// Left hallway - Hi++-3.0  1.0  -0.5 1.0 1.0+-3.0  0.0   -0.5 1.0 0.0+-2.0  0.0   -0.5 0.0 0.0+-3.0  1.0  -0.5 1.0 1.0+-2.0  1.0  -0.5 0.0 1.0+-2.0  0.0   -0.5 0.0 0.0++// Right hallway - Lw++3.0  1.0  0.5 1.0 1.0+3.0  0.0   0.5 1.0 0.0+2.0  0.0   0.5 0.0 0.0+3.0  1.0  0.5 1.0 1.0+2.0  1.0  0.5 0.0 1.0+2.0  0.0   0.5 0.0 0.0++// Right hallway - Hi++3.0  1.0  -0.5 1.0 1.0+3.0  0.0   -0.5 1.0 0.0+2.0  0.0   -0.5 0.0 0.0+3.0  1.0  -0.5 1.0 1.0+2.0  1.0 -0.5 0.0 1.0+2.0  0.0   -0.5 0.0 0.0
+ Makefile view
@@ -0,0 +1,27 @@+GHC = ghc+FLAGS = -Wall -Werror -O2+lessons = lesson*.hs++default: $(lessons)++usage:+	@echo "Usage: make lessonXY"+	@echo "  Or"+	@echo "Usage: make lessonXY.hs"+	@echo "Current lessons available are:" $(lessons)++.PHONY: $(lessons)++#this is nice so you can type "make *"+$(lessons)::+	$(GHC) $(FLAGS) --make $@ -o $(subst .hs,,$@)++#with this rule you can type "make lessonXY"+% :: %.hs+	$(GHC) $(FLAGS) --make $< -o $@++clean:+	rm -rf *.o *.hi++distclean:+	rm -rf *.o *.hi lesson[0-9][0-9]
+ README view
@@ -0,0 +1,40 @@+These examples were created by Jeff Molofee '99 NeHe of http://nehe.gamedev.net++Converted to Haskell by Jason Dagit, 2005.  As far as I know, all+examples require GHC and the HOpenGL and GLUT libraries. I've tried +not to add anything else as a requirement (although look into the +nehe-tuts.cabal file to make sure).  +This code is tested on OSX and MS Windows only.  If you try it on +another platform and it works for you, then please let me know.++Usage of Makefile:++make lessonXY            # this will build just lessonXY+make lessonXY.hs         # same as above rule, convienent for tab completion.+make                     # build everything+make clean               # gets rid of the .hs and .o files+make distclean           # make clean and get rid of the binaries++Usage of Cabal package:++runhaskell Setup.hs configure+runhaskell Setup.hs build+# And here you are, all the executables ready to run.++If you are having problems with installing OpenGL bindings, or some weird linker+problems during compilation on MS Windows, please see this page:++http://netsuperbrain.com/blog/posts/freeglut-windows-hopengl-hglut/++Make sure to follow all the steps precisely; if something still fails, start from +scratch: you've forgotten a step.+++Acknowldegements:+I want to thank #haskell on irc.freenode.net for support and general+help.  Especially to Lemmih for supplying example code.++Authors:+Jeff Molofee aka NeHe+Jason Dagit <dagit@codersbase.com> (All the code)+Eugene Kirpichov <ekirpichov@gmail.com> (Cabal package)
nehe-tuts.cabal view
@@ -1,5 +1,5 @@ Name:   nehe-tuts
-Version: 0.1
+Version: 0.1.1
 Synopsis:   Port of the NeHe OpenGL tutorials to Haskell.
 Description:    Port of the NeHe OpenGL tutorials to Haskell; so far only lessons 1-12 have been ported.
 Author: Jason Dagit
@@ -9,6 +9,7 @@ Category: Graphics
 Cabal-Version:  >= 1.2
 Build-type: Simple
+Extra-Source-Files: README, Makefile, Data/Crate.bmp, Data/Star.bmp, Data/glass.bmp, Data/tim.bmp, Data/NeHe.bmp, Data/cube.bmp, Data/mud.bmp, Data/world.txt
 Executable lesson01
     Main-is: lesson01.hs
     Other-Modules: Util