[comp.sources.games] v05i083: xwanderer - wanderer2 for X-windows X11R2

games@tekred.TEK.COM (10/29/88)

Submitted by: Mike Cuddy <cuddy@convex.uucp>
Comp.sources.games: Volume 5, Issue 83
Archive-name: xwanderer/Part05



#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 5 (of 5)."
# Contents:  devread.c icons/backslide_tbm icons/brick_tbm
#   icons/cage_tbm icons/diamond_tbm icons/dirt_tbm icons/fwdslide_tbm
#   icons/landmine_tbm icons/larrow_tbm icons/monster_tbm
#   icons/player_tbm icons/rarrow_tbm icons/rock_tbm icons/space_tbm
#   icons/sprite_tbm icons/teleport_tbm icons/wall_tbm
#   icons/wayout_tbm icons/whoops_tbm read.c
# Wrapped by billr@saab on Fri Oct 28 16:31:15 1988
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'devread.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'devread.c'\"
else
echo shar: Extracting \"'devread.c'\" \(707 characters\)
sed "s/^X//" >'devread.c' <<'END_OF_FILE'
X#include "wand_head.h"
X
Xint rscreen(name,row_ptr,maxmoves)
Xint *maxmoves;
Xchar *name;
Xchar (*row_ptr)[ROWLEN+1];
X{
Xint  y;
XFILE *fp;
Xchar fnbuf[1024];
Xfp = fopen(name,"r");
Xif (fp == NULL) {	
X    sprintf(fnbuf,"%s/%s",SCREENPATH,name);
X    if ((fp = fopen(fnbuf,"r")) == NULL) {
X	printf("Screen %s not found in ./%s or %s/%s.\n\n",
X		name,name,SCREENPATH,name);
X	exit(1);
X    }
X}
X    {
X    for(y = 0;y<NOOFROWS;y++)
X        {
X        fgets((*row_ptr++),ROWLEN + 1,fp);
X	fgetc(fp);                         /* remove newline char*/
X	};
X    if(fscanf(fp,"%*s\n%d",maxmoves) != 1) {
X	printf("no maxmoves specified: assuming infinite movement.\n");
X	*maxmoves= (-1);
X	}
X    };
Xfclose(fp);
Xreturn (fp == NULL);
X}
END_OF_FILE
if test 707 -ne `wc -c <'devread.c'`; then
    echo shar: \"'devread.c'\" unpacked with wrong size!
fi
# end of 'devread.c'
fi
if test -f 'icons/backslide_tbm' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'icons/backslide_tbm'\"
else
echo shar: Extracting \"'icons/backslide_tbm'\" \(304 characters\)
sed "s/^X//" >'icons/backslide_tbm' <<'END_OF_FILE'
X#define backslide_tbm_width 16
X#define backslide_tbm_height 16
Xstatic char backslide_tbm_bits[] = {
X   0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 
X   0x40, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x08, 
X   0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00, 0x00};
END_OF_FILE
if test 304 -ne `wc -c <'icons/backslide_tbm'`; then
    echo shar: \"'icons/backslide_tbm'\" unpacked with wrong size!
fi
# end of 'icons/backslide_tbm'
fi
if test -f 'icons/brick_tbm' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'icons/brick_tbm'\"
else
echo shar: Extracting \"'icons/brick_tbm'\" \(292 characters\)
sed "s/^X//" >'icons/brick_tbm' <<'END_OF_FILE'
X#define brick_tbm_width 16
X#define brick_tbm_height 16
Xstatic char brick_tbm_bits[] = {
X   0xee, 0xee, 0xba, 0xbb, 0xdc, 0xdd, 0x76, 0x77, 0xee, 0xee, 0x00, 0x00, 
X   0xdd, 0xdc, 0x77, 0x76, 0xee, 0xee, 0xbb, 0xba, 0xdd, 0xdc, 0x77, 0x76, 
X   0xee, 0xee, 0x00, 0x00, 0xdc, 0xdd, 0x76, 0x77};
END_OF_FILE
if test 292 -ne `wc -c <'icons/brick_tbm'`; then
    echo shar: \"'icons/brick_tbm'\" unpacked with wrong size!
