v05i024: golddig -- A Game for X11, Part02/02
Dan Heller
argv at island.uu.net
Mon Nov 13 06:19:38 AEST 1989
Submitted-by: Alexander Siegel <siegel at cs.cornell.edu>
Posting-number: Volume 5, Issue 24
Archive-name: golddig/part02
#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create the files:
# golddig
# This archive created: Fri Oct 13 14:50:06 1989
export PATH; PATH=/bin:$PATH
if test ! -d 'golddig1.0'
then
mkdir 'golddig1.0'
fi
cd 'golddig1.0'
if test ! -d 'bitmap'
then
mkdir 'bitmap'
fi
cd 'bitmap'
if test -f 'badguy.bits'
then
echo shar: will not over-write existing file "'badguy.bits'"
else
cat << \SHAR_EOF > 'badguy.bits'
#define badguy_width 16
#define badguy_height 16
static char badguy_bits[] = {
0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x30, 0x0c, 0x18, 0x18, 0x6c, 0x36,
0x2c, 0x34, 0x8c, 0x31, 0x0c, 0x30, 0xcc, 0x33, 0x28, 0x14, 0x08, 0x10,
0x10, 0x08, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x00};
SHAR_EOF
if test 281 -ne "`wc -c < 'badguy.bits'`"
then
echo shar: error transmitting "'badguy.bits'" '(should have been 281 characters)'
fi
fi # end of overwriting check
if test -f 'badguy2.bits'
then
echo shar: will not over-write existing file "'badguy2.bits'"
else
cat << \SHAR_EOF > 'badguy2.bits'
#define badguy2_width 16
#define badguy2_height 16
#define badguy2_x_hot -1
#define badguy2_y_hot -1
static char badguy2_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x07, 0xe0, 0x0c, 0x30, 0x18, 0x18, 0x36, 0x6c,
0x34, 0x2c, 0x31, 0x8c, 0x30, 0x0c, 0x33, 0xcc, 0x17, 0xe8, 0x13, 0xc8,
0x08, 0x10, 0x07, 0xe0, 0x00, 0x00, 0x00, 0x00};
SHAR_EOF
if test 334 -ne "`wc -c < 'badguy2.bits'`"
then
echo shar: error transmitting "'badguy2.bits'" '(should have been 334 characters)'
fi
fi # end of overwriting check
if test -f 'badguy3.bits'
then
echo shar: will not over-write existing file "'badguy3.bits'"
else
cat << \SHAR_EOF > 'badguy3.bits'
#define badguy3_width 16
#define badguy3_height 16
#define badguy3_x_hot -1
#define badguy3_y_hot -1
static char badguy3_bits[] = {
0x0c, 0x30, 0xcc, 0x33, 0xe8, 0x17, 0xc8, 0x13, 0x10, 0x08, 0xe0, 0x07,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x30, 0x0c,
0x18, 0x18, 0x6c, 0x36, 0x2c, 0x34, 0x8c, 0x31};
SHAR_EOF
if test 334 -ne "`wc -c < 'badguy3.bits'`"
then
echo shar: error transmitting "'badguy3.bits'" '(should have been 334 characters)'
fi
fi # end of overwriting check
if test -f 'escape.bits'
then
echo shar: will not over-write existing file "'escape.bits'"
else
cat << \SHAR_EOF > 'escape.bits'
#define escape_width 16
#define escape_height 16
#define escape_x_hot -1
#define escape_y_hot -1
static char escape_bits[] = {
0xa8, 0x2a, 0x14, 0x00, 0x00, 0x28, 0x14, 0x00, 0xa0, 0x2a, 0x14, 0x00,
0x00, 0x28, 0x14, 0x00, 0xa0, 0x2a, 0x14, 0x00, 0x00, 0x28, 0x14, 0x00,
0xa0, 0x2a, 0x14, 0x00, 0x00, 0x28, 0x14, 0x10};
SHAR_EOF
if test 329 -ne "`wc -c < 'escape.bits'`"
then
echo shar: error transmitting "'escape.bits'" '(should have been 329 characters)'
fi
fi # end of overwriting check
if test -f 'fly.bits'
then
echo shar: will not over-write existing file "'fly.bits'"
else
cat << \SHAR_EOF > 'fly.bits'
#define fly_width 16
#define fly_height 16
#define fly_x_hot -1
#define fly_y_hot -1
static char fly_bits[] = {
0xc0, 0x03, 0xe0, 0x07, 0x60, 0x06, 0x70, 0x0e, 0x38, 0x1c, 0x1c, 0x38,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0xc4, 0x23, 0xcc, 0x33,
0x98, 0x19, 0xf0, 0x0f, 0xe0, 0x07, 0xc0, 0x03};
SHAR_EOF
if test 314 -ne "`wc -c < 'fly.bits'`"
then
echo shar: error transmitting "'fly.bits'" '(should have been 314 characters)'
fi
fi # end of overwriting check
if test -f 'ghost.bits'
then
echo shar: will not over-write existing file "'ghost.bits'"
else
cat << \SHAR_EOF > 'ghost.bits'
#define ghost_width 16
#define ghost_height 16
#define ghost_x_hot -1
#define ghost_y_hot -1
static char ghost_bits[] = {
0x7f, 0xfe, 0x5d, 0x54, 0x3a, 0xaa, 0x5d, 0x54, 0x0a, 0xa0, 0x0d, 0x50,
0x0a, 0xa0, 0x0f, 0xf0, 0x0f, 0xf0, 0x05, 0x50, 0x0a, 0xb0, 0x05, 0x50,
0x2a, 0xba, 0x55, 0x5c, 0x2a, 0xba, 0x7f, 0xfe};
SHAR_EOF
if test 324 -ne "`wc -c < 'ghost.bits'`"
then
echo shar: error transmitting "'ghost.bits'" '(should have been 324 characters)'
fi
fi # end of overwriting check
if test -f 'gold.bits'
then
echo shar: will not over-write existing file "'gold.bits'"
else
cat << \SHAR_EOF > 'gold.bits'
#define gold_width 16
#define gold_height 16
#define gold_x_hot -1
#define gold_y_hot -1
static char gold_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x60, 0x03, 0xb0, 0x06, 0x50, 0x05,
0xb0, 0x06, 0x60, 0x03, 0xc0, 0x01, 0x00, 0x00};
SHAR_EOF
if test 319 -ne "`wc -c < 'gold.bits'`"
then
echo shar: error transmitting "'gold.bits'" '(should have been 319 characters)'
fi
fi # end of overwriting check
if test -f 'hang1.bits'
then
echo shar: will not over-write existing file "'hang1.bits'"
else
cat << \SHAR_EOF > 'hang1.bits'
#define hang1_width 16
#define hang1_height 16
#define hang1_x_hot -1
#define hang1_y_hot -1
static char hang1_bits[] = {
0x18, 0x18, 0x9c, 0x39, 0xd8, 0x1b, 0xd8, 0x1b, 0xb8, 0x1d, 0xf0, 0x1f,
0xe0, 0x07, 0xc0, 0x03, 0xc0, 0x03, 0xe0, 0x07, 0x60, 0x06, 0x60, 0x06,
0x60, 0x06, 0x70, 0x0e, 0x38, 0x1c, 0x00, 0x00};
SHAR_EOF
if test 324 -ne "`wc -c < 'hang1.bits'`"
then
echo shar: error transmitting "'hang1.bits'" '(should have been 324 characters)'
fi
fi # end of overwriting check
if test -f 'hang2.bits'
then
echo shar: will not over-write existing file "'hang2.bits'"
else
cat << \SHAR_EOF > 'hang2.bits'
#define hang2_width 16
#define hang2_height 16
#define hang2_x_hot -1
#define hang2_y_hot -1
static char hang2_bits[] = {
0x30, 0x0c, 0x71, 0x8e, 0x3b, 0xdc, 0x1b, 0xd8, 0x1d, 0xb8, 0x0f, 0xf0,
0x07, 0xe0, 0x03, 0xc0, 0x03, 0xc0, 0x07, 0xe0, 0x06, 0x60, 0x06, 0x60,
0x06, 0x60, 0x0e, 0x70, 0x1c, 0x38, 0x00, 0x00};
SHAR_EOF
if test 324 -ne "`wc -c < 'hang2.bits'`"
then
echo shar: error transmitting "'hang2.bits'" '(should have been 324 characters)'
fi
fi # end of overwriting check
if test -f 'hole1.bits'
then
echo shar: will not over-write existing file "'hole1.bits'"
else
cat << \SHAR_EOF > 'hole1.bits'
#define hole1_width 16
#define hole1_height 16
#define hole1_x_hot -1
#define hole1_y_hot -1
static char hole1_bits[] = {
0xf7, 0xad, 0x55, 0x05, 0xb2, 0xa8, 0x00, 0x00, 0xb2, 0xa8, 0x55, 0x05,
0xb2, 0xa8, 0x00, 0x00, 0xf7, 0xad, 0x00, 0x00, 0xa2, 0xa8, 0x55, 0x0d,
0xa2, 0xa8, 0x00, 0x00, 0xa2, 0xa8, 0xf7, 0xad};
SHAR_EOF
if test 324 -ne "`wc -c < 'hole1.bits'`"
then
echo shar: error transmitting "'hole1.bits'" '(should have been 324 characters)'
fi
fi # end of overwriting check
if test -f 'hole2.bits'
then
echo shar: will not over-write existing file "'hole2.bits'"
else
cat << \SHAR_EOF > 'hole2.bits'
#define hole2_width 16
#define hole2_height 16
#define hole2_x_hot -1
#define hole2_y_hot -1
static char hole2_bits[] = {
0x55, 0x8d, 0x55, 0x05, 0x10, 0x88, 0x00, 0x00, 0x10, 0x88, 0x55, 0x05,
0x10, 0x88, 0x00, 0x00, 0x55, 0x8d, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00,
0x00, 0x88, 0x00, 0x00, 0x00, 0x88, 0x55, 0x8d};
SHAR_EOF
if test 324 -ne "`wc -c < 'hole2.bits'`"
then
echo shar: error transmitting "'hole2.bits'" '(should have been 324 characters)'
fi
fi # end of overwriting check
if test -f 'hole3.bits'
then
echo shar: will not over-write existing file "'hole3.bits'"
else
cat << \SHAR_EOF > 'hole3.bits'
#define hole3_width 16
#define hole3_height 16
#define hole3_x_hot -1
#define hole3_y_hot -1
static char hole3_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x88, 0x45, 0x05,
0x00, 0x88, 0x00, 0x00, 0x45, 0x8d, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00,
0x00, 0x88, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00};
SHAR_EOF
if test 324 -ne "`wc -c < 'hole3.bits'`"
then
echo shar: error transmitting "'hole3.bits'" '(should have been 324 characters)'
fi
fi # end of overwriting check
if test -f 'hole4.bits'
then
echo shar: will not over-write existing file "'hole4.bits'"
else
cat << \SHAR_EOF > 'hole4.bits'
#define hole4_width 16
#define hole4_height 16
#define hole4_x_hot -1
#define hole4_y_hot -1
static char hole4_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
SHAR_EOF
if test 324 -ne "`wc -c < 'hole4.bits'`"
then
echo shar: error transmitting "'hole4.bits'" '(should have been 324 characters)'
fi
fi # end of overwriting check
if test -f 'hole5.bits'
then
echo shar: will not over-write existing file "'hole5.bits'"
else
cat << \SHAR_EOF > 'hole5.bits'
#define hole5_width 16
#define hole5_height 16
#define hole5_x_hot -1
#define hole5_y_hot -1
static char hole5_bits[] = {
0x03, 0xc0, 0x01, 0x40, 0x02, 0x80, 0x01, 0x40, 0x02, 0x80, 0x01, 0x40,
0x02, 0x80, 0x03, 0xc0, 0x03, 0xc0, 0x01, 0x40, 0x02, 0x80, 0x01, 0x40,
0x02, 0x80, 0x01, 0x40, 0xaa, 0xba, 0xff, 0xff};
SHAR_EOF
if test 324 -ne "`wc -c < 'hole5.bits'`"
then
echo shar: error transmitting "'hole5.bits'" '(should have been 324 characters)'
fi
fi # end of overwriting check
if test -f 'hole6.bits'
then
echo shar: will not over-write existing file "'hole6.bits'"
else
cat << \SHAR_EOF > 'hole6.bits'
#define hole6_width 16
#define hole6_height 16
#define hole6_x_hot -1
#define hole6_y_hot -1
static char hole6_bits[] = {
0x0f, 0xf0, 0x0d, 0x50, 0x0a, 0xa0, 0x0d, 0x50, 0x0a, 0xa0, 0x0d, 0x50,
0x0a, 0xa0, 0x0f, 0xf0, 0x0f, 0xf0, 0x05, 0x50, 0x0a, 0xb0, 0x05, 0x50,
0xaa, 0xba, 0x55, 0x5d, 0xaa, 0xba, 0xff, 0xff};
SHAR_EOF
if test 324 -ne "`wc -c < 'hole6.bits'`"
then
echo shar: error transmitting "'hole6.bits'" '(should have been 324 characters)'
fi
fi # end of overwriting check
if test -f 'hole7.bits'
then
echo shar: will not over-write existing file "'hole7.bits'"
else
cat << \SHAR_EOF > 'hole7.bits'
#define hole7_width 16
#define hole7_height 16
#define hole7_x_hot -1
#define hole7_y_hot -1
static char hole7_bits[] = {
0x3f, 0xfc, 0x1d, 0x54, 0x3a, 0xa8, 0x1d, 0x54, 0x3a, 0xa8, 0x5d, 0x55,
0xba, 0xaa, 0xff, 0xff, 0xff, 0xff, 0x55, 0x5d, 0xaa, 0xba, 0x55, 0x5d,
0xaa, 0xba, 0x55, 0x5d, 0xaa, 0xba, 0xff, 0xff};
SHAR_EOF
if test 324 -ne "`wc -c < 'hole7.bits'`"
then
echo shar: error transmitting "'hole7.bits'" '(should have been 324 characters)'
fi
fi # end of overwriting check
if test -f 'ladder.bits'
then
echo shar: will not over-write existing file "'ladder.bits'"
else
cat << \SHAR_EOF > 'ladder.bits'
#define ladder_width 16
#define ladder_height 16
static char ladder_bits[] = {
0xfc, 0x3f, 0x14, 0x28, 0x14, 0x28, 0x14, 0x28, 0xf4, 0x2f, 0x14, 0x28,
0x14, 0x28, 0x14, 0x28, 0xf4, 0x2f, 0x14, 0x28, 0x14, 0x28, 0x14, 0x28,
0xf4, 0x2f, 0x14, 0x28, 0x14, 0x28, 0x1c, 0x38};
SHAR_EOF
if test 281 -ne "`wc -c < 'ladder.bits'`"
then
echo shar: error transmitting "'ladder.bits'" '(should have been 281 characters)'
fi
fi # end of overwriting check
if test -f 'left1.bits'
then
echo shar: will not over-write existing file "'left1.bits'"
else
cat << \SHAR_EOF > 'left1.bits'
#define left1_width 16
#define left1_height 16
#define left1_x_hot -1
#define left1_y_hot -1
static char left1_bits[] = {
0x00, 0x00, 0x80, 0x01, 0xc0, 0x03, 0xe0, 0x03, 0x80, 0x01, 0x80, 0x03,
0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x07, 0xc0, 0x07, 0x80, 0x03, 0x80, 0x03,
0x80, 0x03, 0x80, 0x03, 0xc0, 0x03, 0x00, 0x00};
SHAR_EOF
if test 324 -ne "`wc -c < 'left1.bits'`"
then
echo shar: error transmitting "'left1.bits'" '(should have been 324 characters)'
fi
fi # end of overwriting check
if test -f 'left2.bits'
then
echo shar: will not over-write existing file "'left2.bits'"
else
cat << \SHAR_EOF > 'left2.bits'
#define left2_width 16
#define left2_height 16
#define left2_x_hot -1
#define left2_y_hot -1
static char left2_bits[] = {
0x00, 0x00, 0x01, 0x80, 0x03, 0xc0, 0x03, 0xe0, 0x01, 0x80, 0x03, 0xe0,
0x03, 0xf0, 0x03, 0xd8, 0x03, 0xc8, 0x03, 0xe0, 0x07, 0x60, 0x06, 0x70,
0x06, 0x30, 0x06, 0x30, 0x07, 0x38, 0x00, 0x00};
SHAR_EOF
if test 324 -ne "`wc -c < 'left2.bits'`"
then
echo shar: error transmitting "'left2.bits'" '(should have been 324 characters)'
fi
fi # end of overwriting check
if test -f 'player.bits'
then
echo shar: will not over-write existing file "'player.bits'"
else
cat << \SHAR_EOF > 'player.bits'
#define player_width 16
#define player_height 16
#define player_x_hot -1
#define player_y_hot -1
static char player_bits[] = {
0x00, 0x00, 0x80, 0x01, 0xc0, 0x03, 0xc0, 0x03, 0x80, 0x01, 0xe0, 0x07,
0xf0, 0x0f, 0xd8, 0x1b, 0xcc, 0x33, 0xe4, 0x27, 0x60, 0x06, 0x60, 0x06,
0x60, 0x06, 0x70, 0x0e, 0x38, 0x1c, 0x00, 0x00};
SHAR_EOF
if test 329 -ne "`wc -c < 'player.bits'`"
then
echo shar: error transmitting "'player.bits'" '(should have been 329 characters)'
fi
fi # end of overwriting check
if test -f 'right1.bits'
then
echo shar: will not over-write existing file "'right1.bits'"
else
cat << \SHAR_EOF > 'right1.bits'
#define right1_width 16
#define right1_height 16
#define right1_x_hot -1
#define right1_y_hot -1
static char right1_bits[] = {
0x00, 0x00, 0x80, 0x01, 0xc0, 0x03, 0xc0, 0x07, 0x80, 0x01, 0xc0, 0x01,
0xc0, 0x03, 0xc0, 0x03, 0xe0, 0x03, 0xe0, 0x03, 0xc0, 0x01, 0xc0, 0x01,
0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x03, 0x00, 0x00};
SHAR_EOF
if test 329 -ne "`wc -c < 'right1.bits'`"
then
echo shar: error transmitting "'right1.bits'" '(should have been 329 characters)'
fi
fi # end of overwriting check
if test -f 'right2.bits'
then
echo shar: will not over-write existing file "'right2.bits'"
else
cat << \SHAR_EOF > 'right2.bits'
#define right2_width 16
#define right2_height 16
#define right2_x_hot -1
#define right2_y_hot -1
static char right2_bits[] = {
0x00, 0x00, 0x01, 0x80, 0x03, 0xc0, 0x07, 0xc0, 0x01, 0x80, 0x07, 0xc0,
0x0f, 0xc0, 0x1b, 0xc0, 0x13, 0xc0, 0x07, 0xc0, 0x06, 0xe0, 0x0e, 0x60,
0x0c, 0x60, 0x0c, 0x60, 0x1c, 0xe0, 0x00, 0x00};
SHAR_EOF
if test 329 -ne "`wc -c < 'right2.bits'`"
then
echo shar: error transmitting "'right2.bits'" '(should have been 329 characters)'
fi
fi # end of overwriting check
if test -f 'rope.bits'
then
echo shar: will not over-write existing file "'rope.bits'"
else
cat << \SHAR_EOF > 'rope.bits'
#define rope_width 16
#define rope_height 16
static char rope_bits[] = {
0x00, 0x00, 0xee, 0xee, 0xdd, 0xdd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
SHAR_EOF
if test 275 -ne "`wc -c < 'rope.bits'`"
then
echo shar: error transmitting "'rope.bits'" '(should have been 275 characters)'
fi
fi # end of overwriting check
if test -f 'space.bits'
then
echo shar: will not over-write existing file "'space.bits'"
else
cat << \SHAR_EOF > 'space.bits'
#define space_width 16
#define space_height 16
static char space_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
SHAR_EOF
if test 278 -ne "`wc -c < 'space.bits'`"
then
echo shar: error transmitting "'space.bits'" '(should have been 278 characters)'
fi
fi # end of overwriting check
if test -f 'stone.bits'
then
echo shar: will not over-write existing file "'stone.bits'"
else
cat << \SHAR_EOF > 'stone.bits'
#define stone_width 16
#define stone_height 16
#define stone_x_hot -1
#define stone_y_hot -1
static char stone_bits[] = {
0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f,
0xfe, 0x7f, 0xfe, 0x7f, 0xfe, 0x7f, 0xfe, 0x7f, 0xfe, 0x7f, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8};
SHAR_EOF
if test 324 -ne "`wc -c < 'stone.bits'`"
then
echo shar: error transmitting "'stone.bits'" '(should have been 324 characters)'
fi
fi # end of overwriting check
if test -f 'up1.bits'
then
echo shar: will not over-write existing file "'up1.bits'"
else
cat << \SHAR_EOF > 'up1.bits'
#define up1_width 16
#define up1_height 16
#define up1_x_hot -1
#define up1_y_hot -1
static char up1_bits[] = {
0x00, 0x18, 0x80, 0x19, 0xc0, 0x1b, 0xc0, 0x1b, 0x80, 0x1d, 0xf0, 0x0f,
0xf8, 0x07, 0xd8, 0x03, 0xd8, 0x03, 0xc0, 0x07, 0xc0, 0x06, 0xe0, 0x06,
0x60, 0x0e, 0x60, 0x0c, 0x70, 0x00, 0x30, 0x00};
SHAR_EOF
if test 314 -ne "`wc -c < 'up1.bits'`"
then
echo shar: error transmitting "'up1.bits'" '(should have been 314 characters)'
fi
fi # end of overwriting check
if test -f 'up2.bits'
then
echo shar: will not over-write existing file "'up2.bits'"
else
cat << \SHAR_EOF > 'up2.bits'
#define up2_width 16
#define up2_height 16
#define up2_x_hot -1
#define up2_y_hot -1
static char up2_bits[] = {
0xc0, 0x1b, 0xe0, 0x03, 0x60, 0x03, 0x60, 0x07, 0x70, 0x06, 0x30, 0x06,
0x00, 0x0e, 0x00, 0x0c, 0x18, 0x00, 0x98, 0x01, 0xd8, 0x03, 0xd8, 0x03,
0xb8, 0x01, 0xf0, 0x0f, 0xe0, 0x1f, 0xc0, 0x1b};
SHAR_EOF
if test 314 -ne "`wc -c < 'up2.bits'`"
then
echo shar: error transmitting "'up2.bits'" '(should have been 314 characters)'
fi
fi # end of overwriting check
if test -f 'uplevel.bits'
then
echo shar: will not over-write existing file "'uplevel.bits'"
else
cat << \SHAR_EOF > 'uplevel.bits'
#define uplevel_width 16
#define uplevel_height 16
static char uplevel_bits[] = {
0x00, 0x00, 0xe0, 0x3f, 0xd0, 0x3f, 0xc8, 0x3f, 0xc8, 0x3f, 0xc8, 0x3f,
0xc8, 0x3f, 0xc8, 0x3f, 0xdc, 0x3f, 0xdc, 0x3f, 0xc8, 0x3f, 0xc8, 0x3f,
0xc8, 0x3f, 0x28, 0x00, 0x18, 0x00, 0x08, 0x00};
SHAR_EOF
if test 284 -ne "`wc -c < 'uplevel.bits'`"
then
echo shar: error transmitting "'uplevel.bits'" '(should have been 284 characters)'
fi
fi # end of overwriting check
if test -f 'wall.bits'
then
echo shar: will not over-write existing file "'wall.bits'"
else
cat << \SHAR_EOF > 'wall.bits'
#define wall_width 16
#define wall_height 16
static char wall_bits[] = {
0xff, 0xff, 0x5d, 0x55, 0xba, 0xaa, 0x5d, 0x55, 0xba, 0xaa, 0x5d, 0x55,
0xba, 0xaa, 0xff, 0xff, 0xff, 0xff, 0x55, 0x5d, 0xaa, 0xba, 0x55, 0x5d,
0xaa, 0xba, 0x55, 0x5d, 0xaa, 0xba, 0xff, 0xff};
SHAR_EOF
if test 275 -ne "`wc -c < 'wall.bits'`"
then
echo shar: error transmitting "'wall.bits'" '(should have been 275 characters)'
fi
fi # end of overwriting check
if test -f 'invis.bits'
then
echo shar: will not over-write existing file "'invis.bits'"
else
cat << \SHAR_EOF > 'invis.bits'
#define invis_width 16
#define invis_height 16
#define invis_x_hot -1
#define invis_y_hot -1
static char invis_bits[] = {
0x0a, 0x50, 0x6f, 0xf6, 0x6e, 0x76, 0x07, 0xe0, 0x00, 0x00, 0x06, 0x60,
0x06, 0x60, 0x00, 0x00, 0x00, 0x00, 0x06, 0x60, 0x06, 0x60, 0x00, 0x00,
0x07, 0x60, 0x6e, 0xf6, 0x6f, 0x76, 0x0a, 0xd0};
SHAR_EOF
if test 324 -ne "`wc -c < 'invis.bits'`"
then
echo shar: error transmitting "'invis.bits'" '(should have been 324 characters)'
fi
fi # end of overwriting check
if test -f 'steplad.bits'
then
echo shar: will not over-write existing file "'steplad.bits'"
else
cat << \SHAR_EOF > 'steplad.bits'
#define steplad_width 16
#define steplad_height 16
static char steplad_bits[] = {
0x00, 0x00, 0xfc, 0x3f, 0xfc, 0x3f, 0xa8, 0x19, 0xb8, 0x19, 0x28, 0x3f,
0x1c, 0x33, 0x14, 0x33, 0x1c, 0x33, 0xf4, 0x7f, 0x1c, 0x66, 0x14, 0x66,
0x0e, 0x66, 0x0a, 0xfc, 0x0e, 0xcc, 0x0a, 0xcc};
SHAR_EOF
if test 284 -ne "`wc -c < 'steplad.bits'`"
then
echo shar: error transmitting "'steplad.bits'" '(should have been 284 characters)'
fi
fi # end of overwriting check
if test -f 'chute.bits'
then
echo shar: will not over-write existing file "'chute.bits'"
else
cat << \SHAR_EOF > 'chute.bits'
#define chute_width 16
#define chute_height 16
static char chute_bits[] = {
0x06, 0xe0, 0x07, 0x60, 0x06, 0xe0, 0x07, 0x60, 0x06, 0xe0, 0x07, 0x60,
0x06, 0xe0, 0x07, 0x60, 0x06, 0xe0, 0x07, 0x60, 0x06, 0xe0, 0x07, 0x60,
0x06, 0xe0, 0x07, 0x60, 0x06, 0xe0, 0x07, 0x60};
SHAR_EOF
if test 278 -ne "`wc -c < 'chute.bits'`"
then
echo shar: error transmitting "'chute.bits'" '(should have been 278 characters)'
fi
fi # end of overwriting check
if test -f 'tube.bits'
then
echo shar: will not over-write existing file "'tube.bits'"
else
cat << \SHAR_EOF > 'tube.bits'
#define tube_width 16
#define tube_height 16
static char tube_bits[] = {
0xaa, 0xaa, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x55, 0x55};
SHAR_EOF
if test 275 -ne "`wc -c < 'tube.bits'`"
then
echo shar: error transmitting "'tube.bits'" '(should have been 275 characters)'
fi
fi # end of overwriting check
if test -f 'vrope.bits'
then
echo shar: will not over-write existing file "'vrope.bits'"
else
cat << \SHAR_EOF > 'vrope.bits'
#define vrope_width 16
#define vrope_height 16
static char vrope_bits[] = {
0x40, 0x01, 0x80, 0x02, 0x80, 0x03, 0xc0, 0x01, 0x40, 0x01, 0x80, 0x02,
0x80, 0x03, 0xc0, 0x01, 0x40, 0x01, 0x80, 0x02, 0x80, 0x03, 0xc0, 0x01,
0x40, 0x01, 0x80, 0x02, 0x80, 0x03, 0xc0, 0x01};
SHAR_EOF
if test 278 -ne "`wc -c < 'vrope.bits'`"
then
echo shar: error transmitting "'vrope.bits'" '(should have been 278 characters)'
fi
fi # end of overwriting check
if test -f 'teleport.bits'
then
echo shar: will not over-write existing file "'teleport.bits'"
else
cat << \SHAR_EOF > 'teleport.bits'
#define teleport_width 16
#define teleport_height 16
static char teleport_bits[] = {
0x00, 0x00, 0x7c, 0x3e, 0x7a, 0x5e, 0x8e, 0x71, 0x96, 0x69, 0x46, 0x62,
0x26, 0x64, 0x99, 0x99, 0x99, 0x99, 0x26, 0x64, 0x46, 0x62, 0x96, 0x69,
0x8e, 0x71, 0x7a, 0x5e, 0x7c, 0x3e, 0x80, 0x01};
SHAR_EOF
if test 287 -ne "`wc -c < 'teleport.bits'`"
then
echo shar: error transmitting "'teleport.bits'" '(should have been 287 characters)'
fi
fi # end of overwriting check
if test -f 'armor.bits'
then
echo shar: will not over-write existing file "'armor.bits'"
else
cat << \SHAR_EOF > 'armor.bits'
#define armor_width 16
#define armor_height 16
static char armor_bits[] = {
0x00, 0x00, 0x38, 0x1c, 0xd8, 0x17, 0xa8, 0x1a, 0x58, 0x15, 0xa8, 0x1a,
0x58, 0x15, 0xa8, 0x1a, 0x58, 0x15, 0xb8, 0x1a, 0x50, 0x0d, 0xb0, 0x0a,
0x60, 0x05, 0xc0, 0x03, 0x80, 0x01, 0x00, 0x00};
SHAR_EOF
if test 278 -ne "`wc -c < 'armor.bits'`"
then
echo shar: error transmitting "'armor.bits'" '(should have been 278 characters)'
fi
fi # end of overwriting check
if test -f 'parac.bits'
then
echo shar: will not over-write existing file "'parac.bits'"
else
cat << \SHAR_EOF > 'parac.bits'
#define parac_width 16
#define parac_height 16
static char parac_bits[] = {
0x00, 0x00, 0xe0, 0x03, 0x18, 0x0c, 0x04, 0x10, 0xc4, 0x11, 0xa2, 0x22,
0x92, 0x24, 0xb2, 0x26, 0xac, 0x1a, 0xc8, 0x09, 0x70, 0x07, 0xc0, 0x01,
0xc0, 0x01, 0xc0, 0x01, 0xa0, 0x02, 0x40, 0x01};
SHAR_EOF
if test 278 -ne "`wc -c < 'parac.bits'`"
then
echo shar: error transmitting "'parac.bits'" '(should have been 278 characters)'
fi
fi # end of overwriting check
if test -f 'nshovel.bits'
then
echo shar: will not over-write existing file "'nshovel.bits'"
else
cat << \SHAR_EOF > 'nshovel.bits'
#define nshovel_width 16
#define nshovel_height 16
static char nshovel_bits[] = {
0x02, 0x40, 0x04, 0x20, 0xc8, 0x13, 0x40, 0x02, 0xc0, 0x03, 0x80, 0x01,
0x80, 0x01, 0x8f, 0xf1, 0x80, 0x01, 0x80, 0x01, 0xe0, 0x07, 0x20, 0x04,
0x24, 0x24, 0x22, 0x44, 0x41, 0x82, 0x80, 0x01};
SHAR_EOF
if test 284 -ne "`wc -c < 'nshovel.bits'`"
then
echo shar: error transmitting "'nshovel.bits'" '(should have been 284 characters)'
fi
fi # end of overwriting check
if test -f 'hourgl.bits'
then
echo shar: will not over-write existing file "'hourgl.bits'"
else
cat << \SHAR_EOF > 'hourgl.bits'
#define hourgl_width 16
#define hourgl_height 16
static char hourgl_bits[] = {
0x00, 0x00, 0xfc, 0x3f, 0x04, 0x20, 0x08, 0x10, 0x70, 0x0e, 0xe0, 0x07,
0xc0, 0x03, 0x80, 0x01, 0x80, 0x01, 0x40, 0x02, 0x20, 0x04, 0x30, 0x0c,
0x78, 0x1e, 0xfc, 0x3f, 0xfc, 0x3f, 0x00, 0x00};
SHAR_EOF
if test 281 -ne "`wc -c < 'hourgl.bits'`"
then
echo shar: error transmitting "'hourgl.bits'" '(should have been 281 characters)'
fi
fi # end of overwriting check
if test -f 'reverse.bits'
then
echo shar: will not over-write existing file "'reverse.bits'"
else
cat << \SHAR_EOF > 'reverse.bits'
#define reverse_width 16
#define reverse_height 16
static char reverse_bits[] = {
0x00, 0x00, 0x00, 0x04, 0x00, 0x0c, 0xf8, 0x1f, 0xf8, 0x3f, 0xf8, 0x1f,
0x00, 0x0c, 0x00, 0x04, 0x20, 0x00, 0x30, 0x00, 0xf8, 0x1f, 0xfc, 0x1f,
0xf8, 0x1f, 0x30, 0x00, 0x20, 0x00, 0x00, 0x00};
SHAR_EOF
if test 284 -ne "`wc -c < 'reverse.bits'`"
then
echo shar: error transmitting "'reverse.bits'" '(should have been 284 characters)'
fi
fi # end of overwriting check
cd ..
if test -f 'movement.c'
then
echo shar: will not over-write existing file "'movement.c'"
else
cat << \SHAR_EOF > 'movement.c'
/* 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 */
/* program, any portion of this program, or any derivative of this */
/* program may not be sold or traded for financial gain. */
#include <stdio.h>
#include <X11/Xlib.h>
#include <X11/keysym.h>
#include "golddig.h"
#define MAXHOLE 100 /* Maximum number of holes at once */
int holedecay[] = {2,4,6,62,66,70,74}; /* Number of ticks after which */
/* hole will change form. */
int numholes; /* Total number of holes */
/* Structure to describe a hole */
struct {
int x,y; /* Position of hole */
int ticmade; /* Value of curtick when hole was created. Used to */
/* time hole transitions. */
} holes[MAXHOLE]; /* Array for holes. */
/* Compute the allowable directions of movement out of a block. The */
/* value in the moveallow array is updated at that position. */
void allow_posit(x,y)
register int x,y; /* Position of block which is to be checked */
{
register int pos,code,allow;
/* Get position of block in level array */
pos = x*ysize + y;
/* Initially assume that all directions of movement are acceptable */
allow = MOVEUP | MOVEDOWN | MOVELEFT | MOVERIGHT;
/* Prevent movement off of the level into nowhere land */
if(x == 0)
allow &= ~MOVELEFT;
if(y == 0)
allow &= ~MOVEUP;
if(x == xsize - 1)
allow &= ~MOVERIGHT;
if(y == ysize - 1)
allow &= ~MOVEDOWN;
/* Get the control code for the block at the position */
code = fast_lookup[level[pos]].code;
/* Use the control code for space if the block is inactive */
if((code & INACTIVE) && goldleft > 0)
code = fast_lookup[SPACE].code;
/* Use the control bits for the block to reduce the allowable */
/* movement directions */
if(! (code & ULEAVE))
allow &= ~MOVEUP;
if(! (code & DLEAVE))
allow &= ~MOVEDOWN;
if(! (code & HLEAVE))
allow &= ~(MOVELEFT | MOVERIGHT);
/* Check for blocks where you fall through */
if(y < ysize - 1 && ! (code & SUPPORT)) {
/* Get the control code for the block directly underneath */
code = fast_lookup[level[pos + 1]].code;
if((code & INACTIVE) && goldleft > 0)
code = fast_lookup[SPACE].code;
/* Check if it is possible to fall into block beneath. */
/* The STOPBAD is so that things can walk over bad guys which are */
/* stuck in a hole. */
if((code & VENTER) && ! (code & (ULEAVE | STOPBAD)))
allow &= ~(MOVELEFT | MOVERIGHT | MOVEUP);
}
/* Check block to the left to make sure that it is possible to enter */
/* that block from the current position. */
if(x > 0) {
if(! (fast_lookup[level[pos - ysize]].code & HENTER))
allow &= ~MOVELEFT;
}
/* Check block to the right */
if(x < xsize - 1) {
if(! (fast_lookup[level[pos + ysize]].code & HENTER))
allow &= ~MOVERIGHT;
}
/* Check block above */
if(y > 0) {
if(! (fast_lookup[level[pos - 1]].code & VENTER))
allow &= ~MOVEUP;
}
/* Check block below */
if(y < ysize - 1) {
if(! (fast_lookup[level[pos + 1]].code & VENTER))
allow &= ~MOVEDOWN;
}
/* Store value back into moveallow array */
moveallow[pos] = allow;
}
/* Call allow_posit on a position and all surrounding positions */
void allow_area(x,y)
int x,y; /* Position to call allow_posit at */
{
allow_posit(x,y);
if(x < xsize - 1)
allow_posit(x+1,y);
if(x > 0)
allow_posit(x-1,y);
if(y < ysize - 1)
allow_posit(x,y+1);
if(y > 0)
allow_posit(x,y-1);
}
/* Regenerate entire moveallow array */
void regen_allow()
{
int x,y;
/* Iterate through every possible position and call allow_posit on */
/* it. */
for(x=0;x<xsize;++x)
for(y=0;y<ysize;++y)
allow_posit(x,y);
}
/* Form a hole. */
void make_hole(x,y)
int x,y; /* Position where hole is to be formed */
{
register int pos;
/* Compute position in level array where hole is to be created */
pos = x*ysize + y;
/* Make sure that the position is inside the level array */
if(pos < 0 || pos >= xsize * ysize || y < 1 ||
/* Make sure that the block can be dug */
! (fast_lookup[level[pos]].code & CANDIG) ||
/* Make sure that the block above it allows for digging */
/* underneath. */
! (fast_lookup[level[pos - 1]].code & DIGUND) ||
/* Prevent the creation of too many holes */
(numholes >= MAXHOLE))
return;
/* Replace the character at the position with the first hole block */
setchar(x,y,HOLE1);
/* Add that hole to the hole array */
holes[numholes].x = x;
holes[numholes].y = y;
holes[numholes].ticmade = curtick;
numholes ++;
/* Recompute the allowable movement direction for that position and */
/* all surrounding positions */
allow_area(x,y);
}
/* Fill up a hole with brick */
void fill_hole(x,y)
int x,y; /* Position specifying hole */
{
register int i;
/* Look through all the holes until the right one is found */
for(i=0;i<numholes;++i)
if(holes[i].x == x && holes[i].y == y) {
/* Change the block to a brick */
setchar(holes[i].x,holes[i].y,BRICK);
/* Recompute the allowable movement for the specified position */
/* and all surrounding positions. */
allow_area(holes[i].x,holes[i].y);
/* Remove the hole from the holes array */
holes[i] = holes[numholes - 1];
numholes --;
return;
}
}
/* Age all holes by one clock tick */
void change_holes()
{
register int i,j;
/* Look for decaying holes. Iterate through each hole. */
for(i=0;i<numholes;++i) {
/* Check if the hole is exactly at any transition point */
for(j=0;j<7;++j)
if(holes[i].ticmade + holedecay[j] == curtick) {
/* If it is a normal transition point, just change the block */
/* type */
if(j < 6)
setchar(holes[i].x,holes[i].y,(char) (HOLE1 + j + 1));
/* If it is the last transition point, fill the hole in */
else {
fill_hole(holes[i].x,holes[i].y);
/* Back up one hole since the hole that was at this position */
/* has now been replaced by another. */
i --;
}
break;
}
}
}
/* Try to move a thing (player or bad guy) in a given direction. The */
/* structure describing the things is updated in place with the new */
/* position and apparent active command. A code value is returned */
/* describing what type of movement actually occurred. */
int movething(thing,newdir,num)
register struct thing_s *thing; /* Pointer to struct describing */
/* current state of thing */
enum directs newdir; /* New command being attempted */
int num; /* Number of bad guy or -1 for */
/* player */
{
register int lpos,code;
/* Compute useful local values */
lpos = (thing->xpos >> 1)*ysize + (thing->ypos >> 1);
code = fast_lookup[level[lpos]].code;
if((code & INACTIVE) && goldleft > 0)
code = fast_lookup[SPACE].code;
/* Complete previous initiated movement */
if((thing->xpos & 1) || (thing->ypos & 1)) {
/* Allow partial horizontal movement to complete */
if(thing->xpos & 1) {
/* Continue in old direction if trying to stop */
switch(newdir != LEFT && newdir != RIGHT ? thing->dir : newdir) {
case LEFT:
thing->xpos -= 1;
thing->dir = LEFT;
break;
default:
thing->xpos += 1;
thing->dir = RIGHT;
break;
}
}
/* Allow partial vertical movement to complete */
if(thing->ypos & 1) {
/* Continue in old direction if trying to stop */
switch(newdir != UP && newdir != DOWN ? thing->dir : newdir) {
case UP:
if(moveallow[lpos + 1] & MOVEUP) {
thing->ypos -= 1;
thing->dir = UP;
break;
}
default:
thing->ypos += 1;
thing->dir = DOWN;
break;
}
}
/* Pickup things which are laying around */
lpos = (thing->xpos >> 1)*ysize + (thing->ypos >> 1);
code = fast_lookup[level[lpos]].code;
if(newdir != PUTDOWN && (code & PICKUP) && thing->hold == SPACE) {
thing->hold = level[lpos];
setchar(thing->xpos >> 1,thing->ypos >> 1,SPACE);
allow_area(thing->xpos >> 1,thing->ypos >> 1);
}
/* Activate teleporter if standing on one */
if(code & TELEPORT) {
do {
lpos ++;
thing->ypos += 2;
if(thing->ypos >> 1 == ysize) {
thing->ypos = 0;
thing->xpos += 2;
if(thing->xpos >> 1 == xsize) {
lpos = 0;
thing->xpos = 0;
}
}
} while(! (fast_lookup[level[lpos]].code & TELEPORT));
}
return(1);
}
/* Allow creature to fall */
if(! (code & SUPPORT) &&
(moveallow[lpos] & MOVEDOWN) &&
! (moveallow[lpos+1] & MOVEUP) &&
(thing->hold == SPACE ||
! (fast_lookup[thing->hold].code & STOPFALL))) {
/* Prevent falling into another thing */
if(! overlap_badguy(thing->xpos,thing->ypos+2,num)) {
/* Drop item behind if falling into a hole */
if(level[lpos] == SPACE && thing->hold != SPACE &&
(fast_lookup[level[lpos+1]].code & STOPBAD)) {
setchar(thing->xpos >> 1,thing->ypos >> 1,thing->hold);
thing->hold = SPACE;
allow_area(thing->xpos >> 1,thing->ypos >> 1);
}
/* Increment vertical position */
thing->ypos += 1;
thing->dir = STAND;
return(2);
}
/* Since there is something below, allow creature to move left or */
/* right. This changes the moveallow array permanently and can */
/* have an interesting effect on the behavior of the bad guys. */
else {
if((thing->xpos >> 1) > 0 &&
(fast_lookup[level[lpos - ysize]].code & HENTER))
moveallow[lpos] |= MOVELEFT;
if((thing->xpos >> 1) < xsize - 1 &&
(fast_lookup[level[lpos + ysize]].code & HENTER))
moveallow[lpos] |= MOVERIGHT;
}
}
/* Since the thing is not falling or completing a previous movement, */
/* it can start off in a new direction. The moveallow array is used */
/* to determine which directions are possible. */
thing->dir = STAND;
switch(newdir) {
/* Put something down if that is the order */
case PUTDOWN:
if(level[lpos] == SPACE && thing->hold != SPACE) {
setchar(thing->xpos >> 1,thing->ypos >> 1,thing->hold);
thing->hold = SPACE;
allow_area(thing->xpos >> 1,thing->ypos >> 1);
}
return(3);
/* Check for possible upward movement. */
case UP:
if(moveallow[lpos] & MOVEUP) {
thing->ypos -= 1;
thing->dir = UP;
}
break;
/* Check for possible downward movement. */
case DOWN:
if(moveallow[lpos] & MOVEDOWN) {
thing->ypos += 1;
thing->dir = DOWN;
}
break;
/* Check for possible left movement. */
case LEFT:
if(moveallow[lpos] & MOVELEFT) {
thing->xpos -= 1;
thing->dir = LEFT;
}
break;
/* Check for possible right movement. */
case RIGHT:
if(moveallow[lpos] & MOVERIGHT) {
thing->xpos += 1;
thing->dir = RIGHT;
}
break;
/* Dig holes left or right if that is the command. The make_hole */
/* command will fail if it is impossible to dig a hole at the */
/* specified location. */
case DIGLEFT:
make_hole((thing->xpos >> 1) - 1,(thing->ypos >> 1) + 1);
if(fast_lookup[thing->hold].code & NSHOVEL) {
make_hole((thing->xpos >> 1) - 2,(thing->ypos >> 1) + 1);
make_hole((thing->xpos >> 1) - 1,(thing->ypos >> 1) + 2);
make_hole((thing->xpos >> 1) - 2,(thing->ypos >> 1) + 2);
}
return(4);
case DIGRIGHT:
make_hole((thing->xpos >> 1) + 1,(thing->ypos >> 1) + 1);
if(fast_lookup[thing->hold].code & NSHOVEL) {
make_hole((thing->xpos >> 1) + 2,(thing->ypos >> 1) + 1);
make_hole((thing->xpos >> 1) + 1,(thing->ypos >> 1) + 2);
make_hole((thing->xpos >> 1) + 2,(thing->ypos >> 1) + 2);
}
return(4);
}
return(0);
}
SHAR_EOF
if test 12250 -ne "`wc -c < 'movement.c'`"
then
echo shar: error transmitting "'movement.c'" '(should have been 12250 characters)'
fi
fi # end of overwriting check
if test -f 'goldlev002'
then
echo shar: will not over-write existing file "'goldlev002'"
else
cat << \SHAR_EOF > 'goldlev002'
50 30
$ $ b
|@@@#@@@@| |#####| |@@@@@|
b $ | | | | $ | |
|####| | |$ | |@|@@@@| |
| | | |###| | |
| | @@@@@| | | $ |
| | | | | |@@#@@@|
| | | b| $ | | |
| | $ | @@@@@@|@@@ |##| | |
|@@@@ |##### | | | | |
| | | | | | b |$
| | | @@#@@@| | |$u |###@|
| | | | $ | @@@ | |
| | $ | | |@@#@ | |
####| | |@#@@@@| $ p| | | |
| @@@@| | |#####| | | |
| | | | | | | |
| | | | |$| |####| |
$$ | | $ | | @@@|@| | |
@@#@@| |#####| | $ | | |$ | $$ |
| | | | |#@@@ | @@@#@| #####
| | | | | | |
| | | | | $ | |
|@@@@ | | | |###| |$
| u | @@@@ | |@@@@@#@|
b | @@@| | | |$b
|######| | | |###|
| | |@#@@@| | | |
| $$ | $$ | | | $$ | |
SHAR_EOF
if test 1536 -ne "`wc -c < 'goldlev002'`"
then
echo shar: error transmitting "'goldlev002'" '(should have been 1536 characters)'
fi
fi # end of overwriting check
if test -f 'goldlev003'
then
echo shar: will not over-write existing file "'goldlev003'"
else
cat << \SHAR_EOF > 'goldlev003'
50 30
!#################################################
!######################$ |###### #######
!## #######$ ####|####|######$ b |######
!##b$ $ ###########|####|| | |####|####|###$ $
!##@@@|@## $ ####|####|########| |####|####|#
!#####|#######|####| |########| |####|####|#
!#$---|#######|########|###########|#|### $| |##|#
!# $ |#######| |### $ |#|###|###|##|#
!#####|###########|########|@@@@@@@@#| |###|$ |$
!#####|## $ |####|########|#################|###|
!$ |###|##|####|##$ |#################|###|
####|#####|##|####|####|######### $ ## |###|
####|#####|##| |####|#########|#|####|#######$|
####| $|#####|#| |#########|#|####|#######|#
#######|########|###@@@@##### $ |#| | |####|#
#######|#### |#####| |#####|#########|####|#
#######|####@@@@@#####|####|#####|#########| ||#
# $ |#####| $ |####| |##### ######|##
###|###|#####|##|#####|####@@@@@@|#####$ |#####|##
###|###|#####|##|#####|##########|#######| $ |##
###|# | |#$| ###|######### | $#########|##
###|#$ | |#@##@###| ################| $ | #
$ |#@@@@@@@@@########| $p###$ |#######|@@@@@#
#################################|#|## $ |######
#################################|#|##|####|######
####| #### #### |#|##|####|######
####|###|######|#|###|#######|#####| $|####| ##
|###|######|#|$##| |########|####|##|$##
b$ |###| $ |#####| $ |########| |######
#####################@@@@@@@@@########| b $|######
SHAR_EOF
if test 1536 -ne "`wc -c < 'goldlev003'`"
then
echo shar: error transmitting "'goldlev003'" '(should have been 1536 characters)'
fi
fi # end of overwriting check
if test -f 'goldlev004'
then
echo shar: will not over-write existing file "'goldlev004'"
else
cat << \SHAR_EOF > 'goldlev004'
50 30
!
$ $ $ $ $ $ $ $ !
|###|###|###|###|## @@@@@@@@@@#@@@@@@@@@@@@@@| !
|i i|i i|i |i i|i @ | |$|||b||$| |||| | @| !
##|###|###|###|###| @ |#$||| || |||||| | #| @| !
$|i | $ |i i|$ | @ |##| ||||||||$| ||##| @| !
|###|###|###|###|## @@ ||$ |||$||| ||||| $|| @| !
| i|$ i|i i| |i @ t| #|||| |b||||$|# |t @| !
|#####|###|###|###| @#@@@@@@@@@#@@@@@@@@@@@@@@| !
| i i| i| i| $ | | !
##|#|###|###|###|## @@@@z p @| !
$ |i| $|i |$ i| @$$$############### | !
|#####|###|###|###| @@@@@@@@@@@@@@@@@@@@## | !
| i $| i |i$i| | @ ------- @|----| !
##|#|###|###|###|## @ || ||$ @| !
$|i| i| | i |$ @ || b ||| | !
|#####|###|###|###| # | |@#b| b |$| #| !
| | | i |i | # $|| @@@#b| || #| !
###################| # | @@@@||$ #| !
| # ||| |$| #| !
$ n $ | # $|| ||| #| !
##########| @ @ | ##################| !
# ## #####| $ $ | = = | !
##########| | |======== ========| | !
###### ##| @#| | v|=== ======$====|v | !
##########| $ | | vv$$===$======$=|vv | !
## ### ###| | | v|=======$== ===|vv | !
##########|#### | |==== =========$=|v | !
########| @| ==================| | !
$|@@@@@@@@| s @# || = | !
SHAR_EOF
if test 1536 -ne "`wc -c < 'goldlev004'`"
then
echo shar: error transmitting "'goldlev004'" '(should have been 1536 characters)'
fi
fi # end of overwriting check
if test -f 'goldlev005'
then
echo shar: will not over-write existing file "'goldlev005'"
else
cat << \SHAR_EOF > 'goldlev005'
50 30
t ### ii i ii ii ii iii iii!iii
### i i ii ii ii i i i !i i
### ii i i i ii i i iii iii!iii !!!!!!
$$$$###!!!!!!!!! i i i i!i i! !
#######! $ ! !!! !!! i i i iii!iii ! !!!!
#######!b# $|$ !!! ! ! ! ! ! !
##########$|$|$ ! ! ! !!! !!! !!!!!!!!!!!! !!!!
##|## ! ! ! ! ! ! ! ! !
-----=======|----- !!! !!! !!! !!! !!!!!!!!!!!!!!!
$ | $-- @|-| @ !
@@ | - | -$| @##############a !!!!!!!!!!!!!!!
$ | c @|-$$| @$ $ |@ !
|@ | $= @ | @ | |@ !!!!!!!!!!!!!!!!
| @| @ @@@| @@@@@@@@@@@@@@@@ !
| @@--- @$ |@s !!!!!!!!!!!!!!!!
|--- |=| | #@| i | !
@@ |$ib $ $ $ i| $ $ $ !
@ b $ @@#@#@#@#@#@#@#@| #|-|# #######!
|@#@#@#@#@#@#@#@|#t--- ----#| | | #|----#!
|# #| $ $ $ $ $ $ | $| |$ #|i #!
| $ $ $ |@ | |$|$| | b@| #|-|# #|i #!
|@ $| |$| |$| b@|#@#@#@#@#@#@#@#| | | #|i #!
|#@#@#@#@#@#@#@#|----- -| |$| #|i $ #!
|---- $ | -----| @@@@@@@ #|-|# |###g#!
| ###| $ b | $ $ $ $ | | |# !
|# $ |##### | |###### | | |# !
|###### | p | | |-|---|# #!
|----|## | # | |- - -- bb bb |# s#!
$ $ | # |$ $ $b | # |#$ ##!
$| | | ##############| |###### ############### !
SHAR_EOF
if test 1536 -ne "`wc -c < 'goldlev005'`"
then
echo shar: error transmitting "'goldlev005'" '(should have been 1536 characters)'
fi
fi # end of overwriting check
if test -f 'goldlev006'
then
echo shar: will not over-write existing file "'goldlev006'"
else
cat << \SHAR_EOF > 'goldlev006'
50 30
b # !
|@@ ##|-| |-| !
| @ #| | | | $ !
| @ #| | # t | @|@@|@@@#@@| !
| @@ #| | # # | $| | $$ | !
| @@ #| | # #------ --------| ||#@|@|@@@@| !
| @ #| | # $ $|#@|@@@b@@@@@| | $| $ !
| @ | | #|###@# | # $ $#| |@@#@@|@@#@@ !
| @@ | | #|$ $|# | # # $|#| !
| @@ | | #@###|# | # # @|#| !
| @ | | #|$ $|# | # # #|#| $ !
|@@@@ | | #|###@# | #t|##|#|----------| !
|@ | #|$ $|# | ##|##|# b| p@!
|@ ## | #@###|# | |##|##################|@!
|@$ ## | #|$ $|# | |##|#c c c$ $$ $$ $|@!
|@#$$# | #|###@# | |##|#$c$c$ ===========|@!
| ## # | #| # | |##|#c c = $$ $|@!
| # # | #|b # | |# |#$c$ =============|@!
|$$#$# | ####### | |@$|#c = $$ $|@!
| |-$# #| ####### | s|@@@#$ ===============|@!
| |# | #$ $b #|@@@# = $$ $|@!
##@@@@@@@@@@@@@@@@@#####@@@@@@@@@@@@@@@@@@@@@@@@#!
------ @@@@@@@ !
##### | |--------$- !
# |####| |i# i|i# | # i| # | g | !
##### | #|--i$ |-- $ |-- $ |-- $ | @|@# $ | !
#$ | #### | | | | i | |--@ g | !
#####| $#|i|i| |i|i| |i|i| |i|i| | | @ $ | !
#$ |#### |$|$| |$|$| |$|$| |$|$|i | |@|@| g | !
#####b |#########################| | | |@ $ | !
SHAR_EOF
if test 1536 -ne "`wc -c < 'goldlev006'`"
then
echo shar: error transmitting "'goldlev006'" '(should have been 1536 characters)'
fi
fi # end of overwriting check
if test -f 'default'
then
echo shar: will not over-write existing file "'default'"
else
cat << \SHAR_EOF > 'default'
50 30
!
! !!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!! ! ! !
!! ! !!!!! !!!!!!!!!!!! !
! #### ### ### ##### ! ! ! !
! # # # # # ! !!!! ! !!!!!!!! ! !!!
! # # # # # ! ! !!!! ! ! ! !
! #### # # # # !!! ! ! !!!! ! !!!!!
!! # # # # # ! !!!!!!!!! ! ! !
! # # # # # ! !! ! !!!!!!!
! #### ### ### # ! !!!!! ! ! !
! ! !!! ! !!!!!! !!!!!! !
! !!!!!! ! ! ! !!! !!!!
! ! ! !!! ! ! ! !!!!!!!!!!!!!
!! ! !!!! ! ! !!! !!! !!!!!!
! ! ! ! ! ! !!!!!!!!!!! !
!!!! !!!!!! ! # # ####! ! !!!!!!!!
! ## ## # ! !!!!!!!!!
!!!!!!!!!!! !!!!! # # # # ! !!!!!!!!!!
! ! ! # # ####! !!!!!!! !
!!!!!!!!! !!!!!!! # # # ! ! !! !
! # # # ! ! ! !!! !!! !
!!!!!!! ! !!!!!!! # # ####! ! !!!! ! ! ! ! ! !
! ! ! ! ! ! ! ! ! ! ! ! ! ! !
!!!!! ! !!! !!!!! ! !!! ! !!! !!! !!!
! ! ! ! !
!!!!! !!!!!!! !!! !!!!!! !!!!!!!!!!!!!
! ! ! ! !
!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!
p $ !
SHAR_EOF
if test 1536 -ne "`wc -c < 'default'`"
then
echo shar: error transmitting "'default'" '(should have been 1536 characters)'
fi
fi # end of overwriting check
if test -f 'scores.c'
then
echo shar: will not over-write existing file "'scores.c'"
else
cat << \SHAR_EOF > 'scores.c'
/* 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 */
/* program, any portion of this program, or any derivative of this */
/* program may not be sold or traded for financial gain. */
#include <stdio.h>
#include <X11/Xlib.h>
#include <X11/keysym.h>
#include "golddig.h"
char *getenv(),*sprintf();
#define NUMHIGH 15 /* Number of high scores that will be remembered */
/* Add a high score to the high score list */
void add_score(whydie)
char *whydie; /* Textual description of reason for death */
{
/* Structure containing top game results */
struct {
int score; /* Final score */
int slev,elev; /* Starting and ending level */
int uid; /* Player account uid */
char desc[80]; /* Text description */
} tops[NUMHIGH],next;
FILE *sfile; /* High score file */
char buf[200];
register int i;
int numscore,cur,numgame;
/* Generate name of high score file */
sprintf(buf,"%s/scores",LIB);
/* Open high score file */
sfile = fopen(buf,"r");
/* Set default values for number of games and high scores */
numscore = 0;
numgame = 0;
/* If file is readable, load in old high score list */
if(sfile != NULL) {
/* Load a line on text */
if(fgets(buf,200,sfile))
sscanf(buf,"%d",&numgame);
/* Extract score information from line */
while(fgets(buf,200,sfile) && numscore < NUMHIGH) {
sscanf(buf,"%d %d %d %d %[^\n]",&(next.score),&(next.slev),&(next.elev),
&(next.uid),next.desc);
tops[numscore] = next;
numscore ++;
}
fclose(sfile);
}
/* Contruct the structure containing the score for this game */
next.score = score;
next.slev = levelstart;
next.elev = levelnum;
next.uid = getuid();
sprintf(next.desc,"%s %s",getenv("USER"),whydie);
cur = -1;
/* Insert new score in old high score list */
if(numscore < NUMHIGH || tops[NUMHIGH - 1].score < next.score) {
/* Iterate through high score list */
for(i = (numscore >= NUMHIGH ? NUMHIGH-2 : numscore-1);i >= 0;i--) {
/* Look for place for insertion */
if(next.score > tops[i].score)
tops[i+1] = tops[i]; /* Move old scores down one place in list */
else
break; /* Found spot for insertion */
}
tops[i+1] = next; /* Overwrite entry in high score list */
cur = i+1; /* Remember where new high score was inserted */
/* Increment the number of high scores */
if(numscore < NUMHIGH)
numscore ++;
}
/* Increment and print the number of games played */
numgame ++;
printf("High scores after %d games played:\n",numgame);
/* Print out new high score list */
for(i=0;i<numscore;++i) {
/* Flag new high score with a leading > */
if(i == cur)
putchar('>');
else
putchar(' ');
printf("%s on level %d (started at %d). Final score was %d.\n",
tops[i].desc,tops[i].elev,tops[i].slev,tops[i].score);
}
/* If current game did not make it to the high score list, print it */
/* afterwords */
if(cur == -1) {
puts("...");
printf(">%s on level %d (started at %d). Final score was %d.\n",
next.desc,next.elev,next.slev,next.score);
}
/* Save new high score list to score file */
sprintf(buf,"%s/scores",LIB);
sfile = fopen(buf,"w");
if(sfile == NULL) {
perror(buf);
return;
}
fprintf(sfile,"%d\n",numgame);
for(i=0;i<numscore;++i)
fprintf(sfile,"%d %d %d %d %s\n",tops[i].score,tops[i].slev,
tops[i].elev,tops[i].uid,tops[i].desc);
fclose(sfile);
}
SHAR_EOF
if test 3716 -ne "`wc -c < 'scores.c'`"
then
echo shar: error transmitting "'scores.c'" '(should have been 3716 characters)'
fi
fi # end of overwriting check
if test -f 'goldlev007'
then
echo shar: will not over-write existing file "'goldlev007'"
else
cat << \SHAR_EOF > 'goldlev007'
50 30
@ t @$======$ $$$s !
@$ ---- ---|@ $$ @| ----$ #|## !
@@$ r - |@ b@@ @|c @| | !
@@@@@@ $ |@@@@ $$r @|#c |@| $ |$ !
$-----# # |@ @ b@@ @| cv-$| ##|# !
@ | r # $# |@ @@@@ @ |cv | | !
#| |##$$$## |@ @ #@|--v @ $ |$ !
@|$b$#@#$###$#@ |@ @@@#@ v $-|##|# !
@#|#@#$#@@@#$#@ |@ $----- v c | | !
@@@#$#@ @#$#@ |@ | $$ v-- $ |$ !
# #@ i|i @# # |@ | @@@@@ -- |##|# !
# # $|i|$ # # |@ | @n @ | !
b# | | # |@ | @# @ | !
@#@#@@@@@ # @@@@ |@$| #@ -- --| !
@@# #@@ |@$| | !
### # |@-|- at -@- at -@b | @ # !
---------- #$ # |@| i $@@@@@@@@@###@ # !
iiiiiiiiii # # |@|#i|$#i#i@$-|@--- @@@ # !
====$=== # # |@@@@@@@@@@@$ |-- | @@# !
| ======|c #|@### | -- @$ $$ |$$ $ !
|v===$= |c #|#-----| | p @============s !
|v| ==|v|c #|#| b |-@##============s### !
|v|v v|v|c #|#|$ $ $ |@ ===========sg # !
|v|v|v|v|c #|@@@@@@# |i|@@@ @|-----# $ #!
|v|v|$|v|c #|$-| @######|@ $ @| |--# $ # !
|v|v|==v|c #| -|##@----- |@|@@@| @| |--# $
|v|v=$==|c #| $-| @| $ @@|@ | @| |--# $
|v|=====bc #| $-|@|@@@@@@ |@ | @| |--#
|v===$===$ #| $ $-@| $$ |@$$| @| $ b |--#
|========== |ss $ $@@@@@@@@@@@@@@@@|@ # #$##@|t#
SHAR_EOF
if test 1536 -ne "`wc -c < 'goldlev007'`"
then
echo shar: error transmitting "'goldlev007'" '(should have been 1536 characters)'
fi
fi # end of overwriting check
if test -f 'goldlev008'
then
echo shar: will not over-write existing file "'goldlev008'"
else
cat << \SHAR_EOF > 'goldlev008'
50 30
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
------------ ----------- -------- t
|----| | ------| |---
|-----|
c c
c c
c $
c c
c c c
c c $ $ c
$ c $ c c $
$b c c b $ $ p $ b c cb
c $ c $ |###|$c c c
c c c$|##@####c c c c
g####cg@####cg####cg####@@##$g#####$g####cg###c#g#
g####cg#@###$g####cg##@###@#cg#####cg@@##$g###$#$#
g#@@#$g$-$-|c$@###$g#######@cg####@cg####c$@##c#g#
$##@@cg u |cg#@##cg########c$#@@#@$g@###$g##@$@g#
g####cg|####$g##@@cg@@@$-$-|cg@###@cg@###cg###c#g#
g####cg|@###cg## = $=$= u |cg###@@cg##@#c$@@@c#$#
g#$$=$$|##@#c$@#g##########@cg## $= $|###cg###c#g#
g#g###@|@@@#cg##$#|----|#@##cg##g##@#|@@#cg$$= $$
g|----#|#$=$ #g#| $$$|####c$##g###@|###cgg#@####
g| $$ #|$ ====$= @|$ |####cg@@$ $|###cgg@@#---
g| $$#@-----##@#@@#######@#cg##g####@###cgg###$$|
$|$$ $@#$$ $ ########$=====$$$=$ == #@@$= =$# |
g| $$ ##$ $ $#@##@###g#######@@#|$ $##g######@$$|
g#g#@###g@@@#######@@g###@#########@###g###@##@g##
t
SHAR_EOF
if test 1536 -ne "`wc -c < 'goldlev008'`"
then
echo shar: error transmitting "'goldlev008'" '(should have been 1536 characters)'
fi
fi # end of overwriting check
if test -f 'goldlev009'
then
echo shar: will not over-write existing file "'goldlev009'"
else
cat << \SHAR_EOF > 'goldlev009'
50 30
@@p@@ !
##b## ----!
## ##! --
# # ## ##! i !
@@@@@ @ #t#t### ##! i -!
$-- @ @ |# $ $ $ @$ v #$ ##! i!
| $ @@@@ #@|@ $ $ $ $ $ #t ## ##@@@!-
| $ $$ @ @@|@ $ s $ s $ t b ## ##$-# !
| ---|#$-#| |@@@@@@@@@@@@@@@@@| - ## $ |$# -!
| $ ## @@@ | |$==|$@ $==$ @| | ## ### #!
|$#|$ $ $@|--| @v@$@vv$ v$ v @| | bbb$## ### #!-
@@@@@@@@@@| @v | v at v$v v v|@ @| | $## $ # !
b $| @v$iv @|=======| @| | -## ##@@@ !
|i#iiiiiii @v@ =vv$==$==|@v @| | ## ## --- !
|i$ $-i @v v$|v|=$@ $v$| @| | ## ##! -!
|i|iii|i$i @v |=$|v@ =vvv | @| | ## ##!--
|i|$-i|$|i @v$@ @$v = @vv @v@| |@t c## ## !
|iii iiiii @v@$ v$@v=|v@||@| | @tt@## ##!--!
|i- $i$ $i @v|======|@$ v v@@| | @t ## ##!----!
|i$iii|i i @vv|===$@v$@vv v @| @| @### ## !
|i i$i|i i @vvv=$@v at vv vv$| @|$ @| @$ = ## !
|i i|i|i i @v|$=|$v at v|=||@| @@#@@| @@## ## !
|i |$|i $i @v$@$|@$@v$==|@ v@ @| !
|iiiiiiii#i @|===|=|@|==$|@$v@@#@@| !
|$ $=============== | !
@@@@@@@@#@@@@@@@@@@@@@@@@@@@@| | !
$ $$ $$ $ $ $ $ @| | !
|@@@@@@@@@@@@@@@@@@@@@@@@@@ @| | !
| -$---$$--$$--$---$--$--$-- | | $ $ !
| | | |@ @| !
SHAR_EOF
if test 1536 -ne "`wc -c < 'goldlev009'`"
then
echo shar: error transmitting "'goldlev009'" '(should have been 1536 characters)'
fi
fi # end of overwriting check
if test -f 'goldlev010'
then
echo shar: will not over-write existing file "'goldlev010'"
else
cat << \SHAR_EOF > 'goldlev010'
50 30
! !
---------! ! ------
|-- $$ $ $$ |#@@#@ |
| @@@@@@@@@@@@@@@@@@@@@@@ | |
| $$$ b $$$ | |#|##|
| |@@@@@@@@###@@@@@@@@ | $ |$|$$|
$ $ $ | | $$ b $$ | | $| |#|##|
| | |@@@@###@@@@ | | |$ |$|$$|
| | | b | | | $| |#|##|
| | | |@#@ | | | |$ |$|$$|
| | | |-$| @ | @ | @ | $| |#|##|
p | | | | -| $ | $ | $ | |$ |$|$$|
@@@@@@ | | | | | @ | @ | @ | $| |#|##|
@$== @ | | | | | $ | $ | $ | |$ |$|$$|
$ v | | | | | @ | @ | @ | $| |####|
v | | | | | $ | $ | $ | |$ | |
v | | |-$ | | @ | @ | @ | $| @ |$$$$|
|# ##v | |-$ | | | @| @| | |$ @@@@@@@@
|####v | | | #$|b $ # | | | $|
| #v | | | ######## | | | |$ #b
| $ #v | | # | $ b $ # | | $| #######|
|####v | | ################ | | |$ # |
$ v | # | $ $ $ # | $| #|######
$ v | ##|##################### | | #|
c v | $|$$ $ $ $$ $$ | | #######|
@$==v@ | #|####|####|#####|####| | | ----- |
@@ @@ | |$$ b| |b |b $$| | | |$$$$$|
| |######################| | | | |
$$ $$| |$$ $$ $$ $$| | |- |######|
##########|##########################| |
SHAR_EOF
if test 1536 -ne "`wc -c < 'goldlev010'`"
then
echo shar: error transmitting "'goldlev010'" '(should have been 1536 characters)'
fi
fi # end of overwriting check
cd ..
# End of shell archive
exit 0
More information about the Comp.sources.x
mailing list