diff options
author | Nick White <git@njw.me.uk> | 2010-08-06 00:25:32 +0100 |
---|---|---|
committer | Nick White <git@njw.me.uk> | 2010-08-06 00:25:32 +0100 |
commit | 8665cb69efbee6a6e896fa00d69db8aa8b8a691a (patch) | |
tree | bd7f601692ae99de629747b98d0aaefe76731b37 | |
parent | c9757c5715a67f433eeb0d8cfaaf38607a7db73f (diff) |
Updated web page, set defaults from config.h
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile | 20 | ||||
-rw-r--r-- | TODO | 2 | ||||
-rw-r--r-- | config.def.h | 4 | ||||
-rw-r--r-- | spout.c | 3 | ||||
-rw-r--r-- | web/doapbutton.sh | 28 | ||||
-rw-r--r-- | web/doapheader.sh | 30 | ||||
-rw-r--r-- | web/footer.html | 1 | ||||
-rw-r--r-- | web/header.html (renamed from web/makepage.sh) | 24 | ||||
-rw-r--r-- | web/index.html | 42 | ||||
-rw-r--r-- | web/index.txt | 37 | ||||
-rw-r--r-- | web/screen.png | bin | 2625 -> 2280 bytes | |||
-rw-r--r-- | web/summary.sh (renamed from web/doapfooter.sh) | 0 |
13 files changed, 61 insertions, 132 deletions
@@ -1,2 +1,4 @@ *.o spout +web/index.html +web/releases @@ -7,14 +7,14 @@ TARGETS = $(NAME) OBJ = $(SRC:.c=.o) MAN = $(TARGETS:=.1) -HEADERS = spout.h font.h sintable.h +HEADERS = spout.h config.def.h font.h sintable.h WEB = web/index.html include config.mk all: $(TARGETS) -$(OBJ): config.mk $(HEADERS) +$(OBJ): config.mk config.h $(HEADERS) .c.o: @echo CC $< @@ -24,9 +24,17 @@ $(TARGETS): $(OBJ) @echo LD $@ @cc -o $@ $(OBJ) $(LDFLAGS) -$(WEB): web/doap.ttl +config.h: + @echo creating $@ from config.def.h + @cp config.def.h $@ + +$(WEB): web/index.txt web/header.html web/footer.html web/doap.ttl @echo making webpage - @sh web/makepage.sh "Spout - A simple caveflying game" web/doap.ttl > $(WEB) + @cat web/header.html > $@ + @smu < web/index.txt >> $@ + @echo '<hr />' >> $@ + @sh web/summary.sh web/doap.ttl | smu >> $@ + @cat web/footer.html >> $@ clean: rm -f -- $(TARGETS) $(WEB) $(OBJ) $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION).tar.gz.sig @@ -36,8 +44,8 @@ dist: clean @cp -R $(SRC) $(HEADERS) Makefile config.mk COPYING README $(NAME)-$(VERSION) @for i in $(MAN); do \ sed "s/VERSION/$(VERSION)/g" < $$i > $(NAME)-$(VERSION)/$$i; done - @tar -c $(NAME)-$(VERSION) | gzip -c > $(NAME)-$(VERSION).tar.gz - @gpg -b < $(NAME)-$(VERSION).tar.gz > $(NAME)-$(VERSION).tar.gz.sig + @tar -c $(NAME)-$(VERSION) | gzip -c > web/releases/$(NAME)-$(VERSION).tar.gz + @gpg -b < web/releases/$(NAME)-$(VERSION).tar.gz > web/releases/$(NAME)-$(VERSION).tar.gz.sig @rm -rf $(NAME)-$(VERSION) @echo $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION).tar.gz.sig @@ -1,6 +1,6 @@ remove functions which are more trouble than they're worth check function return values more -set controls and default zoom and fullscreen in config.h +set controls in config.h move useful stuff from spout.h to spout.c rewrite control handling change pause to P or PauseBreak diff --git a/config.def.h b/config.def.h new file mode 100644 index 0000000..44c2432 --- /dev/null +++ b/config.def.h @@ -0,0 +1,4 @@ +/* See COPYING file for copyright, license and warranty details */ + +int fullscreen = 0; +int zoom = 4; @@ -12,6 +12,7 @@ #include "spout.h" #include "sintable.h" #include "font.h" +#include "config.h" #define FRAMERATE 50 #define MAX_GRAIN 500 @@ -67,8 +68,6 @@ int nGrain; int time = FRAMERATE * 60, score = 0, height = 0, dispscore = 0; int hiScore[2] = {0, 0}; int dispPos, upperLine, rollCount; -int fullscreen = 0; -int zoom = 4; char score_path[512]; SDL_Surface *video, *layer; diff --git a/web/doapbutton.sh b/web/doapbutton.sh deleted file mode 100644 index 21da477..0000000 --- a/web/doapbutton.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -test $# -ne 1 && echo "usage: $0 doap" && exit 1 - -rdf="$1" - -q="PREFIX doap: <http://usefulinc.com/ns/doap#> -PREFIX foaf: <http://xmlns.com/foaf/0.1/> -SELECT ?name ?ver ?file -WHERE { -?p a doap:Project; - doap:name ?name; - doap:release ?rel. -?rel doap:revision ?ver; - doap:file-release ?file. -}" - -roqet -q -r csv -e "$q" -D /dev/stdin < $rdf | sed '/^Result/d' \ -| while read r; do - name=`echo $r | awk -F , '{print $2}'| sed -e 's/"\(.*\)"/\1/'` - version=`echo $r | awk -F , '{print $3}'| sed -e 's/"\(.*\)"/\1/'` - fileurl=`echo $r | awk -F , '{print $4}'| sed -e 's/uri(\(.*\))/\1/'` - - cat <<- _EOF_ -### [Download $name $version]($fileurl) -### ([GPG signature]($fileurl.sig)) -_EOF_ -done diff --git a/web/doapheader.sh b/web/doapheader.sh deleted file mode 100644 index ca2b5f9..0000000 --- a/web/doapheader.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -test $# -ne 1 && echo "usage: $0 doap" && exit 1 - -rdf="$1" - -q="PREFIX doap: <http://usefulinc.com/ns/doap#> -PREFIX foaf: <http://xmlns.com/foaf/0.1/> -SELECT ?name ?desc -WHERE { -?p a doap:Project; - doap:name ?name; - doap:description ?desc. -}" - -roqet -q -r csv -e "$q" -D /dev/stdin < $rdf | sed '/^Result/d' \ -| while read r; do - name=`echo $r | awk -F , '{print $2}'| sed -e 's/"\(.*\)"/\1/'` - desc=`echo $r | awk -F , '{print $3}'| sed -e 's/"\(.*\)"/\1/'` - - cat <<- _EOF_ -$name -======================================================================= - -About ------ - -$desc -_EOF_ -done diff --git a/web/footer.html b/web/footer.html new file mode 100644 index 0000000..62b274f --- /dev/null +++ b/web/footer.html @@ -0,0 +1 @@ +</body></html> diff --git a/web/makepage.sh b/web/header.html index b2ad2ce..fed7a0b 100644 --- a/web/makepage.sh +++ b/web/header.html @@ -1,10 +1,3 @@ -#!/bin/sh - -test $# -ne 2 && echo "usage: $0 title doap" && exit 1 - -title="$1" - -cat <<- _EOF_ <!DOCTYPE html><html><head> <style type="text/css"> body { font-family: sans-serif; max-width: 75%; margin: auto; @@ -19,20 +12,5 @@ h3 a:hover { text-decoration: underline } img { display: block; margin: auto; } </style> <link rel="alternate" type="text/turtle" title="rdf" href="doap.ttl" /> -<title>$title</title> +<title>Spout - A simple caveflying game</title> </head><body> -_EOF_ - -sh web/doapheader.sh "$2" | smu - -echo "![screenshot of $title](screen.png)"|smu - -sh web/doapbutton.sh "$2" | smu - -tail -n 12 < README | smu # history - -echo "- - -"|smu - -sh web/doapfooter.sh "$2" |smu - -echo "</body></html>" diff --git a/web/index.html b/web/index.html deleted file mode 100644 index 6fc6497..0000000 --- a/web/index.html +++ /dev/null @@ -1,42 +0,0 @@ -<!DOCTYPE html><html><head> -<style type="text/css"> -body { font-family: sans-serif; max-width: 75%; margin: auto; -background: url(small.png) no-repeat 86% 2px; } -h1 { font-size: 1.6em; text-align: center; margin-bottom: 0.2em; } -h2 { font-size: 1.2em; border-bottom: thin solid black; margin-top: 0.1em; } -h3 { border: thin solid black; margin: auto; background: #cd2f2f; -max-width: 15em; text-align: center; padding: 0.2em; margin-bottom: 0.3em; } -h3:hover { background: #ff9657; } -h3 a { color: black; text-decoration: none } -h3 a:hover { text-decoration: underline } -img { display: block; margin: auto; } -</style> -<link rel="alternate" type="text/turtle" title="rdf" href="doap.ttl" /> -<title>Spout - A simple caveflying game</title> -</head><body> - -<h1>Spout</h1> - -<h2>About</h2> -<p>Spout is a simple caveflying game. The aim is to get as high as possible avoiding or destroying obstacles.</p> -<p><img src="screen.png" alt="screenshot of Spout - A simple caveflying game" /></p> -<h3><a href="http://njw.me.uk/software/spout/spout-1.4.tar.gz">Download Spout 1.4</a><br /> -(<a href="http://njw.me.uk/software/spout/spout-1.4.tar.gz.sig">GPG signature</a>)</h3> - -<h2>History</h2> -<p>Spout was originally written for a handheld by kuni, and soon -afterwards was ported to Windows using cygwin and sdl and released -under the MIT license.</p> -<p>In 2004 a 'unix version' was released, which mostly just slapped -autotools into the windows version and infringed the license.</p> -<p>This is a new unix version, based on the original Windows code by -kuni, which aims to add useful features and simplify the code.</p> -<hr /> -<ul> -<li>Project homepage: <a href="http://njw.me.uk/software/spout">http://njw.me.uk/software/spout</a></li> -<li>Code repository: <a href="http://git.njw.me.uk/spout.git">http://git.njw.me.uk/spout.git</a></li> -<li>Maintainer: <a href="http://njw.me.uk">Nick White</a></li> -<li>Language: C</li> -<li>License: <a href="http://creativecommons.org/licenses/MIT/">MIT</a></li> -</ul> -</body></html> diff --git a/web/index.txt b/web/index.txt new file mode 100644 index 0000000..4fa26ad --- /dev/null +++ b/web/index.txt @@ -0,0 +1,37 @@ +Spout +======================================================================= + +About +----- + +Spout is a simple caveflying game. The aim is to get as high as +possible avoiding or destroying obstacles. + +![Screenshot of Spout](screen.png) + +It should work on any *nix system with SDL libraries installed. + +Spout is free software released under the terms of the MIT license. + +### [Download Spout 1.4](releases/spout-1.4.tar.gz) +### ([GPG signature](releases/spout-1.4.tar.gz.sig)) + +History +------- + +Spout was originally written for a handheld by kuni, and soon +afterwards was ported to Windows using cygwin and sdl and released +under the MIT license. + +In 2004 a 'unix version' was released, which mostly just slapped +autotools into the windows version and infringed the license. + +This is a new unix version, based on the original Windows code by +kuni, which aims to add useful features and simplify the code. + +Development +----------- + +Please send any patches, bugs or general thoughts to me by +[email](http://njw.me.uk/contact). A list of current issues to +work on can be found in the TODO file in the repository. diff --git a/web/screen.png b/web/screen.png Binary files differindex 07b6714..6a20078 100644 --- a/web/screen.png +++ b/web/screen.png diff --git a/web/doapfooter.sh b/web/summary.sh index ef58225..ef58225 100644 --- a/web/doapfooter.sh +++ b/web/summary.sh |