diff options
author | madpilot <madpilot@FreeBSD.org> | 2012-07-18 19:27:01 +0800 |
---|---|---|
committer | madpilot <madpilot@FreeBSD.org> | 2012-07-18 19:27:01 +0800 |
commit | 5218a3b59010f2ff909c3c62bfe9951f97663d9e (patch) | |
tree | 6d2f521e8ca666801d62ff9807f6941864c3d770 /games | |
parent | bc0c93f6ed6b068234a3e21dda1433e9fe3c6131 (diff) | |
download | freebsd-ports-gnome-5218a3b59010f2ff909c3c62bfe9951f97663d9e.tar.gz freebsd-ports-gnome-5218a3b59010f2ff909c3c62bfe9951f97663d9e.tar.zst freebsd-ports-gnome-5218a3b59010f2ff909c3c62bfe9951f97663d9e.zip |
A simple first person shooter of blowing up asteroids in 3D space.
The codebase also serves as an introduction to trigonometry and OpenGL.
WWW: http://sourceforge.net/projects/a3d/
http://staff.psc.edu/smp/a3d/
PR: ports/168177
Submitted by: nemysis@gmx.ch
Approved by: tabthorpe (mentor)
Diffstat (limited to 'games')
-rw-r--r-- | games/Makefile | 1 | ||||
-rw-r--r-- | games/asteroids3d/Makefile | 62 | ||||
-rw-r--r-- | games/asteroids3d/distinfo | 4 | ||||
-rw-r--r-- | games/asteroids3d/files/patch-src-texture.c | 28 | ||||
-rw-r--r-- | games/asteroids3d/pkg-descr | 5 |
5 files changed, 100 insertions, 0 deletions
diff --git a/games/Makefile b/games/Makefile index 91e55aca83d4..d2abc7a5ea6c 100644 --- a/games/Makefile +++ b/games/Makefile @@ -48,6 +48,7 @@ SUBDIR += asc SUBDIR += asciiquarium SUBDIR += assaultcube + SUBDIR += asteroids3d SUBDIR += atanks SUBDIR += atitd SUBDIR += atlantikdesigner diff --git a/games/asteroids3d/Makefile b/games/asteroids3d/Makefile new file mode 100644 index 000000000000..a40092e5c6e6 --- /dev/null +++ b/games/asteroids3d/Makefile @@ -0,0 +1,62 @@ +# New Ports collection makefile for: Asteroids3D +# Date created: 2012-05-20 +# Whom: nemysis@gmx.ch +# +# $FreeBSD$ +# + +PORTNAME= asteroids3d +PORTVERSION= 0.5.1 +CATEGORIES= games +MASTER_SITES= SF/a3d/${PORTVERSION}/ \ + LOCAL/madpilot/asteroids3d/:icons +DISTNAME= ${PORTNAME:S/3d/3D/}-${DISTVERSION} +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ + asteroids3d_icons.tbz:icons + +MAINTAINER= nemysis@gmx.ch +COMMENT= First-person shooter blowing up asteroids in 3D space + +LICENSE= GPLv2 + +WRKSRC= ${WRKDIR}/${PORTNAME:S/3d/3D/}-${PORTVERSION} + +USE_BZIP2= yes +USE_AUTOTOOLS= aclocal autoheader +GNU_CONFIGURE= yes +CONFIGURE_ENV= with_gamesdir="${PREFIX}/bin" with_gamedatadir="${DATADIR}" +USE_GL= glut glu +MAKE_JOBS_SAFE= yes + +CFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib + +PLIST_FILES= bin/${PORTNAME} \ + share/pixmaps/${PORTNAME}_128.png \ + share/pixmaps/${PORTNAME}_48.png + +PORTDATA= * +PORTDOCS= README.html + +pre-configure: + @(cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./autogen.sh) + +post-patch: + @${REINPLACE_CMD} -e 's|/bin/bash|/bin/sh|g' ${WRKSRC}/autogen.sh + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME:S/3d/3D/} ${PREFIX}/bin/${PORTNAME} +# Pixmaps + ${INSTALL_DATA} ${WRKDIR}/${PORTNAME}*.png ${PREFIX}/share/pixmaps +# Data +.if !defined(NOPORTDATA) + ${MKDIR} ${DATADIR} + @(cd ${WRKSRC}/src && ${COPYTREE_SHARE} "*.ub *.ppm" ${DATADIR}) +.endif +# Documentation +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README.html ${DOCSDIR} +.endif + +.include <bsd.port.mk> diff --git a/games/asteroids3d/distinfo b/games/asteroids3d/distinfo new file mode 100644 index 000000000000..f1969e8e959f --- /dev/null +++ b/games/asteroids3d/distinfo @@ -0,0 +1,4 @@ +SHA256 (asteroids3D-0.5.1.tar.bz2) = 68a07541198591c7a010324d870d120932c2dc015981f9197fe2268964a45087 +SIZE (asteroids3D-0.5.1.tar.bz2) = 584201 +SHA256 (asteroids3d_icons.tbz) = e8ed4bd8119e19b6cb423cd00c9b305490edd0e30600c227786f8cbd5bd442a9 +SIZE (asteroids3d_icons.tbz) = 4023 diff --git a/games/asteroids3d/files/patch-src-texture.c b/games/asteroids3d/files/patch-src-texture.c new file mode 100644 index 000000000000..d36d3dce6501 --- /dev/null +++ b/games/asteroids3d/files/patch-src-texture.c @@ -0,0 +1,28 @@ +--- src/texture.c.orig 2008-04-06 16:37:29.000000000 +0200 ++++ src/texture.c 2012-05-20 11:27:24.000000000 +0200 +@@ -99,19 +99,19 @@ + static void average_RGBA_alpha_and_floor(unsigned char *image, + int x, int y, int flr) + { +- int ir, ig, ib, ia, i, new_alpha; ++ int ir, ig, ib, ia, i; + + for (i = 0; i < x * y * 4; i += 4) { + ir = image[i]; + ig = image[i+1]; + ib = image[i+2]; +- ia = image[i+3]; ++ /* ia = image[i+3]; */ + +- new_alpha = (ir + ig + ib) / 3; +- if (new_alpha < flr) +- new_alpha = 0; ++ ia = (ir + ig + ib) / 3; ++ if (ia < flr) ++ ia = 0; + +- image[i+3] = new_alpha; ++ image[i+3] = ia; + } + + return; diff --git a/games/asteroids3d/pkg-descr b/games/asteroids3d/pkg-descr new file mode 100644 index 000000000000..62c8c1b45817 --- /dev/null +++ b/games/asteroids3d/pkg-descr @@ -0,0 +1,5 @@ +A simple first person shooter of blowing up asteroids in 3D space. +The codebase also serves as an introduction to trigonometry and OpenGL. + +WWW: http://sourceforge.net/projects/a3d/ + http://staff.psc.edu/smp/a3d/ |