home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / x / volume19 / xinvadrs / part03 < prev    next >
Encoding:
Text File  |  1993-04-27  |  42.4 KB  |  1,504 lines

  1. Newsgroups: comp.sources.x
  2. From: jonathan@Think.COM (Jonny Goldman)
  3. Subject: v19i008:  xinvaders - space invaders for X, Part03/03
  4. Message-ID: <1993Mar8.220551.11950@sparky.imd.sterling.com>
  5. X-Md4-Signature: 4d52450ca3bf36bab7f5b0401be67afc
  6. Date: Mon, 8 Mar 1993 22:05:51 GMT
  7. Approved: chris@sparky.imd.sterling.com
  8.  
  9. Submitted-by: jonathan@Think.COM (Jonny Goldman)
  10. Posting-number: Volume 19, Issue 8
  11. Archive-name: xinvaders/part03
  12. Environment: X11
  13. Supersedes: xinvaders: Volume 8, Issue 62-66
  14.  
  15. #! /bin/sh
  16. # This is a shell archive.  Remove anything before this line, then feed it
  17. # into a shell via "sh file" or similar.  To overwrite existing files,
  18. # type "sh file -c".
  19. # Contents:  Imakefile base1.bit base2.bit explode1.bit explode2.bit
  20. #   score.c shot.c spacer1.bit spacer2.bit sperma1.bit sperma2.bit
  21. #   spermb1.bit spermb2.bit vader1a1.bit vader1a2.bit vader1b1.bit
  22. #   vader1b2.bit vader2a2.bit vader2b1.bit vader2b2.bit vader3a1.bit
  23. #   vader3a2.bit vader3b1.bit vader3b2.bit vaders.h vexplod1.bit
  24. #   vexplod2.bit xinvaders.ma
  25. # Wrapped by chris@sparky on Mon Mar  8 15:41:52 1993
  26. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
  27. echo If this archive is complete, you will see the following message:
  28. echo '          "shar: End of archive 3 (of 3)."'
  29. if test -f 'Imakefile' -a "${1}" != "-c" ; then 
  30.   echo shar: Will not clobber existing file \"'Imakefile'\"
  31. else
  32.   echo shar: Extracting \"'Imakefile'\" \(255 characters\)
  33.   sed "s/^X//" >'Imakefile' <<'END_OF_FILE'
  34. XLOCAL_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
  35. X
  36. XOBJS = spacers.o base.o widget.o main.o vaders.o shot.o score.o
  37. X
  38. XSRCS = spacers.c base.c widget.c main.c vaders.c shot.c score.c
  39. X
  40. XINCLUDES = -I$(TOP) -I$(TOP)/X11
  41. X
  42. XComplexProgramTarget(xinvaders)
  43. END_OF_FILE
  44.   if test 255 -ne `wc -c <'Imakefile'`; then
  45.     echo shar: \"'Imakefile'\" unpacked with wrong size!
  46.   fi
  47.   # end of 'Imakefile'
  48. fi
  49. if test -f 'base1.bit' -a "${1}" != "-c" ; then 
  50.   echo shar: Will not clobber existing file \"'base1.bit'\"
  51. else
  52.   echo shar: Extracting \"'base1.bit'\" \(527 characters\)
  53.   sed "s/^X//" >'base1.bit' <<'END_OF_FILE'
  54. X/* 
  55. XCopyright notice:
  56. X
  57. XThis is mine.  I'm only letting you use it.  Period.  Feel free to rip off
  58. Xany of the code you see fit, but have the courtesy to give me credit.
  59. XOtherwise great hairy beasties will rip your eyes out and eat your flesh
  60. Xwhen you least expect it.
  61. X
  62. XJonny Goldman <jonathan@think.com>
  63. X
  64. XWed May  8 1991
  65. X*/
  66. X
  67. X#define base1_width 15
  68. X#define base1_height 10
  69. Xstatic char base1_bits[] = {
  70. X   0x80, 0x00, 0xc0, 0x01, 0xc0, 0x01, 0xe0, 0x03, 0xfe, 0x3f, 0xff, 0x7f,
  71. X   0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f};
  72. END_OF_FILE
  73.   if test 527 -ne `wc -c <'base1.bit'`; then
  74.     echo shar: \"'base1.bit'\" unpacked with wrong size!
  75.   fi
  76.   # end of 'base1.bit'
  77. fi
  78. if test -f 'base2.bit' -a "${1}" != "-c" ; then 
  79.   echo shar: Will not clobber existing file \"'base2.bit'\"
  80. else
  81.   echo shar: Extracting \"'base2.bit'\" \(902 characters\)
  82.   sed "s/^X//" >'base2.bit' <<'END_OF_FILE'
  83. X/* 
  84. XCopyright notice:
  85. X
  86. XThis is mine.  I'm only letting you use it.  Period.  Feel free to rip off
  87. Xany of the code you see fit, but have the courtesy to give me credit.
  88. XOtherwise great hairy beasties will rip your eyes out and eat your flesh
  89. Xwhen you least expect it.
  90. X
  91. XJonny Goldman <jonathan@think.com>
  92. X
  93. XWed May  8 1991
  94. X*/
  95. X
  96. X#define base2_width 30
  97. X#define base2_height 20
  98. Xstatic char base2_bits[] = {
  99. X   0x00, 0xc0, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0xf0, 0x03, 0x00,
  100. X   0x00, 0xf0, 0x03, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xf0, 0x03, 0x00,
  101. X   0x00, 0xfc, 0x0f, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0xfc, 0xff, 0xff, 0x0f,
  102. X   0xfc, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f,
  103. X   0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f,
  104. X   0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f,
  105. X   0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f};
  106. END_OF_FILE
  107.   if test 902 -ne `wc -c <'base2.bit'`; then
  108.     echo shar: \"'base2.bit'\" unpacked with wrong size!
  109.   fi
  110.   # end of 'base2.bit'
  111. fi
  112. if test -f 'explode1.bit' -a "${1}" != "-c" ; then 
  113.   echo shar: Will not clobber existing file \"'explode1.bit'\"
  114. else
  115.   echo shar: Extracting \"'explode1.bit'\" \(536 characters\)
  116.   sed "s/^X//" >'explode1.bit' <<'END_OF_FILE'
  117. X/* 
  118. XCopyright notice:
  119. X
  120. XThis is mine.  I'm only letting you use it.  Period.  Feel free to rip off
  121. Xany of the code you see fit, but have the courtesy to give me credit.
  122. XOtherwise great hairy beasties will rip your eyes out and eat your flesh
  123. Xwhen you least expect it.
  124. X
  125. XJonny Goldman <jonathan@think.com>
  126. X
  127. XWed May  8 1991
  128. X*/
  129. X
  130. X#define explode1_width 15
  131. X#define explode1_height 10
  132. Xstatic char explode1_bits[] = {
  133. X   0x80, 0x00, 0xc0, 0x01, 0xc0, 0x01, 0x20, 0x02, 0x3e, 0x3e, 0x0d, 0x50,
  134. X   0x15, 0x48, 0x6d, 0x5b, 0x65, 0x4b, 0xff, 0x7f};
  135. END_OF_FILE
  136.   if test 536 -ne `wc -c <'explode1.bit'`; then
  137.     echo shar: \"'explode1.bit'\" unpacked with wrong size!
  138.   fi
  139.   # end of 'explode1.bit'
  140. fi
  141. if test -f 'explode2.bit' -a "${1}" != "-c" ; then 
  142.   echo shar: Will not clobber existing file \"'explode2.bit'\"
  143. else
  144.   echo shar: Extracting \"'explode2.bit'\" \(911 characters\)
  145.   sed "s/^X//" >'explode2.bit' <<'END_OF_FILE'
  146. X/* 
  147. XCopyright notice:
  148. X
  149. XThis is mine.  I'm only letting you use it.  Period.  Feel free to rip off
  150. Xany of the code you see fit, but have the courtesy to give me credit.
  151. XOtherwise great hairy beasties will rip your eyes out and eat your flesh
  152. Xwhen you least expect it.
  153. X
  154. XJonny Goldman <jonathan@think.com>
  155. X
  156. XWed May  8 1991
  157. X*/
  158. X
  159. X#define explode2_width 30
  160. X#define explode2_height 20
  161. Xstatic char explode2_bits[] = {
  162. X   0x00, 0xc0, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0xf0, 0x03, 0x00,
  163. X   0x00, 0xf0, 0x03, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xf0, 0x03, 0x00,
  164. X   0x00, 0xfc, 0x0f, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0xfc, 0xff, 0xff, 0x0f,
  165. X   0xfc, 0xff, 0xff, 0x0f, 0x07, 0x00, 0x00, 0x38, 0xf3, 0x00, 0x00, 0x33,
  166. X   0x33, 0x01, 0x80, 0x33, 0x33, 0x01, 0xc0, 0x30, 0x33, 0x39, 0xce, 0x30,
  167. X   0xf3, 0x6c, 0xdb, 0x31, 0x33, 0x6c, 0xdb, 0x30, 0x33, 0x38, 0xce, 0x30,
  168. X   0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f};
  169. END_OF_FILE
  170.   if test 911 -ne `wc -c <'explode2.bit'`; then
  171.     echo shar: \"'explode2.bit'\" unpacked with wrong size!
  172.   fi
  173.   # end of 'explode2.bit'
  174. fi
  175. if test -f 'score.c' -a "${1}" != "-c" ; then 
  176.   echo shar: Will not clobber existing file \"'score.c'\"
  177. else
  178.   echo shar: Extracting \"'score.c'\" \(1207 characters\)
  179.   sed "s/^X//" >'score.c' <<'END_OF_FILE'
  180. X/* 
  181. XCopyright notice:
  182. X
  183. XThis is mine.  I'm only letting you use it.  Period.  Feel free to rip off
  184. Xany of the code you see fit, but have the courtesy to give me credit.
  185. XOtherwise great hairy beasties will rip your eyes out and eat your flesh
  186. Xwhen you least expect it.
  187. X
  188. XJonny Goldman <jonathan@think.com>
  189. X
  190. XWed May  8 1991
  191. X*/
  192. X
  193. X/* score.c -- Print the score. */
  194. X
  195. X#include "vaders.h"
  196. X
  197. X#define SCORELABEL    10
  198. X#define SCOREPOS    (SCORELABEL+15)
  199. X#define HILABEL        (SCOREPOS+20)
  200. X#define HIPOS        (HILABEL+15)
  201. X
  202. XPaintScore()
  203. X{
  204. X  char scorestring[8];
  205. X  XDrawImageString(dpy, labelwindow, scoregc, 0, SCORELABEL, "Score", 5);
  206. X  sprintf(scorestring, "%6d ", score);
  207. X  XDrawImageString(dpy, labelwindow, scoregc, 0, SCOREPOS, scorestring, 7);
  208. X  if (nextbonus && score >= nextbonus) {
  209. X    basesleft++;
  210. X    ShowBase(basesleft-1, basegc);
  211. X    bases = basesleft;
  212. X    nextbonus = 0;
  213. X  }
  214. X  if (score > hiscore)
  215. X    hiscore = score;
  216. X    sprintf(scorestring, "%6d ", hiscore);
  217. X    XDrawImageString(dpy, labelwindow, scoregc, 0, HILABEL, " High", 5);
  218. X    XDrawImageString(dpy, labelwindow, scoregc, 0, HIPOS, scorestring, 7);
  219. X}
  220. X
  221. XInitScore()
  222. X{
  223. X    score = 0;
  224. X    if (hiscore == 0) hiscore = -1;
  225. X    basesleft = 3;
  226. X    nextbonus = 1500;
  227. X}
  228. END_OF_FILE
  229.   if test 1207 -ne `wc -c <'score.c'`; then
  230.     echo shar: \"'score.c'\" unpacked with wrong size!
  231.   fi
  232.   # end of 'score.c'
  233. fi
  234. if test -f 'shot.c' -a "${1}" != "-c" ; then 
  235.   echo shar: Will not clobber existing file \"'shot.c'\"
  236. else
  237.   echo shar: Extracting \"'shot.c'\" \(5223 characters\)
  238.   sed "s/^X//" >'shot.c' <<'END_OF_FILE'
  239. X/* 
  240. XCopyright notice:
  241. X
  242. XThis is mine.  I'm only letting you use it.  Period.  Feel free to rip off
  243. Xany of the code you see fit, but have the courtesy to give me credit.
  244. XOtherwise great hairy beasties will rip your eyes out and eat your flesh
  245. Xwhen you least expect it.
  246. X
  247. XJonny Goldman <jonathan@think.com>
  248. X
  249. XWed May  8 1991
  250. X*/
  251. X
  252. X/* shot.c - handle movement, etc. of the shots. */
  253. X
  254. X#include "vaders.h"
  255. X
  256. Xextern int paused;
  257. X
  258. X#define MAXSHOTS    1
  259. X#define MAXVSHOTS    6
  260. X#define SHOTSIZE    (8*scale)
  261. X
  262. Xtypedef struct _ShotRec {
  263. X    int x, y;        /* Location of this shot. */
  264. X} ShotRec, *Shot;
  265. X
  266. XShotRec shots[MAXSHOTS], vshots[MAXVSHOTS];
  267. X
  268. XXImage *vshot_image[2];
  269. X
  270. Xstatic int tick = 0;
  271. X
  272. Xint numshots;        /* Number of shots currently flying. */
  273. Xint numvshots;        /* Number of shots currently flying. */
  274. X
  275. Xstatic void PaintShot(shot, gc)
  276. XShot shot;
  277. XGC gc;
  278. X{
  279. X    AddLine(shot->x, shot->y,
  280. X        shot->x, shot->y + SHOTSIZE, gc);
  281. X}
  282. X
  283. Xstatic void PaintVshot(vshot, gc)
  284. XShot vshot;
  285. XGC gc;
  286. X{
  287. X  XPutImage(dpy, gamewindow, gc, vshot_image[tick],
  288. X        0, 0, vshot->x, vshot->y, vshot_image[tick]->width, vshot_image[tick]->height);
  289. X}
  290. X
  291. X
  292. Xvoid PaintAllShots()
  293. X{
  294. X    int i;
  295. X    for (i=0 ; i<numshots ; i++)
  296. X    PaintShot(shots + i, shotgc);
  297. X    for (i=0 ; i<numvshots ; i++)
  298. X    PaintVshot(vshots + i, vshotgc);
  299. X}
  300. X
  301. X
  302. Xstatic void DestroyShot(i)
  303. Xint i;
  304. X{
  305. X    PaintShot(shots + i, backgc);
  306. X    numshots--;
  307. X    shots[i] = shots[numshots];
  308. X}
  309. X
  310. X
  311. Xstatic void DestroyVshot(i)
  312. Xint i;
  313. X{
  314. X    PaintVshot(vshots + i, backgc);
  315. X    numvshots--;
  316. X    vshots[i] = vshots[numvshots];
  317. X}
  318. X
  319. X/*ARGSUSED*/
  320. Xvoid MoveShots(closure, id)
  321. XOpaque closure;
  322. XXtIntervalId id;
  323. X{
  324. X  int i, x, y, newy;
  325. X  Shot shot;
  326. X  if (closure != (Opaque) MoveShots) return;
  327. X  if (!paused) {
  328. X    if (numshots > 0)
  329. X      shottimerid = XtAddTimeOut(shotwait, MoveShots, (Opaque) MoveShots);
  330. X    else
  331. X      shottimerid = NULL;
  332. X    for (i=0 ; i<numshots ; i++) {
  333. X      shot = shots + i;
  334. X      newy = shot->y - SHOTSIZE/2;
  335. X      x = shot->x;
  336. X      y = shot->y;
  337. X      if (ShotHitsVader(x, y)
  338. X      || ShotHitsSpacer(x, y)
  339. X      || ShotHitsBuilding(x, y)
  340. X      || y < 0) {
  341. X    DestroyShot(i);
  342. X    i--;            /* Ensures we don't skip moving a shot. */
  343. X      } else {
  344. X    PaintShot(shot, backgc);
  345. X    shot->y = newy;
  346. X    PaintShot(shot, shotgc);
  347. X      }
  348. X    }
  349. X  }
  350. X}
  351. X
  352. XBoolean VshotHitsShot(x, y)
  353. Xint x, y;
  354. X{
  355. X  int i, dx, dy;
  356. X  Shot shot;
  357. X
  358. X  for (i=0; i<numshots; i++) {
  359. X    shot = shots + i;
  360. X    dx = shot->x;
  361. X    dy = shot->y;
  362. X    if(dx >= x && dx < x+vshot_image[tick]->width
  363. X       && dy >= y && dy < y+vshot_image[tick]->height) {
  364. X      DestroyShot(i);
  365. X      return TRUE;
  366. X    }
  367. X  }
  368. X  return FALSE;
  369. X}
  370. X       
  371. X/*ARGSUSED*/
  372. Xvoid MoveVshots(closure, id)
  373. XOpaque closure;
  374. XXtIntervalId id;
  375. X{
  376. X  int i, x, y, newy;
  377. X  Shot vshot;
  378. X
  379. X  if (closure != (Opaque) MoveVshots) return;
  380. X  if (!paused) {
  381. X    if (numvshots > 0)
  382. X      vshottimerid = XtAddTimeOut(vshotwait, MoveVshots, (Opaque) MoveVshots);
  383. X    else
  384. X      vshottimerid = NULL;
  385. X    for (i=0 ; i<numvshots ; i++) {
  386. X      vshot = vshots + i;
  387. X      newy = vshot->y + 2*scale;
  388. X      x = vshot->x;
  389. X      y = vshot->y;
  390. X      if (y>gameheight ||
  391. X      VshotHitsShot(x, y) ||
  392. X      ShotHitsBase(x,y) ||
  393. X      ShotHitsBuilding(x,y)) {
  394. X    DestroyVshot(i);
  395. X    i--;            /* Ensures we don't skip moving a shot. */
  396. X      } else {
  397. X    PaintVshot(vshot, backgc);
  398. X    tick = tick ? 0 : 1;
  399. X    vshot->y = newy;
  400. X    PaintVshot(vshot, vshotgc);
  401. X    tick = tick ? 0 : 1;
  402. X      }
  403. X    }
  404. X    tick = tick ? 0 : 1;
  405. X  }
  406. X}
  407. X
  408. X
  409. Xvoid AddShot(x, y)
  410. Xint x, y;
  411. X{
  412. X    Shot shot;
  413. X    if (numshots >= maxshots) return;
  414. X    shot = shots + numshots;
  415. X    numshots++;
  416. X    shot->x = x;
  417. X    shot->y = y-SHOTSIZE;
  418. X    PaintShot(shot, shotgc);
  419. X    if (shottimerid == NULL)
  420. X        shottimerid = XtAddTimeOut(shotwait, MoveShots, (Opaque) MoveShots);
  421. X}
  422. X
  423. Xvoid AddVshot(x, y)
  424. Xint x, y;
  425. X{
  426. X    Shot shot;
  427. X    if (numvshots >= maxvshots) return;
  428. X    shot = vshots + numvshots;
  429. X    numvshots++;
  430. X    shot->x = x;
  431. X    shot->y = y;
  432. X    PaintVshot(shot, vshotgc);
  433. X    if (vshottimerid == NULL)
  434. X      vshottimerid = XtAddTimeOut(shotwait, MoveVshots, (Opaque) MoveVshots);
  435. X}
  436. X
  437. X#include "sperma1.bit"
  438. X#include "sperma2.bit"
  439. X#include "spermb1.bit"
  440. X#include "spermb2.bit"
  441. X
  442. Xint ReadVshotImages()
  443. X{
  444. X  vshot_image[0] = XCreateImage(dpy,
  445. X                DefaultVisual(dpy, DefaultScreen(dpy)),
  446. X                1,
  447. X                XYBitmap,
  448. X                0,
  449. X                (scale == 1) ? sperma1_bits : sperma2_bits,
  450. X                (scale == 1) ? sperma1_width : sperma2_width,
  451. X                (scale == 1) ? sperma1_height : sperma2_height,
  452. X                8, 0);
  453. X  vshot_image[0]->bitmap_bit_order = LSBFirst;
  454. X  vshot_image[0]->byte_order = LSBFirst;
  455. X
  456. X  vshot_image[1] = XCreateImage(dpy,
  457. X                DefaultVisual(dpy, DefaultScreen(dpy)),
  458. X                1,
  459. X                XYBitmap,
  460. X                0,
  461. X                (scale == 1) ? spermb1_bits : spermb2_bits,
  462. X                (scale == 1) ? spermb1_width : spermb2_width,
  463. X                (scale == 1) ? spermb1_height : spermb2_height,
  464. X                8, 0);
  465. X  vshot_image[1]->bitmap_bit_order = LSBFirst;
  466. X  vshot_image[1]->byte_order = LSBFirst;
  467. X
  468. X  return BitmapSuccess;
  469. X}
  470. X
  471. XInitShot()
  472. X{
  473. X    shottimerid = NULL;
  474. X    numshots = 0;
  475. X    vshottimerid = NULL;
  476. X    numvshots = 0;
  477. X    if( ReadVshotImages() != BitmapSuccess) {
  478. X      fprintf(stderr, "Error reading vshot images.\n");
  479. X      exit(20);
  480. X    }
  481. X}
  482. X
  483. Xvoid AddLine(fromx, fromy, tox, toy, gc)
  484. Xint fromx, fromy, tox, toy;
  485. XGC gc;
  486. X{
  487. X    XDrawLine(dpy, gamewindow, gc, fromx, fromy, tox, toy);
  488. X}
  489. END_OF_FILE
  490.   if test 5223 -ne `wc -c <'shot.c'`; then
  491.     echo shar: \"'shot.c'\" unpacked with wrong size!
  492.   fi
  493.   # end of 'shot.c'
  494. fi
  495. if test -f 'spacer1.bit' -a "${1}" != "-c" ; then 
  496.   echo shar: Will not clobber existing file \"'spacer1.bit'\"
  497. else
  498.   echo shar: Extracting \"'spacer1.bit'\" \(508 characters\)
  499.   sed "s/^X//" >'spacer1.bit' <<'END_OF_FILE'
  500. X/* 
  501. XCopyright notice:
  502. X
  503. XThis is mine.  I'm only letting you use it.  Period.  Feel free to rip off
  504. Xany of the code you see fit, but have the courtesy to give me credit.
  505. XOtherwise great hairy beasties will rip your eyes out and eat your flesh
  506. Xwhen you least expect it.
  507. X
  508. XJonny Goldman <jonathan@think.com>
  509. X
  510. XWed May  8 1991
  511. X*/
  512. X
  513. X#define spacer1_width 16
  514. X#define spacer1_height 8
  515. Xstatic char spacer1_bits[] = {
  516. X   0xc0, 0x03, 0xf0, 0x0f, 0xf8, 0x1f, 0xfc, 0x3f, 0xb6, 0x6d, 0xff, 0xff,
  517. X   0x1c, 0x38, 0x08, 0x10};
  518. END_OF_FILE
  519.   if test 508 -ne `wc -c <'spacer1.bit'`; then
  520.     echo shar: \"'spacer1.bit'\" unpacked with wrong size!
  521.   fi
  522.   # end of 'spacer1.bit'
  523. fi
  524. if test -f 'spacer2.bit' -a "${1}" != "-c" ; then 
  525.   echo shar: Will not clobber existing file \"'spacer2.bit'\"
  526. else
  527.   echo shar: Extracting \"'spacer2.bit'\" \(809 characters\)
  528.   sed "s/^X//" >'spacer2.bit' <<'END_OF_FILE'
  529. X/* 
  530. XCopyright notice:
  531. X
  532. XThis is mine.  I'm only letting you use it.  Period.  Feel free to rip off
  533. Xany of the code you see fit, but have the courtesy to give me credit.
  534. XOtherwise great hairy beasties will rip your eyes out and eat your flesh
  535. Xwhen you least expect it.
  536. X
  537. XJonny Goldman <jonathan@think.com>
  538. X
  539. XWed May  8 1991
  540. X*/
  541. X
  542. X#define spacer2_width 32
  543. X#define spacer2_height 16
  544. Xstatic char spacer2_bits[] = {
  545. X   0x00, 0xf0, 0x0f, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x00,
  546. X   0x00, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x03, 0xc0, 0xff, 0xff, 0x03,
  547. X   0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f, 0x38, 0xcf, 0xf3, 0x1c,
  548. X   0x38, 0xcf, 0xf3, 0x1c, 0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f,
  549. X   0xf0, 0x03, 0xc0, 0x0f, 0xf0, 0x03, 0xc0, 0x0f, 0xc0, 0x00, 0x00, 0x03,
  550. X   0xc0, 0x00, 0x00, 0x03};
  551. END_OF_FILE
  552.   if test 809 -ne `wc -c <'spacer2.bit'`; then
  553.     echo shar: \"'spacer2.bit'\" unpacked with wrong size!
  554.   fi
  555.   # end of 'spacer2.bit'
  556. fi
  557. if test -f 'sperma1.bit' -a "${1}" != "-c" ; then 
  558.   echo shar: Will not clobber existing file \"'sperma1.bit'\"
  559. else
  560.   echo shar: Extracting \"'sperma1.bit'\" \(450 characters\)
  561.   sed "s/^X//" >'sperma1.bit' <<'END_OF_FILE'
  562. X/* 
  563. XCopyright notice:
  564. X
  565. XThis is mine.  I'm only letting you use it.  Period.  Feel free to rip off
  566. Xany of the code you see fit, but have the courtesy to give me credit.
  567. XOtherwise great hairy beasties will rip your eyes out and eat your flesh
  568. Xwhen you least expect it.
  569. X
  570. XJonny Goldman <jonathan@think.com>
  571. X
  572. XWed May  8 1991
  573. X*/
  574. X
  575. X#define sperma1_width 3
  576. X#define sperma1_height 7
  577. Xstatic char sperma1_bits[] = {
  578. X   0x02, 0x01, 0x02, 0x04, 0x02, 0x01, 0x02};
  579. END_OF_FILE
  580.   if test 450 -ne `wc -c <'sperma1.bit'`; then
  581.     echo shar: \"'sperma1.bit'\" unpacked with wrong size!
  582.   fi
  583.   # end of 'sperma1.bit'
  584. fi
  585. if test -f 'sperma2.bit' -a "${1}" != "-c" ; then 
  586.   echo shar: Will not clobber existing file \"'sperma2.bit'\"
  587. else
  588.   echo shar: Extracting \"'sperma2.bit'\" \(496 characters\)
  589.   sed "s/^X//" >'sperma2.bit' <<'END_OF_FILE'
  590. X/* 
  591. XCopyright notice:
  592. X
  593. XThis is mine.  I'm only letting you use it.  Period.  Feel free to rip off
  594. Xany of the code you see fit, but have the courtesy to give me credit.
  595. XOtherwise great hairy beasties will rip your eyes out and eat your flesh
  596. Xwhen you least expect it.
  597. X
  598. XJonny Goldman <jonathan@think.com>
  599. X
  600. XWed May  8 1991
  601. X*/
  602. X
  603. X#define sperma2_width 6
  604. X#define sperma2_height 14
  605. Xstatic char sperma2_bits[] = {
  606. X   0x0c, 0x0c, 0x03, 0x03, 0x0c, 0x0c, 0x30, 0x30, 0x0c, 0x0c, 0x03, 0x03,
  607. X   0x0c, 0x0c};
  608. END_OF_FILE
  609.   if test 496 -ne `wc -c <'sperma2.bit'`; then
  610.     echo shar: \"'sperma2.bit'\" unpacked with wrong size!
  611.   fi
  612.   # end of 'sperma2.bit'
  613. fi
  614. if test -f 'spermb1.bit' -a "${1}" != "-c" ; then 
  615.   echo shar: Will not clobber existing file \"'spermb1.bit'\"
  616. else
  617.   echo shar: Extracting \"'spermb1.bit'\" \(450 characters\)
  618.   sed "s/^X//" >'spermb1.bit' <<'END_OF_FILE'
  619. X/* 
  620. XCopyright notice:
  621. X
  622. XThis is mine.  I'm only letting you use it.  Period.  Feel free to rip off
  623. Xany of the code you see fit, but have the courtesy to give me credit.
  624. XOtherwise great hairy beasties will rip your eyes out and eat your flesh
  625. Xwhen you least expect it.
  626. X
  627. XJonny Goldman <jonathan@think.com>
  628. X
  629. XWed May  8 1991
  630. X*/
  631. X
  632. X#define spermb1_width 3
  633. X#define spermb1_height 7
  634. Xstatic char spermb1_bits[] = {
  635. X   0x02, 0x04, 0x02, 0x01, 0x02, 0x04, 0x02};
  636. END_OF_FILE
  637.   if test 450 -ne `wc -c <'spermb1.bit'`; then
  638.     echo shar: \"'spermb1.bit'\" unpacked with wrong size!
  639.   fi
  640.   # end of 'spermb1.bit'
  641. fi
  642. if test -f 'spermb2.bit' -a "${1}" != "-c" ; then 
  643.   echo shar: Will not clobber existing file \"'spermb2.bit'\"
  644. else
  645.   echo shar: Extracting \"'spermb2.bit'\" \(496 characters\)
  646.   sed "s/^X//" >'spermb2.bit' <<'END_OF_FILE'
  647. X/* 
  648. XCopyright notice:
  649. X
  650. XThis is mine.  I'm only letting you use it.  Period.  Feel free to rip off
  651. Xany of the code you see fit, but have the courtesy to give me credit.
  652. XOtherwise great hairy beasties will rip your eyes out and eat your flesh
  653. Xwhen you least expect it.
  654. X
  655. XJonny Goldman <jonathan@think.com>
  656. X
  657. XWed May  8 1991
  658. X*/
  659. X
  660. X#define spermb2_width 6
  661. X#define spermb2_height 14
  662. Xstatic char spermb2_bits[] = {
  663. X   0x0c, 0x0c, 0x30, 0x30, 0x0c, 0x0c, 0x03, 0x03, 0x0c, 0x0c, 0x30, 0x30,
  664. X   0x0c, 0x0c};
  665. END_OF_FILE
  666.   if test 496 -ne `wc -c <'spermb2.bit'`; then
  667.     echo shar: \"'spermb2.bit'\" unpacked with wrong size!
  668.   fi
  669.   # end of 'spermb2.bit'
  670. fi
  671. if test -f 'vader1a1.bit' -a "${1}" != "-c" ; then 
  672.   echo shar: Will not clobber existing file \"'vader1a1.bit'\"
  673. else
  674.   echo shar: Extracting \"'vader1a1.bit'\" \(511 characters\)
  675.   sed "s/^X//" >'vader1a1.bit' <<'END_OF_FILE'
  676. X/* 
  677. XCopyright notice:
  678. X
  679. XThis is mine.  I'm only letting you use it.  Period.  Feel free to rip off
  680. Xany of the code you see fit, but have the courtesy to give me credit.
  681. XOtherwise great hairy beasties will rip your eyes out and eat your flesh
  682. Xwhen you least expect it.
  683. X
  684. XJonny Goldman <jonathan@think.com>
  685. X
  686. XWed May  8 1991
  687. X*/
  688. X
  689. X#define vader1a1_width 10
  690. X#define vader1a1_height 8
  691. Xstatic char vader1a1_bits[] = {
  692. X   0x30, 0x00, 0x78, 0x00, 0xfc, 0x00, 0xb6, 0x01, 0xfe, 0x01, 0xb4, 0x00,
  693. X   0x02, 0x01, 0x84, 0x00};
  694. END_OF_FILE
  695.   if test 511 -ne `wc -c <'vader1a1.bit'`; then
  696.     echo shar: \"'vader1a1.bit'\" unpacked with wrong size!
  697.   fi
  698.   # end of 'vader1a1.bit'
  699. fi
  700. if test -f 'vader1a2.bit' -a "${1}" != "-c" ; then 
  701.   echo shar: Will not clobber existing file \"'vader1a2.bit'\"
  702. else
  703.   echo shar: Extracting \"'vader1a2.bit'\" \(710 characters\)
  704.   sed "s/^X//" >'vader1a2.bit' <<'END_OF_FILE'
  705. X/* 
  706. XCopyright notice:
  707. X
  708. XThis is mine.  I'm only letting you use it.  Period.  Feel free to rip off
  709. Xany of the code you see fit, but have the courtesy to give me credit.
  710. XOtherwise great hairy beasties will rip your eyes out and eat your flesh
  711. Xwhen you least expect it.
  712. X
  713. XJonny Goldman <jonathan@think.com>
  714. X
  715. XWed May  8 1991
  716. X*/
  717. X
  718. X#define vader1a2_width 20
  719. X#define vader1a2_height 16
  720. Xstatic char vader1a2_bits[] = {
  721. X   0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0xc0, 0x3f, 0x00, 0xc0, 0x3f, 0x00,
  722. X   0xf0, 0xff, 0x00, 0xf0, 0xff, 0x00, 0x3c, 0xcf, 0x03, 0x3c, 0xcf, 0x03,
  723. X   0xfc, 0xff, 0x03, 0xfc, 0xff, 0x03, 0x30, 0xcf, 0x00, 0x30, 0xcf, 0x00,
  724. X   0x0c, 0x00, 0x03, 0x0c, 0x00, 0x03, 0x30, 0xc0, 0x00, 0x30, 0xc0, 0x00};
  725. END_OF_FILE
  726.   if test 710 -ne `wc -c <'vader1a2.bit'`; then
  727.     echo shar: \"'vader1a2.bit'\" unpacked with wrong size!
  728.   fi
  729.   # end of 'vader1a2.bit'
  730. fi
  731. if test -f 'vader1b1.bit' -a "${1}" != "-c" ; then 
  732.   echo shar: Will not clobber existing file \"'vader1b1.bit'\"
  733. else
  734.   echo shar: Extracting \"'vader1b1.bit'\" \(511 characters\)
  735.   sed "s/^X//" >'vader1b1.bit' <<'END_OF_FILE'
  736. X/* 
  737. XCopyright notice:
  738. X
  739. XThis is mine.  I'm only letting you use it.  Period.  Feel free to rip off
  740. Xany of the code you see fit, but have the courtesy to give me credit.
  741. XOtherwise great hairy beasties will rip your eyes out and eat your flesh
  742. Xwhen you least expect it.
  743. X
  744. XJonny Goldman <jonathan@think.com>
  745. X
  746. XWed May  8 1991
  747. X*/
  748. X
  749. X#define vader1b1_width 10
  750. X#define vader1b1_height 8
  751. Xstatic char vader1b1_bits[] = {
  752. X   0x30, 0x00, 0x78, 0x00, 0xfc, 0x00, 0xb6, 0x01, 0xfe, 0x01, 0xb4, 0x00,
  753. X   0x48, 0x00, 0x84, 0x00};
  754. END_OF_FILE
  755.   if test 511 -ne `wc -c <'vader1b1.bit'`; then
  756.     echo shar: \"'vader1b1.bit'\" unpacked with wrong size!
  757.   fi
  758.   # end of 'vader1b1.bit'
  759. fi
  760. if test -f 'vader1b2.bit' -a "${1}" != "-c" ; then 
  761.   echo shar: Will not clobber existing file \"'vader1b2.bit'\"
  762. else
  763.   echo shar: Extracting \"'vader1b2.bit'\" \(710 characters\)
  764.   sed "s/^X//" >'vader1b2.bit' <<'END_OF_FILE'
  765. X/* 
  766. XCopyright notice:
  767. X
  768. XThis is mine.  I'm only letting you use it.  Period.  Feel free to rip off
  769. Xany of the code you see fit, but have the courtesy to give me credit.
  770. XOtherwise great hairy beasties will rip your eyes out and eat your flesh
  771. Xwhen you least expect it.
  772. X
  773. XJonny Goldman <jonathan@think.com>
  774. X
  775. XWed May  8 1991
  776. X*/
  777. X
  778. X#define vader1b2_width 20
  779. X#define vader1b2_height 16
  780. Xstatic char vader1b2_bits[] = {
  781. X   0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0xc0, 0x3f, 0x00, 0xc0, 0x3f, 0x00,
  782. X   0xf0, 0xff, 0x00, 0xf0, 0xff, 0x00, 0x3c, 0xcf, 0x03, 0x3c, 0xcf, 0x03,
  783. X   0xfc, 0xff, 0x03, 0xfc, 0xff, 0x03, 0x30, 0xcf, 0x00, 0x30, 0xcf, 0x00,
  784. X   0xc0, 0x30, 0x00, 0xc0, 0x30, 0x00, 0x30, 0xc0, 0x00, 0x30, 0xc0, 0x00};
  785. END_OF_FILE
  786.   if test 710 -ne `wc -c <'vader1b2.bit'`; then
  787.     echo shar: \"'vader1b2.bit'\" unpacked with wrong size!
  788.   fi
  789.   # end of 'vader1b2.bit'
  790. fi
  791. if test -f 'vader2a2.bit' -a "${1}" != "-c" ; then 
  792.   echo shar: Will not clobber existing file \"'vader2a2.bit'\"
  793. else
  794.   echo shar: Extracting \"'vader2a2.bit'\" \(710 characters\)
  795.   sed "s/^X//" >'vader2a2.bit' <<'END_OF_FILE'
  796. X/* 
  797. XCopyright notice:
  798. X
  799. XThis is mine.  I'm only letting you use it.  Period.  Feel free to rip off
  800. Xany of the code you see fit, but have the courtesy to give me credit.
  801. XOtherwise great hairy beasties will rip your eyes out and eat your flesh
  802. Xwhen you least expect it.
  803. X
  804. XJonny Goldman <jonathan@think.com>
  805. X
  806. XWed May  8 1991
  807. X*/
  808. X
  809. X#define vader2a2_width 24
  810. X#define vader2a2_height 16
  811. Xstatic char vader2a2_bits[] = {
  812. X   0xc0, 0x00, 0x03, 0xc0, 0x00, 0x03, 0x00, 0xc3, 0x00, 0x00, 0xc3, 0x00,
  813. X   0xc0, 0xff, 0x03, 0xc0, 0xff, 0x03, 0xf0, 0x3c, 0x0f, 0xf0, 0x3c, 0x0f,
  814. X   0xfc, 0xff, 0x3f, 0xfc, 0xff, 0x3f, 0xcc, 0xff, 0x33, 0xcc, 0xff, 0x33,
  815. X   0xcc, 0x00, 0x33, 0xcc, 0x00, 0x33, 0x00, 0xc3, 0x00, 0x00, 0xc3, 0x00};
  816. END_OF_FILE
  817.   if test 710 -ne `wc -c <'vader2a2.bit'`; then
  818.     echo shar: \"'vader2a2.bit'\" unpacked with wrong size!
  819.   fi
  820.   # end of 'vader2a2.bit'
  821. fi
  822. if test -f 'vader2b1.bit' -a "${1}" != "-c" ; then 
  823.   echo shar: Will not clobber existing file \"'vader2b1.bit'\"
  824. else
  825.   echo shar: Extracting \"'vader2b1.bit'\" \(511 characters\)
  826.   sed "s/^X//" >'vader2b1.bit' <<'END_OF_FILE'
  827. X/* 
  828. XCopyright notice:
  829. X
  830. XThis is mine.  I'm only letting you use it.  Period.  Feel free to rip off
  831. Xany of the code you see fit, but have the courtesy to give me credit.
  832. XOtherwise great hairy beasties will rip your eyes out and eat your flesh
  833. Xwhen you least expect it.
  834. X
  835. XJonny Goldman <jonathan@think.com>
  836. X
  837. XWed May  8 1991
  838. X*/
  839. X
  840. X#define vader2b1_width 12
  841. X#define vader2b1_height 8
  842. Xstatic char vader2b1_bits[] = {
  843. X   0x08, 0x01, 0x92, 0x04, 0xfa, 0x05, 0x6e, 0x07, 0xfc, 0x03, 0xf8, 0x01,
  844. X   0x08, 0x01, 0x04, 0x02};
  845. END_OF_FILE
  846.   if test 511 -ne `wc -c <'vader2b1.bit'`; then
  847.     echo shar: \"'vader2b1.bit'\" unpacked with wrong size!
  848.   fi
  849.   # end of 'vader2b1.bit'
  850. fi
  851. if test -f 'vader2b2.bit' -a "${1}" != "-c" ; then 
  852.   echo shar: Will not clobber existing file \"'vader2b2.bit'\"
  853. else
  854.   echo shar: Extracting \"'vader2b2.bit'\" \(710 characters\)
  855.   sed "s/^X//" >'vader2b2.bit' <<'END_OF_FILE'
  856. X/* 
  857. XCopyright notice:
  858. X
  859. XThis is mine.  I'm only letting you use it.  Period.  Feel free to rip off
  860. Xany of the code you see fit, but have the courtesy to give me credit.
  861. XOtherwise great hairy beasties will rip your eyes out and eat your flesh
  862. Xwhen you least expect it.
  863. X
  864. XJonny Goldman <jonathan@think.com>
  865. X
  866. XWed May  8 1991
  867. X*/
  868. X
  869. X#define vader2b2_width 24
  870. X#define vader2b2_height 16
  871. Xstatic char vader2b2_bits[] = {
  872. X   0xc0, 0x00, 0x03, 0xc0, 0x00, 0x03, 0x0c, 0xc3, 0x30, 0x0c, 0xc3, 0x30,
  873. X   0xcc, 0xff, 0x33, 0xcc, 0xff, 0x33, 0xfc, 0x3c, 0x3f, 0xfc, 0x3c, 0x3f,
  874. X   0xf0, 0xff, 0x0f, 0xf0, 0xff, 0x0f, 0xc0, 0xff, 0x03, 0xc0, 0xff, 0x03,
  875. X   0xc0, 0x00, 0x03, 0xc0, 0x00, 0x03, 0x30, 0x00, 0x0c, 0x30, 0x00, 0x0c};
  876. END_OF_FILE
  877.   if test 710 -ne `wc -c <'vader2b2.bit'`; then
  878.     echo shar: \"'vader2b2.bit'\" unpacked with wrong size!
  879.   fi
  880.   # end of 'vader2b2.bit'
  881. fi
  882. if test -f 'vader3a1.bit' -a "${1}" != "-c" ; then 
  883.   echo shar: Will not clobber existing file \"'vader3a1.bit'\"
  884. else
  885.   echo shar: Extracting \"'vader3a1.bit'\" \(511 characters\)
  886.   sed "s/^X//" >'vader3a1.bit' <<'END_OF_FILE'
  887. X/* 
  888. XCopyright notice:
  889. X
  890. XThis is mine.  I'm only letting you use it.  Period.  Feel free to rip off
  891. Xany of the code you see fit, but have the courtesy to give me credit.
  892. XOtherwise great hairy beasties will rip your eyes out and eat your flesh
  893. Xwhen you least expect it.
  894. X
  895. XJonny Goldman <jonathan@think.com>
  896. X
  897. XWed May  8 1991
  898. X*/
  899. X
  900. X#define vader3a1_width 14
  901. X#define vader3a1_height 8
  902. Xstatic char vader3a1_bits[] = {
  903. X   0xe0, 0x01, 0xfc, 0x0f, 0xfe, 0x1f, 0xce, 0x1c, 0xfe, 0x1f, 0x38, 0x07,
  904. X   0xcc, 0x0c, 0x18, 0x06};
  905. END_OF_FILE
  906.   if test 511 -ne `wc -c <'vader3a1.bit'`; then
  907.     echo shar: \"'vader3a1.bit'\" unpacked with wrong size!
  908.   fi
  909.   # end of 'vader3a1.bit'
  910. fi
  911. if test -f 'vader3a2.bit' -a "${1}" != "-c" ; then 
  912.   echo shar: Will not clobber existing file \"'vader3a2.bit'\"
  913. else
  914.   echo shar: Extracting \"'vader3a2.bit'\" \(812 characters\)
  915.   sed "s/^X//" >'vader3a2.bit' <<'END_OF_FILE'
  916. X/* 
  917. XCopyright notice:
  918. X
  919. XThis is mine.  I'm only letting you use it.  Period.  Feel free to rip off
  920. Xany of the code you see fit, but have the courtesy to give me credit.
  921. XOtherwise great hairy beasties will rip your eyes out and eat your flesh
  922. Xwhen you least expect it.
  923. X
  924. XJonny Goldman <jonathan@think.com>
  925. X
  926. XWed May  8 1991
  927. X*/
  928. X
  929. X#define vader3a2_width 28
  930. X#define vader3a2_height 16
  931. Xstatic char vader3a2_bits[] = {
  932. X   0x00, 0xfc, 0x03, 0x00, 0x00, 0xfc, 0x03, 0x00, 0xf0, 0xff, 0xff, 0x00,
  933. X   0xf0, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0x03, 0xfc, 0xff, 0xff, 0x03,
  934. X   0xfc, 0xf0, 0xf0, 0x03, 0xfc, 0xf0, 0xf0, 0x03, 0xfc, 0xff, 0xff, 0x03,
  935. X   0xfc, 0xff, 0xff, 0x03, 0xc0, 0x0f, 0x3f, 0x00, 0xc0, 0x0f, 0x3f, 0x00,
  936. X   0xf0, 0xf0, 0xf0, 0x00, 0xf0, 0xf0, 0xf0, 0x00, 0xc0, 0x03, 0x3c, 0x00,
  937. X   0xc0, 0x03, 0x3c, 0x00};
  938. END_OF_FILE
  939.   if test 812 -ne `wc -c <'vader3a2.bit'`; then
  940.     echo shar: \"'vader3a2.bit'\" unpacked with wrong size!
  941.   fi
  942.   # end of 'vader3a2.bit'
  943. fi
  944. if test -f 'vader3b1.bit' -a "${1}" != "-c" ; then 
  945.   echo shar: Will not clobber existing file \"'vader3b1.bit'\"
  946. else
  947.   echo shar: Extracting \"'vader3b1.bit'\" \(511 characters\)
  948.   sed "s/^X//" >'vader3b1.bit' <<'END_OF_FILE'
  949. X/* 
  950. XCopyright notice:
  951. X
  952. XThis is mine.  I'm only letting you use it.  Period.  Feel free to rip off
  953. Xany of the code you see fit, but have the courtesy to give me credit.
  954. XOtherwise great hairy beasties will rip your eyes out and eat your flesh
  955. Xwhen you least expect it.
  956. X
  957. XJonny Goldman <jonathan@think.com>
  958. X
  959. XWed May  8 1991
  960. X*/
  961. X
  962. X#define vader3b1_width 14
  963. X#define vader3b1_height 8
  964. Xstatic char vader3b1_bits[] = {
  965. X   0xe0, 0x01, 0xfc, 0x0f, 0xfe, 0x1f, 0xce, 0x1c, 0xfe, 0x1f, 0x38, 0x07,
  966. X   0xcc, 0x0c, 0x06, 0x18};
  967. END_OF_FILE
  968.   if test 511 -ne `wc -c <'vader3b1.bit'`; then
  969.     echo shar: \"'vader3b1.bit'\" unpacked with wrong size!
  970.   fi
  971.   # end of 'vader3b1.bit'
  972. fi
  973. if test -f 'vader3b2.bit' -a "${1}" != "-c" ; then 
  974.   echo shar: Will not clobber existing file \"'vader3b2.bit'\"
  975. else
  976.   echo shar: Extracting \"'vader3b2.bit'\" \(812 characters\)
  977.   sed "s/^X//" >'vader3b2.bit' <<'END_OF_FILE'
  978. X/* 
  979. XCopyright notice:
  980. X
  981. XThis is mine.  I'm only letting you use it.  Period.  Feel free to rip off
  982. Xany of the code you see fit, but have the courtesy to give me credit.
  983. XOtherwise great hairy beasties will rip your eyes out and eat your flesh
  984. Xwhen you least expect it.
  985. X
  986. XJonny Goldman <jonathan@think.com>
  987. X
  988. XWed May  8 1991
  989. X*/
  990. X
  991. X#define vader3b2_width 28
  992. X#define vader3b2_height 16
  993. Xstatic char vader3b2_bits[] = {
  994. X   0x00, 0xfc, 0x03, 0x00, 0x00, 0xfc, 0x03, 0x00, 0xf0, 0xff, 0xff, 0x00,
  995. X   0xf0, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0x03, 0xfc, 0xff, 0xff, 0x03,
  996. X   0xfc, 0xf0, 0xf0, 0x03, 0xfc, 0xf0, 0xf0, 0x03, 0xfc, 0xff, 0xff, 0x03,
  997. X   0xfc, 0xff, 0xff, 0x03, 0xc0, 0x0f, 0x3f, 0x00, 0xc0, 0x0f, 0x3f, 0x00,
  998. X   0xf0, 0xf0, 0xf0, 0x00, 0xf0, 0xf0, 0xf0, 0x00, 0x3c, 0x00, 0xc0, 0x03,
  999. X   0x3c, 0x00, 0xc0, 0x03};
  1000. END_OF_FILE
  1001.   if test 812 -ne `wc -c <'vader3b2.bit'`; then
  1002.     echo shar: \"'vader3b2.bit'\" unpacked with wrong size!
  1003.   fi
  1004.   # end of 'vader3b2.bit'
  1005. fi
  1006. if test -f 'vaders.h' -a "${1}" != "-c" ; then 
  1007.   echo shar: Will not clobber existing file \"'vaders.h'\"
  1008. else
  1009.   echo shar: Extracting \"'vaders.h'\" \(4641 characters\)
  1010.   sed "s/^X//" >'vaders.h' <<'END_OF_FILE'
  1011. X/* 
  1012. XCopyright notice:
  1013. X
  1014. XThis is mine.  I'm only letting you use it.  Period.  Feel free to rip off
  1015. Xany of the code you see fit, but have the courtesy to give me credit.
  1016. XOtherwise great hairy beasties will rip your eyes out and eat your flesh
  1017. Xwhen you least expect it.
  1018. X
  1019. XJonny Goldman <jonathan@think.com>
  1020. X
  1021. XWed May  8 1991
  1022. X*/
  1023. X
  1024. X/* vaders.h - definitions of vaders data structures. */
  1025. X
  1026. X#ifndef _vaders_h
  1027. X#define _vaders_h
  1028. X
  1029. X#include <stdio.h>
  1030. X#include <math.h>
  1031. X#include <X11/Xlib.h>
  1032. X#include <X11/Xos.h>
  1033. X
  1034. X/* #include <X11/Xutil.h> */
  1035. X#include <X11/cursorfont.h>
  1036. X
  1037. X#include <X11/IntrinsicP.h>
  1038. X#include <X11/StringDefs.h>
  1039. X
  1040. X#include <X11/Xaw/Command.h>
  1041. X
  1042. X#ifndef XtRFloat
  1043. X#define XtRFloat "Float"
  1044. X#endif
  1045. X
  1046. X#define rint(x) ((int) (x))
  1047. X#define MIN(x, y)    ((x) < (y) ? (x) : (y))
  1048. X#define MAX(x, y)    ((x) > (y) ? (x) : (y))
  1049. X
  1050. X#define VWIDTH         240
  1051. X#define IWIDTH         75
  1052. X#define VHEIGHT     190
  1053. X
  1054. X#ifndef M_PI
  1055. X#define    M_PI    3.14159265358979323846
  1056. X#define    M_PI_2    1.57079632679489661923
  1057. X#define    M_PI_4    0.78539816339744830962
  1058. X#endif
  1059. X
  1060. X#ifdef MAIN
  1061. X#define ext
  1062. X#else
  1063. X#define ext extern
  1064. X#endif
  1065. X
  1066. X/*
  1067. X * Definitions to make us act as a widget.
  1068. X */
  1069. X
  1070. X/* New fields for the Vaders widget class record */
  1071. Xtypedef struct {
  1072. X     int mumble;   /* No new procedures */
  1073. X} VadersClassPart;
  1074. X
  1075. X/* Full class record declaration */
  1076. Xtypedef struct _VadersClassRec {
  1077. X    CoreClassPart       core_class;
  1078. X    VadersClassPart    vaders_class;
  1079. X} VadersClassRec;
  1080. X
  1081. Xextern VadersClassRec vadersClassRec;
  1082. Xextern WidgetClass vadersWidgetClass;
  1083. X
  1084. X/* New fields for the Vaders widget record */
  1085. Xtypedef struct _VadersPart {
  1086. X    int dummy;
  1087. X} VadersPart;
  1088. X
  1089. X
  1090. X
  1091. X/* Full instance record declaration */
  1092. X
  1093. Xtypedef struct _VadersRec {
  1094. X    CorePart core;
  1095. X    VadersPart vaders;
  1096. X} VadersRec, *VadersWidget;
  1097. X
  1098. X
  1099. X
  1100. X
  1101. X/*
  1102. X * Actual vaders definitions.
  1103. X */
  1104. X
  1105. Xext Widget pausebutton, infobutton;
  1106. Xext int scale;
  1107. X
  1108. Xext Boolean debug;
  1109. Xext int level;
  1110. X
  1111. Xext Display *dpy;
  1112. Xext Window gamewindow, labelwindow;
  1113. Xext VadersWidget gamewidget, labelwidget;
  1114. Xext int gamewidth, gameheight;
  1115. Xext Widget toplevel;
  1116. Xext int score;
  1117. Xext int basesleft;
  1118. X
  1119. X/* Base info: */
  1120. X
  1121. Xext int basewait;        /* Number of milleseconds to wait between */
  1122. X                /* moving base. */
  1123. X
  1124. Xext XtIntervalId basetimerid;
  1125. X
  1126. Xext Pixel basepixel;
  1127. Xext Pixel buildingpixel;
  1128. Xext Boolean basedestroyed;    /* TRUE if the base is non-existant */
  1129. X
  1130. X/* Vader info: */
  1131. X
  1132. Xext XtIntervalId vadertimerid;
  1133. Xext Pixel vader1pixel;
  1134. Xext Pixel vader2pixel;
  1135. Xext Pixel vader3pixel;
  1136. Xext int vaderwait;        /* Number of milleseconds to wait between */
  1137. X                /* moving vaders. */
  1138. X
  1139. X/* Spacer info */
  1140. X
  1141. Xext Pixel spacerpixel;
  1142. Xext XtIntervalId spacertimerid;
  1143. Xext int spacerwait;        /* Number of milliseconds to wait between
  1144. X                /* moving spacers. /*
  1145. Xext int spacerappear;        /* same, but for the interval between appearances */
  1146. X
  1147. Xext Boolean spacer_shown;        /* Currnet_Spacer is something */
  1148. Xext int spacer_counter;        /* number of cycles to create a spacer */
  1149. X
  1150. X/* Shot info. */
  1151. X
  1152. Xext XtIntervalId shottimerid;
  1153. Xext XtIntervalId vshottimerid;
  1154. Xext Pixel shotpixel;
  1155. Xext Pixel vshotpixel;
  1156. Xext int shotwait;
  1157. Xext int vshotwait;
  1158. Xext int maxshots;        /* How many shots are allowed to exist at */
  1159. X                /* once. */
  1160. Xext int maxvshots;        /* How many shots are allowed to exist at */
  1161. X                /* once. */
  1162. Xext int numshots;        /* how many shots (from the base) there are right now. */
  1163. Xext int numvshots;        /* how many shots (from vaders) there are right now. */
  1164. X
  1165. X/* Score info */
  1166. X
  1167. Xext Pixel scorepixel;
  1168. X
  1169. X
  1170. Xext int bases, nextbonus, hiscore, lastscore;
  1171. X
  1172. X
  1173. Xext GC
  1174. X  foregc, backgc, basegc, buildinggc, vadergc[3],
  1175. X  shotgc, vshotgc, spacergc, scoregc;
  1176. X
  1177. Xext XImage *me_image;
  1178. X
  1179. X/* From widget.c */
  1180. X
  1181. Xextern Boolean TakeFocus();
  1182. Xextern void Quit();
  1183. Xextern void Pause();
  1184. Xextern int paused;
  1185. Xextern void SuspendTimers();
  1186. Xextern void EnableTimers();
  1187. Xextern void ShowInfo();
  1188. X
  1189. X/* From base.c */
  1190. X
  1191. Xextern void MoveBase();
  1192. Xextern void MoveLeft();
  1193. Xextern void MoveRight();
  1194. Xextern void Stop();
  1195. Xextern void Fire();
  1196. Xextern Boolean ShotHitsBase();
  1197. Xextern Boolean ShotHitsBuilding();
  1198. Xextern void InitBase();
  1199. Xextern void PaintBase();
  1200. Xextern void DrawBuildings();
  1201. X
  1202. X/* From vaders.c */
  1203. X
  1204. Xextern Boolean ShotHitsVader();
  1205. Xextern void MoveVaders();
  1206. Xextern void InitVaders();
  1207. Xextern void AddVShot();
  1208. Xextern void MoveVShots();
  1209. Xextern void CreateVaders();
  1210. Xextern void PaintAllVaders();
  1211. X
  1212. X/* from spacer.c */
  1213. X
  1214. Xextern Boolean ShotHitsSpacer();
  1215. Xextern void MoveSpacer();
  1216. Xextern void MakeSpacer();
  1217. Xextern void InitSpacers();
  1218. Xextern void PaintSpacer();
  1219. X
  1220. X/* From shot.c */
  1221. X
  1222. Xextern void AddLine();
  1223. Xextern void AddShot();
  1224. Xextern void AddVshot();
  1225. Xextern void MoveShots();
  1226. Xextern void MoveVshots();
  1227. Xextern void PaintAllShots();
  1228. Xext Pixel defaultfore, defaultback;
  1229. X
  1230. Xext char *vaderfont;
  1231. X
  1232. X#endif _vaders_h
  1233. END_OF_FILE
  1234.   if test 4641 -ne `wc -c <'vaders.h'`; then
  1235.     echo shar: \"'vaders.h'\" unpacked with wrong size!
  1236.   fi
  1237.   # end of 'vaders.h'
  1238. fi
  1239. if test -f 'vexplod1.bit' -a "${1}" != "-c" ; then 
  1240.   echo shar: Will not clobber existing file \"'vexplod1.bit'\"
  1241. else
  1242.   echo shar: Extracting \"'vexplod1.bit'\" \(514 characters\)
  1243.   sed "s/^X//" >'vexplod1.bit' <<'END_OF_FILE'
  1244. X/* 
  1245. XCopyright notice:
  1246. X
  1247. XThis is mine.  I'm only letting you use it.  Period.  Feel free to rip off
  1248. Xany of the code you see fit, but have the courtesy to give me credit.
  1249. XOtherwise great hairy beasties will rip your eyes out and eat your flesh
  1250. Xwhen you least expect it.
  1251. X
  1252. XJonny Goldman <jonathan@think.com>
  1253. X
  1254. XWed May  8 1991
  1255. X*/
  1256. X
  1257. X#define vexplode1_width 14
  1258. X#define vexplode1_height 8
  1259. Xstatic char vexplode1_bits[] = {
  1260. X   0x48, 0x04, 0x50, 0x02, 0x00, 0x00, 0x06, 0x18, 0x10, 0x02, 0x88, 0x04,
  1261. X   0x80, 0x00, 0x00, 0x00};
  1262. END_OF_FILE
  1263.   if test 514 -ne `wc -c <'vexplod1.bit'`; then
  1264.     echo shar: \"'vexplod1.bit'\" unpacked with wrong size!
  1265.   fi
  1266.   # end of 'vexplod1.bit'
  1267. fi
  1268. if test -f 'vexplod2.bit' -a "${1}" != "-c" ; then 
  1269.   echo shar: Will not clobber existing file \"'vexplod2.bit'\"
  1270. else
  1271.   echo shar: Extracting \"'vexplod2.bit'\" \(815 characters\)
  1272.   sed "s/^X//" >'vexplod2.bit' <<'END_OF_FILE'
  1273. X/* 
  1274. XCopyright notice:
  1275. X
  1276. XThis is mine.  I'm only letting you use it.  Period.  Feel free to rip off
  1277. Xany of the code you see fit, but have the courtesy to give me credit.
  1278. XOtherwise great hairy beasties will rip your eyes out and eat your flesh
  1279. Xwhen you least expect it.
  1280. X
  1281. XJonny Goldman <jonathan@think.com>
  1282. X
  1283. XWed May  8 1991
  1284. X*/
  1285. X
  1286. X#define vexplode2_width 28
  1287. X#define vexplode2_height 16
  1288. Xstatic char vexplode2_bits[] = {
  1289. X   0x00, 0x20, 0x00, 0x00, 0x00, 0x24, 0x01, 0x00, 0x00, 0xa8, 0x10, 0x00,
  1290. X   0xc0, 0xa8, 0x0c, 0x00, 0x00, 0x03, 0x02, 0x00, 0x60, 0x00, 0x60, 0x00,
  1291. X   0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00,
  1292. X   0x80, 0x00, 0x10, 0x00, 0x60, 0x04, 0x64, 0x00, 0x00, 0x53, 0x09, 0x00,
  1293. X   0xc0, 0x50, 0x11, 0x00, 0x00, 0x48, 0x02, 0x00, 0x00, 0x40, 0x00, 0x00,
  1294. X   0x00, 0x00, 0x00, 0x00};
  1295. END_OF_FILE
  1296.   if test 815 -ne `wc -c <'vexplod2.bit'`; then
  1297.     echo shar: \"'vexplod2.bit'\" unpacked with wrong size!
  1298.   fi
  1299.   # end of 'vexplod2.bit'
  1300. fi
  1301. if test -f 'xinvaders.ma' -a "${1}" != "-c" ; then 
  1302.   echo shar: Will not clobber existing file \"'xinvaders.ma'\"
  1303. else
  1304.   echo shar: Extracting \"'xinvaders.ma'\" \(4073 characters\)
  1305.   sed "s/^X//" >'xinvaders.ma' <<'END_OF_FILE'
  1306. X.\" Man page for xinvaders, by Jonny Goldman.
  1307. X.TH XInvaders 2.0 "Wed May  8 1991"
  1308. X.SH NAME
  1309. X\fIXInvaders\fR \- Shoot-em-up them nasty little bugs.
  1310. X.SH AUTHOR
  1311. X.B Jonny Goldman (jonathan@think.com)
  1312. X.SH SYNOPSIS
  1313. X.B xinvaders
  1314. X[-all_those_groovy_xtoolkit_switches]
  1315. X.SH DESCRIPTION
  1316. X.I xinvaders
  1317. Xis an implementation of the old Atari Space Invaders game, on top of the
  1318. XX11 window system.
  1319. X
  1320. X.SH PATCH LEVEL
  1321. Xxinvaders is now at Version 2, Patch Level 0
  1322. X
  1323. X.SH PLAYING XINVADERS
  1324. XThe game will start with all the invaders drawn.  Press 'p' to play, and
  1325. Xyou're off, or use the newly provided buttons.
  1326. X
  1327. XThe controls are:
  1328. X
  1329. X.PP
  1330. X.TP 8
  1331. X.B z
  1332. XFire a shot.  You will only be able to fire one shot at a time, so be careful.
  1333. X.PP
  1334. X.TP 8
  1335. X.B ,
  1336. XMove left.  Pressing this key will start you moving to the left, releasing it
  1337. Xwill make you stop.
  1338. X.PP
  1339. X.TP 8
  1340. X.B .
  1341. XMove right.  Pressing this key will start you moving to the right, releasing it
  1342. Xwill make you stop.
  1343. X.PP
  1344. X.TP 8
  1345. X.B p
  1346. XPause or Play.  Pressing this will either pause the game, or play it.
  1347. XRemember, you must press it to start the game (either at the very
  1348. Xbeginning, or between new games).
  1349. X.PP
  1350. X.TP 8
  1351. X.B q
  1352. XQuit the game.  Do this and you will end the game.  No ifs, ands or buts
  1353. Xabout it.
  1354. X
  1355. X.PP
  1356. XThe mouse controls are active, and rather obvious:
  1357. X
  1358. X.PP
  1359. X.TP 8
  1360. X.B Left
  1361. XMove left, as above
  1362. X.PP
  1363. X.TP 8
  1364. X.B Middle
  1365. XFire, as above
  1366. X.PP
  1367. X.TP 8
  1368. X.B Right
  1369. XMove right.  ditto.
  1370. X
  1371. X
  1372. X.SH SCORING
  1373. X
  1374. XThe lowest monsters are worth 10 points, the next are worth 20, and the
  1375. Xhighest are worth 30.  Space ships are worth anything from 50-300 points
  1376. X(in 50 point increments, of course).
  1377. X
  1378. X
  1379. X
  1380. X.SH CUSTOMIZING COLORS
  1381. X
  1382. XAs with all standard X applications,
  1383. X.I xinvaders
  1384. Xmay be customized through entries in the resource manager.   This game also
  1385. Xworks on monochrome screens, but the colors don't mean anything (surprise!).
  1386. X.PP
  1387. X.TP 8
  1388. X.B Scale
  1389. XA switch that allows for multiple resolutions.
  1390. X1 for normal resolution, 2 for 2x zoom (the default).
  1391. X.PP
  1392. X.TP 8
  1393. X.B BaseColor
  1394. XThe color for the Base (you).  Default is white.
  1395. X.PP
  1396. X.TP 8
  1397. X.B  BuildingColor
  1398. XThe color for the buildings that shield you.  Default is yellow.
  1399. X.PP
  1400. X.TP 8
  1401. X.B Vader1Color
  1402. XThe color for the highest invaders.  Default is blue.
  1403. X.PP
  1404. X.TP 8
  1405. X.B Vader2Color
  1406. XThe color for the middle invaders.  Default is orange.
  1407. X.PP
  1408. X.TP 8
  1409. X.B Vader3Color
  1410. XThe color for the lowest invaders.  Default is red.
  1411. X.PP
  1412. X.TP 8
  1413. X.B SpacerColor
  1414. XThe color for the Space Ship.  Default is gray.
  1415. X.PP
  1416. X.TP 8
  1417. X.B ShotColor
  1418. XThe color for your shots.  Default is green.
  1419. X.PP
  1420. X.TP 8
  1421. X.B VshotColor
  1422. XThe color for their shots.  Default is pink.
  1423. X.PP
  1424. X.TP 8
  1425. X.B ScoreColor
  1426. XThe color for the score.  Default is cyan.
  1427. X
  1428. X.PP
  1429. XHere's an example of some of the resources you can set (this would be in
  1430. Xyour .Xdefaults file):
  1431. X
  1432. X Vaders*Font:                   9x15
  1433. X Vaders*Scale:                  2
  1434. X Vaders*defaultfore:            black
  1435. X Vaders*defaultback:            white
  1436. X Vaders*Vader1Color:            blue
  1437. X Vaders*Vader2Color:            green
  1438. X Vaders*Vader3Color:            red
  1439. X Vaders*BaseColor:              cyan
  1440. X Vaders*BuildingColor:          yellow
  1441. X Vaders*SpacerColor:            gray
  1442. X Vaders*ShotColor:              lavender
  1443. X Vaders*VshotColor:             orange
  1444. X Vaders*BaseWait:               10
  1445. X Vaders*VaderWait:              300
  1446. X Vaders*SpacerWait:             50
  1447. X Vaders*ShotWait:               10
  1448. X Vaders*VshotWait:              30
  1449. X
  1450. X
  1451. X
  1452. X.SH NOTES
  1453. X
  1454. XThere are lots of resources.  You can change all the timings involved.
  1455. XHave fun with it.
  1456. X
  1457. XAlthough you can resize the gamewindow, I don't recommend it.
  1458. X
  1459. X.SH BUGS
  1460. X
  1461. XThe buildings aren't as good as the arcade, but hey, whatdayawant for free?
  1462. XIt also doesn't handle auto-repeat very well, so you should probably turn
  1463. Xit off.
  1464. X
  1465. X.SH COPYRIGHT
  1466. X
  1467. XThis is mine.  I'm only letting you use it.  Period.  Feel free to rip off
  1468. Xany of the code you see fit, but have the courtesy to give me credit.
  1469. XOtherwise great hairy beasties will rip your eyes out and eat your flesh
  1470. Xwhen you least expect it.
  1471. X
  1472. X.SH CREDITS
  1473. X
  1474. XI'd like to give a lot of credit to Terry Weissman for his roids games.  It
  1475. Xgave me the guidance on how to do something like this.
  1476. END_OF_FILE
  1477.   if test 4073 -ne `wc -c <'xinvaders.ma'`; then
  1478.     echo shar: \"'xinvaders.ma'\" unpacked with wrong size!
  1479.   fi
  1480.   # end of 'xinvaders.ma'
  1481. fi
  1482. echo shar: End of archive 3 \(of 3\).
  1483. cp /dev/null ark3isdone
  1484. MISSING=""
  1485. for I in 1 2 3 ; do
  1486.     if test ! -f ark${I}isdone ; then
  1487.     MISSING="${MISSING} ${I}"
  1488.     fi
  1489. done
  1490. if test "${MISSING}" = "" ; then
  1491.     echo You have unpacked all 3 archives.
  1492.     rm -f ark[1-9]isdone
  1493. else
  1494.     echo You still must unpack the following archives:
  1495.     echo "        " ${MISSING}
  1496. fi
  1497. exit 0
  1498. exit 0 # Just in case...
  1499. -- 
  1500.   // chris@IMD.Sterling.COM            | Send comp.sources.x submissions to:
  1501. \X/  Amiga - The only way to fly!      |
  1502.  "It's intuitively obvious to the most |    sources-x@imd.sterling.com
  1503.   casual observer..."                  |
  1504.