home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-09-03 | 54.5 KB | 1,569 lines |
- Newsgroups: comp.sources.x
- From: jck@kimba.catt.citri.edu.au (Justin Kibell)
- Subject: v20i127: xboing - a simple blockout type game, Part20/26
- Message-ID: <1993Sep3.123527.8324@sparky.sterling.com>
- X-Md4-Signature: e2f2151bbe34c7ac2355c8b856df41aa
- Sender: chris@sparky.sterling.com (Chris Olson)
- Organization: Sterling Software
- Date: Fri, 3 Sep 1993 12:35:27 GMT
- Approved: chris@sterling.com
-
- Submitted-by: jck@kimba.catt.citri.edu.au (Justin Kibell)
- Posting-number: Volume 20, Issue 127
- Archive-name: xboing/part20
- Environment: X11, xpm, color
-
- #! /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: Imakefile audio/NCDaudio.c bitmaps/titleN.xpm
- # bitmaps/titleO.xpm bitmaps/titleX.xpm inst.c misc.c score.c
- # sounds/ammo.au.uue
- # Wrapped by chris@sparky on Fri Sep 3 07:14:48 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 20 (of 26)."'
- if test -f 'Imakefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Imakefile'\"
- else
- echo shar: Extracting \"'Imakefile'\" \(4222 characters\)
- sed "s/^X//" >'Imakefile' <<'END_OF_FILE'
- X#*****************************************************************************
- X#
- X# (c) Copyright 1993, Justin C. Kibell, All Rights Reserved
- X# email: jck@citri.edu.au
- X#
- X# Permission to use, copy, modify, and distribute this software and its
- X# documentation without written agreement is hereby granted. You cannot sell
- X# this software without written permission from the author. This entire
- X# copyright notice must appear in all copies of this software.
- X#
- X# IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
- X# SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF
- X# THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE AUTHOR HAS BEEN ADVISED
- X# OF THE POSSIBILITY OF SUCH DAMAGE.
- X#
- X# THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED
- X# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- X# PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE
- X# AUTHOR HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
- X# ENHANCEMENTS, OR MODIFICATIONS.
- X#
- X#*****************************************************************************
- X
- X# Imakefile for xboing version 1.6 - 6th August 1993
- X
- X# This is the directory where the highscore and level data will be placed.
- XXBOING_DIR = .
- X
- XCC = cc
- XCCOPTIONS = -Bstatic
- X
- X#CC = gcc
- X#CCOPTIONS = -static -DFUNCPROTO -Wall
- X
- XXPMLIB = -L/usr/lib -lXpm
- XXPMINCLUDE = -I/usr/include/X11
- XLEVEL_INSTALL_DIR = $(XBOING_DIR)/levels
- XSOUNDS_DIR = $(XBOING_DIR)/sounds
- XHIGH_SCORE_FILE = $(XBOING_DIR)/xboing.scores
- XAUDIO_AVAILABLE = False
- X
- X#ifdef HPArchitecture
- XCCOPTIONS = -Aa -D_HPUX_SOURCE
- XAUDIO_AVAILABLE = True
- X#endif /* HPArchitecture */
- X
- X#ifdef MultimaxArchitecture
- XCCOPTIONS = -q -nosb -q ext=parallel
- X#endif /* MultimaxArchitecture */
- X
- X#ifdef i860Architecture
- XSYS_LIBRARIES = -lnsl
- X#endif /* i860Architecture */
- X
- X#ifdef SGIArchitecture
- XSYS_LIBRARIES = -lbsd -lsun
- XCCOPTIONS = -ansi
- X#endif /* SGIArchitecture */
- X
- X#ifdef SparcArchitecture
- XAUDIO_AVAILABLE = True
- X#if (OSMajorVersion==4)
- XAUDIO_INCLUDE = -I/usr/demo/SOUND/multimedia
- XAUDIO_LIB = -L/usr/demo/SOUND -laudio
- X#endif
- X#if (OSMajorVersion==5)
- XAUDIO_INCLUDE = -I/usr/demo/SOUND/include/multimedia
- XAUDIO_LIB = -L/usr/demo/SOUND/lib -laudio
- X#endif
- X#endif /* SparcArchitecture */
- X
- XEXTRA_INCLS = $(XPMINCLUDE) $(AUDIO_INCLUDE)
- X
- XDEFINES = $(EXTRA_INCLS) \
- X -DHIGH_SCORE_FILE=\"$(HIGH_SCORE_FILE)\" \
- X -DLEVEL_INSTALL_DIR=\"$(LEVEL_INSTALL_DIR)\" \
- X -DAUDIO_AVAILABLE=\"$(AUDIO_AVAILABLE)\" \
- X -DSOUNDS_DIR=\"$(SOUNDS_DIR)\"
- X
- XLOCAL_LIBRARIES = $(AUDIO_LIB) $(XPMLIB) $(XLIB) -lm
- X
- XDEPLIBS = $(DEPXLIB)
- X
- XSRCS1= version.c main.c score.c error.c ball.c blocks.c init.c \
- X stage.c level.c paddle.c mess.c intro.c bonus.c sfx.c \
- X highscore.c misc.c inst.c gun.c keys.c audio.c special.c \
- X presents.c
- X
- XOBJS1= version.o main.o score.o error.o ball.o blocks.o init.o \
- X stage.o level.o paddle.o mess.o intro.o bonus.o sfx.o \
- X highscore.o misc.o inst.o gun.o keys.o audio.o special.o \
- X presents.o
- X
- XPROGRAMS = xboing
- X
- Xall:: $(PROGRAMS)
- X @$(RM) version.c
- X @echo "xboing built successfully."
- X
- Xversion.c:
- X @./version.sh $(PROGRAMS)
- X
- XComplexProgramTarget_1($(PROGRAMS), $(LOCAL_LIBRARIES), )
- X
- Xinstall:: $(PROGRAMS)
- X @echo "XBoing directory is " $(XBOING_DIR)
- X
- X @echo "Creating directory " $(XBOING_DIR)
- X @if [ ! -d $(XBOING_DIR) ]; then mkdir $(XBOING_DIR); fi
- X
- X @echo "Creating directory " $(LEVEL_INSTALL_DIR)
- X @if [ ! -d $(LEVEL_INSTALL_DIR) ]; then mkdir $(LEVEL_INSTALL_DIR); fi
- X
- X @echo "Copying level data into directory " $(LEVEL_INSTALL_DIR)
- X @cd ./levels; set -x; for file in *.data; do \
- X $(INSTALL) -c $(INSTDATFLAGS) $$file $(LEVEL_INSTALL_DIR); \
- X done
- X
- X if [ $(AUDIO_AVAILABLE) ]
- X @echo "Creating directory " $(SOUNDS_DIR)
- X @if [ ! -d $(SOUNDS_DIR) ]; then mkdir $(SOUNDS_DIR); fi
- X
- X @echo "Copying sound files into directory " $(SOUNDS_DIR)
- X @cd ./sounds; set -x; for file in *.au; do \
- X $(INSTALL) -c $(INSTDATFLAGS) $$file $(SOUNDS_DIR); \
- X done
- X fi
- X
- X @echo "Creating a highscore file " $(HIGH_SCORE_FILE)
- X @touch $(HIGH_SCORE_FILE);
- X @chmod a+rw $(HIGH_SCORE_FILE);
- X
- X# End of the XBoing Imakefile :-)
- END_OF_FILE
- if test 4222 -ne `wc -c <'Imakefile'`; then
- echo shar: \"'Imakefile'\" unpacked with wrong size!
- fi
- chmod +x 'Imakefile'
- # end of 'Imakefile'
- fi
- if test -f 'audio/NCDaudio.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'audio/NCDaudio.c'\"
- else
- echo shar: Extracting \"'audio/NCDaudio.c'\" \(4654 characters\)
- sed "s/^X//" >'audio/NCDaudio.c' <<'END_OF_FILE'
- X#include "copyright.h"
- X
- X/* NCD Audio format - original code by Dave Lemke <lemke@verbosa.ncd.com> */
- X
- X/*
- X * Include file dependencies:
- X */
- X
- X#include <stdio.h>
- X#include <audio/audiolib.h>
- X#include <audio/soundlib.h>
- X
- X#include "audio.h"
- X
- X/*
- X * Internal variable declarations:
- X */
- X
- X#define MAX_SOUNDS 64
- X
- XAuServer *aud = NULL;
- XAuDeviceID device;
- Xstatic int audio_on = False;
- Xstatic int num_sounds = 0;
- Xstatic char errorString[255];
- X
- Xstatic struct
- X{
- X char *name;
- X char *filename;
- X void *private;
- X} sound_table[MAX_SOUNDS];
- X
- Xtypedef struct
- X{
- X int playing;
- X AuBucketID bucket;
- X} audioRec, *audioPtr;
- X
- X#if NeedFunctionPrototypes
- Xint SetUpAudioSystem(Display *display)
- X#else
- Xint SetUpAudioSystem(display)
- X Display *display;
- X#endif
- X{
- X int i;
- X char *displayname = XDisplayString(display);
- X
- X if (audio_on)
- X return True;
- X
- X /* try and connect to the NCD audio server */
- X if (!(aud = AuOpenServer(displayname, 0, NULL, 0, NULL, NULL)))
- X {
- X ErrorMessage("Error: Cannot connect to NCD audio server.");
- X return False;
- X }
- X
- X /* Look for an audio device that we can use */
- X for (i = 0; i < AuServerNumDevices(aud); i++)
- X {
- X if ((AuDeviceKind(AuServerDevice(aud, i)) ==
- X AuComponentKindPhysicalOutput) &&
- X AuDeviceNumTracks(AuServerDevice(aud, i)) == 1)
- X {
- X device = AuDeviceIdentifier(AuServerDevice(aud, i));
- X break;
- X }
- X }
- X
- X /* Well we didn't get a device - all busy? */
- X if (!device)
- X {
- X ErrorMessage("Error: Cannot obtain NCD audio device.");
- X AuCloseServer(aud);
- X return False;
- X }
- X
- X#if defined(SOUNDLIB_VERSION) && SOUNDLIB_VERSION >= 2
- X AuSoundRestartHardwarePauses = AuFalse;
- X#endif
- X
- X /* Success - we have an audio device */
- X audio_on = True;
- X return True;
- X}
- X
- X#if NeedFunctionPrototypes
- Xvoid FreeAudioSystem(void)
- X#else
- Xvoid FreeAudioSystem()
- X#endif
- X{
- X /* truly turning it off gets ugly, with old events being lost */
- X audio_on = False;
- X}
- X
- X#if NeedFunctionPrototypes
- Xvoid setNewVolume(unsigned int Volume)
- X#else
- Xvoid setNewVolume(Volume)
- X unsigned int Volume;
- X#endif
- X{
- X /* Do nothing here as we don't need too */
- X}
- X
- X#if NeedFunctionPrototypes
- Xstatic void doneCB(AuServer *aud, AuEventHandlerRec *handler, AuEvent *event, audioPtr info)
- X#else
- Xstatic void doneCB(aud, handler, event, info)
- X AuServer *aud;
- X AuEventHandlerRec *handler;
- X AuEvent *event;
- X audioPtr info;
- X#endif
- X{
- X info->playing = False;
- X}
- X
- X#if NeedFunctionPrototypes
- Xvoid audioDevicePlay(char *filename, int volume, void **private)
- X#else
- Xvoid audioDevicePlay(filename, volume, private)
- X char *filename;
- X int volume;
- X void **private;
- X#endif
- X{
- X audioPtr *info = (audioPtr *) private;
- X
- X if (!*info)
- X {
- X if (!(*info = (audioPtr) malloc(sizeof(audioRec))))
- X {
- X sprintf(errorString,
- X "Warning: Cannot malloc memory for sound file %s.", filename);
- X ErrorMessage(errorString);
- X return;
- X }
- X
- X (*info)->playing = 0;
- X (*info)->bucket = AuSoundCreateBucketFromFile(aud, filename,
- X AuAccessAllMasks, NULL, NULL);
- X }
- X
- X if ((*info)->bucket && (!(*info)->playing))
- X {
- X (*info)->playing = 1;
- X AuSoundPlayFromBucket(aud, (*info)->bucket, device,
- X AuFixedPointFromFraction(volume, 100),
- X (void (*)) doneCB, (AuPointer) * info, 1, NULL, NULL, NULL, NULL);
- X
- X /* Flush sound */
- X AuFlush(aud);
- X }
- X}
- X
- X#if NeedFunctionPrototypes
- Xvoid audioDeviceEvents(void)
- X#else
- Xvoid audioDeviceEvents()
- X#endif
- X{
- X if (aud) AuHandleEvents(aud);
- X}
- X
- X#if NeedFunctionPrototypes
- Xvoid playSoundFile(char *filename, int volume)
- X#else
- Xvoid playSoundFile(filename, volume)
- X char *filename;
- X int volume;
- X#endif
- X{
- X int i;
- X char fbuf[1024];
- X char *str;
- X
- X /* Loop through the sound table looking for sound */
- X for (i = 0; i < num_sounds; i++)
- X {
- X if (!strcmp(sound_table[i].name, filename))
- X {
- X /* Yeah - already in sound table */
- X break;
- X }
- X }
- X
- X /* Ok - not found so add it to the sound table */
- X if (i == num_sounds)
- X {
- X /* new one - so add it to the table */
- X sound_table[num_sounds].name = strdup(filename);
- X
- X /* Use the environment variable if it exists */
- X if ((str = getenv("XBOING_SOUND_DIR")) != NULL)
- X sprintf(fbuf, "%s/%s.au", str, filename);
- X else
- X sprintf(fbuf, "%s/%s.au", SOUNDS_DIR, filename);
- X
- X sound_table[num_sounds].filename = strdup(fbuf);
- X num_sounds++;
- X }
- X
- X audioDevicePlay(sound_table[i].filename, volume, &sound_table[i].private);
- X}
- X
- X#if NeedFunctionPrototypes
- Xvoid SetMaximumVolume(int Volume)
- X#else
- Xvoid SetMaximumVolume(Volume)
- X int Volume;
- X#endif
- X{
- X}
- END_OF_FILE
- if test 4654 -ne `wc -c <'audio/NCDaudio.c'`; then
- echo shar: \"'audio/NCDaudio.c'\" unpacked with wrong size!
- fi
- # end of 'audio/NCDaudio.c'
- fi
- if test -f 'bitmaps/titleN.xpm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitmaps/titleN.xpm'\"
- else
- echo shar: Extracting \"'bitmaps/titleN.xpm'\" \(6834 characters\)
- sed "s/^X//" >'bitmaps/titleN.xpm' <<'END_OF_FILE'
- X/* XPM */
- Xstatic char * titleN_xpm[] = {
- X/* width height ncolors chars_per_pixel */
- X"85 74 8 1",
- X/* colors */
- X" s None c None",
- X". c #802F00",
- X"X c #A06000",
- X"o c #903F10",
- X"O c #F0D040",
- X"+ c #D09E20",
- X"@ c #F0C030",
- X"# c #C07F10",
- X/* pixels */
- X" ",
- X".Xoooooooooooooooooooooooooo .Xoooooooooooooooooooooooooooo ",
- X"XOO+++++++++++++++++++++++++X XOO+++++++++++++++++++++++++++X",
- X"XOO@+++++++++++++++++++++@@@+X XOO@+++++++++++++++++++++++++# ",
- X"XOOO@+++++++++++++++++++@OOOOO# XOOO@+++++++++++++++++++++++#X.",
- X"XOOOO++++++++++++++@@@@@@OOOOO+X XOOOO++++++++++++++++++++++#XX ",
- X"XOOOOO@+++++++++++@OOOOOOOOOOOOO# XOOOOO@+++++++++++++++++++#XXX.",
- X"XOOOOO+XXXXXXXXX++OOOOOOOOOOOOOO+X XOOOOO+XXXXXXX##+@#XXXXX##XXXX ",
- X"XOOOOO#.........#OOOOOOOOOOOOOOOOO# XOOOOO#.......oX+O#.....oXXXXXX",
- X"XOOO+#oo....o###+O+#+OOOOOOOOOOOOO+X XOOO+#oo...oo..X#O+#Xoo...XXXX ",
- X"XOOO#.......#OOOOO#.#OOOOOOOOOOOOOOO# XOOO#......ooXXo#OOO+Xo....XXX.",
- X"XO+#oo..o###+OOOOO#.o#+OOOOOOOOOOOOO+X XO+#oo....ooX.oo#@@O++X..oo.XX.",
- X"XO#.o...#OOOOOO@OO#...#OOOOOOOOOOOOOOO# XO#.o....XXXXooo#@@@OO+XX....X ",
- X" # . #+OOO@@@O#...o#+OOOOOOOOOOOOO+X # . .X.oooo#@@OOO# . . .. ",
- X" XOO@@O@O#...o.#OOOOOOOOOOOOOOO# Xoooo#@@+OOX ",
- X" XO@@@@OO#.....o#+OOOOOOOOOOOOO+X .oooXo#O@@@OX ",
- X" X@@O@@OO#o......#OOOOOOOOOOOOOOO# .ooXXX+@@@@Oo ",
- X" X@@O@OOO#oo.....o#+OOOOOOOOOOOOO+X XoXXX#@@@@@X ",
- X" X@OOOOOO+Xo.....o.#OOOOOOOOOOOOOOO# oXooXX+@@@@@X ",
- X" X@OOOOOO+Xo.......o#+OOOOOOOOO@+@O+X ..XoXo#@@@@OX ",
- X" X@@OOOOO+o.o.ooo..o.#OOOOOOOOO+#+OOO# .ooXXo#@@@@OX ",
- X" XOOOOOOO+Xo.oooo....o#+O@+@OOO@+++@O#o XXXXo#O@@@OX ",
- X" XOOOOOOO+X.o.ooo...oo.#O+#+OOOOO+#+O+#o .XXXXX+O@@OOX ",
- X" XOOOOOOO+Xoo...o......o#++OOOO@+++OO@++X .XXXXX+@OO@OX ",
- X" XOOOO@OO+X.o..........o.#OOOOO+#+OOOOOOO# .XXXXX#@OOOOX ",
- X" XOOOOOO@+XXooo..........X#++@O+#+OOOOOOO+X .XXX#X+@@OOOX ",
- X" XOOOOOOO+XXXXo......ooooooX#+O+#+OOOOOOOOO# .XX###+@OOOOX ",
- X" XOOOOOOO+oXXo......o.ooooooX+O@+OO@+@O@+++#X .XX###+O@OOOX ",
- X" XOOOOOOO+XXXo.....oo...ooooo#OOOOO+#+O+###+O# .XX###+OOOOOX ",
- X" XO@+@OOO+XXXo ....ooooooooooX#++@O@++++++#+++X .X####+OOOOOX ",
- X" XO+#+OOO+oXX. .oooooooooooooo.o#+OOO+#+O+###+O# .#####+OOOOOX ",
- X" o+++OOOO+XXX. ..ooooooooooooooX+O@++#+++#++++#X .#####+O@+@OX ",
- X" o#+OOOOO+XXX ooooooooooooooo#O+#######+O+#+O# .#####+O+#+OX ",
- X" o#++OOOO+XX#o . ooooooooooooooX#####++++++++@+#o .####+@++#+OX ",
- X" .###+OOO+###. .ooooooooooXXoooX###+OOO@#+O+###o .###+O+###+OX ",
- X" .###++@O+###. ..oooooooXXoXoooX#+@++++#+O+###Xo .#++OO+###+OX ",
- X" .#####+O+###. ooooooooXXXoooo#O+#####+O+#####o .#+OOO+###+OX ",
- X" .#####+O+#++o ..oooooXXXoooooX#####++@++++###Xo#+++OO+###++o ",
- X" .+####+O+#+OX .XoooooXooooooooX###+O+#@O+#####+O+#+O+#####o ",
- X" .XXX#X+O@#+OX .oooXXXXoooooooX###+O+#+O@++++#+OO+OO+#####o ",
- X" .XXXXX+O+#+OX .ooXXXoooooXXooXX#+O@#+OOOOO+#+OOOOO+#####. ",
- X" .XXXXX+O@+++X ..XXoXoXoXXoooXX##++#++@O@++#+OOOOO+#####. ",
- X" .XXXXX+OOO@#o .XooXXXXXXooXXXX######+O+###+@OOOO+#####. ",
- X" .XXXXo+O@+##o ..ooXXXXXooooXXX#####+++###+O@OOO+#####. ",
- X" .#XXXX+O+###o .ooXXXXXXooooXXo##########+OOOOO+XX###. ",
- X" .#XXXX+O@+++o ..XXXXXXooXXXXXX#########++@O@O+X###X. ",
- X" .XXXXX+OOOOOX .XXXXXXXXXXXXXXo##########+@OO+###XX. ",
- X" .XXXXX+OOOOOX .oXXXXXXXXXXXXXX#########+@@@+#X##X. ",
- X" .XXXXo+OOOOOX .XXXXXXXXXXXXXXo########+@@@#X##XX. ",
- X" X.X.X+OO@OOX ..XXXXXXXXXX#XXXX######+@@@+X###X. ",
- X" .ooooo#OO@@OX .XXXXXXXXX##XXXX######+@@@+###XX. ",
- X" ooooo+O@OOOX ..XXXX#XXXX#XXXXX####++@@+X#XXX. ",
- X" .ooooX+OOOOOX o##X##XXXXXXXXXX######+@#XXXXX. ",
- X" ..oXXX+OOOOOX .XoX##XXXX#X#X#X#####+@+XXXXX. ",
- X" .XXXXX+OOO@Oo .XX####XX#####XXX###+@#XXXXX. ",
- X" .oooXo+O@@@OX .X####X#####X#X####+O+oXXXX. ",
- X" oXooo#OO@@@o .#########XXX#####+O#ooXXX. ",
- X" o+oooo#OO@@OX .X####X####X####X+O+oXXXX. ",
- X" XO+ooo#OO@@@X .###XX####XXX#XX+O+XXXXX. ",
- X" .XooooXX+O+#Xo#OO@@@+XooooooXX .X##X#####X###X++#XXoXo. ",
- X" XOO+++OOOOOO#o+OO@@OOOO++++++OX o###############XXXooo ",
- X" XOO@+++@+@@O+#+OOOOOO++++++@++o .X##############Xoooo. ",
- X" XOOO@+++++@OOOOOOOOO++++++@O+X .#############XXoooo ",
- X" XOOOO++++++@OOOOOOO@+++++@++#X. .X#########++#Xoooo. ",
- X" XOOOOOO++++++OOOOO@+++++@O+XXX o#########+O#ooooo. ",
- X" XOOOOO+XXXXX######XXXXXX#+#XXX. .X#######+O#ooooo ",
- X" XOOOOO#...............o.oXXXXX .#######+O#ooooo. ",
- X" XOOO+#oo..................XXXX. .X###++@O+ooooo. ",
- X" XOOO#......................XXXo o###+OOO+Xoooo ",
- X" XO+#oo....................o.XX .X#+O+#XoXooo. ",
- X" XO#.o.......................oX. .#+O#...oXXo. ",
- X" # . . . . . . . . . .. oX#oo...ooo. ",
- X" oo.....oX. ",
- X" "};
- END_OF_FILE
- if test 6834 -ne `wc -c <'bitmaps/titleN.xpm'`; then
- echo shar: \"'bitmaps/titleN.xpm'\" unpacked with wrong size!
- fi
- # end of 'bitmaps/titleN.xpm'
- fi
- if test -f 'bitmaps/titleO.xpm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitmaps/titleO.xpm'\"
- else
- echo shar: Extracting \"'bitmaps/titleO.xpm'\" \(6699 characters\)
- sed "s/^X//" >'bitmaps/titleO.xpm' <<'END_OF_FILE'
- X/* XPM */
- Xstatic char * titleO_xpm[] = {
- X/* width height ncolors chars_per_pixel */
- X"83 74 9 1",
- X/* colors */
- X" s None c None",
- X". c #A06000",
- X"X c #F0D040",
- X"o c #F0C030",
- X"O c #D09E20",
- X"+ c #802F00",
- X"@ c #903F10",
- X"# c #C07F10",
- X"$ c black",
- X/* pixels */
- X" .XoOOOOOOOOOOOOOoX. ",
- X" .XOOOOOOOOOOOOOOoX. ",
- X" +.@@@@@@OOoOOOOOOOOOOOOOOo#@@@@@.. ",
- X" .XXOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoX# ",
- X" +@@@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX#@@@ ",
- X" @OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. ",
- X" +@@@#OOOOOOOOOOOOoOo#.........OoOoOOOOOOOOOOOO#@@@ ",
- X" @OOOOOOOOOOOOOOOoXXX#+++++@+++#XXXoOOXOOOOOOOOOOOO. ",
- X" +.@@#OOOOOOOOOOOOo#..###@@++++++++@###..OXoOOOOOOOOOOO#@.. ",
- X" .XXOOOOOOXOOOOOOoX#+@+++++++++++++++++++#XXoOOOOOOOOOOOOoX# ",
- X" +@OXoOoOOOXooOO#...#@@++++++++++++++++++++@######OOOOOOOOoOo#. ",
- X" @OOXooooXooooo#.@+@+@+++++++++++++++++++++++++@.#OOXOOOXXOoOOX. ",
- X" +@#OooooooooOOOO.+@++++++++++++ + + ++++++++++++@@.#OooOOOoooOXX#@ ",
- X" @OooooooooooOO#.++@+++++++++++ ++++++++++++@@.OoOOOOOXooooOO. ",
- X" +.#OooooooooooO#..+@++++++++$+ + + ++++++@+++@@@##OOOOOoXooooo#@ ",
- X" .XXoooooooooooO.+@+++++++++++ ++++@@++++@..OooOoooOoXooOO. ",
- X" @oooooooooooO##+.@@++++++++ +++@@+++@@++@.OOOoooooooooO. ",
- X" .Xoooooooooo#..@@@@@@@@@@@ ++@@@@@@++++@.OoooooooXoXo. ",
- X" +.OoooooooooooO+@@@@@@@@@@+ + ++@@@@@@+@+@@#ooooXoooXooO@ ",
- X" .ooooooooooooo#@@@@@@@@@@@+ @@@@@@@@@++#XXXXXoooXXooX# ",
- X" .ooXoooooooXO#@@@@@@@@@@+ + @@@@@.@@@+.#OXXooXooooXO. ",
- X" .oooooooooXX#@@@@@@@@@@@+ +..@@.@@@@@@#oooXXooXXXX. ",
- X" +.OooooooXoOXX#@@@@@@@@@@@+ +.@@...@@@@@#XoXXXXoooooO@ ",
- X" .oooooooXXoXXX#@@@@@@@@@..+ +.+@..@@@@@@#XXXXXXXooXXXX# ",
- X" .XXoXooooXoXO#.@@@@@.@@@++ ++@@.@.@@@@#OOXXXXXoooXXo@ ",
- X" .XXXXoooOXXX#@@#.......@ +@@@@.@@@@@.OXXXXXoooXoX. ",
- X" .XXXXooXXXoXO@@@.....@.@+ .@@@.@.@.@@OXXXXXXoXXXX. ",
- X" .XXXXXXXXXXXO..@@....@@.+ +.@@@@.....@#XXXXXXXXXoX. ",
- X"+.OXXXoOoXXXXXO.@......@..+ +..@.@.....@OXXXXXXXXXXXO. ",
- X".XXXXXO#OXXXXXO...........+ +.......###.OXXXXXXXXXXXXX#",
- X"@OXXoOO#OXoOOO#......#..++ ++.........#OOOOOOOoXXXXX.",
- X"@#OXO###OXO#...##@..##..+ +O...........#####OXXXXX.",
- X"+#OXO###OOOOO@.##.....#.+ +#.....#.#..#OO###OXoOoX.",
- X"+#OXO#####OXO.##.......#+ +#....####..OXO###OXO#OX.",
- X"+OOOO#####OOO.###.#...##+ +###.#.####.#OOOO#OOOooX.",
- X"+####################..#+ +#############oXO###OXXX.",
- X"+###########OOO###OO####+ +#############OOO###OOOO@",
- X"+###########OXO###OXO###+ +#######################@",
- X"+###########OXO#OOOOO###+ +#OO######OOO##########.@",
- X"+O.#########OXO#OXO#####+ +#OXO#####OXO#########..+",
- X"+###....####OOOOXXoOOOOO. +#OOOo##OOOOO######.###.+",
- X"+###.....#####OXXXXXXXXX. +###OXO#OXo#######..####+",
- X"+#.##..#.#.##OXXXXXXXXoO@ @OOooXO#OOOOO######..#.#+",
- X"+..#..##....OXXXXXXXXXO#@ .XXXXXO###OXO########...+",
- X"+.###.#.##.#OXXXXXXXXXoO#. +.OOXXXXoOOOXXO.#.#.##....+",
- X"+#####...###OXXXXXXXXXXXXX# .XO#OXXXXXXXXXO......##...+",
- X" +...#.####.OXXoXXXXXoXXXX. .XXOoXXXXXXXXXO......#..++ ",
- X" +...####..OXXoXXXXXooXXX. .XXXXXXXXXXXXXO.........+ ",
- X" +.........#OOooXXXooooXX. .XXXXXXXXXXXO##.........+ ",
- X" +.....@@@...OooXXXXoooXX. .ooXXXXXXXXX#@@.........+ ",
- X" +..+.......@#XXXXoXooooXO. +.OooXXXXXXooXO@.........@+ ",
- X" +.+@......@@#XXXXooXXooXXX. .ooooooooXXooXO.........@@ ",
- X" @+@@@.@...@#OOXoooXoooXoX. .oooXOXoooXoO#.@.@.@.@..@+ ",
- X" @@@@@@.@@@.OoooooooooXX. .ooooXooXoXXO@@@@@@@@@@.+ ",
- X" +@@.@....@@@#OoooooooooXO@ +.OooXOoooooOO#@@@@@@.@.@@+ ",
- X" +@@.....@@@@.#OoooooooooXX. .oooooXoXooXO#...@@@@....@ ",
- X" ++.@.@.@@@@@.OooooOoOooOo#. +.OooXoooooooX#..@@@@@@.@.++ ",
- X" +..@@@@@@@@@#XXooOOOOoOOoX. .XXoooooooooXoO@@@@@@@@@@@ ",
- X" ++@@@@@@@@@@.#OooOoOoooOOOO. +.OXoXOXOOooooO#.@@@@@@@@@@++ ",
- X" @@@@@@@@@@@@@#XXoooooOOOOOX. .XXoooXooOOooX#@@@@@@@@@@@++ ",
- X" + @@@@@@@+@@@@.#OXoOoOOOOooo#@@@ +.@@OOoOOOOOOOoXO#.@@@@+@@@@@@+ + ",
- X" +@@@@@+++@@@@+#XoOOOOOOooXOOOO. .XXOOOOOOOOOOOoX#@@@@@++@@@@@@+ ",
- X" ++@@@@+@@@@@+.#OoOOOOOOoOOOOO#@@@@@OOOOOOOOOOOOOXO#@@@+@++++@+++ ",
- X" @@@@@@@@@@@@@#XoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoX.@@++++++++++++ ",
- X" ++@++++@+@@@@@##.#oOOOOOOOOOOOOOOOOOOOOOOOoO.##@@+++++++++++ ",
- X" @@+++++@@++++++#XoOOOOOOOOOOOOOOOOOOOOOoX#@++@@@@++++++++ ",
- X" + +@+++++@++++++.##.OooOOOOOOOOOOOOoOo#..#@@+++++++++++++ + ",
- X" +@++++++++++++@@@@#XXXoOOOOOOOOOoXXX#+@+@++++++++++@@+ ",
- X" + ++++++++++++@+@@###...........###@@++++++++++++++ + ",
- X" +++++++++++++++++@+++++++++++++++++++++++++++ ",
- X" + + ++++++++++++++++++++++++++++++++++++ + + ",
- X" +++++++++++++++++++++++++++++++++ ",
- X" + + + +++++++++++++++++++ + + ",
- X" @+++++++++++++++++ "};
- END_OF_FILE
- if test 6699 -ne `wc -c <'bitmaps/titleO.xpm'`; then
- echo shar: \"'bitmaps/titleO.xpm'\" unpacked with wrong size!
- fi
- # end of 'bitmaps/titleO.xpm'
- fi
- if test -f 'bitmaps/titleX.xpm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitmaps/titleX.xpm'\"
- else
- echo shar: Extracting \"'bitmaps/titleX.xpm'\" \(5798 characters\)
- sed "s/^X//" >'bitmaps/titleX.xpm' <<'END_OF_FILE'
- X/* XPM */
- Xstatic char * titleX_xpm[] = {
- X/* width height ncolors chars_per_pixel */
- X"71 74 8 1",
- X/* colors */
- X" s None c None",
- X". c #A06000",
- X"X c #903F10",
- X"o c #F0D040",
- X"O c #D09E20",
- X"+ c #F0C030",
- X"@ c #C07F10",
- X"# c #802F00",
- X/* pixels */
- X" ",
- X" ",
- X"..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....XXXXXXXXXXXXXXXXXXXXXXXXXXX ",
- X"oooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO+ooo+OOOOOOOOOOOOOOOOOOOOOOOOOOO.",
- X"ooo+OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO+OOOooO+OOOOOOOOOOOOOOOOOOOOOOOO@ ",
- X"oooo+OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO+oO.Oooo+OOOOOOOOOOOOOOOOOOOOOOO@.#",
- X"oooo++OOOOOOOOOOOOOOOOOOOOOOOOOOOOO+OO@.OooooOOOOOOOOOOOOOOOOOOOOOO@.. ",
- X"oooooo+OOOOOOOOOOOOOOOOOOOOOOOOOOO+oO...Oooooo+OOOOOOOOOOOOOOOOOOO@...#",
- X"ooooooO...........OOO.............@O@...OoooooO..................@.... ",
- X"oooooo@###########@o@#############X.....Oooooo@#################X......",
- X"ooooO@XX####X@@@@.Oo@##X###########X#...OoooO@XX######X@@.@@XX##X#.... ",
- X"oooo@#######@ooooo++@XXX############....Oooo@########XOooooo@######...#",
- X"ooO@XX##X@@@Oooo+++oO@.XXXXXX#########..OoO@XX####XXXX@o++ooO@@@XXX#..#",
- X"oo@#####@oooo+++++ooooO.....XX#######XX.Oo@######X#.XX@++++ooooo@##XX. ",
- X"..X # # @ooo+++o+++oooOO@...XXX#XXX## # X. X###XX..@@Oo++ooooO.X # # ",
- X" .oo++++oo+ooooooO....XXXX.XX# #XX..XX.O+++oooooo. ",
- X" @Oooooo++ooooooOX.@...X.@.X# # XX..XX.OO+++ooooO. ",
- X" .oooooo++oooo+@.@@@@@..@@.# #.@.XXXX@oo+++oooo. ",
- X" XO+oooOOOO+ooo+O@@@..@@@..X# ##....#@@Oo+OOO+oO. ",
- X" X@OoooO@@@OoooooO@..@@@@@@..# #.......OoooO@@@Oo. ",
- X" X@O+oO@@@OOOO+o+OO.@@@@@@@.@.......@OOooOOOOO@. ",
- X" X@OoO@@@@@@@OoooO@@@@@@@@@OoO...@@OoooO@Oooo. ",
- X" X@OO@@@OOO@OOOOOOOOOOOOO@OoO.@OOOOOOO@@OOO. ",
- X" X@@@@@OoO@@@@@+oooooooO@OoOOOoooOO...@@@X ",
- X" #..@@@O@@@@@.@Ooooo+OO.OoO@Oo+O@.@.@@XX ",
- X" #..@@.@@@@..@@OoooO@..OoO@OoO....@..# ",
- X" #...@.@@@.@...Oooo+O@.@OOOOO@.X..@## ",
- X" #....@@@......OoooooO.@@+oO...#XX.# ",
- X" ##..........@@OOoo+O..@@O@.X.X.## ",
- X" #.XXXXX....@..O+++@.@@....XX..# ",
- X" ##.XX.X.X.@.X@@OoOOOO@..XXXX# ",
- X" #....XXXX..XX.O+ooooO.XXXX ",
- X" #X...X.X.XXX..O+ooO@@X.X.@X ",
- X" XX.....XXXXX.Oooo@XXXXX@o. ",
- X" ##..X.X.XXXX.@oooO@@@@@O+@. ",
- X" #.XXXXXXXXXX@oooo++++++o+o. ",
- X" ##X.@@@@@@@@@@@O+++++++++O. ",
- X" #X@o++++oo@#XX@+++++o++++o. ",
- X" X@O+++++O@.#XXOoo+o++++o++O. ",
- X" .oo++o++@XX#X.Ooooooo+++++oo@ ",
- X" #.Ooo+++O@.XX#X.@@Oooo+++o+o+o. ",
- X" .oooo+++@XX@X#X.XX@oooo++oooo+X ",
- X" #.Ooo+o+O@.XXXXX.XX..@+ooo+O+oooO. ",
- X" .oooo+++@XXXXX..XX..XX@oooO@Oooooo@ ",
- X" #.OO+oo+oo@XXXXXX@..X..X@@OOOOOO+o+O.X ",
- X" .oO@OoooooO.XXXX.@......XX.@Oo+@OoO@@@X ",
- X" X@OOOooooOO@...XXX@........@O+OOOoo+OO@@. ",
- X" #@@@OoooooO....@.#X.......@@OoO@OoooooO@Oo@ ",
- X" #.@@@OO+o+O@...@.X .....@...@OO@@Oo+OOOO@Oo@X ",
- X" #@O@@@@@OoO@...@..X #@@..@..@@..@@OoO@@@@@OoO@X ",
- X" X.@@@@.@@@O@@@.@..# #.OO@@.@@@O@@OOO@@@@@OOO..X ",
- X" #..@@@...O...@@@..X .oO@@@@@OoO@@@@@@@@@@@...@X ",
- X" #....@.@.OO@.@@@@. .OO@OOO@OOO@OO@@@@@@@@...@# ",
- X" #O@@@....@OoOO@@@@X X@@@OoO@@@@@OoO..@@@@@@...# ",
- X" #.@.@....@@OOO@@@XX X.@OOOOO@@@OO@.@....@.@..## ",
- X" #@O@.......@@@@@@@X X@@@OoO@@@@@@X..XXX..@....# ",
- X" X........@OOOO@@@XX #@O+o+OOOOOOO.X.X...@....## ",
- X" #...XXX...OoooO@@@# .oooooo+oo++@XXXX.......#X# ",
- X" #....#....@OOO+oO@X# .Ooooo++o++O@@X..X.X.X..XX. ",
- X" .oO.XXX...OoO@OoO@# .ooo++++++ooO...XXXX..XXOo@ ",
- X"XX..OoOO.XX.@OOo+Ooo+O@.X. #..XXX@+Oo++o+o+ooOO@X.XXX.OO@OoO.X",
- X"OO+oooooOXXX@ooooooooo+OOO. .o+OOOOOOOOooooo++oo@XXXXX@oooooooo",
- X"OOO+Oo+oO@.X@ooooo++OoOOO@X .oo+OOOOOOO++Oooo+oo@XXX.@+o++OoO+O",
- X"OOOOOOOooo@X@ooooo+OOOOO@. .ooo+OOOOOOOOO+ooo++@XXX@ooo+OOOOOO",
- X"+OOOOOO+++O@Ooo+O+OOOO@@..# .ooooOOOOOOOOOO++OooO@@@O+O+OOOOOOO",
- X"oooOOOOOOOOoooOOOOOOOO@...X .ooooooOOOOOOOOOOO+ooooo+OOOOOOOOO+",
- X"ooOX......@@@@@..@..@@.... .oooooO...........@@@@@@..........@",
- X"oo@XX###############X.....# .ooooo@###################X##X####X",
- X"@@X#################XX....# .oooO@XX##########################X",
- X"######################X...# .ooo@##############################",
- X"#######################XX.# .oO@XX#############################",
- X"########################X.# .o@#X##############################",
- X" # # # # # # # # # # # # # @ # # # # # # # # # # # # # ",
- X" "};
- END_OF_FILE
- if test 5798 -ne `wc -c <'bitmaps/titleX.xpm'`; then
- echo shar: \"'bitmaps/titleX.xpm'\" unpacked with wrong size!
- fi
- # end of 'bitmaps/titleX.xpm'
- fi
- if test -f 'inst.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'inst.c'\"
- else
- echo shar: Extracting \"'inst.c'\" \(6857 characters\)
- sed "s/^X//" >'inst.c' <<'END_OF_FILE'
- X#include "copyright.h"
- X
- X/*
- X * Include file dependencies:
- X */
- X
- X#include <stdio.h>
- X#include <stdlib.h>
- X#include <stddef.h>
- X#include <math.h>
- X#include <X11/Xlib.h>
- X#include <X11/Xutil.h>
- X#include <X11/Xos.h>
- X#include <xpm.h>
- X
- X#include "error.h"
- X#include "highscore.h"
- X#include "misc.h"
- X#include "main.h"
- X#include "init.h"
- X#include "stage.h"
- X#include "bonus.h"
- X#include "special.h"
- X#include "blocks.h"
- X#include "ball.h"
- X#include "score.h"
- X#include "paddle.h"
- X#include "level.h"
- X#include "mess.h"
- X#include "version.h"
- X#include "intro.h"
- X#include "audio.h"
- X#include "keys.h"
- X
- X#include "inst.h"
- X
- X/*
- X * Internal macro definitions:
- X */
- X
- X#define GAP 12
- X
- X/*
- X * Internal type declarations:
- X */
- X
- X#if NeedFunctionPrototypes
- Xvoid SetInstructWait(int newMode, int waitFrame);
- Xstatic void DoSparkle(Display *display, Window window);
- Xvoid DoInstructWait(void);
- X#else
- Xstatic void DoSparkle();
- Xvoid SetInstructWait();
- Xvoid DoInstructWait();
- X#endif
- X
- X/*
- X * Internal variable declarations:
- X */
- X
- Xstatic int endFrame = 0;
- Xstatic int nextFrame = 0;
- Xenum InstructStates InstructState;
- Xstatic int waitingFrame, waitMode;
- X
- X#if NeedFunctionPrototypes
- Xvoid SetUpInstructions(Display *display, Window window, Colormap colormap)
- X#else
- Xvoid SetUpInstructions(display, window, colormap)
- X Display *display;
- X Window window;
- X Colormap colormap;
- X#endif
- X{
- X /* Umm. Reset the instructions to default state */
- X ResetInstructions();
- X}
- X
- X#if NeedFunctionPrototypes
- Xstatic void DoText(Display *display, Window window)
- X#else
- Xstatic void DoText(display, window)
- X Display *display;
- X Window window;
- X#endif
- X{
- X char string[80];
- X int y;
- X
- X SetCurrentMessage(display, messWindow, "UNIX Power!", False);
- X
- X DrawShadowCentredText(display, window, titleFont,
- X "- Instructions -", 140, red, PLAY_WIDTH);
- X
- X y = 190;
- X
- X DrawLine(display, window, 32, y+2, PLAY_WIDTH - 28, y+2, black, 3);
- X DrawLine(display, window, 30, y, PLAY_WIDTH - 30, y, white, 3);
- X y += textFont->ascent + GAP/3;
- X
- X strcpy(string,
- X "XBoing is a blockout type game where you must use");
- X DrawShadowCentredText(display, window, textFont,
- X string, y, yellow, PLAY_WIDTH);
- X y += textFont->ascent + GAP;
- X
- X strcpy(string,
- X "the paddle to bounce the ball around the play field and");
- X DrawShadowCentredText(display, window, textFont,
- X string, y, yellow, PLAY_WIDTH);
- X y += textFont->ascent + GAP;
- X
- X strcpy(string,
- X "destroy the blocks. The Boing Master will rule the world.");
- X DrawShadowCentredText(display, window, textFont,
- X string, y, yellow, PLAY_WIDTH);
- X y += textFont->ascent + GAP;
- X y += textFont->ascent + GAP / 2;
- X
- X strcpy(string, "You can collect bullets and use them to shoot out");
- X DrawShadowCentredText(display, window, textFont,
- X string, y, green, PLAY_WIDTH);
- X y += textFont->ascent + GAP;
- X
- X strcpy(string, "blocks or bonus coins. You have a limited supply of");
- X DrawShadowCentredText(display, window, textFont,
- X string, y, green, PLAY_WIDTH);
- X y += textFont->ascent + GAP;
- X
- X strcpy(string,
- X "bullets which can be replenished by hitting an");
- X DrawShadowCentredText(display, window, textFont,
- X string, y, green, PLAY_WIDTH);
- X y += textFont->ascent + GAP;
- X
- X strcpy(string,
- X "ammunition block. You can shoot your ball. Beware.");
- X DrawShadowCentredText(display, window, textFont,
- X string, y, green, PLAY_WIDTH);
- X y += textFont->ascent + GAP;
- X y += textFont->ascent + GAP / 2;
- X
- X strcpy(string, "If you collect more than 10 bonus coins on a level,");
- X DrawShadowCentredText(display, window, textFont,
- X string, y, tann, PLAY_WIDTH);
- X y += textFont->ascent + GAP;
- X
- X strcpy(string, "you will be rewarded with a super bonus of 50,000.");
- X DrawShadowCentredText(display, window, textFont,
- X string, y, tann, PLAY_WIDTH);
- X y += textFont->ascent + GAP;
- X
- X DrawLine(display, window, 32, y+2, PLAY_WIDTH - 28, y+2, black, 3);
- X DrawLine(display, window, 30, y, PLAY_WIDTH - 30, y, white, 3);
- X
- X strcpy(string, "Press <Space> to start game");
- X DrawShadowCentredText(display, window, textFont, string,
- X PLAY_HEIGHT - 40, tann, PLAY_WIDTH);
- X}
- X
- X#if NeedFunctionPrototypes
- Xstatic void DoSparkle(Display *display, Window window)
- X#else
- Xstatic void DoSparkle(display, window)
- X Display *display;
- X Window window;
- X#endif
- X{
- X static Pixmap store;
- X static int x = 100;
- X static int y = 20;
- X static int in = 0;
- X
- X if (frame >= endFrame)
- X InstructState = INSTRUCT_FINISH;
- X
- X if (!store)
- X {
- X store = XCreatePixmap(display, window, 20, 20,
- X DefaultDepth(display, XDefaultScreen(display)));
- X }
- X
- X if (in == 0)
- X XCopyArea(display, window, store, gc, x, y, 20, 20, 0, 0);
- X
- X if (frame == nextFrame)
- X {
- X RenderShape(display, window, stars[in], starsM[in],
- X x, y, 20, 20, False);
- X
- X in++;
- X nextFrame = frame + 15;
- X
- X if (in == 11)
- X {
- X XCopyArea(display, store, window, gc, 0, 0, 20, 20, x, y);
- X in = 0;
- X nextFrame = frame + 500;
- X x = (rand() % 474) + 5;
- X y = (rand() % 74) + 5;
- X }
- X }
- X}
- X
- X#if NeedFunctionPrototypes
- Xstatic void DoFinish(Display *display, Window window)
- X#else
- Xstatic void DoFinish(display, window)
- X Display *display;
- X Window window;
- X#endif
- X{
- X ResetKeys();
- X mode = MODE_KEYS;
- X
- X if (noSound == False)
- X playSoundFile("weeek", 100);
- X}
- X
- X
- X#if NeedFunctionPrototypes
- Xvoid Instructions(Display *display, Window window)
- X#else
- Xvoid Instructions(display, window)
- X Display *display;
- X Window window;
- X#endif
- X{
- X switch (InstructState)
- X {
- X case INSTRUCT_TITLE:
- X DoIntroTitle(display, window);
- X InstructState = INSTRUCT_TEXT;
- X break;
- X
- X case INSTRUCT_TEXT:
- X DoText(display, window);
- X InstructState = INSTRUCT_SPARKLE;
- X break;
- X
- X case INSTRUCT_SPARKLE:
- X DoSparkle(display, window);
- X if ((frame % FLASH) == 0)
- X RandomDrawSpecials(display);
- X break;
- X
- X case INSTRUCT_FINISH:
- X DoFinish(display, window);
- X break;
- X
- X case INSTRUCT_WAIT:
- X DoInstructWait();
- X break;
- X
- X default:
- X break;
- X }
- X}
- X
- X#if NeedFunctionPrototypes
- Xvoid RedrawInstructions(Display *display, Window window)
- X#else
- Xvoid RedrawInstructions(display, window)
- X Display *display;
- X Window window;
- X#endif
- X{
- X DoIntroTitle(display, window);
- X DoText(display, window);
- X}
- X
- X#if NeedFunctionPrototypes
- Xvoid FreeInstructions(Display *display)
- X#else
- Xvoid FreeInstructions(display)
- X Display *display;
- X#endif
- X{
- X}
- X
- X#if NeedFunctionPrototypes
- Xvoid ResetInstructions(void)
- X#else
- Xvoid ResetInstructions()
- X#endif
- X{
- X InstructState = INSTRUCT_TITLE;
- X nextFrame = frame + 100;
- X endFrame = frame + 4000;
- X}
- X
- X#if NeedFunctionPrototypes
- Xvoid SetInstructWait(int newMode, int waitFrame)
- X#else
- Xvoid SetInstructWait(newMode, waitFrame)
- X int newMode;
- X int waitFrame;
- X#endif
- X{
- X waitingFrame = waitFrame;
- X waitMode = newMode;
- X InstructState = INSTRUCT_WAIT;
- X}
- X
- X#if NeedFunctionPrototypes
- Xvoid DoInstructWait(void)
- X#else
- Xvoid DoInstructWait()
- X#endif
- X{
- X if (frame == waitingFrame)
- X InstructState = waitMode;
- X}
- END_OF_FILE
- if test 6857 -ne `wc -c <'inst.c'`; then
- echo shar: \"'inst.c'\" unpacked with wrong size!
- fi
- # end of 'inst.c'
- fi
- if test -f 'misc.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'misc.c'\"
- else
- echo shar: Extracting \"'misc.c'\" \(5689 characters\)
- sed "s/^X//" >'misc.c' <<'END_OF_FILE'
- X#include "copyright.h"
- X
- X/*
- X * Include file dependencies:
- X */
- X
- X#include <stdio.h>
- X#include "init.h"
- X#include "stage.h"
- X
- X#include "misc.h"
- X
- X/*
- X * Internal macro definitions:
- X */
- X
- X/*
- X * Internal type declarations:
- X */
- X
- X/*
- X * Internal variable declarations:
- X */
- X
- Xstatic Pixmap backStore = (Pixmap) NULL;
- X
- X#if NeedFunctionPrototypes
- Xvoid DrawLine(Display *display, Window window, int x, int y, int x2, int y2,
- X int colour, int width)
- X#else
- Xvoid DrawLine(display, window, x, y, x2, y2, colour, width)
- X Display *display;
- X Window window;
- X int x;
- X int y;
- X int x2;
- X int y2;
- X int colour;
- X int width;
- X#endif
- X{
- X /* Change the width of the line */
- X XSetLineAttributes(display, gcxor, width, LineSolid, CapProjecting,
- X JoinMiter);
- X XSetLineAttributes(display, gcand, width, LineSolid, CapProjecting,
- X JoinMiter);
- X
- X /* Set to the desired colours */
- X XSetBackground(display, gcxor, colour);
- X XSetForeground(display, gcxor, colour);
- X
- X /* Now draw the line */
- X XDrawLine(display, window, gcxor, x, y, x2, y2);
- X XDrawLine(display, window, gcand, x, y, x2, y2);
- X XDrawLine(display, window, gcxor, x, y, x2, y2);
- X}
- X
- X#if NeedFunctionPrototypes
- Xvoid DrawShadowCentredText(Display *display, Window window, XFontStruct *font,
- X char *string, int y, int colour, int width)
- X#else
- Xvoid DrawShadowCentredText(display, window, font, string, y, colour, width)
- X Display *display;
- X Window window;
- X XFontStruct *font;
- X char *string;
- X int y;
- X int colour;
- X int width;
- X#endif
- X{
- X int plen, len, x;
- X
- X /* String length */
- X len = strlen(string);
- X
- X /* Length of string in pixels */
- X plen = XTextWidth(font, string, len);
- X
- X /* Start drawing so the text is centered */
- X x = (width / 2) - (plen / 2);
- X
- X /* Draw the text with a shadow */
- X DrawText(display, window, x+2, y + 2, font, black, string, -1);
- X DrawText(display, window, x, y, font, colour, string, -1);
- X}
- X
- X#if NeedFunctionPrototypes
- Xvoid DrawShadowText(Display *display, Window window, XFontStruct *font,
- X char *string, int x, int y, int colour)
- X#else
- Xvoid DrawShadowText(display, window, font, string, x, y, colour)
- X Display *display;
- X Window window;
- X XFontStruct *font;
- X char *string;
- X int x;
- X int y;
- X int colour;
- X#endif
- X{
- X int len;
- X
- X /* String length */
- X len = strlen(string);
- X
- X /* Draw the text with a shadow */
- X DrawText(display, window, x+2, y + 2, font, black, string, -1);
- X DrawText(display, window, x, y, font, colour, string, -1);
- X}
- X
- X#if NeedFunctionPrototypes
- Xvoid DrawText(Display *display, Window window, int x, int y, XFontStruct *font,
- X int colour, char *text, int numChar)
- X#else
- Xvoid DrawText(display, window, x, y, font, colour, text, numChar)
- X Display *display;
- X Window window;
- X int x;
- X int y;
- X XFontStruct *font;
- X int colour;
- X char *text;
- X int numChar;
- X#endif
- X{
- X int len = strlen(text);
- X
- X /* If numchar is passed > 0 then only draw numChar characters */
- X if (numChar > 0)
- X len = numChar;
- X
- X /* Change to the new font */
- X XSetFont(display, gcxor, font->fid);
- X XSetFont(display, gcand, font->fid);
- X
- X /* Change the drawing function */
- X XSetBackground(display, gcxor, colour);
- X XSetForeground(display, gcxor, colour);
- X
- X /* Draw the string into the drawable */
- X XDrawString(display, window, gcxor, x, y + font->ascent, text, len);
- X XDrawString(display, window, gcand, x, y + font->ascent, text, len);
- X XDrawString(display, window, gcxor, x, y + font->ascent, text, len);
- X}
- X
- X#if NeedFunctionPrototypes
- Xvoid RenderShape(Display *display, Window window, Pixmap pixmap,
- X Pixmap mask, int x, int y, int w, int h, int clear)
- X#else
- Xvoid RenderShape(display, window, pixmap, mask, x, y, w, h, clear)
- X Display *display;
- X Window window;
- X Pixmap pixmap;
- X Pixmap mask;
- X int x;
- X int y;
- X int w;
- X int h;
- X int clear;
- X#endif
- X{
- X
- X /* This backing store is used to render into and then we can just copy
- X * this pixmap onto the drawable like normal - sort of double buffering
- X * as you would see the object being xored anded etc on screen otherwise.
- X */
- X if (backStore == (Pixmap) NULL)
- X {
- X if (!(backStore = XCreatePixmap(display, window,
- X PLAY_WIDTH, PLAY_HEIGHT,
- X DefaultDepth(display, XDefaultScreen(display)))))
- X {
- X ShutDown(display, 1, "Cannot create pixmap in RenderShape().");
- X }
- X }
- X
- X if (clear)
- X XClearArea(display, window, x, y, w, h, False);
- X
- X /* Copy the current window area into the backing store */
- X XCopyArea(display, window, backStore, gc, x, y, w, h, 0, 0);
- X
- X /* Draw the pixmap into backing store */
- X XCopyArea(display, pixmap, backStore, gcxor, 0, 0, w, h, 0, 0);
- X XCopyPlane(display, mask, backStore, gcand, 0, 0, w, h, 0, 0, 1L);
- X XCopyArea(display, pixmap, backStore, gcxor, 0, 0, w, h, 0, 0);
- X
- X /* Write the backing store back to the window */
- X XCopyArea(display, backStore, window, gc, 0, 0, w, h, x, y);
- X}
- X
- X
- X#if NeedFunctionPrototypes
- Xvoid FreeMisc(Display *display)
- X#else
- Xvoid FreeMisc(display)
- X Display *display;
- X#endif
- X{
- X /* Now free the backing store pixmap */
- X if (backStore) XFreePixmap(display, backStore);
- X}
- X
- X#if NeedFunctionPrototypes
- Xint ColourNameToPixel(Display *display, Colormap colormap, char *colourName)
- X#else
- Xint ColourNameToPixel(display, colormap, colourName)
- X Display *display;
- X Colormap colormap;
- X char *colourName;
- X#endif
- X{
- X XColor colour;
- X
- X /* Obtain the exact colour from the colour name */
- X if (XParseColor(display, DefaultColormap(display,
- X XDefaultScreen(display)), colourName, &colour) != 0)
- X {
- X /* Now allocate the colour */
- X XAllocColor(display, colormap, &colour);
- X
- X /* Return the pixel id */
- X return colour.pixel;
- X }
- X
- X /* Obviously a problem so barf */
- X ShutDown(display, 1, "Error while parsing colours.");
- X
- X /* Not reached */
- X return 1;
- X}
- END_OF_FILE
- if test 5689 -ne `wc -c <'misc.c'`; then
- echo shar: \"'misc.c'\" unpacked with wrong size!
- fi
- # end of 'misc.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'\" \(5321 characters\)
- sed "s/^X//" >'score.c' <<'END_OF_FILE'
- X#include "copyright.h"
- X
- X/*
- X * Include file dependencies:
- X */
- X
- X#include <stdio.h>
- X#include <stdlib.h>
- X#include <stddef.h>
- X#include <X11/Xlib.h>
- X#include <X11/Xutil.h>
- X#include <X11/Xos.h>
- X#include <xpm.h>
- X
- X#include "bitmaps/digit0.xpm"
- X#include "bitmaps/digit1.xpm"
- X#include "bitmaps/digit2.xpm"
- X#include "bitmaps/digit3.xpm"
- X#include "bitmaps/digit4.xpm"
- X#include "bitmaps/digit5.xpm"
- X#include "bitmaps/digit6.xpm"
- X#include "bitmaps/digit7.xpm"
- X#include "bitmaps/digit8.xpm"
- X#include "bitmaps/digit9.xpm"
- X
- X#include "error.h"
- X#include "init.h"
- X#include "special.h"
- X#include "misc.h"
- X
- X#include "score.h"
- X
- X/*
- X * Internal macro definitions:
- X */
- X
- X#define NUM_DIGITS 10
- X
- X/*
- X * Internal type declarations:
- X */
- X
- X/*
- X * Internal variable declarations:
- X */
- X
- XPixmap digitPixmaps[NUM_DIGITS];
- XPixmap digitPixmapsM[NUM_DIGITS];
- X
- Xu_long score = 0L;
- X
- X
- X#if NeedFunctionPrototypes
- Xvoid InitialiseScoreDigits(Display *display, Window window, Colormap colormap)
- X#else
- Xvoid InitialiseScoreDigits(display, window, colormap)
- X Display *display;
- X Window window;
- X Colormap colormap;
- X#endif
- X{
- X XpmAttributes attributes;
- X int XpmErrorStatus;
- X
- X attributes.valuemask = XpmColormap;
- X attributes.colormap = colormap;
- X
- X /* Create all xpm pixmap digits from the files */
- X XpmErrorStatus = XpmCreatePixmapFromData(display, window, digit0_xpm,
- X &digitPixmaps[0], &digitPixmapsM[0], &attributes);
- X HandleXPMError(display, XpmErrorStatus, "InitialiseScoreDigits()");
- X
- X XpmErrorStatus = XpmCreatePixmapFromData(display, window, digit1_xpm,
- X &digitPixmaps[1], &digitPixmapsM[1], &attributes);
- X HandleXPMError(display, XpmErrorStatus, "InitialiseScoreDigits()");
- X
- X XpmErrorStatus = XpmCreatePixmapFromData(display, window, digit2_xpm,
- X &digitPixmaps[2], &digitPixmapsM[2], &attributes);
- X HandleXPMError(display, XpmErrorStatus, "InitialiseScoreDigits()");
- X
- X XpmErrorStatus = XpmCreatePixmapFromData(display, window, digit3_xpm,
- X &digitPixmaps[3], &digitPixmapsM[3], &attributes);
- X HandleXPMError(display, XpmErrorStatus, "InitialiseScoreDigits()");
- X
- X XpmErrorStatus = XpmCreatePixmapFromData(display, window, digit4_xpm,
- X &digitPixmaps[4], &digitPixmapsM[4], &attributes);
- X HandleXPMError(display, XpmErrorStatus, "InitialiseScoreDigits()");
- X
- X XpmErrorStatus = XpmCreatePixmapFromData(display, window, digit5_xpm,
- X &digitPixmaps[5], &digitPixmapsM[5], &attributes);
- X HandleXPMError(display, XpmErrorStatus, "InitialiseScoreDigits()");
- X
- X XpmErrorStatus = XpmCreatePixmapFromData(display, window, digit6_xpm,
- X &digitPixmaps[6], &digitPixmapsM[6], &attributes);
- X HandleXPMError(display, XpmErrorStatus, "InitialiseScoreDigits()");
- X
- X XpmErrorStatus = XpmCreatePixmapFromData(display, window, digit7_xpm,
- X &digitPixmaps[7], &digitPixmapsM[7], &attributes);
- X HandleXPMError(display, XpmErrorStatus, "InitialiseScoreDigits()");
- X
- X XpmErrorStatus = XpmCreatePixmapFromData(display, window, digit8_xpm,
- X &digitPixmaps[8], &digitPixmapsM[8], &attributes);
- X HandleXPMError(display, XpmErrorStatus, "InitialiseScoreDigits()");
- X
- X XpmErrorStatus = XpmCreatePixmapFromData(display, window, digit9_xpm,
- X &digitPixmaps[9], &digitPixmapsM[9], &attributes);
- X HandleXPMError(display, XpmErrorStatus, "InitialiseScoreDigits()");
- X
- X /* Free the xpm pixmap attributes */
- X XpmFreeAttributes(&attributes);
- X}
- X
- X#if NeedFunctionPrototypes
- Xstatic void DrawDigit(Display *display, Window window, int digit, int x, int y)
- X#else
- Xstatic void DrawDigit(display, window, digit, x, y)
- X Display *display;
- X Window window;
- X int digit;
- X int x;
- X int y;
- X#endif
- X{
- X /* Draw the digit in the window */
- X RenderShape(display, window,
- X digitPixmaps[digit], digitPixmapsM[digit], x, y, 30, 40, True);
- X}
- X
- X#if NeedFunctionPrototypes
- Xvoid DrawOutNumber(Display *display, Window window, u_long score, int x, int y)
- X#else
- Xvoid DrawOutNumber(display, window, score, x, y)
- X Display *display;
- X Window window;
- X u_long score;
- X int x;
- X int y;
- X#endif
- X{
- X int digit;
- X
- X /* Get the digit that we want from the score */
- X if (score / 10)
- X DrawOutNumber(display, window, (score / 10), x - 32, y);
- X
- X /* Work out the digit needed to draw */
- X digit = (score % 10);
- X
- X DrawDigit(display, window, digit, x - 32, y);
- X}
- X
- X#if NeedFunctionPrototypes
- Xvoid AddToScore(u_long inc)
- X#else
- Xvoid AddToScore(inc)
- X u_long inc;
- X#endif
- X{
- X /* Take into account any score bonuses */
- X if (x2Bonus == True)
- X inc *= 2;
- X else if (x4Bonus == True)
- X inc *= 4;
- X
- X /* Increment the score */
- X score += inc;
- X}
- X
- X#if NeedFunctionPrototypes
- Xvoid DisplayScore(Display *display, Window window, u_long score)
- X#else
- Xvoid DisplayScore(display, window, score)
- X Display *display;
- X Window window;
- X u_long score;
- X#endif
- X{
- X /* Erase the old score in the window */
- X XClearWindow(display, window);
- X
- X /* Draw a zero if no score */
- X if (score == 0L)
- X RenderShape(display, window,
- X digitPixmaps[0], digitPixmapsM[0], 192, 0, 30, 40, True);
- X else
- X /* Draw the score digits rescursively */
- X DrawOutNumber(display, window, score, 224, 0);
- X}
- X
- X#if NeedFunctionPrototypes
- Xvoid FreeScoreDigits(Display *display)
- X#else
- Xvoid FreeScoreDigits(display)
- X Display *display;
- X#endif
- X{
- X int i;
- X
- X /* Free the memory associated with the digit pixmaps */
- X for (i = 0; i < NUM_DIGITS; i++)
- X {
- X /* Free the digits pixmap and mask */
- X if (digitPixmaps[i]) XFreePixmap(display, digitPixmaps[i]);
- X if (digitPixmapsM[i]) XFreePixmap(display, digitPixmapsM[i]);
- X }
- X}
- X
- END_OF_FILE
- if test 5321 -ne `wc -c <'score.c'`; then
- echo shar: \"'score.c'\" unpacked with wrong size!
- fi
- # end of 'score.c'
- fi
- if test -f 'sounds/ammo.au.uue' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'sounds/ammo.au.uue'\"
- else
- echo shar: Extracting \"'sounds/ammo.au.uue'\" \(2634 characters\)
- sed "s/^X//" >'sounds/ammo.au.uue' <<'END_OF_FILE'
- Xbegin 664 ammo.au
- XM+G-N9 "#_____ 0 'T ! "UM34U-34U-;6UM;6U
- XMM34U-34U-;6UM;6UM34U-34U-;6UM;6UM34U-34U-4VUM;6UM;4U-34U-36U
- XMM;6UM;4U-34U-36UM;6UM;4U-34V-C:VMK:VMK99-C8V-C:VMK:VMK8V-C8V
- XM-C9 MK:VMK:V-C8V-C8VMK:VMK:V-C8V-C<WMK:VMK:V.#@X.#@XN+BXN+BX
- XM.3DY.3HZ.KJZNKJZ.SL[.SL[N[N[O+R\O#P\/#P]/;V]O;V]O3X^/CX^/KZ^
- XMOK^_OT! 0$! 0<'!P<'!P4%$1$1$1.O$Q,7%Q<5&1D9&2$C(R,C(R,](2DI*
- XM2DK*RLK,S,Q-34U-34_/S\_/S\]/3T]/3T_/S\_/T=%34U-34U/_T='1T='1
- XM4U=75U=7U]?7V]O;6UM;6UM;V]O;V]O;6UMC8V-CW]_?W]_?8V-C8V-CY^?G
- XMY^?G:VMK:VMK____________M;4U-34U-34U-36UM;6UM;6UM34U-34U-34U
- XM-;6UM;6UM;6U-34U-34U-34UM;6UM;6UM;6U-34U-34U-36UM;6UM;6UM;4U
- XM-34U-34U-36UM;6UM;6UM34U-34U-34U-;6UM;6UM;6UM34U-34V-C8VMK:V
- XMMK:VMK:V-C8V-C8V-C:VMK:VMK:VMK8V-C8V-C8V-C:VMK:VMK:VMC8V-C8V
- XM-C8V-K:VMK:VMK:VMC8V-C8V-S<WMK:VMK:VMK:V.#@X.#@X.#@XN+BXN+BX
- XMN+@Y.3DY.3DZ.CJZNKJZNKJZNCH[.SL[.SL[.[N[N[R\O+R\O#P\/#P\/#T]
- XMO;V]O;V]O;V]/3X^/CX^/CX^OKZ^O[^_O[] 0$! 0$! 04'!P<'!P<'!P<%$
- XM1$1$1$1$1,3$Q,3%Q<7%Q49&1D9&1D9(R,C(R,C(R,C(2$I*2DI*2DI*RLK*
- XMRLS,S,Q-34U-34U-34_/S\_/S\_/ST]/3T]/3T]/3\_/S\_/T='1T5-34U-3
- XM4U-34]'1T='1T='14U-75U=75U=7U]?7U]?;V]M;6UM;6UM;6UO;V]O;V]O;
- XMV]M;6V-C8V-C8]_?W]_?W]_?WV-C8V-C8V-CY^?GY^?GY^?G:VMK:VMK:VMK
- XMM34U-34U-;6UM;6UM34U-34U-;6UM;6UM44U-34U-36UM;6UM;4U-34U-36U
- XMM;6UM;4U-34U-36UM;6UM;4U-34U-36UM;6UM;4U-34V-C:VMK:VMK99-C8V
- XM-C8VMK:VMK:V-C8V-C8VMK:VMK:V-C8V-C8VMK:VMK:V-C8V-C<WMK:VMK:V
- XM.#@X.#@XN+BXN+BX.3DY.3HZ.KJZNKJZNCL[.SL[.[N[O+R\O#P\/#P]/;V]
- XMO;V]O3T^/CX^/KZ^OK^_OT% 0$! 04'!P<'!P4%$1$1$1.O$Q,7%Q<5&1D9&
- XM1DC(R,C(R,A(2DI*2DK*RLK,S,Q-34U-34W/S\_/S\]93T]/3T]5S\_/T='1
- XM4U-34U/_T='1T='14U=75U=7U]?7V]O;6UM;6UM;V]O;V]O;6UMC8V-CW]_?
- XMW]_?=V-C8V-C8^?GY^?GYVMK:VMK:____________________^?W]W=WM;4U
- XM-34U-34U-34U-36YM;6UM;6UM;6UM;4U-34U-34U-34U-37.M;6UM;6UM;6U
- XMM;5'-34U-34U-34U-35+M:^[N[N[N[NOKZ^O.SLO+R\O+R\[.SMOKZ^[N[N[
- XMN[NOKZ_$.SLO+R\O+R\S.SL[KZ^ON[N[N[N[KZ^O.SL[+R\O+R\O.SL[KZ^O
- XMN[N[N[N[KZ^O.SL[+R\O,# P/#P\L+"PO+R\O+R\N;"P3#P\/# P,# P,#P\
- XMM["PL+R\O+R[N["P[SP\/# P,# P,#L[P["PL+N[N[N[N[&Q3#L[.S$Q,3$Q
- XM,3HZ8[&QL;&ZNKJZNKJRLCHZ.CHR,C(S,S,[Z[*SL[.ZNKJZNKJSMCL[.SLT
- XM-34U-34X.[6UM;6UN[N[N[NVMCP\/#P[-S<W.#@X/+BXN+BXO+R\O+R[N$8\
- XM/#P\.3DY.3DY/+FYN;FYO;V]O;V]O$@^/CX^/CL[.SP\/,:\O+R\O+Z^OKZ^
- XMOL,_/S\_/ST]/CX^/M6^OKZ^OL# P,# P$M!04%!04! 0$!!04G!P<'!P<'!
- XMP;JZS<TZ/#P\/#P\45%145&\O+S1T=/3T]/3T]E55555555553T^/C[9V=G9
- XMV;Z^OKZ^OKY963\_/S\_/S\_75V_O[^_O[_ X^/CX^-'04%!9V=G9V=G9V]*
- XM[^_O[^_O[^_#P\/O;V]O;V]#0T-#0T-G[\/#P\/#Q,3$Q/=O145%145%____
- XM___CQ,3$]_?W]_?W]_=*___O[^_O[^]'1T=*;V]O;V_'Q\G)R<G)Y^=)24E)
- XM24I*2N?GR<G)R<G)R6MK:VMG2DI*2]_?W]_?W]_?9V=G9V=G9V=GS<W-X^/C
- XMX^-.3T]/3T]/8V/1T='1T='1T=%C5U-34U-55>/CX^/CV]O;VUM;6UM;6UM;
- X"V]M.
- X
- Xend
- END_OF_FILE
- if test 2634 -ne `wc -c <'sounds/ammo.au.uue'`; then
- echo shar: \"'sounds/ammo.au.uue'\" unpacked with wrong size!
- fi
- # end of 'sounds/ammo.au.uue'
- fi
- echo shar: End of archive 20 \(of 26\).
- cp /dev/null ark20isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 26 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- echo "merging split files..."
- cat blocks.c[12] > blocks.c
- rm blocks.c[12]
- echo "blocks.c done"
- cat bitmaps/earth.xpm.Z.u.[ab] > bitmaps/earth.xpm.Z.uue
- rm bitmaps/earth.xpm.Z.u.[ab]
- echo "bitmaps/earth.xpm.Z.uue done"
- else
- echo You still must unpack the following archives:
- echo " " ${MISSING}
- fi
- exit 0
- exit 0 # Just in case...
- --
- // chris@Sterling.COM | Send comp.sources.x submissions to:
- \X/ Amiga - The only way to fly! | sources-x@sterling.com
- "It's intuitively obvious to the |
- most casual observer..." | GCS d+/-- p+ c++ l+ m+ s++/+ g+ w+ t+ r+ x+
-