pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/games games: add xchomp



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3e11773039d3
branches:  trunk
changeset: 771914:3e11773039d3
user:      nia <nia%pkgsrc.org@localhost>
date:      Wed Dec 29 23:56:01 2021 +0000

description:
games: add xchomp

Xchomp is a game closely patterned after Pac-Man(tm) that runs under the X
Window System, with several different mazes added.

This is strictly a keyboard-controlled game. The arcade game had very simple
controls -- one four-directional joystick. In xchomp, all control is through
the arrow keys.

diffstat:

 games/Makefile                         |    3 +-
 games/xchomp/DESCR                     |    6 +
 games/xchomp/Makefile                  |   16 ++++
 games/xchomp/PLIST                     |    2 +
 games/xchomp/distinfo                  |   15 ++++
 games/xchomp/patches/patch-Imakefile   |   22 ++++++
 games/xchomp/patches/patch-contact.c   |   33 ++++++++++
 games/xchomp/patches/patch-demo.c      |   24 +++++++
 games/xchomp/patches/patch-drivers.c   |  101 +++++++++++++++++++++++++++++++
 games/xchomp/patches/patch-main.c      |   82 +++++++++++++++++++++++++
 games/xchomp/patches/patch-maze.c      |   24 +++++++
 games/xchomp/patches/patch-props.c     |   78 ++++++++++++++++++++++++
 games/xchomp/patches/patch-resources.c |  106 +++++++++++++++++++++++++++++++++
 games/xchomp/patches/patch-status.c    |   41 ++++++++++++
 games/xchomp/patches/patch-xchomp.h    |   71 ++++++++++++++++++++++
 15 files changed, 623 insertions(+), 1 deletions(-)

diffs (truncated from 694 to 300 lines):

diff -r d679327e6b95 -r 3e11773039d3 games/Makefile
--- a/games/Makefile    Wed Dec 29 23:26:50 2021 +0000
+++ b/games/Makefile    Wed Dec 29 23:56:01 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.508 2021/12/18 00:13:01 wiz Exp $
+# $NetBSD: Makefile,v 1.509 2021/12/29 23:56:01 nia Exp $
 #
 
 COMMENT=       Games
@@ -432,6 +432,7 @@
 SUBDIR+=       xbomb
 SUBDIR+=       xbomber
 SUBDIR+=       xbreaky
+SUBDIR+=       xchomp
 SUBDIR+=       xclannad
 SUBDIR+=       xconq
 SUBDIR+=       xcowsay