fi
# end of 'icons/brick_tbm'
fi
if test -f 'icons/cage_tbm' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'icons/cage_tbm'\"
else
echo shar: Extracting \"'icons/cage_tbm'\" \(289 characters\)
sed "s/^X//" >'icons/cage_tbm' <<'END_OF_FILE'
X#define cage_tbm_width 16
X#define cage_tbm_height 16
Xstatic char cage_tbm_bits[] = {
X   0x00, 0x00, 0xff, 0x7f, 0x92, 0x24, 0x92, 0x24, 0x92, 0x24, 0x92, 0x24, 
X   0xd2, 0x24, 0xd2, 0x24, 0xd2, 0x24, 0x92, 0x24, 0x92, 0x24, 0x92, 0x24, 
X   0x92, 0x24, 0x92, 0x24, 0xff, 0x7f, 0x00, 0x00};
END_OF_FILE
if test 289 -ne `wc -c <'icons/cage_tbm'`; then
    echo shar: \"'icons/cage_tbm'\" unpacked with wrong size!
fi
# end of 'icons/cage_tbm'
fi
if test -f 'icons/diamond_tbm' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'icons/diamond_tbm'\"
else
echo shar: Extracting \"'icons/diamond_tbm'\" \(298 characters\)
sed "s/^X//" >'icons/diamond_tbm' <<'END_OF_FILE'
X#define diamond_tbm_width 16
X#define diamond_tbm_height 16
Xstatic char diamond_tbm_bits[] = {
X   0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 0xf0, 0x07, 0xe0, 0x03, 0x40, 0x01, 
X   0xe0, 0x03, 0xf0, 0x0f, 0x70, 0x0f, 0x38, 0x0e, 0xd8, 0x1f, 0x3c, 0x1e, 
X   0xfc, 0x1d, 0x3c, 0x1e, 0x7c, 0x0f, 0xf8, 0x0f};
END_OF_FILE
if test 298 -ne `wc -c <'icons/diamond_tbm'`; then
    echo shar: \"'icons/diamond_tbm'\" unpacked with wrong size!
fi
# end of 'icons/diamond_tbm'
fi
if test -f 'icons/dirt_tbm' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'icons/dirt_tbm'\"
else
echo shar: Extracting \"'icons/dirt_tbm'\" \(289 characters\)
sed "s/^X//" >'icons/dirt_tbm' <<'END_OF_FILE'
X#define dirt_tbm_width 16
X#define dirt_tbm_height 16
Xstatic char dirt_tbm_bits[] = {
X   0x11, 0x11, 0x44, 0x44, 0x32, 0x22, 0x88, 0x8c, 0x11, 0x10, 0x44, 0x40, 
X   0x1a, 0x3a, 0x88, 0x88, 0x11, 0x11, 0x44, 0x4c, 0x2a, 0x22, 0x08, 0x88, 
X   0x11, 0x15, 0x40, 0x44, 0x22, 0x22, 0x88, 0x88};
END_OF_FILE
if test 289 -ne `wc -c <'icons/dirt_tbm'`; then
    echo shar: \"'icons/dirt_tbm'\" unpacked with wrong size!
fi
# end of 'icons/dirt_tbm'
fi
if test -f 'icons/fwdslide_tbm' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'icons/fwdslide_tbm'\"
else
echo shar: Extracting \"'icons/fwdslide_tbm'\" \(301 characters\)
sed "s/^X//" >'icons/fwdslide_tbm' <<'END_OF_FILE'
X#define fwdslide_tbm_width 16
X#define fwdslide_tbm_height 16
Xstatic char fwdslide_tbm_bits[] = {
X   0x00, 0x00, 0x00, 0x40, 0x00, 0x20, 0x00, 0x10, 0x00, 0x08, 0x00, 0x04, 
X   0x00, 0x02, 0x00, 0x01, 0x80, 0x00, 0x40, 0x00, 0x20, 0x00, 0x10, 0x00, 
X   0x08, 0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00};
END_OF_FILE
if test 301 -ne `wc -c <'icons/fwdslide_tbm'`; then
    echo shar: \"'icons/fwdslide_tbm'\" unpacked with wrong size!
