Apur-ee.254 net.games.pacman utcsrgv!utzoo!decvax!pur-ee!davy Mon Feb 22 21:55:10 1982 PACMAN MOVIE SOURCE (very long) 1 2 3 4 5 6 (Just in case, for you Arpavax-types) OK, gang, here it is, the pacman movie source. To add it to your code, you need to make the following additions to the files listed: Makefile:--------------------------- Right before you compile util.c, add: movie.o: movie.c pacdefs.h $(CC) -c $(CFLAGS) $(DFLAGS) movie.c pacman.c:--------------------------- You need an integer to count the number of racks you have completed. I called mine "timesthru". int timesthru, /* global declarations */ timesthru=0; /* do this early in main() */ util.c:----------------------------- This is where everything is really done. You need to declare timesthru again, in the external definitions. Then, in the routine "reinit()" (line 220 or so), add the following: timesthru++; if ((timesthru % 2) == 0) { movie(); } This should be added as the first thing done in the routine, it comes BEFORE the line "for (locy = 0; locy /* This is the monster we use. Don't take out the extra spaces here, * they are there so that the thing "cleans up" after itself, since * I'm too lazy to move all over the place writing out spaces. */ char *bigmonster[] = { " _____ ", " / \\ ", " | O O | ", " v^v^v^v ", }; movie() { int i, j, k; clear(); refresh(); /* this loop moves the monster and the small pacman from right to * left, until it's time to start printing "fractional" monsters */ for (i=70; i > (-1); i--) { for (j=0; j 20) { SPLOT(13, (i-20), " 20) { switch(i) { case 21: monst1((i-20)); break; case 22: monst2((i-20)); break; case 23: monst3((i-20)); break; default: monst4((i-20)); break; } } refresh(); } /* right1-right9 are partial monster routines, for moving him off to * the right of the screen. monst4 prints the whole pacman. */ right1(); monst4(50); refresh(); right2(); monst4(51); refresh(); right3(); monst4(52); refresh(); right4(); monst4(53); refresh(); right5(); monst4(54); refresh(); right6(); monst4(55); refresh(); right7(); monst4(56); refresh(); right8(); monst4(57); refresh(); right9(); monst4(58); refresh(); /* Now finish moving the pacman to the end of the screen. */ for (i=59; i "); } monst2(xxx) int xxx; { SPLOT(9, xxx, " >"); SPLOT(10, xxx, " >"); SPLOT(11, xxx, " >"); } monst3(xxx) int xxx; { SPLOT(8, xxx, " >"); SPLOT(9, xxx, " >"); SPLOT(10, xxx, " >"); SPLOT(11, xxx, " >"); SPLOT(12, xxx, " >"); } monst4(xxx) int xxx; { SPLOT(7, xxx, " >"); SPLOT(8, xxx, " >"); SPLOT(9, xxx, " >"); SPLOT(10, xxx, " >"); SPLOT(11, xxx, " >"); SPLOT(12, xxx, " >"); SPLOT(13, xxx, " >"); } monst5(xxx) int xxx; { SPLOT(7, xxx, " >"); SPLOT(8, xxx, " >"); SPLOT(9, xxx, " >"); SPLOT(10, xxx, " "); SPLOT(11, xxx, " >"); SPLOT(12, xxx, " >"); SPLOT(13, xxx, " >"); } monst6(xxx) int xxx; { SPLOT(7, xxx, " >"); SPLOT(8, xxx, " >"); SPLOT(9, xxx, " "); SPLOT(10, xxx, " "); SPLOT(11, xxx, " "); SPLOT(12, xxx, " >"); SPLOT(13, xxx, " >"); } monst7(xxx) int xxx; { SPLOT(7, xxx, " >"); SPLOT(8, xxx, " "); SPLOT(9, xxx, " "); SPLOT(10, xxx, " "); SPLOT(11, xxx, " "); SPLOT(12, xxx, " "); SPLOT(13, xxx, " >"); } ----------------------------------------------------------------- gopher://quux.org/ conversion by John Goerzen of http://communication.ucsd.edu/A-News/ This Usenet Oldnews Archive article may be copied and distributed freely, provided: 1. There is no money collected for the text(s) of the articles. 2. The following notice remains appended to each copy: The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996 Bruce Jones, Henry Spencer, David Wiseman.