home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-04-27 | 41.6 KB | 1,350 lines |
- Newsgroups: comp.sources.x
- From: master@cats.UCSC.EDU (Mark Wedel)
- Subject: v19i049: xblockbuster - a variation of the break-out type games, Patch01
- Message-ID: <1993Mar23.163430.4974@sparky.imd.sterling.com>
- X-Md4-Signature: f146260e18873b517ed0de89e8449525
- Date: Tue, 23 Mar 1993 16:34:30 GMT
- Approved: chris@sparky.imd.sterling.com
-
- Submitted-by: master@cats.UCSC.EDU (Mark Wedel)
- Posting-number: Volume 19, Issue 49
- Archive-name: xblockbuster/patch01
- Environment: X11
- Patch-To: xblockbuster: Volume 19, Issue 44-48
-
-
- Here is the first patch for XBlockBuster, moving up to
- version 1.01.
-
- This patch doesn't add new features, but rather fixes problems for
- various machines. The list of changes is about 10 lines below.
-
- To apply this patch, cd to the directory which contains the
- source code (ie, *.c files), and do
-
- patch < (this file)
-
- you may optionally wish to use the -s flag of patch if you want
- it to work silently.
-
- Mark Wedel
- master@cats.ucsc.edu
-
- ----8<-----------------------8<----------------------8<------------------------
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then feed it
- # into a shell via "sh file" or similar. To overwrite existing files,
- # type "sh file -c".
- # Contents: xblockbuster.patch
- # Wrapped by chris@sparky on Tue Mar 23 10:20:34 1993
- PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
- echo If this archive is complete, you will see the following message:
- echo ' "shar: End of archive 1 (of 1)."'
- if test -f 'xblockbuster.patch' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xblockbuster.patch'\"
- else
- echo shar: Extracting \"'xblockbuster.patch'\" \(38741 characters\)
- sed "s/^X//" >'xblockbuster.patch' <<'END_OF_FILE'
- Xdiff -cr xblockbuster1.00/patchlevel.h xblockbuster1.01/patchlevel.h
- X*** xblockbuster1.00/patchlevel.h Fri Mar 12 23:48:29 1993
- X--- xblockbuster1.01/patchlevel.h Thu Mar 18 01:34:39 1993
- X***************
- X*** 1 ****
- X! #define VERSION "XBlockBuster 1.00"
- X--- 1 ----
- X! #define VERSION "XBlockBuster 1.01"
- Xdiff -cr xblockbuster1.00/CHANGES xblockbuster1.01/CHANGES
- X*** xblockbuster1.00/CHANGES Wed Mar 10 17:57:12 1993
- X--- xblockbuster1.01/CHANGES Sat Mar 20 03:26:53 1993
- X***************
- X*** 1,4 ****
- X! XBlockBuster v1.00:
- X
- X Converted to run under X11 instead of SunView.
- X
- X--- 1,33 ----
- X! Changes from v1.00 to v1.01
- X!
- X! Fixed the Imakefile so StageDir now works properly.
- X!
- X! PATHLENGTH (in xblockbuster.h) increased from 64 to 512
- X!
- X! sprintf is no longer assumed to return its first arguement (ANSI C it
- X! returns the number of characters transferred.) Thanks David Sanderson
- X!
- X! SysV/Ultrix support added (put -DSYSV in the define line in the Makefile/
- X! Imakefile). Thanks ykcheu@eos.ncsu.edu
- X!
- X! Added code so that XBlockBuster will hopefully work better on displays
- X! in which BlackPixel == 0 (Xor didn't work at all on those systems.)
- X!
- X! Moved FONT from the (I)Makefile to xblockbuster.h. The FONT, as
- X! defined, should work fine. Moved there because if a nice title screen
- X! is ever added, a different font will be used there, and I don't really
- X! want 2 or 3 font declarations on the compile line.
- X!
- X! Changed the XmbSetWMProperties to XSetWMProperties in xblockbuster.c. From
- X! the man page, it appears that the former is standard X11R5, but some
- X! systems don't have it, and XSetWMProperties does the job fine.
- X!
- X! Added RAND and SRAND defines to xblockbuster.h. Some machines don't
- X! seem to have the random and srandom functions. These macros should make
- X! it easier for these people to fix that problem.
- X!
- X! -----------------------------------------------------------------------------
- X! Changes from Sunview BlockBuster to XBlockBuster v1.00:
- X
- X Converted to run under X11 instead of SunView.
- X
- Xdiff -cr xblockbuster1.00/Imakefile xblockbuster1.01/Imakefile
- X*** xblockbuster1.00/Imakefile Sat Mar 13 02:20:09 1993
- X--- xblockbuster1.01/Imakefile Mon Mar 22 20:18:02 1993
- X***************
- X*** 1,26 ****
- X XCOMM $XConsortium: Imakefile,v 1.9 91/07/16 23:06:01 gildea Exp $
- X! /* BINDIR = /usr/games/
- X */
- X! FONT = -DFONT=\"10x20\"
- X! /* MANDIR = /usr/local/man/man6
- X */
- X MANSUFFIX = 6
- X! /*
- X! STAGEDIR = /usr/games/lib/xblockbuster
- X! */
- X! #ifndef STAGEDIR
- X! #define STAGEDIR = LIBDIR
- X #endif
- X
- X! DEFINES = $(FONT) -DSTAGEDIR=\"$(STAGEDIR)\"
- X DEPLIBS = $(DEPXLIB)
- X LOCAL_LIBRARIES = $(XLIB)
- X SRCS1 = balls_pallet.c bricks.c deflection.c save.c score.c stage.c \
- X! xblockbuster.c
- X OBJS1 = balls_pallet.o bricks.o deflection.o save.o score.o stage.o \
- X! xblockbuster.o
- X! SRCS2 = stagemm.c
- X! OBJS2 = stagemm.o
- X PROGRAMS = xblockbuster stagemm
- X
- X ComplexProgramTarget_1(xblockbuster,$(LOCAL_LIBRARIES),-lm)
- X--- 1,30 ----
- X XCOMM $XConsortium: Imakefile,v 1.9 91/07/16 23:06:01 gildea Exp $
- X! /* BINDIR = /usr/games/
- X */
- X! /* MANDIR = /usr/local/man/man6
- X */
- X MANSUFFIX = 6
- X!
- X! #define StageDir /usr/games/lib/xblockbuster
- X!
- X! #define InstallLib YES /* Change to NO if the stages are already installed */
- X!
- X! #ifndef StageDir
- X! #define StageDir $(LIBDIR)/xblockbuster
- X #endif
- X
- X! STAGEDIR = StageDir
- X! /* If your on a system V machine, add -DSYSV to DEFINES below */
- X!
- X! DEFINES = -DSTAGEDIR=\"$(STAGEDIR)\"
- X DEPLIBS = $(DEPXLIB)
- X LOCAL_LIBRARIES = $(XLIB)
- X SRCS1 = balls_pallet.c bricks.c deflection.c save.c score.c stage.c \
- X! xblockbuster.c
- X OBJS1 = balls_pallet.o bricks.o deflection.o save.o score.o stage.o \
- X! xblockbuster.o
- X! SRCS2 = stagemm.c
- X! OBJS2 = stagemm.o
- X PROGRAMS = xblockbuster stagemm
- X
- X ComplexProgramTarget_1(xblockbuster,$(LOCAL_LIBRARIES),-lm)
- X***************
- X*** 33,41 ****
- X There must be a better way of doing this install, other than listing
- X the 40 or so files and doing a InstallMultiple.
- X */
- X install::
- X MakeDir($(STAGEDIR))
- X cp -r STAGES* $(STAGEDIR)
- X chmod 666 $(STAGEDIR)/STAGES*/scores
- X chmod 777 $(STAGEDIR)/STAGES*/save
- X!
- X--- 37,46 ----
- X There must be a better way of doing this install, other than listing
- X the 40 or so files and doing a InstallMultiple.
- X */
- X+ #if InstallLib
- X install::
- X MakeDir($(STAGEDIR))
- X cp -r STAGES* $(STAGEDIR)
- X chmod 666 $(STAGEDIR)/STAGES*/scores
- X chmod 777 $(STAGEDIR)/STAGES*/save
- X! #endif
- XOnly in xblockbuster1.00: Makefile
- Xdiff -cr xblockbuster1.00/Makefile.noIm xblockbuster1.01/Makefile.noIm
- X*** xblockbuster1.00/Makefile.noIm Fri Mar 19 01:19:41 1993
- X--- xblockbuster1.01/Makefile.noIm Sat Mar 20 03:11:41 1993
- X***************
- X*** 15,26 ****
- X MANDIR = /usr/local/man/man6/
- X MANEXT = 6
- X
- X- # Font to use for writing text.
- X- FONT = 10x20
- X
- X CC = cc
- X! # IF you want to change the FONT or LIBDIR, do it above
- X! CFLAGS= -O -DFONT=\"${FONT}\" -DSTAGEDIR=\"${LIBDIR}\"
- X LDFLAGS=
- X LIBS= -lm -lX11
- X
- X--- 15,27 ----
- X MANDIR = /usr/local/man/man6/
- X MANEXT = 6
- X
- X
- X+ # If you want change LIBDIR, do it above
- X+ # If on a System V machine, add -DSYSV to CFLAGS
- X+ DEFINES = -DSTAGEDIR=\"${LIBDIR}\"
- X+
- X CC = cc
- X! CFLAGS = -O $(DEFINES)
- X LDFLAGS=
- X LIBS= -lm -lX11
- X
- X***************
- X*** 37,42 ****
- X--- 38,50 ----
- X cp -r STAGES* ${LIBDIR}
- X chmod 666 ${LIBDIR}/STAGES*/scores
- X chmod 777 ${LIBDIR}/STAGES*/save
- X+ cp XBlockbuster.ad ${LIBDIR}
- X+ cp xblockbuster ${BINDIR}/xblockbuster
- X+ cp xblockbuster.man ${MANDIR}/xblockbuster.${MANEXT}
- X+ cp stagemm ${BINDIR}/stagemm
- X+ cp stagemm.man ${MANDIR}/stagemm.${MANEXT}
- X+
- X+ install.bin:
- X cp XBlockbuster.ad ${LIBDIR}
- X cp xblockbuster ${BINDIR}/xblockbuster
- X cp xblockbuster.man ${MANDIR}/xblockbuster.${MANEXT}
- Xdiff -cr xblockbuster1.00/README xblockbuster1.01/README
- X*** xblockbuster1.00/README Sat Mar 13 00:15:30 1993
- X--- xblockbuster1.01/README Mon Mar 22 20:07:43 1993
- X***************
- X*** 12,43 ****
- X
- X TO BUILD:
- X
- X! If you want to use the Imakefile, all that is needed is:
- X
- X 1) xmkmf
- X 2) make
- X 3) make install
- X
- X If you don't want to use the Imakefile, do the following:
- X 1) cp Makefile.noIm Makefile
- X 2) Edit the Makefile. Everything should be fairly well documented.
- X- You should make sure that whatever FONT is defined to is available
- X- on your system, or the program will not work (use xlsfonts to see
- X- what fonts your server provides.) I believe the default font as
- X- distributed (10x20) is part of the X11R5 distribution.
- X 3) make
- X 4) make install
- X
- X! XBlockbuster can use the same playground that Blockbuster (the sunview
- X! version) does, if you already have that installed. Set LIBDIR appropriately
- X! to use the same playground.
- X
- X! I have successfully compiled the source with both cc and gcc on
- X! a sun 3/sunos 4.1.1.
- X
- X! After you have set up the Makefile to your satisfaction, type:
- X
- X
- X FILES (of interest):
- X
- X CHANGES: changes made from blockbuster to xblockbuster.
- X--- 12,78 ----
- X
- X TO BUILD:
- X
- X! If you are on a System V machine, -DSYSV will need to be added to the
- X! DEFINES variable.
- X
- X+ XBlockbuster can use the same playground that Blockbuster (the sunview
- X+ version) does. If you want to use the same playground, set
- X+ StageDir (Imakefile) or LIBDIR (Makefile.noIm) appropriately.
- X+
- X+ IMAKEFILE directions:
- X+
- X+ If you have already installed the stages file for xblockbuster, and
- X+ don't want to copy over them, change InstallLib in Imakefile to No.
- X+
- X+ The Imakefile, as distributed, should work fine (unless on System V). You
- X+ may still want to edit the Imakefile to change where the files will
- X+ be installed. Once you have edited the Imakefile to your satisfaction,
- X+ all that is needed is:
- X+
- X 1) xmkmf
- X 2) make
- X 3) make install
- X
- X+ MAKEFILE directions:
- X+
- X If you don't want to use the Imakefile, do the following:
- X 1) cp Makefile.noIm Makefile
- X 2) Edit the Makefile. Everything should be fairly well documented.
- X 3) make
- X+
- X+ If you have already installed the XBlockBuster stages, and don't
- X+ want to copy over them, do:
- X+
- X+ 4) make install.bin
- X+
- X+ If this is your first installation, or you want to copy over the
- X+ score files, do:
- X+
- X 4) make install
- X
- X! I have successfully compiled the source with both cc and gcc on
- X! a sun 3/sunos 4.1.1.
- X
- X! IF YOU HAVE PROBLEMS:
- X
- X! If it can't find the font, change FONT in xblockbuster.h
- X
- X+ If your on system V/Ultrix machine, did you add -DSYSV to to
- X+ defines?
- X
- X+ If you get link errors of random or srandom not found, change RAND
- X+ and SRAND in xblockbuster.h to comparable functions for your
- X+ machine (and please send me mail, so I can make this more automatic
- X+ in the future.) Note that RAND and SRAND are only used for
- X+ determining what the order of the stages are, so they need not
- X+ be especially good.
- X+
- X+ Check the BUGS/TODO section to see if it is a problem I
- X+ already know about. If it is, still send me mail, but maybe
- X+ by it being a known problem, you won't feel quite so bad.
- X+
- X+ Other problems? Send me mail. (see below)
- X+
- X FILES (of interest):
- X
- X CHANGES: changes made from blockbuster to xblockbuster.
- X***************
- X*** 56,63 ****
- X (See the manual page for more information on coloring the bricks and
- X alternate bricks.)
- X
- X! TODO:
- X
- X A nice opening screen, showing the bricks (with proper coloring, if
- X applicable), along with descriptions of what each brick does.
- X
- X--- 91,106 ----
- X (See the manual page for more information on coloring the bricks and
- X alternate bricks.)
- X
- X! BUGS/TODO:
- X
- X+ I have gotten several reports of the pallette not appearing on the
- X+ screen, yet the balls are appearing (both use the gc_xor structure, so
- X+ I don't have any idea what the problem is, and can't reproduce it
- X+ myself.) This problem seems to be happening more on BW systems. My
- X+ only thought right now is perhaps the window wasn't made the proper size,
- X+ so the bottom is cut off. But even then, if the pointer is moved near
- X+ the top of the window, the side crosshairs should still appear.
- X+
- X A nice opening screen, showing the bricks (with proper coloring, if
- X applicable), along with descriptions of what each brick does.
- X
- X***************
- X*** 79,85 ****
- X
- X I will maintain it and release patches as required.
- X
- X Mark Wedel
- X master@cats.ucsc.edu
- X! March 10, 1993
- X
- X--- 122,132 ----
- X
- X I will maintain it and release patches as required.
- X
- X+ If you send me mail, please include a valid mail address as
- X+ part of your signature. I have gotten at least a few letters where
- X+ the mail address in the header was incorrect.
- X+
- X Mark Wedel
- X master@cats.ucsc.edu
- X! March 17, 1993
- X
- XCommon subdirectories: xblockbuster1.00/SKELS and xblockbuster1.01/SKELS
- XCommon subdirectories: xblockbuster1.00/STAGES and xblockbuster1.01/STAGES
- XCommon subdirectories: xblockbuster1.00/STAGES.try and xblockbuster1.01/STAGES.try
- XCommon subdirectories: xblockbuster1.00/STAGES.wacko and xblockbuster1.01/STAGES.wacko
- Xdiff -cr xblockbuster1.00/balls_pallet.c xblockbuster1.01/balls_pallet.c
- X*** xblockbuster1.00/balls_pallet.c Mon Nov 16 23:29:32 1992
- X--- xblockbuster1.01/balls_pallet.c Fri Mar 19 02:12:30 1993
- X***************
- X*** 47,86 ****
- X ball_pr = XCreateBitmapFromData(display, win, ball_bits, ball_width, ball_height);
- X }
- X
- X! /* Macro to draw a ball */
- X!
- X! #define draw_ball( ball ) \
- X! XCopyPlane(display, ball_pr, win, gc_xor, 0, 0, 16, 16, \
- X (int)( (ball)->x ) - 8, (int)( (ball)->y ) - 8, 1)
- X
- X-
- X /* Procedure to draw the pallet */
- X void
- X! draw_pallet( )
- X {
- X! XDrawLine( display, win, gc_xor, pallet_xI - pallet_lengthI + 2, pallet_yI,
- X pallet_xI + pallet_lengthI - 2, pallet_yI);
- X! XDrawLine( display, win, gc_xor, pallet_xI - pallet_lengthI + 1, pallet_yI + 1,
- X pallet_xI + pallet_lengthI - 1, pallet_yI + 1);
- X! XDrawLine( display, win, gc_xor, pallet_xI - pallet_lengthI, pallet_yI + 2,
- X pallet_xI + pallet_lengthI, pallet_yI + 2);
- X! XDrawLine( display, win, gc_xor, pallet_xI - 1, pallet_yI + 3,
- X pallet_xI - 1, pallet_yI + 6);
- X! XDrawLine( display, win, gc_xor, pallet_xI - 1, pallet_yI + 6,
- X pallet_xI + 1, pallet_yI + 6);
- X! XDrawLine( display, win, gc_xor, pallet_xI + 1, pallet_yI + 6,
- X pallet_xI + 1, pallet_yI + 3);
- X! XDrawLine( display, win, gc_xor, 0, mouse_yI - 1, /* <HC> */
- X 10, mouse_yI - 1);
- X! XDrawLine( display, win, gc_xor, 0, mouse_yI,
- X 10, mouse_yI);
- X! XDrawLine( display, win, gc_xor, 0, mouse_yI + 1, /* <HC> */
- X 10, mouse_yI + 1);
- X! XDrawLine( display, win, gc_xor, STAGE_WIDTH_IN_PIXELS - 1, mouse_yI - 1, /* <HC> */
- X STAGE_WIDTH_IN_PIXELS - 11, mouse_yI - 1);
- X! XDrawLine( display, win, gc_xor, STAGE_WIDTH_IN_PIXELS - 1, mouse_yI,
- X STAGE_WIDTH_IN_PIXELS - 11, mouse_yI);
- X! XDrawLine( display, win, gc_xor, STAGE_WIDTH_IN_PIXELS - 1, mouse_yI + 1, /* <HC> */
- X STAGE_WIDTH_IN_PIXELS - 11, mouse_yI + 1);
- X }
- X
- X--- 47,84 ----
- X ball_pr = XCreateBitmapFromData(display, win, ball_bits, ball_width, ball_height);
- X }
- X
- X! #define draw_ball( ball, gc ) \
- X! XCopyPlane(display, ball_pr, win, gc, 0, 0, 16, 16, \
- X (int)( (ball)->x ) - 8, (int)( (ball)->y ) - 8, 1)
- X
- X /* Procedure to draw the pallet */
- X void
- X! draw_pallet( gc )
- X! GC gc;
- X {
- X! XDrawLine( display, win, gc, pallet_xI - pallet_lengthI + 2, pallet_yI,
- X pallet_xI + pallet_lengthI - 2, pallet_yI);
- X! XDrawLine( display, win, gc, pallet_xI - pallet_lengthI + 1, pallet_yI + 1,
- X pallet_xI + pallet_lengthI - 1, pallet_yI + 1);
- X! XDrawLine( display, win, gc, pallet_xI - pallet_lengthI, pallet_yI + 2,
- X pallet_xI + pallet_lengthI, pallet_yI + 2);
- X! XDrawLine( display, win, gc, pallet_xI - 1, pallet_yI + 3,
- X pallet_xI - 1, pallet_yI + 6);
- X! XDrawLine( display, win, gc, pallet_xI - 1, pallet_yI + 6,
- X pallet_xI + 1, pallet_yI + 6);
- X! XDrawLine( display, win, gc, pallet_xI + 1, pallet_yI + 6,
- X pallet_xI + 1, pallet_yI + 3);
- X! XDrawLine( display, win, gc, 0, mouse_yI - 1, /* <HC> */
- X 10, mouse_yI - 1);
- X! XDrawLine( display, win, gc, 0, mouse_yI,
- X 10, mouse_yI);
- X! XDrawLine( display, win, gc, 0, mouse_yI + 1, /* <HC> */
- X 10, mouse_yI + 1);
- X! XDrawLine( display, win, gc, STAGE_WIDTH_IN_PIXELS - 1, mouse_yI - 1, /* <HC> */
- X STAGE_WIDTH_IN_PIXELS - 11, mouse_yI - 1);
- X! XDrawLine( display, win, gc, STAGE_WIDTH_IN_PIXELS - 1, mouse_yI,
- X STAGE_WIDTH_IN_PIXELS - 11, mouse_yI);
- X! XDrawLine( display, win, gc, STAGE_WIDTH_IN_PIXELS - 1, mouse_yI + 1, /* <HC> */
- X STAGE_WIDTH_IN_PIXELS - 11, mouse_yI + 1);
- X }
- X
- X***************
- X*** 145,151 ****
- X /* NW */ : -M_SQRT2_2 );
- X ball->y_speed = launch_speed * -M_SQRT2_2;
- X /* initial ball image */
- X! draw_ball( ball );
- X /* show balls left */
- X print_balls();
- X /* show speeds */
- X--- 143,149 ----
- X /* NW */ : -M_SQRT2_2 );
- X ball->y_speed = launch_speed * -M_SQRT2_2;
- X /* initial ball image */
- X! draw_ball( ball, gc_xor );
- X /* show balls left */
- X print_balls();
- X /* show speeds */
- X***************
- X*** 240,252 ****
- X break;
- X case 'C': /* clipper */
- X if ( ++( brick->nhits ) == 2 ) {
- X! draw_pallet();
- X pallet_lengthI -= pallet_lengthI / 5;
- X if ( pallet_lengthI < MIN_PALLET_LENGTH )
- X pallet_lengthI = MIN_PALLET_LENGTH;
- X pallet_length = ( double ) pallet_lengthI;
- X busted = TRUE;
- X! draw_pallet();
- X }
- X break;
- X case 'D': /* double */
- X--- 238,250 ----
- X break;
- X case 'C': /* clipper */
- X if ( ++( brick->nhits ) == 2 ) {
- X! draw_pallet(gc_xor);
- X pallet_lengthI -= pallet_lengthI / 5;
- X if ( pallet_lengthI < MIN_PALLET_LENGTH )
- X pallet_lengthI = MIN_PALLET_LENGTH;
- X pallet_length = ( double ) pallet_lengthI;
- X busted = TRUE;
- X! draw_pallet(gc_xor);
- X }
- X break;
- X case 'D': /* double */
- X***************
- X*** 425,434 ****
- X /* redraw brick (never on the sides) */
- X if ( redraw ) {
- X if ( pallet_row == ball->row )
- X! draw_pallet( ); /* avoid shadow */
- X draw_brick( ball->row, ball->col );
- X if ( pallet_row == ball->row )
- X! draw_pallet( ); /* restore */
- X }
- X /* deflection */
- X if ( ball->col <= 0 || ball->col >= MAX_COL ) {
- X--- 423,432 ----
- X /* redraw brick (never on the sides) */
- X if ( redraw ) {
- X if ( pallet_row == ball->row )
- X! draw_pallet(gc_xor ); /* avoid shadow */
- X draw_brick( ball->row, ball->col );
- X if ( pallet_row == ball->row )
- X! draw_pallet(gc_xor ); /* restore */
- X }
- X /* deflection */
- X if ( ball->col <= 0 || ball->col >= MAX_COL ) {
- X***************
- X*** 462,468 ****
- X register int score_hit = FALSE; /* boolean */
- X
- X /* erase ball image */
- X! draw_ball( ball );
- X
- X /* move ball */
- X ball->x += ball->x_speed;
- X--- 460,466 ----
- X register int score_hit = FALSE; /* boolean */
- X
- X /* erase ball image */
- X! draw_ball( ball, gc_xor );
- X
- X /* move ball */
- X ball->x += ball->x_speed;
- X***************
- X*** 494,500 ****
- X pallet_deflection( ball );
- X }
- X /* redraw ball image */
- X! draw_ball( ball );
- X
- X return ( score_hit );
- X }
- X--- 492,498 ----
- X pallet_deflection( ball );
- X }
- X /* redraw ball image */
- X! draw_ball( ball,gc_xor );
- X
- X return ( score_hit );
- X }
- X***************
- X*** 522,535 ****
- X }
- X
- X
- X! void draw_balls()
- X {
- X! if ( ball1.quadrant ) draw_ball(&ball1);
- X! if ( ball2.quadrant ) draw_ball(&ball2);
- X! if ( ball3.quadrant ) draw_ball(&ball3);
- X }
- X
- X-
- X /*** on timeout event ***/
- X void move_balls( )
- X {
- X--- 520,533 ----
- X }
- X
- X
- X! void draw_all_balls()
- X {
- X! if (ball1.quadrant) draw_ball(&ball1, gc_xor);
- X! if (ball2.quadrant) draw_ball(&ball2, gc_xor);
- X! if (ball3.quadrant) draw_ball(&ball3, gc_xor);
- X!
- X }
- X
- X /*** on timeout event ***/
- X void move_balls( )
- X {
- X***************
- X*** 564,580 ****
- X if ( ball1.quadrant ) {
- X ball1.quadrant = NO_BALL;
- X balls_left++; /* kludge to avoid consuming the ball */
- X! draw_ball( &ball1 );
- X }
- X if ( ball2.quadrant ) {
- X ball2.quadrant = NO_BALL;
- X balls_left++; /* kludge to avoid consuming the ball */
- X! draw_ball( &ball2 );
- X }
- X if ( ball3.quadrant ) {
- X ball3.quadrant = NO_BALL;
- X balls_left++; /* kludge to avoid consuming the ball */
- X! draw_ball( &ball3 );
- X }
- X /* update score */
- X print_score();
- X--- 562,578 ----
- X if ( ball1.quadrant ) {
- X ball1.quadrant = NO_BALL;
- X balls_left++; /* kludge to avoid consuming the ball */
- X! draw_ball( &ball1, gc_xor );
- X }
- X if ( ball2.quadrant ) {
- X ball2.quadrant = NO_BALL;
- X balls_left++; /* kludge to avoid consuming the ball */
- X! draw_ball( &ball2, gc_xor );
- X }
- X if ( ball3.quadrant ) {
- X ball3.quadrant = NO_BALL;
- X balls_left++; /* kludge to avoid consuming the ball */
- X! draw_ball( &ball3, gc_xor );
- X }
- X /* update score */
- X print_score();
- XCommon subdirectories: xblockbuster1.00/icons and xblockbuster1.01/icons
- Xdiff -cr xblockbuster1.00/save.c xblockbuster1.01/save.c
- X*** xblockbuster1.00/save.c Mon Nov 16 23:35:53 1992
- X--- xblockbuster1.01/save.c Thu Mar 18 16:22:53 1993
- X***************
- X*** 16,22 ****
- X char sve[SAVEFILE_LENGTH];
- X register int stage_nb_tmp;
- X
- X! if ((fd = fopen( sprintf( sve, SAVEFILE, playground, login ),"r+" ))) {
- X /* restoring save file */
- X XDrawImageString(display, win, gc, OFFSET_BALLS,
- X font_height, "Restoring...",12);
- X--- 16,23 ----
- X char sve[SAVEFILE_LENGTH];
- X register int stage_nb_tmp;
- X
- X! sprintf(sve, SAVEFILE, playground, login );
- X! if ((fd = fopen(sve, "r+"))) {
- X /* restoring save file */
- X XDrawImageString(display, win, gc, OFFSET_BALLS,
- X font_height, "Restoring...",12);
- X***************
- X*** 53,60 ****
- 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--- 54,61 ----
- X char sve[SAVEFILE_LENGTH];
- X register int stage_nb_tmp = 0;
- X
- X! sprintf( sve, SAVEFILE, playground, login );
- X! if ( !( fd = fopen(sve, "w" ))) {
- X perror( "Can't open save file" );
- X exit( 1 );
- X }
- Xdiff -cr xblockbuster1.00/score.c xblockbuster1.01/score.c
- X*** xblockbuster1.00/score.c Mon Nov 16 23:32:19 1992
- X--- xblockbuster1.01/score.c Thu Mar 18 16:49:56 1993
- X***************
- X*** 38,45 ****
- X show_score_board( )
- X {
- X register int lows, s, ns,scorenum=0;
- X! register int update = FALSE;
- X! register int made_it = FALSE;
- X FILE *fd;
- X char buf[PATH_LENGTH];
- X
- X--- 38,44 ----
- X show_score_board( )
- X {
- X register int lows, s, ns,scorenum=0;
- X! int update = FALSE,made_it = FALSE,width;
- X FILE *fd;
- X char buf[PATH_LENGTH];
- X
- X***************
- X*** 53,59 ****
- 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--- 52,59 ----
- X }
- X
- X /* read the score file into the array */
- X! sprintf( buf, SCOREFILE, playground );
- X! if ( !( fd = fopen(buf, "r+" ) ) ) {
- X perror( "No score file" );
- X exit( 1 );
- X }
- X***************
- X*** 115,155 ****
- X /* show score board */
- X center_text( 0, "Top Scores" );
- X for ( s = 0; s < NB_SCORES; s++ ) {
- X! if ( score_board[s].balls_left > 99 ) {
- X! center_text( 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! center_text( 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! center_text( 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! center_text( 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! center_text( 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! center_text( 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! center_text( s + 2, sprintf( buf, "%7d %8s ",
- X! score_board[s].score,
- X! score_board[s].login ) );
- X }
- X if ((s==scorenum) && made_it)
- X XDrawImageString(display,win,gc,
- X (STAGE_WIDTH_IN_PIXELS - strlen(buf)*font_width)/2
- X--- 115,136 ----
- X /* show score board */
- X center_text( 0, "Top Scores" );
- X for ( s = 0; s < NB_SCORES; s++ ) {
- X! if (score_board[s].balls_left==0)
- X! sprintf( buf, "%7d %8s ",
- X! score_board[s].score, score_board[s].login);
- X! else {
- X! if (abs(score_board[s].balls_left)>99) width=3;
- X! else if (abs(score_board[s].balls_left)>9) width=2;
- X! else if (abs(score_board[s].balls_left)>0) width=1;
- X!
- X!
- X! sprintf( buf, "%7d %*.s(%*d) %c %8s ",
- X! score_board[s].score, (3-width)," ",
- X! width, abs(score_board[s].balls_left),
- X! score_board[s].balls_left>0 ? ' ' : '+',
- X! score_board[s].login);
- X }
- X+ center_text(s+2, buf);
- X if ((s==scorenum) && made_it)
- X XDrawImageString(display,win,gc,
- X (STAGE_WIDTH_IN_PIXELS - strlen(buf)*font_width)/2
- X***************
- X*** 162,185 ****
- X
- X /* make sure the current score is on the board */
- X if ( !made_it ) {
- X! if ( balls_left > 99 ) {
- X! center_text( NB_SCORES + 3, sprintf( buf, "%7d (%3d) %8s ",
- X! score, balls_left, login ) );
- X! } else if ( balls_left > 9 ) {
- X! center_text( NB_SCORES + 3, sprintf( buf, "%7d (%2d) %8s ",
- X! score, balls_left, login ) );
- X! } else if ( balls_left ) {
- X! center_text( NB_SCORES + 3, sprintf( buf, "%7d (%1d) %8s ",
- X! score, balls_left, login ) );
- X! } else { /* no balls left */
- X! center_text( NB_SCORES + 3, sprintf( buf, "%7d <> %8s ",
- X! score, login ) );
- X }
- X }
- X /* show the current pallet shrinkage */
- X! center_text( NB_SCORES + 5, sprintf( buf, "pallet >>> %2d %% <<<",
- X! ( pallet_modif * 100 ) / PALLET_DENOMINATOR ) );
- X!
- X
- X XFlush(display);
- X
- X--- 143,165 ----
- X
- X /* make sure the current score is on the board */
- X if ( !made_it ) {
- X! if (balls_left==0)
- X! sprintf( buf, "%7d <> %8s ", score, login );
- X! else {
- X! if (balls_left >99) width=3;
- X! else if (balls_left >9) width=2;
- X! else if (balls_left >0) width=1;
- X!
- X! sprintf( buf, "%7d %*.s(%*d) %8s ",
- X! score, (3-width)," ",
- X! width, balls_left, login);
- X }
- X+ center_text( NB_SCORES +3, buf);
- X }
- X /* show the current pallet shrinkage */
- X! sprintf( buf, "pallet >>> %2d %% <<<",
- X! ( pallet_modif * 100 ) / PALLET_DENOMINATOR );
- X! center_text( NB_SCORES + 5, buf);
- X
- X XFlush(display);
- X
- Xdiff -cr xblockbuster1.00/stage.c xblockbuster1.01/stage.c
- X*** xblockbuster1.00/stage.c Fri Oct 23 00:23:18 1992
- X--- xblockbuster1.01/stage.c Sat Mar 20 03:27:18 1993
- X***************
- X*** 22,29 ****
- X last_busted_brick = NULL;
- X
- X /* open next stage file */
- X! if ( !( fd = fopen( sprintf( stg, STAGEFILE, playground, stage_nb ),
- X! "r" ) ) ) {
- X perror( "Can't open stage" );
- X exit( 1 );
- X }
- X--- 22,29 ----
- X last_busted_brick = NULL;
- X
- X /* open next stage file */
- X! sprintf( stg, STAGEFILE, playground, stage_nb );
- X! if ( !( fd = fopen(stg, "r"))) {
- X perror( "Can't open stage" );
- X exit( 1 );
- X }
- X***************
- X*** 110,116 ****
- X /* reset pallet location */
- X pallet_y = ( double ) ( pallet_yI = PALLET_MAX_Y + 4 );
- X pallet_row = MAX_ROW - 1;
- X! draw_pallet( );
- X
- X /* ready ? */
- X XDrawImageString(display, win, gc, OFFSET_BALLS, font_height*2,
- X--- 110,116 ----
- X /* reset pallet location */
- X pallet_y = ( double ) ( pallet_yI = PALLET_MAX_Y + 4 );
- X pallet_row = MAX_ROW - 1;
- X! if (extra_draw) draw_pallet(gc_xor );
- X
- X /* ready ? */
- X XDrawImageString(display, win, gc, OFFSET_BALLS, font_height*2,
- X***************
- X*** 134,143 ****
- X /* determine stage number */
- X if ( !nb_stages ) {
- X /* read number of available stages */
- X! if ( !( fd = fopen( sprintf( buf, NB_STAGESFILE, playground ),
- X! "r" ) ) ) {
- X! perror( sprintf( buf2, "Can't open number of stages file <%s>",
- X! buf ) );
- X exit( 1 );
- X }
- X fscanf( fd, "%d", &nb_stages );
- X--- 134,145 ----
- X /* determine stage number */
- X if ( !nb_stages ) {
- X /* read number of available stages */
- X! sprintf( buf, NB_STAGESFILE, playground );
- X! if ( !( fd = fopen( buf, "r"))) {
- X!
- X! sprintf( buf2, "Can't open number of stages file <%s>",
- X! buf );
- X! perror(buf2);
- X exit( 1 );
- X }
- X fscanf( fd, "%d", &nb_stages );
- X***************
- X*** 147,153 ****
- X stages[stage_nb_tmp++] = FALSE;
- X }
- X /* search for stage index'th available stage number */
- X! stage_index = ( int ) ( random( ) ) % nb_stages--;
- X if ( stage_index < 0 )
- X stage_index = -stage_index;
- X for ( stage_nb = 0; stages[stage_nb]; )
- X--- 149,155 ----
- X stages[stage_nb_tmp++] = FALSE;
- X }
- X /* search for stage index'th available stage number */
- X! stage_index = ( int ) ( RAND( ) ) % nb_stages--;
- X if ( stage_index < 0 )
- X stage_index = -stage_index;
- X for ( stage_nb = 0; stages[stage_nb]; )
- Xdiff -cr xblockbuster1.00/xblockbuster.c xblockbuster1.01/xblockbuster.c
- X*** xblockbuster1.00/xblockbuster.c Fri Mar 12 23:48:19 1993
- X--- xblockbuster1.01/xblockbuster.c Mon Mar 22 01:02:53 1993
- X***************
- X*** 41,47 ****
- X struct timezone tzp;
- X
- X gettimeofday(&oldtp,&tzp);
- X! draw_pallet();
- X while(1) {
- X /* timer function to keep things moving at a constant speed.
- X We read time before servicing events so that the amount of time
- X--- 41,47 ----
- X struct timezone tzp;
- X
- X gettimeofday(&oldtp,&tzp);
- X! draw_pallet(gc_xor);
- X while(1) {
- X /* timer function to keep things moving at a constant speed.
- X We read time before servicing events so that the amount of time
- X***************
- X*** 89,102 ****
- X break;
- X
- X case Button2:
- X! draw_pallet(); /* erase old */
- X pallet_y = (double) (pallet_yI = PALLET_MAX_Y+4);
- X pallet_row = MAX_ROW - 1;
- X! draw_pallet(); /* draw new */
- X break;
- X
- X case Button1:
- X! draw_pallet(); /* erase old */
- X if (pallet_yI > PALLET_MIN_Y) {
- X old_pallet_y = pallet_y;
- X pallet_y = (double) (pallet_yI -=16);
- X--- 89,102 ----
- X break;
- X
- X case Button2:
- X! draw_pallet(gc_xor); /* erase old */
- X pallet_y = (double) (pallet_yI = PALLET_MAX_Y+4);
- X pallet_row = MAX_ROW - 1;
- X! draw_pallet(gc_xor); /* draw new */
- X break;
- X
- X case Button1:
- X! draw_pallet(gc_xor); /* erase old */
- X if (pallet_yI > PALLET_MIN_Y) {
- X old_pallet_y = pallet_y;
- X pallet_y = (double) (pallet_yI -=16);
- X***************
- X*** 107,113 ****
- X upwards */
- X check_deflections(old_pallet_y);
- X }
- X! draw_pallet(); /* draw new */
- X break;
- X }
- X break;
- X--- 107,113 ----
- X upwards */
- X check_deflections(old_pallet_y);
- X }
- X! draw_pallet(gc_xor); /* draw new */
- X break;
- X }
- X break;
- X***************
- X*** 132,141 ****
- X break;
- X
- X case MotionNotify:
- X! draw_pallet(); /* erase old pallet */
- X pallet_x = (double) (pallet_xI =e.xmotion.x);
- X mouse_yI = e.xmotion.y;
- X! draw_pallet(); /* draw new one */
- X break;
- X
- X case EnterNotify:
- X--- 132,141 ----
- X break;
- X
- X case MotionNotify:
- X! draw_pallet(gc_xor); /* erase old pallet */
- X pallet_x = (double) (pallet_xI =e.xmotion.x);
- X mouse_yI = e.xmotion.y;
- X! draw_pallet(gc_xor); /* draw new one */
- X break;
- X
- X case EnterNotify:
- X***************
- X*** 147,152 ****
- X--- 147,154 ----
- X break;
- X
- X case Expose:
- X+ if (e.xexpose.count!=0) break;
- X+ XClearWindow(display,win);
- X /* redraw the stage */
- X
- X for ( row = 0; row <= MAX_ROW; row++ ) {
- X***************
- X*** 155,161 ****
- X draw_brick( row, col );
- X draw_brick0( row, MAX_COL );
- X }
- X! draw_pallet();
- X break;
- X
- X default:
- X--- 157,176 ----
- X draw_brick( row, col );
- X draw_brick0( row, MAX_COL );
- X }
- X! draw_pallet(gc_xor);
- X! print_balls();
- X! print_score();
- X! show_speeds();
- X! XDrawImageString(display, win, gc,
- X! OFFSET_SPEED, font_height*2, stage_name,
- X! strlen(stage_name));
- X! if (score_incr>1) {
- X! sprintf(str,"Bonus x%d",score_incr);
- X! XDrawImageString(display, win, gc,
- X! OFFSET_SCORE, font_height*2, str,
- X! strlen(str));
- X! }
- X! draw_all_balls();
- X break;
- X
- X default:
- X***************
- X*** 176,181 ****
- X--- 191,197 ----
- X struct stat st;
- X int len, found;
- X
- X+
- X /* set default playground directory */
- X strcpy( playground, STAGEDIR );
- X strcat( playground, "/" );
- X***************
- X*** 239,244 ****
- X--- 255,262 ----
- X XSizeHints size_hints;
- X XWMHints wm_hints;
- X XClassHint class_hints;
- X+ XTextProperty window_name;
- X+ char *prog_name=VERSION;
- X
- X /* who am i ? ['cuserid(3S)' is fooled by 'su(1)'] */
- X login = getpwuid( getuid( ) )->pw_name;
- X***************
- X*** 254,260 ****
- X 0, 0, STAGE_WIDTH_IN_PIXELS, STAGE_HEIGHT_IN_PIXELS,
- X 0, 2, WhitePixel(display, screen_num));
- X
- X-
- X XSelectInput(display, win, ExposureMask | ButtonPressMask |
- X LeaveWindowMask | EnterWindowMask | KeyPressMask |
- X PointerMotionMask);
- X--- 272,277 ----
- X***************
- X*** 270,275 ****
- X--- 287,294 ----
- X
- X xgcvalues.foreground = BlackPixel(display, screen_num);
- X xgcvalues.background = WhitePixel(display, screen_num);
- X+
- X+
- X xgcvalues.graphics_exposures = False;
- X xgcvalues.font = font_info->fid;
- X
- X***************
- X*** 287,298 ****
- X gc_erase = XCreateGC(display, win, GCForeground | GCBackground |
- X GCFont | GCGraphicsExposures | GCFunction, &xgcvalues);
- X
- X! xgcvalues.function = GXxor; /* Exclusive or */
- X
- X! gc_xor = XCreateGC(display, win, GCForeground | GCBackground |
- X! GCFont | GCGraphicsExposures | GCFunction, &xgcvalues);
- X!
- X!
- X /* Create our icon for when the window is closed */
- X
- X if (!(icon_image = XCreateBitmapFromData(display, win,
- X--- 306,336 ----
- X gc_erase = XCreateGC(display, win, GCForeground | GCBackground |
- X GCFont | GCGraphicsExposures | GCFunction, &xgcvalues);
- X
- X! /* Xor doesn't work very well (at all) if foreground is 0. So
- X! * a different function is used instead. This seems to work,
- X! * at least, from my fiddling with the foreground color on my
- X! * machine.
- X! */
- X! xgcvalues.line_width=0;
- X
- X! if (xgcvalues.foreground==0) {
- X! /* GXnor, GXinvert and GXequiv all seem to work for the
- X! function */
- X! xgcvalues.function = GXequiv;
- X! xgcvalues.plane_mask = xgcvalues.background;
- X! gc_xor = XCreateGC(display, win, GCForeground | GCBackground |
- X! GCFont | GCGraphicsExposures | GCFunction |
- X! GCPlaneMask | GCLineWidth, &xgcvalues);
- X! extra_draw = TRUE;
- X! }
- X! else {
- X! xgcvalues.function = GXxor; /* Exclusive or */
- X! gc_xor = XCreateGC(display, win, GCForeground | GCBackground |
- X! GCFont | GCGraphicsExposures | GCFunction |
- X! GCLineWidth,
- X! &xgcvalues);
- X! extra_draw = TRUE;
- X! }
- X /* Create our icon for when the window is closed */
- X
- X if (!(icon_image = XCreateBitmapFromData(display, win,
- X***************
- X*** 317,329 ****
- X class_hints.res_name = "XBlockbuster";
- X class_hints.res_class = "XBlockbuster";
- X
- X! XmbSetWMProperties(display, win, VERSION , VERSION,
- X argv,argc, &size_hints, &wm_hints, &class_hints);
- X
- X
- X XMapWindow(display, win);
- X! /* initialize random (used to determine next stage_nb) */
- X! srandom( time( 0 ) );
- X
- X get_playground( argc, argv );
- X
- X--- 355,368 ----
- X class_hints.res_name = "XBlockbuster";
- X class_hints.res_class = "XBlockbuster";
- X
- X! XStringListToTextProperty(&prog_name, 1, &window_name);
- X! XSetWMProperties(display, win, &window_name, &window_name,
- X argv,argc, &size_hints, &wm_hints, &class_hints);
- X
- X
- X XMapWindow(display, win);
- X! /* initialize random (used to determine next stage) */
- X! SRAND( time( 0 ) );
- X
- X get_playground( argc, argv );
- X
- X***************
- X*** 337,339 ****
- X--- 376,394 ----
- X
- X
- X }
- X+
- X+ #ifdef SYSV
- X+
- X+ /* Most SysV's don't have a usleep. Sone of them have select. */
- X+
- X+ usleep( usecs )
- X+ int usecs;
- X+ {
- X+ struct timeval timeout;
- X+
- X+ timeout.tv_sec = usecs / 1000000;
- X+ timeout.tv_usec = usecs % 1000000;
- X+ select( 0, 0, 0, 0, &timeout );
- X+ }
- X+
- X+ #endif /*SYSV*/
- Xdiff -cr xblockbuster1.00/xblockbuster.h xblockbuster1.01/xblockbuster.h
- X*** xblockbuster1.00/xblockbuster.h Fri Mar 12 23:48:43 1993
- X--- xblockbuster1.01/xblockbuster.h Sat Mar 20 03:27:34 1993
- X***************
- X*** 10,17 ****
- X
- X #include <stdio.h>
- X #include <pwd.h>
- X- /*#include <sys/file.h>
- X- #include <ctype.h>*/
- X #include <math.h>
- X #include <X11/Xlib.h>
- X #include <X11/Xutil.h>
- X--- 10,15 ----
- X***************
- X*** 18,24 ****
- X--- 16,40 ----
- X #include <X11/Xos.h>
- X #include <X11/Xatom.h>
- X
- X+ /*
- X+ * SYSTEM DEPENDENT OPTIONS
- X+ */
- X
- X+ /* STAGEDIR should, in general, be defined in the (I)Makefile */
- X+ #ifndef STAGEDIR
- X+ #define STAGEDIR "/usr/games/lib/blockbuster"
- X+ #endif
- X+
- X+ #define FONT "10x20"
- X+
- X+ #define RAND() random()
- X+ #define SRAND(n) srandom(n)
- X+
- X+ /* You may need to uncomment some of these if your system does not have
- X+ * them. If you need to do so, please let me know, so I can put them
- X+ * in an #ifdef/#endif clause to make it easier for others.
- X+ */
- X+
- X /*
- X * #define M_PI 3.14159265358979323846
- X * #define M_PI_2 1.57079632679489661923
- X***************
- X*** 28,38 ****
- X #define M_SQRT2_2 0.70710678118654752440
- X #define NEAR_HORIZONTAL 0.7 /* < M_PI_4 */
- X
- X Display *display;
- X Window win;
- X! GC gc, gc_erase, gc_xor,gc_color;
- X XFontStruct *font_info;
- X! int screen_num, font_width, font_height;
- X
- X /*** windowing objects ***/
- X
- X--- 44,56 ----
- X #define M_SQRT2_2 0.70710678118654752440
- X #define NEAR_HORIZONTAL 0.7 /* < M_PI_4 */
- X
- X+ /* Nothing below here should need to be changed. */
- X+
- X Display *display;
- X Window win;
- X! GC gc, gc_erase, gc_color,gc_xor;
- X XFontStruct *font_info;
- X! int screen_num, font_width, font_height,extra_draw;
- X
- X /*** windowing objects ***/
- X
- X***************
- X*** 129,134 ****
- X--- 147,155 ----
- X */
- X } ball1, ball2, ball3;
- X
- X+ /* Macro to draw a ball */
- X+
- X+
- X int launch_quadrant;/* enumeration { NE, NW } */
- X int launch_row, launch_col;
- X double launch_x, launch_y;
- X***************
- X*** 177,190 ****
- X
- X /*** score and stages files ***/
- X
- X! #define PATH_LENGTH 64
- X
- X char *login;
- X char playground[PATH_LENGTH];
- X
- X- #ifndef STAGEDIR
- X- #define STAGEDIR "/usr/games/lib/blockbuster"
- X- #endif
- X
- X #define SCOREFILE "%s/scores"
- X #define NB_SCORES 12
- X--- 198,208 ----
- X
- X /*** score and stages files ***/
- X
- X! #define PATH_LENGTH 512
- X
- X char *login;
- X char playground[PATH_LENGTH];
- X
- X
- X #define SCOREFILE "%s/scores"
- X #define NB_SCORES 12
- XCommon subdirectories: xblockbuster1.00/STAGES/save and xblockbuster1.01/STAGES/save
- XCommon subdirectories: xblockbuster1.00/STAGES.try/save and xblockbuster1.01/STAGES.try/save
- XCommon subdirectories: xblockbuster1.00/STAGES.wacko/save and xblockbuster1.01/STAGES.wacko/save
- X*** xblockbuster1.00/xblockbuster.man Wed Mar 10 18:12:19 1993
- X--- xblockbuster1.01/xblockbuster.man Tue Mar 23 00:32:13 1993
- X***************
- X*** 87,92 ****
- X--- 87,96 ----
- X find yourself outside the window, halting play.
- X For this reason the horizontal crosshair is shown at the window border,
- X helping you to keep track of the mouse.
- X+ .LP
- X+ By design, the pointer is invisible while in the XBlockBuster window.
- X+ I found that a visible pointer in the window was very distracting
- X+ during play.
- X .SH "CREATION OF PLAY GROUNDS"
- X A private play ground can be created in any directory.
- X The stages can be defined from the ascii map codes using any text editor
- X
- X--------------(END OF FILE)-------------------------------------------------
- X
- END_OF_FILE
- if test 38741 -ne `wc -c <'xblockbuster.patch'`; then
- echo shar: \"'xblockbuster.patch'\" unpacked with wrong size!
- fi
- # end of 'xblockbuster.patch'
- fi
- echo shar: End of archive 1 \(of 1\).
- cp /dev/null ark1isdone
- MISSING=""
- for I in 1 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have the archive.
- rm -f ark[1-9]isdone
- else
- echo You still must unpack the following archives:
- echo " " ${MISSING}
- fi
- exit 0
- exit 0 # Just in case...
- --
- // chris@IMD.Sterling.COM | Send comp.sources.x submissions to:
- \X/ Amiga - The only way to fly! |
- "It's intuitively obvious to the most | sources-x@imd.sterling.com
- casual observer..." |
-