diff -r d679327e6b95 -r 3e11773039d3 games/xchomp/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xchomp/DESCR        Wed Dec 29 23:56:01 2021 +0000
@@ -0,0 +1,6 @@
+Xchomp is a game closely patterned after Pac-Man(tm) that runs under the X
+Window System, with several different mazes added.
+
+This is strictly a keyboard-controlled game. The arcade game had very simple
+controls -- one four-directional joystick. In xchomp, all control is through
+the arrow keys.
diff -r d679327e6b95 -r 3e11773039d3 games/xchomp/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xchomp/Makefile     Wed Dec 29 23:56:01 2021 +0000
@@ -0,0 +1,16 @@
+# $NetBSD: Makefile,v 1.1 2021/12/29 23:56:01 nia Exp $
+
+DISTNAME=      xchomp-pl1
+CATEGORIES=    games
+MASTER_SITES=  https://ftp.gwdg.de/pub/x11/x.org/R5contrib/
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      http://vidalc.chez.com/xchomp/xchomp.html
+COMMENT=       Game for X11 closely patterned after Pac-Man
+
+WRKSRC=                ${WRKDIR}/xchomp
+USE_IMAKE=     yes
+
+.include "../../x11/libX11/buildlink3.mk"
+.include "../../x11/libXext/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r d679327e6b95 -r 3e11773039d3 games/xchomp/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xchomp/PLIST        Wed Dec 29 23:56:01 2021 +0000
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1 2021/12/29 23:56:01 nia Exp $
+bin/xchomp
diff -r d679327e6b95 -r 3e11773039d3 games/xchomp/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xchomp/distinfo     Wed Dec 29 23:56:01 2021 +0000
@@ -0,0 +1,15 @@
+$NetBSD: distinfo,v 1.1 2021/12/29 23:56:01 nia Exp $
+
+BLAKE2s (xchomp-pl1.tar.gz) = 16fe81471aa1aa8bdd5fe2a51d9746ba980b4bab3adaaceeac04d13af2580744
+SHA512 (xchomp-pl1.tar.gz) = c5d40e97c8b14d96fe11e82d537128c0aa6ed12e9befb36a5432a84bf744cbce3e4bc6dbb068489974caa3235b5a1618a3fff9ddeede02a5c05083d1780b3d8f
+Size (xchomp-pl1.tar.gz) = 33987 bytes
+SHA1 (patch-Imakefile) = c5178798d35c9ebb8fff49d52cf6cea7d9e8e768
+SHA1 (patch-contact.c) = dbca9684d645d8b8bd4548c1011f764cd797f865
+SHA1 (patch-demo.c) = 9c7dadbd26a8788882617e93bc0ca1eb68e59467
+SHA1 (patch-drivers.c) = 38e484eca54a7dcf0ebe9735242c7971c6d0daed
+SHA1 (patch-main.c) = 711c36ebb772f261ce9d9bac633393eb94ca62e4
+SHA1 (patch-maze.c) = da13497888aa34b8793f7620df7cc1c73b3f2178
+SHA1 (patch-props.c) = cce3ddb8abb68f13f0e6970a482eb7b5586defdd
+SHA1 (patch-resources.c) = f2f11c68af575ed17e79e804409bc59e17684ae6
+SHA1 (patch-status.c) = e335db1e2fbce9c69be69890ba257c0532dafb4a
+SHA1 (patch-xchomp.h) = 872c740b80e219a88891999fa2318f101da46d9d
diff -r d679327e6b95 -r 3e11773039d3 games/xchomp/patches/patch-Imakefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xchomp/patches/patch-Imakefile      Wed Dec 29 23:56:01 2021 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-Imakefile,v 1.1 2021/12/29 23:56:01 nia Exp $
+
+Fix installation without a man page.
+From FreeBSD Ports.
+
+--- Imakefile.orig     1994-03-18 05:16:10.000000000 +0000
++++ Imakefile
+@@ -2,7 +2,7 @@
+ #include BandAidCompiler
+ #endif
+ 
+-DEFINES = -DX11
++DEFINES = -DX11 -DFRAME_DELAY=40000
+ INCLUDES = -I$(TOP) -I$(TOP)/X11
+ DEPLIBS = $(DEPXLIB)
+ LOCAL_LIBRARIES = $(XLIB)
+@@ -11,4 +11,4 @@ SYS_LIBRARIES = -lm
+ SRCS = contact.c demo.c drivers.c main.c maze.c props.c resources.c status.c
+ OBJS = contact.o demo.o drivers.o main.o maze.o props.o resources.o status.o
+ 
+-ComplexProgramTarget(xchomp)
++ComplexProgramTargetNoMan(xchomp)
diff -r d679327e6b95 -r 3e11773039d3 games/xchomp/patches/patch-contact.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xchomp/patches/patch-contact.c      Wed Dec 29 23:56:01 2021 +0000
@@ -0,0 +1,33 @@
+$NetBSD: patch-contact.c,v 1.1 2021/12/29 23:56:01 nia Exp $
+
+Add return types. from FreeBSD Ports.
+
+--- contact.c.orig     1994-03-18 05:13:16.000000000 +0000
++++ contact.c
+@@ -17,7 +17,7 @@
+  * with which the player collided.  In this case, it doesn't matter.
+  */
+ /*ARGSUSED*/
+-die(dummy)
++void die(dummy)
+ int dummy;
+ {
+    register int xx = pac_x, yy = pac_y, i, dx, dy;
+@@ -116,7 +116,7 @@ int dummy;
+  * of the eaten ghost, and then continues.  The parameter is
+  * the array index of the eaten ghost.
+  */
+-eat(i)
++void eat(i)
+ int i;
+ {
+    register int  xx = pac_x, yy = pac_y, j;
+@@ -166,7 +166,7 @@ int i;
+  * The eyes are harmless; this is a no-op.
+  */
+ /*ARGSUSED*/
+-noop(dummy)
++void noop(dummy)
+ int dummy;
+ {
+ }
diff -r d679327e6b95 -r 3e11773039d3 games/xchomp/patches/patch-demo.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xchomp/patches/patch-demo.c Wed Dec 29 23:56:01 2021 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-demo.c,v 1.1 2021/12/29 23:56:01 nia Exp $
+
+Add return types. from FreeBSD Ports.
+
+--- demo.c.orig        1994-03-18 05:12:23.000000000 +0000
++++ demo.c
+@@ -6,7 +6,7 @@
+  * for the game.
+  */
+ 
+-demo_seq()
++void demo_seq()
+ {
+    int             i, xx, yy, direction, ascent, descent, len;
+    XCharStruct     chars;
+@@ -127,7 +127,7 @@ demo_seq()
+       if (event.xany.window != window) continue;
+       switch (event.type) {
+          case KeyPress:
+-          XLookupString(&event, &c_buf, 1, &last_key, &status);
++          XLookupString((XKeyEvent *) &event, &c_buf, 1, &last_key, &status);
+           if ((last_key == XK_q) || (last_key == XK_Q))
+              do_exit();
+           XFillRectangle(display, window, clearGC, 0, 0, WIN_WIDTH,
diff -r d679327e6b95 -r 3e11773039d3 games/xchomp/patches/patch-drivers.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xchomp/patches/patch-drivers.c      Wed Dec 29 23:56:01 2021 +0000
@@ -0,0 +1,101 @@
+$NetBSD: patch-drivers.c,v 1.1 2021/12/29 23:56:01 nia Exp $
+
+Add return types. from FreeBSD Ports.
+
+--- drivers.c.orig     1994-03-18 05:15:08.000000000 +0000
++++ drivers.c
+@@ -12,7 +12,7 @@
+  * variables (pac_x, pac_y), the direction variables (pac_ix, pac_iy),
+  * and the clipping region (pac_region).
+  */
+-control_pac()
++void control_pac()
+ {
+    register int         xx = pac_x, yy = pac_y, i, dx, dy;
+    register char        *pc = md[yy >> 4] + (xx >> 4);
+@@ -89,7 +89,7 @@ control_pac()
+  * eaten something which is not a ghost -- a dot, a power-dot,
+  * or the fruit.  If so, the appropriate action is taken.
+  */
+-check_dots()
++void check_dots()
+ {
+    register char        *pi;
+    register int         i;
+@@ -218,7 +218,7 @@ check_dots()
+  * The function below causes ghosts to follow the player around, with a bit
+  * of randomness thrown in as well.
+  */
+-follow(i)
++void follow(i)
+ register int i;
+ {
+    int            xx = ghost_x[i], yy = ghost_y[i];
+@@ -289,7 +289,7 @@ register int i;
+  * at half speed.  It is set up as the driver function during
+  * the ghost-eating periods of the game.
+  */
+-run(i)
++void run(i)
+ register int i;
+ {
+    int            xx = ghost_x[i], yy = ghost_y[i];
+@@ -358,7 +358,7 @@ register int i;
+  * high speed.  It is set up as the driver for ghosts which have
+  * been eaten.
+  */
+-go_home(i)
++void go_home(i)
+ register int i;
+ {
+    int            xx = ghost_x[i], yy = ghost_y[i];
+@@ -459,14 +459,14 @@ register int i;
+  * They simply hover around in a circular pattern.  Randomness is
+  * used to decide when the ghosts leave the box.
+  */
+-hover(i)
++void hover(i)
+ register int i;
+ {
+    register int yy = ghost_y[i] >> 4, xx = ghost_x[i] >> 4;
+    char         *pc = md[yy] + xx;
+    register int *px = ghost_ix + i, *py = ghost_iy + i;
+ 
+-   if (xx == door_x)
++   if (xx == door_x) {
+       if (yy == (door_y - 1)) {
+ 
+        /*
+@@ -490,6 +490,7 @@ register int i;
+                *px = 0, *py = (-2);
+                return;
+             }
++   }
+ 
+    /*
+     * The rest of the function drives the ghost around the
+@@ -514,14 +515,14 @@ register int i;
+  * the ghost-eating periods of the game -- they move at half
+  * speed.
+  */
+-hover2(i)
++void hover2(i)
+ register int i;
+ {
+    register int yy = ghost_y[i] >> 4, xx = ghost_x[i] >> 4;
+    char         *pc = md[yy] + xx;
+    register int *px = ghost_ix + i, *py = ghost_iy + i;
+ 
+-   if (xx == door_x)
++   if (xx == door_x) {
+       if (yy == (door_y - 1)) {
+          drive[i] = run;
+          run(i);
+@@ -532,6 +533,7 @@ register int i;
+             *px = 0, *py = (-1);
+             return;
+          }
++   }
+ 
+    if (*px > 0) {
+       if (pc[1]) *px = 0, *py = (-1);
diff -r d679327e6b95 -r 3e11773039d3 games/xchomp/patches/patch-main.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xchomp/patches/patch-main.c Wed Dec 29 23:56:01 2021 +0000
@@ -0,0 +1,82 @@
+$NetBSD: patch-main.c,v 1.1 2021/12/29 23:56:01 nia Exp $
+
+Add return types.
+Allow FRAME_DELAY to be set from the command line.
+from FreeBSD Ports.
+
+--- main.c.orig        1994-03-18 05:12:24.000000000 +0000
++++ main.c
+@@ -2,7 +2,7 @@
+ #define EXTERN
+ #include "xchomp.h"
+ 
+-main(argc, argv)
++int main(argc, argv)
+ int argc;
+ char *argv[];
+ {
+@@ -10,6 +10,12 @@ char *argv[];
+    int                        dummy;
+    XCharStruct                chars;
+    unsigned long      event_mask;
++   int                  fdelay = 0;
++
++   /* User may set FRAME_DELAY from the command line */
++   if (argc >= 2) {
++      fdelay = atoi(argv[1]);
++   }
+ 



Home | Main Index | Thread Index | Old Index