games@tekred.TEK.COM (07/02/88)
Submitted by: "Stanley T. Shebs" <shebs%defun@cs.utah.edu>
Comp.sources.games: Volume 4, Issue 102
Archive-name: xconq5/Part14
#! /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 14 (of 18)."
# Contents: curses.c dir.h lib/beirut2.scn lib/xconq.onx.u per2c.c
# side.h
# Wrapped by billr@saab on Wed Jun 29 08:56:00 1988
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f curses.c -a "${1}" != "-c" ; then
echo shar: Will not over-write existing file \"curses.c\"
else
echo shar: Extracting \"curses.c\" \(9111 characters\)
sed "s/^X//" >curses.c <<'END_OF_curses.c'
X/* Copyright (c) 1987, 1988 Stanley T. Shebs, University of Utah. */
X/* This program may be used, copied, modified, and redistributed freely */
X/* for noncommercial purposes, so long as this notice remains intact. */
X
X/* RCS $Header: curses.c,v 1.1 88/06/21 12:30:04 shebs Exp $ */
X
X/* Interface implementations for the curses version of xconq. */
X
X/* This file is rather simple, since there is no support for multiple */
X/* displays, no flashy graphics, and very little optimization. */
X
X#include "config.h"
X#include "misc.h"
X#include "period.h"
X#include "side.h"
X#include "map.h"
X#undef bool /* ugh */
X#include <curses.h>
X
X#ifdef UNIX
X#include <signal.h> /* needed for ^C handling */
X#endif UNIX
X
X#define INFOLINES 4
X
Xint helpwinlines = 1;
X
X/* Positions and sizes of the windows. */
X
Xint wx[20], wy[20], ww[20], wh[20];
Xint nextwin = 0; /* number of next window to open */
X
Xbool alreadyopen = FALSE; /* flag to prevent double opening */
X
X/* Put in a default player, probably the invoker of the program. */
X/* Nonempty host name not actually used, but needed to keep things */
X/* straight. */
X
Xadd_default_player()
X{
X add_player(TRUE, "curses");
X}
X
X/* Decide what to do about ^C interrupts. */
X
X#ifdef UNIX
X
Xstop_handler()
X{
X if (numhumans == 0 || Debug) {
X close_displays();
X exit(1);
X }
X}
X
X#endif UNIX
X
Xinit_sighandlers()
X{
X#ifdef UNIX
X signal(SIGINT, stop_handler);
X#endif UNIX
X}
X
X/* "Opening" a curses "display" just involves a standard sequence of calls. */
X/* Unfortunately, the "standard sequence" varies from system to system... */
X
Xopen_display(side)
XSide *side;
X{
X if (!alreadyopen) {
X initscr();
X nonl();
X noecho();
X#ifdef HPUX
X cbreak();
X#endif HPUX
X#ifdef BSD
X crmode();
X#endif BSD
X clear();
X side->display = 1L;
X alreadyopen = TRUE;
X return TRUE;
X } else {
X /* if we got here, we're in big trouble, so clean up quickly */
X clear();
X refresh();
X endwin();
X printf("Can't open a second display!\n");
X return FALSE;
X }
X}
X
X/* A predicate that tests whether our display can safely be written to. */
X/* This is permitted to do side-effects, although curses doesn't need */
X/* anything special. */
X
Xactive_display(side)
XSide *side;
X{
X return (side != NULL && side->host && !side->lost && side->display);
X}
X
X/* Display will use every character position we can get our hands on. */
X
Xdisplay_width(side) Side *side; { return COLS; }
X
Xdisplay_height(side) Side *side; { return LINES; }
X
X/* Displaying the world map usually requires a large bitmap display. */
X
Xworld_display(side) Side *side; { return FALSE; }
X
X/* Most sizes of things are 1 (i.e. one character cell). */
X
Xinit_misc(side)
XSide *side;
X{
X side->fw = side->fh = side->hh = side->hch = side->uw = side->uh = 1;
X side->hw = 2;
X side->bd = side->margin = 0;
X}
X
X/* The "root window" covers our entire display. In theory, the size of the */
X/* screen could exceed what xconq needs, but this is wildly improbable. */
X
Xcreate_main_window(side)
XSide *side;
X{
X create_window(side, 0, 0, COLS, LINES);
X}
X
X/* Subwindow creator. */
X
Xcreate_window(side, x, y, w, h)
XSide *side;
Xint x, y, w, h;
X{
X if (x + w > COLS) w = COLS - x;
X if (y + h > LINES) h = LINES - y;
X wx[nextwin] = x; wy[nextwin] = y;
X ww[nextwin] = w; wh[nextwin] = h;
X return (nextwin++);
X}
X
X/* Help window has to be larger than most terminals allow, so blow it off. */
X
Xcreate_help_window(side) Side *side; {}
X
X/* No special fixups to do. */
X
Xfixup_windows(side) Side *side; {}
X
Xenable_input(side) Side *side; {}
X
Xreset_misc(side) Side *side; {}
X
X/* Moving a window just involves plugging in new values. */
X
Xchange_window(side, win, x, y, w, h)
XSide *side;
Xint win, x, y, w, h;
X{
X if (x + w > COLS) w = COLS - x;
X if (y + h > LINES) h = LINES - y;
X if (x >= 0) {
X wx[win] = x; wy[win] = y;
X }
X if (w >= 0) {
X ww[win] = w; wh[win] = h;
X }
X}
X
X/* Actually, terminals are really "one-color", but don't take a chance on */
X/* confusing the main program. */
X
Xdisplay_colors(side) Side *side; { return 2; }
X
Xwhite_color(side) Side *side; { return 1; }
X
Xblack_color(side) Side *side; { return 0; }
X
X/* Can't actually honor any color requests... */
X
Xrequest_color(side, name) Side *side; char *name; { return 0; }
X
X/* Only kind of input is keystrokes, and from only one "display" at that. */
X
Xget_input()
X{
X char ch;
X extern Side *curside;
X
X if (active_display(curside)) {
X draw_cursor(curside);
X ch = getch() & 0177;
X curside->reqtype = KEYBOARD;
X curside->reqch = ch;
X return TRUE;
X }
X}
X
X/* Wait for any input, don't care what it is. */
X
Xfreeze_wait(side)
XSide *side;
X{
X refresh();
X getch();
X}
X
X/* Actually would be nice to do something reasonable here. */
X
Xflush_input(side) Side *side; {}
X
X/* Trivial abstraction - sometimes other routines like to ensure all output */
X/* actually on the screen. */
X
Xflush_output(side) Side *side; { refresh(); }
X
X/* General window clearing. */
X
Xclear_window(side, win)
XSide *side;
Xint win;
X{
X int i;
X
X if (wx[win] == 0 && wy[win] == 0 && ww[win] == COLS && wh[win] == LINES) {
X clear();
X } else {
X for (i = 0; i < ww[win]; ++i) tmpbuf[i] = ' ';
X tmpbuf[ww[win]] = '\0';
X for (i = 0; i < wh[win]; ++i) mvaddstr(wy[win]+i, wx[win], tmpbuf);
X }
X}
X
X/* No world display for curses. */
X
Xdraw_bar(side, x, y, len, color) Side *side; int x, y, len, color; {}
X
Xinvert_box(side, vcx, vcy) Side *side; int vcx, vcy; {}
X
X/* This interfaces higher-level drawing decisions to the rendition of */
X/* individual pieces of display. Note that a display mode determines */
X/* whether one or two terrain characters get drawn. */
X
Xdraw_terrain_row(side, x, y, buf, len, color)
XSide *side;
Xint x, y, len, color;
Xchar *buf;
X{
X int i, xi = x;
X
X for (i = 0; i < len; ++i) {
X if (xi >= wx[side->map] + ww[side->map] - 2) break;
X if (cur_at(side->map, xi, y)) {
X addch(buf[i]);
X addch((side->showmode == BORDERHEX ? ' ' : buf[i]));
X }
X xi += 2;
X }
X}
X
X/* Don't just position the cursor, but also clip and return the decision. */
X
Xcur_at(win, x, y)
Xint win, x, y;
X{
X if (x < 0 || x >= ww[win] || y < 0 || y >= wh[win]) {
X return FALSE;
X } else {
X move(wy[win] + y, wx[win] + x);
X return TRUE;
X }
X}
X
X/* Curses is never flashy... */
X
Xflash_position(side, x, y) Side *side; int x, y; {}
X
X/* Curses cursor drawing is quite easy! (but ineffective? - see input fns) */
X
Xdraw_cursor_icon(side, x, y)
XSide *side;
Xint x, y;
X{
X cur_at(side->map, x, y);
X refresh();
X}
X
X/* Doesn't seem to be necessary. */
X
Xdraw_hex_icon(side, win, x, y, color, ch)
XSide *side;
Xint win, x, y, color;
Xchar ch;
X{
X}
X
X/* Splash a unit character onto some window. */
X
Xdraw_unit_icon(side, win, x, y, u, color)
XSide *side;
Xint win;
Xint x, y, u, color;
X{
X if (cur_at(win, x, y)) {
X addch(utypes[u].uchar);
X addch(' '); /* inefficient, sigh */
X }
X}
X
X/* Use the second position in a "hex" for identification of enemies. */
X
Xdraw_side_number(side, win, x, y, n, color)
XSide *side;
Xint win, x, y, n, color;
X{
X if (cur_at(win, x+1, y)) addch((n == -1) ? '`' : n + '0');
X}
X
X/* Curses has enough trouble splatting stuff on the screen without doing */
X/* little flashes too... */
X
Xdraw_blast_icon(side, win, x, y, type, color)
XSide *side;
Xint win, x, y, type, color;
X{
X}
X
X/* Unfortunately, terminals usually can't flash their screens. */
X
Xinvert_whole_map(side) Side *side; {}
X
X/* Mushroom clouds don't come out real well either. */
X/* This could be a little more elaborate. */
X
Xdraw_mushroom(side, x, y, i)
XSide *side;
Xint x, y, i;
X{
X int sx, sy;
X
X xform(side, unwrap(side, x), y, &sx, &sy);
X if (cur_at(side->map, sx, sy)) {
X addstr("##");
X flush_output(side);
X if (i > 0) {
X if (cur_at(side->map, sx-1, sy+1)) addstr("####");
X if (cur_at(side->map, sx-2, sy)) addstr("######");
X if (cur_at(side->map, sx-1, sy-1)) addstr("####");
X flush_output(side);
X }
X }
X}
X
X/* Indicate that bar graphs are out of the question. */
X
Xbar_graphs(side) Side *side; { return FALSE; }
X
X/* Thus this routine can be empty. */
X
Xdraw_graph(side, number, amount, total, title)
XSide *side;
Xint number, amount, total;
X{
X}
X
X/* Drawing text is easy, as long as we can ignore the color of it. */
X/* Need to do manual clipping though. */
X
Xdraw_text(side, win, x, y, str, color)
XSide *side;
Xint win;
Xint x, y, color;
Xchar *str;
X{
X int i;
X
X if (cur_at(win, x, y)) {
X for (i = 0; i < strlen(str); ++i) {
X if (x + i >= ww[win]) return;
X addch(str[i]);
X }
X }
X}
X
X/* Can't draw lines, but this will substitute, sort of. */
X
Xdraw_scratchout(side, pos)
XSide *side;
Xint pos;
X{
X int i;
X
X for (i = 0; i < 20; i += 2) {
X if (cur_at(side->sides, i, pos)) addch('-');
X }
X}
X
X/* Beep the beeper! */
X
Xbeep(side)
XSide *side;
X{
X putchar('\007');
X}
X
X/* Most help info is printable also. */
X
Xreveal_help(side)
XSide *side;
X{
X notify(side, "Screen too small - writing into files instead.");
X do_printables(side, 0);
X return FALSE;
X}
X
Xconceal_help(side) Side *side; {}
X
X/* Shut a single display down - presumably only called once. */
X
Xclose_display(side)
XSide *side;
X{
X clear();
X refresh();
X endwin();
X}
END_OF_curses.c
if test 9111 -ne `wc -c <curses.c`; then
echo shar: \"curses.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f dir.h -a "${1}" != "-c" ; then
echo shar: Will not over-write existing file \"dir.h\"
else
echo shar: Extracting \"dir.h\" \(1146 characters\)
sed "s/^X//" >dir.h <<'END_OF_dir.h'
X/* Copyright (c) 1987, 1988 Stanley T. Shebs, University of Utah. */
X/* This program may be used, copied, modified, and redistributed freely */
X/* for noncommercial purposes, so long as this notice remains intact. */
X
X/* RCS $Header: dir.h,v 1.1 88/06/21 12:29:39 shebs Exp $ */
X
X/* Definitions for directions of the compass. */
X
X/* The terrain model is based on hexes arranged in horizontal rows. This */
X/* means that although east and west remain intact, the concepts of north */
X/* and south have basically vanished. */
X
X/* Unfortunately, not all hex-dependent definitions are here. Pathfinding */
X/* code has some knowledge of hexes also, as does map generation. */
X
X#define NUMDIRS 6
X
X#define NE 0
X#define EAST 1
X#define SE 2
X#define SW 3
X#define WEST 4
X#define NW 5
X
X#define DIRNAMES { "NE", "E", "SE", "SW", "W", "NW" }
X
X#define DIRX { 0, 1, 1, 0, -1, -1 }
X#define DIRY { 1, 0, -1, -1, 0, 1 }
X
X#define DIRCHARS "ulnbhy"
X
X#define random_dir() (random(6))
X
X#define for_all_directions(dir) for (dir = 0; dir < 6; ++dir)
X
X#define opposite_dir(d) (((d) + 3) % 6)
X
Xextern char *dirnames[];
X
Xextern int dirx[], diry[];
END_OF_dir.h
if test 1146 -ne `wc -c <dir.h`; then
echo shar: \"dir.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f lib/beirut2.scn -a "${1}" != "-c" ; then
echo shar: Will not over-write existing file \"lib/beirut2.scn\"
else
echo shar: Extracting \"lib/beirut2.scn\" \(12246 characters\)
sed "s/^X//" >lib/beirut2.scn <<'END_OF_lib/beirut2.scn'
XXconq 1 --+-++
Xlib/beirut.per
XMap 60 42 0 1 0
X26.,5=+5=+21.
X25.,,5=+3=%==21.
X..,3+.,,.,8+.7,+4=+==%3=21.
X.,+^5+,,+^^+^^+^++^^+^^+^^+^^+3=%==21.
X,++^^+^^4+^^+^^+^^+^^+^^+^^+^^+^^==%=15.6,
X++^6+3^6+3^15+=%%==10.9+
X^+3^+^^+3^=^+^^+^3+^+^^+^^+^^+^^+6=8.++3^++^+1^
X^^+^^+^^+3^=^+^^+^+3^+^^+^^+^^+^^+^==%==6.3+5^+^^1+
X13+=10+^^12+3=6.++^10+
X^^+^+3^+^++^^%^^+^^+^^+^^+^^+^^+^^+^^=%==5.+^^+^+3^+^^1+
X+^+^^+^^+^^+^^=^^+^^+^^+^^+^^+3^+^+^^+=%==4.+^^+^^+^^+^^1+
X^5+^^7+%7+^8+^+^^4+3=5.3+^^5+^1+
X^^+^^+^^+^^+^^+%^+^+3^+^^+^+3^++4^+^=%%=4.,+3^+^+^^2+
X^^+^^4+^^+^^+%^+^^+^^+^^+^^+^^+^^+^^+^^3=5.,+^^+^^+^^1+
X6+^^8+%++^^+^6+^11+=%%6.,9+
X^^+^++^^+^^+^^+^^=^+^+^+5^+5^+^^+^^+3=5.,^^+^+3^1+
X^^+^^+^^+^^+^^+^^=^^++^+^^+^^+5^+^^+^^+=%==4.,^^+^+3^1+
X10+^^6+=^+^11+^3+^4+5=4.,^++^4+
X^^+^+3^+^4+3^+^=+^^+^^+^^+^^+^+^^++^^+^5=4.,+^^+^^1+
X^^+^^+^^+5^+^^+^%+^^+^^+3^+^+^^+^^+^^+^^=%==5.,^^+^^1+
X10+4^6+%8+^^14+3=5.,6+
X^^+^^+^+^^+^^++^+3^%^^+^^+^^+^^+^^+^^+^+3^+=%==4.,^^+^^1+
X^^+^++^^+^^+^+^^+3^+^^+3^+^+^^+^++^^+^^+^^+5=4.,^^+^1+
X++^^+^16+=3+^+^^3+^+^^8+^%%==4.,+^^2+
X^^+^+3^+^^+^+3^+^^+^^=^^+^^+^^+^^+^^+^+3^+^%4=3.,,+^^1+
X^^+^^+3^+^+^^+^^+^^+3^=^+^^++^+^^+^++^^+^^+^3=%==3.,+^^1+
X12+^^4+^^10+^7+^+^+^4+5=4.,3+
X^^+^^+5^+^^+^+3^+^^+^=+^^+5^+^^+^^+^^+^^+%4=4.,2+
X^^+3^++3^+^++^^+^^+^^+^%+^^+^^+^^+^++^^+^^+^^+==%3=3.,,1+
X7+^++^3+3^8+%10+^+^+^7+=%4=4.2,
X,+3^+4^++^^++^+^+3^+^++^^+5^+^+^^++^^+^^+^==%=%=5.
X,,++^+5^+^^+^++^^+3^+^+=^+5^+^+3^+^^+^^+^^=%4=4.
X..,,9+4^8+^++%3+3^+^^++^10+6=3.
X4.7,+^+3^+^^+5^+^^%^^+3^+3^++^^+^^+^^+=%4=3.
X11.,+^+3^+^+5^+^^+%^+^^3+3^+^^+^^+^^+^=%3=3.
X12.,,7+^^++^4+%5+^^14+6=2.
X14.,+^+^^+^^+^++^++^%+^^+^^+5^+^^+^^+^7=1.
X15.,++^^+^^+^+^+^+^^=^^+^^+5^+^^+^^+^^==%3=1.
X15.,10+^^4+=14+^4+^7=
X16.++^^+^^+^^+^^+^^+=^+^^+^^+^^+^^+^^+^^7=
X12.^^..^+^^+^^+^^+^^+^^+^^+^^+^^+^^+^^+^^+^^+==+^^1+
X+..57+
XSides 6 1 0
XMaronite
XShi-ite
XDruze
XAmal
XSyrian
XIsraeli
XUnits 829 1 0
XB * 3,38 -1
XB * 12,38 -1
XB * 15,38 -1
XB * 16,38 -1
XB * 21,38 -1
XB * 22,38 -1
XB * 24,38 -1
XB * 25,38 -1
XB * 27,38 -1
XB * 28,38 -1
XB * 30,38 -1
XB * 31,38 -1
XB * 3,37 -1
XB * 4,37 -1
XB * 6,37 -1
XB * 7,37 -1
XB * 12,37 -1
XB * 13,37 -1
XB * 15,37 -1
XB * 18,37 -1
XB * 19,37 -1
XB * 21,37 -1
XB * 22,37 -1
XB * 24,37 -1
XB * 25,37 -1
XB * 27,37 -1
XB * 28,37 -1
XB * 31,37 -1
XB * 33,37 -1
XB * 34,37 -1
XB * 2,36 -1
XB * 9,36 -1
XB * 10,36 -1
XB * 11,36 -1
XB * 18,36 -1
XB * 19,36 -1
XB * 20,36 -1
XB * 2,35 -1
XB * 3,35 -1
XB * 4,35 -1
XB * 6,35 -1
XB * 9,35 -1
XB * 10,35 -1
XB * 11,35 -1
XB * 13,35 -1
XB * 15,35 -1
XB * 16,35 -1
XB * 18,35 -1
XB * 22,35 -1
XB * 24,35 -1
XB * 27,35 -1
XB * 28,35 -1
XB * 30,35 -1
XB * 33,35 -1
XB * 34,35 -1
XB * 52,35 -1
XB * 53,35 -1
XB * 57,35 -1
XB * 1,34 -1
XB * 3,34 -1
XB * 4,34 -1
XB * 6,34 -1
XB * 7,34 -1
XB * 9,34 -1
XB * 10,34 -1
XB * 11,34 -1
XB * 13,34 -1
XB * 15,34 -1
XB * 16,34 -1
XB * 18,34 -1
XB * 20,34 -1
XB * 21,34 -1
XB * 22,34 -1
XB * 24,34 -1
XB * 25,34 -1
XB * 27,34 -1
XB * 28,34 -1
XB * 30,34 -1
XB * 31,34 -1
XB * 33,34 -1
XB * 36,34 -1
XB * 51,34 -1
XB * 52,34 -1
XB * 53,34 -1
XB * 54,34 -1
XB * 55,34 -1
XB * 57,34 -1
XB * 58,34 -1
XB * 24,33 -1
XB * 25,33 -1
XB * 49,33 -1
XB * 1,32 -1
XB * 3,32 -1
XB * 5,32 -1
XB * 6,32 -1
XB * 7,32 -1
XB * 9,32 -1
XB * 12,32 -1
XB * 13,32 -1
XB * 15,32 -1
XB * 16,32 -1
XB * 19,32 -1
XB * 21,32 -1
XB * 22,32 -1
XB * 24,32 -1
XB * 25,32 -1
XB * 30,32 -1
XB * 31,32 -1
XB * 33,32 -1
XB * 34,32 -1
XB * 36,32 -1
XB * 37,32 -1
XB * 48,32 -1
XB * 49,32 -1
XB * 51,32 -1
XB * 53,32 -1
XB * 54,32 -1
XB * 55,32 -1
XB * 57,32 -1
XB * 58,32 -1
XB * 1,31 -1
XB * 3,31 -1
XB * 4,31 -1
XB * 6,31 -1
XB * 7,31 -1
XB * 9,31 -1
XB * 10,31 -1
XB * 12,31 -1
XB * 15,31 -1
XB * 16,31 -1
XB * 18,31 -1
XB * 19,31 -1
XB * 21,31 -1
XB * 22,31 -1
XB * 24,31 -1
XB * 25,31 -1
XB * 30,31 -1
XB * 31,31 -1
XB * 32,31 -1
XB * 34,31 -1
XB * 36,31 -1
XB * 37,31 -1
XB * 48,31 -1
XB * 49,31 -1
XB * 51,31 -1
XB * 52,31 -1
XB * 54,31 -1
XB * 55,31 -1
XB * 57,31 -1
XB * 58,31 -1
XB * 6,30 -1
XB * 7,30 -1
XB * 23,30 -1
XB * 32,30 -1
XB * 34,30 -1
XB * 35,30 -1
XB * 51,30 -1
XB * 3,29 -1
XB * 4,29 -1
XB * 6,29 -1
XB * 7,29 -1
XB * 9,29 -1
XB * 10,29 -1
XB * 12,29 -1
XB * 13,29 -1
XB * 20,29 -1
XB * 21,29 -1
XB * 22,29 -1
XB * 24,29 -1
XB * 25,29 -1
XB * 27,29 -1
XB * 29,29 -1
XB * 30,29 -1
XB * 31,29 -1
XB * 34,29 -1
XB * 35,29 -1
XB * 36,29 -1
XB * 37,29 -1
XB * 39,29 -1
XB * 50,29 -1
XB * 51,29 -1
XB * 54,29 -1
XB * 56,29 -1
XB * 57,29 -1
XB * 3,28 -1
XB * 4,28 -1
XB * 9,28 -1
XB * 12,28 -1
XB * 13,28 -1
XB * 16,28 -1
XB * 18,28 -1
XB * 19,28 -1
XB * 21,28 -1
XB * 22,28 -1
XB * 24,28 -1
XB * 25,28 -1
XB * 27,28 -1
XB * 28,28 -1
XB * 30,28 -1
XB * 33,28 -1
XB * 34,28 -1
XB * 36,28 -1
XB * 37,28 -1
XB * 39,28 -1
XB * 40,28 -1
XB * 51,28 -1
XB * 52,28 -1
XB * 54,28 -1
XB * 55,28 -1
XB * 57,28 -1
XB * 58,28 -1
XB * 6,27 -1
XB * 7,27 -1
XB * 19,27 -1
XB * 20,27 -1
XB * 22,27 -1
XB * 29,27 -1
XB * 1,26 -1
XB * 3,26 -1
XB * 6,26 -1
XB * 7,26 -1
XB * 9,26 -1
XB * 10,26 -1
XB * 12,26 -1
XB * 13,26 -1
XB * 15,26 -1
XB * 16,26 -1
XB * 18,26 -1
XB * 20,26 -1
XB * 22,26 -1
XB * 24,26 -1
XB * 25,26 -1
XB * 26,26 -1
XB * 27,26 -1
XB * 28,26 -1
XB * 30,26 -1
XB * 31,26 -1
XB * 32,26 -1
XB * 33,26 -1
XB * 34,26 -1
XB * 36,26 -1
XB * 37,26 -1
XB * 39,26 -1
XB * 40,26 -1
XB * 51,26 -1
XB * 52,26 -1
XB * 54,26 -1
XB * 56,26 -1
XB * 57,26 -1
XB * 1,25 -1
XB * 4,25 -1
XB * 6,25 -1
XB * 7,25 -1
XB * 9,25 -1
XB * 10,25 -1
XB * 12,25 -1
XB * 13,25 -1
XB * 15,25 -1
XB * 16,25 -1
XB * 18,25 -1
XB * 19,25 -1
XB * 22,25 -1
XB * 24,25 -1
XB * 25,25 -1
XB * 27,25 -1
XB * 28,25 -1
XB * 30,25 -1
XB * 31,25 -1
XB * 32,25 -1
XB * 34,25 -1
XB * 36,25 -1
XB * 37,25 -1
XB * 39,25 -1
XB * 40,25 -1
XB * 51,25 -1
XB * 52,25 -1
XB * 56,25 -1
XB * 57,25 -1
XB * 58,25 -1
XB * 10,24 -1
XB * 11,24 -1
XB * 19,24 -1
XB * 21,24 -1
XB * 33,24 -1
XB * 37,24 -1
XB * 52,24 -1
XB * 55,24 -1
XB * 1,23 -1
XB * 3,23 -1
XB * 5,23 -1
XB * 6,23 -1
XB * 7,23 -1
XB * 9,23 -1
XB * 14,23 -1
XB * 15,23 -1
XB * 18,23 -1
XB * 21,23 -1
XB * 22,23 -1
XB * 24,23 -1
XB * 25,23 -1
XB * 27,23 -1
XB * 28,23 -1
XB * 30,23 -1
XB * 31,23 -1
XB * 33,23 -1
XB * 35,23 -1
XB * 36,23 -1
XB * 39,23 -1
XB * 40,23 -1
XB * 42,23 -1
XB * 54,23 -1
XB * 55,23 -1
XB * 57,23 -1
XB * 1,22 -1
XB * 3,22 -1
XB * 4,22 -1
XB * 6,22 -1
XB * 7,22 -1
XB * 9,22 -1
XB * 10,22 -1
XB * 13,22 -1
XB * 15,22 -1
XB * 16,22 -1
XB * 18,22 -1
XB * 21,22 -1
XB * 22,22 -1
XB * 25,22 -1
XB * 27,22 -1
XB * 28,22 -1
XB * 29,22 -1
XB * 31,22 -1
XB * 33,22 -1
XB * 34,22 -1
XB * 36,22 -1
XB * 37,22 -1
XB * 39,22 -1
XB * 40,22 -1
XB * 42,22 -1
XB * 43,22 -1
XB * 54,22 -1
XB * 55,22 -1
XB * 57,22 -1
XB * 58,22 -1
XB * 10,21 -1
XB * 11,21 -1
XB * 12,21 -1
XB * 13,21 -1
XB * 29,21 -1
XB * 3,20 -1
XB * 4,20 -1
XB * 6,20 -1
XB * 8,20 -1
XB * 9,20 -1
XB * 11,20 -1
XB * 12,20 -1
XB * 15,20 -1
XB * 17,20 -1
XB * 18,20 -1
XB * 19,20 -1
XB * 21,20 -1
XB * 22,20 -1
XB * 24,20 -1
XB * 25,20 -1
XB * 27,20 -1
XB * 28,20 -1
XB * 30,20 -1
XB * 31,20 -1
XB * 33,20 -1
XB * 34,20 -1
XB * 36,20 -1
XB * 37,20 -1
XB * 39,20 -1
XB * 54,20 -1
XB * 55,20 -1
XB * 57,20 -1
XB * 1,19 -1
XB * 3,19 -1
XB * 6,19 -1
XB * 9,19 -1
XB * 12,19 -1
XB * 14,19 -1
XB * 15,19 -1
XB * 17,19 -1
XB * 18,19 -1
XB * 19,19 -1
XB * 21,19 -1
XB * 22,19 -1
XB * 24,19 -1
XB * 26,19 -1
XB * 28,19 -1
XB * 30,19 -1
XB * 31,19 -1
XB * 33,19 -1
XB * 36,19 -1
XB * 39,19 -1
XB * 40,19 -1
XB * 56,19 -1
XB * 58,19 -1
XB * 2,18 -1
XB * 3,18 -1
XB * 5,18 -1
XB * 26,18 -1
XB * 29,18 -1
XB * 33,18 -1
XB * 35,18 -1
XB * 36,18 -1
XB * 45,18 -1
XB * 56,18 -1
XB * 57,18 -1
XB * 1,17 -1
XB * 5,17 -1
XB * 6,17 -1
XB * 9,17 -1
XB * 10,17 -1
XB * 14,17 -1
XB * 15,17 -1
XB * 16,17 -1
XB * 18,17 -1
XB * 21,17 -1
XB * 22,17 -1
XB * 24,17 -1
XB * 25,17 -1
XB * 28,17 -1
XB * 30,17 -1
XB * 31,17 -1
XB * 33,17 -1
XB * 34,17 -1
XB * 36,17 -1
XB * 37,17 -1
XB * 39,17 -1
XB * 41,17 -1
XB * 42,17 -1
XB * 43,17 -1
XB * 45,17 -1
XB * 58,17 -1
XB * 1,16 -1
XB * 3,16 -1
XB * 4,16 -1
XB * 6,16 -1
XB * 7,16 -1
XB * 8,16 -1
XB * 10,16 -1
XB * 15,16 -1
XB * 18,16 -1
XB * 19,16 -1
XB * 21,16 -1
XB * 22,16 -1
XB * 23,16 -1
XB * 25,16 -1
XB * 27,16 -1
XB * 28,16 -1
XB * 31,16 -1
XB * 33,16 -1
XB * 34,16 -1
XB * 36,16 -1
XB * 39,16 -1
XB * 40,16 -1
XB * 42,16 -1
XB * 43,16 -1
XB * 45,16 -1
XB * 57,16 -1
XB * 58,16 -1
XB * 18,15 -1
XB * 19,15 -1
XB * 30,15 -1
XB * 38,15 -1
XB * 40,15 -1
XB * 42,15 -1
XB * 1,14 -1
XB * 3,14 -1
XB * 4,14 -1
XB * 6,14 -1
XB * 7,14 -1
XB * 8,14 -1
XB * 9,14 -1
XB * 10,14 -1
XB * 15,14 -1
XB * 17,14 -1
XB * 18,14 -1
XB * 19,14 -1
XB * 21,14 -1
XB * 22,14 -1
XB * 24,14 -1
XB * 27,14 -1
XB * 28,14 -1
XB * 30,14 -1
XB * 32,14 -1
XB * 33,14 -1
XB * 34,14 -1
XB * 36,14 -1
XB * 37,14 -1
XB * 39,14 -1
XB * 40,14 -1
XB * 43,14 -1
XB * 45,14 -1
XB * 46,14 -1
XB * 1,13 -1
XB * 3,13 -1
XB * 4,13 -1
XB * 8,13 -1
XB * 9,13 -1
XB * 10,13 -1
XB * 15,13 -1
XB * 16,13 -1
XB * 18,13 -1
XB * 19,13 -1
XB * 21,13 -1
XB * 22,13 -1
XB * 24,13 -1
XB * 27,13 -1
XB * 28,13 -1
XB * 30,13 -1
XB * 31,13 -1
XB * 33,13 -1
XB * 34,13 -1
XB * 36,13 -1
XB * 40,13 -1
XB * 42,13 -1
XB * 43,13 -1
XB * 45,13 -1
XB * 46,13 -1
XB * 7,12 -1
XB * 10,12 -1
XB * 14,12 -1
XB * 15,12 -1
XB * 16,12 -1
XB * 40,12 -1
XB * 6,11 -1
XB * 7,11 -1
XB * 8,11 -1
XB * 9,11 -1
XB * 12,11 -1
XB * 13,11 -1
XB * 16,11 -1
XB * 18,11 -1
XB * 20,11 -1
XB * 21,11 -1
XB * 24,11 -1
XB * 28,11 -1
XB * 30,11 -1
XB * 31,11 -1
XB * 33,11 -1
XB * 36,11 -1
XB * 38,11 -1
XB * 39,11 -1
XB * 42,11 -1
XB * 43,11 -1
XB * 45,11 -1
XB * 46,11 -1
XB * 48,11 -1
XB * 6,10 -1
XB * 7,10 -1
XB * 8,10 -1
XB * 9,10 -1
XB * 10,10 -1
XB * 12,10 -1
XB * 13,10 -1
XB * 15,10 -1
XB * 18,10 -1
XB * 19,10 -1
XB * 21,10 -1
XB * 22,10 -1
XB * 23,10 -1
XB * 25,10 -1
XB * 28,10 -1
XB * 31,10 -1
XB * 32,10 -1
XB * 34,10 -1
XB * 36,10 -1
XB * 40,10 -1
XB * 43,10 -1
XB * 45,10 -1
XB * 46,10 -1
XB * 48,10 -1
XB * 49,10 -1
XB * 13,9 -1
XB * 14,9 -1
XB * 15,9 -1
XB * 16,9 -1
XB * 25,9 -1
XB * 32,9 -1
XB * 33,9 -1
XB * 34,9 -1
XB * 36,9 -1
XB * 37,9 -1
XB * 12,8 -1
XB * 14,8 -1
XB * 15,8 -1
XB * 16,8 -1
XB * 18,8 -1
XB * 21,8 -1
XB * 22,8 -1
XB * 23,8 -1
XB * 24,8 -1
XB * 25,8 -1
XB * 27,8 -1
XB * 28,8 -1
XB * 30,8 -1
XB * 31,8 -1
XB * 33,8 -1
XB * 34,8 -1
XB * 35,8 -1
XB * 37,8 -1
XB * 38,8 -1
XB * 42,8 -1
XB * 43,8 -1
XB * 45,8 -1
XB * 46,8 -1
XB * 13,7 -1
XB * 15,7 -1
XB * 16,7 -1
XB * 19,7 -1
XB * 21,7 -1
XB * 22,7 -1
XB * 23,7 -1
XB * 24,7 -1
XB * 25,7 -1
XB * 27,7 -1
XB * 28,7 -1
XB * 31,7 -1
XB * 33,7 -1
XB * 34,7 -1
XB * 38,7 -1
XB * 39,7 -1
XB * 40,7 -1
XB * 42,7 -1
XB * 43,7 -1
XB * 45,7 -1
XB * 46,7 -1
XB * 51,7 -1
XB * 21,6 -1
XB * 22,6 -1
XB * 25,6 -1
XB * 37,6 -1
XB * 16,5 -1
XB * 18,5 -1
XB * 19,5 -1
XB * 21,5 -1
XB * 22,5 -1
XB * 24,5 -1
XB * 27,5 -1
XB * 33,5 -1
XB * 34,5 -1
XB * 36,5 -1
XB * 37,5 -1
XB * 39,5 -1
XB * 40,5 -1
XB * 41,5 -1
XB * 42,5 -1
XB * 43,5 -1
XB * 45,5 -1
XB * 46,5 -1
XB * 48,5 -1
XB * 49,5 -1
XB * 51,5 -1
XB * 19,4 -1
XB * 21,4 -1
XB * 22,4 -1
XB * 24,4 -1
XB * 26,4 -1
XB * 28,4 -1
XB * 31,4 -1
XB * 33,4 -1
XB * 34,4 -1
XB * 36,4 -1
XB * 37,4 -1
XB * 39,4 -1
XB * 40,4 -1
XB * 41,4 -1
XB * 42,4 -1
XB * 43,4 -1
XB * 45,4 -1
XB * 46,4 -1
XB * 49,4 -1
XB * 51,4 -1
XB * 52,4 -1
XB * 26,3 -1
XB * 27,3 -1
XB * 47,3 -1
XB * 52,3 -1
XB * 18,2 -1
XB * 19,2 -1
XB * 21,2 -1
XB * 22,2 -1
XB * 24,2 -1
XB * 25,2 -1
XB * 27,2 -1
XB * 28,2 -1
XB * 30,2 -1
XB * 31,2 -1
XB * 34,2 -1
XB * 36,2 -1
XB * 37,2 -1
XB * 39,2 -1
XB * 40,2 -1
XB * 42,2 -1
XB * 43,2 -1
XB * 45,2 -1
XB * 46,2 -1
XB * 48,2 -1
XB * 49,2 -1
XB * 51,2 -1
XB * 52,2 -1
XB * 12,1 -1
XB * 13,1 -1
XB * 16,1 -1
XB * 18,1 -1
XB * 19,1 -1
XB * 21,1 -1
XB * 22,1 -1
XB * 24,1 -1
XB * 25,1 -1
XB * 27,1 -1
XB * 28,1 -1
XB * 31,1 -1
XB * 33,1 -1
XB * 34,1 -1
XB * 36,1 -1
XB * 37,1 -1
XB * 39,1 -1
XB * 40,1 -1
XB * 42,1 -1
XB * 43,1 -1
XB * 45,1 -1
XB * 46,1 -1
XB * 48,1 -1
XB * 49,1 -1
XB * 51,1 -1
XB * 52,1 -1
XB * 57,1 -1
XB * 58,1 -1
XB * -1,-1 -1
Xt * -1,-1 -1
Xt * -1,-1 -1
Xc * -1,-1 -1
Xc * -1,-1 -1
Xc * -1,-1 -1
XB * 12,17 0
Xm * 9,18 0
Xc * 12,18 0
Xt * 11,17 0
XB * 12,16 0
XB * 13,16 0
XB * 13,15 0
XB * 13,14 0
Xm * 8,19 0
Xt * 14,16 0
XB * 12,15 0
Xl * 10,20 0
Xm * 15,15 0
XB * 12,14 0
Xd * 6,21 0
Xc * 8,21 0
Xm * 11,14 0
XB * 12,13 0
Xm * 11,12 0
XB * 0,28 1
Xt * 2,26 1
XB * 0,29 1
XB * 1,28 1
XB * 0,30 1
XB * 1,29 1
Xm * 54,24 1
Xt * 59,19 1
Xm * 56,23 1
Xm * 58,21 1
Xc * 54,27 1
Xm * 57,24 1
Xc * 59,24 1
Xm * 55,29 1
Xl * 57,27 1
Xd * 59,28 1
XB * 48,7 2
Xm * 49,6 2
Xc * 50,5 2
Xm * 47,9 2
XB * 48,8 2
XB * 49,7 2
Xl * 50,6 2
Xt * 48,9 2
XB * 49,8 2
Xm * 50,7 2
Xd * 47,11 2
Xm * 49,9 2
Xt * 50,8 2
Xc * 50,9 2
Xm * 47,13 2
Xl * 23,35 3
Xc * 26,32 3
XB * 27,31 3
XB * 27,32 3
XB * 28,31 3
Xm * 26,34 3
XB * 28,32 3
Xm * 30,30 3
Xm * 23,38 3
Xt * 26,38 3
Xt * 29,35 3
Xm * 32,32 3
Xd * 30,36 3
Xc * 33,33 3
Xm * 32,36 3
Xm * 38,20 4
Xl * 41,18 4
Xm * 39,21 4
Xm * 40,20 4
Xd * 38,23 4
XB * 41,20 4
XB * 42,19 4
XB * 42,20 4
XB * 43,19 4
Xm * 39,24 4
Xt * 42,21 4
XB * 43,20 4
Xt * 44,19 4
Xm * 38,26 4
Xc * 44,21 4
Xc * 41,25 4
Xm * 1,11 5
Xm * 2,10 5
XB * 2,11 5
Xm * 3,10 5
Xm * 4,9 5
XB * 3,11 5
Xl * 3,11 5
Xd * 3,11 5
XB * 4,10 5
Xm * 5,9 5
XB * 4,11 5
END_OF_lib/beirut2.scn
if test 12246 -ne `wc -c <lib/beirut2.scn`; then
echo shar: \"lib/beirut2.scn\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f lib/xconq.onx.u -a "${1}" != "-c" ; then
echo shar: Will not over-write existing file \"lib/xconq.onx.u\"
else
echo shar: Extracting \"lib/xconq.onx.u\" \(10054 characters\)
sed "s/^X//" >lib/xconq.onx.u <<'END_OF_lib/xconq.onx.u'
Xbegin 644 xconq.onx
XM&````.P)%@`!````?@!L&P``#@`"`!0``0`(````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM```````"````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````8```
XM````````````````````````````````````````````````````````````
XM``````````````````````````````````````````!@````````````````
XM``````````````````````````````````(``@8$````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````<```````````````````
XM````'``````%````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM^`$`````````````````````````````````````````````````````````
XM```````````"``````````````````````````````````#X`0``````````
XM``````````````````````````````````````0`!`D"````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````2P``````````````
XM`````@@``````,`8`0``````````````````````````````````````````
XM````^```````````````````````````````````````````````````````
XM````_@<`````````````````````````````````````````````````````
XM`````````````(`%``````````````````````````````````#^!P``````
XM`````````````````````````````````````````!$`"`$!````````````
XM````````````````````````````````````````````````````````````
XM``````````````````````````````````````````````"`!`8`````````
XM`````````@C@<P```#C@````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM``````"`_Q\```````````````````````````````````"`_Q\`````````
XM`(```````````````$!9`````````````````````````````````(#_'P``
XM````````````````````````````````````````````8$@`$($`````````
XM````````````````````````````````````````````````````````````
XM``````````````````````````````````````````````````!`<`D`````
XM`````````````@@``````````````,`!``@`P`$`'`!``0`<`,`!````````
XM```!``````````(`````````````````````````````````````````````
XM``````````#@_W\```````````````````````````````````#`_S\```#_
XM#P`&`(````````````"D`'BM`````````````````````````````````.#_
XM?P``````````````````````````````````````````````D$(!($D`````
XM````````````````````````````````````````````````````````````
XM``````````````````````````````````````````````````````"`0S@`
XM`````````````````@C._P,``!!``````$`!``@```$`$`!``0`$`$``````
XM``````````````#@)R(`````````````````````````````````````````
XM``````````````#P__\```````````````````````````````````#`_S\`
XM`(``$``.`,````````````!(`51*`0``````````````````````````````
XM`/#_?P``````````````````````````````````````````````DC`$0"8`
XM````````````````````````````````````````````````````````````
XM``````````````````````````````````````````````````````````#`
XM-B8``````````````````@@``````&RP`0```$`!``@`P`$`'`#``0`<`,`!
XM````````````````````0!(`````````````````````````````````````
XM``````````````````#P__\```````````````````````````````````#`
XM`3@``(``$``+`,`!``````````!4!:)4`@``````````````````````````
XM`````/#_?P``````````````````````````````````````````````6$$!
XMC!`#````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM```@)"D``````````````````@C\CP\``(,/#@```$`!``@`0```$````0`0
XM`$`!``````````````````"`7Q(`````````````````````````````````
XM``````````````````````#P__\`````````````````````````````````
XM``#``3@``(``$(`9`$`!``````````!3`ERJ!```````````````````````
XM`````````/#_?P``````````````````````````````````````````````
XM$DH*$HD$````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM```````@2T0````````?`````````@@``````````````,`!``@`P`$`'```
XM`0`<`,`!````````````````````@`H`````````````````````````````
XM``````````````````````````#P__\`````````````````````````````
XM``````#``3@``(``$(`R`*8!````````"@"4`9!?!```````````````````
XM`````````````/#_?P``````````````````````````````````````````
XM````"$4`$H8$````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````2%$``````,%A"````````@C__`<````""```````````````
XM``````````````````````````````#@C^H`````````````````````````
XM``````````````````````````````#P__\`````````````````````````
XM``````````#``3@``(``$,!B`*8!``````"`"0!J"J:?`P``````````````
XM`````````````````/#_?P``````````````````````````````````````
XM````````49`$&H8$````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM``````````````"@!D$``````&[`!@````#P__\``````(,-!@``````````
XM````````````````````````````````````````````````````````````
XM``````````````````````````````````#P__\`````````````````````
XM``````````````#``3@``(``$&#*`:4"````````%P#U!,@_!0``````````
XM`````````````````````/#_?P``````````````````````````````````
XM````````````$*4`$HD$````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````$20``````#"``0```````@C\?PX``'SP`0``````
XM````````````````````````````````````````_A\`````````````````
XM``````````````````````````````````````#P__\`````````````````
XM``````````````````#``3@``(``$#@1@[D"``````"`#@#R`I!?!```````
XM`````````````````````````/#_?P``````````````````````````````
XM````````````````YV\/K!`#````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM``````````````````````"`PP@``````!P``P```````@@`````````````
XM``````````````````````````````````"```````#P````````````````
XM``````````````````````````````````````````#P__\`````````````
XM``````````````````````#``3@``(``$$QEAK@%````````%0!L`_:_`P``
XM`````````````````````````````/#_?P``````````````````````````
XM````````````````````H(``0"``````````````````````````````````
XM````````````````````````````````````````````````````````````
XM``````````````````````````!`:F$```````<`#@```````@C_\PP``!!`
XM````````````````````````````````````````````````!'X`````````
XM``````````````````````````````````````````````#P__\`````````
XM``````````````````````````#``3@``(``$":(]"S]``````"`!`"3#)@?
XM!@```````````````````````````````/#_?P``````````````````````
XM````````````````````````D4H$($D`````````````````````````````
XM````````````````````````````````````````````````````````````
XM```````````````````````````````@$E,`````````"````````@@`````
XM`&RP`0````````````````````````````````````````````!`1```````
XM``````````````````````````````````````````````````#P__\`````
XM``````````````````````````````#``3@``(``$```<"3[``````````"H
XM`D+U`@```````````````````````````````/#_?P``````````````````
XM````````````````````````````-%`!$(D`````````````````````````
XM````````````````````````````````````````````````````````````
XM```````````````````````````````````@BD(``````````````````@C\
XM_@<``(,/#@```````````````````````````````````!````````"`)#\`
XM``````````````````````````````````````````````````````#P__\`
XM``````````````````````````````````#``3@``(``$```,"+Z````````
XM``"4!"I*!0```````````````````````````````/#_?P``````````````
XM````````````````````````````````5%0("`L!````````````````````
XM````````````````````````````````````````````````````````````
XM``````````````````````````````````````"``24`````````````````
XM`@@```````````````````````````````````````````````````````"`
XM)`````````````````````````````````````````````````````````#P
XM__\```````````````````````````````````#`_S\``(``$```(!(4````
XM```````D`:"B`@```````````````````````````````.#_?P``````````
XM````````````````````````````````````$2D!!`T"````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````%`$`````````````
XM`````@@X?P`````"````````````````````````````````````````````
XM````%0``````````````````````````````````````````````````````
XM``#@_W\```````````````````````````````````#`_S\```#_#P``````
XM``````````!``5BU`````````````````````````````````(#_'P``````
XM````````````````````````````````````````D$`!`@D$````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````1`P`````````
XM`````````@@````````%````````````````````````````````````````
XM````````U0\`````````````````````````````````````````````````
XM``````"`_Q\```````````````````````````````````"`_Q\`````````
XM`````````````````$`I``````````````````````````````````#^!P``
XM````````````````````````````````````````````($H``0D(````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````F```````
XM`````````````@@`'P```(`8````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````_@<`````````````````````````````````````````````
XM```````````````````````*``````````````````````````````````#X
XM`0````````````````````````````````````````````````4`````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````(```
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````^`$`````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM``!@````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````8```````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM``````````````````````````````````````````````````````````(`
XM```4`"@`/`!0`&0`>`",`*``M`#(`-P`\``$`1@!+`%``50!:`%\`9`!I`&X
XM`<P!X`'T`0@"'`(P`D0"6`)L`H`"E`*H`KP"T`+D`O@"#`,@`S0#2`-<`W`#
XMA`.8`ZP#P`/4`^@#_`,0!"0$.`1,!&`$=`2(!)P$L`3$!-@$[`0`!10%*`4\
XM!5`%9`5X!8P%H`6T!<@%W`7P!00&&`8L!D`&5`9H!GP&D`:D!K@&S`;@!O0&
XM"`<<!S`'1`=8!VP'@`>4!Z@'O`?0!^0'^`<,""`(-`A("%P(<`B$")@(K`C`
X?"-0(Z`C\"!`))`DX"4P)8`ET"8@)G`FP"<0)V`GL"0A(
X`
Xend
END_OF_lib/xconq.onx.u
if test 10054 -ne `wc -c <lib/xconq.onx.u`; then
echo shar: \"lib/xconq.onx.u\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f per2c.c -a "${1}" != "-c" ; then
echo shar: Will not over-write existing file \"per2c.c\"
else
echo shar: Extracting \"per2c.c\" \(9036 characters\)
sed "s/^X//" >per2c.c <<'END_OF_per2c.c'
X/* Copyright (c) 1987, 1988 Stanley T. Shebs, University of Utah. */
X/* This program may be used, copied, modified, and redistributed freely */
X/* for noncommercial purposes, so long as this notice remains intact. */
X
X/* RCS $Header: per2c.c,v 1.1 88/06/21 12:30:34 shebs Exp $ */
X
X/* This is a mini-tool that converts a period description file into a piece */
X/* of C code that can be linked in as xconq's default period. It uses the */
X/* normal xconq period reader, and defines the output routine. Works from */
X/* stdio, only option is to turn on debugging if any args present. */
X/* The code is simple but lengthy. */
X
X#include "config.h"
X#include "misc.h"
X#include "period.h"
X
X/* Declarations for variables set in the period file. */
X
XPeriod period;
X
XUtype utypes[MAXUTYPES];
X
XRtype rtypes[MAXRTYPES];
X
XTtype ttypes[MAXTTYPES];
X
Xchar *snames[MAXSNAMES];
X
Xchar *unames[MAXUNAMES];
X
Xint Debug = FALSE;
X
X/* Very simple main program. We do need to soak up the first line of the *
X/* period description, which is almost certainly a mapfile header. */
X/* Any argument will enable debugging prints in the period reader. */
X
Xmain(argc, argv)
Xint argc;
Xchar *argv[];
X{
X char *dummy[BUFSIZE];
X
X if (argc > 1) Debug = TRUE;
X fgets(dummy, BUFSIZE-1, stdin);
X read_period(stdin);
X print_period();
X print_utypes();
X print_rtypes();
X print_ttypes();
X print_snames();
X print_unames();
X exit(0);
X}
X
Xprint_period()
X{
X printf("#include \"config.h\"\n");
X printf("#include \"period.h\"\n");
X printf("\nPeriod period = { \"%s\", NULL, \"%s\", %d, %d, %d, %d,\n",
X period.name, /* period.notes */ period.fontname, period.scale,
X period.countrysize, period.mindistance, period.maxdistance);
X printf(" %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d,\n",
X period.numutypes, period.numrtypes, period.numttypes,
X period.numsnames, period.numunames,
X period.firstutype, period.firstptype,
X period.knownradius, period.allseen,
X period.counterattack, period.nukehit, period.neutrality,
X period.efficiency, period.population, period.hostility);
X printf(" %d, %d, %d, %d, %d, %d };\n",
X period.altroughness, period.wetroughness,
X period.defaultterrain, period.edgeterrain,
X period.spychance, period.spyquality);
X}
X
Xprint_utypes()
X{
X int u, t, u2, r;
X
X printf("\nUtype utypes[MAXUTYPES] = {\n");
X for_all_unit_types(u) {
X printf("{ '%c', \"%s\", \"%s\", NULL, \"%s\",\n",
X utypes[u].uchar, utypes[u].name, utypes[u].help, /* notes, */
X (utypes[u].bitmapname ? utypes[u].bitmapname : ""));
X printf(" %d, %d, %d, %d,\n",
X utypes[u].incountry, utypes[u].density,
X utypes[u].named, utypes[u].alreadyseen);
X printf(" { ");
X for_all_terrain_types(t) printf("%d, ", utypes[u].favored[t]);
X printf(" },\n");
X printf(" { ");
X for_all_resource_types(r) printf("%d, ", utypes[u].stockpile[r]);
X printf(" },\n");
X printf(" %d, %d, %d, %d, \"%s\", \"%s\",\n",
X utypes[u].revolt, utypes[u].surrender, utypes[u].siege,
X utypes[u].attdamage, utypes[u].attritionmsg,
X utypes[u].accidentmsg);
X printf(" { ");
X for_all_terrain_types(t) printf("%d, ", utypes[u].attrition[t]);
X printf(" },\n");
X printf(" { ");
X for_all_terrain_types(t) printf("%d, ", utypes[u].accident[t]);
X printf(" },\n");
X printf(" %d, %d, %d, \n",
X utypes[u].maker, utypes[u].startup, utypes[u].research);
X printf(" { ");
X for_all_unit_types(u2) printf("%d, ", utypes[u].make[u2]);
X printf(" },\n");
X printf(" { ");
X for_all_resource_types(r) printf("%d, ", utypes[u].tomake[r]);
X printf(" },\n");
X printf(" { ");
X for_all_unit_types(u2) printf("%d, ", utypes[u].repair[u2]);
X printf(" },\n");
X printf(" %d, \"%s\",\n", utypes[u].survival, utypes[u].starvemsg);
X printf(" { ");
X for_all_resource_types(r) printf("%d, ", utypes[u].produce[r]);
X printf(" },\n");
X printf(" { ");
X for_all_terrain_types(t) printf("%d, ", utypes[u].productivity[t]);
X printf(" },\n");
X printf(" { ");
X for_all_resource_types(r) printf("%d, ", utypes[u].storage[r]);
X printf(" },\n");
X printf(" { ");
X for_all_resource_types(r) printf("%d, ", utypes[u].consume[r]);
X printf(" },\n");
X printf(" { ");
X for_all_resource_types(r) printf("%d, ", utypes[u].inlength[r]);
X printf(" },\n");
X printf(" { ");
X for_all_resource_types(r) printf("%d, ", utypes[u].outlength[r]);
X printf(" },\n");
X printf(" %d, %d, %d, %d,\n",
X utypes[u].freemove, utypes[u].speed,
X utypes[u].onemove, utypes[u].jumpmove);
X printf(" { ");
X for_all_terrain_types(t) printf("%d, ", utypes[u].moves[t]);
X printf(" },\n");
X printf(" { ");
X for_all_terrain_types(t) printf("%d, ", utypes[u].randommove[t]);
X printf(" },\n");
X printf(" { ");
X for_all_resource_types(r) printf("%d, ", utypes[u].tomove[r]);
X printf(" },\n");
X printf(" %d, %d,\n", utypes[u].volume, utypes[u].holdvolume);
X printf(" { ");
X for_all_unit_types(u2) printf("%d, ", utypes[u].capacity[u2]);
X printf(" },\n");
X printf(" { ");
X for_all_unit_types(u2) printf("%d, ", utypes[u].entertime[u2]);
X printf(" },\n");
X printf(" { ");
X for_all_unit_types(u2) printf("%d, ", utypes[u].leavetime[u2]);
X printf(" },\n");
X printf(" { ");
X for_all_unit_types(u2) printf("%d, ", utypes[u].bridge[u2]);
X printf(" },\n");
X printf(" { ");
X for_all_unit_types(u2) printf("%d, ", utypes[u].mobility[u2]);
X printf(" },\n");
X printf(" %d, %d, %d, %d, %d,\n",
X utypes[u].seealways, utypes[u].seebest, utypes[u].seeworst,
X utypes[u].seerange, utypes[u].visibility);
X printf(" { ");
X for_all_terrain_types(t) printf("%d, ", utypes[u].conceal[t]);
X printf(" },\n");
X printf(" %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, \"%s\",\n",
X utypes[u].parts, utypes[u].hp, utypes[u].crippled,
X utypes[u].hitrange,
X utypes[u].selfdestruct, utypes[u].changeside,
X utypes[u].hittime, utypes[u].retreat,
X utypes[u].counterable, utypes[u].arearadius,
X utypes[u].destroymsg);
X printf(" { ");
X for_all_unit_types(u2) printf("%d, ", utypes[u].hit[u2]);
X printf(" },\n");
X printf(" { ");
X for_all_terrain_types(t) printf("%d, ", utypes[u].defense[t]);
X printf(" },\n");
X printf(" { ");
X for_all_unit_types(u2) printf("%d, ", utypes[u].damage[u2]);
X printf(" },\n");
X printf(" { ");
X for_all_resource_types(r) printf("%d, ", utypes[u].hitswith[r]);
X printf(" },\n");
X printf(" { ");
X for_all_resource_types(r) printf("%d, ", utypes[u].hitby[r]);
X printf(" },\n");
X printf(" { ");
X for_all_unit_types(u2) printf("%d, ", utypes[u].capture[u2]);
X printf(" },\n");
X printf(" { ");
X for_all_unit_types(u2) printf("%d, ", utypes[u].guard[u2]);
X printf(" },\n");
X printf(" { ");
X for_all_unit_types(u2) printf("%d, ", utypes[u].protect[u2]);
X printf(" },\n");
X printf(" %d, %d, %d, %d, %d, %d, %d, %d, %d\n",
X utypes[u].territory, utypes[u].isneutral, utypes[u].maxquality,
X utypes[u].skillf, utypes[u].disciplinef, utypes[u].maxmorale,
X utypes[u].moralef, utypes[u].control, utypes[u].disband);
X printf(" },\n");
X }
X printf("};\n");
X}
X
Xprint_rtypes()
X{
X int r;
X
X if (period.numrtypes > 0) {
X printf("\nRtype rtypes[MAXRTYPES] = {\n");
X for_all_resource_types(r) {
X printf("{ '%c', \"%s\", \"%s\" },\n",
X rtypes[r].rchar, rtypes[r].name, rtypes[r].help);
X }
X printf("};\n");
X } else {
X printf("\nRtype rtypes[MAXRTYPES];\n");
X }
X}
X
Xprint_ttypes()
X{
X int t;
X
X printf("\nTtype ttypes[MAXTTYPES] = {\n");
X for_all_terrain_types(t) {
X printf("{ '%c', \"%s\", \"%s\",\n",
X ttypes[t].tchar, ttypes[t].name, ttypes[t].color);
X printf(" %d, %d, %d, %d, %d, %d, %d, %d },\n",
X ttypes[t].dark, ttypes[t].nuked,
X ttypes[t].minalt, ttypes[t].maxalt,
X ttypes[t].minwet, ttypes[t].maxwet,
X ttypes[t].inhabitants, ttypes[t].independence);
X }
X printf("};\n");
X}
X
Xprint_snames()
X{
X int i;
X
X if (period.numsnames > 0) {
X printf("\nchar *snames[MAXSNAMES] = {");
X for (i = 0; i < period.numsnames; ++i) {
X if ((i % 5) == 0) printf("\n");
X printf("\"%s\", ", snames[i]);
X }
X printf("};\n");
X }
X}
X
Xprint_unames()
X{
X int i;
X
X if (period.numunames > 0) {
X printf("\nchar *unames[MAXUNAMES] = {");
X for (i = 0; i < period.numunames; ++i) {
X if ((i % 5) == 0) printf("\n");
X printf("\"%s\", ", unames[i]);
X }
X printf("};\n");
X }
X}
X
X/* Read a line and save it away. This routine should be used sparingly, */
X/* since the malloced space is never freed. */
X
Xchar *
Xread_line(fp)
XFILE *fp;
X{
X char tmp[BUFSIZE], *line;
X
X fgets(tmp, BUFSIZE-1, fp); tmp[strlen(tmp)-1] = '\0';
X line = (char *) malloc(strlen(tmp)+2);
X strcpy(line, tmp);
X return line;
X}
X
Xchar *
Xcopy_string(str)
Xchar *str;
X{
X char *rslt;
X
X rslt = (char *) malloc(strlen(str)+1);
X strcpy(rslt, str);
X return rslt;
X}
X
X/* This little routine goes at the end of all case statements on internal */
X/* data that shouldn't go out of bounds. We want a core dump to debug. */
X
Xcase_panic(str, var)
Xchar *str;
Xint var;
X{
X fprintf(stderr, "Panic! Unknown %s %d\n", str, var);
X abort();
X}
END_OF_per2c.c
if test 9036 -ne `wc -c <per2c.c`; then
echo shar: \"per2c.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f side.h -a "${1}" != "-c" ; then
echo shar: Will not over-write existing file \"side.h\"
else
echo shar: Extracting \"side.h\" \(9916 characters\)
sed "s/^X//" >side.h <<'END_OF_side.h'
X/* Copyright (c) 1987, 1988 Stanley T. Shebs, University of Utah. */
X/* This program may be used, copied, modified, and redistributed freely */
X/* for noncommercial purposes, so long as this notice remains intact. */
X
X/* RCS $Header: side.h,v 1.1 88/06/21 12:29:46 shebs Exp $ */
X
X/* Definitions about sides need terrain.h, unit.h, map.h */
X
X/* Modes governing the interpretation of input. */
X
X#define WEDGED 0
X#define MOVE 1
X#define SURVEY 2
X
X/* These are 7-char strings (except for the first) so hiliting works right. */
X
X#define MODENAMES { "", " Move ", " Survey" }
X
X/* Reasons for gains and losses of units. */
X
X#define NUMREASONS 13
X
X#define FIRSTUNIT 0
X#define PRODUCED 1
X#define CAPTURE 2
X#define DUMMYREAS 3
X#define COMBAT 4
X#define PRISONER 5
X#define GARRISON 6
X#define DISASTER 7
X#define STARVATION 8
X#define DISBAND 9
X#define SURRENDER 10
X#define VICTOR 11
X#define ENDOFWORLD 12
X
X#define REASONNAMES \
X { "Ini", "Pro", "Cap", " ", \
X "Cbt", "Pri", "Gar", "Acc", "Sup", "Dis", "Sur", "Win", "End" }
X
X/* Input request results - tells what came back as answer to a request. */
X
X#define GARBAGE 0
X#define KEYBOARD 1
X#define MAPPOS 2
X#define UNITTYPE 3
X
X/* Color display modes. */
X
X#define NUMSHOWMODES 4
X
X#define FULLHEX 0
X#define BORDERHEX 1
X#define TERRICONS 2
X#define BOTHICONS 3
X
X/* Attitude boundaries of one side with respect to another. */
X
X#define ENEMY (-100)
X#define NEUTRAL 0
X#define ALLY 100
X
X/* Possible ideologies of a machine player - determines general behavior. */
X/* Very crude - really more for color than anything else. */
X
X#define EXPANSIONIST 0
X#define ISOLATIONIST 1
X#define FASCIST 2
X#define FANATICAL 3
X#define DEMOCRATIC 4
X
X/* Each xconq player is a "side" - more or less one country. A side may or */
X/* may not be played by a person, and may or may not have a display attached */
X/* to it. Each side has a different view of the world. Zillions of slots */
X/* are needed because each side needs to keep its own interaction/display */
X/* data - a side is almost like a full-blown process... */
X
Xtypedef struct a_side {
X /* Level 1 detail */
X char *name; /* name used for display */
X /* Level 2 detail */
X short ideology; /* what kind of people are on this side */
X short attitude[MAXSIDES]; /* war/peace/ally status of other sides */
X short counts[MAXUTYPES]; /* array of numbers for identifying units */
X /* Level 3 detail */
X unsigned char *view; /* pointer to array of view info */
X /* Level 4 detail */
X char *host; /* which host is this side attached to */
X short humanp; /* is this side played by a person? */
X short lost; /* true if this side was knocked out */
X short cx, cy; /* current center of player's focus */
X struct a_unit *markunit; /* unit being remembered for later use */
X short timeleft; /* seconds left for this side to play */
X short timedout; /* true when clock has run out for this side */
X short itertime; /* length of order repetition */
X short graphical; /* if true, use bar graphs for unit info */
X short bonw; /* true if display is black-on-white */
X short showmode; /* one of four color display modes */
X /* Statistics */
X short balance[MAXUTYPES][NUMREASONS]; /* what happened to units */
X short atkstats[MAXUTYPES][MAXUTYPES]; /* how many attacks */
X short hitstats[MAXUTYPES][MAXUTYPES]; /* how many hits */
X /* Never saved */
X short mode; /* player's mode (move/survey) */
X short curx, cury; /* current spot being looked at */
X struct a_unit *curunit; /* unit under cursor */
X struct a_unit *movunit; /* unit being moved currently */
X short directorder; /* true if order has just been given */
X long plan; /* all the machine's strategy and tactics */
X short *coverage; /* indicates how many looking at this hex */
X short units[MAXUTYPES]; /* cached count of units */
X short resources[MAXRTYPES]; /* cached count of resources */
X short building[MAXUTYPES]; /* cached count of units being built */
X long lasttime; /* when clock started counting down again */
X /* input hacking */
X bool reqactive; /* true if request made but yet unfulfilled */
X int (*reqhandler)(); /* function to call to process fulfilled req */
X int reqtype; /* what sort of response was made to req */
X char reqch; /* keyboard char */
X int reqx, reqy; /* map coordinates */
X int requtype; /* unit type number */
X /* Random input data slots - could be merged/simplified? */
X struct a_side *reqoside;
X struct a_unit *requnit;
X struct a_unit *tmpcurunit; /* saved value of curunit */
X int reqvalue, reqvalue2;
X int reqstrbeg, reqcurstr; /* data about string under construction */
X char *reqdeflt; /* A default string */
X int tmpcurx, tmpcury; /* saved values of curx,cury */
X int reqposx, reqposy; /* accumulator for position reading */
X char ustr[MAXUTYPES]; /* used in composing unit type hints */
X int uvec[MAXUTYPES]; /* vector of allowed unit types to input */
X int bvec[MAXUTYPES]; /* bit vector of allowed unit types to input */
X /* Machinery for standing orders */
X bool teach; /* true when only setting a standing order */
X struct a_unit *sounit; /* unit that stores standing order for occs */
X int soutype; /* unit type that will get standing orders */
X struct a_order *tmporder; /* holding place for orders */
X /* Constructed during display init */
X short monochrome; /* obvious */
X short nw, nh; /* length and number of notice lines */
X short vw, vh; /* viewport width and height in hexes */
X short vw2, vh2; /* 1/2 (rounded down) of above values */
X short sw; /* number of chars in side listing */
X short fw, fh; /* dimensions of text font (in pixels) */
X short hw, hh; /* dimensions of general icon font (in pixels) */
X short hch; /* center-to-center distance between hexes */
X short uw, uh; /* dimensions of unit font/bitmaps (in pixels) */
X short mm; /* magnification of world hexes (in pixels) */
X short bd, margin; /* spacing around things */
X short th, bh; /* heights of top and bottom parts of display */
X short rw, lw; /* widths of right and left parts of display */
X short mw, mh; /* main window width and height */
X /* Working variables for the display */
X short vcx, vcy; /* center hex in the viewport */
X short lastvcx, lastvcy; /* last center hex (-1,-1 initially) */
X short lastx, lasty; /* last current x and y (-1,-1 initially) */
X char noticebuf[MAXNOTES][BUFSIZE]; /* data for the notice area */
X char promptbuf[BUFSIZE]; /* current prompt + input str on display */
X /* All the colors used - filled in by display init */
X long bdcolor; /* color for borders */
X long bgcolor; /* background color */
X long fgcolor; /* foreground (text) color */
X long owncolor; /* color for us (usually black) */
X long altcolor; /* another color for us (usually blue) */
X long enemycolor; /* color for them (usually red) */
X long neutcolor; /* color for fencesitters (usually gray) */
X long graycolor; /* color for graying out (usually gray) */
X long diffcolor; /* unusual/distinct color (usually maroon) */
X long goodcolor; /* color for OKness (usually green) */
X long badcolor; /* color for none-OKness (usually red) */
X long hexcolor[MAXTTYPES]; /* the color of each terrain type */
X long main; /* main window */
X long help; /* help window */
X long msg; /* places for notices/warnings */
X long info; /* details about a unit */
X long prompt; /* where prompts and input are */
X long map; /* detailed map of vicinity */
X long sides; /* list of sides and their status */
X long timemode; /* turn number and mode */
X long clock; /* chess clock display */
X long state; /* status of units on side */
X long world; /* display of entire world */
X long display; /* side's specific display structure */
X /* Filled during side creation */
X struct a_side *next; /* pointer to next in list */
X} Side;
X
X/* Some convenient macros. */
X
X#define humanside(x) ((x) != NULL && (x)->humanp)
X
X/* Iteration over all sides. */
X
X#define for_all_sides(v) for (v = sidelist; v != NULL; v = v->next)
X
X/* Manipulation of bytes encoding views of things. */
X/* Types 30, 31 reserved for "seen but unoccupied" and "unseen". */
X
X#define buildview(a,t) (((a)<<5)|(t))
X
X#define vside(v) (((v)>>5) & 0x07)
X#define vtype(v) ((v) & 0x1f)
X
X#define UNSEEN 0x1f
X#define EMPTY 0x1e
X
X#define side_view(s,x,y) (((s)->view)[world.width*(y)+(x)])
X
X#define set_side_view(s,x,y,v) (((s)->view)[world.width*(y)+(x)] = (v))
X
X#define cover(s,x,y) (((s)->coverage)[world.width*(y)+(x)])
X
X#define set_cover(s,x,y,v) (((s)->coverage)[world.width*(y)+(x)] = (v))
X
X#define add_cover(s,x,y,v) (((s)->coverage)[world.width*(y)+(x)] += (v))
X
X/* Side variables. */
X
Xextern Side *sidelist, *curside, *tmpside;
Xextern Side *create_side(), *side_n(), *read_basic_side();
X
Xextern int numgivens, numhumans, numsides;
X
Xextern char *hosts[];
Xextern char *random_side_name();
X
Xextern bool humans[];
END_OF_side.h
if test 9916 -ne `wc -c <side.h`; then
echo shar: \"side.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
echo shar: End of archive 14 \(of 18\).
cp /dev/null ark14isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 18 archives.
rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
echo You still need to unpack the following archives:
echo " " ${MISSING}
fi
## End of shell archive.
exit 0