home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!ogicse!zephyr.ens.tek.com!master!saab!billr
- From: billr@saab.CNA.TEK.COM (Bill Randle)
- Newsgroups: comp.sources.games
- Subject: v15i014: xstratego - X Windows stratego interface for two players, Part04/04
- Message-ID: <3819@master.CNA.TEK.COM>
- Date: 26 Oct 92 23:52:38 GMT
- Article-I.D.: master.3819
- Sender: news@master.CNA.TEK.COM
- Lines: 300
- Approved: billr@saab.CNA.TEK.COM
- Xref: uunet comp.sources.games:1513
-
- Submitted-by: Henk-Jan Visscher <hjvissc@cs.vu.nl>
- Posting-number: Volume 15, Issue 14
- Archive-name: xstratego/Part04
- Environment: X11, Xaw
-
-
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 4 (of 4)."
- # Contents: Makefile buzz.h icons/account_cursor.h
- # icons/account_cursor_mask.h icons/board_cursor.h
- # icons/board_cursor_mask.h icons/boat_cursor.h
- # icons/boat_cursor_mask.h icons/c.c icons/spy_s.h
- # Wrapped by billr@saab on Mon Oct 26 15:47:08 1992
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'Makefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Makefile'\"
- else
- echo shar: Extracting \"'Makefile'\" \(269 characters\)
- sed "s/^X//" >'Makefile' <<'END_OF_FILE'
- XOBJS= main.o init.o callback.o dialog.o setup.o socket.o message.o play.o \
- X buzz.o register.o
- X
- XCFLAGS= -O -I.
- X
- XTARGET=xstratego
- X
- XLIBS=-L/usr/lib/X11 -lXaw -lXmu -lXt -lX11 -lXext
- X
- X$(TARGET): $(OBJS)
- X cc -g $(OBJS) -o $(TARGET) $(LIBS)
- X
- X$(OBJS): stratego.h buzz.h
- END_OF_FILE
- if test 269 -ne `wc -c <'Makefile'`; then
- echo shar: \"'Makefile'\" unpacked with wrong size!
- fi
- # end of 'Makefile'
- fi
- if test -f 'buzz.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'buzz.h'\"
- else
- echo shar: Extracting \"'buzz.h'\" \(911 characters\)
- sed "s/^X//" >'buzz.h' <<'END_OF_FILE'
- X/*
- X * "buzz.h"
- X */
- X
- X/*
- X * Message tabel entry. Bevat pointer naar (char) message,
- X * en (relatief percentage) kans op selektie.
- X */
- Xtypedef struct {
- X char *_mesg; /* bericht (string) */
- X unsigned _chance; /* rel. % kans erop */
- X} MESSAGE;
- X
- Xextern MESSAGE move_opponent []; /* stuk van tegenpartij bewegen */
- Xextern MESSAGE move_empty []; /* lege plaats bewegen */
- Xextern MESSAGE move_flag []; /* vlag bewegen */
- Xextern MESSAGE move_bomb []; /* bom bewegen */
- Xextern MESSAGE kill_own []; /* eigen stuk slaan */
- Xextern MESSAGE illegal []; /* andere illegale zetten */
- Xextern MESSAGE finished_premature []; /* voortijdige 'F' */
- Xextern MESSAGE in_water []; /* in het water gaan staan */
- Xextern MESSAGE lose_capture []; /* bij slaan van stuk (verloren)*/
- Xextern MESSAGE win_capture []; /* bij slaan van stuk (gewonnen)*/
- X
- X/*
- X * Buzz (tabel) geeft een message uit tabel terug.
- X */
- Xchar *buzz ();
- END_OF_FILE
- if test 911 -ne `wc -c <'buzz.h'`; then
- echo shar: \"'buzz.h'\" unpacked with wrong size!
- fi
- # end of 'buzz.h'
- fi
- if test -f 'icons/account_cursor.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'icons/account_cursor.h'\"
- else
- echo shar: Extracting \"'icons/account_cursor.h'\" \(367 characters\)
- sed "s/^X//" >'icons/account_cursor.h' <<'END_OF_FILE'
- X#define account_cursor_width 16
- X#define account_cursor_height 16
- X#define account_cursor_x_hot 7
- X#define account_cursor_y_hot 7
- Xstatic char account_cursor_bits[] = {
- X 0x00, 0x00, 0x80, 0x01, 0xc0, 0x03, 0xe0, 0x07, 0x70, 0x0e, 0xd8, 0x1b,
- X 0xbc, 0x3d, 0xd6, 0x6b, 0x76, 0x6e, 0xdc, 0x3b, 0xb8, 0x1d, 0xd0, 0x0b,
- X 0x60, 0x06, 0xc0, 0x03, 0x80, 0x01, 0x00, 0x00};
- END_OF_FILE
- if test 367 -ne `wc -c <'icons/account_cursor.h'`; then
- echo shar: \"'icons/account_cursor.h'\" unpacked with wrong size!
- fi
- # end of 'icons/account_cursor.h'
- fi
- if test -f 'icons/account_cursor_mask.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'icons/account_cursor_mask.h'\"
- else
- echo shar: Extracting \"'icons/account_cursor_mask.h'\" \(392 characters\)
- sed "s/^X//" >'icons/account_cursor_mask.h' <<'END_OF_FILE'
- X#define account_cursor_mask_width 16
- X#define account_cursor_mask_height 16
- X#define account_cursor_mask_x_hot 7
- X#define account_cursor_mask_y_hot 7
- Xstatic char account_cursor_mask_bits[] = {
- X 0x80, 0x01, 0xc0, 0x03, 0xe0, 0x07, 0xf0, 0x0f, 0xf8, 0x1f, 0xfc, 0x3f,
- X 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xfc, 0x3f, 0xf8, 0x1f,
- X 0xf0, 0x0f, 0xe0, 0x07, 0xc0, 0x03, 0x80, 0x01};
- END_OF_FILE
- if test 392 -ne `wc -c <'icons/account_cursor_mask.h'`; then
- echo shar: \"'icons/account_cursor_mask.h'\" unpacked with wrong size!
- fi
- # end of 'icons/account_cursor_mask.h'
- fi
- if test -f 'icons/board_cursor.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'icons/board_cursor.h'\"
- else
- echo shar: Extracting \"'icons/board_cursor.h'\" \(807 characters\)
- sed "s/^X//" >'icons/board_cursor.h' <<'END_OF_FILE'
- X#define board_cursor_width 26
- X#define board_cursor_height 26
- X#define board_cursor_x_hot 4
- X#define board_cursor_y_hot 4
- Xstatic char board_cursor_bits[] = {
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00,
- X 0x00, 0xf0, 0x00, 0x00, 0x70, 0x78, 0x00, 0x00, 0x70, 0x7c, 0x00, 0x00,
- X 0xf8, 0x3e, 0x00, 0x00, 0xc8, 0x3f, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00,
- X 0xc0, 0x1f, 0x03, 0x00, 0xe0, 0xff, 0x01, 0x00, 0xf0, 0x7f, 0x03, 0x00,
- X 0xf8, 0x3f, 0x00, 0x00, 0xfc, 0x7c, 0x00, 0x00, 0x3e, 0xec, 0x00, 0x00,
- X 0x0e, 0xc4, 0x03, 0x00, 0x00, 0x8e, 0x03, 0x00, 0x00, 0x8a, 0x07, 0x00,
- X 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x3c, 0x00,
- X 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0xe0, 0x01,
- X 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 807 -ne `wc -c <'icons/board_cursor.h'`; then
- echo shar: \"'icons/board_cursor.h'\" unpacked with wrong size!
- fi
- # end of 'icons/board_cursor.h'
- fi
- if test -f 'icons/board_cursor_mask.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'icons/board_cursor_mask.h'\"
- else
- echo shar: Extracting \"'icons/board_cursor_mask.h'\" \(832 characters\)
- sed "s/^X//" >'icons/board_cursor_mask.h' <<'END_OF_FILE'
- X#define board_cursor_mask_width 26
- X#define board_cursor_mask_height 26
- X#define board_cursor_mask_x_hot 4
- X#define board_cursor_mask_y_hot 4
- Xstatic char board_cursor_mask_bits[] = {
- X 0x00, 0xc0, 0x01, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0xf0, 0x01, 0x00,
- X 0xf8, 0xf8, 0x01, 0x00, 0xf8, 0xfe, 0x01, 0x00, 0xf8, 0xff, 0x00, 0x00,
- X 0xfc, 0x7f, 0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00, 0xfc, 0xff, 0x07, 0x00,
- X 0xf0, 0xff, 0x07, 0x00, 0xf8, 0xff, 0x07, 0x00, 0xfc, 0xff, 0x07, 0x00,
- X 0xfe, 0xff, 0x07, 0x00, 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x07, 0x00,
- X 0x7f, 0xff, 0x07, 0x00, 0x1f, 0xff, 0x0f, 0x00, 0x00, 0xdf, 0x3f, 0x00,
- X 0x00, 0xdf, 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0x01,
- X 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0xf0, 0x03,
- X 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xc0, 0x03};
- END_OF_FILE
- if test 832 -ne `wc -c <'icons/board_cursor_mask.h'`; then
- echo shar: \"'icons/board_cursor_mask.h'\" unpacked with wrong size!
- fi
- # end of 'icons/board_cursor_mask.h'
- fi
- if test -f 'icons/boat_cursor.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'icons/boat_cursor.h'\"
- else
- echo shar: Extracting \"'icons/boat_cursor.h'\" \(453 characters\)
- sed "s/^X//" >'icons/boat_cursor.h' <<'END_OF_FILE'
- X#define boat_cursor_width 24
- X#define boat_cursor_height 16
- X#define boat_cursor_x_hot 11
- X#define boat_cursor_y_hot 7
- Xstatic char boat_cursor_bits[] = {
- X 0x00, 0x08, 0x00, 0x00, 0x1c, 0x00, 0x40, 0x0a, 0x01, 0xe0, 0x8a, 0x03,
- X 0x50, 0x4a, 0x01, 0x50, 0x5c, 0x01, 0xe0, 0x8a, 0x03, 0x50, 0x4a, 0x01,
- X 0x50, 0x4a, 0x01, 0xe0, 0x9c, 0x73, 0x41, 0x08, 0x79, 0x46, 0x08, 0x7f,
- X 0xfc, 0xff, 0x7f, 0xb8, 0x6d, 0x3b, 0xf0, 0xff, 0x1f, 0xc0, 0xff, 0x07
- X};
- END_OF_FILE
- if test 453 -ne `wc -c <'icons/boat_cursor.h'`; then
- echo shar: \"'icons/boat_cursor.h'\" unpacked with wrong size!
- fi
- # end of 'icons/boat_cursor.h'
- fi
- if test -f 'icons/boat_cursor_mask.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'icons/boat_cursor_mask.h'\"
- else
- echo shar: Extracting \"'icons/boat_cursor_mask.h'\" \(477 characters\)
- sed "s/^X//" >'icons/boat_cursor_mask.h' <<'END_OF_FILE'
- X#define boat_cursor_mask_width 24
- X#define boat_cursor_mask_height 16
- X#define boat_cursor_mask_x_hot 11
- X#define boat_cursor_mask_y_hot 7
- Xstatic char boat_cursor_mask_bits[] = {
- X 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0xf0, 0x9e, 0x03, 0xf0, 0xde, 0x03,
- X 0xf0, 0xde, 0x03, 0xf0, 0xde, 0x03, 0xf0, 0xde, 0x03, 0xf0, 0xde, 0x03,
- X 0xf0, 0xde, 0xfb, 0xf1, 0xde, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- X 0xfe, 0xff, 0xff, 0xfc, 0xff, 0x7f, 0xf8, 0xff, 0x3f, 0xf0, 0xff, 0x1f};
- END_OF_FILE
- if test 477 -ne `wc -c <'icons/boat_cursor_mask.h'`; then
- echo shar: \"'icons/boat_cursor_mask.h'\" unpacked with wrong size!
- fi
- # end of 'icons/boat_cursor_mask.h'
- fi
- if test -f 'icons/c.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'icons/c.c'\"
- else
- echo shar: Extracting \"'icons/c.c'\" \(426 characters\)
- sed "s/^X//" >'icons/c.c' <<'END_OF_FILE'
- X#include <stdio.h>
- X#include <string.h>
- X
- Xmain (argc, argv)
- Xint argc;
- Xchar *argv[];
- X{
- X int max, cnt, c;
- X char buf[100];
- X char *s, *l;
- X int offset, line = 0;
- X
- X cnt = 0;
- X while (gets (buf)) {
- X line++;
- X s = strchr (buf, '#');
- X l = strrchr (buf, '#');
- X offset = (s - buf) + 1 + (line & 0x01);
- X if (s < l) {
- X for (++s; s < l; s++) {
- X if (*s == '#' && offset & 0x01)
- X *s = '-';
- X offset++;
- X }
- X }
- X puts (buf);
- X }
- X}
- END_OF_FILE
- if test 426 -ne `wc -c <'icons/c.c'`; then
- echo shar: \"'icons/c.c'\" unpacked with wrong size!
- fi
- # end of 'icons/c.c'
- fi
- if test -f 'icons/spy_s.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'icons/spy_s.h'\"
- else
- echo shar: Extracting \"'icons/spy_s.h'\" \(1421 characters\)
- sed "s/^X//" >'icons/spy_s.h' <<'END_OF_FILE'
- X#define spy_s_width 35
- X#define spy_s_height 43
- Xstatic char spy_s_bits[] = {
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x55, 0x01, 0x00, 0x00, 0xac,
- X 0xaa, 0x06, 0x00, 0x00, 0x55, 0x55, 0x15, 0x00, 0x00, 0xab, 0xaa, 0x1a,
- X 0x00, 0x00, 0x55, 0x55, 0x15, 0x00, 0x00, 0xaa, 0xaa, 0x0a, 0x00, 0x00,
- X 0x56, 0x55, 0x0d, 0x00, 0x00, 0xac, 0xaa, 0x06, 0x00, 0x00, 0x54, 0x55,
- X 0x05, 0x00, 0x00, 0xa8, 0xaa, 0x02, 0x00, 0x00, 0x58, 0x55, 0x03, 0x00,
- X 0x00, 0x08, 0xaa, 0x02, 0x00, 0x00, 0x58, 0x54, 0x03, 0x00, 0x00, 0x84,
- X 0x02, 0x02, 0x00, 0x00, 0x06, 0x54, 0x03, 0x00, 0x00, 0xab, 0xaa, 0x06,
- X 0x00, 0x80, 0x55, 0x55, 0x0d, 0x00, 0x80, 0xaa, 0xaa, 0x1a, 0x00, 0x00,
- X 0x54, 0x15, 0x03, 0x00, 0x00, 0xa8, 0x82, 0x04, 0x00, 0x00, 0x58, 0x01,
- X 0x02, 0x00, 0x00, 0x08, 0x20, 0x02, 0x00, 0x00, 0x58, 0x14, 0x05, 0x00,
- X 0x00, 0x0c, 0xa2, 0x0a, 0x00, 0x00, 0x16, 0x51, 0x0d, 0x00, 0x00, 0x8a,
- X 0xaa, 0x1a, 0x00, 0x00, 0x16, 0x50, 0x15, 0x00, 0x00, 0x0b, 0xaa, 0x2a,
- X 0x00, 0x00, 0x55, 0x55, 0x35, 0x00, 0x80, 0xaa, 0xaa, 0x6a, 0x00, 0x00,
- X 0x56, 0x55, 0xd5, 0x00, 0x80, 0xaa, 0xaa, 0xaa, 0x00, 0x40, 0x55, 0x55,
- X 0x35, 0x00, 0xb0, 0xaa, 0xaa, 0x0a, 0x00, 0x58, 0x55, 0x55, 0x03, 0x00,
- X 0xa8, 0xaa, 0xaa, 0x00, 0x00, 0x60, 0x55, 0x55, 0x00, 0x00, 0x00, 0xab,
- X 0x2a, 0x00, 0x00, 0x00, 0x54, 0x0d, 0x00, 0x00, 0x00, 0xb0, 0x06, 0x00,
- X 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 1421 -ne `wc -c <'icons/spy_s.h'`; then
- echo shar: \"'icons/spy_s.h'\" unpacked with wrong size!
- fi
- # end of 'icons/spy_s.h'
- fi
- echo shar: End of archive 4 \(of 4\).
- cp /dev/null ark4isdone
- MISSING=""
- for I in 1 2 3 4 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 4 archives.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-