This is a port of glasteroids-1.0, 3D Asteroids game clone for

X Window System. The goal is simple: Don't get killed.

PR:		13267
Submitted by:	Andrey Zakhvatov <andy@icc.surw.chel.su>
This commit is contained in:
Chris D. Faulhaber 1999-12-23 21:39:31 +00:00
parent 9f1edca218
commit e94fcf41dc
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=23939
9 changed files with 148 additions and 0 deletions

View file

@ -0,0 +1,45 @@
# New ports collection makefile for: glasteroids
# Version required: 1.0
# Date created: 16 August 1999
# Whom: Andrey Zakhvatov
#
# $FreeBSD$
#
DISTNAME= Glasteriods
PKGNAME= glasteroids-1.0
CATEGORIES= games
MASTER_SITES= http://www.honors.montana.edu/~jjc/Glasteroids/
MAINTAINER= andy@icc.surw.chel.su
LIB_DEPENDS= MesaGL.14:${PORTSDIR}/graphics/Mesa3 \
MesaGLU.14:${PORTSDIR}/graphics/Mesa3 \
glut.3:${PORTSDIR}/graphics/Mesa3
MAKEFILE= Makefile.FreeBSD
WRKSRC= ${WRKDIR}/Glasteroids
USE_X_PREFIX= yes
pre-build:
@ ${CP} ${FILESDIR}/Makefile.FreeBSD ${WRKSRC}
do-install:
@ ${INSTALL_PROGRAM} ${WRKSRC}/Glasteroids ${PREFIX}/bin/glasteroids
@ ${MKDIR} ${PREFIX}/share/glasteroids
@ ${INSTALL_DATA} ${WRKSRC}/gameText.txf ${PREFIX}/share/glasteroids
@ cd ${WRKSRC}; tar -cf - scores.txt textures | \
( cd ${PREFIX}/share/glasteroids; tar -xf - )
@ chmod a+rx ${PREFIX}/share/glasteroids/textures
@ chmod a+rw ${PREFIX}/share/glasteroids/scores.txt
post-install:
.if !defined(NOPORTDOCS)
@ ${MKDIR} ${PREFIX}/share/doc/glasteroids
@ ${INSTALL_DATA} ${WRKSRC}/COPYING ${PREFIX}/share/doc/glasteroids
@ ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/glasteroids
.endif
.include <bsd.port.mk>

View file

@ -0,0 +1 @@
MD5 (Glasteriods.tar.gz) = d7e0bd2a2fc21724b35e4bfc318fc2bc

View file

@ -0,0 +1,31 @@
SRCS = Glasteroids.cxx Bobcat.cxx MarchingCubes.cxx BCship.cxx BCobject.cxx\
BCcollide.cxx GlutFunctions.cxx BCmenu.cxx BCenemy.cxx TexFont.cxx \
SplashScreen.cxx
OBJS = Glasteroids.o Bobcat.o MarchingCubes.o BCship.o BCobject.o\
BCcollide.o GlutFunctions.o BCmenu.o BCenemy.o TexFont.o \
SplashScreen.o
CXX ?= c++
PROG = Glasteroids
LIBES = -lglut -lMesaGLU -lMesaGL -lXmu -lX11 -lXext -lm -lXi
INCDIR = -I/usr/X11R6/include
LIBDIR = -L/usr/X11R6/lib
PREFIX ?= /usr/X11R6
.SUFFIXES: .cxx .o
.cxx.o:
$(CXX) $(CXXFLAGS) -DPREFIX=\"${PREFIX}\" -c $< $(INCDIR)
all: $(PROG)
$(PROG): $(OBJS)
$(CXX) -o $(PROG) -Wall $(OBJS) $(LIBDIR) $(LIBES)
clean:
rm -f *.o *~ $(PROG)
depend:
makedepend -- $(INCDIR) -- $(SRCS)

View file

@ -0,0 +1,11 @@
--- BCmenu.h Thu Aug 12 04:48:58 1999
+++ /home/andy/tmp/wrk/BCmenu.h Tue Aug 17 15:28:12 1999
@@ -23,7 +23,7 @@
#include "BCincludes.h"
#include "TexFont.h"
-#define HIGH_SCORE_FILE "scores.txt"
+#define HIGH_SCORE_FILE PREFIX "/share/glasteroids/scores.txt"
#define MAX_HIGH_SCORES 10
#define MAX_NAME_LENGTH 10

View file

@ -0,0 +1,19 @@
--- Bobcat.cxx Thu Aug 12 04:48:58 1999
+++ /home/andy/tmp/wrk/Bobcat.cxx Tue Aug 17 15:28:23 1999
@@ -111,14 +111,14 @@
glutIdleFunc ( InternalIdle );
- font = txfLoadFont ( "gameText.txf" );
+ font = txfLoadFont ( PREFIX "/share/glasteroids/gameText.txf" );
Menu = new BCmenu ( font );
InitTextures ( );
InitOpenGL ( );
- LoadSplashScreen ( "textures/splash.raw" );
+ LoadSplashScreen ( PREFIX "/share/glasteroids/textures/splash.raw" );
numActiveDust = 0;
for ( i = 0; i < MAX_ASTEROID_DUST_SYSTEMS; i++ )

View file

@ -0,0 +1,21 @@
--- Glasteroids.cxx Thu Aug 12 04:48:58 1999
+++ /home/andy/tmp/wrk/Glasteroids.cxx Tue Aug 17 15:11:12 1999
@@ -1,5 +1,8 @@
#include <stdlib.h>
#include <time.h>
+#ifdef __FreeBSD__
+#include <floatingpoint.h>
+#endif
#include "Bobcat.h"
/*
@@ -75,6 +78,9 @@
{
BCworld *world;
+#ifdef __FreeBSD__
+ fpsetmask(0);
+#endif
world = BCgetWorld ( );
world->InitWorld ( argc, argv,"Glasteroids", 640, 480, 100 );

View file

@ -0,0 +1 @@
3D Asteroids game for X Window System

View file

@ -0,0 +1,7 @@
3D Asteroids game clone for X Window System.
The goal is simple: Don't get killed.
Feel free to email questions, comments, ideas,
etc. to cohen@cs.montana.edu
WWW: http://www.honors.montana.edu/~jjc/Glasteroids/

View file

@ -0,0 +1,12 @@
bin/glasteroids
share/doc/glasteroids/COPYING
share/doc/glasteroids/README
share/glasteroids/gameText.txf
@mode 666
share/glasteroids/scores.txt
@mode
share/glasteroids/textures/splash.raw
share/glasteroids/textures/splash_non.raw
@dirrm share/doc/glasteroids
@dirrm share/glasteroids/textures
@dirrm share/glasteroids