fi
# end of 'icons/fwdslide_tbm'
fi
if test -f 'icons/landmine_tbm' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'icons/landmine_tbm'\"
else
echo shar: Extracting \"'icons/landmine_tbm'\" \(299 characters\)
sed "s/^X//" >'icons/landmine_tbm' <<'END_OF_FILE'
X#define landmine_tbm_width 16
X#define landmine_tbm_height 16
Xstatic char landmine_tbm_bits[] = {
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x28, 0x00, 0x00, 0x00,
X   0xe8, 0x00, 0x00, 0x1f, 0x90, 0x23, 0x00, 0x55, 0x00, 0x49, 0x00, 0x55,
X   0x00, 0x22, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00};
END_OF_FILE
if test 299 -ne `wc -c <'icons/landmine_tbm'`; then
    echo shar: \"'icons/landmine_tbm'\" unpacked with wrong size!
fi
# end of 'icons/landmine_tbm'
fi
if test -f 'icons/larrow_tbm' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'icons/larrow_tbm'\"
else
echo shar: Extracting \"'icons/larrow_tbm'\" \(295 characters\)
sed "s/^X//" >'icons/larrow_tbm' <<'END_OF_FILE'
X#define larrow_tbm_width 16
X#define larrow_tbm_height 16
Xstatic char larrow_tbm_bits[] = {
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
X   0x10, 0x50, 0x08, 0x28, 0xfc, 0x3f, 0x08, 0x28, 0x10, 0x50, 0x00, 0x00, 
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
END_OF_FILE
if test 295 -ne `wc -c <'icons/larrow_tbm'`; then
    echo shar: \"'icons/larrow_tbm'\" unpacked with wrong size!
fi
# end of 'icons/larrow_tbm'
fi
if test -f 'icons/monster_tbm' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'icons/monster_tbm'\"
else
echo shar: Extracting \"'icons/monster_tbm'\" \(298 characters\)
sed "s/^X//" >'icons/monster_tbm' <<'END_OF_FILE'
X#define monster_tbm_width 16
X#define monster_tbm_height 16
Xstatic char monster_tbm_bits[] = {
X   0x00, 0x00, 0x70, 0x00, 0x50, 0x07, 0x20, 0x45, 0x22, 0x42, 0xf2, 0x47, 
X   0xfa, 0x4f, 0xfa, 0x4f, 0x3e, 0x7f, 0xd8, 0x06, 0x18, 0x06, 0xf8, 0x07, 
X   0x40, 0x02, 0x60, 0x02, 0x20, 0x02, 0x3c, 0x1e};
END_OF_FILE
if test 298 -ne `wc -c <'icons/monster_tbm'`; then
    echo shar: \"'icons/monster_tbm'\" unpacked with wrong size!
fi
# end of 'icons/monster_tbm'
fi
if test -f 'icons/player_tbm' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'icons/player_tbm'\"
else
echo shar: Extracting \"'icons/player_tbm'\" \(295 characters\)
sed "s/^X//" >'icons/player_tbm' <<'END_OF_FILE'
X#define player_tbm_width 16
X#define player_tbm_height 16
Xstatic char player_tbm_bits[] = {
X   0x00, 0x00, 0x80, 0x01, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0x00, 0x00, 
X   0xe0, 0x07, 0xe0, 0x07, 0xe0, 0x07, 0xe0, 0x07, 0xe0, 0x07, 0xc0, 0x03, 
X   0x80, 0x01, 0x80, 0x01, 0xe0, 0x07, 0x00, 0x00};
END_OF_FILE
if test 295 -ne `wc -c <'icons/player_tbm'`; then
    echo shar: \"'icons/player_tbm'\" unpacked with wrong size!
fi
# end of 'icons/player_tbm'
fi
if test -f 'icons/rarrow_tbm' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'icons/rarrow_tbm'\"
else
echo shar: Extracting \"'icons/rarrow_tbm'\" \(295 characters\)
sed "s/^X//" >'icons/rarrow_tbm' <<'END_OF_FILE'
X#define rarrow_tbm_width 16
X#define rarrow_tbm_height 16
Xstatic char rarrow_tbm_bits[] = {
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x10, 
X   0x14, 0x20, 0xfc, 0x7f, 0x14, 0x20, 0x0a, 0x10, 0x00, 0x00, 0x00, 0x00, 
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
END_OF_FILE
if test 295 -ne `wc -c <'icons/rarrow_tbm'`; then
    echo shar: \"'icons/rarrow_tbm'\" unpacked with wrong size!
fi
# end of 'icons/rarrow_tbm'
fi
if test -f 'icons/rock_tbm' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'icons/rock_tbm'\"
else
echo shar: Extracting \"'icons/rock_tbm'\" \(289 characters\)
sed "s/^X//" >'icons/rock_tbm' <<'END_OF_FILE'
X#define rock_tbm_width 16
X#define rock_tbm_height 16
Xstatic char rock_tbm_bits[] = {
X   0x00, 0x00, 0x80, 0x03, 0xe0, 0x0f, 0xf8, 0x1f, 0xec, 0x6f, 0xfe, 0x5f, 
X   0xfe, 0x7f, 0xfe, 0x7f, 0xfe, 0x7f, 0xfe, 0x3f, 0xec, 0x3f, 0xd4, 0x1f, 
X   0x18, 0x1f, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00};
END_OF_FILE
if test 289 -ne `wc -c <'icons/rock_tbm'`; then
    echo shar: \"'icons/rock_tbm'\" unpacked with wrong size!
fi
# end of 'icons/rock_tbm'
fi
if test -f 'icons/space_tbm' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'icons/space_tbm'\"
else
echo shar: Extracting \"'icons/space_tbm'\" \(292 characters\)
sed "s/^X//" >'icons/space_tbm' <<'END_OF_FILE'
X#define space_tbm_width 16
X#define space_tbm_height 16
Xstatic char space_tbm_bits[] = {
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
END_OF_FILE
if test 292 -ne `wc -c <'icons/space_tbm'`; then
    echo shar: \"'icons/space_tbm'\" unpacked with wrong size!
fi
# end of 'icons/space_tbm'
fi
if test -f 'icons/sprite_tbm' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'icons/sprite_tbm'\"
else
echo shar: Extracting \"'icons/sprite_tbm'\" \(295 characters\)
sed "s/^X//" >'icons/sprite_tbm' <<'END_OF_FILE'
X#define sprite_tbm_width 16
X#define sprite_tbm_height 16
Xstatic char sprite_tbm_bits[] = {
X   0x00, 0x00, 0x3c, 0x20, 0x44, 0x52, 0x80, 0x08, 0x10, 0x15, 0x40, 0x04, 
X   0xa0, 0x22, 0x88, 0x08, 0x10, 0x11, 0x40, 0x06, 0x20, 0x06, 0x98, 0x08, 
X   0x04, 0x11, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00};
END_OF_FILE
if test 295 -ne `wc -c <'icons/sprite_tbm'`; then
    echo shar: \"'icons/sprite_tbm'\" unpacked with wrong size!
fi
# end of 'icons/sprite_tbm'
fi
if test -f 'icons/teleport_tbm' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'icons/teleport_tbm'\"
else
echo shar: Extracting \"'icons/teleport_tbm'\" \(299 characters\)
sed "s/^X//" >'icons/teleport_tbm' <<'END_OF_FILE'
X#define teleport_tbm_width 16
X#define teleport_tbm_height 16
Xstatic char teleport_tbm_bits[] = {
X   0x00, 0x00, 0x80, 0x00, 0xf0, 0x07, 0xfc, 0x1f, 0x08, 0x08, 0x68, 0x0b,
X   0x68, 0x0b, 0x08, 0x08, 0x28, 0x0b, 0x08, 0x08, 0x68, 0x0b, 0x08, 0x08,
X   0x68, 0x0b, 0x08, 0x08, 0xfc, 0x1f, 0x00, 0x00};
END_OF_FILE
if test 299 -ne `wc -c <'icons/teleport_tbm'`; then
    echo shar: \"'icons/teleport_tbm'\" unpacked with wrong size!
fi
# end of 'icons/teleport_tbm'
fi
if test -f 'icons/wall_tbm' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'icons/wall_tbm'\"
else
echo shar: Extracting \"'icons/wall_tbm'\" \(289 characters\)
sed "s/^X//" >'icons/wall_tbm' <<'END_OF_FILE'
X#define wall_tbm_width 16
X#define wall_tbm_height 16
Xstatic char wall_tbm_bits[] = {
X   0x55, 0x55, 0x2a, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x75, 0x5d, 0xa8, 0xaa, 
X   0x55, 0x55, 0xae, 0xaa, 0x15, 0x57, 0xaa, 0xaa, 0x51, 0x45, 0xaa, 0xaa, 
X   0x55, 0x45, 0xae, 0xab, 0x55, 0x55, 0xaa, 0xaa};
END_OF_FILE
if test 289 -ne `wc -c <'icons/wall_tbm'`; then
    echo shar: \"'icons/wall_tbm'\" unpacked with wrong size!
fi
# end of 'icons/wall_tbm'
fi
if test -f 'icons/wayout_tbm' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'icons/wayout_tbm'\"
else
echo shar: Extracting \"'icons/wayout_tbm'\" \(295 characters\)
sed "s/^X//" >'icons/wayout_tbm' <<'END_OF_FILE'
X#define wayout_tbm_width 16
X#define wayout_tbm_height 16
Xstatic char wayout_tbm_bits[] = {
X   0x00, 0x00, 0xfe, 0x7f, 0xfe, 0x7f, 0xf6, 0x6f, 0xee, 0x77, 0xde, 0x7b, 
X   0xbe, 0x7d, 0x7e, 0x7e, 0x7e, 0x7e, 0xbe, 0x7d, 0xde, 0x7b, 0xee, 0x77, 
X   0xf6, 0x6f, 0xfe, 0x7f, 0xfe, 0x7f, 0x00, 0x00};
END_OF_FILE
if test 295 -ne `wc -c <'icons/wayout_tbm'`; then
    echo shar: \"'icons/wayout_tbm'\" unpacked with wrong size!
fi
# end of 'icons/wayout_tbm'
fi
if test -f 'icons/whoops_tbm' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'icons/whoops_tbm'\"
else
echo shar: Extracting \"'icons/whoops_tbm'\" \(295 characters\)
sed "s/^X//" >'icons/whoops_tbm' <<'END_OF_FILE'
X#define whoops_tbm_width 16
X#define whoops_tbm_height 16
Xstatic char whoops_tbm_bits[] = {
X   0xff, 0xff, 0x01, 0x80, 0x01, 0x80, 0x81, 0x81, 0x41, 0x82, 0x01, 0x82, 
X   0x81, 0x99, 0x01, 0xa4, 0x99, 0xa0, 0x25, 0x98, 0x21, 0x80, 0x19, 0x88, 
X   0x01, 0x80, 0x09, 0x80, 0x01, 0x80, 0xff, 0xff};
END_OF_FILE
if test 295 -ne `wc -c <'icons/whoops_tbm'`; then
    echo shar: \"'icons/whoops_tbm'\" unpacked with wrong size!
fi
# end of 'icons/whoops_tbm'
fi
if test -f 'read.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'read.c'\"
else
echo shar: Extracting \"'read.c'\" \(610 characters\)
sed "s/^X//" >'read.c' <<'END_OF_FILE'
X#include "wand_head.h"
X
Xint rscreen(num,row_ptr,maxmoves)
Xint *maxmoves, num;
Xchar (*row_ptr)[ROWLEN+1];
X{
Xint  y;
XFILE *fp;
Xchar name[50];
Xsprintf(name,"%s/screen.%d",SCREENPATH,num);
Xfp = fopen(name,"r");
Xif(fp == NULL)
X    printf("File for screen %d unavailable.\n\n",num) ;
Xelse
X    {
X    for(y = 0;y<NOOFROWS;y++)
X        {
X        fgets((*row_ptr++),ROWLEN + 1,fp);
X	fgetc(fp);                         /* remove newline char*/
X	};
X    if(fscanf(fp,"%*s\n%d",maxmoves) != 1) {
X	printf("no maxmoves specified: assuming infinite movement.\n");
X	*maxmoves= (-1);
X	}
X    };
Xfclose(fp);
Xreturn (fp == NULL);
X}
END_OF_FILE
if test 610 -ne `wc -c <'read.c'`; then
    echo shar: \"'read.c'\" unpacked with wrong size!
fi
# end of 'read.c'
fi
echo shar: End of archive 5 \(of 5\).
cp /dev/null ark5isdone
MISSING=""
for I in 1 2 3 4 5 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 5 archives.
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0