summaryrefslogtreecommitdiff
path: root/games/jetpack
diff options
context:
space:
mode:
authorgarbled <garbled>1998-08-23 11:24:52 +0000
committergarbled <garbled>1998-08-23 11:24:52 +0000
commit2be7cc049ca5c891943af748c1eff8561d39e6b0 (patch)
tree1b608b2ffa56de8af24f5a58f515e6371051e751 /games/jetpack
parentb55273dabdab87e19735fc913ec6c586de91f874 (diff)
downloadpkgsrc-2be7cc049ca5c891943af748c1eff8561d39e6b0.tar.gz
New pkg for jetpack-1.0. Patches taken from FreeBSD ports collection.
(last time I do that.. ugh) an arcade action game for X Windows.
Diffstat (limited to 'games/jetpack')
-rw-r--r--games/jetpack/Makefile23
-rw-r--r--games/jetpack/files/md53
-rw-r--r--games/jetpack/patches/patch-aa43
-rw-r--r--games/jetpack/patches/patch-ab24
-rw-r--r--games/jetpack/patches/patch-ac72
-rw-r--r--games/jetpack/patches/patch-ad39
-rw-r--r--games/jetpack/patches/patch-ae27
-rw-r--r--games/jetpack/patches/patch-af20
-rw-r--r--games/jetpack/patches/patch-ag10
-rw-r--r--games/jetpack/patches/patch-ah20
-rw-r--r--games/jetpack/patches/patch-ai50
-rw-r--r--games/jetpack/patches/patch-aj37
-rw-r--r--games/jetpack/pkg/COMMENT1
-rw-r--r--games/jetpack/pkg/DESCR11
-rw-r--r--games/jetpack/pkg/PLIST6
15 files changed, 386 insertions, 0 deletions
diff --git a/games/jetpack/Makefile b/games/jetpack/Makefile
new file mode 100644
index 00000000000..54768fcb482
--- /dev/null
+++ b/games/jetpack/Makefile
@@ -0,0 +1,23 @@
+# $NetBSD: Makefile,v 1.1 1998/08/23 11:24:52 garbled Exp $
+# $FreeBSD: Makefile,v 1.16 1997/01/03 09:36:43 obrien Exp $
+#
+
+DISTNAME= jetpack
+PKGNAME= jetpack-1.0
+CATEGORIES= games x11
+MASTER_SITES= ftp://qiclab.scn.rain.com/pub/games/
+EXTRACT_SUFX= .tar.Z
+
+MAINTAINER= root@garbled.net
+
+USE_IMAKE= yes
+NO_INSTALL_MANPAGES= yes
+
+post-install:
+ @chown bin:games ${PREFIX}/bin/jetpack
+ @chown bin:games ${PREFIX}/share/jetpack
+ @chmod 2755 ${PREFIX}/bin/jetpack
+ @chmod 0775 ${PREFIX}/share/jetpack
+ ${INSTALL_MAN} ${WRKSRC}/jetpack.man ${PREFIX}/man/man6/jetpack.6
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/games/jetpack/files/md5 b/games/jetpack/files/md5
new file mode 100644
index 00000000000..471a8311630
--- /dev/null
+++ b/games/jetpack/files/md5
@@ -0,0 +1,3 @@
+$NetBSD: md5,v 1.1 1998/08/23 11:24:53 garbled Exp $
+
+MD5 (jetpack.tar.Z) = d1bae26b9f54f84090fcf78fc2183ed7
diff --git a/games/jetpack/patches/patch-aa b/games/jetpack/patches/patch-aa
new file mode 100644
index 00000000000..61e2cc74c4b
--- /dev/null
+++ b/games/jetpack/patches/patch-aa
@@ -0,0 +1,43 @@
+$NetBSD: patch-aa,v 1.1 1998/08/23 11:24:53 garbled Exp $
+*** 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/patches/patch-ab b/games/jetpack/patches/patch-ab
new file mode 100644
index 00000000000..82f55b6e23c
--- /dev/null
+++ b/games/jetpack/patches/patch-ab
@@ -0,0 +1,24 @@
+$NetBSD: patch-ab,v 1.1 1998/08/23 11:24:53 garbled Exp $
+*** 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/patches/patch-ac b/games/jetpack/patches/patch-ac
new file mode 100644
index 00000000000..6778a35e681
--- /dev/null
+++ b/games/jetpack/patches/patch-ac
@@ -0,0 +1,72 @@
+$NetBSD: patch-ac,v 1.1 1998/08/23 11:24:53 garbled Exp $
+--- Imakefile.orig Sun Mar 29 12:41:25 1992
++++ Imakefile Sun Aug 23 03:31:04 1998
+@@ -1,5 +1,5 @@
+- SRCS = bitmap.c bonus.c collision.c demo.c draw.c erase.c events.c\
++SRCS = bitmap.c bonus.c collision.c demo.c draw.c erase.c events.c\
+ gameover.c initx.c main.c maze.c message.c normal.c quitx.c scores.c\
+ setinmaze.c setup.c special.c time.c update.c windowx.c
+- OBJS = bitmap.o bonus.o collision.o demo.o draw.o erase.o events.o\
++OBJS = bitmap.o bonus.o collision.o demo.o draw.o erase.o events.o\
+ gameover.o initx.o main.o maze.o message.o normal.o quitx.o scores.o\
+@@ -7,5 +7,8 @@
+
+- PROGRAMS = jetpack
++PROGRAMS = jetpack
+
+- DESTDIR = /usrd/s/m/meb2
++BINDIR = $(PREFIX)/bin
++LIBDIR = $(PREFIX)/share/jetpack
++MANDIR = $(PREFIX)/man/man6
++MANSUFFIX = 6
+
+@@ -13,16 +16,14 @@
+ # use the template locations
+- USRLIBDIR = $(DESTDIR)/lib/jetpack
+- BINDIR = $(DESTDIR)/bin
+- MANPATH = $(DESTDIR)/man
+- MANDIR = $(MANSOURCEPATH)1
+- TOP_INCLUDES =
+- DEPXLIB =
+- EXTRA_LIBRARIES = $(XLIB)
++# 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.
+- INSTPGMFLAGS = $(INSTUIDFLAGS) -s
+- CDEBUGFLAGS = -O4
++INSTPGMFLAGS = -s
++CDEBUGFLAGS = -O2
+
+ # Since my programs are setuid, I make the data files readable only by me.
+- INSTDATFLAGS = -m 0600
++INSTDATFLAGS = -m 0644
+
+@@ -32,3 +33,4 @@
+ # graphics workhorse, leave it in, there will be no flicker)
+- DEFINES = -DBLIT -DSCOREPATH=\"$(SCOREFILE)\" -DLEVELPATH=\"$(LEVELFILE)\"
++# DEFINES = -DBLIT -DSCOREPATH=\"$(SCOREFILE)\" -DLEVELPATH=\"$(LEVELFILE)\"
++DEFINES = -DSCOREPATH=\"$(SCOREFILE)\" -DLEVELPATH=\"$(LEVELFILE)\"
+
+@@ -39,4 +41,4 @@
+ # the level number appended to it.
+- SCOREFILE = $(USRLIBDIR)/jetpack.scores
+- LEVELFILE = $(USRLIBDIR)/jetpack.lev
++SCOREFILE = $(LIBDIR)/jetpack.scores
++LEVELFILE = $(LIBDIR)/jetpack.lev
+
+@@ -47,8 +49,5 @@
+
+-InstallNonExec(levels/000,$(LEVELFILE)000)
++install::
++ MakeDir($(LIBDIR))
+
+-# 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
++InstallNonExec(levels/000,$(LEVELFILE)000)
diff --git a/games/jetpack/patches/patch-ad b/games/jetpack/patches/patch-ad
new file mode 100644
index 00000000000..93772956aec
--- /dev/null
+++ b/games/jetpack/patches/patch-ad
@@ -0,0 +1,39 @@
+$NetBSD: patch-ad,v 1.1 1998/08/23 11:24:53 garbled Exp $
+*** initx.c.orig Mon Apr 6 12:59:29 1992
+--- initx.c Mon Jan 2 12:14:16 1995
+***************
+*** 44,57 ****
+ 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
+ */
+ init_X()
+ {
+! display = XOpenDisplay(NULL);
+ if (display == NULL) {
+ fprintf(stderr, "Jetpack : Cannot connect to X Server %s\n",
+ XDisplayName(NULL));
+--- 44,62 ----
+ 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
+ */
+ init_X()
+ {
+! int saved_euid;
+!
+! saved_euid = geteuid();
+! seteuid(getuid());
+! display = XOpenDisplay("");
+! seteuid(saved_euid);
+ if (display == NULL) {
+ fprintf(stderr, "Jetpack : Cannot connect to X Server %s\n",
+ XDisplayName(NULL));
diff --git a/games/jetpack/patches/patch-ae b/games/jetpack/patches/patch-ae
new file mode 100644
index 00000000000..6f8425f6485
--- /dev/null
+++ b/games/jetpack/patches/patch-ae
@@ -0,0 +1,27 @@
+$NetBSD: patch-ae,v 1.1 1998/08/23 11:24:53 garbled Exp $
+*** main.c.orig Mon Apr 6 12:59:32 1992
+--- main.c Thu Sep 22 13:07:12 1994
+***************
+*** 1,5 ****
+--- 1,9 ----
+ /* main.c : main loop of jetpack
+ */
++ #include <sys/types.h>
++ #include <sys/time.h>
++ #include <sys/resource.h>
++
+
+ #include "copyright.h"
+ #include "defs.h"
+***************
+*** 18,23 ****
+--- 22,30 ----
+ 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/patches/patch-af b/games/jetpack/patches/patch-af
new file mode 100644
index 00000000000..a48f38f86bd
--- /dev/null
+++ b/games/jetpack/patches/patch-af
@@ -0,0 +1,20 @@
+$NetBSD: patch-af,v 1.1 1998/08/23 11:24:54 garbled Exp $
+*** scores.c~ Mon Nov 8 15:15:55 1993
+--- scores.c Sat Nov 19 22:32:31 1994
+***************
+*** 35,41 ****
+ numhighs = 0;
+ scorefd = open(SCOREPATH, O_RDWR);
+ if(scorefd == -1) {
+! scorefd = open(SCOREPATH, O_RDWR | O_CREAT, 0444);
+ if(scorefd == -1) {
+ scorefd = open("jetpack.scores", O_RDWR);
+ if(scorefd == -1) {
+--- 35,41 ----
+ numhighs = 0;
+ scorefd = open(SCOREPATH, O_RDWR);
+ if(scorefd == -1) {
+! scorefd = open(SCOREPATH, O_RDWR | O_CREAT, 0644);
+ if(scorefd == -1) {
+ scorefd = open("jetpack.scores", O_RDWR);
+ if(scorefd == -1) {
diff --git a/games/jetpack/patches/patch-ag b/games/jetpack/patches/patch-ag
new file mode 100644
index 00000000000..0edf44249f6
--- /dev/null
+++ b/games/jetpack/patches/patch-ag
@@ -0,0 +1,10 @@
+$NetBSD: patch-ag,v 1.1 1998/08/23 11:24:54 garbled Exp $
+*** defs.h~ Sun Feb 12 17:34:08 1995
+--- defs.h Sun Feb 12 17:34:46 1995
+***************
+*** 319,321 ****
+--- 319,322 ----
+ */
+
+ extern int paused, leveldone, gameover, lastscore;
++ extern int usecdelay;
diff --git a/games/jetpack/patches/patch-ah b/games/jetpack/patches/patch-ah
new file mode 100644
index 00000000000..0d6b7ab283b
--- /dev/null
+++ b/games/jetpack/patches/patch-ah
@@ -0,0 +1,20 @@
+$NetBSD: patch-ah,v 1.1 1998/08/23 11:24:54 garbled Exp $
+*** draw.c~ Mon Nov 8 15:15:54 1993
+--- draw.c Sun Feb 12 17:34:39 1995
+***************
+*** 533,539 ****
+ y, CGREY, fontinfo);
+ y += fontinfo->descent + fontinfo->ascent;
+ place_string(
+! " center button : fire jetpack ",
+ y, CYELLOW, fontinfo);
+ y += fontinfo->descent + 10 + fontinfo->ascent;
+ place_string("Extra Player awarded every 10000 points", y, CGREY,
+--- 533,539 ----
+ y, CGREY, fontinfo);
+ y += fontinfo->descent + fontinfo->ascent;
+ place_string(
+! " center button : fire jetpack T : turbo ",
+ y, CYELLOW, fontinfo);
+ y += fontinfo->descent + 10 + fontinfo->ascent;
+ place_string("Extra Player awarded every 10000 points", y, CGREY,
diff --git a/games/jetpack/patches/patch-ai b/games/jetpack/patches/patch-ai
new file mode 100644
index 00000000000..7a24696e6a7
--- /dev/null
+++ b/games/jetpack/patches/patch-ai
@@ -0,0 +1,50 @@
+$NetBSD: patch-ai,v 1.1 1998/08/23 11:24:54 garbled Exp $
+*** events.c~ Mon Nov 8 15:16:07 1993
+--- events.c Sun Feb 12 17:34:55 1995
+***************
+*** 4,9 ****
+--- 4,11 ----
+ #include "copyright.h"
+ #include "defs.h"
+
++ int usecdelay = USECDELAY;
++
+ /* event_filter handles game events
+ */
+ int event_filter()
+***************
+*** 86,91 ****
+--- 88,100 ----
+
+ XLookupString(event, &buf, 1, &key, &i);
+ switch(key) {
++ case 't':
++ case 'T':
++ if (usecdelay == USECDELAY)
++ usecdelay = USECDELAY/1.5;
++ else
++ usecdelay = USECDELAY;
++ break;
+ case XK_KP_4:
+ case 'a':
+ case 'A':
+***************
+*** 115,120 ****
+--- 124,130 ----
+ }
+ break;
+ case 'Q':
++ case 'q':
+ if(dead) break;
+ dead = 1;
+ deadtimer = 50;
+***************
+*** 124,129 ****
+--- 134,140 ----
+ dumb_message(MQUIT);
+ break;
+ case 'p':
++ case 'P':
+ if(paused) {
+ paused = 0;
+ bigmessagetime = 0;
diff --git a/games/jetpack/patches/patch-aj b/games/jetpack/patches/patch-aj
new file mode 100644
index 00000000000..d7f3e0f81e9
--- /dev/null
+++ b/games/jetpack/patches/patch-aj
@@ -0,0 +1,37 @@
+$NetBSD: patch-aj,v 1.1 1998/08/23 11:24:54 garbled Exp $
+*** main.c~ Sun Feb 12 17:34:09 1995
+--- main.c Sun Feb 12 17:34:29 1995
+***************
+*** 90,96 ****
+ begin_timer();
+ while(paused) {
+ while(XPending(display) && !event_filter());
+! usleep(USECDELAY);
+ }
+ while(XPending(display) && !event_filter());
+ update();
+--- 90,96 ----
+ begin_timer();
+ while(paused) {
+ while(XPending(display) && !event_filter());
+! usleep(usecdelay);
+ }
+ while(XPending(display) && !event_filter());
+ update();
+***************
+*** 111,117 ****
+ busy, and you shouldn't be playing anyway.
+ */
+ timer = get_timer();
+! if(timer < USECDELAY) usleep(USECDELAY - timer);
+ }
+ }
+ }
+--- 111,117 ----
+ busy, and you shouldn't be playing anyway.
+ */
+ timer = get_timer();
+! if(timer < usecdelay) usleep(usecdelay - timer);
+ }
+ }
+ }
diff --git a/games/jetpack/pkg/COMMENT b/games/jetpack/pkg/COMMENT
new file mode 100644
index 00000000000..838eabfd5ed
--- /dev/null
+++ b/games/jetpack/pkg/COMMENT
@@ -0,0 +1 @@
+an arcade action game for X Windows.
diff --git a/games/jetpack/pkg/DESCR b/games/jetpack/pkg/DESCR
new file mode 100644
index 00000000000..fab66172826
--- /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 00000000000..d146cab80e8
--- /dev/null
+++ b/games/jetpack/pkg/PLIST
@@ -0,0 +1,6 @@
+@comment $NetBSD: PLIST,v 1.1 1998/08/23 11:24:55 garbled Exp $
+bin/jetpack
+man/man6/jetpack.6
+share/jetpack/jetpack.lev000
+@unexec rm -f %D/share/jetpack/jetpack.scores
+@dirrm share/jetpack