[comp.sources.games.bugs] Wanderer PATCH V2.2

csupt@warwick.ac.uk (Newwords PSU) (11/08/88)

  OK, here's the *official* diffs to update Wanderer V2.0(M) to V2.2(M).
(Please don't ask what happened to version 2.1 ...). The sharfile contains
a file of diffs for most of the source files, a new file encrypt.c, a few more
screens and a README file explaining all the alterations.

  Changes include a number of small -> large bugfixes, extra facilities -
eg refresh screen, swap between modes, center screen, more help - , a fix for
the 'stunned' baby monsters ( those moving in small circles ) and also the
addition of 'balloons' to the game ( see screen.23 ). All of the changes
are documented in the README file.

  -Steven Shipway

maujp@uk.ac.warwick.cu  ( in preference )
csupt@uk.ac.warwick.cu
...!mcvax!ukc!warwick!{maujp,csupt}

--------------------- HACK ME HERE --------------------
#! /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 shell archive."
# Contents:  README credits diffs encrypt.c screen.16 screen.21
#   screen.22 screen.23
# Wrapped by csupt@poppy on Mon Nov  7 17:50:11 1988
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'README' -a "${1}" != "-c" ; then
  echo shar: Will not clobber existing file \"'README'\"
else
echo shar: Extracting \"'README'\" \(1522 characters\)
sed "s/^X//" >'README' <<'END_OF_FILE'
XOK, here are the major alterations:
X
X1)  Unless NO_ENCRYPTION has been #def'd then saved games are encrypted.
X    This means an extra source file.
X2)  Lots of cosmetic changes, tidying up messy displaying.
X3)  Extra keys:
X        In Game -   @ --- moves you to center of screen
X                    # --- toggle between normal and fullscreen
X                    W --- redraw screen
X        In Editor - x --- quit edit without saving
X4)  (BIG CHANGE) New object - balloons. These fall up, and are popped by
X   arrows. Also, they kill neither you nor the monster. I havent made any
X   screens involving these, though - maybe you can design a few?
X5)  Help file extended to include info about environment variables, new
X   keys and features.
X6)  Baby monsters can no longer be 'stunned' - trapped in tiny circles -
X   unless you try very hard to get them that way....
X    This cures a bug that Ive been thinking about for ages, and also makes
X   screen 18 a bit easier.
X7)  The -e flag (enter editor) can now take an optional argument. If given,
X   it will take this as the file to be edited. eg, 'wanderer -e screen.1'
X   will edit the file 'screen.1' instead of 'screen' (the default).
X8)  You can no longer sneak off the top of some screens (apparently this
X   is possible on some systems)
X9)  Bug in editor that caused the problem on one of the screens has been
X   fixed.
X
XAlso, there should be a few extra screens and a new credits file in here.
X
X-Steve
X{maujp,csupt}@uk.ac.warwick.cu
X...!mcvax!ukc!warwick!{maujp,csupt}
END_OF_FILE
if test 1522 -ne `wc -c <'README'`; then
    echo shar: \"'README'\" unpacked with wrong size!
fi
# end of 'README'
fi
if test -f 'credits' -a "${1}" != "-c" ; then
  echo shar: Will not clobber existing file \"'credits'\"
