1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

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)
This commit is contained in:
Guido Falsi 2012-07-18 11:27:01 +00:00
parent 977e73b396
commit 91907a3009
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=301078
5 changed files with 100 additions and 0 deletions

View File

@ -48,6 +48,7 @@
SUBDIR += asc
SUBDIR += asciiquarium
SUBDIR += assaultcube
SUBDIR += asteroids3d
SUBDIR += atanks
SUBDIR += atitd
SUBDIR += atlantikdesigner

View File

@ -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>

View File

@ -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

View File

@ -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;

View File

@ -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/