home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / games / volume13 / perp / part01 < prev    next >
Encoding:
Internet Message Format  |  1992-08-02  |  28.6 KB

  1. Path: uunet!zephyr.ens.tek.com!master!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v13i087:  perp - a multiscreen diamond collection game, Part01/01
  5. Message-ID: <2893@master.CNA.TEK.COM>
  6. Date: 14 May 92 01:08:10 GMT
  7. Sender: news@master.CNA.TEK.COM
  8. Lines: 1492
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: James Bonfield <rince@dcs.warwick.ac.uk>
  12. Posting-number: Volume 13, Issue 87
  13. Archive-name: perp/Part01
  14. Environment: curses
  15.  
  16. [From the author...]
  17. [[This is a simple game I knocked up over a year ago. It's not exactly 100%
  18. finished (it hasn't a high score table etc), but it is functional. It was the
  19. game that I originally wrote before doing the obfuscated one. (That is also
  20. included).]]
  21.  
  22. #! /bin/sh
  23. # This is a shell archive.  Remove anything before this line, then unpack
  24. # it by saving it into a file and typing "sh file".  To overwrite existing
  25. # files, type "sh file -c".  You can also feed this as standard input via
  26. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  27. # will see the following message at the end:
  28. #        "End of archive 1 (of 1)."
  29. # Contents:  README MANIFEST Makefile expand_spr map obfus.c perp.6
  30. #   perp.c perp.h shrink_spr spr.expand
  31. # Wrapped by billr@saab on Wed May 13 18:05:44 1992
  32. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  33. if test -f 'README' -a "${1}" != "-c" ; then 
  34.   echo shar: Will not clobber existing file \"'README'\"
  35. else
  36. echo shar: Extracting \"'README'\" \(1462 characters\)
  37. sed "s/^X//" >'README' <<'END_OF_FILE'
  38. XUsages:
  39. X    perp [level_number]
  40. X
  41. X    expand_spr < sprite_file > expanded_file
  42. X
  43. X    shrink_spr < expanded_file > sprite_file
  44. X
  45. X
  46. XThis is the game of 'perp' written by James 'Rince' Bonfield.
  47. X
  48. XThe original idea was taken from the game of Perplexity on the BBC micro.
  49. XAlthough the game play is somewhat different from this. There is currently
  50. Xonly one screen in existance. This screen was also designed by James Bonfield.
  51. X
  52. XIf you like the game and design a few screens then I'd be interesting in
  53. Xseeing and playing them. (Mail them to rince@dcs.warwick.ac.uk). The map file
  54. Xformat is simple. It simply consists of 34x32 sized screens. Each character
  55. Xrepresents a sprite in the sprite file.
  56. X
  57. Xd    = diamonds
  58. Xo    = crushable boulders
  59. XO    = non crushable boulders
  60. Xh,j,k,l = keys to open the locks
  61. XH,J,K,L = the locks
  62. Xspace    = blank space - ie you can walk/push over it
  63. Xanything else is classed as a piece wall.
  64. X
  65. XThe sprite file is a stream of characters representing 128 sprites, each of 18
  66. Xcharacters long (6x3). To make this file into a more understandable and
  67. Xreadable format use the expand_spr utility ; edit the expanded file; and
  68. Xshrink with the shrink_spr util.
  69. X
  70. XYou may redistribute and modify any of this source provided that my name is
  71. Xstill mentioned in connection with the pieces of code I have written.
  72. X
  73. XPS.
  74. X
  75. XThe programming in this game is BAD! It was one of the first C programs I
  76. Xwrote ages ago. Please don't assume all my code is like this.. It isn't you
  77. Xknow - honest!
  78. END_OF_FILE
  79. if test 1462 -ne `wc -c <'README'`; then
  80.     echo shar: \"'README'\" unpacked with wrong size!
  81. fi
  82. # end of 'README'
  83. fi
  84. if test -f 'MANIFEST' -a "${1}" != "-c" ; then 
  85.   echo shar: Will not clobber existing file \"'MANIFEST'\"
  86. else
  87. echo shar: Extracting \"'MANIFEST'\" \(455 characters\)
  88. sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
  89. X   File Name        Archive #    Description
  90. X-----------------------------------------------------------
  91. X MANIFEST                   1    This shipping list
  92. X Makefile                   1    
  93. X README                     1    
  94. X expand_spr                 1    
  95. X map                        1    
  96. X obfus.c                    1    
  97. X perp.6                     1    
  98. X perp.c                     1    
  99. X perp.h                     1    
  100. X shrink_spr                 1    
  101. X spr.expand                 1    
  102. END_OF_FILE
  103. if test 455 -ne `wc -c <'MANIFEST'`; then
  104.     echo shar: \"'MANIFEST'\" unpacked with wrong size!
  105. fi
  106. # end of 'MANIFEST'
  107. fi
  108. if test -f 'Makefile' -a "${1}" != "-c" ; then 
  109.   echo shar: Will not clobber existing file \"'Makefile'\"
  110. else
  111. echo shar: Extracting \"'Makefile'\" \(963 characters\)
  112. sed "s/^X//" >'Makefile' <<'END_OF_FILE'
  113. X# compiler flags
  114. XCC = gcc
  115. XCFLAGS = -O
  116. XLDFLAGS = -s
  117. XLIBS = -lcurses -ltermcap
  118. X
  119. X# directories
  120. XBINDIR = /dcs/89/rince/open/bin.$(ARCH)
  121. XLIBDIR = /dcs/89/rince/open/lib/perp
  122. XMANDIR = /dcs/89/rince/open/man
  123. X
  124. X# files
  125. XMAPFILE = map
  126. XSPRFILE = spr
  127. X
  128. XDEFS = -DMAPFILE=\"$(LIBDIR)/$(MAPFILE)\"\
  129. X       -DSPRFILE=\"$(LIBDIR)/$(SPRFILE)\"
  130. X
  131. Xperp:    perp.c perp.h
  132. X    $(CC) $(CFLAGS) $(DEFS) $(LDFLAGS) $@.c -o $@ $(LIBS)
  133. X
  134. Xobfus:    obfus.c
  135. X    $(CC) -O -s obfus.c -o obfus -lcurses -ltermcap
  136. X
  137. Xspr:    spr.expand
  138. X    shrink_spr < spr.expand > spr
  139. X
  140. Xperp.c: perp.h
  141. X
  142. Xinstall:    perp perp.6 spr
  143. X    # the game
  144. X    -mkdir -p $(BINDIR)
  145. X    chmod a+xr $(BINDIR)
  146. X    -cp perp $(BINDIR)
  147. X    chmod a+x $(BINDIR)/perp
  148. X
  149. X    # the data files
  150. X    -mkdir -p $(LIBDIR)
  151. X    chmod a+xr $(LIBDIR)
  152. X    -cp $(MAPFILE) $(SPRFILE) $(LIBDIR)
  153. X    chmod a+r $(LIBDIR)/$(MAPFILE) $(LIBDIR)/$(SPRFILE)
  154. X
  155. X    # the man page
  156. X    -mkdir -p $(MANDIR)/man6
  157. X    chmod a+xr $(MANDIR)/man6
  158. X    -cp perp.6 $(MANDIR)/man6
  159. X    chmod a+r $(MANDIR)/man6/perp.6
  160. X
  161. Xclean:
  162. X    -rm perp spr *~
  163. END_OF_FILE
  164. if test 963 -ne `wc -c <'Makefile'`; then
  165.     echo shar: \"'Makefile'\" unpacked with wrong size!
  166. fi
  167. # end of 'Makefile'
  168. fi
  169. if test -f 'expand_spr' -a "${1}" != "-c" ; then 
  170.   echo shar: Will not clobber existing file \"'expand_spr'\"
  171. else
  172. echo shar: Extracting \"'expand_spr'\" \(64 characters\)
  173. sed "s/^X//" >'expand_spr' <<'END_OF_FILE'
  174. X#!/bin/sed -f
  175. Xs/\(......\)\(......\)\(......\)/\1\
  176. X\2\
  177. X\3\
  178. X\
  179. X/g
  180. END_OF_FILE
  181. if test 64 -ne `wc -c <'expand_spr'`; then
  182.     echo shar: \"'expand_spr'\" unpacked with wrong size!
  183. fi
  184. chmod +x 'expand_spr'
  185. # end of 'expand_spr'
  186. fi
  187. if test -f 'map' -a "${1}" != "-c" ; then 
  188.   echo shar: Will not clobber existing file \"'map'\"
  189. else
  190. echo shar: Extracting \"'map'\" \(2240 characters\)
  191. sed "s/^X//" >'map' <<'END_OF_FILE'
  192. X5222225225222222222222225522222255
  193. X6     U o|Oooooooooooooo43 o oOo45
  194. X5]  o o  |     O     7883   OoO 45
  195. X6 O0k[]l | ooD Doo oo453OOO     45
  196. X6    OO  4===3 1==8=853   O  D o45
  197. X6  0oOOo |        | 43  O O 73  45
  198. X6O o D O | 789 79 4=3OOO  O73  o15
  199. X6 lDo4]o[3 123K46 |    O  73  O  4
  200. X6 d4=3      L  13 Uo o O 73  O   4
  201. X6 jU   7=9 79  L    o  O73  O oD 4
  202. X6      |o| 46JJ79 Do o 73  O oJ|o4
  203. X5======6o| 13io13 |   73  O oD |o4
  204. X6odoood|d|        4==83  O oJ| |o4
  205. X6dooodo|d4==9 7==83  |    oD | |d4
  206. X6odoood|o|  U U  |   |    L| | |o4
  207. X6od7===3o| j j j | D 1===9oUoUo|d4
  208. X6doUo    |       | |  o oU   o |d4
  209. X6dd oDdD 1==]J7==3 Uo0oo  D    |d4
  210. X5==]K1=3    j |  o        19  l|d4
  211. X6odo     Ddood|   o        19  |o4
  212. X5==9 [===2=8==2===8==9 D   d19k|o4
  213. X6do|       |  o o |  Uk1]    186d4
  214. X6ooU DK[=] Uj 0 D |h     Dd  d16d4
  215. X6    U  H     hhU |odDKDk19    185
  216. X6oo  H  7==9k0d   | o|d| o19d  d15
  217. X5==88=]J|o |  o0 73 o| |o d19    4
  218. X6dd16oo |o 489ddo|   | U  k 19   4
  219. X6 Od1=] U o1259do|  d|       4]  4
  220. X6 o H        12==3o  | D  0K[3   4
  221. X6 oo7]  0O    O O O o|dUl L     o4
  222. X6d  |ooooO oD   O    |    D    Dd4
  223. X5888588888885888888885888858888585
  224. X##################################
  225. X#oooddodddOddOdoodddododddddodo###
  226. X#dOddddoodddddodoooddOOOooodood###
  227. X#oooddOOOooooodododdddoOddOOdod###
  228. X#oddddddddoodoodododdOodoododdd###
  229. X#oOodoodddddddooOooOddOoddddddo###
  230. X#oodOddddododoOdooddooodddddodO###
  231. X#OoddooddOoddddodOdooddOOdoodoo###
  232. X#odoOOdoododOddoodOddodOdodoOOd###
  233. X#doOodddoddodOdodoOoddodoodddod###
  234. X#dddoodOododdddoddoOdddoddddooO###
  235. X#OooOodddddddooOOdddddodOddoddo###
  236. X#doddodOddodoodoooooddddOddoood###
  237. X#oOooooOOooOododdOOodOOOdoodddO###
  238. X#OOodooodoOdoOOoooddOddOdoOoddd###
  239. X#OddddddddodoOOddoddodooddoodod###
  240. X#doddddooooooddddOoddddddOddodd###
  241. X#doododdddOdoOOddddodddddddddoO###
  242. X#oddoodooododOdddddddddddddddod###
  243. X#oOOOOddoodoOoddooOOdoOdodoOddd###
  244. X#ododdoOOOddooOoodddoddoOodoodd###
  245. X#odododdodoiddddddodoOododddodo###
  246. X#oododooOodOOododooododoOoddddd###
  247. X#dodddOdddOddddddddoddOOdddoOod###
  248. X#ddodooooOoddddddOdodddoddooddd###
  249. X#oOdodddddOddddddodddooOddOOOdd###
  250. X#dooddoodododoooddddOodddoooOod###
  251. X#ddoOodddddoddooododdodoOoooood###
  252. X#OOddooOdoOddodooOdoOOOOodOdddo###
  253. X#OoddodddododoodoOooOddOooOdddd###
  254. X#ooddddOOodoOdoOddOdoodododoOOO###
  255. X##################################
  256. END_OF_FILE
  257. if test 2240 -ne `wc -c <'map'`; then
  258.     echo shar: \"'map'\" unpacked with wrong size!
  259. fi
  260. # end of 'map'
  261. fi
  262. if test -f 'obfus.c' -a "${1}" != "-c" ; then 
  263.   echo shar: Will not clobber existing file \"'obfus.c'\"
  264. else
  265. echo shar: Extracting \"'obfus.c'\" \(1531 characters\)
  266. sed "s/^X//" >'obfus.c' <<'END_OF_FILE'
  267. X#include <curses.h>
  268. X#define R break
  269. X#define U M[h][f]
  270. X#define W M[g][e]
  271. X#define T M[y][x]
  272. X#define B(a) "A"#a"A",
  273. X#define A "AAAAAAAAAAAAAAAAAAAAAA"
  274. X#define z(a) case a:if(U=='B')U=W,x=e,y=g,u--;
  275. X#define Z(a,b) else if(U==a&&d==b)U=W='B';R;
  276. X#define K(a) a##a##a
  277. X#define k(a) #a#a#a#a#a#a"\0"
  278. X#define V "      \0"
  279. X#define S " \0/----\\\0_/  \\_"
  280. Xint u=484,X[]={-1,0,0,1},Y[]={0,1,-1,0},x,y,D,i,j,a;char o,m,*t,*O="MNOH"
  281. X,*k="hjkl",*s=K(k(#))V V V"  ___ \0 /   \\\0 \\___/\0  ___ \0 /@@@\\\0 \
  282. X\\@@@/\0| | /\\\0----||\0    \\/\0  /--\\\0   \\/ \0 ==|  \0 ==|  \0  \
  283. X /\\ \0  \\--/\0 /O__o\0 \\___/\0 /_\\_ \0"K("  <<  \0")V k(v)V V k(^)V
  284. X"  /\\  \0 <  > \0  \\/  \0o__O\\ \0\\___/ \0 _/_\\ \0 O__O"S"\0 ^__^"S,
  285. XM[12][22]={A,B(LCABBBBBBBABBCBBCABB)B(CCABAKAAABAFBABABAEB
  286. X)B(BBBBABBIBBBBBEEABACL)B(CCBNIBBAAAAGALBBBABC)B(AAAAAAJACBABBCABAABC
  287. X)B(LLAACCBACBAAALLCABBB)B(BDLAAABABCAAAALCABBL)B(BCBIBBBBBBBBAAAAACBB
  288. X)B(BCCAABBADBBBBDBDBDBC)B(LBBACCCCDBCABBBDBBBB)A};main(){initscr();clear();
  289. Xnoecho();cbreak();x=y=4;D=39,o='M';m=T;while(D&&u){for(i=j=a=0;j<7;!(mvaddstr(
  290. Xj*3+a,i*6,s+(((M[((y-1)/5)*5+j][((x-1)/10)*10+i]-'A')*3+a++)*7)),a^3)&&(a=0,!
  291. X(++i^12))&&(a=i=0,j++));refresh();T='B';if(t=(char*)strchr(k,getch())){int e=
  292. Xx,g=y,f=x,h=y,d=t-k;o=O[d];f=(e=x+X[d])+d[X];h=(g=y+Y[d])+d[Y];switch(W){case
  293. X'B':x=e;y=g,u--;R;z('C')else if(U=='C')U=W='L';R;z('D')R;case'L':x=e;y=g,u--;D
  294. X--;R;z('E')Z('I',0)z('F')Z('J',1)z('G')Z('K',2)}}m=T;T=o;}clear();mvaddstr(12
  295. X,31,u?"Well done!":"Too many moves");move(23,0);refresh();endwin();return 0;}
  296. END_OF_FILE
  297. if test 1531 -ne `wc -c <'obfus.c'`; then
  298.     echo shar: \"'obfus.c'\" unpacked with wrong size!
  299. fi
  300. # end of 'obfus.c'
  301. fi
  302. if test -f 'perp.6' -a "${1}" != "-c" ; then 
  303.   echo shar: Will not clobber existing file \"'perp.6'\"
  304. else
  305. echo shar: Extracting \"'perp.6'\" \(2046 characters\)
  306. sed "s/^X//" >'perp.6' <<'END_OF_FILE'
  307. X.TH PERP 6 "9th April 1992"
  308. X.SH NAME
  309. Xperp \- a multiscreen diamond collection game
  310. X.SH SYNOPSIS
  311. X.I perp
  312. X[ level_num ]
  313. X.SH DESCRIPTION
  314. XThe idea of
  315. X.I perp
  316. Xis to collect all the diamonds necessary to advance to the next level. Having
  317. Xdone this you will be presented with a small end of level screen, and the new
  318. Xscreen.
  319. X.sp
  320. XDiamonds can be found either lying around, or manufactured from crushing
  321. Xthe lighter coloured boulders together. The darker @-filled bolders cannot be 
  322. Xcrushed into diamonds, only moved around.
  323. X.sp
  324. XTo move around use the h,j,k and l keys.
  325. X.br
  326. XThere is a save and load feature which can be invoked using S and L keys. The
  327. Xsave file is $HOME/cod.save. (This is one of the less buggy features of the
  328. Xgame - so please make good use of it)
  329. X.br
  330. XTo quit and restart a level, press 'q'. To redraw the screen, press control L.
  331. XTo exit the game press control C (or interrupt).
  332. X.SH OPTIONS
  333. X.I
  334. Xperp \fBlevel_num\fP
  335. X.PP
  336. XThe start level is level number 0. To start on another level simply state the
  337. Xnumber as the first (and only) argument to
  338. X.I perp.
  339. X.SH FILES
  340. XFiles are used for the sprites and the map data. These are by default
  341. X.I LIBDIR/map
  342. Xand
  343. X.I LIBDIR/spr
  344. Xwhere LIBDIR is usually /usr/games/lib/perp.
  345. X.SH AUTHOR
  346. X.I perp
  347. Xwas written by James 'Rince' Bonfield.
  348. X.SH BUGS
  349. XThere are quite likely to be thousands of bugs. However, the author wishes to
  350. Xstress that the game is not likely to be updated and corrected any more than
  351. Xit's current state. Feel free to fix things yourself :-)
  352. X.sp
  353. XThere are no checks on which levels exist. If you attempt to start on a non
  354. Xexistant level then the game will simply go loopy. This will also happen upon
  355. Xfinishing the last level.
  356. X.sp
  357. XAlso, the level argument can be supplied as a
  358. Xnegative number. This, also understandably causes a few worried looks from the
  359. Xprogram. If you try harder then it'll probably just have a nervouse breakdown
  360. Xand burst into tears with a segmentation fault.
  361. X.sp
  362. XVery little (in fact none) integrity checking is done on the map and sprite
  363. Xdata files read in by the game.
  364. END_OF_FILE
  365. if test 2046 -ne `wc -c <'perp.6'`; then
  366.     echo shar: \"'perp.6'\" unpacked with wrong size!
  367. fi
  368. # end of 'perp.6'
  369. fi
  370. if test -f 'perp.c' -a "${1}" != "-c" ; then 
  371.   echo shar: Will not clobber existing file \"'perp.c'\"
  372. else
  373. echo shar: Extracting \"'perp.c'\" \(10088 characters\)
  374. sed "s/^X//" >'perp.c' <<'END_OF_FILE'
  375. X/*
  376. X * Perp
  377. X *
  378. X * Written by James 'Rince' Bonfield
  379. X *
  380. X */
  381. X
  382. X#include <stdlib.h>
  383. X#include <stdio.h>
  384. X#include <signal.h>
  385. X#include <curses.h>
  386. X#include <errno.h>
  387. X#include <fcntl.h>
  388. X#include <string.h>
  389. X#include <memory.h>
  390. X#include "perp.h"
  391. X
  392. Xchar code[] = "abhds87\013as\333ashj";
  393. Xchar allmap[HEIGHT][MX];
  394. Xchar map[MY][MX];
  395. Xchar spr[128][YSPRSZ][XSPRSZ];
  396. X
  397. Xint x,y,dleft,score = 0,bleft = 0,level = 0,moves = 0;
  398. Xchar you,*home;
  399. X
  400. XWINDOW *win,*statwin;
  401. X
  402. Xint main(ac,av)
  403. X    int ac;
  404. X    char **av;
  405. X{
  406. X    char ch,mapch;
  407. X    int a,b,stscore;
  408. X
  409. X    if (ac == 2)
  410. X    level = atoi(av[1]);
  411. X    signal(SIGINT,cleanup);
  412. X    if ((home=getenv("HOME")) == (char *)0) {
  413. X    puts("Cannot get HOME environment variable");
  414. X    exit(1);
  415. X    }
  416. X    read_map();
  417. X    read_spr();
  418. X    /* Initialise and clear screen */
  419. X    initscr();
  420. X    clear();
  421. X    noecho();
  422. X    cbreak();
  423. X    /* main loop */
  424. X
  425. X    stscore = score;
  426. X loop:
  427. X    mapcpy(level);
  428. X    startxy();
  429. X    calc_diamonds();
  430. X    init_display();
  431. X    you = 'i';
  432. X    mapch = map[y][x];
  433. X    map[y][x] = 'i';
  434. X    drawmap(((y-1)/5)*5,((x-1)&-8));
  435. X    wrefresh(win);
  436. X    wrefresh(statwin);
  437. X    while (dleft) {
  438. X    map[y][x] = ' ';
  439. X    switch((read(0,&ch,1),ch)) {
  440. X    case 'h':
  441. X        move_dir(0);
  442. X        break;
  443. X    case 'l':
  444. X        move_dir(3);
  445. X        break;
  446. X    case 'k':
  447. X        move_dir(2);
  448. X        break;
  449. X    case 'j':
  450. X        move_dir(1);
  451. X        break;
  452. X    case 'q':
  453. X        for (a=0;a<33;a+=2) {
  454. X        for (b=0;b<23;b++) {
  455. X            mvwaddstr(win,b,28+a,"  >");
  456. X            mvwaddstr(win,b,28-a,"<  ");
  457. X        }
  458. X        wrefresh(win);
  459. X        }
  460. X        wclear(win);
  461. X        wrefresh(win);
  462. X        score = stscore;
  463. X        goto loop;
  464. X    case 'S':
  465. X        moves++;
  466. X        do_save();
  467. X        break;
  468. X    case 'L':
  469. X        do_load();
  470. X        moves++;
  471. X        draw_status();
  472. X        wrefresh(statwin);
  473. X        break;
  474. X    case '\014':
  475. X        /* Kludge of the century - clearok() doesn't work for
  476. X         * screens other than stdscr - so.... :-)
  477. X         */
  478. X        clear();
  479. X        wclear(statwin);
  480. X        wclear(win);
  481. X        wrefresh(win);
  482. X        drawmap(((y-1)/5)*5,((x-1)&-8));
  483. X        draw_status();
  484. X        draw_start();
  485. X        refresh();
  486. X        wrefresh(win);
  487. X        wrefresh(statwin);
  488. X    }
  489. X    mapch = map[y][x];
  490. X    map[y][x] = you;
  491. X    drawmap(((y-1)/5)*5,((x-1)&-8));
  492. X    wrefresh(win);
  493. X    }
  494. X    level ++;
  495. X    end_scr();
  496. X    stscore = score;
  497. X    goto loop;
  498. X}
  499. X
  500. Xvoid init_display() {
  501. X    int i;
  502. X    draw_start();
  503. X    refresh();
  504. X    win = newwin(YSCRSZ*YSPRSZ,XSCRSZ*XSPRSZ,2,1);
  505. X    statwin = newwin(YSCRSZ*YSPRSZ,76-XSCRSZ*XSPRSZ,2,XSCRSZ*XSPRSZ+2);
  506. X
  507. X    draw_status();
  508. X    wrefresh(statwin);
  509. X}
  510. X
  511. Xvoid draw_start() {
  512. X    int i;
  513. X    for (i=1; i<23; i++) {
  514. X    mvaddch(i,61,'|');
  515. X    mvaddch(i,0,'|');
  516. X    mvaddch(i,79,'|');
  517. X    }
  518. X    mvaddstr(1,0,"+------------------------------------------------------------+-----------------+");
  519. X    mvaddstr(23,0,"+------------------------------------------------------------+-----------------");
  520. X}
  521. X
  522. Xvoid draw_status() {
  523. X    char buff[100];
  524. X    drawspr(1,1,'d',statwin);
  525. X    drawspr(5,1,'o',statwin);
  526. X    update_status();
  527. X    mvwaddstr(statwin,14,2,sprintf(buff,"Moves : %6d",moves));
  528. X    mvwaddstr(statwin,15,2,"   _           ");
  529. X    mvwaddstr(statwin,16,2,"  /.>_   __ _ ");
  530. X    mvwaddstr(statwin,17,2," /_//.> /_//.>");
  531. X    mvwaddstr(statwin,18,2,"</  \\_></ /_/ ");
  532. X    mvwaddstr(statwin,19,2,"         </   ");
  533. X}
  534. X
  535. Xvoid read_map() {
  536. X    int fd;
  537. X    char dummy;
  538. X
  539. X    if ((fd = open(map_file, O_RDONLY)) < 0) {
  540. X    perror(map_file);
  541. X    exit(errno);
  542. X    }
  543. X    read(fd,allmap,MX*HEIGHT);
  544. X    close (fd);
  545. X}
  546. X
  547. Xvoid read_spr() {
  548. X    int fd;
  549. X
  550. X    if ((fd = open(spr_file, O_RDONLY)) < 0) {
  551. X    perror(spr_file);
  552. X    exit(errno);
  553. X    }
  554. X    read(fd,spr,128*YSPRSZ*XSPRSZ);
  555. X    close (fd);
  556. X}
  557. X
  558. Xvoid move_dir(dir)
  559. X    char dir;
  560. X{
  561. X    char x1=x,x2=x,y1=y,y2=y;
  562. X    char buff[100];
  563. X    /* dir, left   = 0;
  564. X            down   = 1;
  565. X        up     = 2;
  566. X        right  = 3;
  567. X    */
  568. X    switch(dir) {
  569. X    case 0:
  570. X    x1 = x-1;
  571. X    x2 = x-2;
  572. X    you = '<';
  573. X    break;
  574. X    case 1:
  575. X    y1 = y+1;
  576. X    y2 = y+2;
  577. X    you = 'i';
  578. X    break;
  579. X    case 2:
  580. X    y1 = y-1;
  581. X    y2 = y-2;
  582. X    you = '^';
  583. X    break;
  584. X    case 3:
  585. X    x1 = x+1;
  586. X    x2 = x+2;
  587. X    you = '>';
  588. X    break;
  589. X    }
  590. X    /* Map ' '  blank space
  591. X     *     'o'  crushable boulder
  592. X     *     'O'  uncrushable boulder
  593. X     *     'd'  diamond
  594. X     *     'h'  left key
  595. X     *     'j'  down key
  596. X     *     'k'  up key
  597. X     *     'l'  right key
  598. X     *     'H'  left door
  599. X     *     'J'  down door
  600. X     *     'K'  up door
  601. X     *     'L'  right door
  602. X     */
  603. X    switch(map[y1][x1]) {
  604. X    case ' ':
  605. X    x=x1;y=y1;
  606. X    moves++;
  607. X    break;
  608. X    case 'o':
  609. X    if (map[y2][x2] == ' ') {
  610. X        map[y2][x2] = map[y1][x1];
  611. X        x=x1;y=y1;
  612. X        moves++;
  613. X    }
  614. X    else if (map[y2][x2] == 'o') {
  615. X        map[y2][x2] = map[y1][x1] = 'd';
  616. X        bleft -= 2;
  617. X        score += 5;
  618. X        update_status();
  619. X    }
  620. X    break;
  621. X    case 'O':
  622. X    if (map[y2][x2] == ' ') {
  623. X        map[y2][x2] = map[y1][x1];
  624. X        x=x1;y=y1;
  625. X        moves++;
  626. X    }
  627. X    break;
  628. X    case 'd':
  629. X    x=x1;y=y1;
  630. X    moves++;
  631. X    dleft--;
  632. X    score += 10;
  633. X    update_status();
  634. X    break;
  635. X    case 'h':
  636. X    if (map[y2][x2] == ' ') {
  637. X        map[y2][x2] = map[y1][x1];
  638. X        x=x1;y=y1;
  639. X        moves++;
  640. X    }
  641. X    else if (map[y2][x2] == 'H' && dir == 0) {
  642. X        map[y2][x2] = map[y1][x1] = ' ';
  643. X        score += 5;
  644. X        update_status();
  645. X    }
  646. X    break;
  647. X    case 'j':
  648. X    if (map[y2][x2] == ' ') {
  649. X        map[y2][x2] = map[y1][x1];
  650. X        x=x1;y=y1;
  651. X        moves++;
  652. X    }
  653. X    else if (map[y2][x2] == 'J' && dir == 1) {
  654. X        map[y2][x2] = map[y1][x1] = ' ';
  655. X        score += 5;
  656. X        update_status();
  657. X    }
  658. X    break;
  659. X    case 'k':
  660. X    if (map[y2][x2] == ' ') {
  661. X        map[y2][x2] = map[y1][x1];
  662. X        x=x1;y=y1;
  663. X        moves++;
  664. X    }
  665. X    else if (map[y2][x2] == 'K' && dir == 2) {
  666. X        map[y2][x2] = map[y1][x1] = ' ';
  667. X        score += 5;
  668. X        update_status();
  669. X    }
  670. X    break;
  671. X    case 'l':
  672. X    if (map[y2][x2] == ' ') {
  673. X        map[y2][x2] = map[y1][x1];
  674. X        x=x1;y=y1;
  675. X        moves++;
  676. X    }
  677. X    else if (map[y2][x2] == 'L' && dir == 3) {
  678. X        map[y2][x2] = map[y1][x1] = ' ';
  679. X        score += 5;
  680. X        update_status();
  681. X    }
  682. X    break;
  683. X    }
  684. X    mvwaddstr(statwin,14,2,sprintf(buff,"Moves : %6d",moves));
  685. X    wrefresh(statwin);
  686. X}
  687. X
  688. Xvoid drawmap(y,x)
  689. X    int y,x;
  690. X{
  691. X    int i,j;
  692. X    for (j=0;j<YSCRSZ;j++)
  693. X    for (i=0;i<XSCRSZ;i++)
  694. X        drawspr(j*YSPRSZ,i*XSPRSZ,map[y+j][x+i],win);
  695. X}
  696. X
  697. Xvoid drawspr(y,x,ch,w)
  698. X    int y,x;
  699. X    char ch;
  700. X    WINDOW *w;
  701. X{
  702. X    int i,j;
  703. X
  704. X    for (j=0;j<YSPRSZ;j++)
  705. X    for (i=0;i<XSPRSZ;i++)
  706. X        mvwaddch(w,y+j,x+i,spr[ch][j][i]);
  707. X}
  708. X
  709. Xvoid update_status() {
  710. X    char buff[100];
  711. X
  712. X    mvwaddstr(statwin,2,9,sprintf(buff,"= %3d",dleft));
  713. X    mvwaddstr(statwin,6,9,sprintf(buff,"= %3d",bleft));
  714. X    mvwaddstr(statwin,10,2,sprintf(buff,"Score : %06d",score));
  715. X    mvwaddstr(statwin,12,2,sprintf(buff,"Level : %6d",level+1));
  716. X}
  717. X
  718. Xvoid cleanup() {
  719. X    nocbreak();
  720. X    echo();
  721. X    move(0,0);
  722. X    clear();
  723. X    refresh();
  724. X    endwin();
  725. X    exit(0);
  726. X}
  727. X
  728. Xvoid calc_diamonds() {
  729. X    int i,j;
  730. X    bleft=dleft=0;
  731. X    for (i=0; i<MX; i++)
  732. X    for (j=0; j<MY; j++) {
  733. X        if (map[j][i] == 'd') dleft++;
  734. X        if (map[j][i] == 'o') dleft++,bleft++;
  735. X    }
  736. X}
  737. X
  738. Xvoid mapcpy(mnum)
  739. X    char mnum;
  740. X{
  741. X    memcpy(map,allmap[mnum*MY],MY*MX);
  742. X}
  743. X
  744. Xvoid startxy()
  745. X{
  746. X    int i;
  747. X    char *tmp;
  748. X
  749. X    for (i=0; i<MY;i++) {
  750. X    if (tmp=strchr(map[i],'i')) {
  751. X        y=i;
  752. X        x=tmp - map[i];
  753. X    }
  754. X    }
  755. X}
  756. X
  757. Xvoid end_scr() {
  758. X    int i,j;
  759. X    char ch;
  760. X
  761. X    wclear(win);
  762. X    mvwaddstr(win,10,0,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  763. X    wrefresh(win);
  764. X    mvwaddstr(win,15,16,"/--/     /   /----/ /---/ /");
  765. X    wrefresh(win);
  766. X    mvwaddstr(win,14,16,"/        /   /      /   / /");
  767. X    mvwaddstr(win,16,16,"/        /        / /   /  ");
  768. X    wrefresh(win);
  769. X    mvwaddstr(win,13,16,"/----/ /-/-/ /----/ /   / /");
  770. X    mvwaddstr(win,17,16,"/      /-/-/ /----/ /   / !");
  771. X    wrefresh(win);
  772. X    for (i=-7;i<30;i++) {
  773. X    drawspr(7,i-1,' ',win);
  774. X    drawspr(7,i,'>',win);
  775. X    wrefresh(win);
  776. X    }
  777. X    drawspr(7,i,'i',win);
  778. X    wrefresh(win);
  779. X    sleep(1);
  780. X    mvwaddstr(win,4,19,"/----------\\");
  781. X    mvwaddstr(win,5,19,"|Well Done! \\");
  782. X    mvwaddstr(win,6,19,"\\----------/\\\\");
  783. X    wrefresh(win);    
  784. X    sleep(1);
  785. X    drawspr(7,i,'^',win);
  786. X    wrefresh(win);
  787. X    sleep(1);
  788. X    drawspr(7,i,'i',win);
  789. X    wrefresh(win);
  790. X    sleep(1);
  791. X    mvwaddstr(win,4,19,"            ");
  792. X    mvwaddstr(win,5,19,"             ");
  793. X    mvwaddstr(win,6,19,"              ");
  794. X    for (i=30;i<60;i++) {
  795. X    drawspr(7,i-1,' ',win);
  796. X    drawspr(7,i,'>',win);
  797. X    wrefresh(win);
  798. X    }
  799. X    wclear(win);
  800. X    wrefresh(win);
  801. X}
  802. X
  803. Xvoid do_save() {
  804. X    struct savetype savebuf;
  805. X    char save_file[128];
  806. X    FILE *fp;
  807. X    int chk;
  808. X
  809. X    memcpy(savebuf.map,map,MX*MY);
  810. X    savebuf.x = x;
  811. X    savebuf.y = y;
  812. X    savebuf.dleft = dleft;
  813. X    savebuf.bleft = bleft;
  814. X    savebuf.level = level;
  815. X    savebuf.moves = moves;
  816. X    savebuf.score = score;
  817. X    encode(&savebuf,sizeof(savebuf));
  818. X    strcpy(save_file,home);
  819. X    strcat(save_file,"/cod.save");
  820. X    if ((fp = fopen(save_file,"w")) == NULL) {
  821. X    perror(save_file);
  822. X    return;
  823. X    }
  824. X    fwrite(&savebuf,sizeof(savebuf),1,fp);
  825. X    fclose(fp);
  826. X}
  827. X
  828. Xvoid do_load() {
  829. X    struct savetype loadbuf;
  830. X    FILE *fp;
  831. X    char save_file[128];
  832. X    int chk;
  833. X
  834. X    strcpy(save_file,home);
  835. X    strcat(save_file,"/cod.save");
  836. X    if ((fp = fopen(save_file,"r")) == NULL)
  837. X    return;
  838. X    fread(&loadbuf,sizeof(loadbuf),1,fp);
  839. X    fclose(fp);
  840. X    if (!decode(&loadbuf,sizeof(loadbuf)))
  841. X    return;
  842. X    memcpy(map,loadbuf.map,MX*MY);
  843. X    x = loadbuf.x;
  844. X    y = loadbuf.y;
  845. X    dleft = loadbuf.dleft;
  846. X    bleft = loadbuf.bleft;
  847. X    level = loadbuf.level;
  848. X    moves = loadbuf.moves;
  849. X    score = loadbuf.score;
  850. X}
  851. X
  852. Xvoid encode(buf,size)
  853. X    struct savetype *buf;
  854. X    int size;
  855. X{
  856. X    short offset;
  857. X    int chk=0;
  858. X    char *ptr = (char *)buf;
  859. X    buf->chk = 42;
  860. X    for (offset = 0; offset < size;offset++) {
  861. X    chk += ptr[offset]^ptr[offset/7]+3*ptr[size-offset/3];
  862. X    }
  863. X    buf->chk = chk;
  864. X    for (offset = 0; offset < size; offset++) {
  865. X    ptr[offset] = ptr[offset]^170^(code[offset%16]);
  866. X    }
  867. X}
  868. X
  869. Xchar decode(buf,size)
  870. X    struct savetype *buf;
  871. X    int size;
  872. X{
  873. X    short offset;
  874. X    int chk=0,chk2;
  875. X    char *ptr = (char *)buf;
  876. X
  877. X    for (offset = 0; offset < size; offset++) {
  878. X    ptr[offset] = ptr[offset]^170^(code[offset%16]);
  879. X    }
  880. X    chk2 = buf->chk;
  881. X    buf->chk = 42;
  882. X    for (offset = 0; offset < size;offset++) {
  883. X    chk += ptr[offset]^ptr[offset/7]+3*ptr[size-offset/3];
  884. X    }
  885. X    return (chk == chk2);
  886. X}
  887. END_OF_FILE
  888. if test 10088 -ne `wc -c <'perp.c'`; then
  889.     echo shar: \"'perp.c'\" unpacked with wrong size!
  890. fi
  891. # end of 'perp.c'
  892. fi
  893. if test -f 'perp.h' -a "${1}" != "-c" ; then 
  894.   echo shar: Will not clobber existing file \"'perp.h'\"
  895. else
  896. echo shar: Extracting \"'perp.h'\" \(785 characters\)
  897. sed "s/^X//" >'perp.h' <<'END_OF_FILE'
  898. X
  899. X#define YSPRSZ 3
  900. X#define XSPRSZ 6
  901. X#define YSCRSZ 7
  902. X#define XSCRSZ 10
  903. X
  904. X#define MX 35
  905. X#define MY 32
  906. X#define HEIGHT 128
  907. X
  908. X/* Predeclarations */
  909. Xvoid update_status();
  910. Xvoid move_dir();
  911. Xvoid cleanup();
  912. Xvoid read_spr();
  913. Xvoid read_map();
  914. Xvoid drawmap();
  915. Xvoid drawspr();
  916. Xvoid init_display();
  917. Xvoid startxy();
  918. Xvoid mapcpy();
  919. Xvoid draw_status();
  920. Xvoid draw_start();
  921. Xvoid end_scr();
  922. Xvoid do_save();
  923. Xvoid do_load();
  924. Xvoid encode();
  925. Xvoid calc_diamonds();
  926. Xchar decode();
  927. X
  928. X/* Files used */
  929. X#ifndef MAPFILE
  930. Xchar *map_file = "/home/lily/cs/uba/open/lib/perp_map";
  931. X#else
  932. Xchar *map_file = MAPFILE;
  933. X#endif
  934. X
  935. X#ifndef SPRFILE
  936. Xchar *spr_file = "/home/lily/cs/uba/open/lib/perp_spr";
  937. X#else
  938. Xchar *spr_file = SPRFILE;
  939. X#endif
  940. X
  941. Xstruct savetype {
  942. X    char map[MY][MX];
  943. X    int x,y,dleft,bleft,level,moves,score,chk;
  944. X};
  945. END_OF_FILE
  946. if test 785 -ne `wc -c <'perp.h'`; then
  947.     echo shar: \"'perp.h'\" unpacked with wrong size!
  948. fi
  949. # end of 'perp.h'
  950. fi
  951. if test -f 'shrink_spr' -a "${1}" != "-c" ; then 
  952.   echo shar: Will not clobber existing file \"'shrink_spr'\"
  953. else
  954. echo shar: Extracting \"'shrink_spr'\" \(57 characters\)
  955. sed "s/^X//" >'shrink_spr' <<'END_OF_FILE'
  956. X#!/bin/awk -f
  957. X/....../ {printf "%s",$0}
  958. XEND {printf"\n"}
  959. END_OF_FILE
  960. if test 57 -ne `wc -c <'shrink_spr'`; then
  961.     echo shar: \"'shrink_spr'\" unpacked with wrong size!
  962. fi
  963. chmod +x 'shrink_spr'
  964. # end of 'shrink_spr'
  965. fi
  966. if test -f 'spr.expand' -a "${1}" != "-c" ; then 
  967.   echo shar: Will not clobber existing file \"'spr.expand'\"
  968. else
  969. echo shar: Extracting \"'spr.expand'\" \(2795 characters\)
  970. sed "s/^X//" >'spr.expand' <<'END_OF_FILE'
  971. X??????
  972. X??????
  973. X??????
  974. X
  975. X??????
  976. X??????
  977. X??????
  978. X
  979. X??????
  980. X??????
  981. X??????
  982. X
  983. X??????
  984. X??????
  985. X??????
  986. X
  987. X??????
  988. X??????
  989. X??????
  990. X
  991. X??????
  992. X??????
  993. X??????
  994. X
  995. X??????
  996. X??????
  997. X??????
  998. X
  999. X??????
  1000. X??????
  1001. X??????
  1002. X
  1003. X??????
  1004. X??????
  1005. X??????
  1006. X
  1007. X??????
  1008. X??????
  1009. X??????
  1010. X
  1011. X??????
  1012. X??????
  1013. X??????
  1014. X
  1015. X??????
  1016. X??????
  1017. X??????
  1018. X
  1019. X??????
  1020. X??????
  1021. X??????
  1022. X
  1023. X??????
  1024. X??????
  1025. X??????
  1026. X
  1027. X??????
  1028. X??????
  1029. X??????
  1030. X
  1031. X??????
  1032. X??????
  1033. X??????
  1034. X
  1035. X??????
  1036. X??????
  1037. X??????
  1038. X
  1039. X??????
  1040. X??????
  1041. X??????
  1042. X
  1043. X??????
  1044. X??????
  1045. X??????
  1046. X
  1047. X??????
  1048. X??????
  1049. X??????
  1050. X
  1051. X??????
  1052. X??????
  1053. X??????
  1054. X
  1055. X??????
  1056. X??????
  1057. X??????
  1058. X
  1059. X??????
  1060. X??????
  1061. X??????
  1062. X
  1063. X??????
  1064. X??????
  1065. X??????
  1066. X
  1067. X??????
  1068. X??????
  1069. X??????
  1070. X
  1071. X??????
  1072. X??????
  1073. X??????
  1074. X
  1075. X??????
  1076. X??????
  1077. X??????
  1078. X
  1079. X??????
  1080. X??????
  1081. X??????
  1082. X
  1083. X??????
  1084. X??????
  1085. X??????
  1086. X
  1087. X??????
  1088. X??????
  1089. X??????
  1090. X
  1091. X??????
  1092. X??????
  1093. X??????
  1094. X
  1095. X??????
  1096. X??????
  1097. X??????
  1098. X
  1099. X      
  1100. X      
  1101. X      
  1102. X
  1103. X??????
  1104. X??????
  1105. X??????
  1106. X
  1107. X??????
  1108. X??????
  1109. X??????
  1110. X
  1111. X+.--.+
  1112. X--.++.
  1113. X.++.--
  1114. X
  1115. X??????
  1116. X??????
  1117. X??????
  1118. X
  1119. X??????
  1120. X??????
  1121. X??????
  1122. X
  1123. X??????
  1124. X??????
  1125. X??????
  1126. X
  1127. X??????
  1128. X??????
  1129. X??????
  1130. X
  1131. X??????
  1132. X??????
  1133. X??????
  1134. X
  1135. X??????
  1136. X??????
  1137. X??????
  1138. X
  1139. X??????
  1140. X??????
  1141. X??????
  1142. X
  1143. X??????
  1144. X??????
  1145. X??????
  1146. X
  1147. X??????
  1148. X??????
  1149. X??????
  1150. X
  1151. X======
  1152. X######
  1153. X######
  1154. X
  1155. X??????
  1156. X??????
  1157. X??????
  1158. X
  1159. X??????
  1160. X??????
  1161. X??????
  1162. X
  1163. X/====\
  1164. X|####|
  1165. X\====/
  1166. X
  1167. X|#####
  1168. X|#####
  1169. X\=====
  1170. X
  1171. X######
  1172. X######
  1173. X======
  1174. X
  1175. X#####|
  1176. X#####|
  1177. X=====/
  1178. X
  1179. X|#####
  1180. X|#####
  1181. X|#####
  1182. X
  1183. X######
  1184. X######
  1185. X######
  1186. X
  1187. X#####|
  1188. X#####|
  1189. X#####|
  1190. X
  1191. X/=====
  1192. X|#####
  1193. X|#####
  1194. X
  1195. X======
  1196. X######
  1197. X######
  1198. X
  1199. X=====\
  1200. X#####|
  1201. X#####|
  1202. X
  1203. X??????
  1204. X??????
  1205. X??????
  1206. X
  1207. X??????
  1208. X??????
  1209. X??????
  1210. X
  1211. Xo__O\ 
  1212. X\___/ 
  1213. X _/_\ 
  1214. X
  1215. X======
  1216. X######
  1217. X======
  1218. X
  1219. X /O__o
  1220. X \___/
  1221. X /_\_ 
  1222. X
  1223. X??????
  1224. X??????
  1225. X??????
  1226. X
  1227. X??????
  1228. X??????
  1229. X??????
  1230. X
  1231. X??????
  1232. X??????
  1233. X??????
  1234. X
  1235. X??????
  1236. X??????
  1237. X??????
  1238. X
  1239. X??????
  1240. X??????
  1241. X??????
  1242. X
  1243. X/====\
  1244. X|####|
  1245. X|####|
  1246. X
  1247. X??????
  1248. X??????
  1249. X??????
  1250. X
  1251. X??????
  1252. X??????
  1253. X??????
  1254. X
  1255. X??????
  1256. X??????
  1257. X??????
  1258. X
  1259. X  <<  
  1260. X  <<  
  1261. X  <<  
  1262. X
  1263. X??????
  1264. X??????
  1265. X??????
  1266. X
  1267. X      
  1268. Xvvvvvv
  1269. X      
  1270. X
  1271. X      
  1272. X^^^^^^
  1273. X      
  1274. X
  1275. X  >>  
  1276. X  >>  
  1277. X  >>  
  1278. X
  1279. X??????
  1280. X??????
  1281. X??????
  1282. X
  1283. X??????
  1284. X??????
  1285. X??????
  1286. X
  1287. X  ___ 
  1288. X /@@@\
  1289. X \@@@/
  1290. X
  1291. X??????
  1292. X??????
  1293. X??????
  1294. X
  1295. X??????
  1296. X??????
  1297. X??????
  1298. X
  1299. X??????
  1300. X??????
  1301. X??????
  1302. X
  1303. X??????
  1304. X??????
  1305. X??????
  1306. X
  1307. X??????
  1308. X??????
  1309. X??????
  1310. X
  1311. X|####|
  1312. X|####|
  1313. X\====/
  1314. X
  1315. X??????
  1316. X??????
  1317. X??????
  1318. X
  1319. X??????
  1320. X??????
  1321. X??????
  1322. X
  1323. X??????
  1324. X??????
  1325. X??????
  1326. X
  1327. X??????
  1328. X??????
  1329. X??????
  1330. X
  1331. X??????
  1332. X??????
  1333. X??????
  1334. X
  1335. X/=====
  1336. X|#####
  1337. X\=====
  1338. X
  1339. X??????
  1340. X??????
  1341. X??????
  1342. X
  1343. X=====\
  1344. X#####|
  1345. X=====/
  1346. X
  1347. X ^__^ 
  1348. X/----\
  1349. X_/  \_
  1350. X
  1351. X######
  1352. X######
  1353. X======
  1354. X
  1355. X??????
  1356. X??????
  1357. X??????
  1358. X
  1359. X??????
  1360. X??????
  1361. X??????
  1362. X
  1363. X??????
  1364. X??????
  1365. X??????
  1366. X
  1367. X??????
  1368. X??????
  1369. X??????
  1370. X
  1371. X  /\  
  1372. X <  > 
  1373. X  \/  
  1374. X
  1375. X??????
  1376. X??????
  1377. X??????
  1378. X
  1379. X??????
  1380. X??????
  1381. X??????
  1382. X
  1383. X??????
  1384. X??????
  1385. X??????
  1386. X
  1387. X| | /\
  1388. X----||
  1389. X    \/
  1390. X
  1391. X O__O 
  1392. X/----\
  1393. X_/  \_
  1394. X
  1395. X  /--\
  1396. X   \/ 
  1397. X ==|  
  1398. X
  1399. X ==|  
  1400. X   /\ 
  1401. X  \--/
  1402. X
  1403. X/\ | |
  1404. X||-+-+
  1405. X\/    
  1406. X
  1407. X??????
  1408. X??????
  1409. X??????
  1410. X
  1411. X??????
  1412. X??????
  1413. X??????
  1414. X
  1415. X  ___ 
  1416. X /   \
  1417. X \___/
  1418. X
  1419. X??????
  1420. X??????
  1421. X??????
  1422. X
  1423. X??????
  1424. X??????
  1425. X??????
  1426. X
  1427. X??????
  1428. X??????
  1429. X??????
  1430. X
  1431. X??????
  1432. X??????
  1433. X??????
  1434. X
  1435. X??????
  1436. X??????
  1437. X??????
  1438. X
  1439. X||##||
  1440. X||##||
  1441. X\====/
  1442. X
  1443. X??????
  1444. X??????
  1445. X??????
  1446. X
  1447. X??????
  1448. X??????
  1449. X??????
  1450. X
  1451. X??????
  1452. X??????
  1453. X??????
  1454. X
  1455. X??????
  1456. X??????
  1457. X??????
  1458. X
  1459. X??????
  1460. X??????
  1461. X??????
  1462. X
  1463. X|#####
  1464. X|#####
  1465. X|#####
  1466. X
  1467. X|####|
  1468. X|####|
  1469. X|####|
  1470. X
  1471. X#####|
  1472. X#####|
  1473. X#####|
  1474. X
  1475. X??????
  1476. X??????
  1477. X??????
  1478. X
  1479. X
  1480. END_OF_FILE
  1481. if test 2795 -ne `wc -c <'spr.expand'`; then
  1482.     echo shar: \"'spr.expand'\" unpacked with wrong size!
  1483. fi
  1484. # end of 'spr.expand'
  1485. fi
  1486. echo shar: End of archive 1 \(of 1\).
  1487. cp /dev/null ark1isdone
  1488. MISSING=""
  1489. for I in 1 ; do
  1490.     if test ! -f ark${I}isdone ; then
  1491.     MISSING="${MISSING} ${I}"
  1492.     fi
  1493. done
  1494. if test "${MISSING}" = "" ; then
  1495.     echo You have the archive.
  1496.     rm -f ark[1-9]isdone
  1497. else
  1498.     echo You still need to unpack the following archives:
  1499.     echo "        " ${MISSING}
  1500. fi
  1501. ##  End of shell archive.
  1502. exit 0
  1503.