else
echo shar: Extracting \"'credits'\" \(2686 characters\)
sed "s/^X//" >'credits' <<'END_OF_FILE'
X                            WANDERER CREDITS
X                           ==================
X
XThis file should always be available to all players of the game. Feel free to
Xadd anything necessary, eg, if you create some new screens, but don't *delete*
Xanything! -Steven Shipway
X
X-----------------------------------------------------------------------------
X
X        Wanderer was created by Steven Shipway, a first year mathematics
Xstudent at Warwick University, England.  The idea came from games such as
XBoulderdash, Xor, and especially Repton, from Superior Software. (plug, plug)
X
X        Later improvements came from play@nl.cwi, who designed the editor
Xand made countless bugfixes, of which there are too many to list here. He
Xalso improved many parts of the original code, and also designed some
Xscreens. Also Dave (david@ist.co.uk), who did most of the work towards the
Ximproved level jumping routine (sorry, I had to alter it a bit due to other
Xchanges). Jason (jason@uucp.aeras) is responsible for the help routine, for
Xwhich I am eternally grateful since it saved me a lot of work.
X
X        Assisting in the development were Rob McMahon (our systems manager)
Xand Mark Sunnarks. In screen development were the following:
X
XScreens 1,2,3,4,7,8,10,16,23  Steven Shipway (although some of them are AWFUL)
XScreens 5,6             csutg@uk.ac.warwick.cu (far more evil than mine)
XScreen  9               maukr@uk.ac.warwick.cu (also the old bugged screen 13)
XScreens 11,13,14,19,20  play@nl.cwi    (who wishes to remain nameless to avoid
X                                        the netherlands mafia :-)
XScreen  17              david@ist.co.uk  (sorry, I dont know your full name)
XScreen  15              bruce@au.oz.utas.tasis (from Down Under)
XScreen  18                   ''           (relation, age 10)
XScreens 21,22           jn@uk.ac.ukc   (who created the archimedes port)
X
XAny new screens you wish to have added to the list please mail to me for
Xrelease in a official update package. The address is
X{maujp,csupt}@uk.ac.warwick.cu or ...!mcvax!ukc!warwick!{maujp,csupt}.
X
XThe official PC Port for Wanderer was done by Greg Margo, who may be found at
Xgmago@uucp.netxcom or uunet!netxcom!gmargo.
X
XThe X-Windows port - which is pretty impressive - comes from Mike Cuddy.
XHis address is cuddy%convex@edu.umich.cc.umix or ihnp4!convex!cuddy. Although
XI haven't been able to see this one for myself a friend assures me that the
Xgraphics are fantastic.
X
XThe Acorn Archimedes port was done by Max Rockatansky, jn@uk.ac.ukc . Mail him
Xif you want a copy.
X
XAlso thanks to Paul Metcalf for thinking of a name for the game!
X
XIf you missed some of this, try again with 'wanderer -c | more' .
END_OF_FILE
if test 2686 -ne `wc -c <'credits'`; then
    echo shar: \"'credits'\" unpacked with wrong size!
fi
# end of 'credits'
fi
if test -f 'diffs' -a "${1}" != "-c" ; then
  echo shar: Will not clobber existing file \"'diffs'\"
