mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-20 20:09:11 +00:00
golddig - Getting the Gold and Avoiding Death
This commit is contained in:
parent
60bd905d46
commit
2b398ad2b7
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=420
11
games/golddig/Makefile
Normal file
11
games/golddig/Makefile
Normal file
@ -0,0 +1,11 @@
|
||||
DISTNAME= golddig
|
||||
DISTFILES= golddig2.tar.z
|
||||
MASTER_SITES= ftp://ss7.vlsi.ee.nus.sg/pub/games/X/
|
||||
NO_WRKSUBDIR= yes
|
||||
|
||||
pre-install:
|
||||
@mkdir -p ${PREFIX}/bin
|
||||
@mkdir -p ${PREFIX}/lib/golddig
|
||||
@mkdir -p ${PREFIX}/man/man6
|
||||
|
||||
.include <bsd.port.mk>
|
19
games/golddig/files/patch-aa
Normal file
19
games/golddig/files/patch-aa
Normal file
@ -0,0 +1,19 @@
|
||||
*** shared.c~ Thu Dec 14 20:41:02 1989
|
||||
--- shared.c Sun Nov 20 00:59:30 1994
|
||||
***************
|
||||
*** 58,64 ****
|
||||
#include "bitmap/window.bits"
|
||||
#include "bitmap/anti.bits"
|
||||
|
||||
! char *sprintf(); /* UNIX brain damage */
|
||||
|
||||
/* All in and out movements except up */
|
||||
#define NOUPBITS DLEAVE | LLEAVE | RLEAVE | HENTER | VENTER
|
||||
--- 58,64 ----
|
||||
#include "bitmap/window.bits"
|
||||
#include "bitmap/anti.bits"
|
||||
|
||||
! /* char *sprintf(); /* UNIX brain damage */
|
||||
|
||||
/* All in and out movements except up */
|
||||
#define NOUPBITS DLEAVE | LLEAVE | RLEAVE | HENTER | VENTER
|
19
games/golddig/files/patch-ab
Normal file
19
games/golddig/files/patch-ab
Normal file
@ -0,0 +1,19 @@
|
||||
*** scores.c~ Thu Dec 14 20:40:34 1989
|
||||
--- scores.c Sun Nov 20 01:51:07 1994
|
||||
***************
|
||||
*** 9,15 ****
|
||||
#include <X11/keysym.h>
|
||||
#include "golddig.h"
|
||||
|
||||
! char *getenv(),*sprintf();
|
||||
|
||||
#define NUMHIGH 15 /* Number of high scores that will be remembered */
|
||||
|
||||
--- 9,15 ----
|
||||
#include <X11/keysym.h>
|
||||
#include "golddig.h"
|
||||
|
||||
! char *getenv()/*,*sprintf()*/;
|
||||
|
||||
#define NUMHIGH 15 /* Number of high scores that will be remembered */
|
||||
|
251
games/golddig/files/patch-ac
Normal file
251
games/golddig/files/patch-ac
Normal file
@ -0,0 +1,251 @@
|
||||
This patch is not required to compile/run golddig. Its only purpose is to
|
||||
improve the game (IMHO) --jmz
|
||||
|
||||
*** golddig.c~ Thu Dec 14 20:41:03 1989
|
||||
--- golddig.c Sun Nov 20 01:23:40 1994
|
||||
***************
|
||||
*** 29,34 ****
|
||||
--- 29,38 ----
|
||||
|
||||
#define EVMASK KeyPressMask | ExposureMask | ButtonPressMask | FocusChangeMask
|
||||
|
||||
+ int x_lives, x_initial_score;
|
||||
+ #define TURBO 15
|
||||
+ int x_turbo = TURBO;
|
||||
+
|
||||
int newlevel = 0; /* Non-zero if a new level was just drawn */
|
||||
struct itimerval cycletime; /* Structure used when setting up timer */
|
||||
/* These are the graphics cursors used for drawing the player at */
|
||||
***************
|
||||
*** 167,177 ****
|
||||
puts("z,<,q,u,R13 - make hole left");
|
||||
puts("x,>,e,o,R15 - make hole right");
|
||||
puts("r,y,R7 - put down any held item");
|
||||
! puts("1-9 - change the game speed");
|
||||
puts("\n^S,^Z - pause the game");
|
||||
puts("^Q,^Y - reactivate the game");
|
||||
puts("^C - kill the game");
|
||||
puts("^R - redraw the screen");
|
||||
break;
|
||||
/* A space bar changes the command to STAND */
|
||||
case XK_space: case XK_R11:
|
||||
--- 171,182 ----
|
||||
puts("z,<,q,u,R13 - make hole left");
|
||||
puts("x,>,e,o,R15 - make hole right");
|
||||
puts("r,y,R7 - put down any held item");
|
||||
! puts("0-9 - change the game speed (0 is *very* fast)");
|
||||
puts("\n^S,^Z - pause the game");
|
||||
puts("^Q,^Y - reactivate the game");
|
||||
puts("^C - kill the game");
|
||||
puts("^R - redraw the screen");
|
||||
+ puts("^A - restart the level");
|
||||
break;
|
||||
/* A space bar changes the command to STAND */
|
||||
case XK_space: case XK_R11:
|
||||
***************
|
||||
*** 251,256 ****
|
||||
--- 256,262 ----
|
||||
regen_tree();
|
||||
/* Freeze action until a key is pressed */
|
||||
newlevel = 1;
|
||||
+ x_initial_score = score;
|
||||
}
|
||||
|
||||
/* Move player one movement */
|
||||
***************
|
||||
*** 299,304 ****
|
||||
--- 305,311 ----
|
||||
((code & UPLEVEL) && ! (code & INACTIVE))) {
|
||||
/* Increment the level number */
|
||||
levelnum ++;
|
||||
+ x_lives++;
|
||||
/* Load the next level in if the current one is done */
|
||||
init_level();
|
||||
/* Redraw the level */
|
||||
***************
|
||||
*** 309,316 ****
|
||||
return;
|
||||
}
|
||||
/* If the block is a killer block, kill the player */
|
||||
! if(code & KILLIN)
|
||||
died("was crushed");
|
||||
}
|
||||
/* Do not let PUTDOWN order stay after movement has started */
|
||||
else if(curorder == PUTDOWN)
|
||||
--- 316,332 ----
|
||||
return;
|
||||
}
|
||||
/* If the block is a killer block, kill the player */
|
||||
! if(code & KILLIN) {
|
||||
! if(--x_lives) { /* restart level */
|
||||
! goldleft = 0; player.ypos = 0; code |= UPLEVEL; code |= INACTIVE;
|
||||
! score = x_initial_score;
|
||||
! init_level();
|
||||
! redrawall();
|
||||
! XFlush(disp);
|
||||
! return;
|
||||
! }
|
||||
died("was crushed");
|
||||
+ }
|
||||
}
|
||||
/* Do not let PUTDOWN order stay after movement has started */
|
||||
else if(curorder == PUTDOWN)
|
||||
***************
|
||||
*** 350,357 ****
|
||||
/* Check if the player is overlapping one of the bad guys while not */
|
||||
/* holding armor. */
|
||||
if(! (fast_lookup[player.hold].code & ARMOR) &&
|
||||
! overlap_badguy(player.xpos,player.ypos,-1))
|
||||
died("was eaten");
|
||||
/* Redraw player if he moved. Redraw occasionally anyway. */
|
||||
if(player.xpos != player.xold || player.ypos != player.yold ||
|
||||
(curtick & 0xf) == 0)
|
||||
--- 366,382 ----
|
||||
/* Check if the player is overlapping one of the bad guys while not */
|
||||
/* holding armor. */
|
||||
if(! (fast_lookup[player.hold].code & ARMOR) &&
|
||||
! overlap_badguy(player.xpos,player.ypos,-1)) {
|
||||
! if(--x_lives) { /* restart level */
|
||||
! goldleft = 0; player.ypos = 0;
|
||||
! score = x_initial_score;
|
||||
! init_level();
|
||||
! redrawall();
|
||||
! XFlush(disp);
|
||||
! return;
|
||||
! }
|
||||
died("was eaten");
|
||||
+ }
|
||||
/* Redraw player if he moved. Redraw occasionally anyway. */
|
||||
if(player.xpos != player.xold || player.ypos != player.yold ||
|
||||
(curtick & 0xf) == 0)
|
||||
***************
|
||||
*** 422,428 ****
|
||||
sscanf(argv[i]+2,"%d",&speed);
|
||||
}
|
||||
else {
|
||||
! printf("usage: golddig [-l <level>] [-s <speed 1-9>] [<world name>]\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
--- 447,453 ----
|
||||
sscanf(argv[i]+2,"%d",&speed);
|
||||
}
|
||||
else {
|
||||
! printf("usage: golddig [-l <level>] [-s <speed 0-9>] [<world name>]\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
***************
|
||||
*** 434,440 ****
|
||||
}
|
||||
/* remember what the starting level was */
|
||||
levelstart = levelnum;
|
||||
!
|
||||
/* start up x windows and all graphics cursors for drawing level */
|
||||
xstart(EVMASK);
|
||||
/* reassemble the graphics cursors to prepare for actual play */
|
||||
--- 459,467 ----
|
||||
}
|
||||
/* remember what the starting level was */
|
||||
levelstart = levelnum;
|
||||
! x_lives = 6 - levelnum;
|
||||
! if (x_lives < 1)
|
||||
! x_lives = 1;
|
||||
/* start up x windows and all graphics cursors for drawing level */
|
||||
xstart(EVMASK);
|
||||
/* reassemble the graphics cursors to prepare for actual play */
|
||||
***************
|
||||
*** 467,475 ****
|
||||
init_level();
|
||||
|
||||
/* initialize timer structure according to speed */
|
||||
! if(speed <= 0)
|
||||
speed = 1;
|
||||
! if(speed <= 5)
|
||||
cycletime.it_interval.tv_usec = (5-speed) * 50000 + 125000;
|
||||
else
|
||||
cycletime.it_interval.tv_usec = 625000 / speed;
|
||||
--- 494,504 ----
|
||||
init_level();
|
||||
|
||||
/* initialize timer structure according to speed */
|
||||
! if(speed < 0)
|
||||
speed = 1;
|
||||
! if(speed == 0)
|
||||
! cycletime.it_interval.tv_usec = 625000 / x_turbo;
|
||||
! else if(speed <= 5)
|
||||
cycletime.it_interval.tv_usec = (5-speed) * 50000 + 125000;
|
||||
else
|
||||
cycletime.it_interval.tv_usec = 625000 / speed;
|
||||
***************
|
||||
*** 517,528 ****
|
||||
case XK_R: case XK_r:
|
||||
redrawall();
|
||||
break;
|
||||
}
|
||||
/* Pressing a number changes the game speed */
|
||||
! else if(keyhit >= XK_1 && keyhit <= XK_9) {
|
||||
speed = (int) (keyhit - XK_0);
|
||||
/* Compute new cycle delay */
|
||||
! if(speed <= 5)
|
||||
cycletime.it_interval.tv_usec = (5-speed) * 50000 + 125000;
|
||||
else
|
||||
cycletime.it_interval.tv_usec = 625000 / speed;
|
||||
--- 546,569 ----
|
||||
case XK_R: case XK_r:
|
||||
redrawall();
|
||||
break;
|
||||
+ /* ^A restarts the current level */
|
||||
+ case XK_A: case XK_a:
|
||||
+ if(--x_lives) { /* restart level */
|
||||
+ goldleft = 0; player.ypos = 0;
|
||||
+ score = x_initial_score;
|
||||
+ init_level();
|
||||
+ redrawall();
|
||||
+ } else
|
||||
+ died("was abandoned");
|
||||
+ break;
|
||||
}
|
||||
/* Pressing a number changes the game speed */
|
||||
! else if(keyhit >= XK_0 && keyhit <= XK_9) {
|
||||
speed = (int) (keyhit - XK_0);
|
||||
/* Compute new cycle delay */
|
||||
! if(speed == 0)
|
||||
! cycletime.it_interval.tv_usec = 625000 / x_turbo;
|
||||
! else if(speed <= 5)
|
||||
cycletime.it_interval.tv_usec = (5-speed) * 50000 + 125000;
|
||||
else
|
||||
cycletime.it_interval.tv_usec = 625000 / speed;
|
||||
*** shared.c~ Sun Nov 20 00:59:30 1994
|
||||
--- shared.c Sun Nov 20 01:25:00 1994
|
||||
***************
|
||||
*** 279,287 ****
|
||||
void draw_score()
|
||||
{
|
||||
char buf[50];
|
||||
|
||||
/* Build the output string */
|
||||
! sprintf(buf,"score: %d level: %d speed: %d",score,levelnum,speed);
|
||||
/* Clear the current score line */
|
||||
XFillRectangle(disp,wind,blackgc,0,ysize << 4,xsize << 4,SCORESIZE);
|
||||
/* Actually draw the text */
|
||||
--- 279,288 ----
|
||||
void draw_score()
|
||||
{
|
||||
char buf[50];
|
||||
+ extern int x_lives;
|
||||
|
||||
/* Build the output string */
|
||||
! sprintf(buf,"score: %d level: %d speed: %d lives: %d",score,levelnum,speed,x_lives);
|
||||
/* Clear the current score line */
|
||||
XFillRectangle(disp,wind,blackgc,0,ysize << 4,xsize << 4,SCORESIZE);
|
||||
/* Actually draw the text */
|
||||
*** makelev.c~ Thu Dec 14 20:40:34 1989
|
||||
--- makelev.c Sun Nov 20 01:54:47 1994
|
||||
***************
|
||||
*** 1,3 ****
|
||||
--- 1,4 ----
|
||||
+ int x_lives;
|
||||
/* This program was written by Alexander Siegel in September of 1989 */
|
||||
/* at Cornell University. It may may copied freely for private use or */
|
||||
/* public dispersion provided that this comment is not removed. This */
|
1
games/golddig/pkg-comment
Normal file
1
games/golddig/pkg-comment
Normal file
@ -0,0 +1 @@
|
||||
golddig - Getting the Gold and Avoiding Death
|
10
games/golddig/pkg-descr
Normal file
10
games/golddig/pkg-descr
Normal file
@ -0,0 +1,10 @@
|
||||
Golddig is a fast action game designed for use with the X window
|
||||
system.
|
||||
Makelev is used to create and edit new levels which can be used by
|
||||
golddig.
|
||||
|
||||
The goal in golddig is to pick up all the gold pieces and then go to
|
||||
the next level without getting eaten by one of the bad guys. The gold
|
||||
pieces are distinctive small circular coins. After picking up all of
|
||||
the gold, the player must get to an open door or the top row of the
|
||||
level. After accomplishing this, the game will start the next level.
|
30
games/golddig/pkg-plist
Normal file
30
games/golddig/pkg-plist
Normal file
@ -0,0 +1,30 @@
|
||||
@cd /usr/local
|
||||
@owner games
|
||||
@mode 755
|
||||
bin/golddig
|
||||
@mode 4755
|
||||
bin/makelev
|
||||
@mode 644
|
||||
lib/golddig/default
|
||||
lib/golddig/goldlev001
|
||||
lib/golddig/goldlev002
|
||||
lib/golddig/goldlev003
|
||||
lib/golddig/goldlev004
|
||||
lib/golddig/goldlev005
|
||||
lib/golddig/goldlev006
|
||||
lib/golddig/goldlev007
|
||||
lib/golddig/goldlev008
|
||||
lib/golddig/goldlev009
|
||||
lib/golddig/goldlev010
|
||||
lib/golddig/goldlev011
|
||||
lib/golddig/goldlev012
|
||||
lib/golddig/goldlev013
|
||||
lib/golddig/goldlev014
|
||||
lib/golddig/goldlev015
|
||||
lib/golddig/goldlev016
|
||||
lib/golddig/goldlev017
|
||||
lib/golddig/goldlev018
|
||||
@mode 666
|
||||
lib/golddig/scores
|
||||
@mode 644
|
||||
man/man6/golddig.6
|
Loading…
Reference in New Issue
Block a user