home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!island!argv
- From: argv@island.uu.net (Dan Heller)
- Newsgroups: comp.sources.x
- Subject: v05i011: Xchomp -- Pac-Man(tm) game for X Windows, Part02/03
- Message-ID: <1134@island.uu.net>
- Date: 13 Oct 89 19:41:03 GMT
- Organization: Island Graphics, Marin County, California
- Lines: 1532
- Approved: island!argv@sun.com
-
- Submitted-by: Jerry Shekhel <eddie.mit.edu!polygen!jerry>
- Posting-number: Volume 5, Issue 11
- Archive-name: xchomp/part02
-
-
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then feed it
- # into a shell via "sh file" or similar. To overwrite existing files,
- # type "sh file -c".
- # The tool that generated this appeared in the comp.sources.unix newsgroup;
- # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
- # If this archive is complete, you will see the following message at the end:
- # "End of archive 2 (of 3)."
- # Contents: xchomp/NOTES xchomp/README xchomp/bitmaps/demo/bigc.h
- # xchomp/bitmaps/demo/bigh.h xchomp/bitmaps/demo/bigm.h
- # xchomp/bitmaps/demo/bigo.h xchomp/bitmaps/demo/bigp.h
- # xchomp/bitmaps/demo/icon.h xchomp/bitmaps/fruit/fapple.h
- # xchomp/bitmaps/fruit/fcherry.h xchomp/bitmaps/fruit/fclock.h
- # xchomp/bitmaps/fruit/ff2.h xchomp/bitmaps/fruit/ff3.h
- # xchomp/bitmaps/fruit/ff4.h xchomp/bitmaps/fruit/ff5.h
- # xchomp/bitmaps/fruit/ff6.h xchomp/bitmaps/fruit/ff7.h
- # xchomp/bitmaps/fruit/ff8.h xchomp/bitmaps/fruit/ff9.h
- # xchomp/bitmaps/fruit/fgrape.h xchomp/bitmaps/fruit/fwater.h
- # xchomp/demo.c xchomp/maze.c xchomp/props.c xchomp/status.c
- # xchomp/xchomp.h
- # Wrapped by argv@island on Fri Oct 13 12:17:33 1989
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'xchomp/NOTES' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xchomp/NOTES'\"
- else
- echo shar: Extracting \"'xchomp/NOTES'\" \(3756 characters\)
- sed "s/^X//" >'xchomp/NOTES' <<'END_OF_FILE'
- X
- X Xchomp, Version 1.0
- X -------------------
- X
- XCOMPILING THE PROGRAM
- X
- XXchomp has been tested on the following machines:
- X
- X -- Sun 3/50, 3/75, 3/60, 386i
- X -- DEC VAXstation 2000, VAXstation 3100
- X -- Stellar
- X
- XHere is a performance chart:
- X
- XMachine Monochrome Color
- X------- ---------- -----
- X
- XSun 3/50, 3/75 --> A BIT SLOW N/A
- XSun 3/60 --> RUNS NICELY N/A
- XSun 386i N/A too slow
- X
- XVAXstation 2000 too slow too slow
- XVAXstation 3100 --> SCREAMS! --> SCREAMS!
- X
- XStellar N/A --> SCREAMS!
- X
- X
- XThe program can be compiled in two ways -- the normal way, which
- Xresults in the program running at maximum speed, which is way too
- Xfast on systems like the Stellar and the VAXstation 3100, but just
- Xright for the Sun 3/60. The other way is to add "-DFRAME_DELAY=xxxxx"
- Xto the CFLAGS in the Makefile. This causes a delay of the specified
- Xnumber of microseconds between each frame of motion. This delay should
- Xbe 20,000 microseconds or under. Adding "-DFRAME_DELAY=20000" works
- Xbeautifully for the VAXstation 3100 and the Stellar.
- X
- XIf you're porting xchomp to another machine, I suggest you compile it
- Xwithout the "-DFRAME_DELAY=xxxxx", and if the result is too fast, then
- Xtry several values for the delay.
- X
- XRUNNING THE PROGRAM
- X
- XFirst off, let me just state that this program is to be run with ALL
- XOTHER PROCESSES ASLEEP! Even so, on my 3/60, there are times when
- Xthe animation gets choppy and uneven for a while. This is probably
- Xdue to some background process waking up and doing something. Don't
- Xexpect perfectly smooth motion under the X Window System, and don't
- Xeven try to play the game while compiling something in the background.
- XAnd if you're a perfectionist, then get rid of the second hand on your
- Xxclock! I'm serious.
- X
- XIf you're using a window manager such as TWM, in which the input focus
- Xbelongs to the window containing the pointer, there's something to consider.
- XOn monochrome Suns, it's best to force the focus on the xchomp window and
- Xget the pointer out of there before playing the game. This is because if
- Xthe pointer is in the middle of the window, it'll blink during each motion
- Xcycle and cut the performance in half. Another solution is to place the
- Xpointer at the VERY BOTTOM of the window, below the little icons representing
- Xthe number of lives left. If you iconify xchomp, and bring it back, it comes
- Xback in a paused state, so you can place the pointer back at the bottom of
- Xthe window before you continue. This whole thing doesn't seem to be a
- Xproblem on monochrome VAXstations and color systems. I'll try to find
- Xa better solution for the next posting.
- X
- XNOTES TO PROGRAMMERS
- X
- XXchomp uses pure Xlib, without toolkits, widgets, etc. This is mainly
- Xbecause I don't know anything about toolkits, widgets, etc. In fact,
- Xthis program started out as an experiment in X Window System programming;
- XI didn't know anything about that either. While making this game, I always
- Xhad an open copy of the Xlib Reference Manual and the Xlib Programming Manual
- Xat my side.
- X
- XIf you're going to be reading or modifying my code, I must apologize for
- Xsome of the 1- and 2-letter global variable names. This whole thing started
- Xas a tiny program which bounced circles around in a window. I wasn't too
- Xcareful with the variable names, but otherwise the code should be fairly
- Xclear. Sorry about the goto's in main().
- X
- X---
- X+--------------------+-----------------------+-------------------------------+
- X| | Polygen Corporation | UUCP: |
- X| Jerry J. Shekhel | Waltham, MA 02254 | {princeton, mit-eddie, |
- X| | (617) 890-2888 | buita, sunne}!polygen!jerry |
- X+--------------------+-----------------------+-------------------------------+
- END_OF_FILE
- if test 3756 -ne `wc -c <'xchomp/NOTES'`; then
- echo shar: \"'xchomp/NOTES'\" unpacked with wrong size!
- fi
- # end of 'xchomp/NOTES'
- fi
- if test -f 'xchomp/README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xchomp/README'\"
- else
- echo shar: Extracting \"'xchomp/README'\" \(4647 characters\)
- sed "s/^X//" >'xchomp/README' <<'END_OF_FILE'
- X
- X Xchomp, Version 1.0
- X -------------------
- X
- XINTRODUCTION
- X
- XHello, and welcome to xchomp. Xchomp is a game closely patterned after
- XPac-Man(tm) that runs under the X window system. I've tried to make the
- Xgame as close as possible to the original Pac-Man. However, I have not
- Xseen a Pac-Man arcade machine for years, so all the elements of the game
- Xhave been recalled from memory. Also, I've added something which I
- Xalways felt was missing from Pac-Man, namely several different mazes.
- X
- XINSTRUCTIONS FOR PLAYING
- X
- XThe point of this game, as in all arcade-style games, is to amass the
- Xhighest possible score. However, some may find that the fun in the game
- Xis in trying to reach the highest possible level. At least, that's what
- XI thought was fun about the original. You, the player, are the circular
- Xmouth moving around the maze. Your opponents are the four ghosts following
- Xyou around. Touching a ghost will cost you a life. When you start each
- Xlevel, the maze is filled with dots. Eating these dots (by simply going
- Xover them), gives you 10 points for each. You must eat all the dots on a
- Xmaze to advance to the next level.
- X
- XOn each maze, you will also find several large flashing dots; these are
- Xthe power-dots. Eating one of these will add 50 points to your score,
- Xand temporarily give you the ability to eat the ghosts. While the ghosts
- Xcan be eaten, they are white (transparent), they move at a reduced speed,
- Xand they try to run away from you. When they turn back to a solid color,
- Xthey are back to their normal state, and they return to following you
- Xaround. They won't become solid suddenly; they will flash for a couple
- Xof seconds to warn you. While they're flashing, you can still eat them.
- X
- XEating a ghost adds points to your score, and the number of points is
- Xmomentarily displayed on the screen. This action turns the ghost into
- Xa harmless pair of eyes. In this state, the ghost moves very quickly,
- Xseeking return to the ghost box in the center of the maze. Once it gets
- Xthere, it is "reborn", and goes back to chasing you around the maze.
- X
- XThe levels of the game are designated by symbols. The first few levels
- Xare "fruit" levels, that is, they are designated by little pictures of
- Xfruit on the bottom of the xchomp window. For example, the first level
- Xis the "cherry" level. Once in a while (twice on every level), the
- Xsymbol corresponding to the current level appears in the maze. It will
- Xstay there only for a few seconds; eating it adds a number of points to
- Xyour score. At the higher levels, this is a very significant number.
- XIn any case, when you eat a fruit, or other such symbol, the corresponding
- Xpoint value is briefly displayed on the screen.
- X
- XReaching a score of 10,000 awards you an extra life.
- X
- XGAME CONTROLS
- X
- XThis is strictly a keyboard-controlled game. The arcade game had very
- Xsimple controls -- one four-directional joystick. In xchomp, all control
- Xis through the arrow keys. Hitting an arrow key in xchomp is equivalent
- Xto pushing the joystick in the corresponding direction and holding it down;
- Xthe player on the screen will continue moving in its current direction
- Xuntil motion in the specified direction is possible, in which case it will
- Xswitch to that direction, or until it hits a wall, in which case it will
- Xstop and wait for a key press corresponding to a valid direction. If this
- Xsounds complex, forget it, and just play the game. I believe you'll find
- Xthe controls pretty natural. It can be thought of like this: the player
- Xon the screen will always try to move in the direction of the last key
- Xpressed, and if it can't, it'll keep moving in the direction it's moving
- Xuntil it can. Only one key press is remembered -- the last one. Don't
- Xhold down the keys; just hit them; otherwise, there may be times when
- Xyou're pressing two keys at a time and the second one won't register.
- X
- XThe game can be paused by pressing the space bar or by iconifying the xchomp
- Xwindow (the latter definitely works on Sun and DECwindows servers). While
- Xthe game is paused, you can abort it by pressing 'R'. This will return
- Xyou to the title screen. Pressing 'Q' will cause xchomp to terminate. If
- Xyou iconify the xchomp window, the game will be in the paused state when
- Xyou de-iconify it.
- X
- X---
- X+--------------------+-----------------------+-------------------------------+
- X| | Polygen Corporation | UUCP: |
- X| Jerry J. Shekhel | Waltham, MA 02254 | {princeton, mit-eddie, |
- X| | (617) 890-2888 | buita, sunne}!polygen!jerry |
- X+--------------------+-----------------------+-------------------------------+
- END_OF_FILE
- if test 4647 -ne `wc -c <'xchomp/README'`; then
- echo shar: \"'xchomp/README'\" unpacked with wrong size!
- fi
- # end of 'xchomp/README'
- fi
- if test -f 'xchomp/bitmaps/demo/bigc.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xchomp/bitmaps/demo/bigc.h'\"
- else
- echo shar: Extracting \"'xchomp/bitmaps/demo/bigc.h'\" \(1918 characters\)
- sed "s/^X//" >'xchomp/bitmaps/demo/bigc.h' <<'END_OF_FILE'
- X#define bigc_width 48
- X#define bigc_height 48
- X#define bigc_x_hot -1
- X#define bigc_y_hot -1
- Xstatic char bigc_bits[] = {
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00,
- X 0x00, 0xc0, 0xff, 0xff, 0x07, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x1f, 0x00,
- X 0x00, 0xf8, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x7f, 0x00,
- X 0x00, 0xfe, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0x7f, 0x00,
- X 0x80, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x1f, 0x00,
- X 0xe0, 0xff, 0xff, 0xff, 0x0f, 0x00, 0xe0, 0xff, 0xff, 0xff, 0x07, 0x00,
- X 0xf0, 0xff, 0xff, 0xff, 0x03, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x01, 0x00,
- X 0xf8, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x7f, 0x00, 0x00,
- X 0xf8, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x1f, 0x00, 0x00,
- X 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x07, 0x00, 0x00,
- X 0xfc, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x01, 0x00, 0x00,
- X 0xfc, 0xff, 0xff, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x01, 0x00, 0x00,
- X 0xfc, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x07, 0x00, 0x00,
- X 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x1f, 0x00, 0x00,
- X 0xf8, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x7f, 0x00, 0x00,
- X 0xf8, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x01, 0x00,
- X 0xf0, 0xff, 0xff, 0xff, 0x03, 0x00, 0xe0, 0xff, 0xff, 0xff, 0x07, 0x00,
- X 0xe0, 0xff, 0xff, 0xff, 0x0f, 0x00, 0xc0, 0xdf, 0xff, 0xff, 0x1f, 0x00,
- X 0x80, 0x9f, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x3f, 0xff, 0xff, 0x7f, 0x00,
- X 0x00, 0x7e, 0xfc, 0xff, 0xff, 0x00, 0x00, 0xfc, 0xe1, 0xff, 0x7f, 0x00,
- X 0x00, 0xf8, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x1f, 0x00,
- X 0x00, 0xc0, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00,
- X 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 1918 -ne `wc -c <'xchomp/bitmaps/demo/bigc.h'`; then
- echo shar: \"'xchomp/bitmaps/demo/bigc.h'\" unpacked with wrong size!
- fi
- # end of 'xchomp/bitmaps/demo/bigc.h'
- fi
- if test -f 'xchomp/bitmaps/demo/bigh.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xchomp/bitmaps/demo/bigh.h'\"
- else
- echo shar: Extracting \"'xchomp/bitmaps/demo/bigh.h'\" \(1918 characters\)
- sed "s/^X//" >'xchomp/bitmaps/demo/bigh.h' <<'END_OF_FILE'
- X#define bigh_width 48
- X#define bigh_height 48
- X#define bigh_x_hot -1
- X#define bigh_y_hot -1
- Xstatic char bigh_bits[] = {
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xe0, 0x07, 0x00, 0x00, 0xc0, 0x0f, 0xf8, 0x1f, 0x00, 0x00, 0xf0, 0x3f,
- X 0xf8, 0x1f, 0x00, 0x00, 0xf0, 0x3f, 0xfc, 0x3f, 0x00, 0x00, 0xf8, 0x7f,
- X 0xfc, 0x3f, 0x00, 0x00, 0xf8, 0x7f, 0xfc, 0x3f, 0x00, 0x00, 0xf8, 0x7f,
- X 0xfc, 0x3f, 0x00, 0x00, 0xf8, 0x7f, 0xfc, 0x3f, 0x00, 0x00, 0xf8, 0x7f,
- X 0xfc, 0x3f, 0x00, 0x00, 0xf8, 0x7f, 0xfc, 0x3f, 0x00, 0x00, 0xf8, 0x7f,
- X 0xfc, 0x3f, 0x00, 0x00, 0xf8, 0x7f, 0xfc, 0x3f, 0x00, 0x00, 0xf8, 0x7f,
- X 0xfc, 0x3f, 0x00, 0x00, 0xf8, 0x7f, 0xfc, 0x7f, 0x00, 0x00, 0xfc, 0x7f,
- X 0xfc, 0x7f, 0x00, 0x00, 0xfc, 0x7f, 0xfc, 0xfd, 0x01, 0x00, 0xff, 0x7f,
- X 0xfc, 0xfd, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xf9, 0xff, 0xff, 0xff, 0x7f,
- X 0xfc, 0xfb, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xf3, 0xff, 0xff, 0xff, 0x7f,
- X 0xfc, 0xc7, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0x1f, 0xfc, 0xff, 0xff, 0x7f,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f,
- X 0xf8, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x3f,
- X 0xe0, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 1918 -ne `wc -c <'xchomp/bitmaps/demo/bigh.h'`; then
- echo shar: \"'xchomp/bitmaps/demo/bigh.h'\" unpacked with wrong size!
- fi
- # end of 'xchomp/bitmaps/demo/bigh.h'
- fi
- if test -f 'xchomp/bitmaps/demo/bigm.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xchomp/bitmaps/demo/bigm.h'\"
- else
- echo shar: Extracting \"'xchomp/bitmaps/demo/bigm.h'\" \(1918 characters\)
- sed "s/^X//" >'xchomp/bitmaps/demo/bigm.h' <<'END_OF_FILE'
- X#define bigm_width 48
- X#define bigm_height 48
- X#define bigm_x_hot -1
- X#define bigm_y_hot -1
- Xstatic char bigm_bits[] = {
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x04, 0x00, 0x00, 0x00, 0x00, 0x40, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x60,
- X 0x1c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x78,
- X 0x7c, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x7e,
- X 0xfc, 0x01, 0x00, 0x00, 0x00, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x80, 0x7f,
- X 0xfc, 0x07, 0x00, 0x00, 0xc0, 0x7f, 0xfc, 0x0f, 0x00, 0x00, 0xe0, 0x7f,
- X 0xfc, 0x1f, 0x00, 0x00, 0xf0, 0x7f, 0xfc, 0x3f, 0x00, 0x00, 0xf8, 0x7f,
- X 0xfc, 0x7f, 0x00, 0x00, 0xfc, 0x7f, 0xfc, 0xff, 0x00, 0x00, 0xfe, 0x7f,
- X 0xfc, 0xff, 0x01, 0x00, 0xff, 0x7f, 0xfc, 0xff, 0x03, 0x80, 0xff, 0x7f,
- X 0xfc, 0xff, 0x07, 0xc0, 0xff, 0x7f, 0xfc, 0xff, 0x0f, 0xe0, 0xff, 0x7f,
- X 0xfc, 0xff, 0x1f, 0xf0, 0xff, 0x7f, 0xfc, 0x7f, 0x3f, 0xf8, 0xff, 0x7f,
- X 0xfc, 0x7f, 0x7e, 0xfc, 0xff, 0x7f, 0xfc, 0xff, 0xfc, 0xfe, 0xff, 0x7f,
- X 0xfc, 0xff, 0xf9, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xf3, 0xff, 0xff, 0x7f,
- X 0xfc, 0xff, 0xe7, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xcf, 0xff, 0xff, 0x7f,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f,
- X 0xf8, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x3f,
- X 0xe0, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 1918 -ne `wc -c <'xchomp/bitmaps/demo/bigm.h'`; then
- echo shar: \"'xchomp/bitmaps/demo/bigm.h'\" unpacked with wrong size!
- fi
- # end of 'xchomp/bitmaps/demo/bigm.h'
- fi
- if test -f 'xchomp/bitmaps/demo/bigo.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xchomp/bitmaps/demo/bigo.h'\"
- else
- echo shar: Extracting \"'xchomp/bitmaps/demo/bigo.h'\" \(1918 characters\)
- sed "s/^X//" >'xchomp/bitmaps/demo/bigo.h' <<'END_OF_FILE'
- X#define bigo_width 48
- X#define bigo_height 48
- X#define bigo_x_hot -1
- X#define bigo_y_hot -1
- Xstatic char bigo_bits[] = {
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00,
- X 0x00, 0xc0, 0xff, 0xff, 0x07, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x1f, 0x00,
- X 0x00, 0xf8, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x7f, 0x00,
- X 0x00, 0xfe, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01,
- X 0x80, 0xff, 0xff, 0xff, 0xff, 0x03, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x07,
- X 0xe0, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x0f,
- X 0xf0, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x1f,
- X 0xf8, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x3f,
- X 0xf8, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x3f,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x3f,
- X 0xf8, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x3f,
- X 0xf8, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x1f,
- X 0xf0, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x0f,
- X 0xe0, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xc0, 0xdf, 0xff, 0xff, 0xff, 0x07,
- X 0x80, 0x9f, 0xff, 0xff, 0xff, 0x03, 0x00, 0x3f, 0xff, 0xff, 0xff, 0x01,
- X 0x00, 0x7e, 0xfc, 0xff, 0xff, 0x00, 0x00, 0xfc, 0xe1, 0xff, 0x7f, 0x00,
- X 0x00, 0xf8, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x1f, 0x00,
- X 0x00, 0xc0, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00,
- X 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 1918 -ne `wc -c <'xchomp/bitmaps/demo/bigo.h'`; then
- echo shar: \"'xchomp/bitmaps/demo/bigo.h'\" unpacked with wrong size!
- fi
- # end of 'xchomp/bitmaps/demo/bigo.h'
- fi
- if test -f 'xchomp/bitmaps/demo/bigp.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xchomp/bitmaps/demo/bigp.h'\"
- else
- echo shar: Extracting \"'xchomp/bitmaps/demo/bigp.h'\" \(1918 characters\)
- sed "s/^X//" >'xchomp/bitmaps/demo/bigp.h' <<'END_OF_FILE'
- X#define bigp_width 48
- X#define bigp_height 48
- X#define bigp_x_hot -1
- X#define bigp_y_hot -1
- Xstatic char bigp_bits[] = {
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xe0, 0xff, 0xff, 0x1f, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0x00, 0x00,
- X 0xf8, 0xff, 0xff, 0xff, 0x03, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x07, 0x00,
- X 0xfc, 0xff, 0xff, 0xff, 0x1f, 0x00, 0xfc, 0xff, 0xff, 0xf8, 0x3f, 0x00,
- X 0xfc, 0xff, 0xff, 0xe3, 0x7f, 0x00, 0xfc, 0xff, 0xff, 0xcf, 0x7f, 0x00,
- X 0xfc, 0xff, 0xff, 0x9f, 0xff, 0x00, 0xfc, 0xff, 0xff, 0x3f, 0xff, 0x01,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x03,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x03, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x03,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x07, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x07,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x07, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x07,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x07, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x07,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x07, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x07,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x07, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x03,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x03, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x03,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x01,
- X 0xfc, 0xff, 0xff, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x7f, 0x00,
- X 0xfc, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x3f, 0x00,
- X 0xfc, 0xff, 0xff, 0xff, 0x1f, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x07, 0x00,
- X 0xfc, 0xff, 0xff, 0xff, 0x03, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x00, 0x00,
- X 0xfc, 0xff, 0xff, 0x1f, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x01, 0x00, 0x00,
- X 0xfc, 0xff, 0xff, 0x01, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x01, 0x00, 0x00,
- X 0xfc, 0xff, 0xff, 0x01, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x01, 0x00, 0x00,
- X 0xf8, 0xff, 0xff, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x00, 0x00, 0x00,
- X 0xe0, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 1918 -ne `wc -c <'xchomp/bitmaps/demo/bigp.h'`; then
- echo shar: \"'xchomp/bitmaps/demo/bigp.h'\" unpacked with wrong size!
- fi
- # end of 'xchomp/bitmaps/demo/bigp.h'
- fi
- if test -f 'xchomp/bitmaps/demo/icon.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xchomp/bitmaps/demo/icon.h'\"
- else
- echo shar: Extracting \"'xchomp/bitmaps/demo/icon.h'\" \(919 characters\)
- sed "s/^X//" >'xchomp/bitmaps/demo/icon.h' <<'END_OF_FILE'
- X#define icon_width 32
- X#define icon_height 32
- X#define icon_x_hot -1
- X#define icon_y_hot -1
- Xstatic char icon_bits[] = {
- X 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x7f, 0x02, 0x00, 0x00, 0x40,
- X 0xfa, 0xff, 0xff, 0x5f, 0xfa, 0xff, 0xff, 0x5f, 0x7a, 0xff, 0xff, 0x5f,
- X 0x3a, 0xfe, 0xff, 0x5f, 0x7a, 0xff, 0xff, 0x5f, 0xfa, 0xff, 0xff, 0x5f,
- X 0xfa, 0xff, 0xff, 0x5f, 0x7a, 0xff, 0xff, 0x5f, 0x3a, 0xfe, 0x83, 0x5f,
- X 0x7a, 0xff, 0x00, 0x5e, 0xfa, 0xff, 0x01, 0x5c, 0xfa, 0xff, 0x03, 0x58,
- X 0x3a, 0xfe, 0x07, 0x58, 0x1a, 0xfc, 0x0f, 0x50, 0x0a, 0xb8, 0x1f, 0x50,
- X 0x0a, 0x18, 0x3f, 0x50, 0x0a, 0xb8, 0x1f, 0x50, 0x1a, 0xfc, 0x0f, 0x50,
- X 0x3a, 0xfe, 0x07, 0x58, 0xfa, 0xff, 0x03, 0x58, 0xfa, 0xff, 0x01, 0x5c,
- X 0xfa, 0xff, 0x00, 0x5e, 0xfa, 0xff, 0x83, 0x5f, 0xfa, 0xff, 0xff, 0x5f,
- X 0xfa, 0xff, 0xff, 0x5f, 0xfa, 0xff, 0xff, 0x5f, 0x02, 0x00, 0x00, 0x40,
- X 0xfe, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 919 -ne `wc -c <'xchomp/bitmaps/demo/icon.h'`; then
- echo shar: \"'xchomp/bitmaps/demo/icon.h'\" unpacked with wrong size!
- fi
- # end of 'xchomp/bitmaps/demo/icon.h'
- fi
- if test -f 'xchomp/bitmaps/fruit/fapple.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xchomp/bitmaps/fruit/fapple.h'\"
- else
- echo shar: Extracting \"'xchomp/bitmaps/fruit/fapple.h'\" \(329 characters\)
- sed "s/^X//" >'xchomp/bitmaps/fruit/fapple.h' <<'END_OF_FILE'
- X#define fapple_width 16
- X#define fapple_height 16
- X#define fapple_x_hot -1
- X#define fapple_y_hot -1
- Xstatic char fapple_bits[] = {
- X 0x00, 0x01, 0x98, 0x18, 0xfc, 0x3e, 0xfc, 0x3f, 0xee, 0x7f, 0xc6, 0x7f,
- X 0xee, 0x7f, 0xfe, 0x7f, 0xfe, 0x7f, 0xfe, 0x7f, 0xfe, 0x7f, 0xfc, 0x3f,
- X 0xfc, 0x3f, 0xfc, 0x3f, 0xf8, 0x1f, 0x70, 0x0e};
- END_OF_FILE
- if test 329 -ne `wc -c <'xchomp/bitmaps/fruit/fapple.h'`; then
- echo shar: \"'xchomp/bitmaps/fruit/fapple.h'\" unpacked with wrong size!
- fi
- # end of 'xchomp/bitmaps/fruit/fapple.h'
- fi
- if test -f 'xchomp/bitmaps/fruit/fcherry.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xchomp/bitmaps/fruit/fcherry.h'\"
- else
- echo shar: Extracting \"'xchomp/bitmaps/fruit/fcherry.h'\" \(334 characters\)
- sed "s/^X//" >'xchomp/bitmaps/fruit/fcherry.h' <<'END_OF_FILE'
- X#define fcherry_width 16
- X#define fcherry_height 16
- X#define fcherry_x_hot -1
- X#define fcherry_y_hot -1
- Xstatic char fcherry_bits[] = {
- X 0x80, 0x01, 0x80, 0x03, 0x00, 0x03, 0x00, 0x06, 0x00, 0x04, 0x00, 0x08,
- X 0x00, 0x0c, 0x3c, 0x0b, 0xf2, 0x08, 0x1a, 0x08, 0xce, 0x0b, 0x2e, 0x07,
- X 0xac, 0x07, 0xe0, 0x07, 0xe0, 0x07, 0xc0, 0x03};
- END_OF_FILE
- if test 334 -ne `wc -c <'xchomp/bitmaps/fruit/fcherry.h'`; then
- echo shar: \"'xchomp/bitmaps/fruit/fcherry.h'\" unpacked with wrong size!
- fi
- # end of 'xchomp/bitmaps/fruit/fcherry.h'
- fi
- if test -f 'xchomp/bitmaps/fruit/fclock.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xchomp/bitmaps/fruit/fclock.h'\"
- else
- echo shar: Extracting \"'xchomp/bitmaps/fruit/fclock.h'\" \(329 characters\)
- sed "s/^X//" >'xchomp/bitmaps/fruit/fclock.h' <<'END_OF_FILE'
- X#define fclock_width 16
- X#define fclock_height 16
- X#define fclock_x_hot -1
- X#define fclock_y_hot -1
- Xstatic char fclock_bits[] = {
- X 0x00, 0x00, 0xc0, 0x07, 0x70, 0x1d, 0x18, 0x31, 0x2c, 0x68, 0x04, 0x41,
- X 0x0e, 0xe1, 0x02, 0x81, 0x0e, 0xe1, 0x02, 0x82, 0x0e, 0xe4, 0x04, 0x40,
- X 0x2c, 0x68, 0x18, 0x31, 0x70, 0x1d, 0xc0, 0x07};
- END_OF_FILE
- if test 329 -ne `wc -c <'xchomp/bitmaps/fruit/fclock.h'`; then
- echo shar: \"'xchomp/bitmaps/fruit/fclock.h'\" unpacked with wrong size!
- fi
- # end of 'xchomp/bitmaps/fruit/fclock.h'
- fi
- if test -f 'xchomp/bitmaps/fruit/ff2.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xchomp/bitmaps/fruit/ff2.h'\"
- else
- echo shar: Extracting \"'xchomp/bitmaps/fruit/ff2.h'\" \(413 characters\)
- sed "s/^X//" >'xchomp/bitmaps/fruit/ff2.h' <<'END_OF_FILE'
- X#define ff2_width 20
- X#define ff2_height 16
- X#define ff2_x_hot -1
- X#define ff2_y_hot -1
- Xstatic char ff2_bits[] = {
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xc6, 0x00,
- X 0x48, 0x29, 0x01, 0x40, 0x29, 0x01, 0x40, 0x29, 0x01, 0x20, 0x29, 0x01,
- X 0x10, 0x29, 0x01, 0x08, 0x29, 0x01, 0x08, 0x29, 0x01, 0x78, 0xc6, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 413 -ne `wc -c <'xchomp/bitmaps/fruit/ff2.h'`; then
- echo shar: \"'xchomp/bitmaps/fruit/ff2.h'\" unpacked with wrong size!
- fi
- # end of 'xchomp/bitmaps/fruit/ff2.h'
- fi
- if test -f 'xchomp/bitmaps/fruit/ff3.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xchomp/bitmaps/fruit/ff3.h'\"
- else
- echo shar: Extracting \"'xchomp/bitmaps/fruit/ff3.h'\" \(413 characters\)
- sed "s/^X//" >'xchomp/bitmaps/fruit/ff3.h' <<'END_OF_FILE'
- X#define ff3_width 20
- X#define ff3_height 16
- X#define ff3_x_hot -1
- X#define ff3_y_hot -1
- Xstatic char ff3_bits[] = {
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xc6, 0x00,
- X 0x48, 0x29, 0x01, 0x40, 0x29, 0x01, 0x40, 0x29, 0x01, 0x20, 0x29, 0x01,
- X 0x40, 0x29, 0x01, 0x40, 0x29, 0x01, 0x48, 0x29, 0x01, 0x30, 0xc6, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 413 -ne `wc -c <'xchomp/bitmaps/fruit/ff3.h'`; then
- echo shar: \"'xchomp/bitmaps/fruit/ff3.h'\" unpacked with wrong size!
- fi
- # end of 'xchomp/bitmaps/fruit/ff3.h'
- fi
- if test -f 'xchomp/bitmaps/fruit/ff4.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xchomp/bitmaps/fruit/ff4.h'\"
- else
- echo shar: Extracting \"'xchomp/bitmaps/fruit/ff4.h'\" \(413 characters\)
- sed "s/^X//" >'xchomp/bitmaps/fruit/ff4.h' <<'END_OF_FILE'
- X#define ff4_width 20
- X#define ff4_height 16
- X#define ff4_x_hot -1
- X#define ff4_y_hot -1
- Xstatic char ff4_bits[] = {
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xc6, 0x00,
- X 0x08, 0x29, 0x01, 0x08, 0x29, 0x01, 0x38, 0x29, 0x01, 0x40, 0x29, 0x01,
- X 0x40, 0x29, 0x01, 0x40, 0x29, 0x01, 0x48, 0x29, 0x01, 0x30, 0xc6, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 413 -ne `wc -c <'xchomp/bitmaps/fruit/ff4.h'`; then
- echo shar: \"'xchomp/bitmaps/fruit/ff4.h'\" unpacked with wrong size!
- fi
- # end of 'xchomp/bitmaps/fruit/ff4.h'
- fi
- if test -f 'xchomp/bitmaps/fruit/ff5.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xchomp/bitmaps/fruit/ff5.h'\"
- else
- echo shar: Extracting \"'xchomp/bitmaps/fruit/ff5.h'\" \(413 characters\)
- sed "s/^X//" >'xchomp/bitmaps/fruit/ff5.h' <<'END_OF_FILE'
- X#define ff5_width 20
- X#define ff5_height 16
- X#define ff5_x_hot -1
- X#define ff5_y_hot -1
- Xstatic char ff5_bits[] = {
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xc6, 0x00,
- X 0x40, 0x29, 0x01, 0x40, 0x29, 0x01, 0x40, 0x29, 0x01, 0x20, 0x29, 0x01,
- X 0x20, 0x29, 0x01, 0x10, 0x29, 0x01, 0x10, 0x29, 0x01, 0x10, 0xc6, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 413 -ne `wc -c <'xchomp/bitmaps/fruit/ff5.h'`; then
- echo shar: \"'xchomp/bitmaps/fruit/ff5.h'\" unpacked with wrong size!
- fi
- # end of 'xchomp/bitmaps/fruit/ff5.h'
- fi
- if test -f 'xchomp/bitmaps/fruit/ff6.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xchomp/bitmaps/fruit/ff6.h'\"
- else
- echo shar: Extracting \"'xchomp/bitmaps/fruit/ff6.h'\" \(413 characters\)
- sed "s/^X//" >'xchomp/bitmaps/fruit/ff6.h' <<'END_OF_FILE'
- X#define ff6_width 20
- X#define ff6_height 16
- X#define ff6_x_hot -1
- X#define ff6_y_hot -1
- Xstatic char ff6_bits[] = {
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x8c, 0x01,
- X 0x94, 0x52, 0x02, 0x94, 0x52, 0x02, 0x94, 0x52, 0x02, 0x94, 0x52, 0x02,
- X 0x94, 0x52, 0x02, 0x94, 0x52, 0x02, 0x94, 0x52, 0x02, 0x64, 0x8c, 0x01,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 413 -ne `wc -c <'xchomp/bitmaps/fruit/ff6.h'`; then
- echo shar: \"'xchomp/bitmaps/fruit/ff6.h'\" unpacked with wrong size!
- fi
- # end of 'xchomp/bitmaps/fruit/ff6.h'
- fi
- if test -f 'xchomp/bitmaps/fruit/ff7.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xchomp/bitmaps/fruit/ff7.h'\"
- else
- echo shar: Extracting \"'xchomp/bitmaps/fruit/ff7.h'\" \(413 characters\)
- sed "s/^X//" >'xchomp/bitmaps/fruit/ff7.h' <<'END_OF_FILE'
- X#define ff7_width 20
- X#define ff7_height 16
- X#define ff7_x_hot -1
- X#define ff7_y_hot -1
- Xstatic char ff7_bits[] = {
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8c, 0x31, 0x06,
- X 0x52, 0x4a, 0x09, 0x50, 0x4a, 0x09, 0x50, 0x4a, 0x09, 0x48, 0x4a, 0x09,
- X 0x44, 0x4a, 0x09, 0x42, 0x4a, 0x09, 0x42, 0x4a, 0x09, 0x9e, 0x31, 0x06,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 413 -ne `wc -c <'xchomp/bitmaps/fruit/ff7.h'`; then
- echo shar: \"'xchomp/bitmaps/fruit/ff7.h'\" unpacked with wrong size!
- fi
- # end of 'xchomp/bitmaps/fruit/ff7.h'
- fi
- if test -f 'xchomp/bitmaps/fruit/ff8.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xchomp/bitmaps/fruit/ff8.h'\"
- else
- echo shar: Extracting \"'xchomp/bitmaps/fruit/ff8.h'\" \(413 characters\)
- sed "s/^X//" >'xchomp/bitmaps/fruit/ff8.h' <<'END_OF_FILE'
- X#define ff8_width 20
- X#define ff8_height 16
- X#define ff8_x_hot -1
- X#define ff8_y_hot -1
- Xstatic char ff8_bits[] = {
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8c, 0x31, 0x06,
- X 0x52, 0x4a, 0x09, 0x50, 0x4a, 0x09, 0x50, 0x4a, 0x09, 0x48, 0x4a, 0x09,
- X 0x50, 0x4a, 0x09, 0x50, 0x4a, 0x09, 0x52, 0x4a, 0x09, 0x8c, 0x31, 0x06,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 413 -ne `wc -c <'xchomp/bitmaps/fruit/ff8.h'`; then
- echo shar: \"'xchomp/bitmaps/fruit/ff8.h'\" unpacked with wrong size!
- fi
- # end of 'xchomp/bitmaps/fruit/ff8.h'
- fi
- if test -f 'xchomp/bitmaps/fruit/ff9.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xchomp/bitmaps/fruit/ff9.h'\"
- else
- echo shar: Extracting \"'xchomp/bitmaps/fruit/ff9.h'\" \(413 characters\)
- sed "s/^X//" >'xchomp/bitmaps/fruit/ff9.h' <<'END_OF_FILE'
- X#define ff9_width 20
- X#define ff9_height 16
- X#define ff9_x_hot -1
- X#define ff9_y_hot -1
- Xstatic char ff9_bits[] = {
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x31, 0x06,
- X 0x42, 0x4a, 0x09, 0x42, 0x4a, 0x09, 0x4e, 0x4a, 0x09, 0x50, 0x4a, 0x09,
- X 0x50, 0x4a, 0x09, 0x50, 0x4a, 0x09, 0x52, 0x4a, 0x09, 0x8c, 0x31, 0x06,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 413 -ne `wc -c <'xchomp/bitmaps/fruit/ff9.h'`; then
- echo shar: \"'xchomp/bitmaps/fruit/ff9.h'\" unpacked with wrong size!
- fi
- # end of 'xchomp/bitmaps/fruit/ff9.h'
- fi
- if test -f 'xchomp/bitmaps/fruit/fgrape.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xchomp/bitmaps/fruit/fgrape.h'\"
- else
- echo shar: Extracting \"'xchomp/bitmaps/fruit/fgrape.h'\" \(329 characters\)
- sed "s/^X//" >'xchomp/bitmaps/fruit/fgrape.h' <<'END_OF_FILE'
- X#define fgrape_width 16
- X#define fgrape_height 16
- X#define fgrape_x_hot -1
- X#define fgrape_y_hot -1
- Xstatic char fgrape_bits[] = {
- X 0x00, 0x10, 0x80, 0x11, 0xc0, 0x16, 0xd8, 0x0b, 0xac, 0x15, 0x7c, 0x26,
- X 0x98, 0x2b, 0x60, 0x1f, 0xb0, 0x36, 0xf0, 0x59, 0x60, 0x7b, 0xa0, 0x35,
- X 0xf0, 0x07, 0x58, 0x03, 0x78, 0x00, 0x30, 0x00};
- END_OF_FILE
- if test 329 -ne `wc -c <'xchomp/bitmaps/fruit/fgrape.h'`; then
- echo shar: \"'xchomp/bitmaps/fruit/fgrape.h'\" unpacked with wrong size!
- fi
- # end of 'xchomp/bitmaps/fruit/fgrape.h'
- fi
- if test -f 'xchomp/bitmaps/fruit/fwater.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xchomp/bitmaps/fruit/fwater.h'\"
- else
- echo shar: Extracting \"'xchomp/bitmaps/fruit/fwater.h'\" \(329 characters\)
- sed "s/^X//" >'xchomp/bitmaps/fruit/fwater.h' <<'END_OF_FILE'
- X#define fwater_width 16
- X#define fwater_height 16
- X#define fwater_x_hot -1
- X#define fwater_y_hot -1
- Xstatic char fwater_bits[] = {
- X 0x00, 0x00, 0x10, 0x00, 0x38, 0x00, 0x4c, 0x00, 0x8c, 0x00, 0x26, 0x01,
- X 0x06, 0x02, 0x26, 0x04, 0x06, 0x09, 0x46, 0x10, 0x0c, 0x24, 0x9c, 0x60,
- X 0x38, 0x38, 0xf0, 0x1f, 0xc0, 0x07, 0x00, 0x00};
- END_OF_FILE
- if test 329 -ne `wc -c <'xchomp/bitmaps/fruit/fwater.h'`; then
- echo shar: \"'xchomp/bitmaps/fruit/fwater.h'\" unpacked with wrong size!
- fi
- # end of 'xchomp/bitmaps/fruit/fwater.h'
- fi
- if test -f 'xchomp/demo.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xchomp/demo.c'\"
- else
- echo shar: Extracting \"'xchomp/demo.c'\" \(3619 characters\)
- sed "s/^X//" >'xchomp/demo.c' <<'END_OF_FILE'
- X
- X#include "xchomp.h"
- X
- X/*
- X * This file contains the code which implements the title screen
- X * for the game.
- X */
- X
- Xdemo_seq()
- X{
- X int i, xx, yy, direction, ascent, descent, len;
- X XCharStruct chars;
- X char *string, c_buf;
- X XEvent event;
- X Bool done = False;
- X long sc;
- X XComposeStatus status;
- X
- X /* clear the entire window and the map */
- X XFillRectangle(display, window, clearGC, 0, 0, WIN_WIDTH,
- X WIN_HEIGHT + GHOST_SIZE + 2);
- X XFillRectangle(display, map, clearGC, 0, 0, WIN_WIDTH, WIN_HEIGHT);
- X
- X /* draw the big title (on the map) */
- X xx = (WIN_WIDTH - (48 * 5 - 10)) / 2;
- X yy = 48;
- X for (i = 0; i < 5; i++) {
- X XCopyPlane(display, demo_map[i], map, orGC, 0, 0, 48, 48, xx, yy, 1);
- X xx += (i ? 48 : 42); /* compensate for the 'c' cut-off */
- X }
- X
- X /* programmer credits */
- X string = "Programmed by Jerry J. Shekhel";
- X len = strlen(string);
- X XQueryTextExtents(display, font, string, len, &direction, &ascent,
- X &descent, &chars);
- X xx = (WIN_WIDTH - chars.width) / 2;
- X yy = 108 + ascent;
- X XDrawImageString(display, map, fullcopyGC, xx, yy, string, len);
- X
- X /* draw the two types of dots and their point values */
- X XCopyPlane(display, maze['.'], map, fullcopyGC, 0, 0, GHOST_SIZE,
- X GHOST_SIZE, WIN_WIDTH / 2 - 32, 145, 1);
- X XCopyPlane(display, maze['O'], map, fullcopyGC, 0, 0, GHOST_SIZE,
- X GHOST_SIZE, WIN_WIDTH / 2 - 32, 165, 1);
- X XDrawImageString(display, map, fullcopyGC, WIN_WIDTH / 2 + 16,
- X 146 + ascent, "10", 2);
- X XDrawImageString(display, map, fullcopyGC, WIN_WIDTH / 2 + 16,
- X 166 + ascent, "50", 2);
- X
- X /* draw the high score */
- X string = "High Score: 000000";
- X sc = high_score;
- X for (i = 5; i >= 0; i--) {
- X string[12 + i] = '0' + (sc % 10);
- X sc /= 10;
- X }
- X len = strlen(string);
- X XQueryTextExtents(display, font, string, len, &direction, &ascent,
- X &descent, &chars);
- X xx = (WIN_WIDTH - chars.width) / 2;
- X yy = WIN_HEIGHT - 2 * GHOST_SIZE - descent - 1;
- X XDrawImageString(display, map, fullcopyGC, xx, yy, string, len);
- X
- X /* draw some text */
- X string = "Press \'Q\' To Quit";
- X len = strlen(string);
- X XQueryTextExtents(display, font, string, len, &direction, &ascent,
- X &descent, &chars);
- X xx = (WIN_WIDTH - chars.width) / 2;
- X yy = WIN_HEIGHT - GHOST_SIZE - descent - 1;
- X XDrawImageString(display, map, fullcopyGC, xx, yy, string, len);
- X
- X /* draw some more text */
- X string = "Any Other Key To Begin";
- X len = strlen(string);
- X XQueryTextExtents(display, font, string, len, &direction, &ascent,
- X &descent, &chars);
- X xx = (WIN_WIDTH - chars.width) / 2;
- X yy = WIN_HEIGHT - descent - 1;
- X XDrawImageString(display, map, fullcopyGC, xx, yy, string, len);
- X
- X /* now copy the whole thing to the screen */
- X XCopyArea(display, map, window, fullcopyGC, 0, 0,
- X WIN_WIDTH, WIN_HEIGHT, 0, 0);
- X XSync(display, True);
- X
- X /* wait until the user hits a key */
- X while (!done) {
- X XNextEvent(display, &event);
- X if (event.xany.window != window) continue;
- X switch (event.type) {
- X case KeyPress:
- X XLookupString(&event, &c_buf, 1, &last_key, &status);
- X if ((last_key == XK_q) || (last_key == XK_Q))
- X do_exit();
- X XFillRectangle(display, window, clearGC, 0, 0, WIN_WIDTH,
- X WIN_HEIGHT + GHOST_SIZE + 2);
- X XSync(display, True);
- X done = True;
- X break;
- X case Expose:
- X XCopyArea(display, map, window, fullcopyGC, 0, 0,
- X WIN_WIDTH, WIN_HEIGHT, 0, 0);
- X break;
- X default: break;
- X }
- X }
- X}
- X
- END_OF_FILE
- if test 3619 -ne `wc -c <'xchomp/demo.c'`; then
- echo shar: \"'xchomp/demo.c'\" unpacked with wrong size!
- fi
- # end of 'xchomp/demo.c'
- fi
- if test -f 'xchomp/maze.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xchomp/maze.c'\"
- else
- echo shar: Extracting \"'xchomp/maze.c'\" \(8447 characters\)
- sed "s/^X//" >'xchomp/maze.c' <<'END_OF_FILE'
- X
- X#include "xchomp.h"
- X
- X/*
- X * The following are the maze data arrays. In order to avoid confusion,
- X * and to ensure that nothing goes wrong, each maze should have the
- X * following structure at the center. This structure defines the
- X * ghost box, the starting ghost positions, and the player/fruit
- X * position:
- X *
- X * q-]D[-e
- X * |+++++|
- X * |GGGG+|
- X * z-----c
- X * P
- X *
- X *
- X * Most of the characters in the maze data are used as indeces into
- X * an array of pixmaps which define the images at the corresponding
- X * location.
- X */
- X
- Xstatic mazedata mazes[] = {
- X { "q---------w---------e",
- X "| | |",
- X "|O[-] [w] | [-] [-]O|",
- X "| | | |",
- X "a-] [e v [x] [] ^ ^ |",
- X "| | | | |",
- X "| tu | q-]D[-e [c v |",
- X "| gj v |+++++| |",
- X "| gj |GGGG+| tyyu |",
- X "| bm ^ z-----c bnnm |",
- X "| | P |",
- X "a-] [c [--w--] ^ o [d",
- X "| | | |",
- X "|O[-----] v [--x--]O|",
- X "| |",
- X "z-------------------c" },
- X
- X { "q---------w---------e",
- X "| | |",
- X "|O[] q--] v [--e []O|",
- X "| | | |",
- X "| tu v [-----] v tu |",
- X "| gj gj |",
- X "| gj ^ q-]D[-e ^ gj |",
- X "| bm | |+++++| | bm |",
- X "| | |GGGG+| | |",
- X "| [] v z-----c v tu |",
- X "| P gj |",
- X "a--] ^ [-----] ^ bm |",
- X "| | | |",
- X "|O[--x--] ^ [--x--]O|",
- X "| | |",
- X "z---------x---------c" },
- X
- X { "q-------------------e",
- X "| |",
- X "|O[--] ^ [-] ^ [--]O|",
- X "| | | |",
- X "a--] [-x-] [-x-] [--d",
- X "| |",
- X "| tu ^ q-]D[-e ^ tu |",
- X "| gj | |+++++| | gj |",
- X "| gj | |GGGG+| | gj |",
- X "| bm v z-----c v bm |",
- X "| P |",
- X "| [-] q-] ^ [-e [-e |",
- X "| | | | | |",
- X "|O[-] | [-x-] | o vO|",
- X "| | | |",
- X "z-----x-------x-----c" },
- X
- X { "q-------------------e",
- X "| |",
- X "|O[--] ^ [-] ^ [--]O|",
- X "| | | |",
- X "a-] tu z-----c tu [-d",
- X "| gj gj |",
- X "| ^ gj q-]D[-e gj ^ |",
- X "| | bm |+++++| bm | |",
- X "| | |GGGG+| | |",
- X "| v [e z-----c q] v |",
- X "| | P | |",
- X "a--] v [-----] v [--d",
- X "| |",
- X "|O[--] ^ [-] ^ [--]O|",
- X "| | | |",
- X "z------x-----x------c" },
- X
- X { "q---------w---------e",
- X "| | |",
- X "|O^ [w] ^ v ^ [w] ^O|",
- X "| | | | | | | |",
- X "| z] v [x] [x] v [c |",
- X "| |",
- X "| [e ^ q-]D[-e ^ q] |",
- X "| v v |+++++| v v |",
- X "a] |GGGG+| [d",
- X "| ^ ^ z-----c ^ ^ |",
- X "| [c | P | z] |",
- X "| z-] [w] [-c |",
- X "| tu | tu |",
- X "|Obm [] ^ v ^ [] bmO|",
- X "| | | |",
- X "z-------x---x-------c" },
- X
- X { "q---------w---------e",
- X "| | |",
- X "|O[-] [-] | [-] [-]O|",
- X "| | |",
- X "a-] [-] [-x-] [-] [-d",
- X "| |",
- X "| tyyu q-]D[-e tyyu |",
- X "| bnnm |+++++| bnnm |",
- X "| |GGGG+| |",
- X "| [-w] z-----c [w-] |",
- X "| | P | |",
- X "| ^ v q-] ^ [-e v ^ |",
- X "| | | | | | |",
- X "|Ov ^ v ^ v ^ v ^ vO|",
- X "| | | | | |",
- X "z---x---x---x---x---c" } };
- X
- X
- Xread_maze(num)
- Xint num;
- X{
- X int i, xx, yy, k = NUM_FIGURES, g = 0;
- X int l = NUM_FIGURES + MAX_POWER_DOTS;
- X
- X for (i = 0; i < BLOCK_HEIGHT; i++)
- X strncpy(md[i], mazes[num][i], BLOCK_WIDTH);
- X
- X /*
- X * The following is desperate initialization, designed so that
- X * if any vital components are missing from the maze description,
- X * the program doesn't die from access violations.
- X */
- X for (i = 0; i < (NUM_FIGURES + MAX_POWER_DOTS + 1); i++) {
- X rectangle[i].x = rectangle[i].y = GHOST_SIZE;
- X rectangle[i].width = rectangle[i].height = 0;
- X }
- X for (i = 0; i < NUM_FIGURES; i++) {
- X start_x[i] = GHOST_SIZE;
- X start_y[i] = GHOST_SIZE;
- X }
- X fruit_x = GHOST_SIZE;
- X fruit_y = GHOST_SIZE;
- X door_x = 1;
- X door_y = 1;
- X
- X /*
- X * The rest of this function analyzes the maze data array,
- X * and builds the maze image, as well as the dot information
- X * array (dd[]). The image is created on the background map (save),
- X * and the power-dot images are created on the power-dot map (powermap).
- X */
- X
- X numdots = 0;
- X powerdots = 0;
- X for (yy = 0; yy < BLOCK_HEIGHT; yy++)
- X for (xx = 0; xx < BLOCK_WIDTH; xx++) {
- X dd[yy][xx] = '\0';
- X switch (md[yy][xx]) {
- X
- X case ' ':
- X
- X /* wherever there's a space, we'll put a dot */
- X md[yy][xx] = '\0';
- X dd[yy][xx] = '.';
- X numdots++;
- X break;
- X
- X case 'O':
- X
- X /* there is a power-dot here */
- X md[yy][xx] = '\0';
- X if (powerdots < MAX_POWER_DOTS) {
- X dd[yy][xx] = 'O';
- X rectangle[k].x = xx * GHOST_SIZE;
- X rectangle[k].y = yy * GHOST_SIZE;
- X rectangle[k].width = GHOST_SIZE;
- X rectangle[k++].height = GHOST_SIZE;
- X powerdots++;
- X numdots++;
- X XCopyPlane(display, maze['O'], powermap, fullcopyGC, 0, 0,
- X GHOST_SIZE, GHOST_SIZE, xx * GHOST_SIZE,
- X yy * GHOST_SIZE, 1);
- X }
- X break;
- X
- X case 'P':
- X
- X /*
- X * This is the starting position of the player, as well
- X * as the location of the fruit when it appears.
- X */
- X md[yy][xx] = '\0';
- X start_x[PAC_SLOT] = fruit_x = xx * GHOST_SIZE;
- X start_y[PAC_SLOT] = fruit_y = yy * GHOST_SIZE;
- X rectangle[l].x = fruit_x - 2;
- X rectangle[l].y = fruit_y;
- X rectangle[l].width = FRUIT_WIDTH;
- X rectangle[l].height = FRUIT_HEIGHT;
- X break;
- X
- X case 'G':
- X
- X /*
- X * This is the starting position of a ghost. It had
- X * better be somewhere at the bottom of the ghost box,
- X * and not in the rightmost position. This is because
- X * initially, the ghosts will be sent to the right.
- X */
- X md[yy][xx] = '\0';
- X if (g < PAC_SLOT) {
- X start_x[g] = xx * GHOST_SIZE;
- X start_y[g++] = yy * GHOST_SIZE;
- X }
- X break;
- X
- X case 'D':
- X
- X /*
- X * This is the position of the ghost box door. It
- X * had better be placed correctly.
- X */
- X door_x = xx;
- X door_y = yy;
- X break;
- X
- X case '+':
- X
- X /* this space should be left blank */
- X md[yy][xx] = '\0';
- X break;
- X
- X default: break;
- X }
- X }
- X
- X /*
- X * The graphics context used to flash the power-dots will be loaded
- X * with clipping information which defines only those areas of the
- X * maze which contain the power-dots.
- X */
- X XSetClipRectangles(display, powerGC, 0, 0, rectangle + NUM_FIGURES,
- X powerdots, Unsorted);
- X
- X /* build the maze image */
- X for (yy = 0; yy < BLOCK_HEIGHT; yy++)
- X for (xx = 0; xx < BLOCK_WIDTH; xx++) {
- X if (dd[yy][xx])
- X XCopyPlane(display, maze[dd[yy][xx]], save, fullcopyGC, 0, 0,
- X GHOST_SIZE, GHOST_SIZE, xx * GHOST_SIZE,
- X yy * GHOST_SIZE, 1);
- X else
- X XCopyPlane(display, maze[md[yy][xx]], save, fullcopyGC, 0, 0,
- X GHOST_SIZE, GHOST_SIZE, xx * GHOST_SIZE,
- X yy * GHOST_SIZE, 1);
- X }
- X}
- X
- X
- X/*
- X * The function which follows is used at the beginning of each level to
- X * set up the initial parameters for all of the moving figures.
- X */
- Xposition_players()
- X{
- X int i;
- X
- X for (i = 0; i < PAC_SLOT; i++) {
- X x[i] = start_x[i];
- X y[i] = start_y[i];
- X ix[i] = 2;
- X iy[i] = 0;
- X ghost[i] = bghost;
- X drive[i] = hover;
- X loops[i] = 0;
- X contact[i] = die;
- X rectangle[i].x = x[i] - 2;
- X rectangle[i].y = y[i] - 2;
- X rectangle[i].width = GHOST_SIZE + 4;
- X rectangle[i].height = GHOST_SIZE + 4;
- X }
- X
- X x[PAC_SLOT] = start_x[PAC_SLOT];
- X y[PAC_SLOT] = start_y[PAC_SLOT];
- X ix[PAC_SLOT] = (-2);
- X iy[PAC_SLOT] = 0;
- X rectangle[PAC_SLOT].x = x[PAC_SLOT] - 2;
- X rectangle[PAC_SLOT].y = y[PAC_SLOT] - 2;
- X rectangle[PAC_SLOT].width = GHOST_SIZE + 4;
- X rectangle[PAC_SLOT].height = GHOST_SIZE + 4;
- X pac = lpac;
- X}
- X
- END_OF_FILE
- if test 8447 -ne `wc -c <'xchomp/maze.c'`; then
- echo shar: \"'xchomp/maze.c'\" unpacked with wrong size!
- fi
- # end of 'xchomp/maze.c'
- fi
- if test -f 'xchomp/props.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xchomp/props.c'\"
- else
- echo shar: Extracting \"'xchomp/props.c'\" \(3433 characters\)
- sed "s/^X//" >'xchomp/props.c' <<'END_OF_FILE'
- X
- X#include "xchomp.h"
- X
- X
- X/*
- X * This file contains code which implements several special
- X * sequences in the game.
- X */
- X
- X
- X/* the get-ready sequence */
- Xget_ready()
- X{
- X int xx, yy, i;
- X int direction, ascent, descent;
- X XCharStruct chars;
- X char *string = "READY!";
- X
- X XQueryTextExtents(display, font, string, 6, &direction, &ascent,
- X &descent, &chars);
- X
- X xx = (WIN_WIDTH - chars.width) / 2;
- X yy = start_y[PAC_SLOT] + 1 + ascent;
- X
- X XDrawImageString(display, window, fullcopyGC, xx, yy, string, 6);
- X XSync(display, False);
- X sleep(2);
- X XCopyPlane(display, lpac[0], map, orGC, 0, 0, GHOST_SIZE,
- X GHOST_SIZE, x[PAC_SLOT], y[PAC_SLOT], 1);
- X for (i = 0; i < PAC_SLOT; i++)
- X XCopyPlane(display, bghost[0], map, orGC, 0, 0, GHOST_SIZE,
- X GHOST_SIZE, x[i], y[i], 1);
- X XCopyArea(display, map, window, fullcopyGC, 0, 0, WIN_WIDTH,
- X WIN_HEIGHT, 0, 0);
- X XSync(display, False);
- X sleep(2);
- X}
- X
- X
- X/* the game-over sequence */
- Xgame_over()
- X{
- X int xx, yy;
- X int direction, ascent, descent;
- X XCharStruct chars;
- X char *string = "GAME OVER";
- X
- X XQueryTextExtents(display, font, string, 9, &direction, &ascent,
- X &descent, &chars);
- X
- X xx = (WIN_WIDTH - chars.width) / 2;
- X yy = start_y[PAC_SLOT] + 1 + ascent;
- X
- X sleep(1);
- X XDrawImageString(display, window, fullcopyGC, xx, yy, string, 9);
- X XSync(display, False);
- X if (score > high_score)
- X high_score = score;
- X sleep(3);
- X}
- X
- X
- X/* the end-of-level sequence -- the screen flashes a few times */
- Xfinish()
- X{
- X int i;
- X
- X /* erase the fruit */
- X XFillRectangle(display, save, clearGC, fruit_x - 2, fruit_y,
- X FRUIT_WIDTH, FRUIT_HEIGHT);
- X
- X XCopyArea(display, save, map, fullcopyGC, 0, 0,
- X WIN_WIDTH, WIN_HEIGHT, 0, 0);
- X XCopyPlane(display, lpac[0], map, orGC, 0, 0,
- X GHOST_SIZE, GHOST_SIZE, x[PAC_SLOT], y[PAC_SLOT], 1);
- X XCopyArea(display, map, window, fullcopyGC, 0, 0,
- X WIN_WIDTH, WIN_HEIGHT, 0, 0);
- X XSync(display, False);
- X print_score(100L * (level + 1));
- X sleep(2);
- X
- X XCopyArea(display, save, window, fullcopyGC, 0, 0,
- X WIN_WIDTH, WIN_HEIGHT, 0, 0);
- X for (i = 0; i < 7; i++) {
- X XFillRectangle(display, window, invertGC, 0, 0, WIN_WIDTH, WIN_HEIGHT);
- X XSync(display, False);
- X usleep(350000);
- X }
- X XFillRectangle(display, window, clearGC, 0, 0, WIN_WIDTH, WIN_HEIGHT);
- X XSync(display, False);
- X sleep(2);
- X}
- X
- X
- X/* the paused-game sequence */
- XBool pause_seq()
- X{
- X XEvent event;
- X char c_buf;
- X XComposeStatus status;
- X
- X XDrawImageString(display, window, fullcopyGC, 60,
- X WIN_HEIGHT + ascent + 2, "Paused", 6);
- X XSync(display, False);
- X
- X while (True) {
- X XNextEvent(display, &event);
- X if (event.xany.window != window) continue;
- X switch (event.type) {
- X case KeyPress:
- X XLookupString(&event, &c_buf, 1, &last_key, &status);
- X if ((last_key == XK_q) || (last_key == XK_Q))
- X do_exit();
- X if ((last_key == XK_r) || (last_key == XK_R))
- X return False;
- X XDrawImageString(display, window, fullcopyGC, 60,
- X WIN_HEIGHT + ascent + 2, " ", 6);
- X XSync(display, False);
- X return True;
- X case Expose:
- X XCopyArea(display, map, window, fullcopyGC, 0, 0,
- X WIN_WIDTH, WIN_HEIGHT, 0, 0);
- X restore_status();
- X XDrawImageString(display, window, fullcopyGC, 60,
- X WIN_HEIGHT + ascent + 2, "Paused", 6);
- X break;
- X default: break;
- X }
- X }
- X}
- END_OF_FILE
- if test 3433 -ne `wc -c <'xchomp/props.c'`; then
- echo shar: \"'xchomp/props.c'\" unpacked with wrong size!
- fi
- # end of 'xchomp/props.c'
- fi
- if test -f 'xchomp/status.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xchomp/status.c'\"
- else
- echo shar: Extracting \"'xchomp/status.c'\" \(1703 characters\)
- sed "s/^X//" >'xchomp/status.c' <<'END_OF_FILE'
- X
- X#include "xchomp.h"
- X
- X
- X/*
- X * This file contains functions which are used to maintain the
- X * status line of the game window. The status line contains the
- X * score, the fruit level, and the number of lives remaining.
- X */
- X
- Xprint_score(incr)
- Xlong incr;
- X{
- X static char string[6];
- X register long sc;
- X register int j;
- X
- X if (score < 10000L) {
- X if ((sc = score += incr) >= 10000)
- X (void)set_lives(lives + 1);
- X }
- X else sc = score += incr;
- X
- X for (j = 5; j >= 0; j--) {
- X string[j] = '0' + (sc % 10);
- X sc /= 10;
- X }
- X XDrawImageString(display, window, fullcopyGC, 6,
- X WIN_HEIGHT + ascent + 2, string, 6);
- X}
- X
- X
- Xint set_lives(num)
- Xint num;
- X{
- X int i;
- X
- X if (lives = num)
- X for (i = 1; i < lives; i++)
- X XCopyPlane(display, small_pac, window, orGC, 0, 0,
- X GHOST_SIZE, GHOST_SIZE, WIN_WIDTH - 6 - i * 12,
- X WIN_HEIGHT + 1, 1);
- X XFillRectangle(display, window, clearGC, 14 * GHOST_SIZE,
- X WIN_HEIGHT + 1, (WIN_WIDTH - 5 - (i - 1) * 12) -
- X 14 * GHOST_SIZE, GHOST_SIZE);
- X return lives;
- X}
- X
- X
- Xdisplay_level(slowly)
- XBool slowly;
- X{
- X int i, xx;
- X
- X XFillRectangle(display, window, clearGC, 7 * GHOST_SIZE,
- X WIN_HEIGHT + 1, 7 * GHOST_SIZE, GHOST_SIZE);
- X XSync(display, False);
- X
- X xx = 13 - (i = level);
- X if (xx < 7) xx = 7;
- X
- X while (xx < 14) {
- X if (slowly)
- X usleep(100000);
- X XCopyPlane(display, fruit_pix[(i > 13) ? 13 : i], window, fullcopyGC,
- X 0, 0, GHOST_SIZE, GHOST_SIZE, (xx++) * GHOST_SIZE, WIN_HEIGHT + 1, 1);
- X --i;
- X XSync(display, False);
- X }
- X if (slowly)
- X usleep(100000);
- X}
- X
- X
- Xrestore_status()
- X{
- X print_score(0L);
- X (void)set_lives(lives);
- X display_level(False);
- X}
- END_OF_FILE
- if test 1703 -ne `wc -c <'xchomp/status.c'`; then
- echo shar: \"'xchomp/status.c'\" unpacked with wrong size!
- fi
- # end of 'xchomp/status.c'
- fi
- if test -f 'xchomp/xchomp.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xchomp/xchomp.h'\"
- else
- echo shar: Extracting \"'xchomp/xchomp.h'\" \(4325 characters\)
- sed "s/^X//" >'xchomp/xchomp.h' <<'END_OF_FILE'
- X
- X#ifndef EXTERN
- X#define EXTERN extern
- X#endif
- X
- X#include <signal.h>
- X
- X#include <X11/Xlib.h>
- X#include <X11/Xutil.h>
- X#include <X11/Xatom.h>
- X#include <X11/keysym.h>
- X
- X#ifndef NULL
- X#define NULL 0L
- X#endif
- X
- X#define sgn(x) ((x) ? (((x) > 0) ? 1 : -1) : 0)
- X#define abs(x) (((x) < 0) ? -(x) : (x))
- X
- X
- X/*-- MACHINE DEPENDENCIES ----------------------------------------------------*/
- X
- X#ifdef VMS
- XEXTERN float vms_delay;
- X#define random() (rand() >> 16)
- X#define usleep(x) { vms_delay = (x) * 0.000001; lib$wait(&vms_delay); }
- X#endif
- X
- X#ifdef ULTRIX
- X#include <sys/time.h>
- XEXTERN struct timeval st_delay;
- X#define usleep(x) { st_delay.tv_usec = (x); st_delay.tv_sec = 0; \
- X select(32, NULL, NULL, NULL, &st_delay); }
- X#endif
- X
- X#ifdef stellar
- X#include <sys/time.h>
- XEXTERN struct timeval st_delay;
- X#define usleep(x) { st_delay.tv_usec = (x); st_delay.tv_sec = 0; \
- X select(32, NULL, NULL, NULL, &st_delay); }
- X#endif
- X
- X/*----------------------------------------------------------------------------*/
- X
- X
- X#define GHOST_SIZE 16 /* width and height of a ghost (pixels) */
- X
- X#define BLOCK_WIDTH 21 /* width of the maze (16x16-pixel blocks) */
- X#define BLOCK_HEIGHT 16 /* height of the maze (16x16-pixel blocks) */
- X
- X#define WIN_WIDTH GHOST_SIZE * BLOCK_WIDTH /* maze width (pixels) */
- X#define WIN_HEIGHT GHOST_SIZE * BLOCK_HEIGHT /* maze height (pixels) */
- X
- X#define FRUIT_WIDTH 20 /* width of the fruit area (pixels) */
- X#define FRUIT_HEIGHT 16 /* height of the fruit area (pixels) */
- X
- X#define ICON_WIDTH 32 /* width of the icon (pixels) */
- X#define ICON_HEIGHT 32 /* height of the icon (pixels) */
- X
- X#define NUM_FIGURES 5 /* number of moving figures */
- X#define PAC_SLOT 4 /* array index of the player */
- X#define MAX_POWER_DOTS 4 /* maximum number of power dots */
- X
- Xtypedef int intm[8];
- Xtypedef char charm[BLOCK_WIDTH];
- Xtypedef charm mazedata[BLOCK_HEIGHT];
- Xtypedef int (*funcptr)();
- X
- XEXTERN Atom DEC_icon_atom;
- X
- X/* Xlib parameters */
- XEXTERN Display * display;
- XEXTERN Window root;
- XEXTERN Window window;
- XEXTERN int screen;
- XEXTERN int depth;
- XEXTERN int black;
- XEXTERN int white;
- XEXTERN Bool normal;
- XEXTERN Font font;
- XEXTERN int ascent, descent;
- X
- X/* graphics contexts */
- XEXTERN GC copyGC;
- XEXTERN GC orGC;
- XEXTERN GC clearGC;
- XEXTERN GC powerGC;
- XEXTERN GC invertGC;
- XEXTERN GC fullcopyGC;
- XEXTERN GC bitmapGC;
- X
- X/* bitmaps */
- XEXTERN Pixmap icon;
- XEXTERN Pixmap map;
- XEXTERN Pixmap save;
- XEXTERN Pixmap powermap;
- XEXTERN Pixmap demo_map[5];
- XEXTERN Pixmap bghost[16];
- XEXTERN Pixmap eghost[16];
- XEXTERN Pixmap fghost[16];
- XEXTERN Pixmap gghost[16];
- XEXTERN Pixmap lpac[16], rpac[16], upac[16], dpac[16];
- XEXTERN Pixmap *pac;
- XEXTERN Pixmap maze[128];
- XEXTERN Pixmap dead_prot[11], deadpac[11];
- XEXTERN Pixmap small_pac;
- XEXTERN Pixmap eat_pix[4];
- XEXTERN Pixmap fval_pix[14];
- XEXTERN Pixmap fruit_pix[14];
- X
- XEXTERN intm x, y, ix, iy, start_x, start_y;
- XEXTERN int grey_tick, flash_tick, off_tick;
- XEXTERN int count_sync;
- XEXTERN Bool eat_mode;
- XEXTERN int door_x, door_y;
- XEXTERN int fruit_count;
- XEXTERN int fruit_times;
- XEXTERN int fruit_x, fruit_y;
- XEXTERN Bool fruit_shown;
- XEXTERN int eat_index;
- XEXTERN mazedata md, dd;
- XEXTERN funcptr drive[NUM_FIGURES - 1];
- XEXTERN funcptr contact[NUM_FIGURES - 1];
- XEXTERN Pixmap *ghost[NUM_FIGURES - 1];
- XEXTERN int loops[NUM_FIGURES - 1];
- X
- XEXTERN XRectangle rectangle[NUM_FIGURES + MAX_POWER_DOTS + 1];
- XEXTERN int numdots;
- XEXTERN int powerdots;
- XEXTERN int level, plevel;
- XEXTERN int lives;
- XEXTERN int count;
- XEXTERN long score;
- XEXTERN long high_score;
- XEXTERN KeySym last_key;
- XEXTERN Bool dead, completed;
- X
- Xextern follow(), hover(), hover2(), run(), go_home();
- Xextern die(), eat(), noop();
- Xextern Bool pause_seq();
- END_OF_FILE
- if test 4325 -ne `wc -c <'xchomp/xchomp.h'`; then
- echo shar: \"'xchomp/xchomp.h'\" unpacked with wrong size!
- fi
- # end of 'xchomp/xchomp.h'
- fi
- echo shar: End of archive 2 \(of 3\).
- cp /dev/null ark2isdone
- MISSING=""
- for I in 1 2 3 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 3 archives.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-