games-request@tekred.TEK.COM (01/22/88)
Submitted by: Kurt Hoyt <kwh@sei.cmu.edu> Comp.sources.games: Volume 3, Issue 68 Archive-name: x11conq/Part02 #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of archive 2 (of 3)." # Contents: x11diffs.2 # Wrapped by billr@tekred on Wed Jan 20 08:46:44 1988 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f x11diffs.2 -a "${1}" != "-c" ; then echo shar: Will not over-write existing file \"x11diffs.2\" else echo shar: Extracting \"x11diffs.2\" \(39069 characters\) sed "s/^X//" >x11diffs.2 <<'END_OF_x11diffs.2' Xdiff -c ./bitmaps.h X11/bitmaps.h X*** ./bitmaps.h Thu Jul 16 14:55:04 1987 X--- X11/bitmaps.h Wed Oct 28 08:03:44 1987 X*************** X*** 1,4 X! /* Copyright (c) 1987 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 X--- 1,5 ----- X! /* Copyright (c) 1987 Stanley T. Shebs, University of Utah; */ X! /* Kurt W. Hoyt, Software Engineering Institute. */ X /* This program may be used, copied, modified, and redistributed freely */ X /* for noncommercial purposes, so long as this notice remains intact. */ X X*************** X*** 2,8 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: bitmaps.h,v 1.5 87/06/06 20:04:13 shebs Exp $ */ X X #define cmask_width 16 X #define cmask_height 16 X X--- 3,9 ----- 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: bitmaps.h,v 1.6 87/10/19 17:05:55 kwh Exp $ */ X X #define cmask_width 16 X #define cmask_height 16 X*************** X*** 6,16 X X #define cmask_width 16 X #define cmask_height 16 X! static short cmask_bits[] = { X! 0xffff, 0x8001, 0xbffd, 0xa005, X! 0xa005, 0xa005, 0xa005, 0xa005, X! 0xa005, 0xa005, 0xa005, 0xa005, X! 0xa005, 0xbffd, 0x8001, 0xffff}; X X #define ccurs_width 16 X #define ccurs_height 16 X X--- 7,16 ----- X X #define cmask_width 16 X #define cmask_height 16 X! static char cmask_bits[] = { X! 0xff, 0xff, 0x01, 0x80, 0xfd, 0xbf, 0x05, 0xa0, 0x05, 0xa0, 0x05, 0xa0, X! 0x05, 0xa0, 0x05, 0xa0, 0x05, 0xa0, 0x05, 0xa0, 0x05, 0xa0, 0x05, 0xa0, X! 0x05, 0xa0, 0xfd, 0xbf, 0x01, 0x80, 0xff, 0xff}; X X #define ccurs_width 16 X #define ccurs_height 16 X*************** X*** 14,24 X X #define ccurs_width 16 X #define ccurs_height 16 X! static short ccurs_bits[] = { X! 0x0000, 0x7ffe, 0x4002, 0x4002, X! 0x4002, 0x4002, 0x4002, 0x4002, X! 0x4002, 0x4002, 0x4002, 0x4002, X! 0x4002, 0x4002, 0x7ffe, 0x0000}; X X #define mcurs_width 16 X #define mcurs_height 16 X X--- 14,23 ----- X X #define ccurs_width 16 X #define ccurs_height 16 X! static char ccurs_bits[] = { X! 0x00, 0x00, 0xfe, 0x7f, 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, X! 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, X! 0x02, 0x40, 0x02, 0x40, 0xfe, 0x7f, 0x00, 0x00}; X X #define mcurs_width 16 X #define mcurs_height 16 X*************** X*** 22,32 X X #define mcurs_width 16 X #define mcurs_height 16 X! static short mcurs_bits[] = { X! 0x03e0, 0x0c98, 0x1084, 0x2082, X! 0x2082, 0x4081, 0x4081, 0x7fff, X! 0x4081, 0x4081, 0x2082, 0x2082, X! 0x1084, 0x0c98, 0x03e0, 0x0000}; X X #define mmask_width 16 X #define mmask_height 16 X X--- 21,30 ----- X X #define mcurs_width 16 X #define mcurs_height 16 X! static char mcurs_bits[] = { X! 0xe0, 0x03, 0x98, 0x0c, 0x84, 0x10, 0x82, 0x20, 0x82, 0x20, 0x81, 0x40, X! 0x81, 0x40, 0xff, 0x7f, 0x81, 0x40, 0x81, 0x40, 0x82, 0x20, 0x82, 0x20, X! 0x84, 0x10, 0x98, 0x0c, 0xe0, 0x03, 0x00, 0x00}; X X #define mmask_width 16 X #define mmask_height 16 X*************** X*** 30,40 X X #define mmask_width 16 X #define mmask_height 16 X! static short mmask_bits[] = { X! 0x03e0, 0x0fd8, 0x19b4, 0x218a, X! 0x6186, 0x4185, 0xc183, 0xffff, X! 0xffff, 0xc183, 0xa182, 0x6186, X! 0x5184, 0x2d98, 0x1bf0, 0x07c0}; X X #define dots_width 16 X #define dots_height 16 X X--- 28,37 ----- X X #define mmask_width 16 X #define mmask_height 16 X! static char mmask_bits[] = { X! 0xe0, 0x03, 0xd8, 0x0f, 0xb4, 0x19, 0x8a, 0x21, 0x86, 0x61, 0x85, 0x41, X! 0x83, 0xc1, 0xff, 0xff, 0xff, 0xff, 0x83, 0xc1, 0x82, 0xa1, 0x86, 0x61, X! 0x84, 0x51, 0x98, 0x2d, 0xf0, 0x1b, 0xc0, 0x07}; X X #define dots_width 16 X #define dots_height 16 X*************** X*** 38,48 X X #define dots_width 16 X #define dots_height 16 X! static short dots_bits[] = { X! 0x0101, 0x0000, 0x0000, 0x0000, X! 0x1010, 0x0000, 0x0000, 0x0000, X! 0x0101, 0x0000, 0x0000, 0x0000, X! 0x1010, 0x0000, 0x0000, 0x0000}; X X #define bomb1_width 16 X #define bomb1_height 16 X X--- 35,44 ----- X X #define dots_width 16 X #define dots_height 16 X! static char dots_bits[] = { X! 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, X! 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, X! 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; X X #define bomb1_width 16 X #define bomb1_height 16 X*************** X*** 46,56 X X #define bomb1_width 16 X #define bomb1_height 16 X! static short bomb1_bits[] = { X! 0x0000, 0x0000, 0x0000, 0x0000, X! 0x0000, 0x0000, 0x0380, 0x07e0, X! 0x0ff0, 0x0ff0, 0x0ff8, 0x1ff8, X! 0x1ff8, 0x0ff0, 0x0000, 0x0000}; X X #define bomb2_width 24 X #define bomb2_height 24 X X--- 42,51 ----- X X #define bomb1_width 16 X #define bomb1_height 16 X! static char bomb1_bits[] = { X! 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, X! 0x80, 0x03, 0xe0, 0x07, 0xf0, 0x0f, 0xf0, 0x0f, 0xf8, 0x0f, 0xf8, 0x1f, X! 0xf8, 0x1f, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00}; X X #define bomb2_width 24 X #define bomb2_height 24 X*************** X*** 54,72 X X #define bomb2_width 24 X #define bomb2_height 24 X! static short bomb2_bits[] = { X! 0x0000, 0x0000, 0x0000, 0x0000, X! 0x0000, 0x0000, 0x0000, 0x0000, X! 0x0000, 0x0000, 0x3c00, 0x005a, X! 0xff80, 0x0024, 0xffdc, 0x000d, X! 0xffe0, 0x0003, 0xffee, 0x0003, X! 0xffe0, 0x0003, 0xffc0, 0x0001, X! 0xff80, 0x0000, 0x3f00, 0x0000, X! 0x3f00, 0x0000, 0x3f00, 0x0000, X! 0x3f00, 0x0000, 0x7f00, 0x0000, X! 0x7f80, 0x0000, 0x7f80, 0x0000, X! 0x7f80, 0x0000, 0xffc0, 0x0000, X! 0x0000, 0x0000, 0x0000, 0x0000}; X X #define bomb3_width 32 X #define bomb3_height 32 X X--- 49,61 ----- X X #define bomb2_width 24 X #define bomb2_height 24 X! static char bomb2_bits[] = { X! 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, X! 0x00, 0x00, 0x00, 0x00, 0x3c, 0x5a, 0x80, 0xff, 0x24, 0xdc, 0xff, 0x0d, X! 0xe0, 0xff, 0x03, 0xee, 0xff, 0x03, 0xe0, 0xff, 0x03, 0xc0, 0xff, 0x01, X! 0x80, 0xff, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x3f, 0x00, X! 0x00, 0x3f, 0x00, 0x00, 0x7f, 0x00, 0x80, 0x7f, 0x00, 0x80, 0x7f, 0x00, X! 0x80, 0x7f, 0x00, 0xc0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; X X #define bomb3_width 32 X #define bomb3_height 32 X*************** X*** 70,90 X X #define bomb3_width 32 X #define bomb3_height 32 X! static short bomb3_bits[] = { X! 0x0000, 0x000f, 0x1ff0, 0x7ff0, X! 0x0000, 0x0000, 0xe2fe, 0x3fa3, X! 0xfc00, 0x001f, 0xff3c, 0x007f, X! 0xff80, 0x00ff, 0xefc0, 0x01fb, X! 0xefc0, 0x01fb, 0xefe0, 0x03fb, X! 0xffe0, 0x03ff, 0xffe0, 0x03ff, X! 0xfde0, 0x01bf, 0xfbe0, 0x49df, X! 0xe782, 0x34e7, 0x1e14, 0x4238, X! 0x9fe2, 0x3499, 0xbe40, 0x413d, X! 0xfdbe, 0x1edf, 0xf800, 0x011f, X! 0xfdfe, 0x7fdf, 0xfc00, 0x001f, X! 0xfc00, 0x001f, 0xfc00, 0x003f, X! 0xfe00, 0x001f, 0xfe00, 0x003f, X! 0xff00, 0x003f, 0xffc0, 0x00ff, X! 0xfffc, 0x3fff, 0xfffe, 0x7fff, X! 0x0000, 0x0000, 0x0000, 0x0000}; X X X--- 59,74 ----- X X #define bomb3_width 32 X #define bomb3_height 32 X! static char bomb3_bits[] = { X! 0x00, 0x00, 0x0f, 0x00, 0xf0, 0x1f, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00, X! 0xfe, 0xe2, 0xa3, 0x3f, 0x00, 0xfc, 0x1f, 0x00, 0x3c, 0xff, 0x7f, 0x00, X! 0x80, 0xff, 0xff, 0x00, 0xc0, 0xef, 0xfb, 0x01, 0xc0, 0xef, 0xfb, 0x01, X! 0xe0, 0xef, 0xfb, 0x03, 0xe0, 0xff, 0xff, 0x03, 0xe0, 0xff, 0xff, 0x03, X! 0xe0, 0xfd, 0xbf, 0x01, 0xe0, 0xfb, 0xdf, 0x49, 0x82, 0xe7, 0xe7, 0x34, X! 0x14, 0x1e, 0x38, 0x42, 0xe2, 0x9f, 0x99, 0x34, 0x40, 0xbe, 0x3d, 0x41, X! 0xbe, 0xfd, 0xdf, 0x1e, 0x00, 0xf8, 0x1f, 0x01, 0xfe, 0xfd, 0xdf, 0x7f, X! 0x00, 0xfc, 0x1f, 0x00, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0xfc, 0x3f, 0x00, X! 0x00, 0xfe, 0x1f, 0x00, 0x00, 0xfe, 0x3f, 0x00, 0x00, 0xff, 0x3f, 0x00, X! 0xc0, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x7f, X! 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; X Xdiff -c ./do.c X11/do.c X*** ./do.c Thu Jul 16 14:55:06 1987 X--- X11/do.c Wed Oct 28 09:07:36 1987 X*************** X*** 2,8 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: do.c,v 1.8 87/06/08 21:44:58 shebs Exp $ */ X X #include "xconq.h" X X X--- 2,8 ----- 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: do.c,v 1.9 87/10/27 09:07:31 kwh Exp $ */ X X #include "xconq.h" X X*************** X*** 475,480 X notify_all(" "); X notify_all("XCONQ version %s", version); X notify_all("(c) Copyright 1987, Stanley T. Shebs, University of Utah"); X notify_all(" "); X } X X X--- 475,481 ----- X notify_all(" "); X notify_all("XCONQ version %s", version); X notify_all("(c) Copyright 1987, Stanley T. Shebs, University of Utah"); X+ notify_all(" Kurt W. Hoyt, Software Engineering Institute"); X notify_all(" "); X } X Xdiff -c ./draw.c X11/draw.c X*** ./draw.c Thu Jul 16 14:55:08 1987 X--- X11/draw.c Wed Oct 28 08:05:43 1987 X*************** X*** 1,4 X! /* Copyright (c) 1987 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 X--- 1,5 ----- X! /* Copyright (c) 1987 Stanley T. Shebs, University of Utah; */ X! /* Kurt W. Hoyt, Software Engineering Institute. */ X /* This program may be used, copied, modified, and redistributed freely */ X /* for noncommercial purposes, so long as this notice remains intact. */ X X*************** X*** 2,8 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: draw.c,v 1.5 87/06/08 21:45:12 shebs Exp $ */ X X #include "xconq.h" X X X--- 3,9 ----- 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: draw.c,v 1.9 87/10/27 11:24:24 kwh Exp $ */ X X #include "xconq.h" X X*************** X*** 23,30 X show_map(side); X } X draw_cursor(side, curx, cury); X! flush_output(); X! flush_input(); X } X } X X X--- 24,31 ----- X show_map(side); X } X draw_cursor(side, curx, cury); X! flush_output(side); X! flush_input(side); X } X } X X*************** X*** 80,86 X Side *side; X { X char view; X! int x, y, color; X Side *side2; X X if (active_display(side)) { X X--- 81,88 ----- X Side *side; X { X char view; X! int x, y; X! unsigned long color; X Side *side2; X X if (active_display(side)) { X*************** X*** 100,108 X else X color = side->enemycolor; X } X! XPixSet(side->world, X! mapmag*x, mapmag*(worldheight-1-y), mapmag, mapmag, X! color); X } X } X } X X--- 102,113 ----- X else X color = side->enemycolor; X } X! XSetFillStyle (side->display, side->gc, FillSolid); X! XSetForeground (side->display, side->gc, color); X! XFillRectangle (side->display, side->world, side->gc, X! mapmag*x, mapmag*(worldheight-1-y), X! (unsigned int) mapmag, X! (unsigned int) mapmag); X } X } X } X*************** X*** 121,127 X vcx = side->vcx; vcy = side->vcy; X x1 = vcx - vwid2; y1 = vcy - vhgt2; X x2 = vcx + vwid2; y2 = vcy + vhgt2; X! XClear(side->map); X X for (y = y1; y <= y2; ++y) { X for (x = x1; x <= x2; ++x) { X X--- 126,132 ----- X vcx = side->vcx; vcy = side->vcy; X x1 = vcx - vwid2; y1 = vcy - vhgt2; X x2 = vcx + vwid2; y2 = vcy + vhgt2; X! XClearWindow(side->display, side->map); X X for (y = y1; y <= y2; ++y) { X for (x = x1; x <= x2; ++x) { X*************** X*** 133,138 X draw_box(side); X X if (side->showcoords) { X for (x = x1; x < x2; ++x) { X if ((x % 5) == 0) { X sprintf(spbuf, "%d", x - greenwich); X X--- 138,147 ----- X draw_box(side); X X if (side->showcoords) { X+ XSetFont (side->display, side->gc, side->msgfont); X+ XSetForeground (side->display, side->gc, side->fgcolor); X+ XSetBackground (side->display, side->gc, side->bgcolor); X+ X for (x = x1; x < x2; ++x) { X if ((x % 5) == 0) { X sprintf(spbuf, "%d", x - greenwich); X*************** X*** 136,144 X for (x = x1; x < x2; ++x) { X if ((x % 5) == 0) { X sprintf(spbuf, "%d", x - greenwich); X! XText(side->map, xform_x(vcx, x), xform_y(vcy, y1), X! spbuf, strlen(spbuf), X! side->msgfont, side->fgcolor, side->bgcolor); X } X } X for (y = y1; y < y2; ++y) { X X--- 145,153 ----- X for (x = x1; x < x2; ++x) { X if ((x % 5) == 0) { X sprintf(spbuf, "%d", x - greenwich); X! XDrawString (side->display, side->map, side->gc, X! xform_x(vcx, x), xform_y(vcy, y1) + SQ, X! spbuf, strlen(spbuf)); X } X } X for (y = y1; y < y2; ++y) { X*************** X*** 144,152 X for (y = y1; y < y2; ++y) { X if ((y % 5) == 0) { X sprintf(spbuf, "%d", y - equator); X! XText(side->map, xform_x(vcx, x1), xform_y(vcy, y), X! spbuf, strlen(spbuf), X! side->msgfont, side->fgcolor, side->bgcolor); X } X } X } X X--- 153,161 ----- X for (y = y1; y < y2; ++y) { X if ((y % 5) == 0) { X sprintf(spbuf, "%d", y - equator); X! XDrawString (side->display, side->map, side->gc, X! xform_x(vcx, x1), xform_y(vcy, y) + SQ, X! spbuf, strlen(spbuf)); X } X } X } X*************** X*** 179,184 X int x1, y1, x2, y2, sx1, sy1, sx2, sy2; X X /* display check not necessary (?) */ X X x1 = vcx - vwid2; y1 = vcy - vhgt2; X x2 = vcx + vwid2; y2 = vcy + vhgt2; X X--- 188,194 ----- X int x1, y1, x2, y2, sx1, sy1, sx2, sy2; X X /* display check not necessary (?) */ X+ /* redo with a rectangle instead? */ X X x1 = vcx - vwid2; y1 = vcy - vhgt2; X x2 = vcx + vwid2; y2 = vcy + vhgt2; X*************** X*** 185,198 X sx1 = mapmag*x1; sy1 = mapmag*(worldheight-y1); X sx2 = mapmag*x2; sy2 = mapmag*(worldheight-y2); X X! XLine(side->world, sx1, sy1, sx2, sy1, X! 1, 1, side->owncolor, GXinvert, AllPlanes); X! XLine(side->world, sx2, sy1-1, sx2, sy2+1, X! 1, 1, side->owncolor, GXinvert, AllPlanes); X! XLine(side->world, sx2, sy2, sx1, sy2, X! 1, 1, side->owncolor, GXinvert, AllPlanes); X! XLine(side->world, sx1, sy2+1, sx1, sy1-1, X! 1, 1, side->owncolor, GXinvert, AllPlanes); X } X X /* Draw an individual detailed square. This includes the background color */ X X--- 195,209 ----- X sx1 = mapmag*x1; sy1 = mapmag*(worldheight-y1); X sx2 = mapmag*x2; sy2 = mapmag*(worldheight-y2); X X! XSetFunction (side->display, side->gc, GXinvert); X! XSetForeground (side->display, side->gc, side->owncolor); X! XSetLineAttributes (side->display, side->gc, 1, LineSolid, CapButt, X! JoinMiter); X! XDrawLine (side->display, side->world, side->gc, sx1, sy1, sx2, sy1); X! XDrawLine (side->display, side->world, side->gc, sx2, sy1-1, sx2, sy2+1); X! XDrawLine (side->display, side->world, side->gc, sx2, sy2, sx1, sy2); X! XDrawLine (side->display, side->world, side->gc, sx1, sy2+1, sx1, sy1-1); X! XSetFunction (side->display, side->gc, GXcopy); X } X X /* Draw an individual detailed square. This includes the background color */ X*************** X*** 206,212 X { X bool drawbig; X char view, str[2]; X! int color, sx, sy; X Side *side2; X X /* checking active display not necessary here */ X X--- 217,224 ----- X { X bool drawbig; X char view, str[2]; X! int sx, sy; X! unsigned long color; X Side *side2; X unsigned long white = WhitePixel (side->display, 0); X unsigned long black = BlackPixel (side->display, 0); X*************** X*** 208,213 X char view, str[2]; X int color, sx, sy; X Side *side2; X X /* checking active display not necessary here */ X X X--- 220,227 ----- X int sx, sy; X unsigned long color; X Side *side2; X+ unsigned long white = WhitePixel (side->display, 0); X+ unsigned long black = BlackPixel (side->display, 0); X X /* checking active display not necessary here */ X X*************** X*** 211,248 X X /* checking active display not necessary here */ X X! view = side_view(side, x, y); X! color = side->sqcolor[terrain(x, y)]; X! if (view != EMPTY) { X! if (vthing(view) == VCITY) X! str[0] = citychars[vtype(view)]; X! else X! str[0] = unitchars[vtype(view)]; X! side2 = side_n(valign(view)); X! if (side2 == NULL) X! color = side->graycolor; X! else if (side2 == side) X! color = side->owncolor; X! else X! color = side->enemycolor; X! } X! drawbig = on_screen(side->vcx, side->vcy, x, y); X! if (side->fewcolors) { X! if (drawbig) { X! sx = xform_x(side->vcx, x); sy = xform_y(side->vcy, y); X! if (view == EMPTY) { X! str[0] = terrchars[terrain(x, y)]; X! XText(side->map, sx, sy, str, 1, side->iconfont, X! BlackPixel, WhitePixel); X! } else { X! XText(side->map, sx, sy, str, 1, side->iconfont, X! (side == side2 ? BlackPixel : WhitePixel), X! (side == side2 ? WhitePixel : BlackPixel)); X! if (side2 != NULL && side2 != side) { X! sprintf(str, "%d", side_number(side2)); X! XTextMask(side->map, sx, sy, str, 1, side->iconfont, X! WhitePixel); X! } X } X } X } else { X X--- 225,276 ----- X X /* checking active display not necessary here */ X X! if (side->map != NULL) { X! view = side_view(side, x, y); X! color = side->sqcolor[terrain(x, y)]; X! if (view != EMPTY) { X! if (vthing(view) == VCITY) X! str[0] = citychars[vtype(view)]; X! else X! str[0] = unitchars[vtype(view)]; X! side2 = side_n(valign(view)); X! if (side2 == NULL) X! color = side->graycolor; X! else if (side2 == side) X! color = side->owncolor; X! else X! color = side->enemycolor; X! } X! X! drawbig = on_screen(side->vcx, side->vcy, x, y); X! XSetFont (side->display, side->gc, side->iconfont); X! X! if (side->fewcolors) { X! if (drawbig) { X! sx = xform_x(side->vcx, x); X! sy = xform_y(side->vcy, y) + SQ; X! if (view == EMPTY) { X! str[0] = terrchars[terrain(x, y)]; X! XSetForeground (side->display, side->gc, black); X! XSetBackground (side->display, side->gc, white); X! XDrawImageString (side->display, side->map, side->gc, X! sx, sy, str, 1); X! } else { X! if (side == side2) { X! XSetForeground (side->display, side->gc, black); X! XSetBackground (side->display, side->gc, white); X! } else { X! XSetForeground (side->display, side->gc, white); X! XSetBackground (side->display, side->gc, black); X! } X! XDrawImageString (side->display, side->map, side->gc, X! sx, sy, str, 1); X! if (side2 != NULL && side2 != side) { X! sprintf(str, "%d", side_number(side2)); X! XDrawString (side->display, side->map, side->gc, X! sx, sy, str, 1); X! } X! } X } X } else { X if (drawbig) { X*************** X*** 244,261 X WhitePixel); X } X } X! } X! } else { X! if (drawbig) { X! sx = xform_x(side->vcx, x); sy = xform_y(side->vcy, y); X! XPixSet(side->map, sx, sy, SQ, SQ, side->sqcolor[terrain(x, y)]); X! if (view != EMPTY) { X! XTextMask(side->map, sx, sy, str, 1, side->iconfont, color); X! if (numsides > 2 && side2 != NULL && side2 != side) { X! sprintf(str, "%d", side_number(side2)); X! XTextMask(side->map, sx, sy, str, 1, side->iconfont, X! color); X! } X } X } X /* don't want black blobs on world map */ X X--- 272,293 ----- X } X } X } X! } else { X! if (drawbig) { X! sx = xform_x(side->vcx, x); X! sy = xform_y(side->vcy, y) + SQ; X! XSetForeground (side->display, side->gc, color); X! XSetBackground (side->display, side->gc, X! side->sqcolor[terrain(x,y)]); X! if (view != EMPTY) { X! XDrawImageString (side->display, side->map, side->gc, X! sx, sy, str, 1); X! if (numsides > 2 && side2 != NULL && side2 != side) { X! sprintf(str, "%d", side_number(side2)); X! XDrawString (side->display, side->map, side->gc, X! sx, sy, str, 1); X! } X! } X } X /* don't want black blobs on world map */ X if (color == side->owncolor) color = side->bdcolor; X*************** X*** 257,267 X color); X } X } X! } X! /* don't want black blobs on world map */ X! if (color == side->owncolor) color = side->bdcolor; X! XPixSet(side->world, X! mapmag*x, mapmag*(worldheight-1-y), mapmag, mapmag, color); X } X /* so other players see when something moves */ X if (side != curside && curside != NULL) XFlush(); X X--- 289,305 ----- X } X } X } X! /* don't want black blobs on world map */ X! if (color == side->owncolor) color = side->bdcolor; X! XSetFillStyle (side->display, side->gc, FillSolid); X! XSetForeground (side->display, side->gc, color); X! XFillRectangle (side->display, side->world, side->gc, X! mapmag*x, mapmag*(worldheight-1-y), X! (unsigned int) mapmag, X! (unsigned int) mapmag); X! } X! /* so other players see when something moves */ X! if (side != curside && curside != NULL) XFlush(side->display); X } X } X X*************** X*** 263,270 X XPixSet(side->world, X mapmag*x, mapmag*(worldheight-1-y), mapmag, mapmag, color); X } X- /* so other players see when something moves */ X- if (side != curside && curside != NULL) XFlush(); X } X X /* Draw an unseen square (for cursor erasing). A gutted version of prev fn */ X X--- 301,306 ----- X /* so other players see when something moves */ X if (side != curside && curside != NULL) XFlush(side->display); X } X } X X /* Draw an unseen square (for cursor erasing). A gutted version of prev fn */ X*************** X*** 278,285 X X drawbig = on_screen(side->vcx, side->vcy, x, y); X if (drawbig) { X! sx = xform_x(side->vcx, x); sy = xform_y(side->vcy, y); X! XPixSet(side->map, sx, sy, SQ, SQ, side->bgcolor); X } X } X X X--- 314,325 ----- X X drawbig = on_screen(side->vcx, side->vcy, x, y); X if (drawbig) { X! sx = xform_x(side->vcx, x); X! sy = xform_y(side->vcy, y); X! XSetFillStyle (side->display, side->gc, FillSolid); X! XSetForeground (side->display, side->gc, side->bgcolor); X! XFillRectangle (side->display, side->map, side->gc, X! sx, sy, SQ, SQ); X } X } X X*************** X*** 295,301 X X if (active_display(side)) { X if (humanside(side)) { X! sx = xform_x(side->vcx, x); sy = xform_y(side->vcy, y); X if (abs(x - side->lastx) > 2 || abs(y - side->lasty) > 2) { X XLine(side->map, sx-50, sy-50, sx+50, sy+50, X 1, 1, side->owncolor, GXinvert, AllPlanes); X X--- 335,342 ----- X X if (active_display(side)) { X if (humanside(side)) { X! sx = xform_x(side->vcx, x); X! sy = xform_y(side->vcy, y); X if (abs(x - side->lastx) > 2 || abs(y - side->lasty) > 2) { X XSetFunction (side->display, side->gc, GXinvert); X XSetForeground (side->display, side->gc, side->owncolor); X*************** X*** 297,311 X if (humanside(side)) { X sx = xform_x(side->vcx, x); sy = xform_y(side->vcy, y); X if (abs(x - side->lastx) > 2 || abs(y - side->lasty) > 2) { X! XLine(side->map, sx-50, sy-50, sx+50, sy+50, X! 1, 1, side->owncolor, GXinvert, AllPlanes); X! XLine(side->map, sx-50, sy+50, sx+50, sy-50, X! 1, 1, side->owncolor, GXinvert, AllPlanes); X! XFlush(); X! XLine(side->map, sx-50, sy-50, sx+50, sy+50, X! 1, 1, side->owncolor, GXinvert, AllPlanes); X! XLine(side->map, sx-50, sy+50, sx+50, sy-50, X! 1, 1, side->owncolor, GXinvert, AllPlanes); X } X /* monochrome should invert, but program draws cursor twice, */ X /* causing inverted image to go back to normal quickly */ X X--- 338,357 ----- X sx = xform_x(side->vcx, x); X sy = xform_y(side->vcy, y); X if (abs(x - side->lastx) > 2 || abs(y - side->lasty) > 2) { X! XSetFunction (side->display, side->gc, GXinvert); X! XSetForeground (side->display, side->gc, side->owncolor); X! XSetLineAttributes (side->display, side->gc, 1, LineSolid, X! CapButt, JoinMiter); X! XDrawLine (side->display, side->map, side->gc, X! sx-50, sy-50, sx+50, sy+50); X! XDrawLine (side->display, side->map, side->gc, X! sx-50, sy+50, sx+50, sy-50); X! XFlush (side->display); X! XDrawLine (side->display, side->map, side->gc, X! sx-50, sy-50, sx+50, sy+50); X! XDrawLine (side->display, side->map, side->gc, X! sx-50, sy+50, sx+50, sy-50); X! XSetFunction (side->display, side->gc, GXcopy); X } X /* monochrome should invert, but program draws cursor twice, */ X /* causing inverted image to go back to normal quickly */ X*************** X*** 309,318 X } X /* monochrome should invert, but program draws cursor twice, */ X /* causing inverted image to go back to normal quickly */ X! XPixFill(side->map, sx, sy, SQ, SQ, X! side->bgcolor, side->cmask, GXcopy, AllPlanes); X! XPixFill(side->map, sx, sy, SQ, SQ, X! side->fgcolor, side->ccurs, GXcopy, AllPlanes); X side->lastx = x; side->lasty = y; X } X if (side->warpmouse) { X X--- 355,371 ----- X } X /* monochrome should invert, but program draws cursor twice, */ X /* causing inverted image to go back to normal quickly */ X! XSetClipOrigin (side->display, side->gc, sx, sy); X! XSetClipMask (side->display, side->gc, side->cmask); X! XSetForeground (side->display, side->gc, side->bgcolor); X! XFillRectangle (side->display, side->map, side->gc, X! sx, sy, SQ, SQ); X! XSetClipMask (side->display, side->gc, side->ccurs); X! XSetForeground (side->display, side->gc, side->fgcolor); X! XFillRectangle (side->display, side->map, side->gc, X! sx, sy, SQ, SQ); X! XSetClipOrigin (side->display, side->gc, 0, 0); X! XSetClipMask (side->display, side->gc, None); X side->lastx = x; side->lasty = y; X } X if (side->warpmouse) { X*************** X*** 316,322 X side->lastx = x; side->lasty = y; X } X if (side->warpmouse) { X! XWarpMouse(side->map, sx+SQ/2, sy+SQ/2); X } X } X } X X--- 369,376 ----- X side->lastx = x; side->lasty = y; X } X if (side->warpmouse) { X! XWarpPointer (side->display, None, side->map, 0, 0, 0, 0, X! sx+SQ/2, sy+SQ/2); X } X } X } X*************** X*** 332,338 X int sx, sy; X X if (active_display(side)) { X! sx = xform_x(side->vcx, x); sy = xform_y(side->vcy, y); X str[0] = unitchars[type]; X XTextMask(side->map, sx, sy, str, 1, side->iconfont, side->curscolor); X } X X--- 386,393 ----- X int sx, sy; X X if (active_display(side)) { X! sx = xform_x(side->vcx, x); X! sy = xform_y(side->vcy, y) + SQ; X str[0] = unitchars[type]; X XSetFont (side->display, side->gc, side->iconfont); X XSetForeground (side->display, side->gc, side->curscolor); X*************** X*** 334,340 X if (active_display(side)) { X sx = xform_x(side->vcx, x); sy = xform_y(side->vcy, y); X str[0] = unitchars[type]; X! XTextMask(side->map, sx, sy, str, 1, side->iconfont, side->curscolor); X } X } X X X--- 389,397 ----- X sx = xform_x(side->vcx, x); X sy = xform_y(side->vcy, y) + SQ; X str[0] = unitchars[type]; X! XSetFont (side->display, side->gc, side->iconfont); X! XSetForeground (side->display, side->gc, side->curscolor); X! XDrawString (side->display, side->map, side->gc, sx, sy, str, 1); X } X } X X*************** X*** 366,371 X int x, y; X { X int i, sx1, sy1, sx2, sy2; X X sx1 = xform_x(side1->vcx, x); sy1 = xform_y(side1->vcy, y); X sx2 = xform_x(side2->vcx, x); sy2 = xform_y(side2->vcy, y); X X--- 423,430 ----- X int x, y; X { X int i, sx1, sy1, sx2, sy2; X+ unsigned long white1, white2; X+ Pixmap pm_white1, pm_white2; X X sx1 = xform_x(side1->vcx, x); X sy1 = xform_y(side1->vcy, y); X*************** X*** 367,375 X { X int i, sx1, sy1, sx2, sy2; X X! sx1 = xform_x(side1->vcx, x); sy1 = xform_y(side1->vcy, y); X! sx2 = xform_x(side2->vcx, x); sy2 = xform_y(side2->vcy, y); X! X if (active_display(side1)) { X XTileFill(side1->map, 0, 0, vwid*SQ, vhgt*SQ, X WhitePixmap, 0, GXinvert, AllPlanes); X X--- 426,436 ----- X unsigned long white1, white2; X Pixmap pm_white1, pm_white2; X X! sx1 = xform_x(side1->vcx, x); X! sy1 = xform_y(side1->vcy, y); X! sx2 = xform_x(side2->vcx, x); X! sy2 = xform_y(side2->vcy, y); X! X if (active_display(side1)) { X white1 = WhitePixel (side1->display, 0); X X*************** X*** 371,379 X sx2 = xform_x(side2->vcx, x); sy2 = xform_y(side2->vcy, y); X X if (active_display(side1)) { X! XTileFill(side1->map, 0, 0, vwid*SQ, vhgt*SQ, X! WhitePixmap, 0, GXinvert, AllPlanes); X! XFlush(); X } X if (active_display(side2)) { X XTileFill(side2->map, 0, 0, vwid*SQ, vhgt*SQ, X X--- 432,445 ----- X sy2 = xform_y(side2->vcy, y); X X if (active_display(side1)) { X! white1 = WhitePixel (side1->display, 0); X! X! XSetForeground (side1->display, side1->gc, side1->fgcolor); X! XSetFunction (side1->display, side1->gc, GXinvert); X! X! XFillRectangle (side1->display, side1->map, side1->gc, X! 0, 0, vwid*SQ, vhgt*SQ); X! XFlush(side1->display); X } X if (active_display(side2)) { X white2 = WhitePixel (side2->display, 0); X*************** X*** 376,384 X XFlush(); X } X if (active_display(side2)) { X! XTileFill(side2->map, 0, 0, vwid*SQ, vhgt*SQ, X! WhitePixmap, 0, GXinvert, AllPlanes); X! XFlush(); X } X if (active_display(side1)) { X XTileFill(side1->map, 0, 0, vwid*SQ, vhgt*SQ, X X--- 442,455 ----- X XFlush(side1->display); X } X if (active_display(side2)) { X! white2 = WhitePixel (side2->display, 0); X! X! XSetForeground (side2->display, side2->gc, side2->fgcolor); X! XSetFunction (side2->display, side2->gc, GXinvert); X! X! XFillRectangle (side2->display, side2->map, side2->gc, X! 0, 0, vwid*SQ, vhgt*SQ); X! XFlush(side2->display); X } X if (active_display(side1)) { X XFillRectangle (side1->display, side1->map, side1->gc, X*************** X*** 381,389 X XFlush(); X } X if (active_display(side1)) { X! XTileFill(side1->map, 0, 0, vwid*SQ, vhgt*SQ, X! WhitePixmap, 0, GXinvert, AllPlanes); X! XFlush(); X } X if (active_display(side2)) { X XTileFill(side2->map, 0, 0, vwid*SQ, vhgt*SQ, X X--- 452,461 ----- X XFlush(side2->display); X } X if (active_display(side1)) { X! XFillRectangle (side1->display, side1->map, side1->gc, X! 0, 0, vwid*SQ, vhgt*SQ); X! XFlush(side1->display); X! XSetFunction (side1->display, side1->gc, GXcopy); X } X if (active_display(side2)) { X XFillRectangle (side2->display, side2->map, side2->gc, X*************** X*** 386,394 X XFlush(); X } X if (active_display(side2)) { X! XTileFill(side2->map, 0, 0, vwid*SQ, vhgt*SQ, X! WhitePixmap, 0, GXinvert, AllPlanes); X! XFlush(); X } X for (i = 0; i < 3; ++i) { X if (active_display(side1)) { X X--- 458,467 ----- X XSetFunction (side1->display, side1->gc, GXcopy); X } X if (active_display(side2)) { X! XFillRectangle (side2->display, side2->map, side2->gc, X! 0, 0, vwid*SQ, vhgt*SQ); X! XFlush(side2->display); X! XSetFunction (side2->display, side2->gc, GXcopy); X } X for (i = 0; i < 3; ++i) { X if (active_display(side1)) { X*************** X*** 392,400 X } X for (i = 0; i < 3; ++i) { X if (active_display(side1)) { X! XPixFill(side1->map, sx1-4*i, sy1-8*i, 8*i+SQ, 8*i+SQ, X! side1->bgcolor, side1->bombpics[i], GXcopy, AllPlanes); X! XFlush(); X } X if (active_display(side2)) { X XPixFill(side2->map, sx2-4*i, sy2-8*i, 8*i+SQ, 8*i+SQ, X X--- 465,476 ----- X } X for (i = 0; i < 3; ++i) { X if (active_display(side1)) { X! XSetClipOrigin (side1->display, side1->gc, sx1-4*i, sy1-8*i); X! XSetClipMask (side1->display, side1->gc, side1->bombpics[i]); X! XSetForeground (side1->display, side1->gc, side1->bgcolor); X! XFillRectangle (side1->display, side1->map, side1->gc, X! sx1-4*i, sy1-8*i, 8*i+SQ, 8*i+SQ); X! XFlush(side1->display); X } X if (active_display(side2)) { X XSetClipOrigin (side2->display, side2->gc, sx2-4*i, sy2-8*i); X*************** X*** 397,405 X XFlush(); X } X if (active_display(side2)) { X! XPixFill(side2->map, sx2-4*i, sy2-8*i, 8*i+SQ, 8*i+SQ, X! side2->bgcolor, side2->bombpics[i], GXcopy, AllPlanes); X! XFlush(); X } X sleep(1); X } X X--- 473,484 ----- X XFlush(side1->display); X } X if (active_display(side2)) { X! XSetClipOrigin (side2->display, side2->gc, sx2-4*i, sy2-8*i); X! XSetClipMask (side2->display, side2->gc, side2->bombpics[i]); X! XSetForeground (side2->display, side2->gc, side2->bgcolor); X! XFillRectangle (side2->display, side2->map, side2->gc, X! sx2-4*i, sy2-8*i, 8*i+SQ, 8*i+SQ); X! XFlush(side2->display); X } X sleep(1); X } X*************** X*** 404,409 X sleep(1); X } X sleep(1); X } X X /* Draw a picture of the unit in the help window so players can see what */ X X--- 483,500 ----- X sleep(1); X } X sleep(1); X+ X+ if (active_display(side1)) { X+ XSetClipOrigin (side1->display, side1->gc, 0, 0); X+ XSetClipMask (side1->display, side1->gc, None); X+ XSetForeground (side1->display, side1->gc, side1->fgcolor); X+ } X+ X+ if (active_display(side2)) { X+ XSetClipOrigin (side2->display, side2->gc, 0, 0); X+ XSetClipMask (side2->display, side2->gc, None); X+ XSetForeground (side2->display, side2->gc, side2->fgcolor); X+ } X } X X /* Draw a picture of the unit in the help window so players can see what */ X*************** X*** 416,423 X char str[2]; X X str[0] = unitchars[type]; X! XText(side->help, sx, sy, str, 1, X! side->iconfont, side->bgcolor, side->fgcolor); X } X X #endif XWINDOWS X X--- 507,517 ----- X char str[2]; X X str[0] = unitchars[type]; X! X! XSetFont (side->display, side->gc, side->iconfont); X! XSetForeground (side->display, side->gc, side->fgcolor); X! XSetBackground (side->display, side->gc, side->bgcolor); X! XDrawImageString (side->display, side->help, side->gc, sx, sy, str, 1); X } X X #endif XWINDOWS Xdiff -c ./input.c X11/input.c X*** ./input.c Thu Jul 16 14:55:11 1987 X--- X11/input.c Wed Oct 28 08:06:34 1987 X*************** X*** 1,4 X! /* Copyright (c) 1987 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 X--- 1,5 ----- X! /* Copyright (c) 1987 Stanley T. Shebs, University of Utah; */ X! /* Kurt W. Hoyt, Software Engineering Institute. */ X /* This program may be used, copied, modified, and redistributed freely */ X /* for noncommercial purposes, so long as this notice remains intact. */ X X*************** X*** 2,8 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: input.c,v 1.5 87/06/08 21:45:50 shebs Exp $ */ X X #include "xconq.h" X X X--- 3,9 ----- 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: input.c,v 1.9 87/10/27 11:25:15 kwh Exp $ */ X X #include "xconq.h" X X*************** X*** 185,191 X sprintf(curside->promptbuf, "Unit type '%c' not in '%s'", X ch, unitchars); X show_prompt(curside); X! flush_output(); X sleep(1); X } else { X break; X X--- 186,192 ----- X sprintf(curside->promptbuf, "Unit type '%c' not in '%s'", X ch, unitchars); X show_prompt(curside); X! flush_output(curside); X sleep(1); X } else { X break; X*************** X*** 193,199 X } X } X clear_prompt(curside); X! flush_output(); X return type; X } X X X--- 194,200 ----- X } X } X clear_prompt(curside); X! flush_output(curside); X return type; X } X X*************** X*** 283,289 X sprintf(curside->promptbuf, "Order type '%c' not in '%s'", X ch, orderchars); X show_prompt(curside); X! flush_output(); X sleep(1); X } else { X break; X X--- 284,290 ----- X sprintf(curside->promptbuf, "Order type '%c' not in '%s'", X ch, orderchars); X show_prompt(curside); X! flush_output(curside); X sleep(1); X } else { X break; X*************** X*** 291,297 X } X } X clear_prompt(curside); X! flush_output(); X return type; X } X X X--- 292,298 ----- X } X } X clear_prompt(curside); X! flush_output(curside); X return type; X } X X*************** X*** 320,326 X } X msgbuf[i] = '\0'; X clear_prompt(curside); X! flush_output(); X return msgbuf; X } X X X--- 321,327 ----- X } X msgbuf[i] = '\0'; X clear_prompt(curside); X! flush_output(curside); X return msgbuf; X } X END_OF_x11diffs.2 if test 39069 -ne `wc -c <x11diffs.2`; then echo shar: \"x11diffs.2\" unpacked with wrong size! fi # end of overwriting check fi echo shar: End of archive 2 \(of 3\). cp /dev/null ark2isdone MISSING="" for I in 1 2 3 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 3 archives. rm -f ark[1-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0