summaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1994-09-21 12:22:34 +0000
committerjkh <jkh@FreeBSD.org>1994-09-21 12:22:34 +0000
commitc78ec29d50ac3549fe65e905394344c839fc7a6e (patch)
tree13882ea8fc51f0ab549847931cd8b1143cede16a /games
parentab091f2cc0348316fcb5c1b5b5371cfca79972af (diff)
downloadFreeBSD-ports-c78ec29d50ac3549fe65e905394344c839fc7a6e.zip
FreeBSD-ports-c78ec29d50ac3549fe65e905394344c839fc7a6e.tar.gz
The X11 jetpack game, from Jean-Marc Zucconi.
Submitted by: Jean-Marc Zucconi
Diffstat (limited to 'games')
-rw-r--r--games/jetpack/Makefile9
-rw-r--r--games/jetpack/files/patch-aa64
-rw-r--r--games/jetpack/files/patch-ab23
-rw-r--r--games/jetpack/files/patch-ac84
-rw-r--r--games/jetpack/files/patch-ad19
-rw-r--r--games/jetpack/files/patch-ae25
-rw-r--r--games/jetpack/pkg-comment1
-rw-r--r--games/jetpack/pkg-descr11
-rw-r--r--games/jetpack/pkg-plist7
9 files changed, 243 insertions, 0 deletions
diff --git a/games/jetpack/Makefile b/games/jetpack/Makefile
new file mode 100644
index 0000000..a1d0860
--- /dev/null
+++ b/games/jetpack/Makefile
@@ -0,0 +1,9 @@
+DISTNAME= jetpack
+DISTFILES= jetpack.tar.Z
+USE_IMAKE= yes
+MASTER_SITES= ftp://iraun1.ira.uka.de:/pub/x11/
+
+pre-install:
+ @(cd ${WRKSRC}; ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} install.man)
+
+.include <bsd.port.mk>
diff --git a/games/jetpack/files/patch-aa b/games/jetpack/files/patch-aa
new file mode 100644
index 0000000..0f84c1a
--- /dev/null
+++ b/games/jetpack/files/patch-aa
@@ -0,0 +1,64 @@
+From: dan@netlabs.com (Daniel Ketcham)
+Newsgroups: comp.sources.games.bugs
+Subject: Re: jetpack out of memory error with no -DBLIT
+Message-ID: <1992Mar27.010041.13217@netlabs.com>
+Date: 27 Mar 92 01:00:41 GMT
+
+In article <328@bain3.bain.oz.au>, callum@bain3.bain.oz.au (Callum Gibson) writes:
+> I compiled jetpack (which was just posted) in the default way with the -DBLIT
+> define in tact. However, the response time was several seconds. I thought
+> I'd try it without the -DBLIT to see if it would speed up. It compiled okay
+> but when run it failed immediately with an out of memory error. I knocked
+> up a little program to read the a.out header and discovered that with -DBLIT
+> the bss (uninitialised data segment) was around 344K but without the BLIT
+> it was 52Mb !!!!! It was obvious now why it ran out.
+
+The problem seems to be in that there is an array of around 10,000 elements
+that has as one of its elements an array of (you guessed it) 10,000! ints.
+I looked at the code a little and came up with the following patch.
+Running with this patch I had no problem.
+
+Dan Ketcham
+
+*** erase.c.orig Wed Mar 25 17:19:41 1992
+--- erase.c Thu Mar 26 11:19:35 1992
+***************
+*** 11,16 ****
+--- 11,17 ----
+
+ #ifndef BLIT
+
++ #define MAXTOUCH 10
+ #define MAXOBJECTS 6+MAXLINES+MAXFIREBALLS+MAXSWEEPERS+MAXFUELPODS+MAXGUARDS+MAXHIGHSCORES/5
+
+ /* Structure for eraseable zones that minimize flicker
+***************
+*** 19,25 ****
+ int type, num;
+ int x, y, w, h;
+ int numtouch;
+! int touch[MAXOBJECTS];
+ int erased, drawn;
+ };
+
+--- 20,26 ----
+ int type, num;
+ int x, y, w, h;
+ int numtouch;
+! int touch[MAXTOUCH];
+ int erased, drawn;
+ };
+
+***************
+*** 57,62 ****
+--- 58,67 ----
+ if(zone_intersect(numzones,j)) {
+ zones[j].touch[zones[j].numtouch] = numzones;
+ zones[j].numtouch++;
++ if (zones[j].numtouch == MAXTOUCH) {
++ zones[j].numtouch = -1;
++ printf("Reached maxtouch for zone %d\n", numzones);
++ }
+ break;
+ }
+ }
diff --git a/games/jetpack/files/patch-ab b/games/jetpack/files/patch-ab
new file mode 100644
index 0000000..dae4b65
--- /dev/null
+++ b/games/jetpack/files/patch-ab
@@ -0,0 +1,23 @@
+*** defs.h.orig Tue Sep 20 01:12:40 1994
+--- defs.h Tue Sep 20 01:13:15 1994
+***************
+*** 310,318 ****
+ #define BONUSINCREMENT 10
+ #define BONUSTIME 20
+ #define EXTRAMANSCORE 10000
+! #define USECDELAY 45000
+
+! extern int men, score, bonus, bonustimer, initbonus, level;
+ oldscore, oldlevel, extramaninc;
+
+ /* game state
+--- 310,318 ----
+ #define BONUSINCREMENT 10
+ #define BONUSTIME 20
+ #define EXTRAMANSCORE 10000
+! #define USECDELAY 35000
+
+! extern int men, score, bonus, bonustimer, initbonus, level,
+ oldscore, oldlevel, extramaninc;
+
+ /* game state
diff --git a/games/jetpack/files/patch-ac b/games/jetpack/files/patch-ac
new file mode 100644
index 0000000..446b237
--- /dev/null
+++ b/games/jetpack/files/patch-ac
@@ -0,0 +1,84 @@
+*** Imakefile.orig Mon Nov 8 15:16:05 1993
+--- Imakefile Wed Sep 21 00:55:52 1994
+***************
+*** 7,22 ****
+
+ PROGRAMS = jetpack
+
+! DESTDIR = /usrd/s/m/meb2
+
+ # These defines override the template defaults. Trash em if you want to
+ # use the template locations
+! USRLIBDIR = $(DESTDIR)/lib/jetpack
+! BINDIR = $(DESTDIR)/bin
+! MANPATH = $(DESTDIR)/man
+! MANDIR = $(MANSOURCEPATH)1
+! TOP_INCLUDES =
+! DEPXLIB =
+ EXTRA_LIBRARIES = $(XLIB)
+
+ # I like my programs optimized, stripped, and setuid. Do what you like.
+--- 7,22 ----
+
+ PROGRAMS = jetpack
+
+! BINDIR = /usr/local/bin
+! LIBDIR = /usr/local/lib/jetpack
+! MANDIR = /usr/local/man/man6
+
+ # These defines override the template defaults. Trash em if you want to
+ # use the template locations
+! # LIBDIR = $(DESTDIR)/lib/jetpack
+! # BINDIR = $(DESTDIR)/bin
+! # MANPATH = $(DESTDIR)/man
+! # MANDIR = $(MANSOURCEPATH)1
+ EXTRA_LIBRARIES = $(XLIB)
+
+ # I like my programs optimized, stripped, and setuid. Do what you like.
+***************
+*** 30,44 ****
+ # the game to do all the drawing to an offscreen pixmap. (This is good for
+ # machines that don't have hardware blitting -- if you have an xterm or a
+ # graphics workhorse, leave it in, there will be no flicker)
+! DEFINES = -DBLIT -DSCOREPATH=\"$(SCOREFILE)\" -DLEVELPATH=\"$(LEVELFILE)\"
+
+ # The score file can be any name you like, just make sure the directory
+ # it's supposed to reside in exists, or jetpack will start creating score
+ # files in the directories it is run from. Same for the level files, only
+ # the filename you give here is only a prefix -- the complete filename has
+ # the level number appended to it.
+! SCOREFILE = $(USRLIBDIR)/jetpack.scores
+! LEVELFILE = $(USRLIBDIR)/jetpack.lev
+
+ ComplexProgramTarget(jetpack)
+
+--- 30,45 ----
+ # the game to do all the drawing to an offscreen pixmap. (This is good for
+ # machines that don't have hardware blitting -- if you have an xterm or a
+ # graphics workhorse, leave it in, there will be no flicker)
+! # DEFINES = -DBLIT -DSCOREPATH=\"$(SCOREFILE)\" -DLEVELPATH=\"$(LEVELFILE)\"
+! DEFINES = -DSCOREPATH=\"$(SCOREFILE)\" -DLEVELPATH=\"$(LEVELFILE)\"
+
+ # The score file can be any name you like, just make sure the directory
+ # it's supposed to reside in exists, or jetpack will start creating score
+ # files in the directories it is run from. Same for the level files, only
+ # the filename you give here is only a prefix -- the complete filename has
+ # the level number appended to it.
+! SCOREFILE = $(LIBDIR)/jetpack.scores
+! LEVELFILE = $(LIBDIR)/jetpack.lev
+
+ ComplexProgramTarget(jetpack)
+
+***************
+*** 50,54 ****
+ # oops, I can't figure how to override the template default to install the
+ # man page as jetpack.1, so I install both and remove the bad one.
+ install.man:: jetpack.man
+! $(INSTALL) -c $(INSTMANFLAGS) jetpack.man $(MANDIR)/jetpack.1
+! @rm -f $(MANDIR)/jetpack.n
+--- 51,55 ----
+ # oops, I can't figure how to override the template default to install the
+ # man page as jetpack.1, so I install both and remove the bad one.
+ install.man:: jetpack.man
+! $(INSTALL) -c $(INSTMANFLAGS) jetpack.man $(MANDIR)/jetpack.6
+! @rm -f $(MANDIR)/jetpack.1x
diff --git a/games/jetpack/files/patch-ad b/games/jetpack/files/patch-ad
new file mode 100644
index 0000000..df82fbd
--- /dev/null
+++ b/games/jetpack/files/patch-ad
@@ -0,0 +1,19 @@
+*** initx.c.orig Mon Nov 8 15:16:00 1993
+--- initx.c Wed Sep 21 00:32:35 1994
+***************
+*** 44,50 ****
+ resulting fontname right into the code.
+ */
+
+! static char *fontname = "-*-fixed-medium-r-normal--*-70-*-*-c-*-*-*";
+ static char *bigfontname = "-*-courier-bold-r-normal--*-180-*-*-m-150-*-*";
+
+ /* init_X opens the display and sets up all the color stuff
+--- 44,50 ----
+ resulting fontname right into the code.
+ */
+
+! static char *fontname = "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-*-*-*";
+ static char *bigfontname = "-*-courier-bold-r-normal--*-180-*-*-m-150-*-*";
+
+ /* init_X opens the display and sets up all the color stuff
diff --git a/games/jetpack/files/patch-ae b/games/jetpack/files/patch-ae
new file mode 100644
index 0000000..d0668ab
--- /dev/null
+++ b/games/jetpack/files/patch-ae
@@ -0,0 +1,25 @@
+*** main.c.orig Wed Sep 21 00:33:35 1994
+--- main.c Wed Sep 21 00:35:35 1994
+***************
+*** 1,5 ****
+--- 1,8 ----
+ /* main.c : main loop of jetpack
+ */
++ #include <sys/time.h>
++ #include <sys/resource.h>
++
+
+ #include "copyright.h"
+ #include "defs.h"
+***************
+*** 18,23 ****
+--- 21,29 ----
+ int seed;
+ char lev[20];
+ register unsigned long timer;
++ struct rlimit l = {0, 0};
++
++ setrlimit(RLIMIT_CORE, &l);
+
+ /* randomize the random number generator by seeding it with the time
+ in seconds
diff --git a/games/jetpack/pkg-comment b/games/jetpack/pkg-comment
new file mode 100644
index 0000000..b5de8fe
--- /dev/null
+++ b/games/jetpack/pkg-comment
@@ -0,0 +1 @@
+jetpack: Arcade action game for X Windows
diff --git a/games/jetpack/pkg-descr b/games/jetpack/pkg-descr
new file mode 100644
index 0000000..fab6617
--- /dev/null
+++ b/games/jetpack/pkg-descr
@@ -0,0 +1,11 @@
+Jetpack is an arcade action game. The user controls a player wearing a
+jetpack. The player must travel through the maze to find a key and
+bring it back to the door to exit to the next level. There are three
+kinds of enemies in jetpack: guards, fireballs and wall sweepers.
+Touching any enemy is fatal. Guards patrol the maze. They
+fly in the middle of the corridors and follow random paths through the
+maze. Fireballs fly through space and bounce off walls. Wall
+Sweepers cling to walls and continuously move along the surface of the
+walls. They can hang on to any side, and when they reach the end of a
+wall, flip to hug the other side and continue in the opposite
+direction.
diff --git a/games/jetpack/pkg-plist b/games/jetpack/pkg-plist
new file mode 100644
index 0000000..17ad7e9
--- /dev/null
+++ b/games/jetpack/pkg-plist
@@ -0,0 +1,7 @@
+@cd /usr/local
+@mode 644
+man/man6/jetpack.6
+lib/jetpack/jetpack.lev000
+@owner bin
+@mode 4755
+bin/jetpack
OpenPOWER on IntegriCloud