From bacchus.pa.dec.com!decwrl!uunet!zephyr.ens.tek.com!tekred!saab!billr Sat Aug 11 12:18:57 PDT 1990 Article 1057 of comp.sources.games: Path: bacchus.pa.dec.com!decwrl!uunet!zephyr.ens.tek.com!tekred!saab!billr From: billr@saab.CNA.TEK.COM (Bill Randle) Newsgroups: comp.sources.games Subject: v11i019: blockbuster - clear the bricks games (SunView only), Part02/03 Message-ID: <6121@tekred.CNA.TEK.COM> Date: 9 Aug 90 23:45:06 GMT Sender: news@tekred.CNA.TEK.COM Lines: 2442 Approved: billr@saab.CNA.TEK.COM Submitted-by: Eric Van Gestel Posting-number: Volume 11, Issue 19 Archive-name: blockbuster/Part02 #! /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 'Makefile' <<'END_OF_FILE' X# X# Edit blockbuster.h and/or Makefile if the directory pathnames change X# XDH= blockbuster.h XCFIS= blockbuster.c bricks.c stage.c balls_pallet.c deflection.c score.c save.c XOBJS= blockbuster.o bricks.o stage.o balls_pallet.o deflection.o score.o save.o XLASTMADE= LASTMADE.sun3.50 LASTMADE.sun4 XPROG = blockbuster.sun.exe XBINDIR = /usr/net/games XLIBDIR = /usr/net/games/lib/blockbuster XMANDIR = /usr/net/mann/man6 XMANEXT = 6 XCFLAGS= -O -DSTAGEDIR=\"${LIBDIR}\" XLDFLAGS= XLIBS= -lsuntool -lsunwindow -lpixrect -lm X Xblockbuster: ${OBJS} X @echo loading... X @cc ${LDFLAGS} ${OBJS} ${LIBS} -o blockbuster X# @echo stripping... X# @strip blockbuster X @chmod 711 blockbuster X Xstagemm: stagemm.o X @echo loading... X @cc ${LDFLAGS} stagemm.o ${LIBS} -o stagemm.exe X @echo stripping... X @strip stagemm.exe X @chmod 111 stagemm.exe X XLASTMADE.sun3.50: X @echo touching... X @sed -e '/define ITIMER_DELAY/s/[1-9][0-9]*/5000/' ${DH} > ${DH}.tmp X @mv ${DH}.tmp ${DH} X @rm -f ${LASTMADE} X @touch ${CFIS} LASTMADE.sun3.50 X @chmod = LASTMADE.sun3.50 X Xsun3.50: LASTMADE.sun3.50 blockbuster X @echo moving... X @mv -f blockbuster blockbuster.sun.exe X XLASTMADE.sun4: X @echo touching... X @sed -e '/define ITIMER_DELAY/s/[1-9][0-9]*/15000/' ${DH} > ${DH}.tmp X @mv ${DH}.tmp ${DH} X @rm -f ${LASTMADE} X @touch ${CFIS} LASTMADE.sun4 X @chmod = LASTMADE.sun4 X Xsun4: LASTMADE.sun4 blockbuster X @echo moving... X @mv -f blockbuster blockbuster.sparc.exe X Xinstall: X -mkdir ${LIBDIR} X cp -r STAGES* ${LIBDIR} X cp ${PROG} ${BINDIR}/blockbuster X cp blockbuster.man ${MANDIR}/blockbuster.${MANEXT} END_OF_FILE if test 1552 -ne `wc -c <'Makefile'`; then echo shar: \"'Makefile'\" unpacked with wrong size! fi # end of 'Makefile' fi if test -f 'RATIONAL' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'RATIONAL'\" else echo shar: Extracting \"'RATIONAL'\" \(1343 characters\) sed "s/^X//" >'RATIONAL' <<'END_OF_FILE' XThis game was written as an endeavour in learning Sunview. XA similar effort may someday be made in porting it to X11. X(unless someone beats me to it!) X XThe game as distributed has been played here on Sun 3.50 and 4c. XThe set of stages is, we believe, balanced both for novice players and experts. XThey can be modified easily, but as this makes it harder to compare scores, Xyou should provide a separate play ground. X XMakeable things: X- blockbuster X Executable for whatever host your on. X (must be executed from within a play ground directory) X- sun3.50 & sun4 X Assures tuning parameters are uptodate w.r.t. whatever was last made. X (no crosscompilation though, you must be on a sun3.50 or sun4 X respectively) X- stagemm X Small bookkeeping program, useful if you want to design your own stages. X XSkeleton shellscripts: X(You may wish to adjust, rename and put these in your path.) X- blockbuster.SKEL X Main program (architecture, and directory independent) X- smm.SKEL X Allows you to call stagemm by name ('grep (1)') or number. X (must be called from within a play ground directory) X- tes.SKEL X Allows you to edit a stage (starting from a default skeleton); X likewise called by name or number (idem). X- try.SKEL X Allows you to try out any stage (no score); X likewise called by name or number (idem). X X-- Eric Van Gestel (ericvg@cs.kuleuven.ac.be) END_OF_FILE if test 1343 -ne `wc -c <'RATIONAL'`; then echo shar: \"'RATIONAL'\" unpacked with wrong size! fi # end of 'RATIONAL' fi if test -f 'STAGES.wacko/stage0' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'STAGES.wacko/stage0'\" else echo shar: Extracting \"'STAGES.wacko/stage0'\" \(577 characters\) sed "s/^X//" >'STAGES.wacko/stage0' <<'END_OF_FILE' XCockatrice X70 320 X##%A####A%## X# CXXC # X#WR UU RW# X#a W LL W a# X# R R # X#bcd WW dcb# X# R HH R # X# #IIII# # X#R WW R# X# I#I I#I # X# #M# #M# # X# I RR I # X#L R R L# X#I U UU U I# X##%#%##%#%## X#III 33 III# X#II II# X#III dD III# X#II II# X#III Dc III# X#II II# X#III bD III# X#II II# X#III Da III# X#II II# X# aa # X#1234MM4321# X# aa # X# # X#AA AA# X#S#S ## S#S# X# # X# # X# ^ / # X# # X# # X# # X# # X# # X# # X# # X# # X## A A ## END_OF_FILE if test 577 -ne `wc -c <'STAGES.wacko/stage0'`; then echo shar: \"'STAGES.wacko/stage0'\" unpacked with wrong size! fi # end of 'STAGES.wacko/stage0' fi if test -f 'STAGES.wacko/stage1' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'STAGES.wacko/stage1'\" else echo shar: Extracting \"'STAGES.wacko/stage1'\" \(577 characters\) sed "s/^X//" >'STAGES.wacko/stage1' <<'END_OF_FILE' XLeprechaun X99 600 X############ X#c11111111c# X# # X#UUUaUUaUUU# X#UMUUCCUUMU# X#UUUUUUUUUU# X#UUUMUUMUUU# X#U2UUUUUU2U# X#UUGUMMULUU# X#U2UUUUUU2U# X#UUUMUUMUUU# X#UUUUUUUUUU# X#UMUUSSUUMU# X#UUUUUUUUUU# X#DUUMUUMUUD# X#U3UUUUUU3U# X#UULUMMUGUU# X#U3UUUUUU3U# X#UUUMUUMUUU# X#UUUUSSUUUU# X#UMU2UU2UMU# X#UUU%UU%UUU# X#1111111111# X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# \ END_OF_FILE if test 577 -ne `wc -c <'STAGES.wacko/stage1'`; then echo shar: \"'STAGES.wacko/stage1'\" unpacked with wrong size! fi # end of 'STAGES.wacko/stage1' fi if test -f 'STAGES/stage0' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'STAGES/stage0'\" else echo shar: Extracting \"'STAGES/stage0'\" \(572 characters\) sed "s/^X//" >'STAGES/stage0' <<'END_OF_FILE' XZebra X50 400 X############ X#IIIIIIIIII# X#IIIIIIIIII# X#IIIIIIIIII# X# # X#2222222222# X#1M111111M1# X#1111111111# X# # X#2222222222# X#1111111111# X#1111111111# X# # X#2222222222# X#1111111111# X#1111LL1111# X# # X#2222222222# X#1111111111# X#1111SS1111# X# # X#2222222222# X#1111111111# X#1111111111# X# # X#2222222222# X#1111111111# X#1111LL1111# X# # X#4447777444# X#1111111111# X#1111111111# X# # X#1111111111# X#1111111111# X#1111111111# X# # X#1111111111# X#1111111111# X#1111111111# X# # X# # X/2222222222# END_OF_FILE if test 572 -ne `wc -c <'STAGES/stage0'`; then echo shar: \"'STAGES/stage0'\" unpacked with wrong size! fi # end of 'STAGES/stage0' fi if test -f 'STAGES/stage1' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'STAGES/stage1'\" else echo shar: Extracting \"'STAGES/stage1'\" \(571 characters\) sed "s/^X//" >'STAGES/stage1' <<'END_OF_FILE' XSnail X30 90 X############ X#b11111111b# X#1111111111# X#1111111111# X#2222222222# X# # X# 22222222 # X# 11111111 # X# 11177111 # X# 11111111 # X# 11111111 # X# # X# # X# # X# # X# # X# # X# # X# # X#0 0# X# 0 0 # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X### /## END_OF_FILE if test 571 -ne `wc -c <'STAGES/stage1'`; then echo shar: \"'STAGES/stage1'\" unpacked with wrong size! fi # end of 'STAGES/stage1' fi if test -f 'STAGES/stage10' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'STAGES/stage10'\" else echo shar: Extracting \"'STAGES/stage10'\" \(571 characters\) sed "s/^X//" >'STAGES/stage10' <<'END_OF_FILE' XWolf X30 700 X############ X# C C # X# 12 00 21 # X# 13 00 31 # X# 14 DU 41 # X# 13 00 31 # X# 12 SS 21 # X# # X# 12 11 21 # X# 12IIII21 # X# 12 WW 21 # X# 12 55 21 # X# 12IIII21 # X# 12 11 21 # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X/ # END_OF_FILE if test 571 -ne `wc -c <'STAGES/stage10'`; then echo shar: \"'STAGES/stage10'\" unpacked with wrong size! fi # end of 'STAGES/stage10' fi if test -f 'STAGES/stage11' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'STAGES/stage11'\" else echo shar: Extracting \"'STAGES/stage11'\" \(572 characters\) sed "s/^X//" >'STAGES/stage11' <<'END_OF_FILE' XLizard X16 30 X############ X# # X# II # X#3 3# X# # X# PP # X# R R # X# # X# # X# # X# # X# WWWW # X# DDDDDD # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # # X# # # # # # X# \ # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # END_OF_FILE if test 572 -ne `wc -c <'STAGES/stage11'`; then echo shar: \"'STAGES/stage11'\" unpacked with wrong size! fi # end of 'STAGES/stage11' fi if test -f 'STAGES/stage12' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'STAGES/stage12'\" else echo shar: Extracting \"'STAGES/stage12'\" \(577 characters\) sed "s/^X//" >'STAGES/stage12' <<'END_OF_FILE' XBlack_Hole X60 800 X############ X# # X#IIIIIIIIII# X# GU # X#IIIIIIIIII# X#ES SE# X#S S# X# # X#2222222222# X# I IIII I # X#2222442222# X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# /# # END_OF_FILE if test 577 -ne `wc -c <'STAGES/stage12'`; then echo shar: \"'STAGES/stage12'\" unpacked with wrong size! fi # end of 'STAGES/stage12' fi if test -f 'STAGES/stage13' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'STAGES/stage13'\" else echo shar: Extracting \"'STAGES/stage13'\" \(572 characters\) sed "s/^X//" >'STAGES/stage13' <<'END_OF_FILE' XViper X40 280 X############ X# L GU L # X#d D D d# X# XH # X#66 9999 66# X# 6 6 # X# RR RR # X#RR RR# X# SS # X#RRRR00RRRR# X# I SS I # X# I I # X# I I # X# I RR I # X# I I # X# I I # X# I I # X# I I # X# I I # X# 0 0 # X# # X# %% # X## ## X# # X# # X# # X# # X# # X# R R R R # X#R R RR R R# X# R R R R # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# ##aa## \ END_OF_FILE if test 572 -ne `wc -c <'STAGES/stage13'`; then echo shar: \"'STAGES/stage13'\" unpacked with wrong size! fi # end of 'STAGES/stage13' fi if test -f 'STAGES/stage14' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'STAGES/stage14'\" else echo shar: Extracting \"'STAGES/stage14'\" \(592 characters\) sed "s/^X//" >'STAGES/stage14' <<'END_OF_FILE' XHippopotamus X20 200 X############ X# # X# 000^#000 # X# % % # X# 0 2222 0 # X# 0 2 2 0 # X# 0 2 R2 0 # X# 0 2R 2 0 # X# % 2 R2 % # X# 0 2WW2 0 # X# j 2 A2 j # X# 0 2WW2 0 # X# % 2R 2 % # X# 0 2 R2 0 # X# 0 2R 2 0 # X# 0 2 2 0 # X# 0 2222 0 # X# % % # X# 00000000 # X# # X# # X# # X# # X# # X# \SS# # X# 0TD0 # X# 0DA0 # X# #SS# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X### ### END_OF_FILE if test 592 -ne `wc -c <'STAGES/stage14'`; then echo shar: \"'STAGES/stage14'\" unpacked with wrong size! fi # end of 'STAGES/stage14' fi if test -f 'STAGES/stage15' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'STAGES/stage15'\" else echo shar: Extracting \"'STAGES/stage15'\" \(573 characters\) sed "s/^X//" >'STAGES/stage15' <<'END_OF_FILE' XDiamond X40 70 X############ X##S 33 S## X#S 3113 S# X# 3113 # X# 311113 # X# 311113 # X# 31111113 # X# 31111113 # X#3111UU1113# X#3111DL1113# X# 31111113 # X# 31111113 # X# 311113 # X# 311113 # X# 3113 # X#S 3113 S# X# S 33 S # X# \ X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X## ## END_OF_FILE if test 573 -ne `wc -c <'STAGES/stage15'`; then echo shar: \"'STAGES/stage15'\" unpacked with wrong size! fi # end of 'STAGES/stage15' fi if test -f 'STAGES/stage16' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'STAGES/stage16'\" else echo shar: Extracting \"'STAGES/stage16'\" \(573 characters\) sed "s/^X//" >'STAGES/stage16' <<'END_OF_FILE' XTurtle X40 120 X###A####A### X#baUeaaeUab# X#R SS R# X# bcd dcb # X#%########%# X# 11111111 # X# 22222222 # X# 11111111 # X# # X# 11111111 # X#5332222335# X# 11111111 # X# # X# 11111111 # X# 22D22D22 # X# 11111111 # X# # X# 11111111 # X#I22222222I# X# 11111111 # X# # X# # X# /^ # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # END_OF_FILE if test 573 -ne `wc -c <'STAGES/stage16'`; then echo shar: \"'STAGES/stage16'\" unpacked with wrong size! fi # end of 'STAGES/stage16' fi if test -f 'STAGES/stage17' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'STAGES/stage17'\" else echo shar: Extracting \"'STAGES/stage17'\" \(572 characters\) sed "s/^X//" >'STAGES/stage17' <<'END_OF_FILE' XCobra X60 300 X############ X#d11111111d# X#11 1CM1 11# X#11 1111 11# X#1# #1# X#111 11 111# X#U11 11 11U# X#111 11 111# X#1R R1# X#11 1111 11# X#11 1111 11# X#11 1111 11# X#A1 1A# X#111 11 111# X#H11 11 11H# X#111 11 111# X#1R R1# X#1111111111# X#1111441111# X#1114114111# X#S11111111S# X#011 110# X#D11 ^# 11D# X#011 110# X#S11111111S# X#1114114111# X#1111441111# X#1111111111# X#1R R1# X#111 11 111# X#111 11 111# X#111 11 111# X##1 1## X#S11111111S# X# # X# # X# # X# # X# # X# # X# # X# # X# \ END_OF_FILE if test 572 -ne `wc -c <'STAGES/stage17'`; then echo shar: \"'STAGES/stage17'\" unpacked with wrong size! fi # end of 'STAGES/stage17' fi if test -f 'STAGES/stage18' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'STAGES/stage18'\" else echo shar: Extracting \"'STAGES/stage18'\" \(576 characters\) sed "s/^X//" >'STAGES/stage18' <<'END_OF_FILE' XButterfly X30 100 X#####AA##### X# # X# 0 #11# 0 # X#2# # # #2# X# # #11# # # X# # #11# # # X#2 # # 2# X# # #11# # # X# # #11# # # X#2# # # #2# X# #11# # X# S #11# S # X#2D # # D2# X# S #11# S # X# #11# # X#2# # # #2# X# # #11# # # X# # #11# # # X#2 # # 2# X# 0 #jj# 0 # X# # #EU# # # X# #5#II#5# # X# #^## # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X X# # X### ## ##\ END_OF_FILE if test 576 -ne `wc -c <'STAGES/stage18'`; then echo shar: \"'STAGES/stage18'\" unpacked with wrong size! fi # end of 'STAGES/stage18' fi if test -f 'STAGES/stage19' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'STAGES/stage19'\" else echo shar: Extracting \"'STAGES/stage19'\" \(572 characters\) sed "s/^X//" >'STAGES/stage19' <<'END_OF_FILE' XSpider X90 90 X############ X#G IIII U# X# R II R # X# R R # X# R R # X#d RR d# X# # X# # X# LL # X#2222222222# X#2222222222# X# 4 4 4 4 # X#2222222222# X#2222222222# X# aa # X# 88 SS 88 # X# LL # X#2222222222# X#2222222222# X# # X# RR RR # X# R R # X# SS # X# R R # X# WW 66 WW # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X X ## \# END_OF_FILE if test 572 -ne `wc -c <'STAGES/stage19'`; then echo shar: \"'STAGES/stage19'\" unpacked with wrong size! fi # end of 'STAGES/stage19' fi if test -f 'STAGES/stage2' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'STAGES/stage2'\" else echo shar: Extracting \"'STAGES/stage2'\" \(579 characters\) sed "s/^X//" >'STAGES/stage2' <<'END_OF_FILE' XSwiss_Cheese X40 400 X##e###P##e## X#1111111111# X#L11111111L# X#1111111111# X#222E22U222# X# # X#2222222222# X#1111111111# X#1111111111# X#1111111111# X#1111111111# X# # X# # X# # X# # X#A ^# X#5432112345# X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X/## ### END_OF_FILE if test 579 -ne `wc -c <'STAGES/stage2'`; then echo shar: \"'STAGES/stage2'\" unpacked with wrong size! fi # end of 'STAGES/stage2' fi if test -f 'STAGES/stage20' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'STAGES/stage20'\" else echo shar: Extracting \"'STAGES/stage20'\" \(574 characters\) sed "s/^X//" >'STAGES/stage20' <<'END_OF_FILE' XGrizzly X99 999 X############ X# II II # X# # X# jedccdej # X# eaabbaae # X# daL11Gad # X# caA11Aac # X# baaaaaab # X# abc11cba # X# # X# # X#R R# X# # # # X# % % # X# # X# # X# # X# # X# # X# # X# ^\ # X# S S # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # END_OF_FILE if test 574 -ne `wc -c <'STAGES/stage20'`; then echo shar: \"'STAGES/stage20'\" unpacked with wrong size! fi # end of 'STAGES/stage20' fi if test -f 'STAGES/stage21' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'STAGES/stage21'\" else echo shar: Extracting \"'STAGES/stage21'\" \(574 characters\) sed "s/^X//" >'STAGES/stage21' <<'END_OF_FILE' XTermite X32 280 X############ X#AIIICXIIIA# X#I# I# X# 1 1 1 # X#T S S # X# S MDS # X#1 % 1# X# % M% R# X# S % # X# 1 1 # X# % S D # X#R D % % # X#1 T% 1# X# S S # X# S 1S # X#1 # #1# X# # # # X#c b b c# X# # X# # X# % % # X# # X#R %% R# X# # X# ^ # # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X X X# # X# # X # # X X# ## \ END_OF_FILE if test 574 -ne `wc -c <'STAGES/stage21'`; then echo shar: \"'STAGES/stage21'\" unpacked with wrong size! fi # end of 'STAGES/stage21' fi if test -f 'STAGES/stage22' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'STAGES/stage22'\" else echo shar: Extracting \"'STAGES/stage22'\" \(574 characters\) sed "s/^X//" >'STAGES/stage22' <<'END_OF_FILE' XGiraffe X45 350 X#####AA##### X#II I11I II# X# II II II # X# ## %% ## # X# 3 ee 3 # X# ## # X# 2 #S 2 # X# ## # X# 1 S# 1 # X# ## # X# T #S T # X# ## # X# 1 S# 1 # X# ## # X# 2 #S 2 # X# ## # X# 3 S# 3 # X# ## # X# R ^# R # X# # X# 33 # X# 2 2 # X# 2 2 # X# 2 2 # X#3 22 3# X# 2 2 # X# 2 2 # X# 2 2 # X# 33 # X# a a # X#0MMMMMMMM0# X# # X# \ X# # X# # X# # X# # X# # X# # X# # X# # X# # X#a a cc a a# END_OF_FILE if test 574 -ne `wc -c <'STAGES/stage22'`; then echo shar: \"'STAGES/stage22'\" unpacked with wrong size! fi # end of 'STAGES/stage22' fi if test -f 'STAGES/stage23' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'STAGES/stage23'\" else echo shar: Extracting \"'STAGES/stage23'\" \(571 characters\) sed "s/^X//" >'STAGES/stage23' <<'END_OF_FILE' XSwan X70 300 X#SSSSSSSSSS# X#IIIIIIIIII# X#IIIIIIIIII# X#II c c II# X#IIc cII# X#II II# X#II 55 II# X#II II# X#II II# X#II ^\ II# X#II II# X#II II# X#II II# X#II II# X#I I# X# 9 M M 9 # X#9 M M 9# X# M M # X#C C# X# 1 1 # X# # X# 1 1 # X# # X# 1 1 # X#W aa W# X#A 1 DL 1 A# X# aa # X# 1 1 # X# # X# 1 1 # X# # X# 1 1 # X# # X# 1 1 # X# # X# 1 1 # X# # X# 1 1 # X# # X# 1 1 # X# 11 # X# 2222 # X#1e2H33X2e1# END_OF_FILE if test 571 -ne `wc -c <'STAGES/stage23'`; then echo shar: \"'STAGES/stage23'\" unpacked with wrong size! fi # end of 'STAGES/stage23' fi if test -f 'STAGES/stage3' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'STAGES/stage3'\" else echo shar: Extracting \"'STAGES/stage3'\" \(571 characters\) sed "s/^X//" >'STAGES/stage3' <<'END_OF_FILE' XWasp X40 200 X############ X#C11111111C# X# 11111111 # X# 1SU9DUS1 # X# 222LL222 # X# # X# 22222222 # X# 11111111 # X# 11111111 # X# 111^9111 # X# 11111111 # X# # X# # X#A A# X# # X# # X# # X# # X# # X/A A# X# # X# WWWW # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X### ### END_OF_FILE if test 571 -ne `wc -c <'STAGES/stage3'`; then echo shar: \"'STAGES/stage3'\" unpacked with wrong size! fi # end of 'STAGES/stage3' fi if test -f 'STAGES/stage4' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'STAGES/stage4'\" else echo shar: Extracting \"'STAGES/stage4'\" \(573 characters\) sed "s/^X//" >'STAGES/stage4' <<'END_OF_FILE' XBaboon X40 400 X############ X#1111111111# X#1222222221# X#1211111121# X#121 121# X#121 ^# 121# X#121 121# X#1211111121# X#1222222221# X#1111111111# X#%%%%SS%%%%# X# jA # X# \ X# # X# aa # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X## # # ## END_OF_FILE if test 573 -ne `wc -c <'STAGES/stage4'`; then echo shar: \"'STAGES/stage4'\" unpacked with wrong size! fi # end of 'STAGES/stage4' fi if test -f 'STAGES/stage5' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'STAGES/stage5'\" else echo shar: Extracting \"'STAGES/stage5'\" \(570 characters\) sed "s/^X//" >'STAGES/stage5' <<'END_OF_FILE' XOwl X40 400 X############ X# 5 44 5 # X#6 6# X# c c # X#7 7# X# 33 # X#8 8# X# UL # X#9 9# X# # X# # X#IIIIIIIIII# X#IIIIIIIIII# X#IIIIIIIIII# X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X X# # X## #\ ## END_OF_FILE if test 570 -ne `wc -c <'STAGES/stage5'`; then echo shar: \"'STAGES/stage5'\" unpacked with wrong size! fi # end of 'STAGES/stage5' fi if test -f 'STAGES/stage6' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'STAGES/stage6'\" else echo shar: Extracting \"'STAGES/stage6'\" \(576 characters\) sed "s/^X//" >'STAGES/stage6' <<'END_OF_FILE' XRhinoceros X60 80 X############ X#IeIIIIIIeI# X#IIIITUIIII# X#I IIIIII I# X#IIIISSIIII# X#II IIII II# X#RIII IIIR# X#IIIIIIIIII# X#9999999999# X# # X# # X# # X# # X# # X# # X# ^\ # X# # X# # X# # X# # X# # X# # X# # X# # X# da ad # X# MM MM # X# aa aa # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X#AA aa AA# END_OF_FILE if test 576 -ne `wc -c <'STAGES/stage6'`; then echo shar: \"'STAGES/stage6'\" unpacked with wrong size! fi # end of 'STAGES/stage6' fi if test -f 'STAGES/stage7' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'STAGES/stage7'\" else echo shar: Extracting \"'STAGES/stage7'\" \(572 characters\) sed "s/^X//" >'STAGES/stage7' <<'END_OF_FILE' XTiger X20 200 X############ X# 11 # X# # X#D T# X#1D GG T1# X#D WLLW T# X#I# #I# X## ## X# \ X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X#S aa S# X##S SS S## X#S S# X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # END_OF_FILE if test 572 -ne `wc -c <'STAGES/stage7'`; then echo shar: \"'STAGES/stage7'\" unpacked with wrong size! fi # end of 'STAGES/stage7' fi if test -f 'STAGES/stage8' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'STAGES/stage8'\" else echo shar: Extracting \"'STAGES/stage8'\" \(576 characters\) sed "s/^X//" >'STAGES/stage8' <<'END_OF_FILE' XCentipede X99 100 X############ X#A PX A# X#S 0 S# X#S 0 S# X#S 0 S# X#S 0 S# X#S 0 S# X#S S# X#IIIIIIIIII# X# 111111 # X#T22222222L# X# 111111 # X### ### X# # # # X# # X# # X# # X# # X## ## X# # X# # X# # X# # X# # X# # X# # X#W W W W W # X# W W W W W# X#W W ^ W W # X# W W W W W# X# # X# # X# # X# # X# # X# # X# # X# \ X X X X X# # END_OF_FILE if test 576 -ne `wc -c <'STAGES/stage8'`; then echo shar: \"'STAGES/stage8'\" unpacked with wrong size! fi # end of 'STAGES/stage8' fi if test -f 'STAGES/stage9' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'STAGES/stage9'\" else echo shar: Extracting \"'STAGES/stage9'\" \(573 characters\) sed "s/^X//" >'STAGES/stage9' <<'END_OF_FILE' XJaguar X30 300 X############ X#3 # # X# 3 # e # X#1 3 % # X# 1 3 % # X#1 1 3 # # X# 1 1 3 ## X#1 1 1 3 # X# 1 1 1 3 # X#1 1 1 1 3 # X# 1 1 L 1 3# X#1 1 1 1 1 # X# 1 1 1 1 1# X#S 1 1 1 1 # X# 1 1 1 1# X# 1 1 1 # X# 1 1 1# X# 1 1 # X# 1 1# X# 1 # X# 1# X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# # X# \ X X# # X# # X# # END_OF_FILE if test 573 -ne `wc -c <'STAGES/stage9'`; then echo shar: \"'STAGES/stage9'\" unpacked with wrong size! fi # end of 'STAGES/stage9' fi if test -f 'blockbuster.SKEL' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'blockbuster.SKEL'\" else echo shar: Extracting \"'blockbuster.SKEL'\" \(1598 characters\) sed "s/^X//" >'blockbuster.SKEL' <<'END_OF_FILE' X#!/bin/csh -f X# X# game: blockbuster X#> to be adjusted to meet local demands and X#> to be put somewhere in the path, e.g. as /usr/games/blockbuster X### $1: [optionally] name of play ground X### either a privately owned directory, X### or the name of one of the public play grounds X### (default: anonymous public) X# X# ENV. MTYPE machine type X# [will be determined locally, if necessary] X X# public play grounds X#>set BBstg = /usr/games/blockbuster.lib X# executables X#>set BBexe = /usr/games/blockbuster.lib X X# DETERMINE MTYPE: X#> should be replaced by a somewhat less ad hoc procedure X#> ('arch (1)', unfortunately, is rather untrustworthy out here) Xif (! $?MTYPE) then X if { /bin/sun3 } then X set MTYPE = "sun" X else if { /bin/sun4c } then X set MTYPE = "sparc" X else X echo ">> unknown machine type" X exit(1) X endif Xendif X X# SET DIRECTORY: Xswitch ("$1") Xcase "-": X # list public play grounds X cd $BBstg X goto LIST Xcase "": Xcase "-*": X # no argument, or sunview-options only => anonymous public play ground X cd $BBstg/STAGES X breaksw Xdefault: X if (-d "$1") then X # private play ground X cd $1 X else X # public play ground X cd $BBstg X if (! -d STAGES.$1 ) then X echo ">> unknown play ground" X goto LIST X endif X cd STAGES.$1 X endif X shift Xendsw X X# BLOCKBUSTER: X$BBexe/blockbuster.$MTYPE.exe $* Xexit(0) X XLIST: Xecho "use no name (the anonymous public play ground ), any of:" Xls -1 -d STAGES.* | sed -e 's/^STAGES.\(.*\)$/ "\1"/' Xecho "or the name of a privately owned directory" Xexit(1) END_OF_FILE if test 1598 -ne `wc -c <'blockbuster.SKEL'`; then echo shar: \"'blockbuster.SKEL'\" unpacked with wrong size! fi # end of 'blockbuster.SKEL' fi if test -f 'blockbuster.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'blockbuster.c'\" else echo shar: Extracting \"'blockbuster.c'\" \(5913 characters\) sed "s/^X//" >'blockbuster.c' <<'END_OF_FILE' X/* X * The blockbuster game for Sun running Sunview. X * Appearance ONLY shamelessly stolen from the real video game, X * wonderfully written by someone somewhere (I haven't got the foggiest). X * X * Move mouse to move pallet and keep the ball on the stage. X * X * Stages are built from various building blocks, some of which are based on X * recollection from analogous blocks in the video game, others, in particular X * the interesting ones, are new. X * X * The stages can be defined from the ascii map codes using any text editor. X * They must be numbered consecutively from 0 with the total number X * (i.e., one more than the highest number) available in the file nb_stages. X * X * -- Eric Van Gestel (ericvg@cs.kuleuven.ac.be) X */ X X#include "blockbuster.h" X#include X#include X#include X Xshort blockbuster_icon_image[] = { X#include "icons/blockbuster.icon" X}; X XDEFINE_ICON_FROM_IMAGE( blockbuster_icon, blockbuster_icon_image ); X X X/*** signal handling ***/ Xcatch( sig ) X{ X stop_timer( ); X if ( sig == SIGXCPU ) { X perror( "CPU timelimit exceeded. Go home and eat dinner" ); X start_timer( ); X return; X } X if ( sig == SIGSEGV ) X perror( "Segmentation fault" ); X else /* SIGBUS */ X perror( "Bus Error" ); X abort( ); X} X X X/*** assure repainting does not consume time ***/ Xint ( *old_repaint ) ( ); X Xrepaint( args ) X{ X stop_timer( ); X ( *old_repaint ) ( &args ); X start_timer( ); X} X X X/*** event interposer: assure closing brings blockbuster to a halt ***/ XNotify_value Xopen_close( frm, event, arg, type ) X Frame frm; X Event *event; X Notify_arg arg; X Notify_event_type type; X{ X int was_closed, is_closed; X Notify_value value; X X /* determine previous state */ X was_closed = ( int ) window_get( frm, FRAME_CLOSED ); X /* handle event */ X value = notify_next_event_func( frm, event, arg, type ); X /* determine current state */ X is_closed = ( int ) window_get( frm, FRAME_CLOSED ); X /* start/stop timer (if different) */ X if ( was_closed != is_closed ) { X if ( is_closed ) { X stop_timer( ); X } else { X start_timer( ); X } X } X return ( value ); X} X X X/*** blockbuster ***/ Xmain( argc, argv ) X int argc; X char *argv[]; X X{ X Cursor cursor; X FILE *fd; X int crosshairs = FALSE; X X ( void ) signal( SIGBUS, catch ); X ( void ) signal( SIGSEGV, catch ); X ( void ) signal( SIGXCPU, catch ); X X /* who am i ? ['cuserid(3S)' is fooled by 'su(1)'] */ X login = getpwuid( getuid( ) )->pw_name; X X /* open font */ X if ( !( font = pf_open( FONT_R16 ) ) && !( font = pf_default( ) ) ) { X perror( "Can't open font" ); X exit( 1 ); X } X /* creating frame and subwindows */ X frame = window_create( NULL, FRAME, X FRAME_LABEL, "blockbuster", X WIN_X, 250, WIN_Y, 10, X FRAME_ICON, &blockbuster_icon, X FRAME_ARGC_PTR_ARGV, &argc, argv, X FRAME_NO_CONFIRM, TRUE, X FRAME_SUBWINDOWS_ADJUSTABLE, FALSE, X 0 ); X ( void ) notify_interpose_event_func( frame, open_close, NOTIFY_SAFE ); X X msg_cvs = window_create( frame, CANVAS, X WIN_HEIGHT, MSG_HEIGHT, X 0 ); X msg_win = canvas_pixwin( msg_cvs ); X X stage_cvs = window_create( frame, CANVAS, X WIN_BELOW, msg_cvs, X WIN_HEIGHT, STAGE_HEIGHT_IN_PIXELS, X WIN_WIDTH, STAGE_WIDTH_IN_PIXELS, X WIN_EVENT_PROC, move_pallet, X WIN_CONSUME_PICK_EVENTS, WIN_NO_EVENTS, X LOC_MOVE, LOC_STILL, MS_LEFT, MS_MIDDLE, MS_RIGHT, KEY_RIGHT( 1 ), 0, X 0 ); X stage_win = canvas_pixwin( stage_cvs ); X window_set( stage_cvs, CANVAS_FAST_MONO, TRUE, 0 ); X cursor = window_get( stage_cvs, WIN_CURSOR ); X cursor_set( cursor, X CURSOR_SHOW_CURSOR, FALSE, X /* X * CURSOR_SHOW_HORIZ_HAIR, TRUE, CURSOR_HORIZ_HAIR_LENGTH, 12, X * CURSOR_HORIZ_HAIR_THICKNESS, 3, CURSOR_HORIZ_HAIR_BORDER_GRAVITY, X * TRUE, ** for some reason this won't work *** ** WORKAROUND: q.v. X * balls_pallet.c ** X *//* */ X 0 ); X window_set( stage_cvs, WIN_CURSOR, cursor, 0 ); X X window_fit( frame ); X X /* set timeless repaint */ X old_repaint = ( int ( * ) ( ) ) window_get( frame, CANVAS_REPAINT_PROC ); X window_set( frame, CANVAS_REPAINT_PROC, repaint, 0 ); X X /* initialize random (used to determine next stage_nb) */ X srandom( time( 0 ) ); X X get_playground( argc, argv ); X X /* and off we go */ X start_up( ); X ball1.quadrant = ball2.quadrant = ball3.quadrant = 0; X X /* main loop to read input */ X window_main_loop( frame ); X exit( 0 ); X} X Xget_playground( argc, argv ) Xint argc; Xchar *argv[]; X{ X DIR *dirp; X struct direct *dp; X struct stat st; X int len, found; X X /* set default playground directory */ X strcpy( playground, STAGEDIR ); X strcat( playground, "/" ); X /* check for additional arguments (specific playground) */ X if ( argc > 1 ) { X if ( argv[1][0] == '-' ) { X /* list available playgrounds */ X printf( "available playgrounds are:\n" ); X printf( "\tdefault\n" ); X dirp = opendir(STAGEDIR); X for( dp=readdir( dirp ); dp!=NULL; dp=readdir( dirp ) ) { X if ( !strncmp( dp->d_name, "STAGES.", 7 ) ) X printf( "\t%s\n", (dp->d_name)+7 ); X } X closedir( dirp ); X exit( 0 ); X } X /* it's a playground name or private directory */ X if( !strcmp( argv[1], "default" ) ) { X /* just in case someone used default */ X strcat( playground, "STAGES" ); X return; X } X found = 0; X len = strlen( argv[1] ); X dirp = opendir( STAGEDIR ); X for( dp=readdir( dirp ); dp!=NULL; dp=readdir( dirp ) ) { X if ( dp->d_namlen == len+7 && X !strcmp( (dp->d_name)+7, argv[1] ) ) { X found++; X break; X } X } X closedir( dirp ); X if ( found ) X strcat( playground, dp->d_name ); X else { X /* private dir */ X strcpy( playground, argv[1] ); X stat( playground, &st ); X if( !(st.st_mode & S_IFDIR) ) { X printf( "private playground <%s> not a directory.\n", X playground ); X exit( 1 ); X } X } X } else { X strcat( playground, "STAGES" ); X } X} END_OF_FILE if test 5913 -ne `wc -c <'blockbuster.c'`; then echo shar: \"'blockbuster.c'\" unpacked with wrong size! fi # end of 'blockbuster.c' fi if test -f 'deflection.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'deflection.c'\" else echo shar: Extracting \"'deflection.c'\" \(2914 characters\) sed "s/^X//" >'deflection.c' <<'END_OF_FILE' X/* X * File: deflection.c X * Author: Eric Van Gestel X * X * For: blockbuster X * X * Implementation: X * Simple horizontal and vertical deflection only changes the quadrant, X * reversing motion along the y and x axes respectively. X * Deflection from the convex pallet is a function of excentricity, X * as well as of incoming angle (given a sliding of the edge effect). X */ X X#include "blockbuster.h" X Xvoid Xbrick_deflection( hit, ball ) X register int hit; /* enumeration { HORIZONTAL, VERTICAL } */ X register struct Ball *ball; X{ X if ( hit == HORIZONTAL ) { X switch ( ball->quadrant ) { X case NE: X ball->quadrant = SE; X break; X case NW: X ball->quadrant = SW; X break; X case SW: X ball->quadrant = NW; X break; X case SE: X ball->quadrant = NE; X } X ball->y_speed = -( ball->y_speed ); X } else { /* VERTICAL */ X switch ( ball->quadrant ) { X case NE: X ball->quadrant = NW; X break; X case NW: X ball->quadrant = NE; X break; X case SW: X ball->quadrant = SE; X break; X case SE: X ball->quadrant = SW; X }; X ball->x_speed = -( ball->x_speed ); X } X} X Xvoid Xpallet_deflection( ball ) X register struct Ball *ball; X{ X double excentricity, true_angle; X X switch ( ball->quadrant ) { X case SW: X excentricity = ball->x - pallet_x; X break; X case SE: X excentricity = pallet_x - ball->x; X break; X default: X return; /* bouncing up from below */ X }; X ball->angle -= 2 * atan2( excentricity, pallet_height ); X X if ( ball->angle > -M_PI_4 ) X ball->quadrant = ( ball->quadrant == SW ) ? NW X /* SE */ : NE; X else { /* rebound */ X ball->angle = -M_PI_2 - ball->angle; X ball->quadrant = ( ball->quadrant == SW ) ? NE X /* SE */ : NW; X }; X X /* X * avoid downward slide offs as well as infinite horizontal bounce X * loops X */ X if ( ball->angle > NEAR_HORIZONTAL ) X ball->angle = NEAR_HORIZONTAL; X X true_angle = ( ball->quadrant == NE ) ? M_PI_4 - ball->angle X /* NW */ : M_PI_3_4 + ball->angle; X ball->x_speed = ball->speed * cos( true_angle ); X ball->y_speed = ball->speed * -sin( true_angle ); X} X X#ifdef DEBUG_PDEFL Xmain( ) X{ X pallet_xI = 0; X pallet_x = 0; X printf( "\npallet_length & pallet_height: " ); X scanf( "%d%d", &pallet_lengthI, &pallet_heightI ); X pallet_length = ( double ) pallet_lengthI; X pallet_height = ( double ) pallet_heightI; X if ( pallet_lengthI > 0 && pallet_heightI > pallet_lengthI ) X for ( ;; ) { X printf( "\nquadrant, in angle & excentricity: " ); X scanf( "%d%lf%lf", &ball1.quadrant, &ball1.angle, &ball1.x ); X if ( ball1.quadrant < 1 || ball1.quadrant > 4 || X ball1.angle < -45 || ball1.angle > 45 || X ball1.x < -pallet_length || ball1.x > pallet_length ) X break; X ball1.angle = ( ball1.angle / 45 ) * M_PI_4; X pallet_deflection( &ball1 ); X ball1.angle = ( ball1.angle * 45 ) / M_PI_4; X printf( "==> quadrant: %d angle: %f\n", ball1.quadrant, ball1.angle ); X }; X} X#endif DEBUG_PDEFL END_OF_FILE if test 2914 -ne `wc -c <'deflection.c'`; then echo shar: \"'deflection.c'\" unpacked with wrong size! fi # end of 'deflection.c' fi if test -f 'icons/blockbuster.icon' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'icons/blockbuster.icon'\" else echo shar: Extracting \"'icons/blockbuster.icon'\" \(1933 characters\) sed "s/^X//" >'icons/blockbuster.icon' <<'END_OF_FILE' X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16 X */ X 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF, X 0xC000,0x0000,0x0000,0x0003,0xC000,0x0000,0x0000,0x0003, X 0xC000,0x0000,0x0000,0x0003,0xFFFF,0xFFFF,0xFFFF,0xFFFF, X 0xFF86,0x1EF5,0x8778,0x61FF,0xFF86,0x1DEB,0x87B8,0x61FF, X 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xE1FE,0x1EE1,0xD778,0x7F87, X 0xE1FE,0x1DE1,0xAFB8,0x7F87,0xFFFF,0xFFFF,0xFFFF,0xFFFF, X 0xC000,0x0000,0x0000,0x0003,0xC000,0x0000,0x0000,0x0003, X 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xE196,0x5875,0x861A,0x6987, X 0xE1A6,0x986B,0x8619,0x6587,0xFFFF,0xFFFF,0xFFFF,0xFFFF, X 0xEBFE,0x5861,0xD61A,0x7FD7,0xF5FE,0x9861,0xAE19,0x7FAF, X 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xE187,0xF875,0x861F,0xE187, X 0xE187,0xF86B,0x861F,0xE187,0xFFFF,0xFFFF,0xFFFF,0xFFFF, X 0xEB86,0x5FE1,0xD7FA,0x61D7,0xF586,0x9FE1,0xAFF9,0x61AF, X 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xE186,0x5875,0x861A,0x6187, X 0xE186,0x986B,0x8619,0x6187,0xFFFF,0xFFFF,0xFFFF,0xFFFF, X 0xC020,0x0000,0x0000,0x0203,0xC050,0x0000,0x0000,0x0503, X 0xC088,0x0000,0x0000,0x0883,0xC100,0x0000,0x0000,0x1043, X 0xC202,0x0000,0x0000,0x2023,0xC400,0x0000,0x0000,0x4013, X 0xC800,0x8000,0x0000,0x800B,0xD000,0x0000,0x0001,0x0007, X 0xE000,0x2000,0x0002,0x000B,0xD000,0x0000,0x0004,0x0013, X 0xC800,0x0000,0x0008,0x0023,0xC400,0x0000,0x0010,0x0043, X 0xC200,0x0000,0x0020,0x0083,0xC100,0x0000,0x0040,0x0103, X 0xC080,0x0000,0x0080,0x0203,0xC040,0x0000,0x0100,0x0403, X 0xC020,0x0000,0x0200,0x1003,0xC010,0x0000,0x0400,0x3803, X 0xC008,0x0000,0x0800,0x1003,0xC004,0x0000,0x1000,0x0003, X 0xC002,0x0000,0x2000,0x0003,0xC001,0x0000,0x4000,0x0003, X 0xC000,0x8000,0x8000,0x0003,0xC000,0x4001,0x0000,0x0003, X 0xC000,0x2002,0x0000,0x0003,0xC000,0x1004,0x0000,0x0003, X 0xC000,0x0808,0x0000,0x0003,0xC000,0x0410,0x0000,0x0003, X 0xC000,0x0220,0x0000,0x0003,0xC000,0x0140,0x0000,0x0003, X 0xC000,0x0080,0x0000,0x0003,0xC000,0x07FF,0x8000,0x0003, X 0xFFC0,0x0400,0x8000,0x03FF,0xFFC0,0x07FF,0x8000,0x03FF END_OF_FILE if test 1933 -ne `wc -c <'icons/blockbuster.icon'`; then echo shar: \"'icons/blockbuster.icon'\" unpacked with wrong size! fi # end of 'icons/blockbuster.icon' fi if test -f 'icons/brick_S.pr' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'icons/brick_S.pr'\" else echo shar: Extracting \"'icons/brick_S.pr'\" \(542 characters\) sed "s/^X//" >'icons/brick_S.pr' <<'END_OF_FILE' X/* Format_version=1, Width=64, Height=16, Depth=1, Valid_bits_per_item=16 X */ X 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8000,0x0000,0x0000,0x0001, X 0xBFFF,0xFFFF,0xFFFF,0xFFFD,0xA000,0x0000,0x0000,0x0005, X 0xAFFF,0xFFFF,0xFFFF,0xFFF5,0xA800,0x0000,0x0000,0x0015, X 0xABFF,0xFFFF,0xFFFF,0xFFD5,0xAA22,0x2222,0x2222,0x2255, X 0xAA88,0x8888,0x8888,0x88D5,0xABFF,0xFFFF,0xFFFF,0xFFD5, X 0xA800,0x0000,0x0000,0x0015,0xAFFF,0xFFFF,0xFFFF,0xFFF5, X 0xA000,0x0000,0x0000,0x0005,0xBFFF,0xFFFF,0xFFFF,0xFFFD, X 0x8000,0x0000,0x0000,0x0001,0xFFFF,0xFFFF,0xFFFF,0xFFFF, END_OF_FILE if test 542 -ne `wc -c <'icons/brick_S.pr'`; then echo shar: \"'icons/brick_S.pr'\" unpacked with wrong size! fi # end of 'icons/brick_S.pr' fi if test -f 'icons/brick_j.pr' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'icons/brick_j.pr'\" else echo shar: Extracting \"'icons/brick_j.pr'\" \(541 characters\) sed "s/^X//" >'icons/brick_j.pr' <<'END_OF_FILE' X/* Format_version=1, Width=64, Height=16, Depth=1, Valid_bits_per_item=16 X */ X 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF, X 0xEAAA,0xAAAA,0xAAAA,0xAAAB,0xD555,0x5400,0x0015,0x5557, X 0xEAAA,0xA9FF,0xFFAA,0xAAAB,0xD555,0x55DE,0x7995,0x5557, X 0xEAAA,0xA99D,0xB6AA,0xAAAB,0xD555,0x55DD,0x3495,0x5557, X 0xEAAA,0xA9DC,0xB2AA,0xAAAB,0xD555,0x55DD,0xB695,0x5557, X 0xEAAA,0xA98E,0x79AA,0xAAAB,0xD555,0x55FF,0xFF95,0x5557, X 0xEAAA,0xA800,0x002A,0xAAAB,0xD555,0x5555,0x5555,0x5557, X 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF END_OF_FILE if test 541 -ne `wc -c <'icons/brick_j.pr'`; then echo shar: \"'icons/brick_j.pr'\" unpacked with wrong size! fi # end of 'icons/brick_j.pr' fi if test -f 'icons/launchNE.pr' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'icons/launchNE.pr'\" else echo shar: Extracting \"'icons/launchNE.pr'\" \(541 characters\) sed "s/^X//" >'icons/launchNE.pr' <<'END_OF_FILE' X/* Format_version=1, Width=64, Height=16, Depth=1, Valid_bits_per_item=16 X */ X 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF, X 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFC7, X 0xFFFF,0xFFFF,0xFFFF,0xFFE7,0xFFFF,0xFFFF,0xFFFF,0xFFD7, X 0xFFFF,0xFFFF,0xFFFF,0xFFBF,0xFFFF,0xFFFF,0xFFFF,0xFF7F, X 0xFFFF,0xFFFF,0xFFFF,0xFEFF,0xFFFF,0xFFFF,0xFFFF,0xFDFF, X 0xFFFF,0xFFFF,0xFFFF,0xFBFF,0xFFFF,0xFFFF,0xFFFF,0xF7FF, X 0xFFFF,0xFFFF,0xFFFF,0xEFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF, X 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF END_OF_FILE if test 541 -ne `wc -c <'icons/launchNE.pr'`; then echo shar: \"'icons/launchNE.pr'\" unpacked with wrong size! fi # end of 'icons/launchNE.pr' fi if test -f 'icons/launchNW.pr' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'icons/launchNW.pr'\" else echo shar: Extracting \"'icons/launchNW.pr'\" \(541 characters\) sed "s/^X//" >'icons/launchNW.pr' <<'END_OF_FILE' X/* Format_version=1, Width=64, Height=16, Depth=1, Valid_bits_per_item=16 X */ X 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF, X 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xE3FF,0xFFFF,0xFFFF,0xFFFF, X 0xE7FF,0xFFFF,0xFFFF,0xFFFF,0xEBFF,0xFFFF,0xFFFF,0xFFFF, X 0xFDFF,0xFFFF,0xFFFF,0xFFFF,0xFEFF,0xFFFF,0xFFFF,0xFFFF, X 0xFF7F,0xFFFF,0xFFFF,0xFFFF,0xFFBF,0xFFFF,0xFFFF,0xFFFF, X 0xFFDF,0xFFFF,0xFFFF,0xFFFF,0xFFEF,0xFFFF,0xFFFF,0xFFFF, X 0xFFF7,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF, X 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF END_OF_FILE if test 541 -ne `wc -c <'icons/launchNW.pr'`; then echo shar: \"'icons/launchNW.pr'\" unpacked with wrong size! fi # end of 'icons/launchNW.pr' fi if test -f 'save.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'save.c'\" else echo shar: Extracting \"'save.c'\" \(1543 characters\) sed "s/^X//" >'save.c' <<'END_OF_FILE' X/* X * File: save.c X * Author: Eric Van Gestel X * X * For: blockbuster X */ X X#include "blockbuster.h" X Xvoid Xstart_up( ) X{ X FILE *fd; X char sve[SAVEFILE_LENGTH]; X register int stage_nb_tmp; X X if ( fd = fopen( sprintf( sve, SAVEFILE, playground, login ), X "r+" ) ) { X /* restoring save file */ X msg0( OFFSET_BALLS, "Restoring...%43c", ' ' ); X fscanf( fd, "%d:%d::%d:%d::%d:%lf\n", X &score, &balls_left, X &nb_stages, &stage_nb, X &pallet_modif, &launch_speed ); X for ( stage_nb_tmp = 0; stage_nb_tmp < MAX_NB_STAGES; ) X fscanf( fd, "%1d", &stages[stage_nb_tmp++] ); X fclose( fd ); X /* remove save file */ X unlink( sve ); X /* restart stage chosen when saved */ X get_stage( ); X } else { X /* no save file */ X score = 0; X balls_left = INIT_BALLS; X pallet_modif = 0; X launch_speed = INIT_SPEED; X nb_stages = 0; X for ( stage_nb_tmp = 0; stage_nb_tmp < MAX_NB_STAGES; ) X stages[stage_nb_tmp++] = FALSE; X /* start some stage */ X new_stage( ); X } X} X Xvoid Xsave( ) X{ X FILE *fd; X char sve[SAVEFILE_LENGTH]; X register int stage_nb_tmp = 0; X X if ( !( fd = fopen( sprintf( sve, SAVEFILE, playground, login ), X "w" ) ) ) { X perror( "Can't open save file" ); X exit( 1 ); X } X fprintf( fd, "%d:%d::%d:%d::%d:%lf\n", X score, balls_left, X nb_stages, stage_nb, X pallet_modif, launch_speed ); X for ( stage_nb_tmp = 0; stage_nb_tmp < MAX_NB_STAGES; ) X fprintf( fd, "%1d", stages[stage_nb_tmp++] ); X close( fd ); X X show_score_board( ); /* BYE !! */ X} END_OF_FILE if test 1543 -ne `wc -c <'save.c'`; then echo shar: \"'save.c'\" unpacked with wrong size! fi # end of 'save.c' fi if test -f 'score.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'score.c'\" else echo shar: Extracting \"'score.c'\" \(5116 characters\) sed "s/^X//" >'score.c' <<'END_OF_FILE' X/* X * File: score.c X * Author: Eric Van Gestel X * X * For: blockbuster X * X * Implementation: X * Upto USER_SCORES scores are logged per user. X * The insertion low point (i.e., the entry that will disappear) is defined X * to be either the user's previous save entry, or his USER_SCORES'th entry X * or the last entry if neither exists. X * Sometimes saved scores may not be completed X * (e.g, if the game crashed or if the player Quit explicitly). X * Such entries are given a negative number of balls when detected X * (criterium: score not bettered). X */ X X#include "blockbuster.h" X Xstruct Score { X int score, balls_left; X char login[9]; X} score_board[NB_SCORES]; X Xvoid Xshow_score_board( ) X{ X register int lows, s, ns; X register int update = FALSE; X register int made_it = FALSE; X FILE *fd; X char buf[PATH_LENGTH]; X X /* clear stage */ X for ( s = 0; s < STAGE_WIDTH_IN_PIXELS; s++ ) X pw_vector( stage_win, s, 0, s, STAGE_HEIGHT_IN_PIXELS - 1, PIX_CLR, 1 ); X X /* initalize score board (in case it would be empty) */ X for ( s = 0; s < NB_SCORES; s++ ) { X score_board[s].score = 100; X score_board[s].balls_left = 0; X ( void ) strcpy( score_board[s].login, "computer" ); X } X X /* read the score file into the array */ X if ( !( fd = fopen( sprintf( buf, SCOREFILE, playground ), "r+" ) ) ) { X perror( "No score file" ); X exit( 1 ); X } X for ( s = 0; s < NB_SCORES; s++ ) { X fscanf( fd, "%d:%d:%s\n", &score_board[s].score, X &score_board[s].balls_left, X score_board[s].login ); X } X X /* find insertion low point */ X for ( lows = ns = 0; lows < NB_SCORES - 1; lows++ ) { X if ( !strcmp( score_board[lows].login, login ) ) { X if ( score_board[lows].balls_left > 0 ) { X if ( score_board[lows].score > score ) { X /* X * an older incomplete game: complete X * it X */ X score_board[lows].balls_left *= -1; X ns++; X update = TRUE; X } else X /* (presumably) the previous save */ X break; X } else X /* an older completed game */ X ns++; X if ( ns >= USER_SCORES ) X break; X } X } X X /* find insertion high point */ X for ( s = 0; s <= lows && score_board[s].score > score; s++ ); X X /* check to see if current score made it */ X if ( s <= lows ) { X /* yes it did , so shift smaller scores */ X for ( /* lows = lows */ ; lows > s; lows-- ) X score_board[lows] = score_board[lows - 1]; X score_board[s].score = score; X score_board[s].balls_left = balls_left; X ( void ) strcpy( score_board[s].login, login ); X update = TRUE; X made_it = TRUE; X } X /* write updated score board */ X if ( update ) { X rewind( fd ); X for ( s = 0; s < NB_SCORES; s++ ) { X fprintf( fd, "%d:%d:%s\n", score_board[s].score, X score_board[s].balls_left, X score_board[s].login ); X } X } X fclose( fd ); X X /* show score board */ X msg( 0, "Top Scores" ); X for ( s = 0; s < NB_SCORES; s++ ) X if ( score_board[s].balls_left > 99 ) { X msg( s + 2, sprintf( buf, "%7d (%3d) %8s ", X score_board[s].score, X score_board[s].balls_left, X score_board[s].login ) ); X } else if ( score_board[s].balls_left > 9 ) { X msg( s + 2, sprintf( buf, "%7d (%2d) %8s ", X score_board[s].score, X score_board[s].balls_left, X score_board[s].login ) ); X } else if ( score_board[s].balls_left > 0 ) { X msg( s + 2, sprintf( buf, "%7d (%1d) %8s ", X score_board[s].score, X score_board[s].balls_left, X score_board[s].login ) ); X } else if ( score_board[s].balls_left < -99 ) { X msg( s + 2, sprintf( buf, "%7d (%3d) + %8s ", X score_board[s].score, X -score_board[s].balls_left, X score_board[s].login ) ); X } else if ( score_board[s].balls_left < -9 ) { X msg( s + 2, sprintf( buf, "%7d (%2d) + %8s ", X score_board[s].score, X -score_board[s].balls_left, X score_board[s].login ) ); X } else if ( score_board[s].balls_left < 0 ) { X msg( s + 2, sprintf( buf, "%7d (%1d) + %8s ", X score_board[s].score, X -score_board[s].balls_left, X score_board[s].login ) ); X } else { /* no balls left */ X msg( s + 2, sprintf( buf, "%7d %8s ", X score_board[s].score, X score_board[s].login ) ); X } X X /* make sure the current score is on the board */ X if ( !made_it ) { X if ( balls_left > 99 ) { X msg( NB_SCORES + 3, sprintf( buf, "%7d (%3d) %8s ", X score, balls_left, login ) ); X } else if ( balls_left > 9 ) { X msg( NB_SCORES + 3, sprintf( buf, "%7d (%2d) %8s ", X score, balls_left, login ) ); X } else if ( balls_left ) { X msg( NB_SCORES + 3, sprintf( buf, "%7d (%1d) %8s ", X score, balls_left, login ) ); X } else { /* no balls left */ X msg( NB_SCORES + 3, sprintf( buf, "%7d <> %8s ", X score, login ) ); X } X } X /* show the current pallet shrinkage */ X msg( NB_SCORES + 5, sprintf( buf, "pallet >>> %2d %% <<<", X ( pallet_modif * 100 ) / PALLET_DENOMINATOR ) ); X X /* provide some time to read */ X sleep( 9 ); X exit( 0 ); /* BYE !! */ X} END_OF_FILE if test 5116 -ne `wc -c <'score.c'`; then echo shar: \"'score.c'\" unpacked with wrong size! fi # end of 'score.c' fi echo shar: End of archive 2 \(of 3\). cp /dev/null ark2isdone MISSING="" for I in 1 2 3 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 3 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