else
echo shar: Extracting \"'diffs'\" \(14912 characters\)
sed "s/^X//" >'diffs' <<'END_OF_FILE'
X
Xdiff tmp/Makefile wand/Makefile
X5c5
X< OBJ = m.o save.o jump.o display.o icon.o game.o read.o help.o fall.o scores.o edit.o
X---
X> OBJ = m.o save.o jump.o display.o icon.o game.o read.o help.o fall.o scores.o edit.o encrypt.o
X
Xdiff tmp/display.c wand/display.c
X29c29
X< 	    if(ch==' '||ch=='#'||ch=='<'||ch=='>'||ch=='O'||ch==':'||
X---
X>             if(ch==' '||ch=='#'||ch=='<'||ch=='>'||ch=='O'||ch==':'||
X32c32
X< 	       ch=='A')
X---
X>                ch=='A'||ch=='^')
X116a117,153
X> }
X>
X> void redraw_screen(maxmoves,num,score,nf,diamonds,mx,sx,sy,frow)
X> int maxmoves,num,score,nf,diamonds,mx,sx,sy;
X> char **frow;
X> {
X> char buffer[50];
X>
X> clear();
X> move(0,48);
X> (void) addstr("Score\t   Diamonds");
X> move(1,48);
X> (void) addstr("\tFound\tTotal");
X> move(3,48);
X> (void) sprintf(buffer,"%d\t %d\t %d  ",score,nf,diamonds);
X> (void) addstr(buffer);
X> move(6,48);
X> (void) sprintf(buffer,"Current screen %d",num);
X> (void) addstr(buffer);
X> if(maxmoves != 0)
X> (void) sprintf(buffer,"Moves remaining = %d   ",maxmoves);
X> else
X> {
X>     (void) strcpy(buffer,"     Unlimited moves     ");
X>     maxmoves = -1;
X> };
X> move(15,48);
X> (void) addstr(buffer);
X> if(mx != -1)                            /* tell player if monster exists */
X>     draw_symbol(48,10,'M');
X> else
X>     draw_symbol(48,10,' ');
X>
X> if(!debug_disp)
X>     display(sx,sy,frow,score);
X> else
X>     map(frow);
X
Xdiff tmp/edit.c wand/edit.c
X5a6
X> extern char *edit_screen;
X8,10d8
X< /* Print instructions around the screen */
X< void instruct()
X< {
X12a11
X> 			"^   Balloon",
X19c18
X< 			"T   Teleport (1 max)",
X---
X> 			"T   Teleport",
X26c25,30
X< 			"C   Time Capsule" };
X---
X> 			"C   Time Capsule",
X> 			NULL };
X>
X> /* Print instructions around the screen */
X> void instruct()
X> {
X28c32
X< for(loop = 1;loop < 17; loop++)
X---
X> for(loop = 0; inst[loop] ; loop++)
X30,31c34,35
X<     move(loop,55);
X<     addstr(inst[loop-1]);
X---
X>     move(loop+1,55);
X>     addstr(inst[loop]);
X33,34c37,39
X< move(21,0);
X< addstr("Use wanderer keys to move. q = quit, p/n = play, m = change no. of moves.");
X---
X> move(20,0);
X> addstr("Use wanderer keys to move. m = change no. of moves, p = play game\n");
X> addstr("n = play game with full screen, q = quit, x = quit without save.");
X40c45
X< for(loop =1;loop < 17; loop++)
X---
X> for(loop =0; inst[loop] ; loop++)
X42c47
X<     move(loop,55);
X---
X>     move(loop+1,55);
X45c50,51
X< move(21,0);
X---
X> move(20,0);
X> addstr("                                                                            \n");
X57c63
X< int  x,y,sx=0,sy=0,quit=0,nx,ny;
X---
X> int  x,y,sx=0,sy=0,quit=0,nx,ny,nosave =0;
X110,111c116
X<     move(19,0);
X<     addstr("                                                                          ");
X---
X>     noins();
X113a119,139
X> else if(ch == 'x')
X>     {
X>     noins();
X>     move(20,0);
X>     addstr("You will lose any changes made this session - sre you sure? (y/n)");
X>     refresh();
X>     ch = getch();
X>     if(ch != 'y')
X> 	{
X> 	noins();
X> 	instruct();
X> 	refresh();
X>     	}
X>     else
X> 	{
X> 	nosave = 1;
X> 	addstr("\n");
X> 	refresh();
X> 	break;
X>     	}
X>     }
X135c161
X< 	wscreen(num,maxmoves);
X---
X>         wscreen(num,maxmoves);
X184,189c210,219
X< for(y = 0; y<NOOFROWS;y++)       /* certain editors - eg ded - have a */
X< 			         /* habit of truncating trailing spaces*/
X< 		                 /* so this should stop them! */
X<     if(screen[y][ROWLEN-1] == ' ')
X< 	screen[y][ROWLEN-1] = '-';
X< wscreen(num,maxmoves);
X---
X> if(! nosave)
X>     {
X>     for(y = 0; y<=NOOFROWS;y++) /* certain editors - eg ded - have a */
X>                                 /* habit of truncating trailing spaces*/
X>             	    		/* so this should stop them! */
X>         if(screen[y][ROWLEN-1] == ' ')
X> 	    screen[y][ROWLEN-1] = '-';
X>     wscreen(num,maxmoves);
X>     }
X> noins();
X
Xdiff tmp/fall.c wand/fall.c
X29c29
X< int nx = x,nyl = y,nyr = y,retval = 0;
X---
X> int nx = x,nxu = x,nyl = y,nyr = y,retval = 0;
X33c33,34
X<    (screen[y][x] !='\\') && (screen[y][x] != '/') && (screen[y][x] != '@'))
X---
X>    (screen[y][x] !='\\') && (screen[y][x] != '/') && (screen[y][x] != '@') &&
X>    (screen[y][x] != '^'))
X45a47,55
X>     if((screen[y][x-1] == ' ') && (screen[y+1][x-1] == ' '))
X>         nxu--;
X>     else
X> 	{
X>         if((screen[y][x+1] == ' ') && (screen[y+1][x+1] == ' '))
X>             nxu++;
X> 	else
X> 	    nxu = -1;
X> 	}
X68a79,80
X>     if(screen[y+1][--nxu] != ' ')
X>         nxu = -1;
X77a90,91
X>     if(screen[y+1][++nxu] != ' ')
X>         nxu = -1;
X85c99,100
X< if((screen[y-1][x] == 'O') && (nx >= 0) && (y > 0)) /* boulder falls ? */
X---
X> if((screen[y-1][x] == 'O') && (nx >= 0) && (y > 0) &&
X>    (screen[y][nx] != '^')) /* boulder falls ? */
X127c142
X< if((screen[nyr][x] != ' ')&&(screen[nyr][x] != 'M'))
X---
X> if((screen[nyr][x] != '^')&&(screen[nyr][x] != ' ')&&(screen[nyr][x] != 'M'))
X171c186
X< if((screen[nyl][x] != ' ')&&(screen[nyl][x] != 'M'))
X---
X> if((screen[nyl][x] != ' ')&&(screen[nyl][x] != '^')&&(screen[nyl][x] != 'M'))
X213a229,255
X>     }
X>
X> if(screen[y][nxu] != ' ')
X>     nxu = -1;
X>
X> if((screen[y+1][x] == '^') && (nxu >= 0) && (y < NOOFROWS) &&
X>    (screen[y][x] != '^')) /* balloon rises? */
X>     {
X>     screen[y+1][x] = ' ';
X>     screen[y][nxu] = '^';
X>     if(!debug_disp)
X> 	{
X>         if((y<(sy+3)) && (y>(sy-5)) && (x>(sx-6)) && (x<(sx+6)))
X>             draw_symbol((x-sx+5)*3,(y-sy+4)*2,' ');
X>         if((y<(sy+4)) && (y>(sy-4)) && (nxu>(sx-6)) && (nxu<(sx+6)))
X>             draw_symbol((nxu-sx+5)*3,(y-sy+3)*2,'^');
X> 	}
X>     else
X> 	{
X> 	move(y+2,x+1);
X> 	addch(' ');
X> 	move(y+1,nxu+1);
X> 	addch('^');
X>     }
X>     refresh();
X>     retval+=fall(mx,my,nxu ,y-1,sx,sy,howdead);
X>     retval+=check(mx,my,x,y+1,0,-1,sx,sy,howdead);
X
Xdiff tmp/game.c wand/game.c
X4c4,5
X< 	(screen[y][x] == '@') || (screen[y][x] == '+')) && (y >= 0) &&\
X---
X> 	(screen[y][x] == '@') || (screen[y][x] == '+') ||\
X> 	(screen[y][x] == 'S')) && (y >= 0) &&\
X35a37,38
X> extern void redraw_screen();
X>
X134c137
X<      bx, by, nbx, nby,
X---
X>      bx, by, nbx, nby, tmpx,tmpy,
X252c255
X< if(ch == keys[3])              /* move about - but thats obvious */
X---
X> if((ch == keys[3]) && (x <(ROWLEN-1)))  /* move about - but thats obvious */
X254c257
X< if(ch == keys[2])
X---
X> if((ch == keys[2]) && (x > 0))
X256c259
X< if((ch == keys[1]) && (y<(NOOFROWS-1)))
X---
X> if((ch == keys[1]) && (y <(NOOFROWS-1)))
X258c261
X< if(ch == keys[0])
X---
X> if((ch == keys[0]) && (y > 0))
X307a311,320
X> 	if(debug_disp)
X> 	    map(frow);
X>         else
X> 	    display(sx,sy,frow,*score);
X> 	continue;
X> 	}
X> if((ch == '@')&&(!debug_disp))
X> 	{
X> 	sx = x;
X> 	sy = y;
X310a324,346
X> if(ch == '#')
X> 	{
X> 	debug_disp = 1 - debug_disp;
X> 	if(debug_disp)
X> 		map(frow);
X> 	else
X> 		{
X>  		for(tmpy=0;tmpy<=(NOOFROWS+1);tmpy++)
X>         		{
X>         		move(tmpy,0);
X>         		for(tmpx=0;tmpx<=(ROWLEN+2);tmpx++)
X> 	    			addch(' ');
X> 			}
X> 		sx = x; sy = y;
X> 		display(sx,sy,frow,*score);
X> 		}
X> 	continue;
X> 	}
X> if(ch == 'W')
X> 	{
X>         redraw_screen(maxmoves,*num,*score,nf,diamonds,mx,sx,sy,frow);
X> 	continue;
X> 	}
X465a502,534
X>     case '^':
X> 	if(screen[y][nx*2-x] == ' ')
X> 	    {
X> 	    screen[y][nx*2-x] = '^';
X> 	    screen[y][x] = ' ';
X>             screen[ny][nx] = '@';
X> 	    if(!debug_disp)
X> 		{
X>                 draw_symbol((x-sx+5)*3,(y-sy+3)*2,' ');
X>                 draw_symbol((nx-sx+5)*3,(ny-sy+3)*2,'@');
X> 		if(nx*2-x>sx-6&&nx*2-x<sx+6)
X>                     draw_symbol((nx*2-x-sx+5)*3,(y-sy+3)*2,'^');
X> 		}
X> 	    else
X> 		{
X> 		move(y+1,x+1);
X> 		addch(' ');
X> 		move(ny+1,nx+1);
X> 		addch('@');
X> 		move(y+1,nx*2-x+1);
X> 		addch('^');
X> 		}
X>             deadyet += fall(&mx,&my,nx*2-x,y-1,sx,sy,howdead);
X>             deadyet += fall(&mx,&my,x*2-nx,y,sx,sy,howdead);
X>             deadyet += fall(&mx,&my,x,y,sx,sy,howdead);
X>             deadyet += fall(&mx,&my,x,y+1,sx,sy,howdead);
X>             deadyet += fall(&mx,&my,x,y-1,sx,sy,howdead);
X>             move(16,0);
X>             refresh();
X> 	    y = ny;
X> 	    x = nx;
X> 	    }
X> 	break;
X721c790
X< current = &start_of_list;
X---
X> current = &start_of_list;                         /* baby monsters now */
X727c796
X<     if(monster->under!='S')
X---
X>     if(monster->under!='S')             /* if on top of another baby */
X
Xdiff tmp/help.c wand/help.c
X13c13
X< " Default keys are:            out  ", /* 7 */
X---
X> "                              out  ", /* 7 */
X19,21c19,21
X< "  ?  Enter help mode               ", /* 13 */
X< "  ~  Jump to next level            ", /* 14 */
X< "     (does not receive level bonus)", /* 15 */
X---
X> "  ?  Help mode  @  Center screen   ", /* 13 */
X> "  ~  Jump level #  Switch mode     ", /* 14 */
X> " nb: No level bonus for jumping.   ", /* 15 */
X61,62c61,62
X< " !!! and  I  Instant annihilation  ", /* 4 */
X< " !!!      o                        ", /* 5 */
X---
X> "  I   Instant annihilation         ", /* 4 */
X> "  o                                ", /* 5 */
X72a73,89
X>
X> " /~\\  A new addition for version   ", /* 0 */
X> " \\_X  2.2M . The balloon rises,    ", /* 1 */
X> "      and is popped by arrows. It  ", /* 2 */
X> "      does *not* kill you.         ", /* 3 */
X> "                                   ", /* 4 */
X> " OOO  Unrecognised symbol in map.  ", /* 5 */
X> " OOO  This is probably a **bug** ! ", /* 6 */
X> "                                   ", /* 7 */
X> " ENVIRONMENT VARIABLES:            ", /* 8 */
X> "                                   ", /* 9 */
X> "   NEWNAME,NAME : Checked in that  ", /* 0 */
X> "       order for the hiscore table ", /* 1 */
X> "   NEWKEYS : Redefine movement keys", /* 2 */
X> "       eg- 'hlkj' for default      ", /* 3 */
X> "   SAVENAME : File used for saved  ", /* 4 */
X> "       games.                      ", /* 5 */
X84c101
X< 	for(i1 = 0; i1 < 4; i1++)  /* times to show loop. */
X---
X> 	for(i1 = 0; i1 < 5; i1++)  /* times to show loop. */
X
Xdiff tmp/icon.c wand/icon.c
X12,14c12,14
X<     case ' ':
X<         strcpy((*iconrow++),"   ");
X<         strcpy((*iconrow),"   ");
X---
X>     case ' ':                    /*  space  */
X>         strcpy(*iconrow++,"   ");
X>         strcpy(*iconrow,  "   ");
X16c16
X<     case '#':
X---
X>     case '#':                   /*  rock  */
X18c18
X<         strcpy(*iconrow,"###");
X---
X>         strcpy(*iconrow,  "###");
X20c20
X<     case '<':
X---
X>     case '<':                   /*  arrows  */
X22c22
X<         strcpy(*iconrow,"<--");
X---
X>         strcpy(*iconrow,  "<--");
X26c26
X<         strcpy(*iconrow,"-->");
X---
X>         strcpy(*iconrow,  "-->");
X28c28
X<     case 'O':
X---
X>     case 'O':                    /* boulder  */
X30c30
X<         strcpy(*iconrow,"\\_/");
X---
X>         strcpy(*iconrow,  "\\_/");
X32c32
X<     case ':':
X---
X>     case ':':                    /*  earth  */
X34c34
X<         strcpy(*iconrow," . ");
X---
X>         strcpy(*iconrow,  " . ");
X36c36
X<     case '/':
X---
X>     case '/':                    /*  slopes */
X38c38
X<         strcpy(*iconrow,"/  ");
X---
X>         strcpy(*iconrow,  "/  ");
X42c42
X<         strcpy(*iconrow,"  \\");
X---
X>         strcpy(*iconrow,  "  \\");
X44c44
X<     case '*':
X---
X>     case '*':                     /*  diamond  */
X46c46
X<         strcpy(*iconrow, "\\$/");
X---
X>         strcpy(*iconrow,  "\\$/");
X48c48
X<     case '=':
X---
X>     case '=':                     /*  rock  */
X52c52
X<     case '@':
X---
X>     case '@':                     /*  YOU!!! */
X56c56
X<     case 'T':
X---
X>     case 'T':                   /*  teleport  */
X60c60
X<     case 'X':
X---
X>     case 'X':                    /*  exits  */
X64c64
X<     case '!':
X---
X>     case '!':                    /*  landmine  */
X68c68
X<     case 'M':
X---
X>     case 'M':                     /* big monster  */
X72c72
X<     case 'S':
X---
X>     case 'S':                     /* baby monster */
X76c76,80
X<     case 'C':
X---
X>     case '^':			 /* balloon */
X>         strcpy(*iconrow++,"/~\\");
X>         strcpy(*iconrow,  "\\_X");
X>         break;
X>     case 'C':                    /* time capsule */
X80c84
X<     case '+':
X---
X>     case '+':                    /* cage */
X
Xdiff tmp/m.c wand/m.c
X14a15
X> char *edit_screen;
X30a32
X> 	edit_screen = NULL;
X61c63
X< 	fprintf(stderr,"Usage: %s [ -e | -m | -c | -s | -f ]\n",argv[0]);
X---
X> 	fprintf(stderr,"Usage: %s [ -e [ file ] | -m | -c | -s | -f ]\n",argv[0]);
X67,68c69,78
X<     fprintf(stderr,"Usage: %s [ -e | -m | -c | -s | -f ]\n",argv[0]);
X<     exit(1);
X---
X>     if(!strcmp(argv[1],"-e"))
X> 	{
X> 	edit_mode = 1;
X> 	edit_screen = argv[2];
X> 	}
X>     else
X> 	{
X>         fprintf(stderr,"Usage: %s [ -e [ file ] | -m | -c | -s | -f ]\n",argv[0]);
X>         exit(1);
X> 	}
X
Xdiff tmp/read.c wand/read.c
X3a4
X> extern char *edit_screen;
X16c17,22
X<     sprintf(name,"./screen");
X---
X>     {
X>     if(!edit_screen)
X>         sprintf(name,"./screen");
X>     else
X> 	sprintf(name,"%s",edit_screen);
X>     }
X19c25,30
X<     printf("\nFile for screen %d unavailable.\n\n",num) ;
X---
X>     {
X>     if(edit_mode)
X> 	printf("\nCannot find file %s.\n\n",name);
X>     else
X>         printf("\nFile for screen %d unavailable.\n\n",num) ;
X>     }
X38a50
X> char name[50];
X40c52,66
X< fp = fopen("./screen","w");
X---
X>
X> if(!edit_screen)
X>     sprintf(name,"./screen");
X> else
X>     sprintf(name,"%s",edit_screen);
X> fp = fopen(name,"w");
X> if(fp == NULL)
X>     {
X>     sprintf(name,"/tmp/screen.%d",getpid());
X>     fp = fopen(name,"w");
X>     move(21,0);
X>     addstr("Written file is ");
X>     addstr(name);
X>     refresh();
X>     }
X
Xdiff tmp/save.c wand/save.c
X1a2
X> #include <errno.h>
X5a7,8
X> extern void crypt_file();
X>
X40c43
X< 		printf("Open error on '%s'n", fp);
X---
X> 		perror(fp);
X79c82,84
X<
X---
X> #ifndef NO_ENCRYPTION
X> 	crypt_file(fp,0);   /* encrpyt the saved game */
X> #endif
X106c111,113
X<
X---
X> #ifndef NO_ENCRYPTION
X>  	crypt_file(fp,1);   /*decrypt it*/
X> #endif
X109c116,117
X< 		printf("Open error on '%s'n", fp);
X---
X> 		printf("Open error on '%s'\n", fp);
X> 		printf("Cannot restore game --- sorry.\n");
X116a125
X> 		printf("Cannot restore game --- sorry.\n");
X152a162
X>                         printf("Try again - it might work.\nBut then,pigs might fly...\n");
X158a169
X> 			printf("Cannot restore game --- sorry.\n");
X
Xdiff tmp/wand_head.h wand/wand_head.h
X12c12,13
X< #define HISCOREPATH "/poppy/cs/upt/junk/.xhiscores"
X---
X> #ifdef SUN3
X> #define HISCOREPATH "/poppy/cs/upt/junk/.hiscores"
X13a15,19
X> #endif
X> #ifdef SUN4
X> #define HISCOREPATH "/poppy/cs/upt/junk/.4hiscores"
X> #define LOCKPATH "/tmp/wanderer.4lock"      /* hiscore lock file */
X> #endif
X21a28,34
X> /* To disable the recording of hiscores from games restored from saves */
X> /* #define NO_RESTORED_GAME_HISCORES  */
X> /* #define COMPARE_BY_NAME  define this to compare by name, not uid */
X> #define GUESTUID 0    /* guestuid always compared by name */
X>
X> /* #define NO_ENCRYPTION define this to disable the savefile encryptor */
X>
X34,35d46
X< /* To disable the recording of hiscores from games restored from saves */
X< /* #define NO_RESTORED_GAME_HISCORES  */
END_OF_FILE
if test 14912 -ne `wc -c <'diffs'`; then
    echo shar: \"'diffs'\" unpacked with wrong size!
fi
# end of 'diffs'
fi
if test -f 'encrypt.c' -a "${1}" != "-c" ; then
  echo shar: Will not clobber existing file \"'encrypt.c'\"
else
echo shar: Extracting \"'encrypt.c'\" \(1173 characters\)
sed "s/^X//" >'encrypt.c' <<'END_OF_FILE'
X#include "wand_head.h"
X
X/* Uses seeded random xor to encrypt because setkey doesnt work on our
X   system. 								*/
X
X/* this is the randon number seed */
X#define BLURFL 32451    /* the word blurfl is used for historical reasons */
X                        /* but it can be any nuber */
Xcrypt_file(name)
Xchar *name;
X{
Xchar buffer[1024];
Xint fd,length,loop;
X
Xif((fd = open(name,O_RDONLY)) == -1) {
X	endwin();
X	sprintf(buffer,"Wanderer: cannot open %s",name);
X	perror(buffer);
X	exit(1);
X}
Xif((length = read(fd,buffer,1024)) < 1) {
X	endwin();
X	sprintf(buffer,"Wanderer: read error on %s",name);
X	perror(buffer);
X	exit(1);
X}
Xclose(fd);
X
X/* Right, got it in here, now to encrypt the stuff */
X
Xaddstr("Running crypt routine...\n");
Xrefresh();
X
Xsrand(BLURFL);
Xfor(loop=0;loop<length;loop++)
X	buffer[loop]^=rand();
X
Xif((fd = open(name,O_WRONLY|O_TRUNC))== -1) {
X	endwin();
X	sprintf(buffer,"Wanderer: cannot write to %s",name);
X	perror(buffer);
X	exit(1);
X}
Xif(write(fd,buffer,length)!=length) {
X	endwin();
X	sprintf(buffer,"Wanderer: write error on %s",name);
X	perror(buffer);
X	exit(1);
X}
Xclose(fd);
X
X/* ok, file now contains encrypted/decrypted game. */
X/* lets go back home... */
X}
END_OF_FILE
if test 1173 -ne `wc -c <'encrypt.c'`; then
    echo shar: \"'encrypt.c'\" unpacked with wrong size!
fi
# end of 'encrypt.c'
fi
if test -f 'screen.16' -a "${1}" != "-c" ; then
  echo shar: Will not clobber existing file \"'screen.16'\"
else
echo shar: Extracting \"'screen.16'\" \(700 characters\)
sed "s/^X//" >'screen.16' <<'END_OF_FILE'
XX!   !!                       O OO    O-
X  *! !   O                  + =*==*=*==*
X!!!  !   *O     ! >>*              *   -
X          :\   >>>/              *     -
X    \           >/           /         -
X  :   :  :    * /    !<<    /S         -
X>>O*   :    :     /O><<<<           *  -
X##*              /*O*                  -
X    *      #*####  O*      !###        -
X*          #    # \*      !##O#        -
X        \O ###\<<<<\     !##O<##       -
X *<      \:::  #*##     !#*#O          -
X ====     ####  ##     !#CC#*        ===
X =  =  C   : ###      !#CCC#/       *<=M
X  = =  *  @:   :     !#CC        /=====-
X+ S *      :   :    !*CC    /    *     -
X########################################
X50
END_OF_FILE
if test 700 -ne `wc -c <'screen.16'`; then
    echo shar: \"'screen.16'\" unpacked with wrong size!
fi
# end of 'screen.16'
fi
if test -f 'screen.21' -a "${1}" != "-c" ; then
  echo shar: Will not clobber existing file \"'screen.21'\"
else
echo shar: Extracting \"'screen.21'\" \(697 characters\)
sed "s/^X//" >'screen.21' <<'END_OF_FILE'
X*!>>O           \*OOOOO />O   \#T#X#O#O*
X  O ::!:::::::O  \OOOOO/:#*    #   ::::<
X#>: ::::::!#>#:   \OOO/::# # # *## ###O#
X####::#>*  \:      \O/  =# # #===# ## :#
X*             \    :<#  #  ::      #O :<
X###O/###########    /#     ##! ==###: A#
X#O#>>>>>>>>>: *#      >>:   #  #:::::#*#
X>*        *= O##   \    ## ## !#:######*
X#    ##### ! :<#         # !#  #    / :<
X== =O   !>:  :=#    /   *< =# ><  O  @ #
XO<#O:        =*          # !# =#= ======
X*::   #!!!!!  =#   \       =#  O#     :<
X############# =#O          !#! ::==== !*
X >:             :   / #     ##        !-
X## #         ####     #  #   =========!-
X*  #!!!!!!!!!*::::#*# # #*>:           -
X########################################
END_OF_FILE
if test 697 -ne `wc -c <'screen.21'`; then
    echo shar: \"'screen.21'\" unpacked with wrong size!
fi
# end of 'screen.21'
fi
if test -f 'screen.22' -a "${1}" != "-c" ; then
  echo shar: Will not clobber existing file \"'screen.22'\"
else
echo shar: Extracting \"'screen.22'\" \(697 characters\)
sed "s/^X//" >'screen.22' <<'END_OF_FILE'
X*    O    <*  \OOOOOO*/      #O*   <<<<<
X####:####=== O \OOOOO/       #*:    <<<<
X#            :  \OOO/        # #*    <<<
X##OO    @  ##/  <*O/         #  #*    <<
X*A::  =======     :  ###     *:  *#    <
X#####             \  #*>    /          *
X          =O  =:===# ###  \    /       -
X   /     <>*     X #       \  /OO  !!! -
X*         =O  O!===#        =*=*>   *! -
X>       \ ::::::            === *  !!! -
X>>       \               \      \      -
X>>>         \                    \  ###-
X>>>>   OOOO    *                  \ **#-
X>>>>>           \  # \  /  ====   ==###-
X::*:*           *# # # #             ===
X*  *  *=**=*>   *#*#*#T#>*  *  <*!!!   *
X########################################
END_OF_FILE
if test 697 -ne `wc -c <'screen.22'`; then
    echo shar: \"'screen.22'\" unpacked with wrong size!
fi
# end of 'screen.22'
fi
if test -f 'screen.23' -a "${1}" != "-c" ; then
  echo shar: Will not clobber existing file \"'screen.23'\"
else
echo shar: Extracting \"'screen.23'\" \(697 characters\)
sed "s/^X//" >'screen.23' <<'END_OF_FILE'
X/ *=                         #*   ^O</T<
X  == :O O O O  O O O O       ###+\^^  :^
X      ^*::**:  **:**:*   OO          /^#
X>*            /          */            -
X^/          \      OO        #         -
X*\           *  / ##:*<<\    S         -
X:=>:           O\ ^^:*<</              -
X*/             *<X  @< /               -
X/  O/\         ^/ \#^#/    / +         -
X  */ A\        /S  #*#    /            -
X O/    \      /*  *\#/:                -
X*/      \    /  **    :                -
X/        \  /      :::                ==
X==       =====*==*:                 ==S-
X*        ^ ^ ^ ^ ^               ====* -
X+=\            ^                *<<<<<<<
X########################################
END_OF_FILE
if test 697 -ne `wc -c <'screen.23'`; then
    echo shar: \"'screen.23'\" unpacked with wrong size!
fi
# end of 'screen.23'
fi
echo shar: End of shell archive.
exit 0