home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / x / volume18 / xmris / part01 < prev    next >
Encoding:
Text File  |  1992-07-15  |  50.7 KB  |  1,483 lines

  1. Newsgroups: comp.sources.x
  2. Path: uunet!paladin.american.edu!darwin.sura.net!mips!msi!dcmartin
  3. From: Nathan Sidwell <nathan@inmos.co.uk>
  4. Subject: v18i022: Xmris - an X video game, Part01/09
  5. Message-ID: <csx-18i022-xmris@uunet.UU.NET>
  6. Originator: dcmartin@fascet
  7. Sender: dcmartin@msi.com (David C. Martin - Moderator)
  8. Organization: Molecular Simulations, Inc.
  9. Date: Thu, 16 Jul 1992 17:08:22 GMT
  10. Approved: dcmartin@msi.com
  11. Lines: 1470
  12.  
  13. Submitted-by: Nathan Sidwell <nathan@inmos.co.uk>
  14. Posting-number: Volume 18, Issue 22
  15. Archive-name: xmris/part01
  16.  
  17. From the README:
  18.  
  19. Xmris is a version of the arcade game Mr Do, which will run under the X
  20. windowing system.
  21.  
  22. You control a gnome, who can walk around a garden, along paths already
  23. marked, or create new paths wherever you wish.  You also have a ball,
  24. which can be thrown in the direction you're facing, towards the gnome's
  25. feet.  Points are scored for collecting cherries (if you collect 8
  26. cherries without stopping, you get a bonus), killing monsters (by
  27. squashing them, or throwing the ball at them), and collecting the prize
  28. left when all the monsters have come out of their den.
  29.  
  30. #!/bin/sh
  31. # This is a shell archive (produced by shar 3.50)
  32. # To extract the files from this archive, save it to a file, remove
  33. # everything above the "!/bin/sh" line above, and type "sh file_name".
  34. #
  35. # made 07/16/1992 16:47 UTC by dcmartin@fascet
  36. # Source directory /home/fascet/dcmartin/csx/src/xmris
  37. #
  38. # existing files will NOT be overwritten unless -c is specified
  39. #
  40. # This is part 1 of a multipart archive                                    
  41. # do not concatenate these parts, unpack them in order with /bin/sh        
  42. #
  43. # This shar contains:
  44. # length  mode       name
  45. # ------ ---------- ------------------------------------------
  46. #    516 -rw-r--r-- COPYRIGHT
  47. #   5450 -rw-r--r-- README
  48. #   2140 -rw-r--r-- COMPILATION
  49. #   1067 -rw-r--r-- Imakefile
  50. #  11181 -rw-r--r-- Makefile.std
  51. #   5444 -rw-r--r-- xmris.man
  52. #     29 -rw-r--r-- patchlevel.h
  53. #  22124 -rw-r--r-- xmris.h
  54. #  19361 -rw-r--r-- apple.c
  55. #  37076 -rw-r--r-- create.c
  56. #  13731 -rw-r--r-- demo.c
  57. #  23961 -rw-r--r-- draw.c
  58. #  13476 -rw-r--r-- monster.c
  59. #  38428 -rw-r--r-- move.c
  60. #  26545 -rw-r--r-- player.c
  61. #   3360 -rw-r--r-- timer.c
  62. #  18828 -rw-r--r-- xmris.c
  63. #    878 -rw-r--r-- bitmaps/apple/apple.h
  64. #    881 -rw-r--r-- bitmaps/apple/applem.h
  65. #    977 -rw-r--r-- bitmaps/apple/decay.h
  66. #    980 -rw-r--r-- bitmaps/apple/decaym.h
  67. #    875 -rw-r--r-- bitmaps/apple/rock.h
  68. #    878 -rw-r--r-- bitmaps/apple/rockm.h
  69. #    671 -rw-r--r-- bitmaps/apple/rot.h
  70. #    674 -rw-r--r-- bitmaps/apple/rotm.h
  71. #    878 -rw-r--r-- bitmaps/apple/split.h
  72. #    881 -rw-r--r-- bitmaps/apple/splitm.h
  73. #    881 -rw-r--r-- bitmaps/board/cherry.h
  74. #    884 -rw-r--r-- bitmaps/board/cherrym.h
  75. #   1181 -rw-r--r-- bitmaps/board/digits.h
  76. #   1184 -rw-r--r-- bitmaps/board/digitsm.h
  77. #    707 -rw-r--r-- bitmaps/board/edgelr.h
  78. #    830 -rw-r--r-- bitmaps/board/edgetb.h
  79. #    479 -rw-r--r-- bitmaps/board/fill0.h
  80. #    479 -rw-r--r-- bitmaps/board/fill1.h
  81. #    479 -rw-r--r-- bitmaps/board/fill2.h
  82. #    479 -rw-r--r-- bitmaps/board/fill3.h
  83. #    485 -rw-r--r-- bitmaps/board/munchlr.h
  84. #    485 -rw-r--r-- bitmaps/board/munchtb.h
  85. #    881 -rw-r--r-- bitmaps/board/oblong.h
  86. #    875 -rw-r--r-- bitmaps/board/rect.h
  87. #    884 -rw-r--r-- bitmaps/chomp/chmpcls.h
  88. #    887 -rw-r--r-- bitmaps/chomp/chmpclsm.h
  89. #    884 -rw-r--r-- bitmaps/chomp/chmpopn.h
  90. #    887 -rw-r--r-- bitmaps/chomp/chmpopnm.h
  91. #    884 -rw-r--r-- bitmaps/drone/dronrt1.h
  92. #    887 -rw-r--r-- bitmaps/drone/dronrt1m.h
  93. #    884 -rw-r--r-- bitmaps/drone/dronrt2.h
  94. #    887 -rw-r--r-- bitmaps/drone/dronrt2m.h
  95. #    280 -rw-r--r-- bitmaps/drone/dronsq.h
  96. #    283 -rw-r--r-- bitmaps/drone/dronsqm.h
  97. #    884 -rw-r--r-- bitmaps/drone/dronup1.h
  98. #    887 -rw-r--r-- bitmaps/drone/dronup1m.h
  99. #    884 -rw-r--r-- bitmaps/drone/dronup2.h
  100. #    887 -rw-r--r-- bitmaps/drone/dronup2m.h
  101. #    875 -rw-r--r-- bitmaps/icon/bigi.h
  102. #    875 -rw-r--r-- bitmaps/icon/bigm.h
  103. #    875 -rw-r--r-- bitmaps/icon/bigr.h
  104. #    875 -rw-r--r-- bitmaps/icon/bigs.h
  105. #    875 -rw-r--r-- bitmaps/icon/bigt.h
  106. #    327 -rw-r--r-- bitmaps/icon/cursor.h
  107. #    284 -rw-r--r-- bitmaps/icon/cursorm.h
  108. #   1037 -rw-r--r-- bitmaps/icon/mris.h
  109. #   1037 -rw-r--r-- bitmaps/icon/msit.h
  110. #    881 -rw-r--r-- bitmaps/icon/shelli.h
  111. #    881 -rw-r--r-- bitmaps/icon/shellm.h
  112. #    881 -rw-r--r-- bitmaps/icon/shellr.h
  113. #    881 -rw-r--r-- bitmaps/icon/shells.h
  114. #    881 -rw-r--r-- bitmaps/icon/shellt.h
  115. #    881 -rw-r--r-- bitmaps/icon/solidi.h
  116. #    881 -rw-r--r-- bitmaps/icon/solidm.h
  117. #    881 -rw-r--r-- bitmaps/icon/solidr.h
  118. #    881 -rw-r--r-- bitmaps/icon/solids.h
  119. #    881 -rw-r--r-- bitmaps/icon/solidt.h
  120. #    884 -rw-r--r-- bitmaps/munch/mnchrt1.h
  121. #    887 -rw-r--r-- bitmaps/munch/mnchrt1m.h
  122. #    884 -rw-r--r-- bitmaps/munch/mnchrt2.h
  123. #    887 -rw-r--r-- bitmaps/munch/mnchrt2m.h
  124. #    280 -rw-r--r-- bitmaps/munch/mnchsq.h
  125. #    283 -rw-r--r-- bitmaps/munch/mnchsqm.h
  126. #    884 -rw-r--r-- bitmaps/munch/mnchup1.h
  127. #    887 -rw-r--r-- bitmaps/munch/mnchup1m.h
  128. #    884 -rw-r--r-- bitmaps/munch/mnchup2.h
  129. #    887 -rw-r--r-- bitmaps/munch/mnchup2m.h
  130. #    872 -rw-r--r-- bitmaps/normal/den.h
  131. #    875 -rw-r--r-- bitmaps/normal/denm.h
  132. #    884 -rw-r--r-- bitmaps/normal/normrt1.h
  133. #    887 -rw-r--r-- bitmaps/normal/normrt1m.h
  134. #    884 -rw-r--r-- bitmaps/normal/normrt2.h
  135. #    887 -rw-r--r-- bitmaps/normal/normrt2m.h
  136. #    280 -rw-r--r-- bitmaps/normal/normsq.h
  137. #    283 -rw-r--r-- bitmaps/normal/normsqm.h
  138. #    884 -rw-r--r-- bitmaps/normal/normup1.h
  139. #    887 -rw-r--r-- bitmaps/normal/normup1m.h
  140. #    884 -rw-r--r-- bitmaps/normal/normup2.h
  141. #    887 -rw-r--r-- bitmaps/normal/normup2m.h
  142. #    111 -rw-r--r-- bitmaps/player/ball.h
  143. #    933 -rw-r--r-- bitmaps/player/plyrps1.h
  144. #    887 -rw-r--r-- bitmaps/player/plyrps1m.h
  145. #    934 -rw-r--r-- bitmaps/player/plyrps2.h
  146. #    887 -rw-r--r-- bitmaps/player/plyrps2m.h
  147. #    934 -rw-r--r-- bitmaps/player/plyrrt1.h
  148. #    887 -rw-r--r-- bitmaps/player/plyrrt1m.h
  149. #    934 -rw-r--r-- bitmaps/player/plyrrt2.h
  150. #    887 -rw-r--r-- bitmaps/player/plyrrt2m.h
  151. #    280 -rw-r--r-- bitmaps/player/plyrsq.h
  152. #    283 -rw-r--r-- bitmaps/player/plyrsqm.h
  153. #    933 -rw-r--r-- bitmaps/player/plyrup1.h
  154. #    887 -rw-r--r-- bitmaps/player/plyrup1m.h
  155. #    934 -rw-r--r-- bitmaps/player/plyrup2.h
  156. #    887 -rw-r--r-- bitmaps/player/plyrup2m.h
  157. #    881 -rw-r--r-- bitmaps/prize/brolly.h
  158. #    884 -rw-r--r-- bitmaps/prize/brollym.h
  159. #    875 -rw-r--r-- bitmaps/prize/cake.h
  160. #    878 -rw-r--r-- bitmaps/prize/cakem.h
  161. #    878 -rw-r--r-- bitmaps/prize/clock.h
  162. #    881 -rw-r--r-- bitmaps/prize/clockm.h
  163. #    881 -rw-r--r-- bitmaps/prize/mushrm.h
  164. #    884 -rw-r--r-- bitmaps/prize/mushrmm.h
  165. #    884 -rw-r--r-- bitmaps/prize/spanner.h
  166. #    887 -rw-r--r-- bitmaps/prize/spannerm.h
  167. #    923 -rw-r--r-- bitmaps/xtra/xtra1.h
  168. #    881 -rw-r--r-- bitmaps/xtra/xtra1m.h
  169. #    923 -rw-r--r-- bitmaps/xtra/xtra2.h
  170. #    881 -rw-r--r-- bitmaps/xtra/xtra2m.h
  171. #    280 -rw-r--r-- bitmaps/xtra/xtrasq.h
  172. #    283 -rw-r--r-- bitmaps/xtra/xtrasqm.h
  173. #   1085 -rw-r--r-- bitmaps/xtra/xtrbold.h
  174. #   1088 -rw-r--r-- bitmaps/xtra/xtrfaint.h
  175. #
  176. if test -r _shar_seq_.tmp; then
  177.     echo 'Must unpack archives in sequence!'
  178.     echo Please unpack part `cat _shar_seq_.tmp` next
  179.     exit 1
  180. fi
  181. # ============= COPYRIGHT ==============
  182. if test -f 'COPYRIGHT' -a X"$1" != X"-c"; then
  183.     echo 'x - skipping COPYRIGHT (File already exists)'
  184.     rm -f _shar_wnt_.tmp
  185. else
  186. > _shar_wnt_.tmp
  187. echo 'x - extracting COPYRIGHT (Text)'
  188. sed 's/^X//' << 'SHAR_EOF' > 'COPYRIGHT' &&
  189. X            X M R I S V1.01
  190. X            ---------------
  191. X            (C) 1992 Nathan Sidwell
  192. X
  193. This program is copyright (C) 1992 Nathan Sidwell.  This software and
  194. documentation is in the public domain.  Permission is granted to
  195. distribute and compile verbatim copies of this software for
  196. non-commercial, non-profit use, without fee.  The software may be
  197. modified, provided that both the above copyright notice and this
  198. permission notice appear.
  199. X
  200. No guarantee is given as to the robustness or suitability of this
  201. software for your computer.
  202. SHAR_EOF
  203. chmod 0644 COPYRIGHT ||
  204. echo 'restore of COPYRIGHT failed'
  205. Wc_c="`wc -c < 'COPYRIGHT'`"
  206. test 516 -eq "$Wc_c" ||
  207.     echo 'COPYRIGHT: original size 516, current size' "$Wc_c"
  208. rm -f _shar_wnt_.tmp
  209. fi
  210. # ============= README ==============
  211. if test -f 'README' -a X"$1" != X"-c"; then
  212.     echo 'x - skipping README (File already exists)'
  213.     rm -f _shar_wnt_.tmp
  214. else
  215. > _shar_wnt_.tmp
  216. echo 'x - extracting README (Text)'
  217. sed 's/^X//' << 'SHAR_EOF' > 'README' &&
  218. X            X M R I S V1.01
  219. X
  220. X            (C) 1992 Nathan Sidwell
  221. X
  222. This program is copyright (C) 1992 Nathan Sidwell.  This software and
  223. documentation is in the public domain.  Permission is granted to
  224. distribute and compile verbatim copies of this software for
  225. non-commercial, non-profit use, without fee.  The software may be
  226. modified, provided that both the above copyright notice and this
  227. permission notice appear.
  228. X
  229. No guarantee is given as to the robustness or suitability of this
  230. software for your computer.
  231. X
  232. SCENARIO
  233. X
  234. XXmris is a version of the arcade game Mr Do, which will run under the X
  235. windowing system.
  236. X
  237. You control a gnome, who can walk around a garden, along paths already
  238. marked, or create new paths wherever you wish.  You also have a ball,
  239. which can be thrown in the direction you're facing, towards the gnome's
  240. feet.  Points are scored for collecting cherries (if you collect 8
  241. cherries without stopping, you get a bonus), killing monsters (by
  242. squashing them, or throwing the ball at them), and collecting the prize
  243. left when all the monsters have come out of their den.
  244. X
  245. Extra lives are obtained by filling in the 'EXTRA' monsters at the top
  246. of the screen.  One of these comes out every 5000 points, and also when
  247. you get the prize, along with 3 drones.  Killing the EXTRA will kill the
  248. drones too.  When you collect the prize, the normal monsters freeze,
  249. until the three drones are dead.  Beware things go faster after that!
  250. When all the normal monsters are killed or all the cherries collected,
  251. or you have got the final EXTRA monster, you advance to the next screen.
  252. X
  253. You can kill the monsters by throwing the ball at them, or dropping the
  254. apples on them.  You get more points for squashing them.  The EXTRA
  255. monsters and its drones, can eat the apples if they're walking towards
  256. it when they meet.  You die by colliding with a monster (unless its
  257. eating an apple, in which case no harm done), or by being squashed be a
  258. falling apple.
  259. X
  260. GAME CONTROLS
  261. X
  262. The gnome can be controlled by the mouse or keyboard, this is selected
  263. when you start a new game.  The gnome walks towards the mouse, and
  264. throws the ball when you press a button.  You can move the mouse at
  265. right angles to the gnome's direction while its walking, the gnome
  266. continues towards the previous destination, before turning towards the
  267. new one.  Mouse control is not that accurate for fine control of the
  268. gnome (I don't use it).  Keyboard control is by 'z' and 'x' for left and
  269. right, and '\'' and '/' for up and down.  The ball is thrown with the
  270. space bar.  Pressing more than one key, will turn the gnome
  271. appropriately at the next intersection, so you can go round corners by
  272. pressing the new direction key before releasing the old one.  If you try
  273. to go in a direction not possible, the gnome will move towards the
  274. nearest intersection or in the direction it was going, depending on how
  275. near to an intersection it was.
  276. X
  277. The game can be paused by iconifying it (when your boss walks in), or by
  278. pressing 'p'.  When de-iconified, the game remains paused.  To continue
  279. press space.  When paused, you can abort the game by pressing 'q'.  If
  280. the game is displaying the demo screens, 'q' will quit the game
  281. entirely.
  282. X
  283. OPTIONS
  284. X
  285. -help
  286. X    Lists command arguments and version number
  287. X
  288. -display <display>
  289. X    Display to run on
  290. X
  291. -font <font>
  292. X    Text font name
  293. X
  294. -rv
  295. X    Reverse video
  296. X
  297. -bw
  298. X    Force black and white
  299. X
  300. -iconic
  301. X    Starts iconified
  302. X
  303. -mris
  304. -msit
  305. X    So not to be accused of gender bias, xmris can also be run as
  306. xmsit.  The gender of the game is taken from the program name (mris or
  307. msit) and may be over ridden by two of the following switches.  The game
  308. is known as Mr Is because the arcade game was masculine.  (Happy now
  309. Geoff?)
  310. X
  311. The argument list is also fed to XSetStandardProperties, I don't know
  312. what this does.
  313. X
  314. PLAYING THE GAME
  315. X
  316. The game works best with all other processes asleep.  If another process
  317. gets too much processor the animation will be jerky, and the load line
  318. along the bottom will start to grow.  Because an interrupt is used to
  319. control the frame rate, the animation is smoother than with xchomp.
  320. X
  321. You probably want to position the pointer at the bottom of the window,
  322. so that it doesn't interfere with the board.  You'll notice it flicker
  323. if one of the sprites moves under it.
  324. X
  325. BUGS
  326. X
  327. The game is always in black and white, I haven't got round to doing
  328. colour sprites yet, so the -bw argument is superfluous.
  329. X
  330. The -iconic argument has no effect.  (I don't know how to get it to
  331. work.)
  332. X
  333. Fatal XIO errors are not handled gracefully.  Quiting the game by using
  334. your window manager results in big error message.  I don't know how to
  335. trap this.
  336. X
  337. The program was written with a folding editor, it might be hard to find
  338. your way around without one.
  339. X
  340. In order to get it to compile correctly with both K&R C and ANSI C, I've
  341. used several macros to deal with the differences in function prototyping
  342. and argument lists.  These produce either proper K&R declarations or
  343. proper ANSI ones.  I did have mixed declarations, with the correct
  344. promotions taken care of, but that doesn't work well for the one varargs
  345. function.  It might make it hard for things like ctags to work.  Maybe
  346. I'll revert to the mixed declarations.
  347. X
  348. Please report modifications and other bugs, so that they can be
  349. considered for inclusion in later releases (especially true of syste
  350. X specific stuff).
  351. X
  352. email to nathan@inmos.co.uk
  353. X
  354. Have fun.
  355. X
  356. Nathan Sidwell  INMOS UK |                 | nathan@inmos.co.uk       DoD#0390
  357. SHAR_EOF
  358. chmod 0644 README ||
  359. echo 'restore of README failed'
  360. Wc_c="`wc -c < 'README'`"
  361. test 5450 -eq "$Wc_c" ||
  362.     echo 'README: original size 5450, current size' "$Wc_c"
  363. rm -f _shar_wnt_.tmp
  364. fi
  365. # ============= COMPILATION ==============
  366. if test -f 'COMPILATION' -a X"$1" != X"-c"; then
  367.     echo 'x - skipping COMPILATION (File already exists)'
  368.     rm -f _shar_wnt_.tmp
  369. else
  370. > _shar_wnt_.tmp
  371. echo 'x - extracting COMPILATION (Text)'
  372. sed 's/^X//' << 'SHAR_EOF' > 'COMPILATION' &&
  373. X            X M R I S V1.01
  374. X
  375. X            (C) 1992 Nathan Sidwell
  376. X
  377. Modify the Imakefile as appropriate for your system.  You will have to
  378. do this to set the compiler, as, by default, Imakefile selects gcc with
  379. the standard includes not in /usr/include.  Makefile.std doesn't do
  380. this, but uses the defaults.  The source will compile with both ANSI and
  381. K&R compilers, provided that they both correctly define and undefine
  382. __STDC__.  (But you all use ANSI now don't you.)  Compilation should be
  383. straight forward.  The only thing that might cause problems is the timer
  384. stuff in timer.c which set up a real-time interrupt to get the frame
  385. rate constant.  If the frame rate is too high (ie the interrupt occurs
  386. before the game loop has completed) a load line along the bottom of the
  387. window will start to grow towards the left of the window.  If this
  388. always grows, with all other processes dormant, you must slow the game
  389. down by increasing the frame rate.  This can be done by fiddling with
  390. the FRAME variable in the Imakefile
  391. X
  392. To make on your system type
  393. X
  394. X    xmkmf
  395. X    make depend
  396. X    make all
  397. X
  398. To install into your X bin use make install, but note that this only
  399. installs xmris, not xmsit.
  400. X
  401. Please report modifications, so that they can be considered for
  402. inclusion in later releases (especially true of system specific stuff).
  403. X
  404. email to nathan@inmos.co.uk
  405. X
  406. XXMRIS has been tested on the following systems
  407. X
  408. X    Platform    OS        X release    Colour
  409. X    Sparcstation 1    Sunos 4.1    X11R4        B/W
  410. X
  411. NOTES TO PROGRAMMERS
  412. X
  413. XXMRIS uses pure Xlib, without toolkits, widgets, etc.  This is mainly
  414. because I don't know anything about toolkits, widgets, etc.  In fact,
  415. this program started out as an experiment in X Window System
  416. programming, hacking from Xchomp (by Jerry Shekhel), and using the
  417. header files (I don't even have an X manual!).  There's not much of
  418. XXchomp code left, infact the only thing is the DEC_icon_atom stuff and
  419. some bits of create_resources.  I improved the response by using a real
  420. time interrupt rather than delay for the timing and only updating the
  421. necessary parts of the display.
  422. X
  423. Have fun.
  424. X
  425. Nathan Sidwell  INMOS UK |                 | nathan@inmos.co.uk       DoD#0390
  426. SHAR_EOF
  427. chmod 0644 COMPILATION ||
  428. echo 'restore of COMPILATION failed'
  429. Wc_c="`wc -c < 'COMPILATION'`"
  430. test 2140 -eq "$Wc_c" ||
  431.     echo 'COMPILATION: original size 2140, current size' "$Wc_c"
  432. rm -f _shar_wnt_.tmp
  433. fi
  434. # ============= Imakefile ==============
  435. if test -f 'Imakefile' -a X"$1" != X"-c"; then
  436.     echo 'x - skipping Imakefile (File already exists)'
  437.     rm -f _shar_wnt_.tmp
  438. else
  439. > _shar_wnt_.tmp
  440. echo 'x - extracting Imakefile (Text)'
  441. sed 's/^X//' << 'SHAR_EOF' > 'Imakefile' &&
  442. /**/# I need special include directories for gcc
  443. STD_INCLUDES = 
  444. /**/# select your compiler
  445. CC = gcc -traditional
  446. /**/#CC = gcc -ansi -pedantic -nostdinc -Wall -Wpointer-arith -Wwrite-strings
  447. /**/#CC = gcc -traditional -nostdinc -Wall -Wpointer-arith -Wwrite-strings
  448. /**/# uncomment and fiddle with the following lines if you want
  449. /**/# default game gender 0 = male, 1 = female
  450. /**/#GENDER = -DGAME_GENDER=1
  451. /**/# frame rate in microseconds
  452. /**/#FRAME = -DFRAME_RATE=37000
  453. /**/# font name
  454. /**/#FONT = -DFONT_NAME="-*-courier-*-r-*-*-18-*-*-*-*-*-*-*"
  455. /**/# do you trust the code?
  456. /**/# NDEBUG = -DNDEBUG
  457. /**/# K&R doesn't have __DATE__ so we supply it here
  458. DATE = -DDATE="\"`date '+%h %d 19%y'`\""
  459. /**/# Allow debugging?
  460. /**/#CDEBUGFLAGS = -g
  461. X
  462. DEFINES = $(DATE) $(GENDER) $(FRAME) $(FONT) $(NDEBUG)
  463. SRCS = apple.c create.c demo.c draw.c monster.c move.c player.c timer.c xmris.c
  464. OBJS = apple.o create.o demo.o draw.o monster.o move.o player.o timer.o xmris.o
  465. LOCAL_LIBRARIES = $(XLIB)
  466. X
  467. ComplexProgramTarget(xmris)
  468. X
  469. all :: xmris xmsit
  470. X
  471. xmsit: xmris
  472. X    ln -s xmris xmsit
  473. SHAR_EOF
  474. chmod 0644 Imakefile ||
  475. echo 'restore of Imakefile failed'
  476. Wc_c="`wc -c < 'Imakefile'`"
  477. test 1067 -eq "$Wc_c" ||
  478.     echo 'Imakefile: original size 1067, current size' "$Wc_c"
  479. rm -f _shar_wnt_.tmp
  480. fi
  481. # ============= Makefile.std ==============
  482. if test -f 'Makefile.std' -a X"$1" != X"-c"; then
  483.     echo 'x - skipping Makefile.std (File already exists)'
  484.     rm -f _shar_wnt_.tmp
  485. else
  486. > _shar_wnt_.tmp
  487. echo 'x - extracting Makefile.std (Text)'
  488. sed 's/^X//' << 'SHAR_EOF' > 'Makefile.std' &&
  489. # Makefile generated by imake - do not edit!
  490. # $XConsortium: imake.c,v 1.65 91/07/25 17:50:17 rws Exp $
  491. #
  492. # The cpp used on this machine replaces all newlines and multiple tabs and
  493. # spaces in a macro expansion with a single space.  Imake tries to compensate
  494. # for this, but is not always successful.
  495. #
  496. X
  497. # -------------------------------------------------------------------------
  498. # Makefile generated from "Imake.tmpl" and <Imakefile>
  499. # $XConsortium: Imake.tmpl,v 1.139 91/09/16 08:52:48 rws Exp $
  500. #
  501. # Platform-specific parameters may be set in the appropriate <vendor>.cf
  502. # configuration files.  Site-specific parameters should be set in the file
  503. # site.def.  Full rebuilds are recommended if any parameters are changed.
  504. #
  505. # If your C preprocessor does not define any unique symbols, you will need
  506. # to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
  507. # "make World" the first time).
  508. #
  509. X
  510. # -------------------------------------------------------------------------
  511. # site-specific configuration parameters that need to come before
  512. # the platform-specific parameters - edit site.def to change
  513. X
  514. # site:  $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $
  515. X
  516. # -------------------------------------------------------------------------
  517. # platform-specific configuration parameters - edit sun.cf to change
  518. X
  519. # platform:  $XConsortium: sun.cf,v 1.68 91/07/30 11:34:39 rws Exp $
  520. X
  521. # operating system:  SunOS 4.1.1
  522. X
  523. # $XConsortium: sunLib.rules,v 1.6 91/03/24 17:55:58 rws Exp $
  524. X
  525. # -------------------------------------------------------------------------
  526. # site-specific configuration parameters that go after
  527. # the platform-specific parameters - edit site.def to change
  528. X
  529. # site:  $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $
  530. X
  531. X            SHELL = /bin/sh
  532. X
  533. X              TOP = .
  534. X      CURRENT_DIR = .
  535. X
  536. X               AR = ar clq
  537. X  BOOTSTRAPCFLAGS =
  538. X               CC = cc
  539. X               AS = as
  540. X
  541. X         COMPRESS = compress
  542. X              CPP = /lib/cpp $(STD_CPP_DEFINES)
  543. X    PREPROCESSCMD = cc -E $(STD_CPP_DEFINES)
  544. X          INSTALL = install
  545. X               LD = ld
  546. X             LINT = lint
  547. X      LINTLIBFLAG = -C
  548. X         LINTOPTS = -axz
  549. X               LN = ln -s
  550. X             MAKE = make
  551. X               MV = mv
  552. X               CP = cp
  553. X
  554. X           RANLIB = ranlib
  555. X  RANLIBINSTFLAGS =
  556. X
  557. X               RM = rm -f
  558. X            TROFF = psroff
  559. X         MSMACROS = -ms
  560. X              TBL = tbl
  561. X              EQN = eqn
  562. X     STD_INCLUDES =
  563. X  STD_CPP_DEFINES =
  564. X      STD_DEFINES =
  565. X EXTRA_LOAD_FLAGS =
  566. X  EXTRA_LIBRARIES =
  567. X             TAGS = ctags
  568. X
  569. X    SHAREDCODEDEF = -DSHAREDCODE
  570. X         SHLIBDEF = -DSUNSHLIB
  571. X
  572. X    PROTO_DEFINES =
  573. X
  574. X     INSTPGMFLAGS =
  575. X
  576. X     INSTBINFLAGS = -m 0755
  577. X     INSTUIDFLAGS = -m 4755
  578. X     INSTLIBFLAGS = -m 0644
  579. X     INSTINCFLAGS = -m 0444
  580. X     INSTMANFLAGS = -m 0444
  581. X     INSTDATFLAGS = -m 0444
  582. X    INSTKMEMFLAGS = -m 4755
  583. X
  584. X      PROJECTROOT = /usr/X11/R5
  585. X
  586. X     TOP_INCLUDES = -I$(INCROOT)
  587. X
  588. X      CDEBUGFLAGS = -O
  589. X        CCOPTIONS = -pipe
  590. X
  591. X      ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
  592. X       ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES)
  593. X           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
  594. X        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)
  595. X
  596. X           LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  597. X
  598. X        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) -L$(USRLIBDIR)
  599. X
  600. X   LDCOMBINEFLAGS = -X -r
  601. X      DEPENDFLAGS =
  602. X
  603. X        MACROFILE = sun.cf
  604. X           RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
  605. X
  606. X    IMAKE_DEFINES =
  607. X
  608. X         IRULESRC = $(CONFIGDIR)
  609. X        IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
  610. X
  611. X     ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \
  612. X            $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \
  613. X            $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)
  614. X
  615. # -------------------------------------------------------------------------
  616. # X Window System Build Parameters
  617. # $XConsortium: Project.tmpl,v 1.138 91/09/10 09:02:12 rws Exp $
  618. X
  619. # -------------------------------------------------------------------------
  620. # X Window System make variables; this need to be coordinated with rules
  621. X
  622. X          PATHSEP = /
  623. X        USRLIBDIR = /usr/X11/R5/lib
  624. X           BINDIR = /usr/X11/R5/bin
  625. X          INCROOT = /usr/X11/R5/include
  626. X     BUILDINCROOT = $(TOP)
  627. X      BUILDINCDIR = $(BUILDINCROOT)/X11
  628. X      BUILDINCTOP = ..
  629. X           INCDIR = $(INCROOT)/X11
  630. X           ADMDIR = /usr/adm
  631. X           LIBDIR = $(USRLIBDIR)/X11
  632. X        CONFIGDIR = $(LIBDIR)/config
  633. X       LINTLIBDIR = $(USRLIBDIR)/lint
  634. X
  635. X          FONTDIR = $(LIBDIR)/fonts
  636. X         XINITDIR = $(LIBDIR)/xinit
  637. X           XDMDIR = $(LIBDIR)/xdm
  638. X           TWMDIR = $(LIBDIR)/twm
  639. X          MANPATH = /usr/X11/R5/man
  640. X    MANSOURCEPATH = $(MANPATH)/man
  641. X        MANSUFFIX = n
  642. X     LIBMANSUFFIX = 3
  643. X           MANDIR = $(MANSOURCEPATH)$(MANSUFFIX)
  644. X        LIBMANDIR = $(MANSOURCEPATH)$(LIBMANSUFFIX)
  645. X           NLSDIR = $(LIBDIR)/nls
  646. X        PEXAPIDIR = $(LIBDIR)/PEX
  647. X      XAPPLOADDIR = $(LIBDIR)/app-defaults
  648. X       FONTCFLAGS = -t
  649. X
  650. X     INSTAPPFLAGS = $(INSTDATFLAGS)
  651. X
  652. X            IMAKE = imake
  653. X           DEPEND = makedepend
  654. X              RGB = rgb
  655. X
  656. X            FONTC = bdftopcf
  657. X
  658. X        MKFONTDIR = mkfontdir
  659. X        MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier
  660. X
  661. X        CONFIGSRC = $(TOP)/config
  662. X       DOCUTILSRC = $(TOP)/doc/util
  663. X        CLIENTSRC = $(TOP)/clients
  664. X          DEMOSRC = $(TOP)/demos
  665. X           LIBSRC = $(TOP)/lib
  666. X          FONTSRC = $(TOP)/fonts
  667. X       INCLUDESRC = $(TOP)/X11
  668. X        SERVERSRC = $(TOP)/server
  669. X          UTILSRC = $(TOP)/util
  670. X        SCRIPTSRC = $(UTILSRC)/scripts
  671. X       EXAMPLESRC = $(TOP)/examples
  672. X       CONTRIBSRC = $(TOP)/../contrib
  673. X           DOCSRC = $(TOP)/doc
  674. X           RGBSRC = $(TOP)/rgb
  675. X        DEPENDSRC = $(UTILSRC)/makedepend
  676. X         IMAKESRC = $(CONFIGSRC)
  677. X         XAUTHSRC = $(LIBSRC)/Xau
  678. X          XLIBSRC = $(LIBSRC)/X
  679. X           XMUSRC = $(LIBSRC)/Xmu
  680. X       TOOLKITSRC = $(LIBSRC)/Xt
  681. X       AWIDGETSRC = $(LIBSRC)/Xaw
  682. X       OLDXLIBSRC = $(LIBSRC)/oldX
  683. X      XDMCPLIBSRC = $(LIBSRC)/Xdmcp
  684. X      BDFTOSNFSRC = $(FONTSRC)/bdftosnf
  685. X      BDFTOSNFSRC = $(FONTSRC)/clients/bdftosnf
  686. X      BDFTOPCFSRC = $(FONTSRC)/clients/bdftopcf
  687. X     MKFONTDIRSRC = $(FONTSRC)/clients/mkfontdir
  688. X         FSLIBSRC = $(FONTSRC)/lib/fs
  689. X    FONTSERVERSRC = $(FONTSRC)/server
  690. X     EXTENSIONSRC = $(TOP)/extensions
  691. X         XILIBSRC = $(EXTENSIONSRC)/lib/xinput
  692. X      PHIGSLIBSRC = $(EXTENSIONSRC)/lib/PEX
  693. X
  694. # $XConsortium: sunLib.tmpl,v 1.11 91/07/31 11:32:08 rws Exp $
  695. X
  696. SHLIBLDFLAGS = -assert pure-text
  697. PICFLAGS = -pic
  698. X
  699. X  DEPEXTENSIONLIB =
  700. X     EXTENSIONLIB = -lXext
  701. X
  702. X          DEPXLIB = $(DEPEXTENSIONLIB)
  703. X             XLIB = $(EXTENSIONLIB) -lX11
  704. X
  705. X        DEPXMULIB = $(USRLIBDIR)/libXmu.sa.$(SOXMUREV)
  706. X           XMULIB = -lXmu
  707. X
  708. X       DEPOLDXLIB =
  709. X          OLDXLIB = -loldX
  710. X
  711. X      DEPXTOOLLIB = $(USRLIBDIR)/libXt.sa.$(SOXTREV)
  712. X         XTOOLLIB = -lXt
  713. X
  714. X        DEPXAWLIB = $(USRLIBDIR)/libXaw.sa.$(SOXAWREV)
  715. X           XAWLIB = -lXaw
  716. X
  717. X        DEPXILIB =
  718. X           XILIB = -lXi
  719. X
  720. X        SOXLIBREV = 4.10
  721. X          SOXTREV = 4.10
  722. X         SOXAWREV = 5.0
  723. X        SOOLDXREV = 4.10
  724. X         SOXMUREV = 4.10
  725. X        SOXEXTREV = 4.10
  726. X      SOXINPUTREV = 4.10
  727. X
  728. X      DEPXAUTHLIB = $(USRLIBDIR)/libXau.a
  729. X         XAUTHLIB =  -lXau
  730. X      DEPXDMCPLIB = $(USRLIBDIR)/libXdmcp.a
  731. X         XDMCPLIB =  -lXdmcp
  732. X
  733. X        DEPPHIGSLIB = $(USRLIBDIR)/libphigs.a
  734. X           PHIGSLIB =  -lphigs
  735. X
  736. X       DEPXBSDLIB = $(USRLIBDIR)/libXbsd.a
  737. X          XBSDLIB =  -lXbsd
  738. X
  739. X LINTEXTENSIONLIB = $(LINTLIBDIR)/llib-lXext.ln
  740. X         LINTXLIB = $(LINTLIBDIR)/llib-lX11.ln
  741. X          LINTXMU = $(LINTLIBDIR)/llib-lXmu.ln
  742. X        LINTXTOOL = $(LINTLIBDIR)/llib-lXt.ln
  743. X          LINTXAW = $(LINTLIBDIR)/llib-lXaw.ln
  744. X           LINTXI = $(LINTLIBDIR)/llib-lXi.ln
  745. X        LINTPHIGS = $(LINTLIBDIR)/llib-lphigs.ln
  746. X
  747. X          DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
  748. X
  749. X         DEPLIBS1 = $(DEPLIBS)
  750. X         DEPLIBS2 = $(DEPLIBS)
  751. X         DEPLIBS3 = $(DEPLIBS)
  752. X
  753. # -------------------------------------------------------------------------
  754. # Imake rules for building libraries, programs, scripts, and data files
  755. # rules:  $XConsortium: Imake.rules,v 1.123 91/09/16 20:12:16 rws Exp $
  756. X
  757. # -------------------------------------------------------------------------
  758. # start of Imakefile
  759. X
  760. # I need special include directories for gcc
  761. STD_INCLUDES =
  762. # select your compiler
  763. CC = gcc -traditional
  764. #CC = gcc -ansi -pedantic -nostdinc -Wall -Wpointer-arith -Wwrite-strings
  765. #CC = gcc -traditional -nostdinc -Wall -Wpointer-arith -Wwrite-strings
  766. # uncomment and fiddle with the following lines if you want
  767. # default game gender 0 = male, 1 = female
  768. #GENDER = -DGAME_GENDER=1
  769. # frame rate in microseconds
  770. #FRAME = -DFRAME_RATE=37000
  771. # font name
  772. #FONT = -DFONT_NAME="-*-courier-*-r-*-*-18-*-*-*-*-*-*-*"
  773. # do you trust the code?
  774. # NDEBUG = -DNDEBUG
  775. # K&R doesn't have __DATE__ so we supply it here
  776. DATE = -DDATE="\"`date '+%h %d 19%y'`\""
  777. # Allow debugging?
  778. #CDEBUGFLAGS = -g
  779. X
  780. DEFINES = $(DATE) $(GENDER) $(FRAME) $(FONT) $(NDEBUG)
  781. SRCS = apple.c create.c demo.c draw.c monster.c move.c player.c timer.c xmris.c
  782. OBJS = apple.o create.o demo.o draw.o monster.o move.o player.o timer.o xmris.o
  783. LOCAL_LIBRARIES = $(XLIB)
  784. X
  785. X PROGRAM = xmris
  786. X
  787. all:: xmris
  788. X
  789. xmris: $(OBJS) $(DEPLIBS)
  790. X    $(RM) $@
  791. X    $(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS)
  792. X
  793. saber_xmris:: $(SRCS)
  794. X    # load $(ALLDEFINES) $(SRCS) $(LOCAL_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  795. X
  796. osaber_xmris:: $(OBJS)
  797. X    # load $(ALLDEFINES) $(OBJS) $(LOCAL_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  798. X
  799. install:: xmris
  800. X    @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \
  801. X    else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi
  802. X    $(INSTALL) -c $(INSTPGMFLAGS)  xmris $(DESTDIR)$(BINDIR)
  803. X
  804. install.man:: xmris.man
  805. X    @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \
  806. X    else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi
  807. X    $(INSTALL) -c $(INSTMANFLAGS) xmris.man $(DESTDIR)$(MANDIR)/xmris.$(MANSUFFIX)
  808. X
  809. depend::
  810. X    $(DEPEND) $(DEPENDFLAGS) -s "# DO NOT DELETE" -- $(ALLDEFINES) -- $(SRCS)
  811. X
  812. lint:
  813. X    $(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS)
  814. lint1:
  815. X    $(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS)
  816. X
  817. clean::
  818. X    $(RM) $(PROGRAM)
  819. X
  820. all :: xmris xmsit
  821. X
  822. xmsit: xmris
  823. X    ln -s xmris xmsit
  824. X
  825. # -------------------------------------------------------------------------
  826. # common rules for all Makefiles - do not edit
  827. X
  828. emptyrule::
  829. X
  830. clean::
  831. X    $(RM_CMD) "#"*
  832. X
  833. Makefile::
  834. X    -@if [ -f Makefile ]; then set -x; \
  835. X    $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
  836. X    else exit 0; fi
  837. X    $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
  838. X
  839. tags::
  840. X    $(TAGS) -w *.[ch]
  841. X    $(TAGS) -xw *.[ch] > TAGS
  842. X
  843. saber:
  844. X    # load $(ALLDEFINES) $(SRCS)
  845. X
  846. osaber:
  847. X    # load $(ALLDEFINES) $(OBJS)
  848. X
  849. # -------------------------------------------------------------------------
  850. # empty rules for directories that do not have SUBDIRS - do not edit
  851. X
  852. install::
  853. X    @echo "install in $(CURRENT_DIR) done"
  854. X
  855. install.man::
  856. X    @echo "install.man in $(CURRENT_DIR) done"
  857. X
  858. Makefiles::
  859. X
  860. includes::
  861. X
  862. # -------------------------------------------------------------------------
  863. # dependencies generated by makedepend
  864. X
  865. SHAR_EOF
  866. chmod 0644 Makefile.std ||
  867. echo 'restore of Makefile.std failed'
  868. Wc_c="`wc -c < 'Makefile.std'`"
  869. test 11181 -eq "$Wc_c" ||
  870.     echo 'Makefile.std: original size 11181, current size' "$Wc_c"
  871. rm -f _shar_wnt_.tmp
  872. fi
  873. # ============= xmris.man ==============
  874. if test -f 'xmris.man' -a X"$1" != X"-c"; then
  875.     echo 'x - skipping xmris.man (File already exists)'
  876.     rm -f _shar_wnt_.tmp
  877. else
  878. > _shar_wnt_.tmp
  879. echo 'x - extracting xmris.man (Text)'
  880. sed 's/^X//' << 'SHAR_EOF' > 'xmris.man' &&
  881. .TH XMRIS 6 "15 July 1992" "X Version 11"
  882. .IX xmris#(n) "" "\fLxmris\fP(n)"
  883. .SH NAME
  884. xmris - video arcade game for
  885. .I X 
  886. .SH SYNOPSIS
  887. .B xmris
  888. [-option ...]
  889. .LP
  890. .B xmsit
  891. [-option ...]
  892. .IX xmris#(n) "" "\fLxmris\fP(n) \(em video game"
  893. .SH "DESCRIPTION"
  894. .PP
  895. .I xmris
  896. is a version of the Mr Do video arcade game for the X Window System.
  897. .PP
  898. You control a gnome, who can walk around a garden, along paths already
  899. marked, or create new paths wherever you wish. You also have a ball,
  900. which can be thrown in the direction you're facing, towards the gnome's
  901. feet. Points are scored for collecting cherries (if you collect 8
  902. cherries without stopping, you get a bonus), killing monsters (by
  903. squashing them, or throwing the ball at them), and collecting the prize
  904. left when all the monsters have come out of their den.
  905. .PP
  906. Extra lives are obtained by filling in the 'EXTRA' monsters at the top
  907. of the screen. One of these comes out every 5000 points, and also when
  908. you get the prize, along with 3 drones. Killing the EXTRA will kill the
  909. drones too. When you collect the prize, the normal monsters freeze,
  910. until the three drones are dead. Beware things go faster after that!
  911. When all the normal monsters are killed or all the cherries collected,
  912. or you have got the final EXTRA monster, you advance to the next
  913. screen.
  914. .PP
  915. You can kill the monsters by throwing the ball at them, or dropping the
  916. apples on them. You get more points for squashing them. The EXTRA
  917. monsters and its drones, can eat the apples if they're walking towards
  918. it when they meet. You die by colliding with a monster (unless its
  919. eating an apple, in which case no harm done), or by being squashed be a
  920. falling apple.
  921. .PP
  922. The game works best with all other processes asleep. If another process
  923. gets too much processor the animation will be jerky, and the load line
  924. along the bottom will start to grow. Because an interrupt is used to
  925. control the frame rate, the animation is smoother than with xchomp.
  926. .PP
  927. You probably want to position the pointer at the bottom of the window, so
  928. that it doesn't interfere with the board. You'll notice it flicker if one
  929. of the sprites moves under it.
  930. .SH GAME CONTROLS
  931. .PP
  932. The gnome can be controlled by the mouse or keyboard, this is selected
  933. when you start a new game. The gnome walks towards the mouse, and
  934. throws the ball when you press a button. You can move the mouse at
  935. right angles to the gnome's direction while its walking, the gnome
  936. continues towards the previous destination, before turning towards the
  937. new one. Mouse control is not that accurate for fine control of the
  938. gnome (I don't use it). Keyboard control is by 'z' and 'x' for left and
  939. right, and '\'' and '/' for up and down. The ball is thrown with the
  940. space bar. Pressing more than one key, will turn the gnome
  941. appropriately at the next intersection, so you can go round corners by
  942. pressing the new direction key before releasing the old one. If you try
  943. to go in a direction not possible, the gnome will move towards the
  944. nearest intersection or in the direction it was going, depending on how
  945. near to an intersection it was.
  946. .PP
  947. The game can be paused by iconifying it (when your boss walks in), or
  948. by pressing 'p'. When de-iconified, the game remains paused. To
  949. continue press space. When paused, you can abort the game by pressing
  950. 'q'. If the game is displaying the demo screens, 'q' will quit the game
  951. entirely.
  952. .SH OPTIONS
  953. .TP 4
  954. .B \-help
  955. Lists the command options and some other info, and does not start the game.
  956. .TP 4
  957. .B \-display \fIdisplay\fP
  958. Specifies which X server to connect to.
  959. .TP 4
  960. .B \-font \fIfont\fP
  961. Specifies which font to use.
  962. .TP 4
  963. .B \-rv
  964. Swap black and white colours.
  965. .TP 4
  966. .B \-bw
  967. Use black and white, even on colour displays.
  968. .TP 4
  969. .B \-iconic
  970. Start up iconized.
  971. .TP 4
  972. .B \-mris
  973. .TP 4
  974. .B \-msit
  975. So not to be accused of gender bias, xmris can also be run as xmsit.
  976. The gender of the game is taken from the program name (mris or msit)
  977. but may be over ridden by these two switches. The game is known as Mr
  978. Is because the arcade game was masculine.
  979. .PP
  980. The argument list is also fed to XSetStandardProperties, I don't know what
  981. this does.
  982. .SH SEE ALSO
  983. xchomp(6)
  984. .SH BUGS
  985. .PP
  986. The game is always in black and white, I haven't got round to doing
  987. colour sprites yet, so the -bw argument is superfluous.
  988. .PP
  989. The -iconic argument has no effect. (I don't know how to get it to work.)
  990. .PP
  991. Fatal XIO errors are not handled gracefully. Quiting the game by using
  992. your window manager results in big error message. I don't know how to
  993. trap this.
  994. .PP
  995. The program was written with a folding editor, it might be hard to find
  996. your way around without one.
  997. .PP
  998. In order to get it to compile correctly with both K&R C and ANSI C,
  999. I've used several macros to deal with the differences in function
  1000. prototyping and argument lists. These produce either proper K&R
  1001. declarations or proper ANSI ones. I did have mixed declarations, with
  1002. the correct promotions taken care of, but that doesn't work well for
  1003. the one varargs function. It might make it hard for things like ctags
  1004. to work. Maybe I'll revert to the mixed declarations or maybe I won't
  1005. support K&R.
  1006. .SH COMMENTS
  1007. .PP
  1008. I welcome any comments, suggestions, code, bug reports and fixes, etc.
  1009. Don't forget to include which version of
  1010. .I xmris
  1011. you are using (with xmris -help),
  1012. machine, OS, X release & patch number, window manager etc.
  1013. .SH COPYRIGHT
  1014. Copyright (C) 1992 Nathan Sidwell.
  1015. .SH AUTHOR
  1016. Nathan Sidwell (nathan@inmos.co.uk)
  1017. SHAR_EOF
  1018. chmod 0644 xmris.man ||
  1019. echo 'restore of xmris.man failed'
  1020. Wc_c="`wc -c < 'xmris.man'`"
  1021. test 5444 -eq "$Wc_c" ||
  1022.     echo 'xmris.man: original size 5444, current size' "$Wc_c"
  1023. rm -f _shar_wnt_.tmp
  1024. fi
  1025. # ============= patchlevel.h ==============
  1026. if test -f 'patchlevel.h' -a X"$1" != X"-c"; then
  1027.     echo 'x - skipping patchlevel.h (File already exists)'
  1028.     rm -f _shar_wnt_.tmp
  1029. else
  1030. > _shar_wnt_.tmp
  1031. echo 'x - extracting patchlevel.h (Text)'
  1032. sed 's/^X//' << 'SHAR_EOF' > 'patchlevel.h' &&
  1033. #define XMRISVERSION "V1.01"
  1034. SHAR_EOF
  1035. chmod 0644 patchlevel.h ||
  1036. echo 'restore of patchlevel.h failed'
  1037. Wc_c="`wc -c < 'patchlevel.h'`"
  1038. test 29 -eq "$Wc_c" ||
  1039.     echo 'patchlevel.h: original size 29, current size' "$Wc_c"
  1040. rm -f _shar_wnt_.tmp
  1041. fi
  1042. # ============= xmris.h ==============
  1043. if test -f 'xmris.h' -a X"$1" != X"-c"; then
  1044.     echo 'x - skipping xmris.h (File already exists)'
  1045.     rm -f _shar_wnt_.tmp
  1046. else
  1047. > _shar_wnt_.tmp
  1048. echo 'x - extracting xmris.h (Text)'
  1049. sed 's/^X//' << 'SHAR_EOF' > 'xmris.h' &&
  1050. /*{{{  (C) 1992 Nathan Sidwell*/
  1051. /*****************************************************************************
  1052. X            X M R I S V1.01
  1053. X            ---------------
  1054. X            (C) 1992 Nathan Sidwell
  1055. X
  1056. This program is copyright (C) 1992 Nathan Sidwell. This software and documentation
  1057. is in the public domain. Permission is granted to distribute and compile
  1058. verbatim copies of this software for non-commercial, non-profit use,
  1059. without fee. The software may be modified, provided that both the above copyright
  1060. notice and this permission notice appear.
  1061. X
  1062. No guarantee is given as to the robustness or suitability of this
  1063. software for your computer.
  1064. X
  1065. Nathan Sidwell  INMOS UK |                 | nathan@inmos.co.uk       DoD#0390
  1066. *****************************************************************************/
  1067. /*}}}*/
  1068. #include "patchlevel.h"
  1069. #ifndef EXTERN
  1070. #define EXTERN extern
  1071. #endif
  1072. /*{{{  ANSI or K&R?*/
  1073. #ifdef __STDC__
  1074. #include <stdarg.h>
  1075. #define PROTOARGLIST(list) list
  1076. #define VARARG
  1077. #define FUNCVARARG ... )
  1078. #define FUNCARGLIST(list) (
  1079. #define FUNCARGSEP ,
  1080. #define FUNCARGTERM )
  1081. #define FUNCARGVOID ()
  1082. #define VARARGSET(args, last) va_start(args, last)
  1083. #else /* !__STDC__ */
  1084. #include <varargs.h>
  1085. #define PROTOARGLIST(list) ()
  1086. #define const
  1087. #define volatile
  1088. #define VARARG , va_alist
  1089. #define FUNCVARARG va_dcl
  1090. #define FUNCARGLIST(list) list
  1091. #define FUNCARGSEP  ;
  1092. #define FUNCARGTERM ;
  1093. #define FUNCARGVOID ()
  1094. #define VARARGSET(args, last) va_start(args)
  1095. #ifndef DATE
  1096. #define DATE "July 1992"
  1097. #endif /* DATE */
  1098. #define memmove memcpy /* K&R doesn't have memmove, but memcpy is a superset */
  1099. #endif /* __STDC__ */
  1100. /*}}}*/
  1101. /*{{{  include*/
  1102. #include <stddef.h>
  1103. #include <stdlib.h>
  1104. #include <stdio.h>
  1105. #include <assert.h>
  1106. #include <string.h>
  1107. #include <ctype.h>
  1108. #include <X11/Xlib.h>
  1109. #include <X11/Xutil.h>
  1110. /*}}}*/
  1111. /*{{{  defines*/
  1112. /*{{{  board sizes*/
  1113. #define CELLS_ACROSS  12  /* size of the board */
  1114. #define CELLS_DOWN    13
  1115. #define CELL_WIDTH    32  /* size of the internal cell */
  1116. #define CELL_HEIGHT   32  /* monster sprites must be this size */
  1117. #define GAP_WIDTH     4   /* spacing of the cells */
  1118. #define GAP_HEIGHT    4
  1119. #define PLAYER_START_X  ((CELLS_ACROSS - 1) >> 1)
  1120. #define PLAYER_START_Y  (CELLS_DOWN - 1)
  1121. #define DEN_X           ((CELLS_ACROSS - 1) >> 1)
  1122. #define DEN_Y           (CELLS_DOWN >> 1)
  1123. #define CELL_STRIDE   16  /* board array is bigger than the board */
  1124. #define CELL_TOP      2   /* and the board is offset by this much */
  1125. #define CELL_LEFT     2
  1126. #define KNOCK_THROUGH /* how far we go to knock through a new cell */\
  1127. X    ((CELL_WIDTH + CELL_HEIGHT + GAP_WIDTH + GAP_HEIGHT) / 3)
  1128. #define BORDER_TOP    (CELL_HEIGHT + 2) /* placing of the board */
  1129. #define BORDER_BOTTOM (CELL_HEIGHT + 2) /* on the window */
  1130. #define BORDER_LEFT   2
  1131. #define BORDER_RIGHT  2
  1132. #define FLOOD_FILL    32  /* how many branches in the distance flood fill */
  1133. #define BOARD_WIDTH   ((CELL_WIDTH + GAP_WIDTH) * CELLS_ACROSS + GAP_WIDTH)
  1134. #define BOARD_HEIGHT  ((CELL_HEIGHT + GAP_HEIGHT) * CELLS_DOWN + GAP_WIDTH)
  1135. #define WINDOW_WIDTH  (BOARD_WIDTH + BORDER_LEFT + BORDER_RIGHT)
  1136. #define WINDOW_HEIGHT (BOARD_HEIGHT + BORDER_TOP + BORDER_BOTTOM)
  1137. #define XTRA_SPACING  ((CELL_WIDTH * 4 + GAP_WIDTH * 3) / 5)
  1138. #define XTRA_X        (BORDER_LEFT + CELL_WIDTH * 4 + GAP_WIDTH * 5)
  1139. #define XTRA_Y        (BORDER_TOP - CELL_HEIGHT)
  1140. /*}}}*/
  1141. /*{{{  frame rate*/
  1142. /* these are in uS, if it is too fast, the load line
  1143. X * at the bottom will start to grow */
  1144. #ifndef FRAME_RATE
  1145. #define FRAME_RATE    37000
  1146. #endif
  1147. #define ZOOM_RATE (FRAME_RATE / 4)
  1148. /*}}}*/
  1149. /*{{{  font name*/
  1150. #ifndef FONT_NAME
  1151. #define FONT_NAME "-*-courier-*-r-*-*-18-*-*-*-*-*-*-*"
  1152. #endif
  1153. /*}}}*/
  1154. /*{{{  game gender*/
  1155. #ifndef GAME_GENDER
  1156. #define GAME_GENDER (random() & 1)
  1157. #endif
  1158. /*}}}*/
  1159. #define START_LIVES     3
  1160. /*{{{  velocities*/
  1161. #define VEL_X           GAP_WIDTH             /* how far we move per step */
  1162. #define VEL_Y           GAP_HEIGHT
  1163. #define VEL_X_FAST      (VEL_X * 5 / 4)       /* how far a fast stride is */
  1164. #define VEL_Y_FAST      (VEL_Y * 5 / 4)
  1165. #define FAST_STEPS      (CELL_WIDTH / VEL_X / 4) /* how many fast strides */
  1166. #define APPLE_VEL_Y     (VEL_Y * 3 / 2)       /* how fast the apple falls */
  1167. #define APPLE_VEL_X     (VEL_X / 2)           /* how fast it goes sideways */
  1168. #define APPLE_ACC       (VEL_Y / 2)
  1169. #define BALL_STEPS      2                     /* relative ball speed */
  1170. #define BALL_EX         (CELL_WIDTH / 2)      /* how fast we explode */
  1171. #define BALL_EY         (CELL_HEIGHT / 2)
  1172. #define ZOOM_X          VEL_X                 /* how fast the zoom is */
  1173. #define ZOOM_Y          VEL_Y
  1174. /*}}}*/
  1175. /*{{{  ball stuff*/
  1176. #define BALL_EXPLODE    (BOARD_WIDTH / BALL_EX) /* how much we explode */
  1177. #define BALL_IMPLODE_PROB 4     /* that the ball returns */
  1178. /*}}}*/
  1179. #define DIE_DELAY       10  /* ticks for death spiral */
  1180. #define SCORE_SHOW      45  /* how long on board scores show */
  1181. #define DISPLAY_HOLD    (SCORE_SHOW * 2)
  1182. #define HISTORY_SHOW    3   /* how often we show the history */
  1183. /*{{{  apple stuff*/
  1184. #define APPLE_ROCK_DELAY  8    /* ticks for it to rock */
  1185. #define APPLE_SPLIT_DELAY 8    /* ticks for split */
  1186. #define APPLE_DECAY_DELAY 8    /* ticks for decay */
  1187. #define APPLE_ROT_DELAY   8    /* ticks for rot */
  1188. #define APPLE_FALL_SPLIT  (CELL_HEIGHT + GAP_HEIGHT + APPLE_VEL_Y) /* safe fall distance */
  1189. /*}}}*/
  1190. /*{{{  den escape*/
  1191. #define DEN_ESCAPE_PROB   8     /* normal monster gets out of the den */
  1192. #define DEN_ESCAPE_DELAY  6     /* how many den flashes before escape */
  1193. #define DEN_ESCAPE_FLASH  0x8   /* time per den flash */
  1194. /*}}}*/
  1195. /*{{{  normal & muncher*/
  1196. #define GO_MUNCH_PROB     1     /* difficulty scale that normal goes munchy */
  1197. #define DIFFICULTY_PEDESTAL 2   /* offset for difficulty */
  1198. #define CONT_TOGGLE_PROB  2     /* continue flag toggle */
  1199. #define PUSH_TURN_PROB    64    /* muncher turns around when pushing */
  1200. #define GO_MUNCH_DELAY    16    /* pause when we start munching */
  1201. #define STOP_MUNCH_DELAY  16    /* pause when we stop munching */
  1202. /*}}}*/
  1203. /*{{{  xtra & drone*/
  1204. #define XTRA_INC_PROB     2     /* next xtra monster is selected */
  1205. #define XTRA_BIRTH_DELAY  ((CELL_WIDTH + GAP_WIDTH) / VEL_X + 4)    /* pause while giving birth to drones */
  1206. #define XTRA_CONT_OFF_PROB 16   /* that xtra stops continuing */
  1207. #define NEXT_XTRA_PROB    1     /* probability that the extra changes */
  1208. #define CHOMP_DELAY     (CELL_WIDTH / VEL_X * 6) /* how long to eat an apple */
  1209. /*}}}*/
  1210. #define MONSTER_CYCLES    6     /* cycle counter */
  1211. #define MONSTER_IMAGES    2     /* how many different images */
  1212. /*{{{  limits*/
  1213. #define INITIAL_APPLES  6
  1214. #define APPLES          (INITIAL_APPLES + 4)    /* max number of apples */
  1215. #define MONSTERS        ((CELLS_DOWN - 2) * 2)  /* maximum number of monsters */
  1216. #define BOARD_SCORES    4   /* number of on board displayed scores */
  1217. #define BACK_UPDATES    32  /* background updates we can cope with */
  1218. /*}}}*/
  1219. /*{{{  colour flags*/
  1220. #define COLOUR_ZERO     0   /* colour is all zeros */
  1221. #define COLOUR_ONE      1   /* colour is all ones */
  1222. #define COLOUR_WEIRD    2   /* colour is neither zeros or ones */
  1223. /*}}}*/
  1224. /*}}}*/
  1225. /*{{{  macros*/
  1226. #define PIXELX(CX, OX) \
  1227. X    ((CX) * (CELL_WIDTH + GAP_WIDTH) + (OX) + GAP_WIDTH + BORDER_LEFT)
  1228. #define PIXELY(CY, OY) \
  1229. X    ((CY) * (CELL_HEIGHT + GAP_HEIGHT) + (OY) + GAP_HEIGHT + BORDER_TOP)
  1230. #define BOARDCELL(CX, CY) \
  1231. X    (&board[(CY) * CELL_STRIDE + (CX) + CELL_LEFT + CELL_TOP * CELL_STRIDE])
  1232. /*}}}*/
  1233. /*{{{  structs*/
  1234. /*{{{  typedef struct Cell*/
  1235. typedef struct Cell
  1236. /* information about 1 cell on the board */
  1237. {
  1238. X  int     depths[4];      /* depths moved to from cell */
  1239. X  unsigned  distance;     /* distance from player */
  1240. X  unsigned  visit    : 1; /* has been visited */
  1241. X  unsigned  sprite;       /* has a sprite in it (cherry, or center stuff) */
  1242. } CELL;
  1243. /*}}}*/
  1244. /*{{{  typedef struct Coord*/
  1245. typedef struct Coord
  1246. /* general coordinate store */
  1247. {
  1248. X  int       x;
  1249. X  int       y;
  1250. } COORD;
  1251. /*}}}*/
  1252. /*{{{  typedef struct Sprite*/
  1253. typedef struct Sprite
  1254. /* sprite definition */
  1255. {
  1256. X  char *image_bits;           /* image bitmap */
  1257. X  char *mask_bits;            /* mask bitmap */
  1258. X  unsigned  width;            /* width of sprite */
  1259. X  unsigned  height;           /* height of sprite */
  1260. X  COORD     expected;         /* expected size */
  1261. X  unsigned  copy;             /* generated from this sprite */
  1262. X  unsigned  reflect;          /* reflection 1 = v axis, 2 = h axis */
  1263. X  Pixmap    image;            /* image pixmap */
  1264. X  Pixmap    mask;             /* mask pixmap */
  1265. } SPRITE;
  1266. /*}}}*/
  1267. /*{{{  typedef struct Arg*/
  1268. typedef struct Arg
  1269. /* command line argument specifier */
  1270. {
  1271. X  char const *arg;      /* arg text */
  1272. X  int       flag;       /* switch or value */
  1273. X  void      *ptr;       /* value pointer */
  1274. X  char const *help;     /* help message */
  1275. } ARG;
  1276. /*}}}*/
  1277. /*{{{  typedef struct Board*/
  1278. typedef struct Board
  1279. /* initial board information */
  1280. {
  1281. X  unsigned  fill;   /* fill pattern */
  1282. X  char      map[CELLS_DOWN][CELLS_ACROSS];
  1283. } BOARD;
  1284. /*}}}*/
  1285. /*{{{  typedef struct Background*/
  1286. typedef struct Background
  1287. /* area to update from back to copy to window */
  1288. {
  1289. X  COORD   place;  /* top left area */
  1290. X  COORD   size;   /* size of area */
  1291. } BACKGROUND;
  1292. /*}}}*/
  1293. /*{{{  typedef struct Score*/
  1294. typedef struct Score
  1295. /* on board score display */
  1296. {
  1297. X  Pixmap    mask;   /* the mask to use */
  1298. X  Pixmap    image;  /* the image to display */
  1299. X  COORD     place;  /* where to bung it */
  1300. X  unsigned  count;  /* removal countdown */
  1301. } SCORE;
  1302. /*}}}*/
  1303. /*{{{  typedef struct Ball*/
  1304. typedef struct Ball
  1305. /* the ball state */
  1306. {
  1307. X  COORD     cell;
  1308. X  COORD     offset;
  1309. X  COORD     pixel;
  1310. X  unsigned  state;  /* state of the ball
  1311. X             * 0 held by player
  1312. X             * 1 bouncing
  1313. X             * 2 exploding
  1314. X             * 3 exploded
  1315. X             * 4 imploding
  1316. X             */
  1317. X  unsigned  count;  /* count or direction or player type */
  1318. X  unsigned  image;  /* player image */
  1319. } BALL;
  1320. /*}}}*/
  1321. /*{{{  typedef struct Apple*/
  1322. typedef struct Apple
  1323. /* non-background apple information */
  1324. {
  1325. X  COORD     cell;       /* apple's cell */
  1326. X  COORD     offset;     /* offset from center */
  1327. X  COORD     pixel;      /* pixel for sprite */
  1328. X  int       push;       /* horizontal push */
  1329. X  unsigned  count;      /* general counter */
  1330. X  unsigned  state;      /* state
  1331. X             * 0 stationary
  1332. X             * 1 rock
  1333. X             * 2 falling
  1334. X             * 3 split
  1335. X             * 4 decay
  1336. X             * 5 rot
  1337. X             * 6 delete
  1338. X             */
  1339. X  unsigned  distance;     /* distance we've fallen */
  1340. X  unsigned  monsters;     /* monsters we've squashed */
  1341. X  unsigned  chewed;       /* chewed */
  1342. X  int       maypush;      /* temp push vector */
  1343. X  unsigned  waspushed;    /* was pushed the previous go */
  1344. X  struct Monster *list;   /* list of monsters for initial fall */
  1345. X  COORD     old_pixel;    /* where i was */
  1346. X  unsigned  old_state;    /* what I looked like */
  1347. } APPLE;
  1348. /*}}}*/
  1349. /*{{{  typedef struct Apple_Size*/
  1350. typedef struct Apple_Size
  1351. {
  1352. X  COORD size;
  1353. X  COORD offset;
  1354. } APPLE_SIZE;
  1355. /*}}}*/
  1356. /*{{{  typedef struct Text*/
  1357. typedef struct Text
  1358. /* how we say text sizes */
  1359. {
  1360. X  int       ascent;
  1361. X  int       descent;
  1362. X  int       width;
  1363. } TEXT;
  1364. /*}}}*/
  1365. /*{{{  typedef struct Monster*/
  1366. typedef struct Monster
  1367. /* monster information */
  1368. {
  1369. X  COORD     cell;     /* board cell we're related to */
  1370. X  COORD     offset;   /* offset from this cell */
  1371. X  COORD     pixel;    /* pixel coordinate */
  1372. X  unsigned  dir;      /* direction we're moving in */
  1373. X  unsigned  pause;    /* we're paused for one */
  1374. X  unsigned  stop;     /* we're stopped (player only) */
  1375. X  unsigned  type;     /* type
  1376. X               * 0 - normal
  1377. X               * 1 - munch
  1378. X               * 2 - xtra
  1379. X               * 3 - drone
  1380. X               * 4 - player
  1381. X               * 5 - delete
  1382. X               *>5 - demo sprite
  1383. X               */
  1384. X  unsigned  face;     /* direction we're facing
  1385. X               * 0 up left,
  1386. X               * 1 down right
  1387. X               * 2 left
  1388. X               * 3 right
  1389. X               * 4 up right
  1390. X               * 5 down left
  1391. X               * 6 push left
  1392. X               * 7 push right
  1393. X               * 8 squish left
  1394. X               * 9 squish right
  1395. X               */
  1396. X  int       push;     /* being pushed in this direction */
  1397. X  unsigned  gomunch;  /* change munch state */
  1398. X  unsigned  cont;     /* continue */
  1399. X  unsigned  chew;     /* chewing */
  1400. X  unsigned  count;    /* counter */
  1401. X  unsigned  shot;     /* has been shot */
  1402. X  unsigned  cycle;    /* image cycler */
  1403. X  unsigned  image;    /* which image to display */
  1404. X  unsigned  fast;     /* fast speed */
  1405. X  unsigned  pushing;  /* pushing apple */
  1406. X  struct Monster *list; /* list of monsters for initial apple fall */
  1407. X  APPLE     *apple;   /* which apple we're stuck to */
  1408. X  COORD     old_pixel;  /* where we were */
  1409. X  int       old_sprite; /* what we looked like */
  1410. } MONSTER;
  1411. /*}}}*/
  1412. /*}}}*/
  1413. /*{{{  display*/
  1414. EXTERN struct
  1415. {
  1416. X  char const *name;   /* display name */
  1417. X  Display   *display; /* server name stuff */
  1418. X  int       screen;   /* it's default screen */
  1419. X  Colormap  colormap; /* color map for display */
  1420. X  Window    root;     /* its root window */
  1421. X  Window    window;   /* game window */
  1422. X  int       depth;    /* bitplanes */
  1423. X  unsigned  long black; /* black pixel index */
  1424. X  unsigned  long white; /* white pixel index */
  1425. X  unsigned  long xor;   /* black xor white */
  1426. X  Atom      DEC_icon_atom; /* DEC iconizing hack */
  1427. X  unsigned  long event_mask; /* default event mask */
  1428. X  Pixmap    back;     /* background store */
  1429. X  Pixmap    copy;     /* backing store */
  1430. X  Cursor    cursor;   /* cursor to use */
  1431. X  Pixmap    icon;     /* icon to use */
  1432. X  unsigned  background; /* type of background colour */
  1433. X  unsigned  foreground; /* type of foreground colour */
  1434. } display;
  1435. /*}}}*/
  1436. /*{{{  font*/
  1437. EXTERN struct
  1438. {
  1439. X  char const *name;   /* name of font */
  1440. X  Font      font;     /* font handle */
  1441. } font;
  1442. /*}}}*/
  1443. EXTERN CELL board[(CELLS_DOWN + CELL_TOP * 2) * CELL_STRIDE];
  1444. EXTERN Pixmap ball_xor;
  1445. /*{{{  gc*/
  1446. #define GCN(n)    gcs[n]
  1447. #define GC_COPY   0   /* src */
  1448. #define GC_CLEAR  1   /* background */
  1449. #define GC_SET    2   /* foreground */
  1450. #define GC_MASK   3   /* NOT src AND dst */
  1451. #define GC_OR     4   /* src OR dst */
  1452. #define GC_BACK   5   /* background cutter */
  1453. #define GC_BALL   6   /* XOR for the ball */
  1454. #define GC_TEXT   7   /* text drawer */
  1455. #define GC_AND    8   /* and */
  1456. #define GC_BOARD  9   /* board background */
  1457. #define GCS       10
  1458. EXTERN GC gcs[GCS];
  1459. /*}}}*/
  1460. /*{{{  flags*/
  1461. EXTERN struct
  1462. {
  1463. X  unsigned  reverse;  /* reverse black & white */
  1464. X  unsigned  bw;       /* force black & white */
  1465. X  unsigned  iconic;   /* start iconic */
  1466. X  unsigned  help;     /* gimme some help */
  1467. X  unsigned  gender;   /* he or she? */
  1468. } flags;
  1469. /*}}}*/
  1470. /*{{{  player*/
  1471. SHAR_EOF
  1472. true || echo 'restore of xmris.h failed'
  1473. fi
  1474. echo 'End of  part 1'
  1475. echo 'File xmris.h is continued in part 2'
  1476. echo 2 > _shar_seq_.tmp
  1477. exit 0
  1478. -- 
  1479. ---
  1480. Senior Systems Scientist        mail: dcmartin@msi.com
  1481. Molecular Simulations, Inc.        uucp: uunet!dcmartin
  1482. 796 North Pastoria Avenue        at&t: 408/522-9236
  1483.