ftp://ftp.demon.nl/disk1/redhat-contrib/libc5/SRPMS/xscreensaver-2.14-1.src.rpm
authorZygo Blaxell <zblaxell@hungrycats.org>
Mon, 2 Mar 2009 05:42:23 +0000 (00:42 -0500)
committerZygo Blaxell <zblaxell@hungrycats.org>
Mon, 2 Mar 2009 05:42:23 +0000 (00:42 -0500)
-rw-r--r-- 1 zblaxell zblaxell 728090 Feb 27 17:07 xscreensaver-2.14-1.src.rpm
333b5350ec5a8562c45dc88d3f9283fcca2e8285  xscreensaver-2.14-1.src.rpm

xscreensaver-2.14.tar.gz
-rw-r--r-- 2 zblaxell zblaxell 726440 Jan 14  1998 xscreensaver-2.14.tar.gz
616ff5427643b5402fb08f342f5fe83772ead230  xscreensaver-2.14.tar.gz

122 files changed:
Makefile.in
README
README.VMS
README.debugging [new file with mode: 0644]
cde.txt [deleted file]
config.h.in
configure
configure.in
driver/Makefile.in
driver/XScreenSaver.ad.in
driver/XScreenSaver_ad.h
driver/demo.c
driver/lock.c
driver/subprocs.c
driver/windows.c
driver/xscreensaver-command.c
driver/xscreensaver.c
driver/xscreensaver.h
driver/xscreensaver.man
driver/xset.c
hacks/Makefile.in
hacks/ant.c [new file with mode: 0644]
hacks/blitspin.c
hacks/blitspin.man
hacks/braid.c
hacks/bubbles.c
hacks/compile_axp.com
hacks/compile_decc.com
hacks/coral.c
hacks/decayscreen.c
hacks/decayscreen.man
hacks/drift.c
hacks/flame.c
hacks/forest.c
hacks/fract.c [deleted file]
hacks/fract.man [deleted file]
hacks/galaxy.c
hacks/glx/rubik.c
hacks/helix.c
hacks/hopalong.c
hacks/hypercube.c
hacks/link_axp.com
hacks/link_decc.com
hacks/lisa.c
hacks/lissie.c [new file with mode: 0644]
hacks/lmorph.c
hacks/maze.c
hacks/mountain.c [new file with mode: 0644]
hacks/penrose.c
hacks/pieces/puzzle.xbm [new file with mode: 0644]
hacks/pieces/puzzle_a_e_f.xbm [new file with mode: 0644]
hacks/pieces/puzzle_a_e_h.xbm [new file with mode: 0644]
hacks/pieces/puzzle_a_f.xbm [new file with mode: 0644]
hacks/pieces/puzzle_a_h.xbm [new file with mode: 0644]
hacks/pieces/puzzle_a_n_f.xbm [new file with mode: 0644]
hacks/pieces/puzzle_a_n_h.xbm [new file with mode: 0644]
hacks/pieces/puzzle_a_ne_f.xbm [new file with mode: 0644]
hacks/pieces/puzzle_a_ne_h.xbm [new file with mode: 0644]
hacks/pieces/puzzle_a_nw_f.xbm [new file with mode: 0644]
hacks/pieces/puzzle_a_nw_h.xbm [new file with mode: 0644]
hacks/pieces/puzzle_a_s_f.xbm [new file with mode: 0644]
hacks/pieces/puzzle_a_s_h.xbm [new file with mode: 0644]
hacks/pieces/puzzle_a_se_f.xbm [new file with mode: 0644]
hacks/pieces/puzzle_a_se_h.xbm [new file with mode: 0644]
hacks/pieces/puzzle_a_sw_f.xbm [new file with mode: 0644]
hacks/pieces/puzzle_a_sw_h.xbm [new file with mode: 0644]
hacks/pieces/puzzle_a_w_f.xbm [new file with mode: 0644]
hacks/pieces/puzzle_a_w_h.xbm [new file with mode: 0644]
hacks/pieces/puzzle_b_e_f.xbm [new file with mode: 0644]
hacks/pieces/puzzle_b_e_h.xbm [new file with mode: 0644]
hacks/pieces/puzzle_b_f.xbm [new file with mode: 0644]
hacks/pieces/puzzle_b_h.xbm [new file with mode: 0644]
hacks/pieces/puzzle_b_n_f.xbm [new file with mode: 0644]
hacks/pieces/puzzle_b_n_h.xbm [new file with mode: 0644]
hacks/pieces/puzzle_b_ne_f.xbm [new file with mode: 0644]
hacks/pieces/puzzle_b_ne_h.xbm [new file with mode: 0644]
hacks/pieces/puzzle_b_nw_f.xbm [new file with mode: 0644]
hacks/pieces/puzzle_b_nw_h.xbm [new file with mode: 0644]
hacks/pieces/puzzle_b_s_f.xbm [new file with mode: 0644]
hacks/pieces/puzzle_b_s_h.xbm [new file with mode: 0644]
hacks/pieces/puzzle_b_se_f.xbm [new file with mode: 0644]
hacks/pieces/puzzle_b_se_h.xbm [new file with mode: 0644]
hacks/pieces/puzzle_b_sw_f.xbm [new file with mode: 0644]
hacks/pieces/puzzle_b_sw_h.xbm [new file with mode: 0644]
hacks/pieces/puzzle_b_w_f.xbm [new file with mode: 0644]
hacks/pieces/puzzle_b_w_h.xbm [new file with mode: 0644]
hacks/puzzle.c [new file with mode: 0644]
hacks/puzzle.man [new file with mode: 0644]
hacks/rd-bomb.c
hacks/rorschach.c
hacks/rotor.c [new file with mode: 0644]
hacks/sierpinski.c
hacks/slidescreen.c
hacks/slidescreen.man
hacks/slip.c
hacks/slip.man
hacks/starfish.c
hacks/triangle.c [new file with mode: 0644]
hacks/vines.c [new file with mode: 0644]
hacks/vines.man [new file with mode: 0644]
hacks/worm.c [new file with mode: 0644]
hacks/xjack.c [new file with mode: 0644]
hacks/xjack.man [new file with mode: 0644]
hacks/xlockmore.h
hacks/xlockmoreI.h
hacks/xlyap.c [new file with mode: 0644]
hacks/xlyap.man [new file with mode: 0644]
hacks/xscreensaver-sgigl.c [new file with mode: 0644]
setup.com
utils/Makefile.in
utils/colors.c
utils/compile_axp.com
utils/compile_decc.com
utils/erase.c
utils/erase.h
utils/fade.c
utils/fade.h
utils/grabscreen.c
utils/grabscreen.h
utils/sgivideo.c [new file with mode: 0644]
utils/sgivideo.h [new file with mode: 0644]
utils/version.h

index 50b2d235cdcdde14928ed5b274fb91426aaca950..6991f8e894cf7f70365c5471cef64de3fe551f27 100644 (file)
@@ -7,10 +7,10 @@ VPATH         = @srcdir@
 
 SHELL          = /bin/sh
 SUBDIRS                = utils driver hacks hacks/glx
-TARFILES       = README README.VMS INSTALL configure configure.in \
-                 Makefile.in config.h.in config.h-vms install-sh \
-                 setup.com config.guess config.sub makevms.com \
-                 screenblank.txt cde.txt
+TARFILES       = README README.VMS README.debugging INSTALL \
+                 configure configure.in Makefile.in config.h.in \
+                 config.h-vms install-sh setup.com config.guess \
+                 config.sub makevms.com screenblank.txt
 TAR            = gtar
 COMPRESS       = gzip --verbose --best
 COMPRESS_EXT   = gz
diff --git a/README b/README
index 22e0c4f8f10bb6ddbac8380804c603eaa596a725..2133a5e31b4b31ddeef471ef145905e28e862d8b 100644 (file)
--- a/README
+++ b/README
@@ -22,6 +22,10 @@ The most important hint is probably this:
 
 To build on VMS, see README.VMS.
 
+If you think you've found a bug, please let me know; but first, read
+the enlosed `README.debugging' file to find out what kind of information
+would be most helpful to include in your bug report.
+
                               ============
 
 The xscreensaver program waits until the keyboard and mouse have been idle
@@ -69,6 +73,7 @@ window, which are pointed at by the screensaver's default resource settings.
    hypercube   - 2d projection of a hypercube rotating on all four axes.
    slidescreen - Divides the screen into a grid and plays a 16-puzzle on it.
    decayscreen - A melting effect.
+   puzzle      - Turns the screen into a jigsaw puzzle and shuffles it.
    halo                - Random circular patterns.
    pyro                - Fireworks.  Looks a lot like the version in xlock.
    hopalong    - Fractals.  I snarfed this code from xlock.
@@ -86,7 +91,7 @@ window, which are pointed at by the screensaver's default resource settings.
    bouboule    - Spinning bubbles on a transparent ball.
    braid       - Draws random color-cycling braids around a circle.
    drift       - Drifting recursive fractal cosmic flames.
-   fract       - Small, curvy geometric patterns.
+   vines       - Small, curvy geometric patterns.
    galaxy      - Spinning, colliding galaxies.
    grav                - Orbital simulation and/or cloud chamber.
    ifs         - Spinning, colliding iterated-function-system shapes.
@@ -99,15 +104,23 @@ window, which are pointed at by the screensaver's default resource settings.
    spiral      - Circular color-cycling interference patterns.
    strange     - Animating strange attractors.
    flag                - A waving flag of an arbitrary bitmap or text.
-   sphere      - draw a bunch of shaded spheres.
+   sphere      - Draws a bunch of shaded spheres.
    forest      - grows a fractal forest.
    lisa                - draws animated full-loop lisajous figures.
+   lissie      - another lisajous path.
    goop                - Squishy transparent oil-and-bubble images
    starfish    - Radially-symmetric throbbing colormap-hacking blobs.
    munch       - The classic 1962-vintage "munching squares" hack.
    rd-bomb      - Reaction-diffusion fractals.
    coral        - Simulation of coral growth, sort of.
    fadeplot    - Draws a swimming ribbon.
+   mountain    - Generates mountains on a square grid.
+   triangle    - Generates mountains on a triangular grid.
+   worm                - Draws wiggly worms.
+   rotor       - Draws a rotating spiral pattern.
+   ant         - A cellular automaton.
+   xjack       - Simulates a schizophrenic typist.
+   xlyap       - Calculates and displays Lyapunov exponents.
    escher      - Draws some escher-like scenes (GLX only.)
    gears       - Draws interlocking rotating gears (GLX only.)
    morph3d     - Draws shiny shape-changing 3d forms (GLX only.)
@@ -129,10 +142,15 @@ Other reasonable things to use as screensavers, if you have them, are
   xv -root file.gif -quit      - they don't all have to animate!
   xsplinefun                   - bouncing splines
   xfishtank -c black -d -r 1   - fish (use version 2.0 or later)
+  xmountains -b                        - very realistic generated mountains
   xtacy -root                  - various eye candy
-  /usr/demos/bin/bongo -wbongo - an SGI GL demo
+  xearth -wait 0 -timewarp 400 - the earth as seen from space
+  /usr/demos/bin/bongo         - an SGI GL demo
+  /usr/demos/bin/ep -S         - another: the stunning ElectroPaint.
+                                 (Compile hacks/xscreensaver-sgigl.c
+                                 to use these with xscreensaver.)
 
-You can get all of these from the contrib directory on ftp.x.org.  If you
+You can get most of these from the contrib directory on ftp.x.org.  If you
 know of (or write) any other interesting programs that can be used as
 screensavers, please let me know!
 
@@ -142,10 +160,57 @@ http://people.netscape.com/jwz/xscreensaver/.
        -- Jamie Zawinski <jwz@netscape.com>
 
 \f
-Changes since 2.09:    Fixed color bugs in rd-bomb; sped up coral.
-Changes since 2.07:    New hacks "rd-bomb" and "coral".
-                       New version of "maze" with some new algorithms.
-                       New colorized version of "rocks".
+Changes since 2.13:    Better fix for the Motif drag-and-die lossage.
+                       Put in some kludges to work around a LessTif bug.
+                       XScreenSaver is known to work with LessTif 0.82 now.
+                       Made fading work on high-end SGI video hardware.
+                       Fixed another SGI-specific bug in screen grabbing;
+                       will the madness never cease?
+                       Fixed another crash in `xlyap'.
+Changes since 2.12:    Made `decayscreen' do directions other than down.
+                       Improved `puzzle'.
+                       Fixed a crash in `xlyap'.
+                       Added CDE info to the man page, removed `cde.txt'.
+                       Configure tweaks for Zippy.
+                       Turned off the signal handling in `bubbles' because
+                       it was sometimes failing to die.
+                       Added `hacks/xscreensaver-sgigl.c' to make it possible
+                       to run SGI's ElectroPaint hack (/usr/demos/bin/ep)
+                       with xscreensaver.  Finally!
+                       Fixed a buffer overrun in the locking code that some
+                       wily, malicious cracker must have slipped in.
+                       Disabled Motif drag-and-drool in the dialog box
+                       buttons, since it's broken in some old versions of
+                       Motif.
+Changes since 2.11:    Added `README.debugging'.
+                       Added `puzzle' hack.
+                       Added `xlyap' hack.
+                       Added "default-n" as a visual name, so that one can
+                       have -install on by default, but turn it off for
+                       certain poorly-behaved hacks (like xv.)
+                       Added support for grabbing frames of external video
+                       (on SGI) to the screen-grabbing hacks (decayscreen,
+                       slidescreen, slip, blitspin, and puzzle.)
+                       Improved look of tiles in `slidescreen'; fixed its
+                       color allocation problem.
+Changes since 2.10:    Tweaked `blitspin', added it to the default list.
+                       Added `lissie', `mountain', `triangle', `worm',
+                       `rotor', and `ant' from xlockmore.
+                       Updated `sierpinski', `galaxy', and `lisa'.
+                       Thickened the lines in `braid' and `lmorph'.
+                       Updated VMS makefiles.
+                       Renamed `fract' to `vines'.
+                       Added `xjack' hack.
+                       Made a few more hacks use erase.c, and added a few
+                       more wipe styles.
+                       Fixed compilation problem with Sun's version of OpenGL.
+                       Added ability to use sigaction() instead of signal()
+                       to work around a SCO kernel bug.
+Changes since 2.09:    Fixed colormap bugs in `rd-bomb'; sped up `coral'.
+                       Configure tweaks for *BSD.
+Changes since 2.07:    New hacks `rd-bomb' and `coral'.
+                       New version of `maze' with some new algorithms.
+                       New colorized version of `rocks'.
                        Fixed a bug in qix on 64-bit machines.
                        Fixed a bug in the -time option.
                        Fixed a bug in configure related to LessTif.
index 262d7dd030baea97f04eb6cf4b50e87af6052108..d1903443d132fb6f32dc1a4ffbf54facc69e4907 100644 (file)
@@ -1,4 +1,4 @@
-OpenVMS port of Xscreensavser version 2.05     July 1997
+OpenVMS port of Xscreensavser version 2.10     October 1997
 ==========================================
 
 Xscreensaver distribution can be found in 3 subdirectories:
@@ -38,8 +38,6 @@ The SETUP.COM procedure gives you a definition of all DCL foreign command
 symbols needed to run Xscreensaver and all the graphic hacks. You need to
 modify this procedure if you install these programs in another directory tree.
 
-VMS .HLP files are provied for all programms of this distribution.
-
 You can easily add new graphic demos without recompiling Xscreensaver. You just
 need to add them in resource file XSCREENSAVER.DAT. This file (originally
 present in [.DRIVER] directory ) can be installed under your SYS$LOGIN 
diff --git a/README.debugging b/README.debugging
new file mode 100644 (file)
index 0000000..cf14789
--- /dev/null
@@ -0,0 +1,141 @@
+
+                              XScreenSaver
+
+              a handy guide for creating useful bug reports
+
+                                --------
+
+    It's hard to imagine, but sometimes, xscreensaver has bugs.  This
+    document gives some hints for isolating them; the more information
+    you can give me about the problem, the better the odds that I'll be
+    able to fix it.  But, if you don't have time to go through these
+    steps, report the bug anyway -- even vague bug reports can be 
+    better than no bug report at all.
+                                --------
+
+STEP ZERO:
+
+    What are you doing here?  Go read README, and then the man page.
+
+STEP ZERO, PART TWO:
+
+    Do you have the most recent version?  Go make sure.
+    http://people.netscape.com/jwz/xscreensaver/
+
+BUILDING:
+
+    If you get an error running the `configure' script, the first thing
+    you should try is deleting the `config.cache' file, and running again.
+    If that doesn't fix it, the information I'll need to see to make
+    sense of the problem is the following:
+
+        *  everything printed to stderr/stdout when you first ran
+           ./configure;
+
+        *  the contents of the `config.log' file.
+
+    Make sure you blow away the config.cache file before regenerating
+    this info, or else the `config.log' file will be mostly empty/useless.
+
+    Experience seems to show that the most common configure problem is
+    that sites have gcc installed, but installed improperly.  The
+    configure script will always try to use gcc in preference to another
+    compiler if gcc exists, so if gcc exists but is broken, it won't
+    work.  Your options are:
+
+        *  get someone to fix the gcc installation;
+
+        *  rearrange your $PATH so that the broken gcc is not on it;
+
+        *  or pass $CC in the environment, like so:
+               csh:  setenv CC cc ; ./configure
+               sh:   CC=cc ; ./configure
+
+    After doing this, you'll need to nuke `config.cache'.
+
+    If you get errors about not being able to find Motif or Athena (the
+    Xm/ or Xaw/ header files), and you can't find them on your system,
+    then your system is horked and your vendor is lame.  Perhaps the
+    problem is that you don't have some kind of ``development option''
+    installed.  Xt/ and Xaw/ (Athena) are free and available on all
+    systems; Xm/ (Motif) is available on all commercial systems except
+    SunOS 4.x and some early releases of Solaris.
+
+RUNNING:
+
+    For runtime errors, it's important to keep in mind that there are
+    two parts to xscreensaver: there is the screensaver driver process
+    (the part that detects idleness, deals with locking, and launches
+    the demos); and there are the demos themselves (independent programs
+    that draw pretty pictures.)
+
+        *  Compile with `make CFLAGS=-g'.
+
+        *  What platform are you running on?  What does the included
+           `./config.guess' shell script print?
+
+        *  Is the problem in the driver, or in the graphics hacks?
+
+        *  If the problem is in the driver, was the driver built using
+           Motif, or Athena?  Which version?
+
+        *  If the problem is in one (or more) of the hacks, which ones?
+           If you're not sure, try
+
+              xscreensaver-command -demo
+
+           to go through the list of them and see which work and which
+           don't.
+
+        *  Does the problem occur when running that hack by hand, in
+           its own window?
+
+        *  Does the problem occur when running that hack by hand, on
+           the root window (the `-root' option)?
+
+        *  IMPORTANT: What visual are you using?  Send the output of
+           the `xdpyinfo' command.
+
+        *  Does the problem go away if you give the program a different
+           `-visual' argument?  (For example, `-visual pseudocolor' or
+           `-visual truecolor'.)
+
+        *  IMPORTANT: What exactly goes wrong?  No, I don't know what
+           you mean by "crash".  Does it print an "X Error" and exit?
+           Does it dump core?  Does it go into a loop?
+
+        *  If it dumps core, what does the core file say?  Run the
+           program under a debugger, and show me the stack trace.
+           (If you don't know how to do that, that's ok.)
+
+        *  If it gets an X error, where did it come from?  Run the
+           program under a debugger; set a breakpoint on `exit';
+           start the program with the `-sync' command-line option;
+           and show me the stack trace when it stops.
+
+    If the problem is with the xscreensaver process itself, or if you
+    can't figure out which demo is causing the problem, or if you can't
+    reproduce the problem in isolation, then you will need to turn on
+    and examine the debugging output of the driver process.
+
+        *  Start `xscreensaver' with the command-line arguments
+
+             -verbose -xrm '*captureStderr:false' -xrm '*captureStdout:false'
+
+           This will cause it to write a lot of debugging info to the
+           stdout and stderr of the xscreensaver process (the -verbose
+           argument turns on the diagnostics; the remaining arguments
+           prevent the data from being displayed on the screensaver
+           window as well.
+
+        *  If the problem is intermittent, you might want to capture the
+           log information to a file and examine it later.
+
+        *  Hackers only: If you're feeling adventurous enough to run gdb
+           on the xscreensaver driver process itself, make sure you've
+           read the commentary at the top of xscreensaver.c.
+
+-----------------------------------------------------------------------------
+                                 http://people.netscape.com/jwz/xscreensaver/
+                                            Jamie Zawinski <jwz@netscape.com>
+-----------------------------------------------------------------------------
diff --git a/cde.txt b/cde.txt
deleted file mode 100644 (file)
index 2a5d216..0000000
--- a/cde.txt
+++ /dev/null
@@ -1,98 +0,0 @@
-From: moredhel@earthling.net
-Subject: Re: Changing Screen Saver in CDE
-Message-Id: <862223755.19542@dejanews.com>
-Newsgroups: comp.unix.solaris,comp.unix.cde
-
-> I was wondering how you could add your own screen saver under CDE. I
-> don't like the ones included. This is the one that comes up when I lock
-> the screen. Also, where are they located?
-
-The easiest way to do this is to just tell the front panel to run
-something else when you click the lock symbol, switch off the "standard"
-screen blank/lock, and then start your own in sessionetc.
-
-Anyway, once you have a screensaver that you want to run instead, you'll
-need to add 2 files to ~/.dt/types/, one line to add to
-~/.dt/sessions/sessionetc and a change to make to the Style Manager.
-
-The two files are to change the behaviour of the Lock button in the middle
-of the front panel.  To change the command run, edit the EXEC_STRING in
-the .dt file:
-
-Xlock.dt:
-
-######################################################################
-#
-#    Common Desktop Environment (CDE)
-#
-#    Action and DataType Definition File
-#
-#      Generated by the CreateAction tool
-#
-#      $Revision: 1.0
-#
-#      $KEY: 3080
-#
-######################################################################
-#
-#    WARNING:
-#
-#    This file was generated by the CDE CreateAction tool.
-#    If this file is modified by some other tool, such as vi,
-#    the CreateAction tool will no longer be able to load and
-#    update this file.  For this reason, changes to this file
-#    should be handled through CreateAction whenever possible.
-#
-######################################################################
-
-ACTION Xlock
-{
-     LABEL         Xlock
-     TYPE          COMMAND
-     EXEC_STRING   xscreensaver-command -lock
-     ICON          Dtkey
-     WINDOW_TYPE   NO_STDIO
-}
-
-----8<----
-
-Lock.fp:
-
-CONTROL Lock
-{
-  TYPE                  icon
-  CONTAINER_NAME        Switch
-  CONTAINER_TYPE        SWITCH
-  POSITION_HINTS        1
-  ICON                  Fplock
-  LABEL                 Lock
-  PUSH_ACTION           Xlock
-  HELP_TOPIC            FPOnItemLock
-  HELP_VOLUME           FPanel
-}
-
-
-----8<----
-
-And the line in sessionetc:
-
-xscreensaver -lock -lock-timeout 20 -cycle 2 -timeout 3 -install&
-
-----8<----
-
-And the Style Manager change is obvious - switch off the CDE blank and
-lock.
-
-You now have a screensaver and lock program that runs when you log in,
-blanks your screen after 3 minutes, locks it after 20, and cycles through
-a list of nice graphics every 2.  I've also set the resources on mine to
-nicely fade in and out, rather than harsh cuts.  The really brilliant
-thing about xscreensaver is that you can plug in *any* screen-filling
-graphics program - xscreensaver handles the blanking and locking, and
-controls the running of the graphics.  The programs it runs and their
-arguements are controlled from the resource file, which comes with it and
-needs to be put in /usr/openwin/lib/app-defaults/.
-
-Clicking the "lock" in the front panel puts it straight into lock mode.
-
-Hope that's enough to get you going.
index c9ff754e07bba69bb2fcc450b4ff80e18a675be9..d9d285cb064c76a221635f3aa06d13e109f4f8f3 100644 (file)
    ************************************************************************* */
 
 /* Define this if you have the XReadDisplay extension (I think this is an
-   SGI-only thing; it's in <X11/extensions/readdisplay.h>.)  A couple of
-   the screenhacks will take advantage of this if it's available.
+   SGI-only thing; it's in <X11/extensions/readdisplay.h>.)  A few of the
+   screenhacks will take advantage of this if it's available.
  */
 #undef HAVE_READ_DISPLAY_EXTENSION
 
+/* Define this if you have the Iris Video Library (dmedia/vl.h on SGI.)
+   A few of the screenhacks will take advantage of this if it's available.
+ */
+#undef HAVE_SGI_VIDEO
+
 /* Define this if you have the XHPDisableReset function (an HP only thing.)
  */
 #undef HAVE_XHPDISABLERESET
  */
 #undef HAVE_SGI_SAVER_EXTENSION
 
+/*  Define this if you have the SGI-VIDEO-CONTROL extension.  This is standard
+ *  on Irix systems, and not available elsewhere.
+ */
+#undef HAVE_SGI_VC_EXTENSION
 
 
 /* *************************************************************************
 
 /* Define if you have the <unistd.h> header file.  */
 #undef HAVE_UNISTD_H
+
+/* Define to use sigaction() instead of signal() for SIGCHLD-related activity.
+   This is necessary at least on SCO OpenServer 5, due to a Unix kernel bug.
+ */
+#undef USE_SIGACTION
index 28f08460f2bb69ab17f97f17b540daac8a253c08..6f03ee5c1f0618165e9120da55247367702a0b4c 100755 (executable)
--- a/configure
+++ b/configure
@@ -50,6 +50,10 @@ ac_help="$ac_help
                           extension, if possible (this is the default).
   --without-xshm-ext      Do not compile in support for this extension."
 ac_help="$ac_help
+  --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL server
+                          extension, if possible (this is the default).
+  --without-sgivc-ext      Do not compile in support for this extension."
+ac_help="$ac_help
 
 Toolkit options:
 
@@ -75,6 +79,10 @@ ac_help="$ac_help
   --with-readdisplay      Include support for the XReadDisplay server
                           extension if possible (this is the default).
   --without-readdisplay   Do not compile in support for this extension."
+ac_help="$ac_help
+  --with-sgivideo         Include support for SGI's Iris Video Library
+                          if possible (this is the default).
+  --without-sgivideo       Do not compile in support for this library."
 ac_help="$ac_help
   --with-zippy=PROGRAM    Some demos are able to run an external program and
                           display its text; this names the program to use by
@@ -633,7 +641,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:637: checking host system type" >&5
+echo "configure:645: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -657,7 +665,7 @@ echo "$ac_t""$host" 1>&6
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:661: checking for $ac_word" >&5
+echo "configure:669: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -686,7 +694,7 @@ if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:690: checking for $ac_word" >&5
+echo "configure:698: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -734,7 +742,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:738: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:746: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -744,11 +752,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
 cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext <<EOF
-#line 748 "configure"
+#line 756 "configure"
 #include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -768,12 +776,12 @@ if test $ac_cv_prog_cc_works = no; then
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:772: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:780: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:777: checking whether we are using GNU C" >&5
+echo "configure:785: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -782,7 +790,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -797,7 +805,7 @@ if test $ac_cv_prog_gcc = yes; then
   ac_save_CFLAGS="$CFLAGS"
   CFLAGS=
   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:801: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:809: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -827,7 +835,7 @@ fi
 
 if test -z "$GCC"; then
   echo $ac_n "checking how to request ANSI compilation""... $ac_c" 1>&6
-echo "configure:831: checking how to request ANSI compilation" >&5
+echo "configure:839: checking how to request ANSI compilation" >&5
   case "$host" in
     *-hpux*)
       echo "$ac_t""HPUX: adding -Ae" 1>&6
@@ -845,16 +853,16 @@ fi
 
 
 echo $ac_n "checking whether the compiler works on ANSI C""... $ac_c" 1>&6
-echo "configure:849: checking whether the compiler works on ANSI C" >&5
+echo "configure:857: checking whether the compiler works on ANSI C" >&5
 if test "$cross_compiling" = yes; then
   { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 854 "configure"
+#line 862 "configure"
 #include "confdefs.h"
  main(int ac, char **av) { return 0; } 
 EOF
-if { (eval echo configure:858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   echo "$ac_t""yes" 1>&6
 else
@@ -883,7 +891,7 @@ esac
 
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:887: checking how to run the C preprocessor" >&5
+echo "configure:895: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -898,13 +906,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 902 "configure"
+#line 910 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -915,13 +923,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 919 "configure"
+#line 927 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -954,7 +962,7 @@ echo "$ac_t""$CPP" 1>&6
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:958: checking for a BSD compatible install" >&5
+echo "configure:966: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1004,7 +1012,7 @@ test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1008: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1016: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1032,12 +1040,12 @@ fi
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1036: checking for working const" >&5
+echo "configure:1044: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1041 "configure"
+#line 1049 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1086,7 +1094,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:1090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -1107,21 +1115,21 @@ EOF
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1111: checking for inline" >&5
+echo "configure:1119: checking for inline" >&5
 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 1118 "configure"
+#line 1126 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -1148,12 +1156,12 @@ esac
 
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1152: checking for ANSI C header files" >&5
+echo "configure:1160: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1157 "configure"
+#line 1165 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1161,7 +1169,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1178,7 +1186,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1182 "configure"
+#line 1190 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1196,7 +1204,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1200 "configure"
+#line 1208 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1217,7 +1225,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1221 "configure"
+#line 1229 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1228,7 +1236,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:1232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1252,12 +1260,12 @@ EOF
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1256: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:1264: checking whether time.h and sys/time.h may both be included" >&5
 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1261 "configure"
+#line 1269 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -1266,7 +1274,7 @@ int main() {
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:1270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -1287,12 +1295,12 @@ EOF
 fi
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1291: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:1299: checking for sys/wait.h that is POSIX.1 compatible" >&5
 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1296 "configure"
+#line 1304 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -1308,7 +1316,7 @@ wait (&s);
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:1312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -1333,12 +1341,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:1337: checking for $ac_hdr that defines DIR" >&5
+echo "configure:1345: checking for $ac_hdr that defines DIR" >&5
 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1342 "configure"
+#line 1350 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -1346,7 +1354,7 @@ int main() {
 DIR *dirp = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:1350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
@@ -1371,7 +1379,7 @@ done
 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 if test $ac_header_dirent = dirent.h; then
 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:1375: checking for opendir in -ldir" >&5
+echo "configure:1383: checking for opendir in -ldir" >&5
 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1379,7 +1387,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1383 "configure"
+#line 1391 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1390,7 +1398,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:1394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1412,7 +1420,7 @@ fi
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:1416: checking for opendir in -lx" >&5
+echo "configure:1424: checking for opendir in -lx" >&5
 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1420,7 +1428,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1424 "configure"
+#line 1432 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1431,7 +1439,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:1435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1455,12 +1463,12 @@ fi
 
 
 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:1459: checking for mode_t" >&5
+echo "configure:1467: checking for mode_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1464 "configure"
+#line 1472 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1488,12 +1496,12 @@ EOF
 fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:1492: checking for pid_t" >&5
+echo "configure:1500: checking for pid_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1497 "configure"
+#line 1505 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1521,12 +1529,12 @@ EOF
 fi
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:1525: checking return type of signal handlers" >&5
+echo "configure:1533: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1530 "configure"
+#line 1538 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -1543,7 +1551,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:1547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -1562,12 +1570,12 @@ EOF
 
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1566: checking for size_t" >&5
+echo "configure:1574: checking for size_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1571 "configure"
+#line 1579 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1597,12 +1605,12 @@ fi
 
 
 echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
-echo "configure:1601: checking how to call gettimeofday" >&5
+echo "configure:1609: checking how to call gettimeofday" >&5
 if eval "test \"`echo '$''{'ac_cv_gettimeofday_args'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1606 "configure"
+#line 1614 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                  #include <sys/time.h>
@@ -1610,7 +1618,7 @@ int main() {
 struct timeval tv; gettimeofday(&tv);
 ; return 0; }
 EOF
-if { (eval echo configure:1614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_gettimeofday_args=1
 else
@@ -1618,7 +1626,7 @@ else
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   cat > conftest.$ac_ext <<EOF
-#line 1622 "configure"
+#line 1630 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                  #include <sys/time.h>
@@ -1627,7 +1635,7 @@ struct timeval tv; struct timezone tzp;
                                  gettimeofday(&tv, &tzp);
 ; return 0; }
 EOF
-if { (eval echo configure:1631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_gettimeofday_args=2
 else
@@ -1667,12 +1675,12 @@ fi
 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1671: checking for $ac_func" >&5
+echo "configure:1679: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1676 "configure"
+#line 1684 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1695,7 +1703,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1723,17 +1731,17 @@ for ac_hdr in unistd.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1727: checking for $ac_hdr" >&5
+echo "configure:1735: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1732 "configure"
+#line 1740 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1785,7 +1793,7 @@ fi
 # Uses ac_ vars as temps to allow command line to override cache and checks.
 # --without-x overrides everything else, but does not touch the cache.
 echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:1789: checking for X" >&5
+echo "configure:1797: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -1847,12 +1855,12 @@ if test "$ac_x_includes" = NO; then
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 1851 "configure"
+#line 1859 "configure"
 #include "confdefs.h"
 #include <$x_direct_test_include>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1864: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1921,14 +1929,14 @@ if test "$ac_x_libraries" = NO; then
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1925 "configure"
+#line 1933 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:1932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   LIBS="$ac_save_LIBS"
 # We can link X programs with no special library path.
@@ -2034,17 +2042,17 @@ else
     case "`(uname -sr) 2>/dev/null`" in
     "SunOS 5"*)
       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
-echo "configure:2038: checking whether -R must be followed by a space" >&5
+echo "configure:2046: checking whether -R must be followed by a space" >&5
       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
       cat > conftest.$ac_ext <<EOF
-#line 2041 "configure"
+#line 2049 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_R_nospace=yes
 else
@@ -2060,14 +2068,14 @@ rm -f conftest*
       else
        LIBS="$ac_xsave_LIBS -R $x_libraries"
        cat > conftest.$ac_ext <<EOF
-#line 2064 "configure"
+#line 2072 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_R_space=yes
 else
@@ -2099,7 +2107,7 @@ rm -f conftest*
     # libraries were built with DECnet support.  And karl@cs.umb.edu says
     # the Alpha needs dnet_stub (dnet does not exist).
     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:2103: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:2111: checking for dnet_ntoa in -ldnet" >&5
 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2107,7 +2115,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2111 "configure"
+#line 2119 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2118,7 +2126,7 @@ int main() {
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:2122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2140,7 +2148,7 @@ fi
 
     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
-echo "configure:2144: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:2152: checking for dnet_ntoa in -ldnet_stub" >&5
 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2148,7 +2156,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet_stub  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2152 "configure"
+#line 2160 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2159,7 +2167,7 @@ int main() {
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:2163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2188,12 +2196,12 @@ fi
     # The nsl library prevents programs from opening the X display
     # on Irix 5.2, according to dickey@clark.net.
     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:2192: checking for gethostbyname" >&5
+echo "configure:2200: checking for gethostbyname" >&5
 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2197 "configure"
+#line 2205 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -2216,7 +2224,7 @@ gethostbyname();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
@@ -2237,7 +2245,7 @@ fi
 
     if test $ac_cv_func_gethostbyname = no; then
       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:2241: checking for gethostbyname in -lnsl" >&5
+echo "configure:2249: checking for gethostbyname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2245,7 +2253,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2249 "configure"
+#line 2257 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2256,7 +2264,7 @@ int main() {
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:2260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2286,12 +2294,12 @@ fi
     # -lsocket must be given before -lnsl if both are needed.
     # We assume that if connect needs -lnsl, so does gethostbyname.
     echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:2290: checking for connect" >&5
+echo "configure:2298: checking for connect" >&5
 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2295 "configure"
+#line 2303 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -2314,7 +2322,7 @@ connect();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
@@ -2335,7 +2343,7 @@ fi
 
     if test $ac_cv_func_connect = no; then
       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:2339: checking for connect in -lsocket" >&5
+echo "configure:2347: checking for connect in -lsocket" >&5
 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2343,7 +2351,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2347 "configure"
+#line 2355 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2354,7 +2362,7 @@ int main() {
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:2358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2378,12 +2386,12 @@ fi
 
     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
     echo $ac_n "checking for remove""... $ac_c" 1>&6
-echo "configure:2382: checking for remove" >&5
+echo "configure:2390: checking for remove" >&5
 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2387 "configure"
+#line 2395 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove(); below.  */
@@ -2406,7 +2414,7 @@ remove();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_remove=yes"
 else
@@ -2427,7 +2435,7 @@ fi
 
     if test $ac_cv_func_remove = no; then
       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:2431: checking for remove in -lposix" >&5
+echo "configure:2439: checking for remove in -lposix" >&5
 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2435,7 +2443,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lposix  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2439 "configure"
+#line 2447 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2446,7 +2454,7 @@ int main() {
 remove()
 ; return 0; }
 EOF
-if { (eval echo configure:2450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2470,12 +2478,12 @@ fi
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:2474: checking for shmat" >&5
+echo "configure:2482: checking for shmat" >&5
 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2479 "configure"
+#line 2487 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat(); below.  */
@@ -2498,7 +2506,7 @@ shmat();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_shmat=yes"
 else
@@ -2519,7 +2527,7 @@ fi
 
     if test $ac_cv_func_shmat = no; then
       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:2523: checking for shmat in -lipc" >&5
+echo "configure:2531: checking for shmat in -lipc" >&5
 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2527,7 +2535,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lipc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2531 "configure"
+#line 2539 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2538,7 +2546,7 @@ int main() {
 shmat()
 ; return 0; }
 EOF
-if { (eval echo configure:2542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2571,7 +2579,7 @@ fi
   # libraries we check for below, so use a different variable.
   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
-echo "configure:2575: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:2583: checking for IceConnectionNumber in -lICE" >&5
 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2579,7 +2587,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lICE  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2583 "configure"
+#line 2591 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2590,7 +2598,7 @@ int main() {
 IceConnectionNumber()
 ; return 0; }
 EOF
-if { (eval echo configure:2594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2627,7 +2635,7 @@ fi
 
 
     echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
-echo "configure:2631: checking for X app-defaults directory" >&5
+echo "configure:2639: checking for X app-defaults directory" >&5
 if eval "test \"`echo '$''{'ac_cv_x_app_defaults'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2736,6 +2744,12 @@ APPDEFAULTS=$ac_x_app_defaults
 #
 
 
+# Like AC_TRY_RUN, but it uses the already-computed -I directories.
+# (But not the -L directories!)
+#
+
+
+
 
 
 
@@ -2748,7 +2762,7 @@ APPDEFAULTS=$ac_x_app_defaults
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 2752 "configure"
+#line 2766 "configure"
 #include "confdefs.h"
 #include <X11/XHPlib.h>
 EOF
@@ -2769,7 +2783,7 @@ rm -f conftest*
 # Check for the availability of the XPointer typedef, and define it otherwise.
 #
 echo $ac_n "checking for XPointer""... $ac_c" 1>&6
-echo "configure:2773: checking for XPointer" >&5
+echo "configure:2787: checking for XPointer" >&5
 if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2780,14 +2794,14 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 2784 "configure"
+#line 2798 "configure"
 #include "confdefs.h"
 #include <X11/Xlib.h>
 int main() {
 XPointer foo = (XPointer) 0;
 ; return 0; }
 EOF
-if { (eval echo configure:2791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_xpointer=yes
 else
@@ -2839,7 +2853,7 @@ case "$host" in
 
       # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
       echo $ac_n "checking for regcmp in -lgen""... $ac_c" 1>&6
-echo "configure:2843: checking for regcmp in -lgen" >&5
+echo "configure:2857: checking for regcmp in -lgen" >&5
 ac_lib_var=`echo gen'_'regcmp | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2847,7 +2861,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgen  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2851 "configure"
+#line 2865 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2858,7 +2872,7 @@ int main() {
 regcmp()
 ; return 0; }
 EOF
-if { (eval echo configure:2862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2895,17 +2909,17 @@ have_xmu=no
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/Xmu/Error.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Xmu/Error.h""... $ac_c" 1>&6
-echo "configure:2899: checking for X11/Xmu/Error.h" >&5
+echo "configure:2913: checking for X11/Xmu/Error.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2904 "configure"
+#line 2918 "configure"
 #include "confdefs.h"
 #include <X11/Xmu/Error.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2949,7 +2963,7 @@ if test $have_xmu = yes ; then
   case "$host" in
     *-sunos4*)
     echo $ac_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug""... $ac_c" 1>&6
-echo "configure:2953: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
+echo "configure:2967: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
 if eval "test \"`echo '$''{'ac_cv_sunos_xmu_bug'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2962,14 +2976,14 @@ else
                    # with X libraries because we know it's SunOS.
                    LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
                    cat > conftest.$ac_ext <<EOF
-#line 2966 "configure"
+#line 2980 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_sunos_xmu_bug=no
 else
@@ -2985,21 +2999,21 @@ fi
 echo "$ac_t""$ac_cv_sunos_xmu_bug" 1>&6
     if test $ac_cv_sunos_xmu_bug = yes ; then
       echo $ac_n "checking whether the compiler understands -static""... $ac_c" 1>&6
-echo "configure:2989: checking whether the compiler understands -static" >&5
+echo "configure:3003: checking whether the compiler understands -static" >&5
 if eval "test \"`echo '$''{'ac_cv_ld_static'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LDFLAGS="$LDFLAGS"
                      LDFLAGS="$LDFLAGS -static"
                      cat > conftest.$ac_ext <<EOF
-#line 2996 "configure"
+#line 3010 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_ld_static=yes
 else
@@ -3045,17 +3059,17 @@ if test $with_sgi = yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/extensions/XScreenSaver.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/extensions/XScreenSaver.h""... $ac_c" 1>&6
-echo "configure:3049: checking for X11/extensions/XScreenSaver.h" >&5
+echo "configure:3063: checking for X11/extensions/XScreenSaver.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3054 "configure"
+#line 3068 "configure"
 #include "confdefs.h"
 #include <X11/extensions/XScreenSaver.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3059: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3073: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3110,17 +3124,17 @@ if test $have_sgi != yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/extensions/scrnsaver.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/extensions/scrnsaver.h""... $ac_c" 1>&6
-echo "configure:3114: checking for X11/extensions/scrnsaver.h" >&5
+echo "configure:3128: checking for X11/extensions/scrnsaver.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3119 "configure"
+#line 3133 "configure"
 #include "confdefs.h"
 #include <X11/extensions/scrnsaver.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3160,9 +3174,11 @@ fi
     LDFLAGS="$LDFLAGS -L$libdir"
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
-  LDFLAGS="$LDFLAGS -L$x_libraries"
+  if test \! -z "$x_libraries" ; then
+    LDFLAGS="$LDFLAGS -L$x_libraries"
+  fi
   echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6
-echo "configure:3166: checking for XScreenSaverRegister in -lXext" >&5
+echo "configure:3182: checking for XScreenSaverRegister in -lXext" >&5
 ac_lib_var=`echo Xext'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3170,7 +3186,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3174 "configure"
+#line 3190 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3181,7 +3197,7 @@ int main() {
 XScreenSaverRegister()
 ; return 0; }
 EOF
-if { (eval echo configure:3185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3228,9 +3244,11 @@ fi
     LDFLAGS="$LDFLAGS -L$libdir"
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
-  LDFLAGS="$LDFLAGS -L$x_libraries"
+  if test \! -z "$x_libraries" ; then
+    LDFLAGS="$LDFLAGS -L$x_libraries"
+  fi
   echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6
-echo "configure:3234: checking for XScreenSaverRegister in -lXExExt" >&5
+echo "configure:3252: checking for XScreenSaverRegister in -lXExExt" >&5
 ac_lib_var=`echo XExExt'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3238,7 +3256,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3242 "configure"
+#line 3260 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3249,7 +3267,7 @@ int main() {
 XScreenSaverRegister()
 ; return 0; }
 EOF
-if { (eval echo configure:3253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3291,9 +3309,11 @@ fi
     LDFLAGS="$LDFLAGS -L$libdir"
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
-  LDFLAGS="$LDFLAGS -L$x_libraries"
+  if test \! -z "$x_libraries" ; then
+    LDFLAGS="$LDFLAGS -L$x_libraries"
+  fi
   echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6
-echo "configure:3297: checking for XScreenSaverRegister in -lXss" >&5
+echo "configure:3317: checking for XScreenSaverRegister in -lXss" >&5
 ac_lib_var=`echo Xss'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3301,7 +3321,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXss -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3305 "configure"
+#line 3325 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3312,7 +3332,7 @@ int main() {
 XScreenSaverRegister()
 ; return 0; }
 EOF
-if { (eval echo configure:3316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3373,17 +3393,17 @@ if test $with_xidle = yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/extensions/xidle.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/extensions/xidle.h""... $ac_c" 1>&6
-echo "configure:3377: checking for X11/extensions/xidle.h" >&5
+echo "configure:3397: checking for X11/extensions/xidle.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3382 "configure"
+#line 3402 "configure"
 #include "confdefs.h"
 #include <X11/extensions/xidle.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3438,17 +3458,17 @@ if test $with_xshm = yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6
-echo "configure:3442: checking for X11/extensions/XShm.h" >&5
+echo "configure:3462: checking for X11/extensions/XShm.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3447 "configure"
+#line 3467 "configure"
 #include "confdefs.h"
 #include <X11/extensions/XShm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3482,17 +3502,17 @@ fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
-echo "configure:3486: checking for sys/ipc.h" >&5
+echo "configure:3506: checking for sys/ipc.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3491 "configure"
+#line 3511 "configure"
 #include "confdefs.h"
 #include <sys/ipc.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3527,17 +3547,17 @@ fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "sys/shm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/shm.h""... $ac_c" 1>&6
-echo "configure:3531: checking for sys/shm.h" >&5
+echo "configure:3551: checking for sys/shm.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3536 "configure"
+#line 3556 "configure"
 #include "confdefs.h"
 #include <sys/shm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3575,6 +3595,145 @@ elif test $with_xshm != no; then
 fi
 
 
+# Check for the SGI-VIDEO-CONTROL server extension header.
+#
+have_sgivc=no
+with_sgivc_req=unspecified
+# Check whether --with-sgivc-ext or --without-sgivc-ext was given.
+if test "${with_sgivc_ext+set}" = set; then
+  withval="$with_sgivc_ext"
+  with_sgivc="$withval"; with_sgivc_req="$withval"
+else
+  with_sgivc=yes
+fi
+
+if test $with_sgivc = yes; then
+
+  # first check for XSGIvc.h
+  
+  ac_save_CPPFLAGS="$CPPFLAGS"
+  if test \! -z "$includedir" ; then 
+    CPPFLAGS="$CPPFLAGS -I$includedir"
+  fi
+  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+  ac_safe=`echo "X11/extensions/XSGIvc.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for X11/extensions/XSGIvc.h""... $ac_c" 1>&6
+echo "configure:3622: checking for X11/extensions/XSGIvc.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 3627 "configure"
+#include "confdefs.h"
+#include <X11/extensions/XSGIvc.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  have_sgivc=yes
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  CPPFLAGS="$ac_save_CPPFLAGS"
+
+  # if that succeeded, then check for the -lXsgivc
+  if test $have_sgivc = yes; then
+    have_sgivc=no
+    
+  ac_save_CPPFLAGS="$CPPFLAGS"
+  ac_save_LDFLAGS="$LDFLAGS"
+  if test \! -z "$includedir" ; then 
+    CPPFLAGS="$CPPFLAGS -I$includedir"
+  fi
+  if test \! -z "$includedir" ; then 
+    CPPFLAGS="$CPPFLAGS -I$includedir"
+  fi
+  if test \! -z "$libdir" ; then
+    LDFLAGS="$LDFLAGS -L$libdir"
+  fi
+  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+  if test \! -z "$x_libraries" ; then
+    LDFLAGS="$LDFLAGS -L$x_libraries"
+  fi
+  echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6
+echo "configure:3675: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
+ac_lib_var=`echo Xsgivc'_'XSGIvcQueryGammaMap | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lXsgivc -lXext -lX11 $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3683 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char XSGIvcQueryGammaMap();
+
+int main() {
+XSGIvcQueryGammaMap()
+; return 0; }
+EOF
+if { (eval echo configure:3694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  CPPFLAGS="$ac_save_CPPFLAGS"
+  LDFLAGS="$ac_save_LDFLAGS"
+  fi
+
+  # if that succeeded, then we've really got it.
+  if test $have_sgivc = yes; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_SGI_VC_EXTENSION 1
+EOF
+
+  fi
+
+elif test $with_sgivc != no; then
+  echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
+  exit 1
+fi
+
+
+
+
+
+
+
+
 # Check for Motif and Athena --with and --without arguments.
 #
 have_motif=no
@@ -3634,17 +3793,17 @@ check_motif() {
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
-echo "configure:3638: checking for Xm/Xm.h" >&5
+echo "configure:3797: checking for Xm/Xm.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3643 "configure"
+#line 3802 "configure"
 #include "confdefs.h"
 #include <Xm/Xm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3648: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3807: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3682,17 +3841,17 @@ check_athena() {
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/Xaw/Dialog.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Xaw/Dialog.h""... $ac_c" 1>&6
-echo "configure:3686: checking for X11/Xaw/Dialog.h" >&5
+echo "configure:3845: checking for X11/Xaw/Dialog.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3691 "configure"
+#line 3850 "configure"
 #include "confdefs.h"
 #include <X11/Xaw/Dialog.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3727,6 +3886,7 @@ fi
 # If they asked for only athena, check athena then motif.
 # If they asked for neither, check motif then athena.
 
+proselytize_motif=yes
 if test $with_motif = yes; then
   # asked for both, or for motif only
   check_motif
@@ -3742,6 +3902,7 @@ elif test $with_athena = yes; then
   check_athena
   if test $have_athena = yes; then
     with_motif=no
+    proselytize_motif=no
   else
     check_motif
   fi
@@ -3757,12 +3918,15 @@ else
 
 fi
 
+if test $have_motif = yes; then
+  proselytize_motif=no
+fi
 
 # If we have Athena, check whether it's a version that includes
 # XawViewportSetCoordinates in Viewport.h (R3 (or R4?) don't.)
 if test $have_athena = yes ; then
   echo $ac_n "checking for XawViewportSetCoordinates in Viewport.h""... $ac_c" 1>&6
-echo "configure:3766: checking for XawViewportSetCoordinates in Viewport.h" >&5
+echo "configure:3930: checking for XawViewportSetCoordinates in Viewport.h" >&5
 if eval "test \"`echo '$''{'ac_cv_have_XawViewportSetCoordinates'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3774,7 +3938,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 3778 "configure"
+#line 3942 "configure"
 #include "confdefs.h"
 #include <X11/Xaw/Viewport.h>
 EOF
@@ -3803,7 +3967,7 @@ fi
 have_lesstif=no
 if test $have_motif = yes ; then
   echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6
-echo "configure:3807: checking whether Motif is really LessTif" >&5
+echo "configure:3971: checking whether Motif is really LessTif" >&5
 if eval "test \"`echo '$''{'ac_cv_have_lesstif'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3814,14 +3978,14 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 3818 "configure"
+#line 3982 "configure"
 #include "confdefs.h"
 #include <Xm/Xm.h>
 int main() {
 long vers = LesstifVersion;
 ; return 0; }
 EOF
-if { (eval echo configure:3825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_have_lesstif=yes
 else
@@ -3838,6 +4002,53 @@ echo "$ac_t""$ac_cv_have_lesstif" 1>&6
   have_lesstif=$ac_cv_have_lesstif
 fi
 
+# don't cache this
+unset ac_cv_good_lesstif
+
+good_lesstif=no
+if test $have_lesstif = yes ; then
+  # It must be at least "GNU Lesstif 0.82".
+  # #### If you change this, also sync the warning message lower down.
+  echo $ac_n "checking whether LessTif is of a recent enough vintage""... $ac_c" 1>&6
+echo "configure:4014: checking whether LessTif is of a recent enough vintage" >&5
+if eval "test \"`echo '$''{'ac_cv_good_lesstif'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+  ac_save_CPPFLAGS="$CPPFLAGS"
+  if test \! -z "$includedir" ; then 
+    CPPFLAGS="$CPPFLAGS -I$includedir"
+  fi
+  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+  if test "$cross_compiling" = yes; then
+  # cross compiling?  Make an ass out of umption.
+                              ac_cv_good_lesstif=yes
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4029 "configure"
+#include "confdefs.h"
+#include <Xm/Xm.h>
+                               int main() { exit(LesstifVersion < 82); }
+EOF
+if { (eval echo configure:4034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_good_lesstif=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_good_lesstif=no
+fi
+rm -fr conftest*
+fi
+
+  CPPFLAGS="$ac_save_CPPFLAGS"
+fi
+
+echo "$ac_t""$ac_cv_good_lesstif" 1>&6
+  good_lesstif=$ac_cv_good_lesstif
+fi
+
 
 # check for XPM header.
 #
@@ -3860,17 +4071,17 @@ if test $with_xpm = yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
-echo "configure:3864: checking for X11/xpm.h" >&5
+echo "configure:4075: checking for X11/xpm.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3869 "configure"
+#line 4080 "configure"
 #include "confdefs.h"
 #include <X11/xpm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3925,17 +4136,17 @@ if test $with_gl = yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6
-echo "configure:3929: checking for GL/gl.h" >&5
+echo "configure:4140: checking for GL/gl.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3934 "configure"
+#line 4145 "configure"
 #include "confdefs.h"
 #include <GL/gl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3966,17 +4177,17 @@ fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "GL/glx.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for GL/glx.h""... $ac_c" 1>&6
-echo "configure:3970: checking for GL/glx.h" >&5
+echo "configure:4181: checking for GL/glx.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3975 "configure"
+#line 4186 "configure"
 #include "confdefs.h"
 #include <GL/glx.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4016,7 +4227,7 @@ EOF
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 4020 "configure"
+#line 4231 "configure"
 #include "confdefs.h"
 #include <GL/glx.h>
 EOF
@@ -4066,17 +4277,17 @@ if test $with_readdisplay = yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/extensions/readdisplay.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/extensions/readdisplay.h""... $ac_c" 1>&6
-echo "configure:4070: checking for X11/extensions/readdisplay.h" >&5
+echo "configure:4281: checking for X11/extensions/readdisplay.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4075 "configure"
+#line 4286 "configure"
 #include "confdefs.h"
 #include <X11/extensions/readdisplay.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4107,6 +4318,116 @@ elif test $with_readdisplay != no; then
 fi
 
 
+# check for SGI's Iris Video Library header.
+#
+have_sgivideo=no
+with_sgivideo_req=unspecified
+# Check whether --with-sgivideo or --without-sgivideo was given.
+if test "${with_sgivideo+set}" = set; then
+  withval="$with_sgivideo"
+  with_sgivideo="$withval"; with_sgivideo_req="$withval"
+else
+  with_sgivideo=yes
+fi
+
+if test $with_sgivideo = yes; then
+  
+  ac_save_CPPFLAGS="$CPPFLAGS"
+  if test \! -z "$includedir" ; then 
+    CPPFLAGS="$CPPFLAGS -I$includedir"
+  fi
+  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+  ac_safe=`echo "dmedia/vl.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for dmedia/vl.h""... $ac_c" 1>&6
+echo "configure:4343: checking for dmedia/vl.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4348 "configure"
+#include "confdefs.h"
+#include <dmedia/vl.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  have_sgivideo=yes
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  CPPFLAGS="$ac_save_CPPFLAGS"
+  if test $have_sgivideo = yes; then
+    have_sgivideo=no
+    echo $ac_n "checking for vlOpenVideo in -lvl""... $ac_c" 1>&6
+echo "configure:4378: checking for vlOpenVideo in -lvl" >&5
+ac_lib_var=`echo vl'_'vlOpenVideo | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lvl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4386 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char vlOpenVideo();
+
+int main() {
+vlOpenVideo()
+; return 0; }
+EOF
+if { (eval echo configure:4397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  have_sgivideo=yes
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    if test $have_sgivideo = yes; then
+      SGI_VIDEO_OBJS="$(UTILS_SRC)/sgivideo.o"
+      SGI_VIDEO_LIBS="-lvl"
+      cat >> confdefs.h <<\EOF
+#define HAVE_SGI_VIDEO 1
+EOF
+
+    fi
+  fi
+elif test $with_sgivideo != no; then
+  echo "error: must be yes or no: --with-sgivideo=$with_sgivideo"
+  exit 1
+fi
+
+
 
 # Try to find a program to generate random text.
 #
@@ -4120,32 +4441,87 @@ fi
 # If that doesn't work, look in /usr/games, and if it's there, use
 # the full pathname.
 #
-with_zippy=""
+with_zippy_req=""
 # Check whether --with-zippy or --without-zippy was given.
 if test "${with_zippy+set}" = set; then
   withval="$with_zippy"
-  with_zippy="$withval"
+   with_zippy_req="$withval"; with_zippy="$withval" 
+else
+   with_zippy_req="$withval"; with_zippy="$withval" 
 fi
 
 
 if test "$with_zippy" = no || test "$with_zippy" = yes ; then
-  $with_zippy=""
+  with_zippy=""
+  with_zippy_req=""
+fi
+
+if test -n "$with_zippy_req" ; then
+  ac_cv_zippy_program=""
+  case "$with_zippy_req" in
+    /*)
+      echo $ac_n "checking for $with_zippy_req""... $ac_c" 1>&6
+echo "configure:4465: checking for $with_zippy_req" >&5
+      if test -x "$with_zippy_req" ; then
+        echo "$ac_t""yes" 1>&6
+      else
+        echo "$ac_t""no" 1>&6
+        with_zippy=""
+      fi
+    ;;
+    *)
+      # don't cache
+      unset ac_cv_path_zip2
+      # Extract the first word of "$with_zippy_req", so it can be a program name with args.
+set dummy $with_zippy_req; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:4479: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_zip2'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$zip2" in
+  /*)
+  ac_cv_path_zip2="$zip2" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_zip2="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac
+fi
+zip2="$ac_cv_path_zip2"
+if test -n "$zip2"; then
+  echo "$ac_t""$zip2" 1>&6
+else
+  echo "$ac_t""no" 1>&6
 fi
 
-if test -n "$with_zippy" ; then
+      if test "$zip2" = ""; then
+        with_zippy=""
+      fi
+    ;;
+  esac
   ac_cv_zippy_program="$with_zippy"
 
 elif test -n "$ac_cv_zippy_program"; then
   echo "$ac_t""checking for zippy... (cached) $ac_cv_zippy_program" 1>&6
+fi
 
-else
+if test ! -n "$ac_cv_zippy_program"; then
 
   for ac_prog in emacs
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4149: checking for $ac_word" >&5
+echo "configure:4525: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_emacs_exe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4178,7 +4554,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4182: checking for $ac_word" >&5
+echo "configure:4558: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_xemacs_exe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4212,7 +4588,7 @@ done
 
   if test -n "$emacs_exe" ; then
     echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
-echo "configure:4216: checking for emacs yow" >&5
+echo "configure:4592: checking for emacs yow" >&5
     #
     # get emacs to tell us where the libexec directory is.
     #
@@ -4234,7 +4610,7 @@ echo "configure:4216: checking for emacs yow" >&5
 
   if test -z "$ac_cv_zippy_program" ; then
     echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6
-echo "configure:4238: checking for xemacs yow" >&5
+echo "configure:4614: checking for xemacs yow" >&5
     if test -n "$xemacs_exe" ; then
       #
       # get xemacs to tell us where the libexec directory is.
@@ -4280,7 +4656,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4284: checking for $ac_word" >&5
+echo "configure:4660: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_fortune'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4315,7 +4691,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4319: checking for $ac_word" >&5
+echo "configure:4695: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_fortune'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4394,7 +4770,7 @@ fi
 
   if test $with_kerberos = yes; then
     echo $ac_n "checking for Kerberos""... $ac_c" 1>&6
-echo "configure:4398: checking for Kerberos" >&5
+echo "configure:4774: checking for Kerberos" >&5
 if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4405,14 +4781,14 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 4409 "configure"
+#line 4785 "configure"
 #include "confdefs.h"
 #include <krb.h>
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_kerberos=yes
 else
@@ -4462,7 +4838,7 @@ fi
   #
   if test $passwd_cruft_done = no ; then
     echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6
-echo "configure:4466: checking for Sun-style shadow passwords" >&5
+echo "configure:4842: checking for Sun-style shadow passwords" >&5
 if eval "test \"`echo '$''{'ac_cv_sun_adjunct'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4473,7 +4849,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 4477 "configure"
+#line 4853 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                      #include <unistd.h>
@@ -4486,7 +4862,7 @@ struct passwd_adjunct *p = getpwanam("nobody");
                         const char *pw = p->pwa_passwd;
 ; return 0; }
 EOF
-if { (eval echo configure:4490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sun_adjunct=yes
 else
@@ -4515,7 +4891,7 @@ EOF
   #
   if test $passwd_cruft_done = no ; then
     echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6
-echo "configure:4519: checking for DEC-style shadow passwords" >&5
+echo "configure:4895: checking for DEC-style shadow passwords" >&5
 if eval "test \"`echo '$''{'ac_cv_enhanced_passwd'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4526,7 +4902,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 4530 "configure"
+#line 4906 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                      #include <unistd.h>
@@ -4543,7 +4919,7 @@ struct pr_passwd *p;
                         pw = p->ufld.fd_encrypt;
 ; return 0; }
 EOF
-if { (eval echo configure:4547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_enhanced_passwd=yes
 else
@@ -4569,7 +4945,7 @@ EOF
       # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
       # (I'm told it needs -lcurses too, but I don't understand why.)
       echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6
-echo "configure:4573: checking for getprpwnam in -lprot" >&5
+echo "configure:4949: checking for getprpwnam in -lprot" >&5
 ac_lib_var=`echo prot'_'getprpwnam | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4577,7 +4953,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lprot -lx $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4581 "configure"
+#line 4957 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4588,7 +4964,7 @@ int main() {
 getprpwnam()
 ; return 0; }
 EOF
-if { (eval echo configure:4592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4608,7 +4984,7 @@ else
   echo "$ac_t""no" 1>&6
 # On DEC, getprpwnam() is in -lsecurity
                    echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
-echo "configure:4612: checking for getprpwnam in -lsecurity" >&5
+echo "configure:4988: checking for getprpwnam in -lsecurity" >&5
 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4616,7 +4992,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsecurity  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4620 "configure"
+#line 4996 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4627,7 +5003,7 @@ int main() {
 getprpwnam()
 ; return 0; }
 EOF
-if { (eval echo configure:4631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4656,7 +5032,7 @@ fi
   #
   if test $passwd_cruft_done = no ; then
     echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6
-echo "configure:4660: checking for HP-style shadow passwords" >&5
+echo "configure:5036: checking for HP-style shadow passwords" >&5
 if eval "test \"`echo '$''{'ac_cv_hpux_passwd'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4667,7 +5043,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 4671 "configure"
+#line 5047 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                      #include <unistd.h>
@@ -4680,7 +5056,7 @@ struct s_passwd *p = getspwnam("nobody");
                         const char *pw = p->pw_passwd;
 ; return 0; }
 EOF
-if { (eval echo configure:4684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_hpux_passwd=yes
 else
@@ -4705,7 +5081,7 @@ EOF
 
       # on HPUX, bigcrypt is in -lsec
       echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
-echo "configure:4709: checking for bigcrypt in -lsec" >&5
+echo "configure:5085: checking for bigcrypt in -lsec" >&5
 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4713,7 +5089,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsec  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4717 "configure"
+#line 5093 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4724,7 +5100,7 @@ int main() {
 bigcrypt()
 ; return 0; }
 EOF
-if { (eval echo configure:4728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4751,7 +5127,7 @@ fi
   #
   if test $passwd_cruft_done = no ; then
     echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6
-echo "configure:4755: checking for generic shadow passwords" >&5
+echo "configure:5131: checking for generic shadow passwords" >&5
 if eval "test \"`echo '$''{'ac_cv_shadow'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4762,7 +5138,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 4766 "configure"
+#line 5142 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                      #include <unistd.h>
@@ -4774,7 +5150,7 @@ struct spwd *p = getspnam("nobody");
                         const char *pw = p->sp_pwdp;
 ; return 0; }
 EOF
-if { (eval echo configure:4778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_shadow=yes
 else
@@ -4800,7 +5176,7 @@ EOF
       # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
       have_getspnam=no
       echo $ac_n "checking for getspnam in -lc""... $ac_c" 1>&6
-echo "configure:4804: checking for getspnam in -lc" >&5
+echo "configure:5180: checking for getspnam in -lc" >&5
 ac_lib_var=`echo c'_'getspnam | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4808,7 +5184,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4812 "configure"
+#line 5188 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4819,7 +5195,7 @@ int main() {
 getspnam()
 ; return 0; }
 EOF
-if { (eval echo configure:4823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4841,7 +5217,7 @@ fi
 
       if test $have_getspnam = no ; then
         echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
-echo "configure:4845: checking for getspnam in -lgen" >&5
+echo "configure:5221: checking for getspnam in -lgen" >&5
 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4849,7 +5225,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgen  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4853 "configure"
+#line 5229 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4860,7 +5236,7 @@ int main() {
 getspnam()
 ; return 0; }
 EOF
-if { (eval echo configure:4864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4887,7 +5263,7 @@ fi
   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
   have_crypt=no
   echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6
-echo "configure:4891: checking for crypt in -lc" >&5
+echo "configure:5267: checking for crypt in -lc" >&5
 ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4895,7 +5271,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4899 "configure"
+#line 5275 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4906,7 +5282,7 @@ int main() {
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:4910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4928,7 +5304,7 @@ fi
 
   if test $have_crypt = no ; then
     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:4932: checking for crypt in -lcrypt" >&5
+echo "configure:5308: checking for crypt in -lcrypt" >&5
 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4936,7 +5312,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcrypt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4940 "configure"
+#line 5316 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4947,7 +5323,7 @@ int main() {
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:4951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5090,6 +5466,8 @@ fi
 
 
 
+
+
 
 
 
@@ -5097,16 +5475,31 @@ fi
 #
 warning=no
 warnsep='    #################################################################'
-warn() {
+warnpre() {
   if test $warning = no ; then
     echo '' ; echo "$warnsep" ; echo ''
     warning=yes
   fi
-  echo "    Warning:" $*
+}
+
+warn() {
+  warnpre
+  if test $warning = long ; then echo '' ; fi
+  warning=yes
+  echo "    Warning: $@"
+}
+
+warnL() {
+  was=$warning
+  warnpre
+  warning=yes
+  if test $was != no ; then echo '' ; fi
+  echo "    Warning: $@"
 }
 
 warn2() {
-  echo "            " $*
+  echo "             $@"
+  warning=long
 }
 
 if test $with_sgi_req = yes -a $have_sgi = no ; then
@@ -5125,24 +5518,41 @@ if test $with_xshm_req = yes -a $have_xshm = no ; then
   warn 'The XSHM extension was requested, but was not found.'
 fi
 
+if test $with_sgivc_req = yes -a $have_sgivc = no ; then
+  warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
+fi
+
 if test $have_motif = no -a $have_athena = no ; then
-  warn  "Neither Motif nor Athena widgets seem to be available;"
+  warnL "Neither Motif nor Athena widgets seem to be available;"
   warn2 "one or the other is required."
+  proselytize_motif=no
 
 elif test $with_motif_req = yes -a $have_motif = no ; then
-  warn  "Use of Motif was requested, but it wasn't found;"
+  warnL "Use of Motif was requested, but it wasn't found;"
   warn2 "Athena will be used instead."
 
 elif test $with_athena_req = yes -a $have_athena = no ; then
-  warn  "Use of Athena was requested, but it wasn't found;"
+  warnL "Use of Athena was requested, but it wasn't found;"
   warn2 "Motif will be used instead."
 fi
 
 if test $have_motif = yes -a $have_lesstif = yes ; then
-  warn  "Motif is being used, but it appears to actually be LessTif."
-  warn2 "XScreenSaver has been reported to have problems with some"
-  warn2 "versions of LessTif (notably 0.79).  You might want to use"
-  warn2 "Athena instead."
+  if test $good_lesstif != yes ; then
+    warnL "Motif is being used, but it appears to actually be"
+    warn2 "LessTif, and the version number is less than 0.82!"
+    warn2 "Such old versions of LessTif are too buggy to use"
+    warn2 "with XScreenSaver; it is strongly recommended that"
+    warn2 "you upgrade!  See <http://www.lesstif.org/>."
+  fi
+fi
+
+if test $proselytize_motif = yes ; then
+    warnL "Athena widgets are being used instead of Motif."
+    warn2 "XScreenSaver looks much better with Motif, and has"
+    warn2 "a few extra features as well.  Wouldn't you rather"
+    warn2 "be using Motif?  It is shipped by every commercial"
+    warn2 "Unix vendor; and there is a free implementation"
+    warn2 "available as well: see <http://www.lesstif.org/>."
 fi
 
 if test $with_xpm_req = yes -a $have_xpm = no ; then
@@ -5157,6 +5567,10 @@ if test $with_readdisplay_req = yes -a $have_readdisplay = no ; then
   warn 'Use of XReadDisplay was requested, but it was not found.'
 fi
 
+if test $with_sgivideo_req = yes -a $have_sgivideo = no ; then
+  warn 'Use of the Iris Video Library was requested, but it was not found.'
+fi
+
 if test $with_kerberos_req = yes -a $have_kerberos = no ; then
   warn 'Use of Kerberos was requested, but it was not found.'
 fi
@@ -5165,7 +5579,14 @@ if test $with_shadow_req = yes -a $have_shadow = no ; then
   warn 'Use of shadow passwords was requested, but they were not found.'
 fi
 
-if test $warning = yes; then
+if test -n "$with_zippy_req"; then
+  if test "$with_zippy_req" != "$ac_cv_zippy_program" ; then
+    warnL "$with_zippy_req was requested as the Zippy program,"
+    warn2 "but was not found.  The default will be used instead."
+  fi
+fi
+
+if test $warning != no; then
   echo '' ; echo "$warnsep" ; echo ''
 fi
 
@@ -5320,6 +5741,7 @@ s%@X_CFLAGS@%$X_CFLAGS%g
 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
 s%@X_LIBS@%$X_LIBS%g
 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
+s%@zip2@%$zip2%g
 s%@emacs_exe@%$emacs_exe%g
 s%@xemacs_exe@%$xemacs_exe%g
 s%@fortune@%$fortune%g
@@ -5331,6 +5753,8 @@ s%@GL_LIBS@%$GL_LIBS%g
 s%@PASSWD_LIBS@%$PASSWD_LIBS%g
 s%@INSTALL_SETUID@%$INSTALL_SETUID%g
 s%@NEED_SETUID@%$NEED_SETUID%g
+s%@SGI_VIDEO_OBJS@%$SGI_VIDEO_OBJS%g
+s%@SGI_VIDEO_LIBS@%$SGI_VIDEO_LIBS%g
 s%@DIALOG_SRCS@%$DIALOG_SRCS%g
 s%@DIALOG_OBJS@%$DIALOG_OBJS%g
 s%@PASSWD_SRCS@%$PASSWD_SRCS%g
index 8fa05ce0721aef865dc8077ad0080b83c5548357..76ce4d2edcc10ce498b13b64d7ced16e30bcbb7f 100644 (file)
@@ -274,11 +274,26 @@ AC_DEFUN(AC_CHECK_X_LIB, [
     LDFLAGS="$LDFLAGS -L$libdir"
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
-  LDFLAGS="$LDFLAGS -L$x_libraries"
+  if test \! -z "$x_libraries" ; then
+    LDFLAGS="$LDFLAGS -L$x_libraries"
+  fi
   AC_CHECK_LIB([$1], [$2], [$3], [$4], [$5])
   CPPFLAGS="$ac_save_CPPFLAGS"
   LDFLAGS="$ac_save_LDFLAGS"])
 
+# Like AC_TRY_RUN, but it uses the already-computed -I directories.
+# (But not the -L directories!)
+#
+AC_DEFUN(AC_TRY_X_RUN, [
+  ac_save_CPPFLAGS="$CPPFLAGS"
+  if test \! -z "$includedir" ; then 
+    CPPFLAGS="$CPPFLAGS -I$includedir"
+  fi
+  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+  AC_TRY_RUN([$1], [$2], [$3], [$4])
+  CPPFLAGS="$ac_save_CPPFLAGS"])
+
+
 
 
 
@@ -519,6 +534,45 @@ elif test $with_xshm != no; then
 fi
 
 
+# Check for the SGI-VIDEO-CONTROL server extension header.
+#
+have_sgivc=no
+with_sgivc_req=unspecified
+AC_ARG_WITH(sgivc-ext,
+[  --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL server
+                          extension, if possible (this is the default).
+  --without-sgivc-ext     Do not compile in support for this extension.],
+  [with_sgivc="$withval"; with_sgivc_req="$withval"],[with_sgivc=yes])
+if test $with_sgivc = yes; then
+
+  # first check for XSGIvc.h
+  AC_CHECK_X_HEADER(X11/extensions/XSGIvc.h, [have_sgivc=yes])
+
+  # if that succeeded, then check for the -lXsgivc
+  if test $have_sgivc = yes; then
+    have_sgivc=no
+    AC_CHECK_X_LIB(Xsgivc, XSGIvcQueryGammaMap,
+                 [have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"], [],
+                 -lXext -lX11)
+  fi
+
+  # if that succeeded, then we've really got it.
+  if test $have_sgivc = yes; then
+    AC_DEFINE(HAVE_SGI_VC_EXTENSION)
+  fi
+
+elif test $with_sgivc != no; then
+  echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
+  exit 1
+fi
+
+
+
+
+
+
+
+
 # Check for Motif and Athena --with and --without arguments.
 #
 have_motif=no
@@ -585,6 +639,7 @@ check_athena() {
 # If they asked for only athena, check athena then motif.
 # If they asked for neither, check motif then athena.
 
+proselytize_motif=yes
 if test $with_motif = yes; then
   # asked for both, or for motif only
   check_motif
@@ -600,6 +655,7 @@ elif test $with_athena = yes; then
   check_athena
   if test $have_athena = yes; then
     with_motif=no
+    proselytize_motif=no
   else
     check_motif
   fi
@@ -615,6 +671,9 @@ else
 
 fi
 
+if test $have_motif = yes; then
+  proselytize_motif=no
+fi
 
 # If we have Athena, check whether it's a version that includes
 # XawViewportSetCoordinates in Viewport.h (R3 (or R4?) don't.)
@@ -644,6 +703,24 @@ if test $have_motif = yes ; then
   have_lesstif=$ac_cv_have_lesstif
 fi
 
+# don't cache this
+unset ac_cv_good_lesstif
+
+good_lesstif=no
+if test $have_lesstif = yes ; then
+  # It must be at least "GNU Lesstif 0.82".
+  # #### If you change this, also sync the warning message lower down.
+  AC_CACHE_CHECK([whether LessTif is of a recent enough vintage],
+                ac_cv_good_lesstif,
+                [AC_TRY_X_RUN([#include <Xm/Xm.h>
+                               int main() { exit(LesstifVersion < 82); }],
+                              [ac_cv_good_lesstif=yes],
+                              [ac_cv_good_lesstif=no],
+                              # cross compiling?  Make an ass out of umption.
+                              [ac_cv_good_lesstif=yes])])
+  good_lesstif=$ac_cv_good_lesstif
+fi
+
 
 # check for XPM header.
 #
@@ -723,6 +800,33 @@ elif test $with_readdisplay != no; then
 fi
 
 
+# check for SGI's Iris Video Library header.
+#
+have_sgivideo=no
+with_sgivideo_req=unspecified
+AC_ARG_WITH(sgivideo,
+[  --with-sgivideo         Include support for SGI's Iris Video Library
+                          if possible (this is the default).
+  --without-sgivideo       Do not compile in support for this library.],
+  [with_sgivideo="$withval"; with_sgivideo_req="$withval"],
+  [with_sgivideo=yes])
+if test $with_sgivideo = yes; then
+  AC_CHECK_X_HEADER(dmedia/vl.h, have_sgivideo=yes)
+  if test $have_sgivideo = yes; then
+    have_sgivideo=no
+    AC_CHECK_LIB(vl, vlOpenVideo, have_sgivideo=yes)
+    if test $have_sgivideo = yes; then
+      SGI_VIDEO_OBJS="$(UTILS_SRC)/sgivideo.o"
+      SGI_VIDEO_LIBS="-lvl"
+      AC_DEFINE(HAVE_SGI_VIDEO)
+    fi
+  fi
+elif test $with_sgivideo != no; then
+  echo "error: must be yes or no: --with-sgivideo=$with_sgivideo"
+  exit 1
+fi
+
+
 
 # Try to find a program to generate random text.
 #
@@ -736,7 +840,7 @@ fi
 # If that doesn't work, look in /usr/games, and if it's there, use
 # the full pathname.
 #
-with_zippy=""
+with_zippy_req=""
 AC_ARG_WITH(zippy,
 [  --with-zippy=PROGRAM    Some demos are able to run an external program and
                           display its text; this names the program to use by
@@ -744,19 +848,42 @@ AC_ARG_WITH(zippy,
                           resources.)  If you don't specify this, the default
                           is to use \"yow\" from the Emacs distribution (if you
                           have it) or else to use \"fortune\".],
-  [with_zippy="$withval"])
+  [ with_zippy_req="$withval"; with_zippy="$withval" ],
+  [ with_zippy_req="$withval"; with_zippy="$withval" ])
 
 if test "$with_zippy" = no || test "$with_zippy" = yes ; then
-  $with_zippy=""
+  with_zippy=""
+  with_zippy_req=""
 fi
 
-if test -n "$with_zippy" ; then
+if test -n "$with_zippy_req" ; then
+  ac_cv_zippy_program=""
+  case "$with_zippy_req" in
+    /*)
+      AC_MSG_CHECKING([for $with_zippy_req])
+      if test -x "$with_zippy_req" ; then
+        AC_MSG_RESULT(yes)
+      else
+        AC_MSG_RESULT(no)
+        with_zippy=""
+      fi
+    ;;
+    *)
+      # don't cache
+      unset ac_cv_path_zip2
+      AC_PATH_PROG(zip2, $with_zippy_req, [])
+      if test "$zip2" = ""; then
+        with_zippy=""
+      fi
+    ;;
+  esac
   ac_cv_zippy_program="$with_zippy"
 
 elif test -n "$ac_cv_zippy_program"; then
   AC_MSG_RESULT([checking for zippy... (cached) $ac_cv_zippy_program])
+fi
 
-else
+if test ! -n "$ac_cv_zippy_program"; then
 
   AC_CHECK_PROGS(emacs_exe, emacs)
   AC_CHECK_PROGS(xemacs_exe, xemacs)
@@ -1117,6 +1244,8 @@ AC_SUBST(GL_LIBS)
 AC_SUBST(PASSWD_LIBS)
 AC_SUBST(INSTALL_SETUID)
 AC_SUBST(NEED_SETUID)
+AC_SUBST(SGI_VIDEO_OBJS)
+AC_SUBST(SGI_VIDEO_LIBS)
 
 AC_SUBST(DIALOG_SRCS)
 AC_SUBST(DIALOG_OBJS)
@@ -1140,16 +1269,31 @@ AC_SUBST(DEPEND_DEFINES)
 #
 warning=no
 warnsep='    #################################################################'
-warn() {
+warnpre() {
   if test $warning = no ; then
     echo '' ; echo "$warnsep" ; echo ''
     warning=yes
   fi
-  echo "    Warning:" $*
+}
+
+warn() {
+  warnpre
+  if test $warning = long ; then echo '' ; fi
+  warning=yes
+  echo "    Warning: $@"
+}
+
+warnL() {
+  was=$warning
+  warnpre
+  warning=yes
+  if test $was != no ; then echo '' ; fi
+  echo "    Warning: $@"
 }
 
 warn2() {
-  echo "            " $*
+  echo "             $@"
+  warning=long
 }
 
 if test $with_sgi_req = yes -a $have_sgi = no ; then
@@ -1168,24 +1312,41 @@ if test $with_xshm_req = yes -a $have_xshm = no ; then
   warn 'The XSHM extension was requested, but was not found.'
 fi
 
+if test $with_sgivc_req = yes -a $have_sgivc = no ; then
+  warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
+fi
+
 if test $have_motif = no -a $have_athena = no ; then
-  warn  "Neither Motif nor Athena widgets seem to be available;"
+  warnL "Neither Motif nor Athena widgets seem to be available;"
   warn2 "one or the other is required."
+  proselytize_motif=no
 
 elif test $with_motif_req = yes -a $have_motif = no ; then
-  warn  "Use of Motif was requested, but it wasn't found;"
+  warnL "Use of Motif was requested, but it wasn't found;"
   warn2 "Athena will be used instead."
 
 elif test $with_athena_req = yes -a $have_athena = no ; then
-  warn  "Use of Athena was requested, but it wasn't found;"
+  warnL "Use of Athena was requested, but it wasn't found;"
   warn2 "Motif will be used instead."
 fi
 
 if test $have_motif = yes -a $have_lesstif = yes ; then
-  warn  "Motif is being used, but it appears to actually be LessTif."
-  warn2 "XScreenSaver has been reported to have problems with some"
-  warn2 "versions of LessTif (notably 0.79).  You might want to use"
-  warn2 "Athena instead."
+  if test $good_lesstif != yes ; then
+    warnL "Motif is being used, but it appears to actually be"
+    warn2 "LessTif, and the version number is less than 0.82!"
+    warn2 "Such old versions of LessTif are too buggy to use"
+    warn2 "with XScreenSaver; it is strongly recommended that"
+    warn2 "you upgrade!  See <http://www.lesstif.org/>."
+  fi
+fi
+
+if test $proselytize_motif = yes ; then
+    warnL "Athena widgets are being used instead of Motif."
+    warn2 "XScreenSaver looks much better with Motif, and has"
+    warn2 "a few extra features as well.  Wouldn't you rather"
+    warn2 "be using Motif?  It is shipped by every commercial"
+    warn2 "Unix vendor; and there is a free implementation"
+    warn2 "available as well: see <http://www.lesstif.org/>."
 fi
 
 if test $with_xpm_req = yes -a $have_xpm = no ; then
@@ -1200,6 +1361,10 @@ if test $with_readdisplay_req = yes -a $have_readdisplay = no ; then
   warn 'Use of XReadDisplay was requested, but it was not found.'
 fi
 
+if test $with_sgivideo_req = yes -a $have_sgivideo = no ; then
+  warn 'Use of the Iris Video Library was requested, but it was not found.'
+fi
+
 if test $with_kerberos_req = yes -a $have_kerberos = no ; then
   warn 'Use of Kerberos was requested, but it was not found.'
 fi
@@ -1208,7 +1373,14 @@ if test $with_shadow_req = yes -a $have_shadow = no ; then
   warn 'Use of shadow passwords was requested, but they were not found.'
 fi
 
-if test $warning = yes; then
+if test -n "$with_zippy_req"; then
+  if test "$with_zippy_req" != "$ac_cv_zippy_program" ; then
+    warnL "$with_zippy_req was requested as the Zippy program,"
+    warn2 "but was not found.  The default will be used instead."
+  fi
+fi
+
+if test $warning != no; then
   echo '' ; echo "$warnsep" ; echo ''
 fi
 
index 2bf4b091aab583fa2535641994a1ef0e5eb927fe..7164ecce15e42d184d15f79ab0c0e56ac46c7180 100644 (file)
@@ -185,7 +185,7 @@ depend: XScreenSaver_ad.h
 # close.  This excludes dependencies on files in /usr/include, etc.  It tries
 # to include only dependencies on files which are themselves a part of this
 # package.
-distdepend: XScreenSaver_ad.h
+distdepend: update_ad_version XScreenSaver_ad.h
        @echo updating dependencies in `pwd`/Makefile.in... ;               \
        $(DEPEND) -w 0 -f -                                                 \
        -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
@@ -202,6 +202,26 @@ distdepend: XScreenSaver_ad.h
        mv Makefile.in Makefile.in.bak &&                                   \
        mv /tmp/distdepend.$$$$ Makefile.in
 
+# Updates the version number in the app-defaults file to be in sync with 
+# the version number in version.h.  This is so people can tell when they
+# have a version skew between the app-defaults file and the executable.
+update_ad_version::
+       @S=XScreenSaver.ad.in ;                                             \
+       U=$(UTILS_SRC)/version.h ;                                          \
+       V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ;             \
+       echo -n "Updating version number in $$S to $$V... " ;               \
+       T=/tmp/xs.$$$$ ;                                                    \
+       sed "s/\(.*version \)[0-9][0-9]*\.[0-9]*\(.*\)/\1$$V\2/"            \
+         < $$S > $$T ;                                                     \
+       if cmp -s $$S $$T ; then                                            \
+         echo "unchanged." ;                                               \
+       else                                                                \
+         cat $$T > $$S ;                                                   \
+         echo "done." ;                                                    \
+       fi ;                                                                \
+       rm $$T
+
+
 TAGS: tags
 tags:
        find $(srcdir) -name '*.[chly]' -print | xargs etags -a
index 67923746973a45a88904f17e461e7fda8538e0cf..6e02a53261b2f7df70f119c0fa9114dcd4a824b0 100644 (file)
@@ -1,4 +1,11 @@
-! app-defaults file for XScreenSaver by Jamie Zawinski.
+!
+!                              XScreenSaver
+!
+!            a screen saver and locker for the X window system
+!                            by Jamie Zawinski
+!
+!                              version 2.14
+!
 ! See "man xscreensaver" for more info.  The latest version is always
 ! available at http://people.netscape.com/jwz/xscreensaver/
 
 ! metacharacters are used, they must be understandable to `sh', not `csh'
 ! (the $SHELL variable is not consulted, for unfortunate but good reasons.)
 !
-*programs:     qix -root                                               \n\
-               qix -root -solid -delay 0 -segments 100                 \n\
-               qix -root -linear -count 10 -size 100 -segments 200     \n\
+! Be sure to check out Demo Mode: run the command `xscreensaver-command -demo'
+! and it will cause the running XScreenSaver program to pop up a dialog box
+! that lets you try out the following programs interactively.  See the man
+! pages for details.
+!
+*programs:     qix -root -solid -delay 0 -segments 100                 \n\
                attraction -root -mode balls                            \n\
                attraction -root -mode lines -points 3 -segments 200    \n\
                attraction -root -mode splines -segments 300            \n\
@@ -69,6 +79,9 @@
                imsmap -root                                            \n\
                slidescreen -root                                       \n\
                decayscreen -root                                       \n\
+               puzzle -root                                            \n\
+               blitspin -root -grab                                    \n\
+               slip -root                                              \n\
                hypercube -root                                         \n\
                halo -root                                              \n\
                maze -root                                              \n\
                lmorph -root                                            \n\
                deco -root                                              \n\
                moire -root                                             \n\
-               kaleidescope -root                                      \n\
                lightning -root                                         \n\
                strange -root                                           \n\
-               fract -root                                             \n\
                spiral -root                                            \n\
                laser -root                                             \n\
                grav -root                                              \n\
                sierpinski -root                                        \n\
                braid -root                                             \n\
                galaxy -root                                            \n\
-               slip -root                                              \n\
                bouboule -root                                          \n\
                swirl -root                                             \n\
                flag -root                                              \n\
                sphere -root                                            \n\
                forest -root                                            \n\
                lisa -root                                              \n\
+               lissie -root                                            \n\
                goop -root                                              \n\
                starfish -root                                          \n\
                starfish -root -blob                                    \n\
                munch -root                                             \n\
                fadeplot -root                                          \n\
                coral -root                                             \n\
+               mountain -root                                          \n\
+               triangle -root                                          \n\
+               worm -root                                              \n\
+               rotor -root                                             \n\
+               ant -root                                               \n\
+               vines -root                                             \n\
+               kaleidescope -root                                      \n\
+               xjack -root                                             \n\
+               xlyap -root -random                                     \n\
                                                                          \
        mono:   rocks -root                                             \n\
        color:  rocks -root -fg darksalmon                              \n\
  
 
 ! A few of the hacks require OpenGL, and will only be built if you have it.
-! Note that those hacks (gears, superquadratics, escher, pipes, and
-! sproingies) will work best on a visual *half* as deep as the depth of the
-! screen, since that way they can do double-buffering -- on an SGI, you
-! should specify the 12-bit TrueColor visual (probably 0x29) instead of
-! letting XScreenSaver pick the visual itself (specifying "TrueColor" would
-! select the 24-bit TrueColor visual, and double-buffering wouldn't be used,
-! resulting in flicker.)
+! If your vendor doesn't provide real OpenGL, you might want to consider
+! building MesaGL, which is a free implementation -- GL is way cool.
+!
+! Note that those hacks (gears, superquadratics, morph3d, escher, pipes,
+! sproingies, and rubik) tend to work best on a visual *half* as deep as the
+! depth of the screen, since that way, they can do double-buffering -- try it
+! and see, but you will probably find that you should specify the deepest
+! visual that is half as deep as the screen.  
+!
+! For example, on a screen that supports both 24-bit TrueColor and 12-bit
+! PseudoColor, the 12-bit visual will probably work best (this is true of
+! base-model SGI Indys: the 0x29 visual is the one you want.)  Oddly, on SGI
+! O2s, (machines that have serious hardware support for GL) the 12-bit
+! PseudoColor visual looks awful (you get a black and white, flickery image.)
+! On these machines, the visual you want turns out to be 0x31 -- this is but
+! one of the eight 15-bit TrueColor visuals (yes, 8, and yes, 15) that O2s
+! provide.  This is the only visual that works properly -- as far as xdpyinfo
+! is concerned, all of the 15-bit TrueColor visuals are identical, but some
+! flicker like mad, and some have deeply weird artifacts (hidden surfaces
+! show through!)  I suppose these other visuals must be tied to some arcane
+! hardware feature...  Your mileage, therefore, may vary dramatically.
 !
 ! Some other programs that you might want to track down (these work as
 ! XScreenSaver helpers, but are not distributed with it):
 !              xbouncebits ...                                         \n\
 !              ico -r -faces -sleep 1 -obj ico                         \n\
 !              xsplinefun                                              \n\
-!              kaleid -root                                            \n\
+!              xmountains -b -M                                        \n\
 !      color:  xfishtank -c black -d -r 2                              \n\
 !
 ! xtacy is ok, but it only works on the default visual.  We can satisfy
 !     default: xtacy -root -delay 100 -mixer                           \n\
 !     default: xtacy -root -delay 100 -taffy -pal 4                    \n\
 ! 
-! To display a slideshow of images, you can do something like this:
+! To display a randomized slideshow of images, you can do something like this:
 !
-!     default: xv -root -rmode 5  image-1.gif  -quit
-!     default: xv -root -rmode 5  image-2.gif  -quit
-!     default: xv -root -rmode 5  image-3.gif  -quit
+!     default-n: xv -root -rmode 5  image-1.gif  -quit
+!     default-n: xv -root -rmode 5  image-2.gif  -quit
+!     default-n: xv -root -rmode 5  image-3.gif  -quit
 !              ...and so on...
 !
-! however, for this to work, you must also have started the screensaver so
-! that it uses the default colormap (the "-no-install" command-line option, or
-! the "installColormap: False" resource) because when XV is running in "-root"
-! mode, it always assumes that the default colormap is being used, rather than
-! examining the window it is drawing on to see what colormap it has.  (It
-! also assumes the default visual, but we've taken care of that above.)
+! Note that we've used "default-n" as the visual name, rather than just
+! "default": this means "default visual, no install", that is, it's like
+! specifying the command-line arguments "-visual default -no-install".
+! This is necessary because, when XV is running in "-root" mode, it always
+! assumes that the default visual and colormap are being used, rather than 
+! examining the window it is drawing on to see what visual and colormap it 
+! has.  If we didn't force the default visual to be used, xv would get an
+! X error.  If we didn't force the default colormap to be installed, the
+! colors would be all wrong.  "default-i" may also be used as a visual name
+! (meaning, "-visual default -install") but you probably won't ever need
+! to use that.
+!
+! XEarth is nice, too:
+!
+!     default-n: xearth -nostars -wait 0 -timewarp 400 -pos sunrel/38/-30
+!
 !
-! Some SGI GL programs work with XScreenSaver; most don't.
+! Some of the GL demos that SGI ships work with XScreenSaver; most don't.
+! XScreenSaver includes a program (not built or installed by default)
+! called "xscreensaver-sgigl".  To use the SGI demos with XScreenSaver,
+! build that program, and use it to launch the SGI demos.  For example,
+! on Irix 6.2, you can do this:
 !
-! Bongo works fine:
+!     xscreensaver-sgigl /usr/demos/bin/ep -S
+!     xscreensaver-sgigl /usr/demos/bin/bongo
+!     xscreensaver-sgigl /usr/demos/bin/atlantis
 !
-!      /usr/demos/bin/bongo -wbongo
+! On Irix 6.3, things have moved, so you need to do it like this:
 !
-! ElectroPaint sort-of works; XScreenSaver will launch it, and it will run
-! properly, but when it's time to turn off the screensaver, you need to hit
-! the Escape key, rather than just moving the mouse.  Apparently GL programs
-! are able to intercept the keyboard even when X has the keyboard grabbed!
+!     xscreensaver-sgigl /usr/sbin/ep -S
 !
-!      /usr/demos/bin/ep
+! You can also use the "ant" demo, but first you need to wrap a shell script
+! around it that cds to its home directory, so that it can find its files;
+! and also pass it the -S argument, to prevent it from forking.  The "atlantis"
+! hack *almost* works; but since it doesn't have an option to prevent it from
+! forking, xscreensaver is unable to kill it, so when you come in the next
+! morning, you'll find dozens of "atlantis" processes still running.
 !
-! None of the other SGI GL demos I've tried worked, because none of them seem
-! to have command-line options that will make them take up the whole screen;
-! so all you get is a miniscule 100x100 image, which is worthless.  This is a
-! shame, since many of those demos would make fine screensavers.
 !
-! If anyone who understands how "haven" works would like to send me the code
-! necessary to do what it does, I would be much obliged.
+! Also, since these actually end up mapping their own windows instead of
+! drawing on the XScreenSaver-provided root, when they are being run from
+! demo-mode, you can't pop up the demo-mode dialog just by clicking the
+! mouse: you must first type ESC to make the SGI programs exit.  This sucks.
+! Things should work properly when they are being run by xscreensaver in
+! non-demo-mode, however.
+!
+! Basically, the SGI demo writers went out of their way to make my life hell.
 
 
 
 *passwdLabel3.alignment:       ALIGNMENT_BEGINNING
 *rogerLabel.width:             150
 
+! Disable Motif drag-and-drop in dialog boxes.  This is kind of pathetic, but
+! in some older versions of Motif, most any attempt to drag cause immediate
+! flaming death from above.  This *should* rip the legs off that bug.
+!
+XScreenSaver*dragInitiatorProtocolStyle: DRAG_NONE
+XScreenSaver*dragReceiverProtocolStyle:  DRAG_NONE
+
+
 
 ! Resources for the dialog boxes using the abominable Athena widgets:
 ! 
index 4bbbc54c451107deb3b54898bb913d0232339cef..efdd8a6181bcdf6486a362bec72ae61392759ce7 100644 (file)
@@ -16,9 +16,7 @@
 "*overlayStderr:               True",
 "*font:                        *-medium-r-*-140-*-m-*",
 "*installColormap:     True",
-"*programs:    qix -root                                               \\n\
-               qix -root -solid -delay 0 -segments 100                 \\n\
-               qix -root -linear -count 10 -size 100 -segments 200     \\n\
+"*programs:    qix -root -solid -delay 0 -segments 100                 \\n\
                attraction -root -mode balls                            \\n\
                attraction -root -mode lines -points 3 -segments 200    \\n\
                attraction -root -mode splines -segments 300            \\n\
@@ -34,6 +32,9 @@
                imsmap -root                                            \\n\
                slidescreen -root                                       \\n\
                decayscreen -root                                       \\n\
+               puzzle -root                                            \\n\
+               blitspin -root -grab                                    \\n\
+               slip -root                                              \\n\
                hypercube -root                                         \\n\
                halo -root                                              \\n\
                maze -root                                              \\n\
                lmorph -root                                            \\n\
                deco -root                                              \\n\
                moire -root                                             \\n\
-               kaleidescope -root                                      \\n\
                lightning -root                                         \\n\
                strange -root                                           \\n\
-               fract -root                                             \\n\
                spiral -root                                            \\n\
                laser -root                                             \\n\
                grav -root                                              \\n\
                sierpinski -root                                        \\n\
                braid -root                                             \\n\
                galaxy -root                                            \\n\
-               slip -root                                              \\n\
                bouboule -root                                          \\n\
                swirl -root                                             \\n\
                flag -root                                              \\n\
                sphere -root                                            \\n\
                forest -root                                            \\n\
                lisa -root                                              \\n\
+               lissie -root                                            \\n\
                goop -root                                              \\n\
                starfish -root                                          \\n\
                starfish -root -blob                                    \\n\
                munch -root                                             \\n\
                fadeplot -root                                          \\n\
                coral -root                                             \\n\
+               mountain -root                                          \\n\
+               triangle -root                                          \\n\
+               worm -root                                              \\n\
+               rotor -root                                             \\n\
+               ant -root                                               \\n\
+               vines -root                                             \\n\
+               kaleidescope -root                                      \\n\
+               xjack -root                                             \\n\
+               xlyap -root -random                                     \\n\
                                                                          \
        mono:   rocks -root                                             \\n\
        color:  rocks -root -fg darksalmon                              \\n\
 "*passwdLabel2.alignment:      ALIGNMENT_BEGINNING",
 "*passwdLabel3.alignment:      ALIGNMENT_BEGINNING",
 "*rogerLabel.width:            150",
+"XScreenSaver*dragInitiatorProtocolStyle: DRAG_NONE",
+"XScreenSaver*dragReceiverProtocolStyle:  DRAG_NONE",
 "*demo_dialog*font:            *-helvetica-bold-r-*-*-*-120-*-*-*-iso8859-1",
 "*resources_dialog*font:               *-helvetica-bold-r-*-*-*-120-*-*-*-iso8859-1",
 "*passwd_dialog*font:          *-helvetica-bold-r-*-*-*-120-*-*-*-iso8859-1",
index a0ae2dab66c1b2d0b09f4c833d4f75822724cb15..b13622e175828704f30fa7fbf60edce7b5de3aa5 100644 (file)
 
 #include <X11/Intrinsic.h>
 
+#ifdef DEBUG
+# include <X11/IntrinsicP.h>   /* just to get debug info for gdb... */
+# include <X11/ShellP.h>
+#endif
+
 #ifdef HAVE_MOTIF
 # include <Xm/Xm.h>
 # include <Xm/Text.h>
@@ -363,18 +368,19 @@ next_cb (Widget button, XtPointer client_data, XtPointer call_data)
   int *pos_list;
   int pos_count;
   if (! XmListGetSelectedPos (demo_list, &pos_list, &pos_count))
-    XmListSelectPos (demo_list, 1, True);
+    {
+      XmListDeselectAllItems(demo_list);       /* LessTif lossage */
+      XmListSelectPos (demo_list, 1, True);
+    }
   else
     {
-      int pos = pos_list [0];
-      XmListSelectPos (demo_list, pos + 1, True);
-      XtFree ((char *) pos_list);
-      if (! XmListGetSelectedPos (demo_list, &pos_list, &pos_count))
-       abort ();
-      if (pos_list [0] == pos)
-       XmListSelectPos (demo_list, 1, True);
-      XtFree ((char *) pos_list);
+      int pos = pos_list[0] + 1;
+      if (pos > si->prefs.screenhacks_count)
+       pos = 1;
+      XmListDeselectAllItems(demo_list);       /* LessTif lossage */
+      XmListSelectPos (demo_list, pos, True);
     }
+  XtFree ((char *) pos_list);
   ensure_selected_item_visible (demo_list);
   demo_mode_hack (si, get_text_string (text_line));
 
@@ -409,9 +415,13 @@ prev_cb (Widget button, XtPointer client_data, XtPointer call_data)
   int *pos_list;
   int pos_count;
   if (! XmListGetSelectedPos (demo_list, &pos_list, &pos_count))
-    XmListSelectPos (demo_list, 0, True);
+    {
+      XmListDeselectAllItems(demo_list);       /* LessTif lossage */
+      XmListSelectPos (demo_list, 0, True);
+    }
   else
     {
+      XmListDeselectAllItems(demo_list);       /* LessTif lossage */
       XmListSelectPos (demo_list, pos_list [0] - 1, True);
       XtFree ((char *) pos_list);
     }
@@ -451,6 +461,7 @@ restart_cb (Widget button, XtPointer client_data, XtPointer call_data)
   demo_mode_restart_process (si);
 }
 
+
 void
 pop_up_dialog_box (Widget dialog, Widget form, int where)
 {
@@ -575,6 +586,32 @@ make_screenhack_dialog (saver_info *si)
       XmStringFree (xmstr);
     }
 
+  /* Cause the most-recently-run hack to be selected in the list.
+     Do some voodoo to make it be roughly centered in the list (really,
+     just make it not be within +/- 5 of the top/bottom if possible.)
+   */
+  if (ssi->current_hack > 0)
+    {
+      int i = ssi->current_hack+1;
+      int top = i + 5;
+      int bot = i - 5;
+      if (bot < 1) bot = 1;
+      if (top > si->prefs.screenhacks_count)
+       top = si->prefs.screenhacks_count;
+
+      XmListDeselectAllItems(demo_list);       /* LessTif lossage */
+      XmListSelectPos (demo_list, bot, False);
+      ensure_selected_item_visible (demo_list);
+
+      XmListDeselectAllItems(demo_list);       /* LessTif lossage */
+      XmListSelectPos (demo_list, top, False);
+      ensure_selected_item_visible (demo_list);
+
+      XmListDeselectAllItems(demo_list);       /* LessTif lossage */
+      XmListSelectPos (demo_list, i, False);
+      ensure_selected_item_visible (demo_list);
+    }
+
 #else  /* HAVE_ATHENA */
 
   XtVaSetValues (demo_list,
@@ -583,6 +620,10 @@ make_screenhack_dialog (saver_info *si)
                 0);
   XtAddCallback (demo_list, XtNcallback, select_cb, si);
 
+  /* ####   still need to do the "select most-recently-run hack"
+     ####   thing for Athena.
+  */
+
 #endif /* HAVE_ATHENA */
 
   pop_up_dialog_box(demo_dialog, demo_form,
index b4246c914847a8351cee8265e1125e0863ee99a3..a79d21354297c55e4fb884544e5d9138fa495763 100644 (file)
@@ -77,8 +77,7 @@ static Widget passwd_done = 0;
 
 
 static enum { pw_read, pw_ok, pw_fail, pw_cancel, pw_time } passwd_state;
-#define PASSWDLEN 80
-static char typed_passwd [PASSWDLEN];
+static char typed_passwd [80];
 
 \f
 #if defined(HAVE_ATHENA) || (XmVersion >= 1002)
@@ -100,7 +99,9 @@ passwd_done_cb (Widget button, XtPointer client_data, XtPointer call_data)
 #ifndef VMS
 
 # ifdef HAVE_ATHENA
-  strncpy(typed_passwd, XawDialogGetValueString(passwd_form), PASSWDLEN);
+  strncpy(typed_passwd, XawDialogGetValueString(passwd_form),
+         sizeof(typed_passwd)-1);
+  typed_passwd[sizeof(typed_passwd)-1] = 0;
 # endif /* HAVE_ATHENA */
   if (passwd_valid_p (typed_passwd))
     passwd_state = pw_ok;
@@ -146,8 +147,11 @@ check_passwd_cb (Widget button, XtPointer client_data, XtPointer call_data)
   else if (vcb->text->ptr != 0)
     {
       int i;
-      strncat (typed_passwd, vcb->text->ptr, vcb->text->length);
-      typed_passwd [vcb->endPos + vcb->text->length] = 0;
+      int L = vcb->text->length;
+      if (L >= sizeof(typed_passwd))
+       L = sizeof(typed_passwd)-1;
+      strncat (typed_passwd, vcb->text->ptr, L);
+      typed_passwd [vcb->endPos + L] = 0;
       for (i = 0; i < vcb->text->length; i++)
        vcb->text->ptr [i] = '*';
     }
@@ -218,8 +222,8 @@ static void
 keypress (Widget w, XEvent *event, String *argv, Cardinal *argc)
 {
   int i, j;
-  char s [sizeof (typed_passwd)];
-  int size = XLookupString ((XKeyEvent *) event, s, sizeof (s), 0, 0);
+  char s [sizeof(typed_passwd)];
+  int size = XLookupString ((XKeyEvent *) event, s, sizeof(s)-1, 0, 0);
   if (size != 1) return;
 
   /* hack because I can't get translations to dance to my tune... */
@@ -231,6 +235,13 @@ keypress (Widget w, XEvent *event, String *argv, Cardinal *argc)
   if (*s == '\015') { done (w, event, argv, argc); return; }
 
   i = j = strlen (typed_passwd);
+
+  if (i >= (sizeof(typed_passwd)-1))
+    {
+      XBell(XtDisplay(w), 0);
+      return;
+    }
+
   typed_passwd [i] = *s;
   s [++i] = 0;
   while (i--)
@@ -242,7 +253,7 @@ keypress (Widget w, XEvent *event, String *argv, Cardinal *argc)
 static void
 backspace (Widget w, XEvent *event, String *argv, Cardinal *argc)
 {
-  char s [sizeof (typed_passwd)];
+  char s [sizeof(typed_passwd)];
   int i = strlen (typed_passwd);
   int j = i;
   if (i == 0)
@@ -258,7 +269,7 @@ backspace (Widget w, XEvent *event, String *argv, Cardinal *argc)
 static void
 kill_line (Widget w, XEvent *event, String *argv, Cardinal *argc)
 {
-  memset (typed_passwd, 0, sizeof (typed_passwd));
+  memset (typed_passwd, 0, sizeof(typed_passwd));
   text_field_set_string (passwd_text, "", 0);
 }
 
@@ -385,7 +396,7 @@ make_passwd_dialog (saver_info *si)
   format_into_label (passwd_label3, (username ? username : "???"));
 }
 
-static int passwd_idle_timer_tick;
+static int passwd_idle_timer_tick = -1;
 static XtIntervalId passwd_idle_id;
 
 static void
@@ -410,7 +421,7 @@ passwd_idle_timer (XtPointer closure, XtIntervalId *id)
     {
       XGCValues gcv;
 #ifdef HAVE_MOTIF
-      unsigned long fg, bg, ts, bs;
+      unsigned long fg = 0, bg = 0, ts = 0, bs = 0;
       Dimension w = 0, h = 0;
       XtVaGetValues(XtParent(passwd_done),
                    XmNwidth, &w,
@@ -441,7 +452,7 @@ passwd_idle_timer (XtPointer closure, XtIntervalId *id)
 
       Arg av [100];
       int ac = 0;
-      unsigned long fg, bg;
+      unsigned long fg = 0, bg = 0;
       XtSetArg (av [ac], XtNheight, &d); ac++;
       XtGetValues (passwd_done, av, ac);
       ac = 0;
@@ -477,6 +488,7 @@ passwd_idle_timer (XtPointer closure, XtIntervalId *id)
     }
 }
 
+
 #ifdef HAVE_ATHENA
 
 void
@@ -651,7 +663,7 @@ pop_passwd_dialog (saver_info *si)
          passwd_set_label(lose,strlen(lose)+1);
 
          /* and clear the password line */
-         memset(typed_passwd, 0, PASSWDLEN);
+         memset(typed_passwd, 0, sizeof(typed_passwd));
          text_field_set_string (passwd_text, "", 0);
 #else
          text_field_set_string (passwd_text, lose, strlen (lose) + 1);
@@ -670,7 +682,7 @@ pop_passwd_dialog (saver_info *si)
            }
        }
     }
-  memset (typed_passwd, 0, sizeof (typed_passwd));
+  memset (typed_passwd, 0, sizeof(typed_passwd));
   text_field_set_string (passwd_text, "", 0);
   XtSetKeyboardFocus (parent, None);
 
index 50dd82b8a521459493a18f7506347a8be6aa9927..ce3661e2a3b2a662c24e61706bd14dba56e50950 100644 (file)
@@ -418,9 +418,37 @@ static void describe_dead_child (saver_info *, pid_t, int wait_status);
 #endif
 
 
-/* Semaphore to temporarily turn the SIGCHLD handler into a no-op. */
+/* Semaphore to temporarily turn the SIGCHLD handler into a no-op.
+   Don't alter this directly -- use block_sigchld() / unblock_sigchld().
+ */
 static int block_sigchld_handler = 0;
 
+
+static void
+block_sigchld (void)
+{
+#ifdef USE_SIGACTION
+  sigset_t child_set;
+  sigemptyset (&child_set);
+  sigaddset (&child_set, SIGCHLD);
+  sigprocmask (SIG_BLOCK, &child_set, 0);
+#endif /* USE_SIGACTION */
+
+  block_sigchld_handler++;
+}
+
+static void
+unblock_sigchld (void)
+{
+#ifdef USE_SIGACTION
+  sigset_t child_set;
+  sigemptyset(&child_set);
+  sigaddset(&child_set, SIGCHLD);
+  sigprocmask(SIG_UNBLOCK, &child_set, 0);
+#endif /* USE_SIGACTION */
+  block_sigchld_handler--;
+}
+
 static int
 kill_job (saver_info *si, pid_t pid, int signal)
 {
@@ -434,7 +462,7 @@ kill_job (saver_info *si, pid_t pid, int signal)
     /* This function should not be called from the signal handler. */
     abort();
 
-  block_sigchld_handler++;             /* we control the horizontal... */
+  block_sigchld();                     /* we control the horizontal... */
 
   job = find_job (pid);
   if (!job ||
@@ -489,7 +517,7 @@ kill_job (saver_info *si, pid_t pid, int signal)
   await_dying_children (si);
 
  DONE:
-  block_sigchld_handler--;
+  unblock_sigchld();
   if (block_sigchld_handler < 0)
     abort();
 
@@ -514,9 +542,9 @@ sigchld_handler (int sig)
     abort();
   else if (block_sigchld_handler == 0)
     {
-      block_sigchld_handler++;
+      block_sigchld();
       await_dying_children (si);
-      block_sigchld_handler--;
+      unblock_sigchld();
     }
 
   init_sigchld();
@@ -641,12 +669,36 @@ void
 init_sigchld (void)
 {
 #ifdef SIGCHLD
+
+# ifdef USE_SIGACTION  /* Thanks to Tom Kelly <tom@ancilla.toronto.on.ca> */
+
+  static Bool sigchld_initialized_p = 0;
+  if (!sigchld_initialized_p)
+    {
+      struct sigaction action, old;
+
+      action.sa_handler = sigchld_handler;
+      sigemptyset(&action.sa_mask);
+      action.sa_flags = 0;
+
+      if (sigaction(SIGCHLD, &action, &old) < 0)
+       {
+         char buf [255];
+         sprintf (buf, "%s: couldn't catch SIGCHLD", progname);
+         perror (buf);
+       }
+      sigchld_initialized_p = True;
+    }
+
+# else  /* !USE_SIGACTION */
+
   if (((long) signal (SIGCHLD, sigchld_handler)) == -1L)
     {
       char buf [255];
       sprintf (buf, "%s: couldn't catch SIGCHLD", progname);
       perror (buf);
     }
+# endif /* !USE_SIGACTION */
 #endif
 }
 
index 5dcc3d355b4fb7303934c5450b33ee793b8b2c4c..06c0bb4ecb865413585fbb1de208c719ac969927 100644 (file)
@@ -558,6 +558,7 @@ initialize_screensaver_window_1 (saver_screen_info *ssi)
 {
   saver_info *si = ssi->global;
   saver_preferences *p = &si->prefs;
+  Bool install_cmap_p = ssi->install_cmap_p;
 
   /* This resets the screensaver window as fully as possible, since there's
      no way of knowing what some random client may have done to us in the
@@ -578,8 +579,10 @@ initialize_screensaver_window_1 (saver_screen_info *ssi)
   if (ssi->cmap == DefaultColormapOfScreen (ssi->screen))
     ssi->cmap = 0;
 
-  if (p->install_cmap_p ||
-      ssi->current_visual != DefaultVisualOfScreen (ssi->screen))
+  if (ssi->current_visual != DefaultVisualOfScreen (ssi->screen))
+    install_cmap_p = True;
+
+  if (install_cmap_p)
     {
       if (! ssi->cmap)
        {
@@ -591,31 +594,18 @@ initialize_screensaver_window_1 (saver_screen_info *ssi)
     }
   else
     {
+      Colormap def_cmap = DefaultColormapOfScreen (ssi->screen);
       if (ssi->cmap)
        {
          XFreeColors (si->dpy, ssi->cmap, &ssi->black_pixel, 1, 0);
-         if (ssi->cmap != ssi->demo_cmap)
+         if (ssi->cmap != ssi->demo_cmap &&
+             ssi->cmap != def_cmap)
            XFreeColormap (si->dpy, ssi->cmap);
        }
-      ssi->cmap = DefaultColormapOfScreen (ssi->screen);
+      ssi->cmap = def_cmap;
       ssi->black_pixel = BlackPixelOfScreen (ssi->screen);
     }
 
-#if 0
-  if (cmap2)
-    {
-      XFreeColormap (si->dpy, cmap2);
-      cmap2 = 0;
-    }
-
-  if (p->fade_p)
-    {
-      cmap2 = copy_colormap (si->screen, ssi->current_visual, ssi->cmap, 0);
-      if (! cmap2)
-       p->fade_p = p->unfade_p = 0;
-    }
-#endif
-
   attrmask = (CWOverrideRedirect | CWEventMask | CWBackingStore | CWColormap |
              CWBackPixel | CWBackingPixel | CWBorderPixel);
   attrs.override_redirect = True;
@@ -820,12 +810,15 @@ raise_window (saver_info *si,
   if (p->fade_p && !inhibit_fade && !si->demo_mode_p)
     {
       int grabbed = -1;
+      Window *current_windows = (Window *)
+       calloc(sizeof(Window), si->nscreens);
       Colormap *current_maps = (Colormap *)
        calloc(sizeof(Colormap), si->nscreens);
 
       for (i = 0; i < si->nscreens; i++)
        {
          saver_screen_info *ssi = &si->screens[i];
+         current_windows[i] = ssi->screensaver_window;
          current_maps[i] = (between_hacks_p
                             ? ssi->cmap
                             : DefaultColormapOfScreen (ssi->screen));
@@ -851,29 +844,24 @@ raise_window (saver_info *si,
            clear_stderr (ssi);
        }
 
-      fade_screens (si->dpy, current_maps, p->fade_seconds, p->fade_ticks,
-                   True);
+      fade_screens (si->dpy, current_maps, current_windows,
+                   p->fade_seconds, p->fade_ticks, True, !dont_clear);
+      free(current_maps);
+      free(current_windows);
+      current_maps = 0;
+      current_windows = 0;
 
       if (p->verbose_p) fprintf (stderr, "fading done.\n");
 
+#ifdef HAVE_MIT_SAVER_EXTENSION
       for (i = 0; i < si->nscreens; i++)
        {
          saver_screen_info *ssi = &si->screens[i];
-         if (!dont_clear)
-           XClearWindow (si->dpy, ssi->screensaver_window);
-         XMapRaised (si->dpy, ssi->screensaver_window);
-
-#ifdef HAVE_MIT_SAVER_EXTENSION
          if (ssi->server_mit_saver_window &&
              window_exists_p (si->dpy, ssi->server_mit_saver_window))
            XUnmapWindow (si->dpy, ssi->server_mit_saver_window);
-#endif /* HAVE_MIT_SAVER_EXTENSION */
-
-         /* Once the saver window is up, restore the colormap.
-            (The "black" pixels of the two colormaps are compatible.) */
-         if (ssi->cmap)
-           XInstallColormap (si->dpy, ssi->cmap);
        }
+#endif /* HAVE_MIT_SAVER_EXTENSION */
 
       if (grabbed == GrabSuccess)
        XUngrabPointer (si->dpy, CurrentTime);
@@ -938,7 +926,7 @@ void
 unblank_screen (saver_info *si)
 {
   saver_preferences *p = &si->prefs;
-  int i, j;
+  int i;
 
   store_activate_time (si, True);
   reset_watchdog_timer (si, False);
@@ -946,27 +934,16 @@ unblank_screen (saver_info *si)
   if (p->unfade_p && !si->demo_mode_p)
     {
       int grabbed = -1;
-      int extra_cmaps = 4;
-      int ncmaps = si->nscreens * (extra_cmaps + 1);
-      Colormap *cmaps = (Colormap *) calloc(sizeof(Colormap), ncmaps);
+      Window *current_windows = (Window *)
+       calloc(sizeof(Window), si->nscreens);
 
-      if (p->verbose_p) fprintf (stderr, "%s: unfading... ", progname);
+      for (i = 0; i < si->nscreens; i++)
+       {
+         saver_screen_info *ssi = &si->screens[i];
+         current_windows[i] = ssi->screensaver_window;
+       }
 
-      /* Fake out SGI's multi-colormap hardware; see utils/fade.c
-        for an explanation. */
-      for (i = 0; i < ncmaps; i += (extra_cmaps + 1))
-       for (j = 0; j < (extra_cmaps + 1); j++)
-         {
-           cmaps[i+j] = XCreateColormap (si->dpy,
-                                         RootWindow (si->dpy, i),
-                                         DefaultVisual(si->dpy, i),
-                                         AllocAll);
-           if (cmaps[i+j])
-             {
-               blacken_colormap (ScreenOfDisplay(si->dpy, i), cmaps[i+j]);
-               XInstallColormap (si->dpy, cmaps[i+j]);
-             }
-         }
+      if (p->verbose_p) fprintf (stderr, "%s: unfading... ", progname);
 
       XGrabServer (si->dpy);
       for (i = 0; i < si->nscreens; i++)
@@ -975,16 +952,16 @@ unblank_screen (saver_info *si)
          if (grabbed != GrabSuccess)
            grabbed = grab_mouse (si->dpy, RootWindowOfScreen (ssi->screen),
                                  0);
-         XUnmapWindow (si->dpy, ssi->screensaver_window);
          clear_stderr (ssi);
        }
       XUngrabServer (si->dpy);
 
-      fade_screens (si->dpy, 0, p->fade_seconds, p->fade_ticks, False);
+      fade_screens (si->dpy, 0, current_windows,
+                   p->fade_seconds, p->fade_ticks,
+                   False, False);
 
-      for (i = 0; i < ncmaps; i++)
-       if (cmaps[i]) XFreeColormap (si->dpy, cmaps[i]);
-      free (cmaps);
+      free(current_windows);
+      current_windows = 0;
 
       if (p->verbose_p) fprintf (stderr, "unfading done.\n");
       if (grabbed == GrabSuccess)
@@ -1077,17 +1054,40 @@ select_visual (saver_screen_info *ssi, const char *visual_name)
 {
   saver_info *si = ssi->global;
   saver_preferences *p = &si->prefs;
+  Bool install_cmap_p = p->install_cmap_p;
+  Bool was_installed_p = (ssi->cmap != DefaultColormapOfScreen(ssi->screen));
   Visual *new_v;
   Bool got_it;
 
   if (visual_name && *visual_name)
-    new_v = get_visual (ssi->screen, visual_name, True, False);
+    {
+      if (!strcmp(visual_name, "default-i"))
+       {
+         visual_name = "default";
+         install_cmap_p = True;
+       }
+      else if (!strcmp(visual_name, "default-n"))
+       {
+         visual_name = "default";
+         install_cmap_p = False;
+       }
+      new_v = get_visual (ssi->screen, visual_name, True, False);
+    }
   else
-    new_v = ssi->default_visual;
+    {
+      new_v = ssi->default_visual;
+    }
 
   got_it = !!new_v;
 
-  if (new_v && ssi->current_visual != new_v)
+  if (new_v && new_v != DefaultVisualOfScreen(ssi->screen))
+    install_cmap_p = True;
+
+  ssi->install_cmap_p = install_cmap_p;
+
+  if (new_v &&
+      ((ssi->current_visual != new_v) ||
+       (install_cmap_p != was_installed_p)))
     {
       Colormap old_c = ssi->cmap;
       Window old_w = ssi->screensaver_window;
@@ -1099,6 +1099,8 @@ select_visual (saver_screen_info *ssi, const char *visual_name)
          describe_visual (stderr, ssi->screen, ssi->current_visual);
          fprintf (stderr, "\t\t\t\tto:   ");
          describe_visual (stderr, ssi->screen, new_v);
+         fprintf (stderr, "\t\t\t\t install cmap:   %s\n",
+                  (install_cmap_p ? "yes" : "no"));
 #else
          fprintf (stderr, "%s: switching to visual ", progname);
          describe_visual (stderr, ssi->screen, new_v);
index 09ae5a013c3e7c7f59e11b561dcbdd1a84dd3b06..2d7f3326064d97916b44782cf7530bed434d2e14 100644 (file)
@@ -34,25 +34,30 @@ static char *usage = "usage: %s -<switch>\n\
   This program provides external control of a running xscreensaver process.\n\
   Version %s, copyright (c) 1991-1997 Jamie Zawinski <jwz@netscape.com>.\n\
 \n\
-  -demo                Enter interactive demo mode.\n\
-  -deactivate  Turns off the screensaver if it is on, as user input would.\n\
-  -activate    Turns it on as if the user had been idle for long enough.\n\
-  -cycle       Stops the current hack and runs a new one.\n\
-  -next                Like either -activate or -cycle, depending on which is more\n\
-               appropriate, except that the screenhack that will be run is\n\
-               the next one in the list of hacks, instead of a randomly-\n\
-               chosen one.  This option is good for looking at a demo of\n\
-               each of the hacks in place.\n\
-  -prev                Like -next, but goes in the other direction.\n\
-  -exit                Causes the screensaver process to exit.  It should be ok to\n\
-               just kill the process (NOT with -9!) but this is a slightly\n\
-               easier way.\n\
-  -restart     Causes the screensaver process to exit and then restart with\n\
-               the same command line arguments.  This is a good way of \n\
-               causing the screensaver to re-read the resource database.\n\
+  -demo         Enter interactive demo mode.\n\
+  -deactivate   Turns off the screensaver if it is on, as user input would.\n\
+  -activate     Turns it on as if the user had been idle for long enough.\n\
+  -cycle        Stops the current graphics hack and runs a new one.\n\
+  -next         Like either -activate or -cycle, depending on which is more\n\
+                appropriate, except that the screenhack that will be run is\n\
+                the next one in the list of hacks, instead of a randomly-\n\
+                chosen one.  This option could be used for looking at a demo\n\
+                of each of the configured hacks.\n\
+  -prev         Like -next, but goes in the other direction.\n\
+  -exit         Causes the screensaver process to exit.  This is the same as\n\
+                killing the process with `kill', but it's easier, since you\n\
+                don't need to first figure out the pid.  (Note that one\n\
+                must *never* kill xscreensaver with -9!)\n\
+  -restart      Causes the screensaver process to exit and then restart with\n\
+                the same command line arguments.  Do this after you've\n\
+                changed the resource database, to cause the screensaver to\n\
+                notice the changes.\n\
   -lock         Same as -activate, but with immediate locking.\n\
-  -version      Prints the version of XScreenSaver that is running.\n\
-  -time         Prints the time at which the screensaver turned on.\n\
+  -version      Prints the version of XScreenSaver that is currently running\n\
+                on the display.\n\
+  -time         Prints the time at which the screensaver last activated or\n\
+                deactivated (roughly, how long the user has been idle or\n\
+                non-idle.)\n\
 \n\
   See the man page for more details.\n\
   For updates, check http://people.netscape.com/jwz/xscreensaver/\n\
index 0d5796b82fbc0de5f94a07618e785ff4b23e0b9b..24e40f282101762a81c447a59a9f5b645f69dacc 100644 (file)
@@ -249,7 +249,7 @@ reformat_hack(const char *hack)
   char *out = h2;
 
   while (isspace(*in)) in++;           /* skip whitespace */
-  while (!isspace(*in) && *in != ':')
+  while (*in && !isspace(*in) && *in != ':')
     *out++ = *in++;                    /* snarf first token */
   while (isspace(*in)) in++;           /* skip whitespace */
 
@@ -348,8 +348,11 @@ get_screenhacks (saver_info *si)
              for (s2 = s+j+1; *s2 == ' ' || *s2 == '\t'; s2++)
                k++;
              if (k > 0)
-               for (s2 = s + j + 1; *s2; s2++)
-                 s2 [0] = s2 [k];
+               {
+                 for (s2 = s+j+1; s2[k]; s2++)
+                   *s2 = s2[k];
+                 *s2 = 0;
+               }
              break;
            }
        }
index 6dba82a64bf5fa951d655efbf95150bf216c698b..2650215cb6bad4d29d4365d5ecb5fd2b284d8d9f 100644 (file)
@@ -185,6 +185,9 @@ struct saver_screen_info {
                                   destroy and recreate it on different
                                   visuals. */
   Colormap cmap;               /* The colormap that goes with the window. */
+  Bool install_cmap_p;         /* whether we should use our own colormap.
+                                  This can be overridden on a per-hack basis.
+                                */
   Visual *current_visual;      /* The visual of the window. */
   Visual *default_visual;      /* visual to use when none other specified */
   int current_depth;           /* How deep the visual (and the window) are. */
@@ -296,6 +299,11 @@ extern void format_into_label (Widget label, const char *arg);
 extern void steal_focus_and_colormap (Widget dialog);
 #endif
 
+#ifdef HAVE_MOTIF
+extern void disable_motif_drag_and_drop(Widget w);
+#endif
+
+
 /* =======================================================================
    timers
    ======================================================================= */
index 71e8cbfa7ddf070e8fabd1dd8d5c49b75e21291e..dab3595cefc3715fd75b90922de8b289378b86dc 100644 (file)
@@ -33,6 +33,66 @@ and
 programs is the ease with which new graphics hacks can be installed.  You
 don't need to recompile (or even re-run) this program to add a new display
 mode.
+.SH GETTING STARTED
+For the impatient, try this:
+
+.EX
+        xscreensaver &
+        xscreensaver-command -demo
+.EE
+.RS 0
+After a few seconds, the screen should go black, and a dialog box should
+appear in the upper right corner.  This is \fIDemo Mode\fP.
+.SH DEMO MODE
+If \fIxscreensaver\fP receives the \fBDEMO\fP ClientMessage, which is done
+by running the
+.BR xscreensaver\-command (1)
+program with the \fB\-demo\fP option, the screensaver will black the screen
+and pop up a dialog box from which you can examine and experiment with the
+client programs.
+
+The dialog box contains a scrolling list, a text field, and a number of 
+buttons.  
+
+Double-clicking on one of the programs in the list will run it.  The dialog
+box will disappear, allowing the program access to the full screen.  Clicking
+the mouse again will bring the dialog box back.
+
+Single-clicking in the list will place the indicated program and its args
+in the text field to be edited.  Edit the arguments and hit return to run
+the program with the parameters you have specified.  (Note that these are
+one-time changes and won't be remembered; to make the changes permanent,
+you need to edit your X resource file.)
+
+The buttons are:
+.TP 8
+.B Run Next
+Clicking this button will run the next program in the list after the 
+currently-selected one, and will scroll around to the top when it reaches
+the bottom.
+.TP 8
+.B Run Previous
+Opposite of Run Next; at the top, it scrolls around to the bottom.
+.TP 8
+.B Edit Parameters
+This pops up a second dialog box, in which you have the option to 
+interactively change most of the screensaver's operational parameters,
+such as its timeouts, and whether it should lock the screen.  Changing 
+these parameters here will affect only the running \fIxscreensaver\fP 
+process; to make the changes permanent, you need to edit your X resource
+file.  (See below.)
+.TP 8
+.B Exit Demo Mode
+Returns to normal screensaver operation.
+.TP 8
+.B Reinitialize
+This causes the X resource database to be re-read, to pick up any changes
+you might have made.  This works by causing the screensaver process to exit
+and then restart itself with the same command-line arguments.  This is just
+like the \fI\-restart\fP argument to 
+.BR xscreensaver\-command (1)
+except that when executed from this button, the screensaver will 
+automatically return to demo mode after restarting.
 .SH OPTIONS
 .I xscreensaver
 accepts the following command line options:
@@ -95,7 +155,8 @@ This is the default.
 .B best
 Use the visual which supports the most colors.  Note, however, that the
 visual with the most colors might be a TrueColor visual, which does not
-support colormap animation.
+support colormap animation.  Some programs have more interesting behavior
+when run on PseudoColor visuals than on TrueColor.
 .TP 8
 .B mono
 Use a monochrome visual, if there is one.
@@ -108,11 +169,9 @@ one plane (that is, it's not monochrome.)
 Use the best of the color visuals, if there are any.
 .TP 8
 .I class
-where \fIclass\fP is one 
-
-of \fBStaticGray\fP, \fBStaticColor\fP, \fBTrueColor\fP, \fBGrayScale\fP, \fBPseudoColor\fP, 
-or \fBDirectColor\fP.  Selects the deepest visual of
-the given class.
+where \fIclass\fP is one of \fBStaticGray\fP, \fBStaticColor\fP, 
+\fBTrueColor\fP, \fBGrayScale\fP, \fBPseudoColor\fP, or \fBDirectColor\fP.
+Selects the deepest visual of the given class.
 .TP 8
 .I number
 where \fInumber\fP (decimal or hex) is interpreted as a visual id number, 
@@ -130,11 +189,12 @@ See the description of the \fBprograms\fP resource, below.
 .RE
 .TP 8
 .B \-install
-When using a non-default visual, install a private colormap while the
-screensaver is active, so that the graphics hacks can get as many colors as 
-possible.    This is the default.  (This only applies when the screen's 
-default visual is being used, since non-default visuals get their own
-colormaps automatically.)
+Install a private colormap while the screensaver is active, so that the
+graphics hacks can get as many colors as possible.  This is the 
+default.  (This only applies when the screen's default visual is being
+used, since non-default visuals get their own colormaps automatically.)
+This can also be overridden on a per-hack basis: see the discussion of
+the \fBdefault\-n\fP name in the section about the \fBprograms\fP resource.
 .TP 8
 .B \-no\-install
 Use the default colormap.
@@ -284,6 +344,10 @@ xscreensaver.programs:  \\
         xv -root -rmode 5 image.gif -quit  \\n
 .EE
 .RS 8
+Make sure your \fB$PATH\fP environment variable is set up correctly
+\fIbefore\fP xscreensaver is launched, or it won't be able to find the
+programs listed in the \fIprograms\fP resource.
+
 To use a program as a screensaver, two things are required: that that
 program draw on the root window (or be able to be configured to draw on
 the root window); and that that program understand ``virtual root''
@@ -316,6 +380,18 @@ a 24-bit visual, both can be accomidated:
 and \fImonoPrograms\fP resources, but those resources have now been removed;
 a warning will be issued if they are used.)
 
+In addition to the symbolic visual names described above (in the section
+about the \fI\-visual\fP command-line option) one other visual name is
+supported in the \fIprograms\fP list:
+.TP 8
+.B default-n
+This is like \fBdefault\fP, but also requests the use of the default colormap,
+instead of a private colormap.  (That is, it behaves as if 
+the \fI\-no\-install\fP command-line option was specified, but only for
+this particular hack.)  This is provided because some third-party programs
+that draw on the root window make assumptions about the visual and colormap
+of that window: assumptions which xscreensaver can violate.
+.PP
 If you specify a particular visual for a program, and that visual does not
 exist on the screen, then that program will not be chosen to run.  This
 means that on displays with multiple screens of different depths, you can
@@ -392,6 +468,10 @@ Simply add \fB"xscreensaver &"\fP to your \fI/usr/lib/X11/xdm/Xsetup\fP
 file.  Because \fIxdm\fP grabs the keyboard, keypresses will not make 
 the screensaver deactivate, but any mouse activity will.
 
+Make sure you have \fB$PATH\fP set up correctly in the Xsetup script, or
+\fIxdm\fP won't be able to find \fIxscreensaver\fP, and/or \fIxscreensaver\fP
+won't be able to find its graphics hacks.
+
 (If your system does not seem to be executing the \fIXsetup\fP file, you
 may need to configure it to do so -- the traditional way to do this is
 to make that file the value of the \fIDisplayManager*setup\fP resource
@@ -411,76 +491,96 @@ or launching user-specified programs.
 Locking doesn't work if the screensaver is launched by \fIxdm\fP.  To get
 around this, you can run the screensaver from \fIxdm\fP without locking, 
 and kill and restart it from your personal X startup script to enable
-locking; for example:
+locking; for example, by using this pair of commands:
 
 .EX
         xscreensaver-command -exit ; xscreensaver
 .EE
-.SH DEMO MODE
-If \fIxscreensaver\fP receives the \fBDEMO\fP ClientMessage, which is done
-by running the \fBxscreensaver\-command\fP program with the \fB\-demo\fP
-option, the screensaver will black the screen and pop up a dialog box from
-which you can examine and experiment with the client programs.
-
-The dialog box contains a scrolling list, a text field, and a number of 
-buttons.  
-
-Double-clicking on one of the programs in the list will run it.  Clicking
-the mouse again will bring the dialog box back.
-
-Single-clicking in the list will place the indicated program and its args
-in the text field to be edited.  Edit the arguments and hit return to run
-the program with the parameters you have specified.  (Note that these are
-one-time changes and won't be remembered; to make the changes permanent,
-you need to edit your X resource file.)
-
-The buttons are:
-.TP 8
-.B Run Next
-Clicking this button will run the next program in the list after the 
-currently-selected one, and will scroll around to the top when it reaches
-the bottom.
-.TP 8
-.B Run Previous
-Opposite of Run Next; at the top, it scrolls around to the bottom.
-.TP 8
-.B Edit Parameters
-This pops up a second dialog box, in which you have the option to 
-interactively change most of the screensaver's operational parameters,
-such as its timeouts, and whether it should lock the screen.  Changing 
-these parameters here will affect only the running \fIxscreensaver\fP 
-process; to make the changes permanent, you need to edit your X resource
-file.
-.TP 8
-.B Exit Demo Mode
-Returns to normal screensaver operation.
-.TP 8
-.B Reinitialize
-This causes the X resource database to be re-read, to pick up any changes
-you might have made.  This works by causing the screensaver process to exit
-and then restart itself with the same command-line arguments.  This is just
-like the \fI\-restart\fP argument to 
+.SH USING CDE (COMMON DESKTOP ENVIRONMENT)
+The easiest way to use \fIxscreensaver\fP on a system with CDE is to simply
+switch off the built-in CDE screensaver, and use \fIxscreensaver\fP instead;
+and second, to tell the front panel to run 
 .BR xscreensaver\-command (1)
-except that when executed from this button, the screensaver will 
-automatically return to demo mode after restarting.
+with the \fI\-lock\fP option when the \fILock\fP icon is clicked.
+
+To accomplish this involves five steps:
+.RS 4
+.TP 3
+\fB1: Switch off CDE's locker\fP
+Do this by turning off ``\fIScreen Saver and Screen Lock\fP'' in the
+Screen section of the Style Manager.
+.TP 3
+\fB2: Edit sessionetc\fP
+Edit the file \fI~/.dt/sessions/sessionetc\fP and add to it the line
+
+    xscreensaver &
+
+This will cause \fIxscreensaver\fP to be launched when you log in.
+(As always, make sure that xscreensaver and the graphics demos are on
+your \fB$PATH\fP; this needs to be set in \fI.cshrc\fP and/or \fI.dtprofile\fP,
+not \fI.login\fP.)
+.TP 3
+\fB3: Create XScreenSaver.dt\fP
+Create a file called \fI~/.dt/sessions/XScreenSaver.dt\fP with the following
+contents:
+
+    ACTION XScreenSaver
+    {
+         LABEL         XScreenSaver
+         TYPE          COMMAND
+         EXEC_STRING   xscreensaver-command -lock
+         ICON          Dtkey
+         WINDOW_TYPE   NO_STDIO
+    }
+
+This defines a ``lock'' command for the CDE front panel, that knows how
+to talk to \fIxscreensaver\fP.
+.TP 3
+\fB4: Create Lock.fp\fP
+Create a file called \fI~/.dt/sessions/Lock.fp\fP with the following
+contents:
+
+    CONTROL Lock
+    {
+      TYPE             icon
+      CONTAINER_NAME   Switch
+      CONTAINER_TYPE   SWITCH
+      POSITION_HINTS   1
+      ICON             Fplock
+      LABEL            Lock
+      PUSH_ACTION      XScreenSaver
+      HELP_TOPIC       FPOnItemLock
+      HELP_VOLUME      FPanel
+    }
+
+This associates the CDE front panel ``Lock'' icon with the lock command
+we just defined in step 3.
+.TP 3
+\fB5: Restart\fP
+Select ``\fIRestart Workspace Manager\fP'' from the popup menu to make
+your changes take effect.  If things seem not to be working, the 
+file \fI~/.dt/errorlog\fP for error messages.
+.RE
+.PP
 .SH BUGS
 (This is not a bug, but) note that as of release 1.32, the \fBcolorPrograms\fP 
 and \fBmonoPrograms\fP resources are no longer used: they have been 
-supplanted by the extended syntax of the \fBprograms\fP resource (see above.)
+supplanted by the extended syntax of the \fBprograms\fP resource (which is
+described above, in the \fIresources\fP section.)
 .TP 8
 Extensions
 If you are not making use of one of the server extensions (\fBXIDLE\fP,
-\fBSCREEN_SAVER\fP, or \fBMIT-SCREEN-SAVER\fP), then it is possible, in rare
-situations, for \fIxscreensaver\fP to interfere with event propagation and make
-another X program malfunction.  For this to occur, that other application
-would need to \fInot\fP select \fBKeyPress\fP events on its non-leaf windows
-within the first 30 seconds of their existence, but then select for them later.
-In this case, that client \fImight\fP fail to receive those events.
-This isn't very likely, since programs generally select a constant set
-of events immediately after creating their windows and then don't change
-them, but this is the reason that it's a good idea to install and use one
-of the server extensions instead, to work around this shortcoming in the
-X protocol.
+\fBSGI SCREEN_SAVER\fP, or \fBMIT-SCREEN-SAVER\fP), then it is possible, in 
+rare situations, for \fIxscreensaver\fP to interfere with event propagation 
+and make another X program malfunction.  For this to occur, that other
+application would need to \fInot\fP select \fBKeyPress\fP events on its 
+non-leaf windows within the first 30 seconds of their existence, but then 
+select for them later.  In this case, that client \fImight\fP fail to receive 
+those events.  This isn't very likely, since programs generally select a
+constant set of events immediately after creating their windows and then 
+don't change them, but this is the reason that it's a good idea to install 
+and use one of the server extensions instead, to work around this shortcoming
+in the X protocol.
 .TP 8
 Machine Load
 Although this program ``nices'' the subprocesses that it starts, 
@@ -538,7 +638,7 @@ been taken to make this a safe thing to do.
 
 It also may mean that your system uses shadow passwords instead of the
 standard \fIgetpwent\fP interface; in that case, you may need to change
-some options in \fIconfig.h\fP and recompile.
+some options with \fIconfigure\fP and recompile.
 
 If you change your password after xscreensaver has been launched, it will
 continue using your old password to unlock the screen until xscreensaver
@@ -560,10 +660,10 @@ The
 and
 .BR olwm (1)
 window managers don't seem to have this problem.  The race condition exists
-because X apparently does not provide a way for an OverrideRedirect window to 
-have its own colormap, short of grabbing the server (which is neither a good 
-idea, nor really possible with the current design.)  What happens is that, as 
-soon as the screensaver installs its colormap, \fBtwm\fP responds to 
+because X does not provide a way for an OverrideRedirect window to have its
+own colormap, short of grabbing the server (which is neither a good idea, nor
+really possible with the current design.)  What happens is that, as soon as
+the screensaver installs its colormap, \fBtwm\fP responds to 
 the \fBColormapNotify\fP event that is generated by re-instaling the default
 colormap.  Apparently, \fBtwm\fP doesn't \fIalways\fP do this; it seems to do
 it regularly if the screensaver is activated from a menu item, but seems to
@@ -577,7 +677,8 @@ the screensaver is not active: ClientMessages intended for the window manager
 are sent to the screensaver window instead.  This could be solved by making
 xscreensaver forward all unrecognised ClientMessages to the real root window,
 but there may be other problems as well.  If anyone has any insight on the
-cause of this problem, please let me know.
+cause of this problem, please let me know.  (XView is an X11 toolkit that 
+implements the (quite abominable) Sun OpenLook look-and-feel.)
 .TP 8
 MIT Extension and Fading
 When using the \fBMIT-SCREEN-SAVER\fP extension in conjunction with 
@@ -589,10 +690,13 @@ haven't figured a way  to get around this; it seems to be a fundamental
 property of the (mis-) design of this server extension.
 .TP 8
 LessTif (Motif Clone)
-Rumor has it that demo mode is buggy if XScreenSaver was compiled with the
-GNU LessTif reimplementation of Motif.  Since it works fine with OSF Motif
-on a variety of systems, I assume these problems are due to bugs in LessTif.
-Again, any insight would be appreciated.
+Demo mode is buggy if XScreenSaver was compiled against really old versions
+LessTif; if you use LessTif, use version 0.82 or newer.
+.TP 8
+Athena Widgets
+If you compiled against the Athena widget toolkit, the dialog boxes are
+pretty ugly, especially the password dialog.  Use Motif!  If you don't
+have OSF Motif, use GNU LessTif, it's free: http://www.lesstif.org/
 .TP 8
 Red Hot Lava
 There need to be a lot more graphics hacks.  In particular, there should be
@@ -604,6 +708,9 @@ a simulation of a Lavalite (tm).
 to get the default host and display number, and to inform the sub-programs
 of the screen on which to draw.
 .TP 8
+.B PATH
+to find the sub-programs to run.
+.TP 8
 .B XENVIRONMENT
 to get the name of a resource file that overrides the global resources
 stored in the RESOURCE_MANAGER property.
@@ -613,62 +720,86 @@ http://people.netscape.com/jwz/xscreensaver/
 .SH SEE ALSO
 .BR X (1),
 .BR xscreensaver\-command (1),
-.BR xlock (1),
-.BR xnlock (1),
-.BR xautolock (1),
 .BR xdm (1),
+.BR ant (1),
 .BR attraction (1),
+.BR blitspin (1),
+.BR bouboule (1),
+.BR braid (1),
+.BR bubbles (1),
+.BR coral (1),
+.BR decayscreen (1),
+.BR deco (1),
+.BR drift (1),
+.BR escher (1),
+.BR fadeplot (1),
+.BR flag (1),
+.BR flame (1),
+.BR forest (1),
+.BR galaxy (1),
+.BR gears (1),
+.BR goop (1),
+.BR grav (1),
 .BR greynetic (1),
+.BR halo (1),
 .BR helix (1),
 .BR hopalong (1),
+.BR hypercube (1),
+.BR ifs (1),
+.BR imsmap (1),
+.BR julia (1),
+.BR kaleidescope (1),
+.BR laser (1),
+.BR lightning (1),
+.BR lisa (1),
+.BR lissie (1),
+.BR lmorph (1),
+.BR maze (1),
+.BR moire (1),
+.BR morph3d (1),
+.BR mountain (1),
+.BR munch (1),
 .BR noseguy (1),
+.BR pedal (1),
+.BR penrose (1),
+.BR pipes (1),
+.BR puzzle (1),
 .BR pyro (1),
-.BR xroger (1),
 .BR qix (1),
+.BR rd-bomb (1),
 .BR rocks (1),
 .BR rorschach (1),
-.BR blitspin (1),
-.BR imsmap (1),
-.BR slidescreen (1),
-.BR decayscreen (1),
-.BR maze (1),
-.BR hypercube (1),
-.BR halo (1),
-.BR flame (1),
-.BR pedal (1),
-.BR lmorph (1),
-.BR deco (1),
-.BR moire (1),
-.BR kaleidescope (1),
-.BR bubbles (1),
-.BR lightning (1),
-.BR strange (1),
-.BR fract (1),
-.BR spiral (1),
-.BR laser (1),
-.BR grav (1),
-.BR drift (1),
-.BR ifs (1),
-.BR julia (1),
-.BR penrose (1),
+.BR rotor (1),
+.BR rubik (1),
 .BR sierpinski (1),
-.BR hopalong (1),
-.BR braid (1),
-.BR bouboule (1),
-.BR galaxy (1),
-.BR flag (1),
-.BR forest (1),
+.BR slidescreen (1),
+.BR slip (1),
 .BR sphere (1),
-.BR lisa (1),
-.BR xdaliclock (1),
-.BR xbouncebits (1),
+.BR spiral (1),
+.BR sproingies (1),
+.BR starfish (1),
+.BR strange (1),
+.BR superquadrics (1),
+.BR swirl (1),
+.BR triangle (1),
+.BR vines (1),
+.BR worm (1),
+.BR xjack (1),
+.BR xlyap (1),
+.BR xroger (1),
+.BR bongo (1),
 .BR ico (1),
+.BR xaos (1),
+.BR xbouncebits (1),
+.BR xcthugha (1),
+.BR xdaliclock (1),
+.BR xfishtank (1),
+.BR xmountains (1),
+.BR xsplinefun (1),
 .BR xswarm (1),
-.BR xwave (1),
-.BR xv (1),
 .BR xtacy (1),
-.BR bongo (1),
-.BR xfishtank (1)
+.BR xv (1),
+.BR xwave (1).
 .SH COPYRIGHT
 Copyright \(co 1991, 1992, 1993, 1994, 1995, 1996, 1997 by Jamie Zawinski.
 Permission to use, copy, modify, distribute, and sell this software and its
@@ -692,5 +823,7 @@ Thanks to the many people who have contributed graphics demos to the package.
 
 Thanks to Patrick Moreau for the VMS port.
 
+Thanks to Mark Bowyer for figuring out how to hook it up to CDE.
+
 And huge thanks to Jon A. Christopher for implementing the Athena dialog
 support, so that locking and demo-mode work even if you don't have Motif.
index cd2aa38c2a8b07d12fae2e41b7f8a95efde3f709..c4fb6d6b150ca90ce05cf774d671e2fec05b35cd 100644 (file)
@@ -157,12 +157,32 @@ disable_builtin_screensaver (saver_info *si, Bool turn_off_p)
 
   /* On SGIs, if interval is non-zero, it is the number of seconds after
      screen saving starts at which the monitor should be powered down.
-     Obviously I don't want that, so make sure it's 0.
+     Obviously I don't want that, so make sure it's a large positive number.
 
      Power saving is disabled if DontPreferBlanking, but in that case,
      we don't get extension events either.  So we can't turn it off that way.
+
+     The man page for `XSetScreenSaver' says that setting interval to 0 will
+     disable powering down of the monitor, but this turns out not to be the
+     case on Irix 6.3 (O2); the monitor powers down anyway.  It didn't do
+     this on 6.2, so someone screwed up.
+
+     Extra Sucky Factoid #2: the number can't be more than 15 bits, which
+     is only a bit over nine hours.  So there's just *no fucking way* to make
+     an SGI O2 leave its monitor powered on and idle for more than nine hours.
+     You fucking losers!
+
+     [...Later...]  Ok, it's worse than that.  The above doesn't work either.
+     Setting it to a small number will cause it to power down early; but even
+     if you set it to a large number, it still seems to power down in about
+     an hour.  You fucking fucking fucking losers!
    */
-  desired_server_interval = 0;
+#ifdef HAVE_SGI_SAVER_EXTENSION
+  if (p->use_sgi_saver_extension)
+    desired_server_interval = 32767;
+  else
+#endif
+    desired_server_interval = 0;
 
   /* I suspect (but am not sure) that DontAllowExposures might have
      something to do with powering off the monitor as well. */
index b991c65949458d94f8052fa68c04a59b7faafebc..6bb37acdc63f95ffb6e1e79845a350c838fc7502 100644 (file)
@@ -42,6 +42,8 @@ HACK_POST     = -lXt -lX11 -lXext $(X_EXTRA_LIBS) -lm
 HACK_LIBS      = $(HACK_PRE)            @HACK_LIBS@ $(HACK_POST)
 XPM_LIBS       = $(HACK_PRE) @XPM_LIBS@ @HACK_LIBS@ $(HACK_POST)
 XLOCK_LIBS     = $(HACK_LIBS)
+SGI_VIDEO_OBJS  = @SGI_VIDEO_OBJS@
+SGI_VIDEO_LIBS  = @SGI_VIDEO_LIBS@
 
 UTILS_SRC      = $(srcdir)/../utils
 UTILS_BIN      = ../utils
@@ -53,65 +55,72 @@ UTIL_SRCS   = $(UTILS_SRC)/alpha.c $(UTILS_SRC)/colors.c \
                  $(UTILS_SRC)/resources.c $(UTILS_SRC)/spline.c \
                  $(UTILS_SRC)/usleep.c $(UTILS_SRC)/visual.c \
                  $(UTILS_SRC)/xroger.c $(UTILS_SRC)/yarandom.c \
-                 $(UTILS_SRC)/erase.c
+                 $(UTILS_SRC)/erase.c $(UTILS_SRC)/sgivideo.c
 UTIL_OBJS      = $(UTILS_SRC)/alpha.o $(UTILS_SRC)/colors.o \
                  $(UTILS_SRC)/grabscreen.o $(UTILS_SRC)/hsv.o \
                  $(UTILS_SRC)/resources.o $(UTILS_SRC)/spline.o \
                  $(UTILS_SRC)/usleep.o $(UTILS_SRC)/visual.o \
                  $(UTILS_SRC)/xroger.o $(UTILS_SRC)/yarandom.o \
-                 $(UTILS_SRC)/erase.o
+                 $(UTILS_SRC)/erase.o $(UTILS_SRC)/sgivideo.o
 
 SRCS           = attraction.c blitspin.c bouboule.c braid.c bubbles.c \
                  bubbles_default.c decayscreen.c deco.c drift.c flag.c \
-                 flame.c forest.c fract.c galaxy.c grav.c greynetic.c \
+                 flame.c forest.c vines.c galaxy.c grav.c greynetic.c \
                  halo.c helix.c hopalong.c hypercube.c ifs.c imsmap.c \
                  julia.c kaleidescope.c laser.c lightning.c lisa.c lmorph.c \
                  maze.c moire.c noseguy.c pedal.c penrose.c pyro.c qix.c \
                  rocks.c rorschach.c screenhack.c sierpinski.c slidescreen.c \
                  slip.c sphere.c spiral.c strange.c swirl.c xlockmore.c \
                  xroger-hack.c goop.c starfish.c munch.c fadeplot.c \
-                 rd-bomb.c coral.c
+                 rd-bomb.c coral.c mountain.c triangle.c lissie.c worm.c \
+                 rotor.c ant.c xjack.c xlyap.c puzzle.c xscreensaver-sgigl.c
 
 OBJS           = attraction.o blitspin.o bouboule.o braid.o bubbles.o \
                  bubbles_default.o decayscreen.o deco.o drift.o flag.o \
-                 flame.o forest.o fract.o galaxy.o grav.o greynetic.o \
+                 flame.o forest.o vines.o galaxy.o grav.o greynetic.o \
                  halo.o helix.o hopalong.o hypercube.o ifs.o imsmap.o \
                  julia.o kaleidescope.o laser.o lightning.o lisa.o lmorph.o \
                  maze.o moire.o noseguy.o pedal.o penrose.o pyro.o qix.o \
                  rocks.o rorschach.o screenhack.o sierpinski.o slidescreen.o \
                  slip.o sphere.o spiral.o strange.o swirl.o xlockmore.o \
                  xroger-hack.o goop.o starfish.o munch.o fadeplot.o \
-                 rd-bomb.o coral.o
+                 rd-bomb.o coral.o mountain.o triangle.o lissie.o worm.o \
+                 rotor.o ant.o xjack.o xlyap.o puzzle.o xscreensaver-sgigl.o
 
 EXES           = attraction blitspin bouboule braid bubbles decayscreen deco \
-                 drift flag flame forest fract galaxy grav greynetic halo \
+                 drift flag flame forest vines galaxy grav greynetic halo \
                  helix hopalong hypercube ifs imsmap julia kaleidescope \
                  laser lightning lisa lmorph maze moire noseguy pedal \
                  penrose pyro qix rocks rorschach sierpinski slidescreen \
                  slip sphere spiral strange swirl xroger goop starfish munch \
-                 fadeplot rd-bomb coral
+                 fadeplot rd-bomb coral mountain triangle lissie worm rotor \
+                 ant xjack xlyap puzzle
 
 HACK_OBJS_1    = $(UTILS_BIN)/resources.o $(UTILS_BIN)/visual.o \
                  $(UTILS_BIN)/usleep.o $(UTILS_BIN)/yarandom.o @XMU_OBJS@
 HACK_OBJS      = screenhack.o $(HACK_OBJS_1)
 XLOCK_OBJS     = screenhack-xlock.o xlockmore.o $(COLOR_OBJS) $(HACK_OBJS_1)
 COLOR_OBJS     = $(UTILS_BIN)/hsv.o $(UTILS_BIN)/colors.o
-GRAB_OBJS      = $(UTILS_BIN)/grabscreen.o $(COLOR_OBJS)
+GRAB_OBJS_1    = $(UTILS_BIN)/grabscreen.o $(SGI_VIDEO_OBJS)
+GRAB_OBJS      = $(GRAB_OBJS_1) $(COLOR_OBJS)
+GRAB_LIBS      = $(SGI_VIDEO_LIBS)
 
 HDRS           = bubbles.h screenhack.h xlockmore.h xlockmoreI.h
 MEN            = attraction.man blitspin.man bouboule.man braid.man \
                  bubbles.man decayscreen.man deco.man drift.man flag.man \
-                 flame.man forest.man fract.man galaxy.man grav.man \
+                 flame.man forest.man vines.man galaxy.man grav.man \
                  greynetic.man halo.man helix.man hopalong.man hypercube.man \
                  ifs.man imsmap.man julia.man kaleidescope.man laser.man \
                  lightning.man lisa.man lmorph.man maze.man moire.man \
                  noseguy.man pedal.man penrose.man pyro.man qix.man \
                  rocks.man rorschach.man sierpinski.man slidescreen.man \
                  slip.man sphere.man spiral.man strange.man swirl.man \
-                 xroger.man goop.man starfish.man munch.man rd-bomb.man
+                 xroger.man goop.man starfish.man munch.man rd-bomb.man \
+                 xjack.man xlyap.man puzzle.man
 STAR           = *
 EXTRAS         = README Makefile.in xlock.h default.xbm bob.xbm .gdbinit \
                  noses/nose-$(STAR).xbm noses/nose-$(STAR).xpm \
+                 pieces/$(STAR).xbm \
                  bubbles-tools/bubbles$(STAR) \
                  bubbles-tools/xpm$(STAR) \
                  bubbles-sources/$(STAR).pov \
@@ -176,7 +185,7 @@ depend:
 # close.  This excludes dependencies on files in /usr/include, etc.  It tries
 # to include only dependencies on files which are themselves a part of this
 # package.
-distdepend:
+distdepend::
        @echo updating dependencies in `pwd`/Makefile.in... ;               \
        $(DEPEND) -w 0 -f -                                                 \
        -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
@@ -200,6 +209,58 @@ echo_tarfiles:
        @echo $(TARFILES)
 
 
+# Rules for generating the VMS makefiles on Unix, so that it doesn't have to
+# be done by hand...
+#
+VMS_AXP_COMPILE_1=$$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE
+VMS_AXP_COMPILE_2=)/INCL=([],[-],[-.UTILS])
+
+compile_axp.com: Makefile.in
+       @echo generating $@ from $<...  ;                                   \
+       ( for c in $(SRCS) ; do                                             \
+          c=`echo $$c | tr a-z A-Z` ;                                      \
+          echo "$(VMS_AXP_COMPILE_1)$(VMS_AXP_COMPILE_2) $$c" ;            \
+         done ;                                                                    \
+        foo="$(VMS_AXP_COMPILE_1),XLOCKMORE$(VMS_AXP_COMPILE_2)" ;         \
+         echo $${foo}/OBJ=SCREENHACK-XLOCK.OBJ SCREENHACK.C ;              \
+       ) | sort > $@
+
+compile_decc.com: compile_axp.com
+       @echo generating $@ from $<...  ;                                   \
+       sed 's/axp/decc/g' < $< > $@
+
+#### TODO: generating link_axp.com is kinda tricky...
+
+link_decc.com: link_axp.com
+       @echo generating $@ from $<...  ;                                   \
+       sed 's/axp/decc/g' < $< > $@
+
+$(srcdir)/../setup.com: Makefile.in
+       @echo generating $@ from $<...  ;                                   \
+       ( echo '$$! Xscreensaver - definition of various DCL symbols' ;     \
+         echo '$$ set NOON' ;                                              \
+         echo '$$ set def [.HACKS]' ;                                      \
+         echo '$$ mydisk = f$$trnlmn("SYS$$DISK")' ;                       \
+         echo '$$ mydir  = mydisk+f$$directory()' ;                        \
+         ( for c in $(EXES) ; do                                           \
+            c2="$${c}          " ;                                         \
+            c2=`echo "$${c2}" | sed 's/^\(........*\)  $$/\1/'` ;          \
+            echo '$$' "$${c2}:== $$'mydir'$${c}" ;                         \
+             done ;                                                        \
+         ) | sort ;                                                        \
+          echo '$$ set def [-.DRIVER]' ;                                   \
+          echo '$$ mydir  = mydisk+f$$directory()' ;                       \
+          echo "$$ xscreensaver :== $$'mydir'xscreensaver" ;               \
+         echo "$$ xscreen*command :== $$'mydir'xscreensaver-command" ;     \
+         echo '$$ set def [-]' ;                                           \
+         echo '$$ exit' ;                                                  \
+          ) > $@
+
+distdepend:: compile_axp.com compile_decc.com
+distdepend:: link_axp.com link_decc.com
+distdepend:: $(srcdir)/../setup.com
+
+
 # Rules for noticing when the objects from the utils directory are out of
 # date with respect to their sources, and going and building them according
 # to the rules in their own Makefile...
@@ -207,6 +268,7 @@ echo_tarfiles:
 $(UTILS_BIN)/alpha.o:          $(UTILS_SRC)/alpha.c
 $(UTILS_BIN)/colors.o:         $(UTILS_SRC)/colors.c
 $(UTILS_BIN)/grabscreen.o:     $(UTILS_SRC)/grabscreen.c
+$(UTILS_BIN)/sgivideo.o:       $(UTILS_SRC)/sgivideo.c
 $(UTILS_BIN)/hsv.o:            $(UTILS_SRC)/hsv.c
 $(UTILS_BIN)/resources.o:      $(UTILS_SRC)/resources.c
 $(UTILS_BIN)/spline.o:         $(UTILS_SRC)/spline.c
@@ -237,12 +299,16 @@ ALP               = $(HSV) $(UTILS_BIN)/alpha.o
 HSV            = $(UTILS_BIN)/hsv.o
 SPL            = $(UTILS_BIN)/spline.o
 XROG           = $(UTILS_BIN)/xroger.o
-GRAB           = $(UTILS_BIN)/grabscreen.o
+GRAB           = $(GRAB_OBJS)
 ERASE          = $(UTILS_BIN)/erase.o
 COL            = $(COLOR_OBJS)
 
 CC_HACK                = $(CC) $(LDFLAGS)
 
+xscreensaver-sgigl: xscreensaver-sgigl.c
+       $(CC) $(LDFLAGS) -o $@ $< -I$(UTILS_SRC) $(HACK_PRE) \
+               -lXmu -lX11 -lXext $(X_EXTRA_LIBS) -lm
+
 
 # The rules for those hacks which follow the `screenhack.c' API.
 # If make wasn't such an utter abomination, these could all be combined
@@ -253,14 +319,14 @@ CC_HACK           = $(CC) $(LDFLAGS)
 attraction:             $(HACK_OBJS) attraction.o $(COL) $(SPL)
        $(CC_HACK) -o $@ $(HACK_OBJS) attraction.o $(COL) $(SPL) $(HACK_LIBS)
 
-blitspin:               $(HACK_OBJS) blitspin.o $(GRAB_OBJS)
-       $(CC_HACK) -o $@ $(HACK_OBJS) blitspin.o $(GRAB_OBJS) $(XPM_LIBS)
+blitspin:               $(HACK_OBJS) blitspin.o $(GRAB)
+       $(CC_HACK) -o $@ $(HACK_OBJS) blitspin.o $(GRAB) $(XPM_LIBS) $(GRAB_LIBS)
 
 bubbles:                $(HACK_OBJS) bubbles.o bubbles_default.o 
        $(CC_HACK) -o $@ $(HACK_OBJS) bubbles.o bubbles_default.o $(XPM_LIBS)
 
-decayscreen:            $(HACK_OBJS) decayscreen.o $(GRAB_OBJS)
-       $(CC_HACK) -o $@ $(HACK_OBJS) decayscreen.o $(GRAB_OBJS) $(HACK_LIBS)
+decayscreen:            $(HACK_OBJS) decayscreen.o $(GRAB)
+       $(CC_HACK) -o $@ $(HACK_OBJS) decayscreen.o $(GRAB) $(HACK_LIBS) $(GRAB_LIBS)
 
 deco:                   $(HACK_OBJS) deco.o $(COL)
        $(CC_HACK) -o $@ $(HACK_OBJS) deco.o $(COL) $(HACK_LIBS)
@@ -289,8 +355,8 @@ kaleidescope:                $(HACK_OBJS) kaleidescope.o
 lmorph:                         $(HACK_OBJS) lmorph.o
        $(CC_HACK) -o $@ $(HACK_OBJS) lmorph.o $(HACK_LIBS)
 
-maze:                   $(HACK_OBJS) maze.o $(UTILS_BIN)/xroger.o
-       $(CC_HACK) -o $@ $(HACK_OBJS) maze.o $(UTILS_BIN)/xroger.o $(HACK_LIBS)
+maze:                   $(HACK_OBJS) maze.o $(ERASE) $(UTILS_BIN)/xroger.o
+       $(CC_HACK) -o $@ $(HACK_OBJS) maze.o $(ERASE) $(UTILS_BIN)/xroger.o $(HACK_LIBS)
 
 moire:                  $(HACK_OBJS) moire.o $(COL)
        $(CC_HACK) -o $@ $(HACK_OBJS) moire.o $(COL) $(HACK_LIBS)
@@ -313,8 +379,8 @@ rocks:                       $(HACK_OBJS) rocks.o $(COL)
 rorschach:              $(HACK_OBJS) rorschach.o $(HSV) $(ERASE)
        $(CC_HACK) -o $@ $(HACK_OBJS) rorschach.o $(HSV) $(ERASE) $(HACK_LIBS)
 
-slidescreen:            $(HACK_OBJS) slidescreen.o $(GRAB_OBJS)
-       $(CC_HACK) -o $@ $(HACK_OBJS) slidescreen.o $(GRAB_OBJS) $(HACK_LIBS)
+slidescreen:            $(HACK_OBJS) slidescreen.o $(GRAB)
+       $(CC_HACK) -o $@ $(HACK_OBJS) slidescreen.o $(GRAB) $(HACK_LIBS) $(GRAB_LIBS)
 
 xroger:                         $(HACK_OBJS) xroger-hack.o $(HSV) $(XROG)
        $(CC_HACK) -o $@ $(HACK_OBJS) xroger-hack.o $(HSV) $(XROG) $(HACK_LIBS)
@@ -331,8 +397,17 @@ munch:                      $(HACK_OBJS) munch.o $(COL) $(SPL)
 rd-bomb:                $(HACK_OBJS) rd-bomb.o $(COL)
        $(CC_HACK) -o $@ $(HACK_OBJS) rd-bomb.o $(COL) $(HACK_LIBS)
 
-coral: $(HACK_OBJS) coral.o $(COLOR_OBJS)
-       $(CC_HACK) -o $@ $(HACK_OBJS) coral.o $(COLOR_OBJS) $(HACK_LIBS)
+coral: $(HACK_OBJS) coral.o $(COL) $(ERASE)
+       $(CC_HACK) -o $@ $(HACK_OBJS) coral.o $(COL) $(ERASE) $(HACK_LIBS)
+
+xjack: $(HACK_OBJS) xjack.o
+       $(CC_HACK) -o $@ $(HACK_OBJS) xjack.o $(HACK_LIBS)
+
+xlyap: $(HACK_OBJS) xlyap.o $(COL)
+       $(CC_HACK) -o $@ $(HACK_OBJS) xlyap.o $(COL) $(HACK_LIBS)
+
+puzzle: $(HACK_OBJS) puzzle.o $(GRAB)
+       $(CC_HACK) -o $@ $(HACK_OBJS) puzzle.o $(GRAB) $(HACK_LIBS) $(GRAB_LIBS)
 
 
 # The rules for those hacks which follow the `xlockmore' API.
@@ -341,20 +416,20 @@ coral: $(HACK_OBJS) coral.o $(COLOR_OBJS)
 bouboule:      bouboule.o      $(XLOCK_OBJS)
        $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(HACK_LIBS)
 
-braid:         braid.o         $(XLOCK_OBJS)
-       $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(HACK_LIBS)
+braid:         braid.o         $(XLOCK_OBJS) $(ERASE)
+       $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(ERASE) $(HACK_LIBS)
 
-drift:         drift.o         $(XLOCK_OBJS)
-       $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(HACK_LIBS)
+drift:         drift.o         $(XLOCK_OBJS) $(ERASE)
+       $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(ERASE) $(HACK_LIBS)
 
 flag:          flag.o          $(XLOCK_OBJS)
        $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(HACK_LIBS)
 
-forest:                forest.o        $(XLOCK_OBJS)
-       $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(HACK_LIBS)
+forest:                forest.o        $(XLOCK_OBJS) $(ERASE)
+       $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(ERASE) $(HACK_LIBS)
 
-fract:         fract.o         $(XLOCK_OBJS)
-       $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(HACK_LIBS)
+vines:         vines.o         $(XLOCK_OBJS) $(ERASE)
+       $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(ERASE) $(HACK_LIBS)
 
 galaxy:                galaxy.o        $(XLOCK_OBJS)
        $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(HACK_LIBS)
@@ -362,8 +437,8 @@ galaxy:             galaxy.o        $(XLOCK_OBJS)
 grav:          grav.o          $(XLOCK_OBJS)
        $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(HACK_LIBS)
 
-hopalong:      hopalong.o      $(XLOCK_OBJS)
-       $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(HACK_LIBS)
+hopalong:      hopalong.o      $(XLOCK_OBJS) $(ERASE)
+       $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(ERASE) $(HACK_LIBS)
 
 ifs:           ifs.o           $(XLOCK_OBJS)
        $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(HACK_LIBS)
@@ -380,6 +455,9 @@ lightning:  lightning.o     $(XLOCK_OBJS)
 lisa:          lisa.o          $(XLOCK_OBJS)
        $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(HACK_LIBS)
 
+lissie:                lissie.o        $(XLOCK_OBJS)
+       $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(HACK_LIBS)
+
 penrose:       penrose.o       $(XLOCK_OBJS)
        $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(HACK_LIBS)
 
@@ -387,7 +465,7 @@ sierpinski: sierpinski.o    $(XLOCK_OBJS)
        $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(HACK_LIBS)
 
 slip:          slip.o          $(XLOCK_OBJS) $(GRAB)
-       $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(GRAB) $(HACK_LIBS)
+       $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(GRAB_OBJS_1) $(HACK_LIBS) $(GRAB_LIBS)
 
 sphere:                sphere.o        $(XLOCK_OBJS)
        $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(HACK_LIBS)
@@ -404,6 +482,21 @@ swirl:             swirl.o         $(XLOCK_OBJS)
 fadeplot:      fadeplot.o      $(XLOCK_OBJS)
        $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(HACK_LIBS)
 
+mountain:      mountain.o      $(XLOCK_OBJS)
+       $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(HACK_LIBS)
+
+triangle:      triangle.o      $(XLOCK_OBJS)
+       $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(HACK_LIBS)
+
+worm:          worm.o          $(XLOCK_OBJS)
+       $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(HACK_LIBS)
+
+rotor:         rotor.o         $(XLOCK_OBJS)
+       $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(HACK_LIBS)
+
+ant:           ant.o           $(XLOCK_OBJS) $(ERASE)
+       $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(ERASE) $(HACK_LIBS)
+
 
 ##############################################################################
 #
@@ -451,6 +544,7 @@ braid.o: $(UTILS_SRC)/hsv.h
 braid.o: $(UTILS_SRC)/colors.h
 braid.o: $(UTILS_SRC)/grabscreen.h
 braid.o: $(UTILS_SRC)/visual.h
+braid.o: $(UTILS_SRC)/erase.h
 bubbles.o: $(srcdir)/screenhack.h
 bubbles.o: $(srcdir)/../config.h
 bubbles.o: $(UTILS_SRC)/yarandom.h
@@ -492,6 +586,7 @@ drift.o: $(UTILS_SRC)/hsv.h
 drift.o: $(UTILS_SRC)/colors.h
 drift.o: $(UTILS_SRC)/grabscreen.h
 drift.o: $(UTILS_SRC)/visual.h
+drift.o: $(UTILS_SRC)/erase.h
 flag.o: $(srcdir)/xlockmore.h
 flag.o: $(srcdir)/../config.h
 flag.o: $(srcdir)/xlockmoreI.h
@@ -524,17 +619,19 @@ forest.o: $(UTILS_SRC)/hsv.h
 forest.o: $(UTILS_SRC)/colors.h
 forest.o: $(UTILS_SRC)/grabscreen.h
 forest.o: $(UTILS_SRC)/visual.h
-fract.o: $(srcdir)/xlockmore.h
-fract.o: $(srcdir)/../config.h
-fract.o: $(srcdir)/xlockmoreI.h
-fract.o: $(srcdir)/screenhack.h
-fract.o: $(UTILS_SRC)/yarandom.h
-fract.o: $(UTILS_SRC)/usleep.h
-fract.o: $(UTILS_SRC)/resources.h
-fract.o: $(UTILS_SRC)/hsv.h
-fract.o: $(UTILS_SRC)/colors.h
-fract.o: $(UTILS_SRC)/grabscreen.h
-fract.o: $(UTILS_SRC)/visual.h
+forest.o: $(UTILS_SRC)/erase.h
+vines.o: $(srcdir)/xlockmore.h
+vines.o: $(srcdir)/../config.h
+vines.o: $(srcdir)/xlockmoreI.h
+vines.o: $(srcdir)/screenhack.h
+vines.o: $(UTILS_SRC)/yarandom.h
+vines.o: $(UTILS_SRC)/usleep.h
+vines.o: $(UTILS_SRC)/resources.h
+vines.o: $(UTILS_SRC)/hsv.h
+vines.o: $(UTILS_SRC)/colors.h
+vines.o: $(UTILS_SRC)/grabscreen.h
+vines.o: $(UTILS_SRC)/visual.h
+vines.o: $(UTILS_SRC)/erase.h
 galaxy.o: $(srcdir)/xlockmore.h
 galaxy.o: $(srcdir)/../config.h
 galaxy.o: $(srcdir)/xlockmoreI.h
@@ -596,6 +693,7 @@ hopalong.o: $(UTILS_SRC)/hsv.h
 hopalong.o: $(UTILS_SRC)/colors.h
 hopalong.o: $(UTILS_SRC)/grabscreen.h
 hopalong.o: $(UTILS_SRC)/visual.h
+hopalong.o: $(UTILS_SRC)/erase.h
 hypercube.o: $(srcdir)/screenhack.h
 hypercube.o: $(srcdir)/../config.h
 hypercube.o: $(UTILS_SRC)/yarandom.h
@@ -697,6 +795,7 @@ maze.o: $(UTILS_SRC)/hsv.h
 maze.o: $(UTILS_SRC)/colors.h
 maze.o: $(UTILS_SRC)/grabscreen.h
 maze.o: $(UTILS_SRC)/visual.h
+maze.o: $(UTILS_SRC)/erase.h
 moire.o: $(srcdir)/screenhack.h
 moire.o: $(srcdir)/../config.h
 moire.o: $(UTILS_SRC)/yarandom.h
@@ -946,4 +1045,137 @@ coral.o: $(UTILS_SRC)/hsv.h
 coral.o: $(UTILS_SRC)/colors.h
 coral.o: $(UTILS_SRC)/grabscreen.h
 coral.o: $(UTILS_SRC)/visual.h
+coral.o: $(UTILS_SRC)/erase.h
+mountain.o: $(srcdir)/xlockmore.h
+mountain.o: $(srcdir)/../config.h
+mountain.o: $(srcdir)/xlockmoreI.h
+mountain.o: $(srcdir)/screenhack.h
+mountain.o: $(UTILS_SRC)/yarandom.h
+mountain.o: $(UTILS_SRC)/usleep.h
+mountain.o: $(UTILS_SRC)/resources.h
+mountain.o: $(UTILS_SRC)/hsv.h
+mountain.o: $(UTILS_SRC)/colors.h
+mountain.o: $(UTILS_SRC)/grabscreen.h
+mountain.o: $(UTILS_SRC)/visual.h
+triangle.o: $(srcdir)/xlockmore.h
+triangle.o: $(srcdir)/../config.h
+triangle.o: $(srcdir)/xlockmoreI.h
+triangle.o: $(srcdir)/screenhack.h
+triangle.o: $(UTILS_SRC)/yarandom.h
+triangle.o: $(UTILS_SRC)/usleep.h
+triangle.o: $(UTILS_SRC)/resources.h
+triangle.o: $(UTILS_SRC)/hsv.h
+triangle.o: $(UTILS_SRC)/colors.h
+triangle.o: $(UTILS_SRC)/grabscreen.h
+triangle.o: $(UTILS_SRC)/visual.h
+lissie.o: $(srcdir)/xlockmore.h
+lissie.o: $(srcdir)/../config.h
+lissie.o: $(srcdir)/xlockmoreI.h
+lissie.o: $(srcdir)/screenhack.h
+lissie.o: $(UTILS_SRC)/yarandom.h
+lissie.o: $(UTILS_SRC)/usleep.h
+lissie.o: $(UTILS_SRC)/resources.h
+lissie.o: $(UTILS_SRC)/hsv.h
+lissie.o: $(UTILS_SRC)/colors.h
+lissie.o: $(UTILS_SRC)/grabscreen.h
+lissie.o: $(UTILS_SRC)/visual.h
+worm.o: $(srcdir)/xlockmore.h
+worm.o: $(srcdir)/../config.h
+worm.o: $(srcdir)/xlockmoreI.h
+worm.o: $(srcdir)/screenhack.h
+worm.o: $(UTILS_SRC)/yarandom.h
+worm.o: $(UTILS_SRC)/usleep.h
+worm.o: $(UTILS_SRC)/resources.h
+worm.o: $(UTILS_SRC)/hsv.h
+worm.o: $(UTILS_SRC)/colors.h
+worm.o: $(UTILS_SRC)/grabscreen.h
+worm.o: $(UTILS_SRC)/visual.h
+rotor.o: $(srcdir)/xlockmore.h
+rotor.o: $(srcdir)/../config.h
+rotor.o: $(srcdir)/xlockmoreI.h
+rotor.o: $(srcdir)/screenhack.h
+rotor.o: $(UTILS_SRC)/yarandom.h
+rotor.o: $(UTILS_SRC)/usleep.h
+rotor.o: $(UTILS_SRC)/resources.h
+rotor.o: $(UTILS_SRC)/hsv.h
+rotor.o: $(UTILS_SRC)/colors.h
+rotor.o: $(UTILS_SRC)/grabscreen.h
+rotor.o: $(UTILS_SRC)/visual.h
+ant.o: $(srcdir)/xlockmore.h
+ant.o: $(srcdir)/../config.h
+ant.o: $(srcdir)/xlockmoreI.h
+ant.o: $(srcdir)/screenhack.h
+ant.o: $(UTILS_SRC)/yarandom.h
+ant.o: $(UTILS_SRC)/usleep.h
+ant.o: $(UTILS_SRC)/resources.h
+ant.o: $(UTILS_SRC)/hsv.h
+ant.o: $(UTILS_SRC)/colors.h
+ant.o: $(UTILS_SRC)/grabscreen.h
+ant.o: $(UTILS_SRC)/visual.h
+ant.o: $(UTILS_SRC)/erase.h
+xjack.o: $(srcdir)/screenhack.h
+xjack.o: $(srcdir)/../config.h
+xjack.o: $(UTILS_SRC)/yarandom.h
+xjack.o: $(UTILS_SRC)/usleep.h
+xjack.o: $(UTILS_SRC)/resources.h
+xjack.o: $(UTILS_SRC)/hsv.h
+xjack.o: $(UTILS_SRC)/colors.h
+xjack.o: $(UTILS_SRC)/grabscreen.h
+xjack.o: $(UTILS_SRC)/visual.h
+xlyap.o: $(srcdir)/screenhack.h
+xlyap.o: $(srcdir)/../config.h
+xlyap.o: $(UTILS_SRC)/yarandom.h
+xlyap.o: $(UTILS_SRC)/usleep.h
+xlyap.o: $(UTILS_SRC)/resources.h
+xlyap.o: $(UTILS_SRC)/hsv.h
+xlyap.o: $(UTILS_SRC)/colors.h
+xlyap.o: $(UTILS_SRC)/grabscreen.h
+xlyap.o: $(UTILS_SRC)/visual.h
+xlyap.o: $(UTILS_SRC)/vroot.h
+puzzle.o: $(srcdir)/screenhack.h
+puzzle.o: $(srcdir)/../config.h
+puzzle.o: $(UTILS_SRC)/yarandom.h
+puzzle.o: $(UTILS_SRC)/usleep.h
+puzzle.o: $(UTILS_SRC)/resources.h
+puzzle.o: $(UTILS_SRC)/hsv.h
+puzzle.o: $(UTILS_SRC)/colors.h
+puzzle.o: $(UTILS_SRC)/grabscreen.h
+puzzle.o: $(UTILS_SRC)/visual.h
+puzzle.o: $(srcdir)/pieces/puzzle_a_h.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_a_n_h.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_a_ne_h.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_a_e_h.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_a_se_h.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_a_s_h.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_a_sw_h.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_a_w_h.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_a_nw_h.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_b_h.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_b_n_h.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_b_ne_h.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_b_e_h.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_b_se_h.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_b_s_h.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_b_sw_h.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_b_w_h.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_b_nw_h.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_a_f.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_a_n_f.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_a_ne_f.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_a_e_f.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_a_se_f.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_a_s_f.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_a_sw_f.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_a_w_f.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_a_nw_f.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_b_f.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_b_n_f.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_b_ne_f.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_b_e_f.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_b_se_f.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_b_s_f.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_b_sw_f.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_b_w_f.xbm
+puzzle.o: $(srcdir)/pieces/puzzle_b_nw_f.xbm
+xscreensaver-sgigl.o: $(UTILS_SRC)/vroot.h
 
diff --git a/hacks/ant.c b/hacks/ant.c
new file mode 100644 (file)
index 0000000..5ceb5fa
--- /dev/null
@@ -0,0 +1,1096 @@
+/* -*- Mode: C; tab-width: 4 -*- */
+/*-
+ * ant --- Chris Langton's generalized turing machine ants (also known
+ *         as Greg Turk's turmites) whose tape is the screen
+ */
+
+#if !defined( lint ) && !defined( SABER )
+static const char sccsid[] = "@(#)ant.c        4.04 97/07/28 xlockmore";
+
+#endif
+
+/*-
+ * Copyright (c) 1995 by David Bagley.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation.
+ *
+ * This file is provided AS IS with no warranties of any kind.  The author
+ * shall have no liability with respect to the infringement of copyrights,
+ * trade secrets or any patents by this file or any part thereof.  In no
+ * event will the author be liable for any lost revenue or profits or
+ * other special, indirect and consequential damages.
+ *
+ * Revision History:
+ * 10-May-97: Compatible with xscreensaver
+ * 16-Apr-97: -neighbors 3 and 8 added
+ * 01-Jan-97: Updated ant.c to handle more kinds of ants.  Thanks to
+ *            J Austin David <Austin.David@tlogic.com>.  Check it out in
+ *            java at http://havoc.gtf.gatech.edu/austin  He thought up the
+ *            new Ladder ant.
+ * 04-Apr-96: -neighbors 6 runtime-time option added for hexagonal ants
+ *            (bees), coded from an idea of Jim Propp's in Science News,
+ *            Oct 28, 1995 VOL. 148 page 287
+ * 20-Sep-95: Memory leak in ant fixed.  Now random colors.
+ * 05-Sep-95: Coded from A.K. Dewdney's "Computer Recreations", Scientific
+ *            American Magazine" Sep 1989 pp 180-183, Mar 1990 p 121
+ *            Also used Ian Stewart's Mathematical Recreations, Scientific
+ *            American Jul 1994 pp 104-107
+ *            also used demon.c and life.c as a guide.
+ */
+
+/*-
+  Species Grid     Number of Neigbors
+  ------- ----     ------------------
+  Ants    Square   4 or 8
+  Bees    Hexagon  6
+  Bees    Triangle 3 (9? or 12) <- 9 and 12 are not implemented
+
+  Neighbors 6 and neighbors 3 produce the same Turk ants.
+*/
+
+#ifdef STANDALONE
+# define PROGCLASS "Ant"
+# define HACK_INIT init_ant
+# define HACK_DRAW draw_ant
+# define ant_opts xlockmore_opts
+# define DEFAULTS      "*delay:   1000 \n"             \
+                                       "*count:  -3 \n"                \
+                                       "*cycles:  40000 \n"    \
+                                       "*size:   -7 \n"                \
+                                       "*ncolors: 64 \n"               \
+                                       "*eraseSpeed: 400 \n"   \
+                                       "*eraseMode: -1 \n"
+# include "xlockmore.h"                /* in xscreensaver distribution */
+# include "erase.h"
+#else /* STANDALONE */
+# include "xlock.h"            /* in xlockmore distribution */
+
+#endif /* STANDALONE */
+
+#define DEF_TRUCHET  "False"
+
+#ifdef STANDALONE
+static int neighbors;
+#else
+extern int  neighbors;
+#endif /* !STANDALONE */
+
+static Bool truchet;
+
+static XrmOptionDescRec opts[] =
+{
+       {"-truchet", ".ant.truchet", XrmoptionNoArg, (caddr_t) "on"},
+       {"+truchet", ".ant.truchet", XrmoptionNoArg, (caddr_t) "off"},
+
+#ifdef STANDALONE
+       {"-neighbors", ".ant.neighbors", XrmoptionNoArg, (caddr_t) "on"},
+       {"+neighbors", ".ant.neighbors", XrmoptionNoArg, (caddr_t) "off"}
+#endif /* STANDALONE */
+
+};
+static argtype vars[] =
+{
+       {(caddr_t *) & truchet, "truchet", "Truchet", DEF_TRUCHET, t_Bool},
+#ifdef STANDALONE
+       {(caddr_t *) & neighbors, "neighbors", "Neighbors", 0, t_Bool}
+#endif /* STANDALONE */
+};
+static OptionStruct desc[] =
+{
+       {"-/+truchet", "turn on/off Truchet lines"}
+};
+
+ModeSpecOpt ant_opts =
+{2, opts, 1, vars, desc};
+
+
+#define ANTBITS(n,w,h)\
+  ap->pixmaps[ap->init_bits++]=\
+  XCreatePixmapFromBitmapData(display,window,(char *)n,w,h,1,0,1)
+
+/* If you change the table you may have to change the following 2 constants */
+#define STATES 2
+#define COLORS 11
+#define MINANTS 1
+#define PATTERNSIZE 8
+#define REDRAWSTEP 2000                /* How much tape to draw per cycle */
+#define MINGRIDSIZE 24
+#define MINSIZE 1
+#define ANGLES 360
+#define NEIGHBORKINDS 3
+
+#ifdef STANDALONE
+static XPoint hexagonUnit[6] =
+{
+       {0, 0},
+       {1, 1},
+       {0, 2},
+       {-1, 1},
+       {-1, -1},
+       {0, -2}
+};
+
+static XPoint triangleUnit[2][3] =
+{
+       {
+               {0, 0},
+               {1, -1},
+               {0, 2}
+       },
+       {
+               {0, 0},
+               {-1, 1},
+               {0, -2}
+       }
+};
+
+#endif /* STANDALONE */
+
+
+static unsigned char patterns[COLORS - 1][PATTERNSIZE] =
+{
+       {0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22},       /* grey+white | stripe */
+       {0x00, 0x66, 0x66, 0x00, 0x00, 0x66, 0x66, 0x00},       /* spots */
+       {0x89, 0x44, 0x22, 0x11, 0x88, 0x44, 0x22, 0x11},       /* lt. / stripe */
+       {0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66},       /* | bars */
+       {0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa},       /* 50% grey */
+       {0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00},       /* - bars */
+       {0xee, 0xdd, 0xbb, 0x77, 0xee, 0xdd, 0xbb, 0x76},       /* dark \ stripe */
+       {0xff, 0x99, 0x99, 0xff, 0xff, 0x99, 0x99, 0xff},       /* spots */
+       {0xaa, 0xff, 0xff, 0x55, 0xaa, 0xff, 0xff, 0x55},       /* black+grey - stripe */
+       {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}        /* black */
+};
+
+typedef struct {
+       unsigned char color;
+       short       direction;
+       unsigned char next;
+} statestruct;
+
+typedef struct {
+       int         col, row;
+       short       direction;
+       unsigned char state;
+} antstruct;
+
+typedef struct {
+       int         init_bits;
+       int         neighbors;
+       int         generation;
+       int         xs, ys;
+       int         xb, yb;
+       int         nrows, ncols;
+       int         width, height;
+       unsigned char ncolors, nstates;
+       int         n;
+       int         redrawing, redrawpos;
+       int         truchet;    /* Only for Turk modes */
+       statestruct machine[COLORS * STATES];
+       unsigned char *tape;
+       unsigned char *truchet_state;
+       antstruct  *ants;
+       unsigned char colors[COLORS - 1];
+       GC          stippledGC;
+       Pixmap      pixmaps[COLORS - 1];
+       XPoint      hexagonList[7];
+       XPoint      triangleList[2][4];
+} antfarmstruct;
+
+static int  initVal[NEIGHBORKINDS] =
+{3, 4, 6};                     /* Neighborhoods, 8 just makes a mess */
+
+
+/* Relative ant moves */
+#define FS 0                   /* Step */
+#define TRS 1                  /* Turn right, then step */
+#define THRS 2                 /* Turn hard right, then step */
+#define TBS 3                  /* Turn back, then step */
+#define THLS 4                 /* Turn hard left, then step */
+#define TLS 5                  /* Turn left, then step */
+#define SF 6                   /* Step */
+#define STR 7                  /* Step then turn right */
+#define STHR 8                 /* Step then turn hard right */
+#define STB 9                  /* Step then turn back */
+#define STHL 10                        /* Step then turn hard left */
+#define STL 11                 /* Step then turn left */
+
+static antfarmstruct *antfarms = NULL;
+
+/* LANGTON'S ANT (10) Chaotic after 500, Builder after 10,000 (104p) */
+/* TURK'S 100 ANT Always chaotic?, tested past 150,000,000 */
+/* TURK'S 101 ANT Always chaotic? */
+/* TURK'S 110 ANT Builder at 150 (18p) */
+/* TURK'S 1000 ANT Always chaotic? */
+/* TURK'S 1100 SYMMETRIC ANT  all even run 1's and 0's are symmetric */
+/* other examples 1001, 110011, 110000, 1001101 */
+/* TURK'S 1101 ANT Builder after 250,000 (388p) */
+/* Once saw a chess horse type builder (i.e. non-45 degree builder) */
+
+/* BEE ONLY */
+/* All alternating 10 appear symmetric, no proof (i.e. 10, 1010, etc) */
+/* Even runs of 0's and 1's are also symmetric */
+/* I have seen Hexagonal builders but they are more rare. */
+
+static unsigned char tables[][3 * COLORS * STATES + 2] =
+{
+#if 0
+  /* Here just so you can figure out notation */
+       {                       /* Langton's ant */
+               2, 1,
+               1, TLS, 0, 0, TRS, 0
+       },
+#else
+  /* First 2 numbers are the size (ncolors, nstates) */
+       {                       /* LADDER BUILDER */
+               4, 1,
+               1, STR, 0, 2, STL, 0, 3, TRS, 0, 0, TLS, 0
+       },
+       {                       /* SPIRALING PATTERN */
+               2, 2,
+               1, TLS, 0, 0, FS, 1,
+               1, TRS, 0, 1, TRS, 0
+       },
+       {                       /* SQUARE (HEXAGON) BUILDER */
+               2, 2,
+               1, TLS, 0, 0, FS, 1,
+               0, TRS, 0, 1, TRS, 0
+       },
+#endif
+};
+
+#define NTABLES   (sizeof tables / sizeof tables[0])
+
+static void
+position_of_neighbor(antfarmstruct * ap, int dir, int *pcol, int *prow)
+{
+       int         col = *pcol, row = *prow;
+
+       if (ap->neighbors == 6) {
+               switch (dir) {
+                       case 0:
+                               col = (col + 1 == ap->ncols) ? 0 : col + 1;
+                               break;
+                       case 60:
+                               if (!(row & 1))
+                                       col = (col + 1 == ap->ncols) ? 0 : col + 1;
+                               row = (!row) ? ap->nrows - 1 : row - 1;
+                               break;
+                       case 120:
+                               if (row & 1)
+                                       col = (!col) ? ap->ncols - 1 : col - 1;
+                               row = (!row) ? ap->nrows - 1 : row - 1;
+                               break;
+                       case 180:
+                               col = (!col) ? ap->ncols - 1 : col - 1;
+                               break;
+                       case 240:
+                               if (row & 1)
+                                       col = (!col) ? ap->ncols - 1 : col - 1;
+                               row = (row + 1 == ap->nrows) ? 0 : row + 1;
+                               break;
+                       case 300:
+                               if (!(row & 1))
+                                       col = (col + 1 == ap->ncols) ? 0 : col + 1;
+                               row = (row + 1 == ap->nrows) ? 0 : row + 1;
+                               break;
+                       default:
+                               (void) fprintf(stderr, "wrong direction %d\n", dir);
+               }
+       } else if (ap->neighbors == 4 || ap->neighbors == 8) {
+               switch (dir) {
+                       case 0:
+                               col = (col + 1 == ap->ncols) ? 0 : col + 1;
+                               break;
+                       case 45:
+                               col = (col + 1 == ap->ncols) ? 0 : col + 1;
+                               row = (!row) ? ap->nrows - 1 : row - 1;
+                               break;
+                       case 90:
+                               row = (!row) ? ap->nrows - 1 : row - 1;
+                               break;
+                       case 135:
+                               col = (!col) ? ap->ncols - 1 : col - 1;
+                               row = (!row) ? ap->nrows - 1 : row - 1;
+                               break;
+                       case 180:
+                               col = (!col) ? ap->ncols - 1 : col - 1;
+                               break;
+                       case 225:
+                               col = (!col) ? ap->ncols - 1 : col - 1;
+                               row = (row + 1 == ap->nrows) ? 0 : row + 1;
+                               break;
+                       case 270:
+                               row = (row + 1 == ap->nrows) ? 0 : row + 1;
+                               break;
+                       case 315:
+                               col = (col + 1 == ap->ncols) ? 0 : col + 1;
+                               row = (row + 1 == ap->nrows) ? 0 : row + 1;
+                               break;
+                       default:
+                               (void) fprintf(stderr, "wrong direction %d\n", dir);
+               }
+       } else {                /* TRI */
+               if ((col + row) % 2) {  /* right */
+                       switch (dir) {
+                               case 0:
+                                       col = (!col) ? ap->ncols - 1 : col - 1;
+                                       break;
+                               case 30:
+                               case 40:
+                                       col = (!col) ? ap->ncols - 1 : col - 1;
+                                       row = (!row) ? ap->nrows - 1 : row - 1;
+                                       break;
+                               case 60:
+                                       col = (!col) ? ap->ncols - 1 : col - 1;
+                                       if (!row)
+                                               row = ap->nrows - 2;
+                                       else if (!(row - 1))
+                                               row = ap->nrows - 1;
+                                       else
+                                               row = row - 2;
+                                       break;
+                               case 80:
+                               case 90:
+                                       if (!row)
+                                               row = ap->nrows - 2;
+                                       else if (!(row - 1))
+                                               row = ap->nrows - 1;
+                                       else
+                                               row = row - 2;
+                                       break;
+                               case 120:
+                                       row = (!row) ? ap->nrows - 1 : row - 1;
+                                       break;
+                               case 150:
+                               case 160:
+                                       col = (col + 1 == ap->ncols) ? 0 : col + 1;
+                                       row = (!row) ? ap->nrows - 1 : row - 1;
+                                       break;
+                               case 180:
+                                       col = (col + 1 == ap->ncols) ? 0 : col + 1;
+                                       break;
+                               case 200:
+                               case 210:
+                                       col = (col + 1 == ap->ncols) ? 0 : col + 1;
+                                       row = (row + 1 == ap->nrows) ? 0 : row + 1;
+                                       break;
+                               case 240:
+                                       row = (row + 1 == ap->nrows) ? 0 : row + 1;
+                                       break;
+                               case 270:
+                               case 280:
+                                       if (row + 1 == ap->nrows)
+                                               row = 1;
+                                       else if (row + 2 == ap->nrows)
+                                               row = 0;
+                                       else
+                                               row = row + 2;
+                                       break;
+                               case 300:
+                                       col = (!col) ? ap->ncols - 1 : col - 1;
+                                       if (row + 1 == ap->nrows)
+                                               row = 1;
+                                       else if (row + 2 == ap->nrows)
+                                               row = 0;
+                                       else
+                                               row = row + 2;
+                                       break;
+                               case 320:
+                               case 330:
+                                       col = (!col) ? ap->ncols - 1 : col - 1;
+                                       row = (row + 1 == ap->nrows) ? 0 : row + 1;
+                                       break;
+                               default:
+                                       (void) fprintf(stderr, "wrong direction %d\n", dir);
+                       }
+               } else {        /* left */
+                       switch (dir) {
+                               case 0:
+                                       col = (col + 1 == ap->ncols) ? 0 : col + 1;
+                                       break;
+                               case 30:
+                               case 40:
+                                       col = (col + 1 == ap->ncols) ? 0 : col + 1;
+                                       row = (row + 1 == ap->nrows) ? 0 : row + 1;
+                                       break;
+                               case 60:
+                                       col = (col + 1 == ap->ncols) ? 0 : col + 1;
+                                       if (row + 1 == ap->nrows)
+                                               row = 1;
+                                       else if (row + 2 == ap->nrows)
+                                               row = 0;
+                                       else
+                                               row = row + 2;
+                                       break;
+                               case 80:
+                               case 90:
+                                       if (row + 1 == ap->nrows)
+                                               row = 1;
+                                       else if (row + 2 == ap->nrows)
+                                               row = 0;
+                                       else
+                                               row = row + 2;
+                                       break;
+                               case 120:
+                                       row = (row + 1 == ap->nrows) ? 0 : row + 1;
+                                       break;
+                               case 150:
+                               case 160:
+                                       col = (!col) ? ap->ncols - 1 : col - 1;
+                                       row = (row + 1 == ap->nrows) ? 0 : row + 1;
+                                       break;
+                               case 180:
+                                       col = (!col) ? ap->ncols - 1 : col - 1;
+                                       break;
+                               case 200:
+                               case 210:
+                                       col = (!col) ? ap->ncols - 1 : col - 1;
+                                       row = (!row) ? ap->nrows - 1 : row - 1;
+                                       break;
+                               case 240:
+                                       row = (!row) ? ap->nrows - 1 : row - 1;
+                                       break;
+                               case 270:
+                               case 280:
+                                       if (!row)
+                                               row = ap->nrows - 2;
+                                       else if (row == 1)
+                                               row = ap->nrows - 1;
+                                       else
+                                               row = row - 2;
+                                       break;
+                               case 300:
+                                       col = (col + 1 == ap->ncols) ? 0 : col + 1;
+                                       if (!row)
+                                               row = ap->nrows - 2;
+                                       else if (row == 1)
+                                               row = ap->nrows - 1;
+                                       else
+                                               row = row - 2;
+                                       break;
+                               case 320:
+                               case 330:
+                                       col = (col + 1 == ap->ncols) ? 0 : col + 1;
+                                       row = (!row) ? ap->nrows - 1 : row - 1;
+                                       break;
+                               default:
+                                       (void) fprintf(stderr, "wrong direction %d\n", dir);
+                       }
+               }
+       }
+       *pcol = col;
+       *prow = row;
+}
+
+static void
+fillcell(ModeInfo * mi, GC gc, int col, int row)
+{
+       antfarmstruct *ap = &antfarms[MI_SCREEN(mi)];
+
+       if (ap->neighbors == 6) {
+               int         ccol = 2 * col + !(row & 1), crow = 2 * row;
+
+               ap->hexagonList[0].x = ap->xb + ccol * ap->xs;
+               ap->hexagonList[0].y = ap->yb + crow * ap->ys;
+               if (ap->xs == 1 && ap->ys == 1)
+                       XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), gc,
+                          ap->hexagonList[0].x, ap->hexagonList[0].y, 1, 1);
+               else
+                       XFillPolygon(MI_DISPLAY(mi), MI_WINDOW(mi), gc,
+                             ap->hexagonList, 6, Convex, CoordModePrevious);
+
+#if 0 /* jwz sez: this looks like crap */
+       } else if (ap->neighbors == 4 || ap->neighbors == 8) {
+               XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), gc,
+               ap->xb + ap->xs * col, ap->yb + ap->ys * row, ap->xs, ap->ys);
+#endif
+
+       } else {                /* TRI */
+               int         orient = (col + row) % 2;   /* O left 1 right */
+
+               ap->triangleList[orient][0].x = ap->xb + col * ap->xs;
+               ap->triangleList[orient][0].y = ap->yb + row * ap->ys;
+               if (ap->xs <= 3 || ap->ys <= 3)
+                       XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), gc,
+                        ((orient) ? -1 : 1) + ap->triangleList[orient][0].x,
+                                      ap->triangleList[orient][0].y, 1, 1);
+               else {
+                       if (orient)
+                               ap->triangleList[orient][0].x += (ap->xs / 2 - 1);
+                       else
+                               ap->triangleList[orient][0].x -= (ap->xs / 2 - 1);
+                       XFillPolygon(MI_DISPLAY(mi), MI_WINDOW(mi), gc,
+                                    ap->triangleList[orient], 3, Convex, CoordModePrevious);
+               }
+       }
+}
+
+static void
+truchetcell(ModeInfo * mi, int col, int row, int truchetstate)
+{
+       antfarmstruct *ap = &antfarms[MI_SCREEN(mi)];
+
+       if (ap->neighbors == 6) {
+               int         ccol = 2 * col + !(row & 1), crow = 2 * row;
+               int         side;
+               XPoint      hex, hex2;
+
+               /* Very crude approx of Sqrt 3, so it will not cause drawing errors. */
+               hex.x = ap->xb + ccol * ap->xs - (int) ((double) ap->xs * 1.6 / 2.0);
+               hex.y = ap->yb + crow * ap->ys - (int) ((double) ap->ys * 1.6 / 2.0);
+               for (side = 0; side < 6; side++) {
+                       if (side > 0) {
+                               hex.x += ap->hexagonList[side].x;
+                               hex.y += ap->hexagonList[side].y;
+                       }
+                       hex2.x = hex.x + ap->hexagonList[side + 1].x / 2;
+                       hex2.y = hex.y + ap->hexagonList[side + 1].y / 2;
+                       if (truchetstate == side % 3)
+                               /* Crude approx of 120 deg, so it will not cause drawing errors. */
+                               XDrawArc(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi),
+                                        hex2.x, hex2.y,
+                                        (int) ((double) ap->xs * 1.5), (int) ((double) ap->ys * 1.5),
+                                 ((555 - (side * 60)) % 360) * 64, 90 * 64);
+               }
+       } else if (ap->neighbors == 4) {
+               if (truchetstate) {
+                       XDrawArc(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi),
+                                ap->xb + ap->xs * col - ap->xs / 2,
+                                ap->yb + ap->ys * row + ap->ys / 2,
+                                ap->xs, ap->ys,
+                                1 * 64, 88 * 64);
+                       XDrawArc(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi),
+                                ap->xb + ap->xs * col + ap->xs / 2,
+                                ap->yb + ap->ys * row - ap->ys / 2,
+                                ap->xs, ap->ys,
+                                -91 * 64, -88 * 64);
+               } else {
+                       XDrawArc(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi),
+                                ap->xb + ap->xs * col - ap->xs / 2,
+                                ap->yb + ap->ys * row - ap->ys / 2,
+                                ap->xs, ap->ys,
+                                -1 * 64, -88 * 64);
+                       XDrawArc(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi),
+                                ap->xb + ap->xs * col + ap->xs / 2,
+                                ap->yb + ap->ys * row + ap->ys / 2,
+                                ap->xs, ap->ys,
+                                91 * 64, 88 * 64);
+               }
+       } else if (ap->neighbors == 3) {
+               int         orient = (col + row) % 2;   /* O left 1 right */
+               int         side, ang;
+               XPoint      tri;
+
+               tri.x = ap->xb + col * ap->xs;
+               tri.y = ap->yb + row * ap->ys;
+               if (orient) {
+                       tri.x += (ap->xs / 2 - 2);
+               } else {
+                       tri.x -= (ap->xs / 2 + 2);
+               }
+               for (side = 0; side < 3; side++) {
+                       if (side > 0) {
+                               tri.x += ap->triangleList[orient][side].x;
+                               tri.y += ap->triangleList[orient][side].y;
+                       }
+                       if (truchetstate == side % 3) {
+                               if (orient)
+                                       ang = (518 - side * 120) % 360;         /* Right */
+                               else
+                                       ang = (690 - side * 120) % 360;         /* Left */
+                               XDrawArc(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi),
+                                 tri.x - ap->xs / 2, tri.y - 3 * ap->ys / 4,
+                                        ap->xs, 3 * ap->ys / 2,
+                                        ang * 64, 45 * 64);
+                       }
+               }
+       }
+}
+
+static void
+drawcell(ModeInfo * mi, int col, int row, unsigned char color)
+{
+       antfarmstruct *ap = &antfarms[MI_SCREEN(mi)];
+  GC gc;
+
+       if (!color) {
+               XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_WIN_BLACK_PIXEL(mi));
+               gc = MI_GC(mi);
+       } else if (MI_NPIXELS(mi) > 2) {
+               XSetForeground(MI_DISPLAY(mi), MI_GC(mi),
+                              MI_PIXEL(mi, ap->colors[color - 1]));
+               gc = MI_GC(mi);
+       } else {
+               XGCValues   gcv;
+
+               gcv.stipple = ap->pixmaps[color - 1];
+               gcv.foreground = MI_WIN_WHITE_PIXEL(mi);
+               gcv.background = MI_WIN_BLACK_PIXEL(mi);
+               XChangeGC(MI_DISPLAY(mi), ap->stippledGC,
+                         GCStipple | GCForeground | GCBackground, &gcv);
+               gc = ap->stippledGC;
+       }
+       fillcell(mi, gc, col, row);
+}
+
+static void
+drawtruchet(ModeInfo * mi, int col, int row,
+           unsigned char color, unsigned char truchetstate)
+{
+       antfarmstruct *ap = &antfarms[MI_SCREEN(mi)];
+
+       if (!color)
+               XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_WIN_WHITE_PIXEL(mi));
+       else if (MI_NPIXELS(mi) > 2 || color > ap->ncolors / 2)
+               XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_WIN_BLACK_PIXEL(mi));
+       else
+               XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_WIN_WHITE_PIXEL(mi));
+       truchetcell(mi, col, row, truchetstate);
+}
+
+static void
+draw_anant(ModeInfo * mi, int col, int row)
+{
+       XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_WIN_WHITE_PIXEL(mi));
+       fillcell(mi, MI_GC(mi), col, row);
+#if 0                          /* Can not see eyes */
+       {
+               antfarmstruct *ap = &antfarms[MI_SCREEN(mi)];
+               Display    *display = MI_DISPLAY(mi);
+               Window      window = MI_WINDOW(mi);
+
+               if (ap->xs > 2 && ap->ys > 2) {         /* Draw Eyes */
+
+                       XSetForeground(display, MI_GC(mi), MI_WIN_BLACK_PIXEL(mi));
+                       switch (direction) {
+                               case 0:
+                                       XDrawPoint(display, window, MI_GC(mi),
+                                           ap->xb + ap->xs - 1, ap->yb + 1);
+                                       XDrawPoint(display, window, MI_GC(mi),
+                                                  ap->xb + ap->xs - 1, ap->yb + ap->ys - 2);
+                                       break;
+                               case 180:
+                                       XDrawPoint(display, window, MI_GC(mi), ap->xb, ap->yb + 1);
+                                       XDrawPoint(display, window, MI_GC(mi), ap->xb, ap->yb + ap->ys - 2);
+                                       break;
+                                       if (neighbors == 4) {
+                               case 90:
+                                               XDrawPoint(display, window, MI_GC(mi), ap->xb + 1, ap->yb);
+                                               XDrawPoint(display, window, MI_GC(mi),
+                                               ap->xb + ap->xs - 2, ap->yb);
+                                               break;
+                               case 270:
+                                               XDrawPoint(display, window, MI_GC(mi),
+                                                          ap->xb + 1, ap->yb + ap->ys - 1);
+                                               XDrawPoint(display, window, MI_GC(mi),
+                                                          ap->xb + ap->xs - 2, ap->yb + ap->ys - 1);
+                                               break;
+                                       }       /* else BEE */
+                               default:
+                       }
+               }
+       }
+#endif
+}
+
+#if 0
+static void
+RandomSoup(mi)
+       ModeInfo   *mi;
+{
+       antfarmstruct *ap = &antfarms[MI_SCREEN(mi)];
+       int         row, col, mrow = 0;
+
+       for (row = 0; row < ap->nrows; ++row) {
+               for (col = 0; col < ap->ncols; ++col) {
+                       ap->old[col + mrow] = (unsigned char) NRAND((int) ap->ncolors);
+                       drawcell(mi, col, row, ap->old[col + mrow]);
+               }
+               mrow += ap->nrows;
+       }
+}
+
+#endif
+
+static short
+fromTableDirection(unsigned char dir, int neighbors)
+{
+       switch (dir) {
+               case FS:
+                       return 0;
+               case TRS:
+                       return (ANGLES / neighbors);
+               case THRS:
+                       return (ANGLES / (2 * neighbors));
+               case TBS:
+                       return (ANGLES / 2);
+               case THLS:
+                       return (ANGLES - ANGLES / (2 * neighbors));
+               case TLS:
+                       return (ANGLES - ANGLES / neighbors);
+               case SF:
+                       return ANGLES;
+               case STR:
+                       return (ANGLES + ANGLES / neighbors);
+               case STHR:
+                       return (ANGLES + ANGLES / (2 * neighbors));
+               case STB:
+                       return (3 * ANGLES / 2);
+               case STHL:
+                       return (2 * ANGLES - ANGLES / (2 * neighbors));
+               case STL:
+                       return (2 * ANGLES - ANGLES / neighbors);
+               default:
+                       (void) fprintf(stderr, "wrong direction %d\n", dir);
+       }
+       return -1;
+}
+
+static void
+getTable(ModeInfo * mi, int i)
+{
+       antfarmstruct *ap = &antfarms[MI_SCREEN(mi)];
+       int         j, total;
+       unsigned char *patptr;
+
+       patptr = &tables[i][0];
+       ap->ncolors = *patptr++;
+       ap->nstates = *patptr++;
+       total = ap->ncolors * ap->nstates;
+       if (MI_WIN_IS_VERBOSE(mi))
+               (void) fprintf(stdout,
+                    "neighbors %d, table number %d, colors %d, states %d\n",
+                              ap->neighbors, i, ap->ncolors, ap->nstates);
+       for (j = 0; j < total; j++) {
+               ap->machine[j].color = *patptr++;
+               ap->machine[j].direction = fromTableDirection(*patptr++, ap->neighbors);
+               ap->machine[j].next = *patptr++;
+       }
+       ap->truchet = False;
+}
+
+static void
+getTurk(ModeInfo * mi, int i)
+{
+       antfarmstruct *ap = &antfarms[MI_SCREEN(mi)];
+       int         power2, j, number, total;
+
+       /* To force a number, say <i = 2;> has  i + 2 (or 4) digits in binary */
+       power2 = 1 << (i + 1);
+       /* Dont want numbers which in binary are all 1's. */
+       number = NRAND(power2 - 1) + power2;
+       /* To force a particular number, say <number = 10;> */
+
+       ap->ncolors = i + 2;
+       ap->nstates = 1;
+       total = ap->ncolors * ap->nstates;
+       for (j = 0; j < total; j++) {
+               ap->machine[j].color = (j + 1) % total;
+               ap->machine[j].direction = (power2 & number) ?
+                       fromTableDirection(TRS, ap->neighbors) :
+                       fromTableDirection(TLS, ap->neighbors);
+               ap->machine[j].next = 0;
+               power2 >>= 1;
+       }
+       if (ap->neighbors != 3 && ap->neighbors != 4 && ap->neighbors != 6)
+               ap->truchet = False;
+       else if (truchet)
+               ap->truchet = True;
+       if (MI_WIN_IS_VERBOSE(mi))
+               (void) fprintf(stdout, "neighbors %d, Turk's number %d, colors %d\n",
+                              ap->neighbors, number, ap->ncolors);
+}
+
+void
+init_ant(ModeInfo * mi)
+{
+       Display    *display = MI_DISPLAY(mi);
+       Window      window = MI_WINDOW(mi);
+       int         size = MI_SIZE(mi);
+       XGCValues   gcv;
+       antfarmstruct *ap;
+       int         col, row, i, dir;
+
+       /* jwz sez: small sizes look like crap */
+       if (size < 0)
+         size = NRAND(-size)+1;
+       if (size < 5)
+         size += 5;
+
+       if (antfarms == NULL) {
+               if ((antfarms = (antfarmstruct *) calloc(MI_NUM_SCREENS(mi),
+                                           sizeof (antfarmstruct))) == NULL)
+                       return;
+       }
+       ap = &antfarms[MI_SCREEN(mi)];
+       ap->redrawing = 0;
+       if (MI_NPIXELS(mi) <= 2) {
+               if (ap->stippledGC == None) {
+                       gcv.fill_style = FillOpaqueStippled;
+                       ap->stippledGC = XCreateGC(display, window, GCFillStyle, &gcv);
+               }
+               if (ap->init_bits == 0) {
+                       for (i = 0; i < COLORS - 1; i++)
+                               ANTBITS(patterns[i], PATTERNSIZE, PATTERNSIZE);
+               }
+       }
+       ap->generation = 0;
+       ap->n = MI_BATCHCOUNT(mi);
+       if (ap->n < -MINANTS) {
+               /* if ap->n is random ... the size can change */
+               if (ap->ants != NULL) {
+                       (void) free((void *) ap->ants);
+                       ap->ants = NULL;
+               }
+               ap->n = NRAND(-ap->n - MINANTS + 1) + MINANTS;
+       } else if (ap->n < MINANTS)
+               ap->n = MINANTS;
+
+       ap->width = MI_WIN_WIDTH(mi);
+       ap->height = MI_WIN_HEIGHT(mi);
+
+       if (neighbors == 8 || neighbors == 9 || neighbors == 12)
+               ap->neighbors = neighbors;      /* Discourage but not deny use... */
+       else
+               for (i = 0; i < NEIGHBORKINDS; i++) {
+                       if (neighbors == initVal[i]) {
+                               ap->neighbors = initVal[i];
+                               break;
+                       }
+                       if (i == NEIGHBORKINDS - 1) {
+                               ap->neighbors = initVal[NRAND(NEIGHBORKINDS)];
+                               break;
+                       }
+               }
+
+       if (ap->neighbors == 6) {
+               int         nccols, ncrows;
+
+               if (ap->width < 2)
+                       ap->width = 2;
+               if (ap->height < 4)
+                       ap->height = 4;
+               if (size < -MINSIZE)
+                       ap->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(ap->width, ap->height) /
+                                     MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE;
+               else if (size < MINSIZE) {
+                       if (!size)
+                               ap->ys = MAX(MINSIZE, MIN(ap->width, ap->height) / MINGRIDSIZE);
+                       else
+                               ap->ys = MINSIZE;
+               } else
+                       ap->ys = MIN(size, MAX(MINSIZE, MIN(ap->width, ap->height) /
+                                              MINGRIDSIZE));
+               ap->xs = ap->ys;
+               nccols = MAX(ap->width / ap->xs - 2, 2);
+               ncrows = MAX(ap->height / ap->ys - 1, 2);
+               ap->ncols = nccols / 2;
+               ap->nrows = 2 * (ncrows / 4);
+               ap->xb = (ap->width - ap->xs * nccols) / 2 + ap->xs / 2;
+               ap->yb = (ap->height - ap->ys * (ncrows / 2) * 2) / 2 + ap->ys;
+               for (i = 0; i < 7; i++) {
+                       ap->hexagonList[i].x = (ap->xs - 1) * hexagonUnit[i].x;
+                       ap->hexagonList[i].y = ((ap->ys - 1) * hexagonUnit[i].y / 2) * 4 / 3;
+               }
+       } else if (ap->neighbors == 4 && ap->neighbors == 8) {
+               if (size < -MINSIZE)
+                       ap->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(ap->width, ap->height) /
+                                     MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE;
+               else if (size < MINSIZE) {
+                       if (!size)
+                               ap->ys = MAX(MINSIZE, MIN(ap->width, ap->height) / MINGRIDSIZE);
+                       else
+                               ap->ys = MINSIZE;
+               } else
+                       ap->ys = MIN(size, MAX(MINSIZE, MIN(ap->width, ap->height) /
+                                              MINGRIDSIZE));
+               ap->xs = ap->ys;
+               ap->ncols = MAX(ap->width / ap->xs, 2);
+               ap->nrows = MAX(ap->height / ap->ys, 2);
+               ap->xb = (ap->width - ap->xs * ap->ncols) / 2;
+               ap->yb = (ap->height - ap->ys * ap->nrows) / 2;
+       } else {                /* TRI */
+               int         orient;
+
+               if (ap->width < 2)
+                       ap->width = 2;
+               if (ap->height < 2)
+                       ap->height = 2;
+               if (size < -MINSIZE)
+                       ap->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(ap->width, ap->height) /
+                                     MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE;
+               else if (size < MINSIZE) {
+                       if (!size)
+                               ap->ys = MAX(MINSIZE, MIN(ap->width, ap->height) / MINGRIDSIZE);
+                       else
+                               ap->ys = MINSIZE;
+               } else
+                       ap->ys = MIN(size, MAX(MINSIZE, MIN(ap->width, ap->height) /
+                                              MINGRIDSIZE));
+               ap->xs = (int) (1.52 * ap->ys);
+               ap->ncols = (MAX(ap->width / ap->xs - 1, 2) / 2) * 2;
+               ap->nrows = (MAX(ap->height / ap->ys - 1, 2) / 2) * 2;
+               ap->xb = (ap->width - ap->xs * ap->ncols) / 2 + ap->xs / 2;
+               ap->yb = (ap->height - ap->ys * ap->nrows) / 2 + ap->ys;
+               for (orient = 0; orient < 2; orient++) {
+                       for (i = 0; i < 4; i++) {
+                               ap->triangleList[orient][i].x =
+                                       (ap->xs - 2) * triangleUnit[orient][i].x;
+                               ap->triangleList[orient][i].y =
+                                       (ap->ys - 2) * triangleUnit[orient][i].y;
+                       }
+               }
+       }
+       XClearWindow(display, MI_WINDOW(mi));
+
+       /* Exclude odd # of neighbors, stepping forward not defined */
+       if (!NRAND(COLORS) && ((ap->neighbors + 1) % 2)) {
+               getTable(mi, (int) (NRAND(NTABLES)));
+       } else
+               getTurk(mi, (int) (NRAND(COLORS - 1)));
+       if (MI_NPIXELS(mi) > 2)
+               for (i = 0; i < (int) ap->ncolors - 1; i++)
+                       ap->colors[i] = (NRAND(MI_NPIXELS(mi)) +
+                            i * MI_NPIXELS(mi)) / ((int) (ap->ncolors - 1));
+       if (ap->ants == NULL)
+               ap->ants = (antstruct *) malloc(ap->n * sizeof (antstruct));
+       if (ap->tape != NULL)
+               (void) free((void *) ap->tape);
+       ap->tape = (unsigned char *)
+               calloc(ap->ncols * ap->nrows, sizeof (unsigned char));
+
+       if (ap->truchet_state != NULL)
+               (void) free((void *) ap->truchet_state);
+       ap->truchet_state = (unsigned char *)
+               calloc(ap->ncols * ap->nrows, sizeof (unsigned char));
+
+       col = ap->ncols / 2;
+       row = ap->nrows / 2;
+       dir = NRAND(ap->neighbors) * ANGLES / ap->neighbors;
+       /* Have them all start in the same spot, why not? */
+       for (i = 0; i < ap->n; i++) {
+               ap->ants[i].col = col;
+               ap->ants[i].row = row;
+               ap->ants[i].direction = dir;
+               ap->ants[i].state = 0;
+       }
+       draw_anant(mi, col, row);
+}
+
+void
+draw_ant(ModeInfo * mi)
+{
+       antfarmstruct *ap = &antfarms[MI_SCREEN(mi)];
+       antstruct  *anant;
+       statestruct *status;
+       int         i, state_pos, tape_pos;
+       unsigned char color;
+       short       chg_dir, old_dir;
+
+       for (i = 0; i < ap->n; i++) {
+               anant = &ap->ants[i];
+               tape_pos = anant->col + anant->row * ap->ncols;
+               color = ap->tape[tape_pos];     /* read tape */
+               state_pos = color + anant->state * ap->ncolors;
+               status = &(ap->machine[state_pos]);
+               drawcell(mi, anant->col, anant->row, status->color);
+               ap->tape[tape_pos] = status->color;     /* write on tape */
+
+               /* Find direction of Bees or Ants. */
+               /* Translate relative direction to actual direction */
+               old_dir = anant->direction;
+               chg_dir = (2 * ANGLES - status->direction) % ANGLES;
+               anant->direction = (chg_dir + old_dir) % ANGLES;
+               if (ap->truchet) {
+                       int         a = 0, b;
+
+                       if (ap->neighbors == 6) {
+                               a = (old_dir / 60) % 3;
+                               b = (anant->direction / 60) % 3;
+                               a = (a + b + 1) % 3;
+                               drawtruchet(mi, anant->col, anant->row, status->color, a);
+                       } else if (ap->neighbors == 4) {
+                               a = old_dir / 180;
+                               b = anant->direction / 180;
+                               a = ((a && !b) || (b && !a));
+                               drawtruchet(mi, anant->col, anant->row, status->color, a);
+                       } else if (ap->neighbors == 3) {
+                               if (chg_dir == 240)
+                                       a = (2 + anant->direction / 120) % 3;
+                               else
+                                       a = (1 + anant->direction / 120) % 3;
+                               drawtruchet(mi, anant->col, anant->row, status->color, a);
+                       }
+                       ap->truchet_state[tape_pos] = a + 1;
+               }
+               anant->state = status->next;
+
+               /* If edge than wrap it */
+               old_dir = ((status->direction < ANGLES) ? anant->direction : old_dir);
+               position_of_neighbor(ap, old_dir, &(anant->col), &(anant->row));
+               draw_anant(mi, anant->col, anant->row);
+       }
+       if (++ap->generation > MI_CYCLES(mi)) {
+#ifdef STANDALONE
+         erase_full_window(MI_DISPLAY(mi), MI_WINDOW(mi));
+#endif
+         init_ant(mi);
+       }
+       if (ap->redrawing) {
+               for (i = 0; i < REDRAWSTEP; i++) {
+                       if (ap->tape[ap->redrawpos] ||
+                        (ap->truchet && ap->truchet_state[ap->redrawpos])) {
+                               drawcell(mi, ap->redrawpos % ap->ncols, ap->redrawpos / ap->ncols,
+                                        ap->tape[ap->redrawpos]);
+                               if (ap->truchet)
+                                       drawtruchet(mi, ap->redrawpos % ap->ncols, ap->redrawpos / ap->ncols,
+                                                   ap->tape[ap->redrawpos],
+                                       ap->truchet_state[ap->redrawpos] - 1);
+                       }
+                       if (++(ap->redrawpos) >= ap->ncols * ap->nrows) {
+                               ap->redrawing = 0;
+                               break;
+                       }
+               }
+       }
+}
+
+void
+release_ant(ModeInfo * mi)
+{
+       if (antfarms != NULL) {
+               int         screen;
+
+               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
+                       antfarmstruct *ap = &antfarms[screen];
+                       int         shade;
+
+                       if (ap->stippledGC != None) {
+                               XFreeGC(MI_DISPLAY(mi), ap->stippledGC);
+                       }
+                       for (shade = 0; shade < ap->init_bits; shade++)
+                               XFreePixmap(MI_DISPLAY(mi), ap->pixmaps[shade]);
+                       if (ap->tape != NULL)
+                               (void) free((void *) ap->tape);
+                       if (ap->ants != NULL)
+                               (void) free((void *) ap->ants);
+                       if (ap->truchet_state != NULL)
+                               (void) free((void *) ap->truchet_state);
+               }
+               (void) free((void *) antfarms);
+               antfarms = NULL;
+       }
+}
+
+void
+refresh_ant(ModeInfo * mi)
+{
+       antfarmstruct *ap = &antfarms[MI_SCREEN(mi)];
+
+       ap->redrawing = 1;
+       ap->redrawpos = 0;
+}
index 0f2256ccb809b847f11b9871279461fdfd6fced6..e8ee26537f3b84f687e30bd8a6ee271df32dce2e 100644 (file)
@@ -192,23 +192,37 @@ read_screen (Display *dpy, Window window, int *widthP, int *heightP)
   *heightP = xgwa.height;
 
   grab_screen_image(xgwa.screen, window);
-  p = XCreatePixmap(dpy, window, xgwa.width, xgwa.height, xgwa.depth);
+  p = XCreatePixmap(dpy, window, *widthP, *heightP, xgwa.depth);
   gcv.function = GXcopy;
   gc = XCreateGC (dpy, window, GCFunction, &gcv);
-  XCopyArea (dpy, window, p, gc, 0, 0, xgwa.width, xgwa.height, 0, 0);
-  XFreeGC (dpy, gc);
-
+  XCopyArea (dpy, window, p, gc, 0, 0, *widthP, *heightP, 0, 0);
 
-  /* Reset this... */
+  /* Reset the window's background color... */
   XSetWindowBackground (dpy, window,
                        get_pixel_resource ("background", "Background",
                                            dpy, xgwa.colormap));
-  XClearWindow (dpy, window);
+  XCopyArea (dpy, p, window, gc, 0, 0, *widthP, *heightP, 0, 0);
+  XFreeGC (dpy, gc);
 
   return p;
 }
 
 
+static int 
+to_pow2(int n, Bool up)
+{
+  /* sizeof(Dimension) == 2. */
+  int powers_of_2[] = { 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024,
+                       2048, 4096, 8192, 16384, 32768, 65536 };
+  int i = 0;
+  if (n > 65536) size = 65536;
+  while (n >= powers_of_2[i]) i++;
+  if (n == powers_of_2[i-1])
+    return n;
+  else
+    return powers_of_2[up ? i : i-1];
+}
+
 static void
 init (void)
 {
@@ -216,9 +230,8 @@ init (void)
   Colormap cmap;
   XGCValues gcv;
   int width, height;
-  unsigned int real_size;
   char *bitmap_name;
-  int i;
+  Bool scale_up;
 
   XGetWindowAttributes (dpy, window, &xgwa);
   cmap = xgwa.colormap;
@@ -240,24 +253,29 @@ init (void)
       height = logo_height;
       bitmap = XCreatePixmapFromBitmapData (dpy, window, (char *) logo_bits,
                                            width, height, fg, bg, depth);
+      scale_up = True; /* definitely. */
     }
   else if (!strcmp (bitmap_name, "(screen)"))
     {
       bitmap = read_screen (dpy, window, &width, &height);
+      scale_up = True; /* maybe? */
     }
   else
     {
       read_bitmap (bitmap_name, &width, &height);
+      scale_up = True; /* probably? */
     }
 
-  real_size = (width > height) ? width : height;
+  size = (width < height) ? height : width;    /* make it square */
+  size = to_pow2(size, scale_up);              /* round up to power of 2 */
+  {                                            /* don't exceed screen size */
+    int s = XScreenNumberOfScreen(xgwa.screen);
+    int w = to_pow2(XDisplayWidth(dpy, s), False);
+    int h = to_pow2(XDisplayHeight(dpy, s), False);
+    if (size > w) size = w;
+    if (size > h) size = h;
+  }
 
-  size = real_size;
-  /* semi-sleazy way of doing (setq size (expt 2 (ceiling (log size 2)))). */
-  for (i = 31; i > 0; i--)
-    if (size & (1<<i)) break;
-  if (size & (~(1<<i)))
-    size = (size>>i)<<(i+1);
   self = XCreatePixmap (dpy, window, size, size, depth);
   temp = XCreatePixmap (dpy, window, size, size, depth);
   mask = XCreatePixmap (dpy, window, size, size, depth);
@@ -277,6 +295,10 @@ init (void)
 
   XCopyArea (dpy, bitmap, self, CPY, 0, 0, width, height,
             (size - width)>>1, (size - height)>>1);
+  XFreePixmap(dpy, bitmap);
+
+  display (self);
+  XSync(dpy, False);
 }
 
 static void
@@ -316,6 +338,7 @@ char *defaults [] = {
   "*delay:     500000",
   "*delay2:    500000",
   "*bitmap:    (default)",
+  "*geometry:  512x512",
   0
 };
 
@@ -333,6 +356,7 @@ screenhack (Display *d, Window w)
   dpy = d;
   window = w;
   init ();
+  if (delay2) usleep (delay2 * 2);
   while (1)
     {
       rotate ();
index d7e87d30bd66c2fdba81e9db74b9eba8ad1669fa..9d8dc08e1702b1c4f3920691aaf4e4ae8af3eb75 100644 (file)
@@ -1,4 +1,4 @@
-.TH XScreenSaver 1 "16-May-97" "X Version 11"
+.TH XScreenSaver 1 "24-Nov-97" "X Version 11"
 .SH NAME
 blitspin - rotate a bitmap in an interesting way
 .SH SYNOPSIS
@@ -46,19 +46,44 @@ name is not a fully-qualified pathname.
 .TP 8
 .B \-grab\-screen
 If this option is specified, then the image which is spun will be grabbed
-from the portion of the screen underlying the blitspin window.
+from the portion of the screen underlying the blitspin window.  (Or, it
+may come from an external video source: see below.)
 .PP
 .TP 8
-.B \-delay microseconds
+.B \-delay \fImicroseconds\fP
 How long to delay between steps of the rotation process, in microseconds.
 Default is 500000, one-half second.
 .PP
 .TP 8
-.B \-delay2 microseconds
+.B \-delay2 \fImicroseconds\fP
 How long to delay between each 90-degree rotation, in microseconds.
 Default is 500000, one-half second.
 .B DISPLAY
 to get the default host and display number.
+.SH RESOURCES
+On some systems (currently, only SGIs), this program can, instead of grabbing
+a desktop image, grab a frame of video from an external camera and manipulate
+that instead.  The following resources control that.
+.PP
+.TP 8
+.B grabVideoProbability \fR(Float)\fP
+What portion of the time to grab video rather than a screen image, 
+between 0.0 and 1.0.  Defaults to 0.5, or half the time.
+.TP 8
+.B videoDevice \fR(Integer)\fP
+The number of the default video input device to check first.  If unspecified, 
+the default camera (from videopanel(1)) will be checked first.  After that, all
+other available video input devices will be checked in order.  
+
+The first one which produces a non-black image will be used.  If all images
+are black, the others will be re-checked a few times before giving up and
+falling back to simply grabbing a desktop image (but note that this takes a
+few seconds, so if you don't actually have any video sources hooked up, you
+should consider turning off video grabbing by setting
+\fBgrabVideoProbability\fP to 0.0.)
+.TP 8
+.B videoGain \fR(Float)\fP
+The amount by which to brighten the grabbed image.  This defaults to 2.2.
 .SH ENVIRONMENT
 .B XENVIRONMENT
 to get the name of a resource file that overrides the global resources
index e6d0cf30acb4fd849cb0f102eff4f80775149d98..9f25d6db8ed515bc69f2a85edd0c9400ce9666ba 100644 (file)
@@ -32,11 +32,15 @@ static const char sccsid[] = "@(#)braid.c   4.00 97/01/01 xlockmore";
 # define HACK_DRAW                                     draw_braid
 # define braid_opts                                    xlockmore_opts
 # define DEFAULTS      "*count:                15    \n"                       \
+                                       "*size:            -7     \n"                   \
                                        "*cycles:               100   \n"                       \
                                        "*delay:                1000  \n"                       \
-                                       "*ncolors:              64    \n"
+                                       "*ncolors:              64    \n"                       \
+                                       "*eraseSpeed:   400 \n"                         \
+                                       "*eraseMode:    -1 \n"
 # define UNIFORM_COLORS
 # include "xlockmore.h"                                /* from the xscreensaver distribution */
+# include "erase.h"
 #else  /* !STANDALONE */
 # include "xlock.h"                                    /* from the xlockmore distribution */
 #endif /* !STANDALONE */
@@ -164,7 +168,6 @@ init_braid(ModeInfo * mi)
 
        /* jwz: go in the other direction sometimes. */
        braid->color_direction = ((LRAND() & 1) ? 1 : -1);
-
        XClearWindow(display, MI_WINDOW(mi));
 
        min_length = (braid->center_x > braid->center_y) ?
@@ -236,6 +239,21 @@ init_braid(ModeInfo * mi)
                }
        } while (count > 0);
 
+       {
+         int line_width = MI_SIZE(mi);
+         if (line_width == 0)
+               line_width = -8;
+         if (line_width < 0)
+               line_width = NRAND(-line_width)+1;
+         if (line_width == 1)
+               line_width = 0;
+         XSetLineAttributes(MI_DISPLAY(mi), MI_GC(mi), line_width,
+                                                LineSolid,
+                                                (line_width <= 3 ? CapButt : CapRound),
+                                                JoinMiter);
+       }
+
+
        for (i = 0; i < braid->nstrands; i++)
                if (!(braid->components[i] & 1))
                        braid->components[i] *= -1;
@@ -394,8 +412,12 @@ draw_braid(ModeInfo * mi)
                }
        }
 
-       if (++braid->age > MI_CYCLES(mi))
-               init_braid(mi);
+       if (++braid->age > MI_CYCLES(mi)) {
+#ifdef STANDALONE
+         erase_full_window(MI_DISPLAY(mi), MI_WINDOW(mi));
+#endif
+         init_braid(mi);
+       }
 }
 
 void
index 5dffd2a29b20bfaa58d06bc5d73e34b06650c287..db87ffe492d04444ba07447a72d802d253538bcc 100644 (file)
@@ -1,6 +1,6 @@
 /* bubbles.c - frying pan / soft drink in a glass simulation */
 
-/*$Id: bubbles.c,v 1.8 1997/07/26 19:16:33 jwz Exp $*/
+/*$Id: bubbles.c,v 1.10 1997/12/03 10:56:13 jwz Exp $*/
 
 /*
  *  Copyright (C) 1995-1996 James Macnicol
 #endif /* BUBBLES_IO */
 
 #include <limits.h>
+
+#ifdef SIGNAL_NONSENSE         /* what's this crap doing in here? */
 #include <signal.h>
+#endif /* SIGNAL_NONSENSE */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -90,7 +94,7 @@ char *defaults [] = {
   "*foreground: white",
   "*simple:     false",
   "*broken:     false",
-  "*delay:      2000",
+  "*delay:      800",
 #ifdef BUBBLES_IO
   "*file:       (default)",
   "*directory:  (default)",
@@ -981,6 +985,7 @@ free_pixmaps (void)
   }
 }
 
+#ifdef SIGNAL_NONSENSE
 static void 
 onintr(int a)
 /* This gets called when SIGINT or SIGTERM is received */
@@ -999,6 +1004,7 @@ onsegv(int a)
   exit(1);
 }
 #endif /* DEBUG */
+#endif /* SIGNAL_NONSENSE */
 
 
 /*
@@ -1202,6 +1208,7 @@ default_to_pixmaps (void)
 
   /* Make sure pixmaps are freed when program is terminated */
   /* This is when I hit ^C */
+#ifdef SIGNAL_NONSENSE
   if (signal(SIGINT, SIG_IGN) != SIG_IGN)
     signal(SIGINT, onintr);
   /* xscreensaver sends SIGTERM */
@@ -1215,6 +1222,7 @@ default_to_pixmaps (void)
     printf("Didn't set signal hanlder for SIGSEGV\n");
   }
 #endif /* DEBUG */
+#endif /* SIGNAL_NONSENSE */
 
   for (i = 0; i < num_default_bubbles; i++) {
     pixpt = default_bubbles[i];
@@ -1485,6 +1493,7 @@ BE UNCOMPRESSED AND READY TO GO! */
     exit(1);
   }
 
+#ifdef SIGNAL_NONSENSE
   /* Make sure pixmaps are freed when program is terminated */
   /* This is when I hit ^C */
   if (signal(SIGINT, SIG_IGN) != SIG_IGN)
@@ -1496,6 +1505,7 @@ BE UNCOMPRESSED AND READY TO GO! */
   if (signal(SIGSEGV, SIGN_IGN) != SIG_IGN)
     signal(SIGSEGV, onsegv);
 #endif /* DEBUG */
+#endif /* SIGNAL_NONSENSE */
   
   while (1) {
     if (inxpm == 2)
index a8d2794a6173d059fe5cc6baa4c24793fbbd2646..18124d5ca8f7eaab7db7761b496869d96527a496 100644 (file)
@@ -1,9 +1,11 @@
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) ANT.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) ATTRACTION.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) BLITSPIN.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) BOUBOULE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) BRAID.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) BUBBLES.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) BUBBLES_DEFAULT.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) CORAL.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DECAYSCREEN.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DECO.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DRIFT.C
@@ -11,7 +13,6 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) FLAG.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) FLAME.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) FOREST.C
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) FRACT.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) GALAXY.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) GOOP.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) GRAV.C
@@ -27,17 +28,22 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LASER.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LIGHTNING.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LISA.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LISSIE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LMORPH.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) MAZE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) MOIRE.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) MOUNTAIN.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) MUNCH.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) NOSEGUY.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PEDAL.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PENROSE.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PUZZLE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PYRO.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) QIX.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) RD-BOMB.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) ROCKS.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) RORSCHACH.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) ROTOR.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SCREENHACK.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SIERPINSKI.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SLIDESCREEN.C
@@ -47,6 +53,12 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) STARFISH.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) STRANGE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SWIRL.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) TRIANGLE.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) VINES.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) WORM.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) XJACK.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) XLOCKMORE.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) XLYAP.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) XROGER-HACK.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) XSCREENSAVER-SGIGL.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE,XLOCKMORE)/INCL=([],[-],[-.UTILS])/OBJ=SCREENHACK-XLOCK.OBJ SCREENHACK.C
index a8d2794a6173d059fe5cc6baa4c24793fbbd2646..18124d5ca8f7eaab7db7761b496869d96527a496 100644 (file)
@@ -1,9 +1,11 @@
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) ANT.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) ATTRACTION.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) BLITSPIN.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) BOUBOULE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) BRAID.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) BUBBLES.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) BUBBLES_DEFAULT.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) CORAL.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DECAYSCREEN.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DECO.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DRIFT.C
@@ -11,7 +13,6 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) FLAG.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) FLAME.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) FOREST.C
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) FRACT.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) GALAXY.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) GOOP.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) GRAV.C
@@ -27,17 +28,22 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LASER.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LIGHTNING.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LISA.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LISSIE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LMORPH.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) MAZE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) MOIRE.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) MOUNTAIN.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) MUNCH.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) NOSEGUY.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PEDAL.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PENROSE.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PUZZLE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PYRO.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) QIX.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) RD-BOMB.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) ROCKS.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) RORSCHACH.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) ROTOR.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SCREENHACK.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SIERPINSKI.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SLIDESCREEN.C
@@ -47,6 +53,12 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) STARFISH.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) STRANGE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SWIRL.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) TRIANGLE.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) VINES.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) WORM.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) XJACK.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) XLOCKMORE.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) XLYAP.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) XROGER-HACK.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) XSCREENSAVER-SGIGL.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE,XLOCKMORE)/INCL=([],[-],[-.UTILS])/OBJ=SCREENHACK-XLOCK.OBJ SCREENHACK.C
index eddde276d3bfb29ab93ea6bd68b0d8a6df51cca4..2cf5b114026ae9cdc592a930eeaf0b13cec96cf5 100644 (file)
@@ -11,8 +11,9 @@
 
 #include "screenhack.h"
 #include "colors.h"
+#include "erase.h"
 
-static GC draw_gc;
+static GC draw_gc, erase_gc;
 static unsigned int default_fg_pixel;
 #define NCOLORSMAX 200
 static XColor colors[NCOLORSMAX];
@@ -55,8 +56,17 @@ init_coral(Display *dpy, Window window)
     }
     gcv.foreground = default_fg_pixel = get_pixel_resource("foreground", "Foreground", dpy, cmap);
     draw_gc = XCreateGC(dpy, window, GCForeground, &gcv);
+    gcv.foreground = get_pixel_resource ("background", "Background",dpy, cmap);
+    erase_gc = XCreateGC (dpy, window, GCForeground, &gcv);
     ncolors = NCOLORSMAX;
     make_uniform_colormap(dpy, xgwa.visual, cmap, colors, &ncolors, True, &writeable, False);
+    if (ncolors <= 0) {
+      ncolors = 2;
+      colors[0].red = colors[0].green = colors[0].blue = 0;
+      colors[1].red = colors[1].green = colors[1].blue = 0xFFFF;
+      XAllocColor(dpy, cmap, &colors[0]);
+      XAllocColor(dpy, cmap, &colors[1]);
+   }
     colorindex = random()%ncolors;
     
     density = get_integer_resource("density", "Integer");
@@ -221,6 +231,8 @@ char *defaults[] = {
     "*seeds: 20", /* too many for 640x480, too few for 1280x1024 */
     "*delay: 5",
     "*delay2: 1000",
+    "*eraseSpeed: 400",
+    "*eraseMode: -1",
     0
 };
 
@@ -229,6 +241,8 @@ XrmOptionDescRec options[] = {
     { "-seeds", ".seeds", XrmoptionSepArg, 0 },
     { "-delay", ".delay", XrmoptionSepArg, 0 },
     { "-delay2", ".delay2", XrmoptionSepArg, 0 },
+    { "-erase-speed", ".eraseSpeed", XrmoptionSepArg, 0 },
+    { "-erase-mode",  ".eraseMode",  XrmoptionSepArg, 0 },
     { 0, 0, 0, 0 }
 };
 
@@ -238,10 +252,10 @@ Display *dpy;
 Window window;
 {
     int delay = get_integer_resource ("delay", "Integer");
-
     while( 1 ) {
         init_coral(dpy, window);
         coral(dpy, window);
         if( delay ) sleep(delay);
+       erase_full_window(dpy, window);
     }
 }
index 604500491fb891d002cdb23e4884ad95497ce4ab..ed7a084007b1a19ea7ff847a710cad04c12cc7c3 100644 (file)
@@ -28,6 +28,8 @@
  *
  *  Vivek Khera <khera@cs.duke.edu>
  *  5-AUG-1993
+ *
+ *  Hacked by jwz, 28-Nov-97 (sped up and added new motion directions)
  */
 
 #include "screenhack.h"
 static int sizex, sizey;
 static int delay;
 static GC gc;
+static int mode;
+
+#define SHUFFLE 0
+#define UP 1
+#define LEFT 2
+#define RIGHT 3
+#define DOWN 4
+#define UPLEFT 5
+#define DOWNLEFT 6
+#define UPRIGHT 7
+#define DOWNRIGHT 8
+#define IN 9
+#define OUT 10
+
 
 static void
 init_decay (Display *dpy, Window window)
 {
   XGCValues gcv;
   XWindowAttributes xgwa;
+  long gcflags;
+
+  char *s = get_string_resource("mode", "Mode");
+  if      (s && !strcmp(s, "shuffle")) mode = SHUFFLE;
+  else if (s && !strcmp(s, "up")) mode = UP;
+  else if (s && !strcmp(s, "left")) mode = LEFT;
+  else if (s && !strcmp(s, "right")) mode = RIGHT;
+  else if (s && !strcmp(s, "down")) mode = DOWN;
+  else if (s && !strcmp(s, "upleft")) mode = UPLEFT;
+  else if (s && !strcmp(s, "downleft")) mode = DOWNLEFT;
+  else if (s && !strcmp(s, "upright")) mode = UPRIGHT;
+  else if (s && !strcmp(s, "downright")) mode = DOWNRIGHT;
+  else if (s && !strcmp(s, "in")) mode = IN;
+  else if (s && !strcmp(s, "out")) mode = OUT;
+  else {
+    if (s && *s && !!strcmp(s, "random"))
+      fprintf(stderr, "%s: unknown mode %s\n", progname, s);
+    mode = random() % (OUT+1);
+  }
 
   delay = get_integer_resource ("delay", "Integer");
 
@@ -48,8 +83,10 @@ init_decay (Display *dpy, Window window)
 
   gcv.function = GXcopy;
   gcv.subwindow_mode = IncludeInferiors;
-  gc = XCreateGC (dpy, window, GCForeground |GCFunction | GCSubwindowMode,
-                 &gcv);
+  gcflags = GCForeground |GCFunction;
+  if (use_subwindow_mode_p(xgwa.screen, window)) /* see grabscreen.c */
+    gcflags |= GCSubwindowMode;
+  gc = XCreateGC (dpy, window, gcflags, &gcv);
 
   XGetWindowAttributes (dpy, window, &xgwa);
   sizex = xgwa.width;
@@ -65,47 +102,77 @@ init_decay (Display *dpy, Window window)
 static void
 decay1 (Display *dpy, Window window)
 {
-    int left, top, width, height;
+    int left, top, width, height, toleft, totop;
+
+#define L 101
+#define R 102
+#define U 103
+#define D 104
+    static int no_bias[]        = { L,L,L,L, R,R,R,R, U,U,U,U, D,D,D,D };
+    static int up_bias[]        = { L,L,L,L, R,R,R,R, U,U,U,U, U,U,D,D };
+    static int down_bias[]      = { L,L,L,L, R,R,R,R, U,U,D,D, D,D,D,D };
+    static int left_bias[]      = { L,L,L,L, L,L,R,R, U,U,U,U, D,D,D,D };
+    static int right_bias[]     = { L,L,R,R, R,R,R,R, U,U,U,U, D,D,D,D };
+
+    static int upleft_bias[]    = { L,L,L,L, L,R,R,R, U,U,U,U, U,D,D,D };
+    static int downleft_bias[]  = { L,L,L,L, L,R,R,R, U,U,U,D, D,D,D,D };
+    static int upright_bias[]   = { L,L,L,R, R,R,R,R, U,U,U,U, U,D,D,D };
+    static int downright_bias[] = { L,L,L,R, R,R,R,R, U,U,U,D, D,D,D,D };
+    static int *bias;
+
+    switch (mode) {
+      case SHUFFLE:    bias = no_bias; break;
+      case UP:         bias = up_bias; break;
+      case LEFT:       bias = left_bias; break;
+      case RIGHT:      bias = right_bias; break;
+      case DOWN:       bias = down_bias; break;
+      case UPLEFT:     bias = upleft_bias; break;
+      case DOWNLEFT:   bias = downleft_bias; break;
+      case UPRIGHT:    bias = upright_bias; break;
+      case DOWNRIGHT:  bias = downright_bias; break;
+      case IN:         bias = no_bias; break;
+      case OUT:                bias = no_bias; break;
+      default: abort();
+    }
 
 #define nrnd(x) (random() % (x))
 
-    switch (random() % 8) {
-      case 0:                  /* move a block left */
-      case 1:
-       left = nrnd(sizex - 1) + 1;
-       top = nrnd(sizey);
-       width = nrnd(sizex - left);
-       height = nrnd(sizey - top);
-       XCopyArea (dpy, window, window, gc, left, top, width, height,
-                  left - 1, top);
-       break;
-      case 2:                  /* move a block right */
-      case 3:
-       left = nrnd(sizex - 1);
-       top = nrnd(sizey);
-       width = nrnd(sizex - 1 - left);
-       height = nrnd(sizey - top);
-       XCopyArea (dpy, window, window, gc, left, top, width, height,
-                  left + 1, top);
-       break;
-      case 4:                  /* move a block up */
-       left = nrnd(sizex);
-       top = nrnd(sizey - 1) + 1;
-       width = nrnd(sizex - left);
-       height = nrnd(sizey - top);
-       XCopyArea (dpy, window, window, gc, left, top, width, height,
-                  left, top - 1);
-       break;
-      default:                 /* move block down (biased to this) */
-       left = nrnd(sizex);
-       top = nrnd(sizey - 1);
-       width = nrnd(sizex - left);
-       height = nrnd(sizey - 1 - top);
-       XCopyArea (dpy, window, window, gc, left, top, width, height,
-                  left, top + 1);
-       break;
+    left = nrnd(sizex - 1);
+    top = nrnd(sizey);
+    width = nrnd(sizex - left);
+    height = nrnd(sizey - top);
+
+    toleft = left;
+    totop = top;
+
+    if (mode == IN || mode == OUT) {
+      int x = left+(width/2);
+      int y = top+(height/2);
+      int cx = sizex/2;
+      int cy = sizey/2;
+      if (mode == IN) {
+       if      (x > cx && y > cy)   bias = upleft_bias;
+       else if (x < cx && y > cy)   bias = upright_bias;
+       else if (x < cx && y < cy)   bias = downright_bias;
+       else /* (x > cx && y < cy)*/ bias = downleft_bias;
+      } else {
+       if      (x > cx && y > cy)   bias = downright_bias;
+       else if (x < cx && y > cy)   bias = downleft_bias;
+       else if (x < cx && y < cy)   bias = upleft_bias;
+       else /* (x > cx && y < cy)*/ bias = upright_bias;
+      }
     }
-    XSync (dpy, True);
+
+    switch (bias[random() % (sizeof(no_bias)/sizeof(*no_bias))]) {
+      case L: toleft = left-1; break;
+      case R: toleft = left+1; break;
+      case U: totop = top-1; break;
+      case D: totop = top+1; break;
+      default: abort(); break;
+    }
+
+    XCopyArea (dpy, window, window, gc, left, top, width, height,
+              toleft, totop);
 #undef nrnd
 }
 
@@ -119,12 +186,14 @@ char *defaults [] = {
   "*visualID:                  Best",
 #endif
 
-  "*delay:                     10",
+  "*delay:                     10000",
+  "*mode:                      random",
   0
 };
 
 XrmOptionDescRec options [] = {
   { "-delay",          ".delay",               XrmoptionSepArg, 0 },
+  { "-mode",           ".mode",                XrmoptionSepArg, 0 },
   { 0, 0, 0, 0 }
 };
 
@@ -133,7 +202,10 @@ screenhack (Display *dpy, Window window)
 {
     init_decay (dpy, window);
     while (1) {
+      int i;
+      for (i = 0; i < 100; i++)
        decay1 (dpy, window);
-       if (delay) usleep (delay);
+      XSync(dpy, False);
+      if (delay) usleep (delay);
     }
 }
index 007301bc99523ed6fbc2735049b2fde5ae6c3185..b5493c7b1c86b63b5f59acd23a3de268ad5010de 100644 (file)
@@ -1,9 +1,9 @@
-.TH XScreenSaver 1 "05-aug-93" "X Version 11"
+.TH XScreenSaver 1 "24-Nov-97" "X Version 11"
 .SH NAME
 decayscreen - make a screen meltdown.
 .SH SYNOPSIS
 .B decayscreen
-[\-display \fIhost:display.screen\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-delay \fIusecs\fP]
+[\-display \fIhost:display.screen\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-delay \fIusecs\fP] [\-mode \fImode\fP]
 .SH DESCRIPTION
 The \fIdecayscreen\fP program creates a melting effect by randomly
 shifting rectangles around the screen.
@@ -29,6 +29,38 @@ or the id number (decimal or hex) of a specific visual.
 .TP 8
 .B \-delay \fImicroseconds\fP
 Slow it down.
+.TP 8
+.B \-mode \fImode\fP
+The direction in which the image should tend to slide.  Legal values are
+\fIrandom\fP (meaning pick one), \fIup\fP, \fIleft\fP, \fIright\fP, 
+\fIdown\fP, \fIupleft\fP, \fIdownleft\fP, \fIupright\fP, \fIdownright\fP, 
+\fIshuffle\fP (meaning perfer no particular direction), \fIin\fP (meaning
+move things toward the center), and \fIout\fP (meaing move things away
+from the center).
+.SH RESOURCES
+On some systems (currently, only SGIs), this program can, instead of grabbing
+a desktop image, grab a frame of video from an external camera and manipulate
+that instead.  The following resources control that.
+.PP
+.TP 8
+.B grabVideoProbability \fR(Float)\fP
+What portion of the time to grab video rather than a screen image, 
+between 0.0 and 1.0.  Defaults to 0.5, or half the time.
+.TP 8
+.B videoDevice \fR(Integer)\fP
+The number of the default video input device to check first.  If unspecified, 
+the default camera (from videopanel(1)) will be checked first.  After that, all
+other available video input devices will be checked in order.  
+
+The first one which produces a non-black image will be used.  If all images
+are black, the others will be re-checked a few times before giving up and
+falling back to simply grabbing a desktop image (but note that this takes a
+few seconds, so if you don't actually have any video sources hooked up, you
+should consider turning off video grabbing by setting
+\fBgrabVideoProbability\fP to 0.0.)
+.TP 8
+.B videoGain \fR(Float)\fP
+The amount by which to brighten the grabbed image.  This defaults to 2.2.
 .SH ENVIRONMENT
 .PP
 .TP 8
@@ -51,3 +83,4 @@ of this software for any purpose.  It is provided "as is" without express or
 implied warranty.
 .SH AUTHOR
 Vivek Khera <khera@cs.duke.edu>, 05-Aug-93; based on code by David Wald, 1988.
+Modified by jwz, 28-Nov-97.
index 395a1ec5099d1ed880107eee80af921d72f7b035..508707088d5ba1d82d46ece0538aefbefe5f75ef 100644 (file)
@@ -35,9 +35,12 @@ static const char sccsid[] = "@(#)drift.c    4.02 97/04/01 xlockmore";
 # define drift_opts                                    xlockmore_opts
 # define DEFAULTS      "*count:                30    \n"                       \
                                        "*delay:                10000 \n"                       \
-                                       "*ncolors:              200   \n"
+                                       "*ncolors:              200   \n"                       \
+                                       "*eraseSpeed:   400 \n"                         \
+                                       "*eraseMode:    -1 \n"
 # define SMOOTH_COLORS
 # include "xlockmore.h"                                /* from the xscreensaver distribution */
+# include "erase.h"
 #else  /* !STANDALONE */
 # include "xlock.h"                                    /* from the xlockmore distribution */
 #endif /* !STANDALONE */
@@ -221,7 +224,6 @@ initmode(ModeInfo * mi, int mode)
                dp->fractal_len = 2000000;
        }
        dp->fractal_len = (dp->fractal_len * MI_BATCHCOUNT(mi)) / 20;
-
        XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi));
 }
 
@@ -581,8 +583,14 @@ draw_drift(ModeInfo * mi)
                draw(mi, dp, window);
                if (dp->total_points++ > dp->fractal_len) {
                        draw_flush(mi, dp, window);
-                       if (0 == --dp->nfractals)
-                               initmode(mi, frandom(2));
+                       if (0 == --dp->nfractals) {
+#ifdef STANDALONE
+                         XSync(MI_DISPLAY(mi), False);
+                         sleep(4); /* #### make settable */
+                         erase_full_window(MI_DISPLAY(mi), MI_WINDOW(mi));
+#endif /* STANDALONE */
+                         initmode(mi, frandom(2));
+                       }
                        initfractal(mi);
                }
                dp->timer--;
index d723f055e8cee09572da6171878936590a477f99..6b243f59d769002924237ca4afbe5176ce9b5503 100644 (file)
@@ -175,6 +175,14 @@ recurse (double x, double y, int l, Display *dpy, Window win)
     {
       for (i = 0; i < snum; i++)
        {
+
+         /* Scale back when values get very large. Spot sez:
+            "I think this happens on HPUX.  I think it's non-IEEE
+            to generate an exception instead of a silent NaN."
+          */
+         if ((abs(x) > 1.0E5) || (abs(y) > 1.0E5))
+           x = x / y;
+
          nx = f[0][0][i] * x + f[0][1][i] * y + f[0][2][i];
          ny = f[1][0][i] * x + f[1][1][i] * y + f[1][2][i];
          if (i < anum)
index 881fe779e28828881587de5cddf54f2cd8ee58ab..4d4b9d6eef1404ef5ca5239adafea284cde360bb 100644 (file)
@@ -33,9 +33,12 @@ static const char sccsid[] = "@(#)forest.c   4.03 97/05/10 xlockmore";
 # define DEFAULTS      "*count:                100     \n"                     \
                                        "*cycles:               200     \n"                     \
                                        "*delay:                400000  \n"                     \
-                                       "*ncolors:              100     \n"
+                                       "*ncolors:              100     \n"                     \
+                                       "*eraseSpeed:   400 \n"                         \
+                                       "*eraseMode:    -1 \n"
 # define UNIFORM_COLORS
 # include "xlockmore.h"                                /* from the xscreensaver distribution */
+# include "erase.h"
 #else  /* !STANDALONE */
 # include "xlock.h"                                    /* from the xlockmore distribution */
 #endif /* !STANDALONE */
@@ -181,8 +184,12 @@ draw_forest(ModeInfo * mi)
 
                draw_tree(mi, x_2, y_2, (len * REDUCE) / 100, a, as, c, 1);
        }
-       if (++fp->time > MI_CYCLES(mi))
-               init_forest(mi);
+       if (++fp->time > MI_CYCLES(mi)) {
+#ifdef STANDALONE
+         erase_full_window(MI_DISPLAY(mi), MI_WINDOW(mi));
+#endif /* STANDALONE */
+         init_forest(mi);
+       }
 }
 
 void
diff --git a/hacks/fract.c b/hacks/fract.c
deleted file mode 100644 (file)
index c8a6545..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-/* -*- Mode: C; tab-width: 4 -*-
- * fract --- another geometric pattern generator.
- */
-#if !defined( lint ) && !defined( SABER )
-static const char sccsid[] = "@(#)fract.c      4.02 97/04/01 xlockmore";
-#endif
-
-/* xlockmore mode written by Tracy Camp
- * campt@hurrah.com 1997
- * released to the public domain
- *
- * This was modifed from a 'screen saver' that a friend and I
- * wrote on our TI-8x calculators in high school physics one day
- * Basically another geometric pattern generator, this ones claim
- * to fame is a pseudo-fractal looking vine like pattern that creates
- * nifty whorls and loops.
- *
- * Revision History:
- * 10-May-97: jwz@netscape.com: turned into a standalone program.
- * 21-Mar-97:  David Hansen <dhansen@metapath.com>
- *             Updated mode to draw complete patterns on every
- *             iteration instead of growing the vine.  Also made
- *             adjustments to randomization and changed variable
- *             names to make logic easier to follow.
- */
-
-#ifdef STANDALONE
-# define PROGCLASS                                     "Fract"
-# define HACK_INIT                                     init_fract
-# define HACK_DRAW                                     draw_fract
-# define fract_opts                                    xlockmore_opts
-# define DEFAULTS              "*delay:        200000 \n"      \
-                                               "*ncolors:      64     \n"
-# include "xlockmore.h"                                /* from the xscreensaver distribution */
-#else  /* !STANDALONE */
-# include "xlock.h"                                    /* from the xlockmore distribution */
-#endif /* !STANDALONE */
-
-ModeSpecOpt fract_opts = {
-  0, NULL, 0, NULL, NULL };
-
-typedef struct {
-       int         a;
-       int         x1;
-       int         y1;
-       int         x2;
-       int         y2;
-       int         length;
-       int         iterations;
-       int         constant;
-       int         ang;
-       int         centerx;
-       int         centery;
-} fractstruct;
-
-static fractstruct *fracts = NULL;
-
-void
-refresh_fract(ModeInfo * mi)
-{
-}
-
-void
-init_fract(ModeInfo * mi)
-{
-       Display    *display = MI_DISPLAY(mi);
-       fractstruct *fp;
-
-       if (fracts == NULL) {
-               if ((fracts = (fractstruct *) calloc(MI_NUM_SCREENS(mi), sizeof (fractstruct))) == NULL) {
-                       return;
-               }
-       }
-       fp = &fracts[MI_SCREEN(mi)];
-
-       fp->iterations = 30 + NRAND(100);
-
-       XClearWindow(display, MI_WINDOW(mi));
-}
-
-void
-draw_fract(ModeInfo * mi)
-{
-       fractstruct *fp = &fracts[MI_SCREEN(mi)];
-       Display    *display = MI_DISPLAY(mi);
-       GC          gc = MI_GC(mi);
-       int         i;
-
-       if (--(fp->iterations) == 0)
-               init_fract(mi);
-
-       fp->centerx = NRAND(MI_WIN_WIDTH(mi));
-       fp->centery = NRAND(MI_WIN_HEIGHT(mi));
-
-       fp->ang = 60 + NRAND(720);
-       fp->length = 100 + NRAND(3000);
-       fp->constant = fp->length * (10 + NRAND(10));
-
-       fp->a = 0;
-       fp->x1 = 0;
-       fp->y1 = 0;
-       fp->x2 = 1;
-       fp->y2 = 0;
-
-       if (MI_NPIXELS(mi) > 2)
-               XSetForeground(display, gc, MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))));
-       else
-               XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(mi));
-
-
-       for (i = 0; i < fp->length; i++) {
-               XDrawLine(display, MI_WINDOW(mi), gc,
-                         fp->centerx + (fp->x1 / fp->constant),
-                         fp->centery - (fp->y1 / fp->constant),
-                         fp->centerx + (fp->x2 / fp->constant),
-                         fp->centery - (fp->y2 / fp->constant));
-
-               fp->a += (fp->ang * i);
-
-               fp->x1 = fp->x2;
-               fp->y1 = fp->y2;
-
-               fp->x2 += (int) (i * ((cos(fp->a) * 360) / (2 * M_PI)));
-               fp->y2 += (int) (i * ((sin(fp->a) * 360) / (2 * M_PI)));
-       }
-}
-
-void
-release_fract(ModeInfo * mi)
-{
-       if (fracts != NULL) {
-               (void) free((void *) fracts);
-               fracts = NULL;
-       }
-}
diff --git a/hacks/fract.man b/hacks/fract.man
deleted file mode 100644 (file)
index 8f80f8f..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-.TH XScreenSaver 1 "10-May-97" "X Version 11"
-.SH NAME
-fract - draws pseudo-fractal geometric patterns
-.SH SYNOPSIS
-.B fract
-[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP]
-
-.SH DESCRIPTION
-The \fIfract\fP program is yet another geometric pattern generator, this
-one's claim to fame being a pseudo-fractal looking vine like pattern that
-creates nifty whorls and loops.
-.SH OPTIONS
-.I fract
-accepts the following options:
-.TP 8
-.B \-window
-Draw on a newly-created window.  This is the default.
-.TP 8
-.B \-root
-Draw on the root window.
-.TP 8
-.B \-mono 
-If on a color display, pretend we're on a monochrome display.
-.TP 8
-.B \-install
-Install a private colormap for the window.
-.TP 8
-.B \-visual \fIvisual\fP
-Specify which visual to use.  Legal values are the name of a visual class,
-or the id number (decimal or hex) of a specific visual.
-.TP 8
-.B \-ncolors \fIinteger\fP
-How many colors should be used (if possible).  Default 200.
-The colors are chosen randomly.
-.SH ENVIRONMENT
-.PP
-.TP 8
-.B DISPLAY
-to get the default host and display number.
-.TP 8
-.B XENVIRONMENT
-to get the name of a resource file that overrides the global resources
-stored in the RESOURCE_MANAGER property.
-.SH SEE ALSO
-.BR X (1),
-.BR xscreensaver (1),
-.BR xlock (1)
-.SH COPYRIGHT
-Copyright \(co 1997 by Tracy Camp.
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation. 
-.SH AUTHOR
-Tracy Camp <campt@hurrah.com>, 1997.
-
-Tweaked by David Hansen <dhansen@metapath.com>, 21-Mar-97.
-
-Ability to run standalone or with \fIxscreensaver\fP added by 
-Jamie Zawinski <jwz@netscape.com>, 10-May-97.
index 737c4f5d500ce1c54077afccba8d967af564243d..0a8694bf500edf0dbe05738f6ba337cc5eec897a 100644 (file)
@@ -1,12 +1,15 @@
-/* -*- Mode: C; tab-width: 4 -*-
- * galaxy --- draw spinning, colliding galaxies.
- */
+/* -*- Mode: C; tab-width: 4 -*- */
+/* galaxy --- spinning galaxies */
+
 #if !defined( lint ) && !defined( SABER )
-static const char sccsid[] = "@(#)galaxy.c     4.02 97/04/01 xlockmore";
+static const char sccsid[] = "@(#)galaxy.c     4.04 97/07/28 xlockmore";
 #endif
 
-/* Originally done by Uli Siegmund (uli@wombat.okapi.sub.org) on Amiga
+/* Originally done by Uli Siegmund <uli@wombat.okapi.sub.org> on Amiga
  *   for EGS in Cluster
+ * Port from Cluster/EGS to C/Intuition by Harald Backert
+ * Port to X11 and incorporation into xlockmore by Hubert Feyrer
+ *   <hubert.feyrer@rz.uni-regensburg.de>
  *
  * Permission to use, copy, modify, and distribute this software and its
  * documentation for any purpose and without fee is hereby granted,
@@ -19,8 +22,6 @@ static const char sccsid[] = "@(#)galaxy.c    4.02 97/04/01 xlockmore";
  * trade secrets or any patents by this file or any part thereof.  In no
  * event will the author be liable for any lost revenue or profits or
  * other special, indirect and consequential damages.
- * Port to X11 and incorporation into xlockmore by Hubert Feyrer
- *   (hubert.feyrer@rz.uni-regensburg.de)
  *
  * Revision History:
  * 10-May-97: jwz@netscape.com: turned into a standalone program.
@@ -41,10 +42,10 @@ static const char sccsid[] = "@(#)galaxy.c  4.02 97/04/01 xlockmore";
 # define HACK_INIT                                     init_galaxy
 # define HACK_DRAW                                     draw_galaxy
 # define galaxy_opts                           xlockmore_opts
-# define DEFAULTS      "*count:                5    \n"                        \
+# define DEFAULTS      "*delay:                100  \n"                        \
+                                       "*count:                -5   \n"                        \
                                        "*cycles:               250  \n"                        \
-                                       "*delay:                100  \n"                        \
-                                       "*size:                 3    \n"                        \
+                                       "*size:                 -3   \n"                        \
                                        "*ncolors:              64   \n"
 # define UNIFORM_COLORS
 # include "xlockmore.h"                                /* from the xscreensaver distribution */
@@ -52,6 +53,29 @@ static const char sccsid[] = "@(#)galaxy.c   4.02 97/04/01 xlockmore";
 # include "xlock.h"                                    /* from the xlockmore distribution */
 #endif /* !STANDALONE */
 
+static Bool tracks;
+
+#define DEF_TRACKS "False"
+
+static XrmOptionDescRec opts[] =
+{
+       {"-tracks", ".galaxy.tracks", XrmoptionNoArg, (caddr_t) "on"},
+       {"+tracks", ".galaxy.tracks", XrmoptionNoArg, (caddr_t) "off"}
+};
+
+static argtype vars[] =
+{
+       {(caddr_t *) & tracks, "tracks", "Tracks", DEF_TRACKS, t_Bool}
+};
+
+static OptionStruct desc[] =
+{
+       {"-/+tracks", "turn on/off star tracks"}
+};
+
+ModeSpecOpt galaxy_opts = { 2, opts, 1, vars, desc };
+
+
 #define FLOATRAND ((double) LRAND() / ((double) MAXRAND))
 
 #if 0
@@ -68,12 +92,25 @@ static const char sccsid[] = "@(#)galaxy.c  4.02 97/04/01 xlockmore";
 #define DEFAULT_STARS    1000
 #define DEFAULT_HITITERATIONS  7500
 #define DEFAULT_IDELTAT    200 /* 0.02 */
-#define EPSILON 0.0000001
+#define EPSILON 0.00000001
+
+#define sqrt_EPSILON 0.0001
+
+#define DELTAT (MAX_IDELTAT * 0.0001)
 
 #define GALAXYRANGESIZE  0.1
 #define GALAXYMINSIZE  0.1
 #define QCONS    0.001
 
+/*-
+ *  The following is enabled, it does not look that good for some.
+ *  (But it looks great for me.)  Maybe velocities should be measured
+ *  relative to their galaxy-centers instead of absolute.
+ */
+#if 0
+#undef NO_VELOCITY_COLORING */ /* different colors for different speeds */
+#endif
+
 #define COLORBASE  8
   /* Colors for stars start here */
 #define COLORSTEP  (NUMCOLORS/COLORBASE)       /* 8 colors per galaxy */
@@ -81,30 +118,6 @@ static const char sccsid[] = "@(#)galaxy.c  4.02 97/04/01 xlockmore";
 #define drawStar(x,y,size) if(size<=1) XDrawPoint(display,window,gc,x,y);\
   else XFillArc(display,window,gc,x,y,size,size,0,23040)
 
-
-static Bool tracks;
-
-#define DEF_TRACKS "False"
-
-static XrmOptionDescRec opts[] =
-{
-       {"-tracks", ".galaxy.tracks", XrmoptionNoArg, (caddr_t) "on"},
-       {"+tracks", ".galaxy.tracks", XrmoptionNoArg, (caddr_t) "off"}
-};
-
-static argtype vars[] =
-{
-       {(caddr_t *) & tracks, "tracks", "Tracks", DEF_TRACKS, t_Bool}
-};
-
-static OptionStruct desc[] =
-{
-       {"-/+tracks", "turn on/off star tracks"}
-};
-
-ModeSpecOpt galaxy_opts = { 2, opts, 1, vars, desc };
-
-
 typedef struct {
        double      pos[3], vel[3];
        int         px, py;
@@ -135,7 +148,6 @@ typedef struct {
        double      diff[3];    /* */
        Galaxy     *galaxies;   /* the Whole Universe */
        int         ngalaxies;  /* # galaxies */
-       double      f_deltat;   /* quality of calculation, calc'd by d_ideltat */
        int         f_hititerations;    /* # iterations before restart */
        int         step;       /* */
 } unistruct;
@@ -215,11 +227,11 @@ startover(ModeInfo * mi)
                gt->vel[0] = FLOATRAND * 2.0 - 1.0;
                gt->vel[1] = FLOATRAND * 2.0 - 1.0;
                gt->vel[2] = FLOATRAND * 2.0 - 1.0;
-               gt->pos[0] = -gt->vel[0] * gp->f_deltat *
+               gt->pos[0] = -gt->vel[0] * DELTAT *
                        gp->f_hititerations + FLOATRAND - 0.5;
-               gt->pos[1] = -gt->vel[1] * gp->f_deltat *
+               gt->pos[1] = -gt->vel[1] * DELTAT *
                        gp->f_hititerations + FLOATRAND - 0.5;
-               gt->pos[2] = -gt->vel[2] * gp->f_deltat *
+               gt->pos[2] = -gt->vel[2] * DELTAT *
                        gp->f_hititerations + FLOATRAND - 0.5;
 
                gt->mass = (int) (FLOATRAND * 1000.0) + 1;
@@ -252,6 +264,10 @@ startover(ModeInfo * mi)
                        st->vel[2] = -gp->mat[0][2] * v * sinw + gp->mat[1][2] * v * cosw +
                                gt->vel[2];
 
+                       st->vel[0] *= DELTAT;
+                       st->vel[1] *= DELTAT;
+                       st->vel[2] *= DELTAT;
+
                        st->px = 0;
                        st->py = 0;
 
@@ -269,7 +285,7 @@ startover(ModeInfo * mi)
 #if 0
        (void) printf("ngalaxies=%d, f_hititerations=%d\n",
                      gp->ngalaxies, gp->f_hititerations);
-       (void) printf("f_deltat=%g\n", gp->f_deltat);
+       (void) printf("f_deltat=%g\n", DELTAT);
        (void) printf("Screen: ");
        (void) printf("%dx%d pixel (%d-%d, %d-%d)\n",
          (gp->clip.right - gp->clip.left), (gp->clip.bottom - gp->clip.top),
@@ -290,7 +306,6 @@ init_galaxy(ModeInfo * mi)
        gp = &universes[MI_SCREEN(mi)];
 
        gp->f_hititerations = MI_CYCLES(mi);
-       gp->f_deltat = ((double) MAX_IDELTAT) / 10000.0;
 
        gp->clip.left = 0;
        gp->clip.top = 0;
@@ -318,32 +333,40 @@ draw_galaxy(ModeInfo * mi)
 
                for (j = 0; j < gp->galaxies[i].nstars; ++j) {
                        Star       *st = &gt->stars[j];
+                       double      v0 = st->vel[0];
+                       double      v1 = st->vel[1];
+                       double      v2 = st->vel[2];
 
                        for (k = 0; k < gp->ngalaxies; ++k) {
                                Galaxy     *gtk = &gp->galaxies[k];
+                               double      d0 = gtk->pos[0] - st->pos[0];
+                               double      d1 = gtk->pos[1] - st->pos[1];
+                               double      d2 = gtk->pos[2] - st->pos[2];
 
-                               gp->diff[0] = gtk->pos[0] - st->pos[0];
-                               gp->diff[1] = gtk->pos[1] - st->pos[1];
-                               gp->diff[2] = gtk->pos[2] - st->pos[2];
-                               d = gp->diff[0] * gp->diff[0] + gp->diff[1] * gp->diff[1] +
-                                       gp->diff[2] * gp->diff[2];
-                               if (d < EPSILON)
-                                       d = EPSILON;
-                               d = gt->mass / (d * sqrt(d)) * gp->f_deltat * QCONS;
-                               gp->diff[0] *= d;
-                               gp->diff[1] *= d;
-                               gp->diff[2] *= d;
-                               st->vel[0] += gp->diff[0];
-                               st->vel[1] += gp->diff[1];
-                               st->vel[2] += gp->diff[2];
+                               d = d0 * d0 + d1 * d1 + d2 * d2;
+                               if (d > EPSILON)
+                                       d = gt->mass / (d * sqrt(d)) * DELTAT * DELTAT * QCONS;
+                               else
+                                       d = gt->mass / (EPSILON * sqrt_EPSILON) * DELTAT * DELTAT * QCONS;
+                               v0 += d0 * d;
+                               v1 += d1 * d;
+                               v2 += d2 * d;
                        }
 
-                       st->color = COLORSTEP * gt->galcol + ((int) ((st->vel[0] * st->vel[0] +
-                               st->vel[1] * st->vel[1] + st->vel[2] * st->vel[2]) / 3.0)) % COLORSTEP;
+                       st->vel[0] = v0;
+                       st->vel[1] = v1;
+                       st->vel[2] = v2;
 
-                       st->pos[0] += st->vel[0] * gp->f_deltat;
-                       st->pos[1] += st->vel[1] * gp->f_deltat;
-                       st->pos[2] += st->vel[2] * gp->f_deltat;
+#ifndef NO_VELOCITY_COLORING
+                       d = (v0 * v0 + v1 * v1 + v2 * v2) / (3.0 * DELTAT * DELTAT);
+                       if (d > (double) COLORSTEP)
+                               st->color = COLORSTEP * gt->galcol + COLORSTEP - 1;
+                       else
+                               st->color = COLORSTEP * gt->galcol + ((int) d) % COLORSTEP;
+#endif
+                       st->pos[0] += v0;
+                       st->pos[1] += v1;
+                       st->pos[2] += v2;
 
                        if (st->px >= gp->clip.left &&
                            st->px <= gp->clip.right - st->size &&
@@ -381,7 +404,11 @@ draw_galaxy(ModeInfo * mi)
                            st->py >= gp->clip.top &&
                            st->py <= gp->clip.bottom - st->size) {
                                if (MI_NPIXELS(mi) > 2)
+#ifdef NO_VELOCITY_COLORING
+                                       XSetForeground(display, gc, MI_PIXEL(mi, COLORSTEP * gt->galcol));
+#else
                                        XSetForeground(display, gc, MI_PIXEL(mi, st->color));
+#endif
                                else
                                        XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(mi));
                                if (tracks)
@@ -393,28 +420,28 @@ draw_galaxy(ModeInfo * mi)
 
                for (k = i + 1; k < gp->ngalaxies; ++k) {
                        Galaxy     *gtk = &gp->galaxies[k];
+                       double      d0 = gtk->pos[0] - gt->pos[0];
+                       double      d1 = gtk->pos[1] - gt->pos[1];
+                       double      d2 = gtk->pos[2] - gt->pos[2];
 
-                       gp->diff[0] = gtk->pos[0] - gt->pos[0];
-                       gp->diff[1] = gtk->pos[1] - gt->pos[1];
-                       gp->diff[2] = gtk->pos[2] - gt->pos[2];
-                       d = gp->diff[0] * gp->diff[0] + gp->diff[1] * gp->diff[1] +
-                               gp->diff[2] * gp->diff[2];
-                       if (d < EPSILON)
-                               d = EPSILON;
-                       d = gt->mass * gt->mass / (d * sqrt(d)) * gp->f_deltat * QCONS;
-                       gp->diff[0] *= d;
-                       gp->diff[1] *= d;
-                       gp->diff[2] *= d;
-                       gt->vel[0] += gp->diff[0] / gt->mass;
-                       gt->vel[1] += gp->diff[1] / gt->mass;
-                       gt->vel[2] += gp->diff[2] / gt->mass;
-                       gtk->vel[0] -= gp->diff[0] / gtk->mass;
-                       gtk->vel[1] -= gp->diff[1] / gtk->mass;
-                       gtk->vel[2] -= gp->diff[2] / gtk->mass;
+                       d = d0 * d0 + d1 * d1 + d2 * d2;
+                       if (d > EPSILON)
+                               d = gt->mass * gt->mass / (d * sqrt(d)) * DELTAT * QCONS;
+                       else
+                               d = gt->mass * gt->mass / (EPSILON * sqrt_EPSILON) * DELTAT * QCONS;
+                       d0 *= d;
+                       d1 *= d;
+                       d2 *= d;
+                       gt->vel[0] += d0 / gt->mass;
+                       gt->vel[1] += d1 / gt->mass;
+                       gt->vel[2] += d2 / gt->mass;
+                       gtk->vel[0] -= d0 / gtk->mass;
+                       gtk->vel[1] -= d1 / gtk->mass;
+                       gtk->vel[2] -= d2 / gtk->mass;
                }
-               gt->pos[0] += gt->vel[0] * gp->f_deltat;
-               gt->pos[1] += gt->vel[1] * gp->f_deltat;
-               gt->pos[2] += gt->vel[2] * gp->f_deltat;
+               gt->pos[0] += gt->vel[0] * DELTAT;
+               gt->pos[1] += gt->vel[1] * DELTAT;
+               gt->pos[2] += gt->vel[2] * DELTAT;
        }
 
        gp->step++;
index 00f8bfc3ac50f518eee088c053e9d3167f9892cd..136142d57ce4f33e85344a9cf87893ecf37c7f6d 100644 (file)
@@ -1,5 +1,5 @@
 /* -*- Mode: C; tab-width: 4 -*- */
-/* rubik --- Shows a self-solving Rubik's cube */
+/* rubik --- Shows a auto-solving Rubik's cube */
 
 #if !defined( lint ) && !defined( SABER )
 static const char sccsid[] = "@(#)rubik.c      4.04 97/07/28 xlockmore";
@@ -7,6 +7,7 @@ static const char sccsid[] = "@(#)rubik.c       4.04 97/07/28 xlockmore";
 #endif
 
 #undef DEBUG_LISTS
+#undef LMN
 
 /*-
  * Permission to use, copy, modify, and distribute this software and its
@@ -21,24 +22,26 @@ static const char sccsid[] = "@(#)rubik.c   4.04 97/07/28 xlockmore";
  * event will the author be liable for any lost revenue or profits or
  * other special, indirect and consequential damages.
  *
- * This mode shows a self solving rubik's cube "puzzle". If somebody
+ * This mode shows a auto-solving rubik's cube "puzzle". If somebody
  * intends to make a game or something based on this code, please let me
  * know first, my e-mail address is provided in this comment. Marcelo.
  *
  * Thanks goes also to Brian Paul for making it possible and inexpensive
  * to use OpenGL at home.
  *
- * Since I'm not a native english speaker, my apologies for any gramatical
+ * Since I'm not a native English speaker, my apologies for any grammatical
  * mistake.
  *
  * My e-mail addresses are
  * vianna@cat.cbpf.br 
  *         and
- * marcelo@venus.rdc.puc-rio.br
+ * m-vianna@usa.net
  *
  * Marcelo F. Vianna (Jul-31-1997)
  *
  * Revision History:
+ * 08-Aug-97: Now has some internals from xrubik by David Bagley
+ *            This should make it easier to add features.
  * 02-Aug-97: Now behaves more like puzzle.c: first show the cube being
  *            shuffled and then being solved. A mode specific option was added:
  *            "+/-hideshuffling" to provide the original behavior (in which
@@ -54,9 +57,8 @@ static const char sccsid[] = "@(#)rubik.c     4.04 97/07/28 xlockmore";
  * 30-Jul-97: Initial release, there is no algorithm to solve the puzzle,
  *            instead, it randomly shuffle the cube and then make the
  *            movements in the reverse order.
- *            The mode was written in 1 day (I got sick and had a license
- *            at work...) There was not much to do since I could not exit
- *            from home... :)
+ *            The mode was written in 1 day (I got sick and had the day off).
+ *            There was not much to do since I could not leave home... :)
  *
  */
 
@@ -65,37 +67,37 @@ static const char sccsid[] = "@(#)rubik.c   4.04 97/07/28 xlockmore";
  * =====================
  *
  *                       +------------+
- *                       |          22|
+ *                       |0-->        |
+ *                       ||           |
+ *                       |v           |
+ *                       |   TOP(0)   |
  *                       |            |
  *                       |            |
- *                       |   TOP(0)   |
- *                       |^           |
- *                       ||           |
- *                       |00-->       |
+ *                       |           8|
  *           +-----------+------------+-----------+
- *           |         22|          22|         22|
+ *           |0-->       |0-->        |0-->       |
+ *           ||          ||           ||          |
+ *           |v          |v           |v          |
+ *           |  LEFT(1)  |  FRONT(2)  |  RIGHT(3) |
  *           |           |            |           |
  *           |           |            |           |
- *           |  LEFT(1)  |  FRONT(2)  |  RIGHT(3) |
- *           |^          |^           |^          |
- *           ||          ||           ||          |
- *           |00-->      |00-->       |00-->      |
+ *           |          8|           8|          8|
  *           +-----------+------------+-----------+
- *                       |          22|
- *                       |            |
- *                       |            |
- *                       |  BOTTOM(4) |  rp->faces[N][X][Y]=
- *                       |^           |         F_[N][X][Y]=
- *                       ||           | 
- *                       |00-->       |         +---+---+---+
- *                       +------------+         |   |   |XY |
- *                       |          22|         |02 |12 |22 |
- *                       |            |         |---+---+---+
- *                       |            |         |  xxxxx(N) |
- *                       |   BACK(5)  |         |01 |11 |21 |
- *                       |^           |         +---+---+---+
- *                       ||           |         |XY |   |   |
- *                       |00-->       |         |00 |10 |20 |
+ *                       |0-->        |
+ *                       ||           |
+ *                       |v           |
+ *                       |  BOTTOM(4) |  rp->faces[N][X+AVSIZE*Y]=
+ *                       |            |         rp->cubeLoc[N][X+AVSIZE*Y]=
+ *                       |            | 
+ *                       |           8|         +---+---+---+
+ *                       +------------+         |   |   |   |
+ *                       |0-->        |         | 0 | 1 | 2 |
+ *                       ||           |         |---+---+---+
+ *                       |v           |         |  xxxxx(N) |
+ *                       |   BACK(5)  |         | 3 | 4 | 5 |
+ *                       |            |         +---+---+---+
+ *                       |            |         |   |   |  |
+ *                       |           8|         | 6 | 7 | 8 |
  *                       +------------+         +---+---+---+
  *
  *  Map to 3d
@@ -118,16 +120,16 @@ static const char sccsid[] = "@(#)rubik.c 4.04 97/07/28 xlockmore";
  * otherwise caddr_t is not defined correctly
  */
 #include <X11/Intrinsic.h>
-#include <string.h>
 
 #ifdef STANDALONE
 # define PROGCLASS     "Rubik"
 # define HACK_INIT     init_rubik
 # define HACK_DRAW     draw_rubik
 # define rubik_opts    xlockmore_opts
-# define DEFAULTS      "*delay: 50000 \n"              \
+# define DEFAULTS      "*delay: 40000 \n"              \
                                        "*count: -30 \n"                \
-                                       "*cycles: 5 \n"
+                                       "*cycles: 5 \n"                 \
+                                       "*size:  -6 \n"
 # include "xlockmore.h"                                /* from the xscreensaver distribution */
 #else /* !STANDALONE */
 # include "xlock.h"                                    /* from the xlockmore distribution */
@@ -158,9 +160,6 @@ static OptionStruct desc[] =
 ModeSpecOpt rubik_opts =
 {2, opts, 1, vars, desc};
 
-#define Scale4Window               0.3
-#define Scale4Iconic               0.7
-
 #define VectMul(X1,Y1,Z1,X2,Y2,Z2) (Y1)*(Z2)-(Z1)*(Y2),(Z1)*(X2)-(X1)*(Z2),(X1)*(Y2)-(Y1)*(X2)
 #define sqr(A)                     ((A)*(A))
 
@@ -168,16 +167,6 @@ ModeSpecOpt rubik_opts =
 #define Pi                         M_PI
 #endif
 
-#define NO_ROTATION    -1
-#define TOP_ROTATION    0
-#define LEFT_ROTATION   1
-#define FRONT_ROTATION  2
-#define RIGHT_ROTATION  3
-#define BOTTOM_ROTATION 4
-#define BACK_ROTATION   5
-
-#define CLOCK_WISE      0
-#define C_CLOCK_WISE    1
 
 #define ACTION_SOLVE    1
 #define ACTION_SHUFFLE  0
@@ -185,41 +174,203 @@ ModeSpecOpt rubik_opts =
 #define DELAY_AFTER_SHUFFLING  5
 #define DELAY_AFTER_SOLVING   20
 
-#define F_ rp->faces
-
 /*************************************************************************/
 
-/*-
- * Ignore trivial case, since it adds needless complications.
- * MAXSIZE must be 2 or greater.
- */
-
-#define MAXSIZEX 3
-#define MAXSIZEY 3
-#define MAXSIZEZ 3
-#define MAXSIZE (MAX(MAX(MAXSIZEX,MAXSIZEY),MAXSIZEZ))
+#define MINSIZE 2
+#ifdef LMN                     /* LxMxN not completed yet... */
+#define MAXSIZEX (rp->sizex)
+#define MAXSIZEY (rp->sizey)
+#define MAXSIZEZ (rp->sizez)
+#define AVSIZE (rp->avsize)
+#define MAXSIZE (rp->maxsize)
+#define AVSIZESQ (rp->avsizeSq)
+#define MAXSIZESQ (rp->maxsizeSq)
+#else
+#define MAXSIZEX (rp->size)
+#define MAXSIZEY (rp->size)
+#define MAXSIZEZ (rp->size)
+#define AVSIZE (rp->size)
+#define MAXSIZE (rp->size)
+#define AVSIZESQ (rp->sizeSq)
+#define MAXSIZESQ (rp->sizeSq)
+#endif
 #define MAXSIZEXY (MAXSIZEX*MAXSIZEY)
 #define MAXSIZEZY (MAXSIZEZ*MAXSIZEY)
 #define MAXSIZEXZ (MAXSIZEX*MAXSIZEZ)
-#define MAXSIZESQ (MAX(MAX(MAXSIZEXY,MAXSIZEZY),MAXSIZEXZ))
-#define LAST (MAXSIZE-1)
 #define LASTX (MAXSIZEX-1)
 #define LASTY (MAXSIZEY-1)
 #define LASTZ (MAXSIZEZ-1)
+/* These are not likely to change but... */
+#define FIRSTX 0
+#define FIRSTY 0
+#define FIRSTZ 0
+
+#define Scale4Window               (0.9/AVSIZE)
+#define Scale4Iconic               (2.1/AVSIZE)
+
+#define MAXORIENT 4            /* Number of orientations of a square */
+#define MAXFACES 6             /* Number of faces */
+
+/* Directions relative to the face of a cubie */
+#define TOP 0
+#define RIGHT 1
+#define BOTTOM 2
+#define LEFT 3
+#define CW (MAXORIENT+1)
+#define CCW (2*MAXORIENT-1)
+
+#define TOP_FACE 0
+#define LEFT_FACE 1
+#define FRONT_FACE 2
+#define RIGHT_FACE 3
+#define BOTTOM_FACE 4
+#define BACK_FACE 5
+#define NO_FACE (MAXFACES)
+#define NO_ROTATION (2*MAXORIENT)
+#define NO_DEPTH MAXSIZE
+
+#define REVX(a) (MAXSIZEX - a - 1)
+#define REVY(a) (MAXSIZEY - a - 1)
+#define REVZ(a) (MAXSIZEZ - a - 1)
+
+typedef struct _RubikLoc {
+       int         face;
+       int         rotation;   /* Not used yet */
+} RubikLoc;
+
+typedef struct _RubikRowNext {
+       int         face, direction, sideFace;
+} RubikRowNext;
+
+typedef struct _RubikMove {
+       int         face, direction;
+       int         position;
+} RubikMove;
+
+typedef struct _RubikSlice {
+       int         face, rotation;
+       int         depth;
+} RubikSlice;
+
+/*-
+ * Pick a face and a direction on face the next face and orientation
+ * is then known.
+ */
+static RubikLoc slideNextRow[MAXFACES][MAXORIENT] =
+{
+       {
+               {5, TOP},
+               {3, RIGHT},
+               {2, TOP},
+               {1, LEFT}},
+       {
+               {0, RIGHT},
+               {2, TOP},
+               {4, LEFT},
+               {5, BOTTOM}},
+       {
+               {0, TOP},
+               {3, TOP},
+               {4, TOP},
+               {1, TOP}},
+       {
+               {0, LEFT},
+               {5, BOTTOM},
+               {4, RIGHT},
+               {2, TOP}},
+       {
+               {2, TOP},
+               {3, LEFT},
+               {5, TOP},
+               {1, RIGHT}},
+       {
+               {4, TOP},
+               {3, BOTTOM},
+               {0, TOP},
+               {1, BOTTOM}}
+};
+
+/*-
+ * Examine cubie 0 on each face, its 4 movements (well only 2 since the
+ * other 2 will be opposites) and translate it into slice movements).
+ * Beware.. using this for NxNxN makes some assumptions that referenced
+ * cubes are along the diagonal top-left to bottom-right.
+ * CW = DEEP Depth CCW == SHALLOW Depth with reference to faces 0, 1, and 2
+ */
+static RubikLoc rotateSlice[MAXFACES][MAXORIENT / 2] =
+{
+       {
+               {1, CCW},
+               {2, CW},
+       },
+       {
+               {2, CW},
+               {0, CCW},
+       },
+       {
+               {1, CCW},
+               {0, CCW},
+       },
+       {
+               {2, CCW},
+               {0, CCW},
+       },
+       {
+               {1, CCW},
+               {2, CCW},
+       },
+       {
+               {1, CCW},
+               {0, CW},
+       }
+};
+
+/*-
+ * Rotate face clockwise by a number of orients, then the top of the
+ * face then points to this face
+ */
+static int  rowToRotate[MAXFACES][MAXORIENT] =
+{
+       {3, 2, 1, 5},
+       {2, 4, 5, 0},
+       {3, 4, 1, 0},
+       {5, 4, 2, 0},
+       {3, 5, 1, 2},
+       {3, 0, 1, 4}
+};
+
+/* 
+ * This translates a clockwise move to something more manageable
+ */
+static RubikRowNext rotateToRow[MAXFACES] =    /*CW to min face */
+{
+       {1, LEFT, TOP},
+       {0, BOTTOM, LEFT},
+       {0, RIGHT, BOTTOM},
+       {0, TOP, RIGHT},
+       {1, RIGHT, BOTTOM},
+       {0, LEFT, TOP}
+};
 
 typedef struct {
        GLint       WindH, WindW;
        GLfloat     step;
-       char       *movedfaces;
-       char       *movedorient;
+       RubikMove  *moves;
        int         storedmoves;
        int         shufflingmoves;
+#ifdef LMN                     /* Under construction */
+       int         sizex, sizey, sizez;
+       int         avsize, maxsize;
+       int         avsizeSq, maxsizeSq;
+#else
+       int         size, sizeSq;
+#endif
        int         action;
        int         done;
        GLfloat     anglestep;
-       char        faces[6][MAXSIZE][MAXSIZE];
-       int         movement;
-       int         orientation;
+       RubikLoc   *cubeLoc[MAXFACES];
+       RubikLoc   *rowLoc[MAXORIENT];
+       RubikMove   movement;
        GLfloat     rotatestep;
        GLXContext  glx_context;
        int         AreObjectsDefined[1];
@@ -251,7 +402,7 @@ static float MaterialBlue[] =
 static float MaterialYellow[] =
 {0.7, 0.7, 0.0, 1.0};
 static float MaterialOrange[] =
-{1.0, 0.5, 0.4, 1.0};
+{0.9, 0.45, 0.36, 1.0};
 
 #if 0
 static float MaterialMagenta[] =
@@ -264,6 +415,16 @@ static float MaterialWhite[] =
 {0.8, 0.8, 0.8, 1.0};
 static float MaterialGray[] =
 {0.2, 0.2, 0.2, 1.0};
+static float MaterialGray3[] =
+{0.3, 0.3, 0.3, 1.0};
+static float MaterialGray4[] =
+{0.4, 0.4, 0.4, 1.0};
+static float MaterialGray5[] =
+{0.5, 0.5, 0.5, 1.0};
+static float MaterialGray6[] =
+{0.6, 0.6, 0.6, 1.0};
+static float MaterialGray7[] =
+{0.7, 0.7, 0.7, 1.0};
 
 static rubikstruct *rubik = NULL;
 static GLuint objects;
@@ -271,43 +432,56 @@ static GLuint objects;
 #define ObjCubit        0
 
 static void
-pickcolor(char C)
+pickcolor(int C, int mono)
 {
        switch (C) {
-               case 'R':
-                       glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialRed);
+               case TOP_FACE:
+                       if (mono)
+                               glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialGray3);
+                       else
+                               glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialRed);
+                       break;
+               case LEFT_FACE:
+                       if (mono)
+                               glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialGray6);
+                       else
+                               glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialYellow);
+                       break;
+               case FRONT_FACE:
+                       glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialWhite);
                        break;
-               case 'G':
-                       glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialGreen);
+               case RIGHT_FACE:
+                       if (mono)
+                               glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialGray4);
+                       else
+                               glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialGreen);
                        break;
-               case 'B':
-                       glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialBlue);
+               case BOTTOM_FACE:
+                       if (mono)
+                               glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialGray7);
+                       else
+                               glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialOrange);
                        break;
-               case 'Y':
-                       glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialYellow);
+               case BACK_FACE:
+                       if (mono)
+                               glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialGray5);
+                       else
+                               glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialBlue);
                        break;
 #if 0
-               case 'C':
                        glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialCyan);
-                       break;
-               case 'M':
                        glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialMagenta);
-                       break;
-#else
-               case 'O':
-                       glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialOrange);
-                       break;
-               case 'W':
-                       glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialWhite);
-                       break;
 #endif
        }
 }
 
+
 static void
-draw_cubit(ModeInfo * mi, char BACK, char FRONT, char LEFT, char RIGHT, char BOTTOM, char TOP)
+draw_cubit(ModeInfo * mi,
+          int back, int front, int left, int right, int bottom, int top)
 {
        rubikstruct *rp = &rubik[MI_SCREEN(mi)];
+       int         mono = MI_WIN_IS_MONO(mi);
 
        if (!rp->AreObjectsDefined[ObjCubit]) {
                glNewList(objects + ObjCubit, GL_COMPILE_AND_EXECUTE);
@@ -451,9 +625,9 @@ draw_cubit(ModeInfo * mi, char BACK, char FRONT, char LEFT, char RIGHT, char BOT
 #endif
        }
 
-       if (BACK != ' ') {
+       if (back != NO_FACE) {
                glBegin(GL_POLYGON);
-               pickcolor(BACK);
+               pickcolor(back, mono);
                glNormal3f(0.00, 0.00, -1.00);
                glVertex3f(-0.35, 0.40, -0.51);
                glVertex3f(0.35, 0.40, -0.51);
@@ -465,9 +639,9 @@ draw_cubit(ModeInfo * mi, char BACK, char FRONT, char LEFT, char RIGHT, char BOT
                glVertex3f(-0.40, 0.35, -0.51);
                glEnd();
        }
-       if (FRONT != ' ') {
+       if (front != NO_FACE) {
                glBegin(GL_POLYGON);
-               pickcolor(FRONT);
+               pickcolor(front, mono);
                glNormal3f(0.00, 0.00, 1.00);
                glVertex3f(-0.35, -0.40, 0.51);
                glVertex3f(0.35, -0.40, 0.51);
@@ -479,9 +653,9 @@ draw_cubit(ModeInfo * mi, char BACK, char FRONT, char LEFT, char RIGHT, char BOT
                glVertex3f(-0.40, -0.35, 0.51);
                glEnd();
        }
-       if (LEFT != ' ') {
+       if (left != NO_FACE) {
                glBegin(GL_POLYGON);
-               pickcolor(LEFT);
+               pickcolor(left, mono);
                glNormal3f(-1.00, 0.00, 0.00);
                glVertex3f(-0.51, -0.35, 0.40);
                glVertex3f(-0.51, 0.35, 0.40);
@@ -493,9 +667,9 @@ draw_cubit(ModeInfo * mi, char BACK, char FRONT, char LEFT, char RIGHT, char BOT
                glVertex3f(-0.51, -0.40, 0.35);
                glEnd();
        }
-       if (RIGHT != ' ') {
+       if (right != NO_FACE) {
                glBegin(GL_POLYGON);
-               pickcolor(RIGHT);
+               pickcolor(right, mono);
                glNormal3f(1.00, 0.00, 0.00);
                glVertex3f(0.51, -0.35, -0.40);
                glVertex3f(0.51, 0.35, -0.40);
@@ -507,9 +681,9 @@ draw_cubit(ModeInfo * mi, char BACK, char FRONT, char LEFT, char RIGHT, char BOT
                glVertex3f(0.51, -0.40, -0.35);
                glEnd();
        }
-       if (BOTTOM != ' ') {
+       if (bottom != NO_FACE) {
                glBegin(GL_POLYGON);
-               pickcolor(BOTTOM);
+               pickcolor(bottom, mono);
                glNormal3f(0.00, -1.00, 0.00);
                glVertex3f(0.40, -0.51, -0.35);
                glVertex3f(0.40, -0.51, 0.35);
@@ -521,9 +695,9 @@ draw_cubit(ModeInfo * mi, char BACK, char FRONT, char LEFT, char RIGHT, char BOT
                glVertex3f(0.35, -0.51, -0.40);
                glEnd();
        }
-       if (TOP != ' ') {
+       if (top != NO_FACE) {
                glBegin(GL_POLYGON);
-               pickcolor(TOP);
+               pickcolor(top, mono);
                glNormal3f(0.00, 1.00, 0.00);
                glVertex3f(-0.40, 0.51, -0.35);
                glVertex3f(-0.40, 0.51, 0.35);
@@ -538,647 +712,857 @@ draw_cubit(ModeInfo * mi, char BACK, char FRONT, char LEFT, char RIGHT, char BOT
        glEnd();
 }
 
+
+static      RubikSlice
+convertMove(rubikstruct * rp, RubikMove move)
+{
+       RubikSlice  slice;
+       RubikLoc    plane;
+
+       plane = rotateSlice[(int) move.face][move.direction % 2];
+       slice.face = plane.face;
+       slice.rotation = plane.rotation;
+       if (slice.rotation == CW)       /* I just know this to be true... */
+               slice.depth = AVSIZESQ - 1 - move.position;
+       else
+               slice.depth = move.position;
+       slice.depth = slice.depth / AVSIZE;
+       /* If slice.depth = 0 then face 0, face 1, or face 2 moves */
+       if (move.direction / 2)
+               slice.rotation = (plane.rotation == CW) ? CCW : CW;
+       return slice;
+}
+
+/* Assume for the moment that the size is at least 2 */
 static void
 draw_cube(ModeInfo * mi)
 {
 #define S1 1
-#define S2 (S1*2)
+#define SX ((GLint)S1*(MAXSIZEX-1))
+#define SY ((GLint)S1*(MAXSIZEY-1))
+#define SZ ((GLint)S1*(MAXSIZEZ-1))
+#define HALFX (((GLfloat)MAXSIZEX-1.0)/2.0)
+#define HALFY (((GLfloat)MAXSIZEY-1.0)/2.0)
+#define HALFZ (((GLfloat)MAXSIZEZ-1.0)/2.0)
+#define MIDX(a) (((GLfloat)(2*a-MAXSIZEX+1))/2.0)
+#define MIDY(a) (((GLfloat)(2*a-MAXSIZEY+1))/2.0)
+#define MIDZ(a) (((GLfloat)(2*a-MAXSIZEZ+1))/2.0)
        rubikstruct *rp = &rubik[MI_SCREEN(mi)];
+       RubikSlice  slice;
+       GLfloat     rotatestep;
+       int         i, j, k;
 
-       switch (rp->movement) {
-               case NO_ROTATION:
-               case BACK_ROTATION:
-               case FRONT_ROTATION:
-                       glPushMatrix();
-                       if (rp->movement == BACK_ROTATION)
-                               glRotatef(-rp->rotatestep, 0, 0, 1);
-                       glTranslatef(-S1, -S1, -S1);
-                       draw_cubit(mi, F_[BACK_ROTATION][0][LAST], ' ',
-                                  F_[LEFT_ROTATION][0][0], ' ',
-                                  F_[BOTTOM_ROTATION][0][0], ' ');
-                       glTranslatef(S1, 0, 0);
-                       draw_cubit(mi, F_[BACK_ROTATION][1][LAST], ' ',
-                                  ' ', ' ',
-                                  F_[BOTTOM_ROTATION][1][0], ' ');
-                       glTranslatef(S1, 0, 0);
-                       draw_cubit(mi, F_[BACK_ROTATION][LAST][LAST], ' ',
-                                  ' ', F_[RIGHT_ROTATION][LAST][0],
-                                  F_[BOTTOM_ROTATION][LAST][0], ' ');
-                       glTranslatef(-S2, S1, 0);
-                       draw_cubit(mi, F_[BACK_ROTATION][0][1], ' ',
-                                  F_[LEFT_ROTATION][0][1], ' ',
-                                  ' ', ' ');
-                       glTranslatef(S1, 0, 0);
-                       draw_cubit(mi, F_[BACK_ROTATION][1][1], ' ',
-                                  ' ', ' ',
-                                  ' ', ' ');
-                       glTranslatef(S1, 0, 0);
-                       draw_cubit(mi, F_[BACK_ROTATION][LAST][1], ' ',
-                                  ' ', F_[RIGHT_ROTATION][LAST][1],
-                                  ' ', ' ');
-                       glTranslatef(-S2, S1, 0);
-                       draw_cubit(mi, F_[BACK_ROTATION][0][0], ' ',
-                                  F_[LEFT_ROTATION][0][LAST], ' ',
-                                  ' ', F_[TOP_ROTATION][0][LAST]);
-                       glTranslatef(S1, 0, 0);
-                       draw_cubit(mi, F_[BACK_ROTATION][1][0], ' ',
-                                  ' ', ' ',
-                                  ' ', F_[TOP_ROTATION][1][LAST]);
-                       glTranslatef(S1, 0, 0);
-                       draw_cubit(mi, F_[BACK_ROTATION][LAST][0], ' ',
-                                  ' ', F_[RIGHT_ROTATION][LAST][LAST],
-                                  ' ', F_[TOP_ROTATION][LAST][LAST]);
-                       glPopMatrix();
+       if (rp->movement.face == NO_FACE) {
+               slice.face = NO_FACE;
+               slice.rotation = NO_ROTATION;
+               slice.depth = NO_DEPTH;
+       } else {
+               slice = convertMove(rp, rp->movement);
+       }
+       rotatestep = (slice.rotation == CCW) ? rp->rotatestep : -rp->rotatestep;
+
+/*-
+ * The glRotatef() routine transforms the coordinate system for every future
+ * vertex specification (this is not so simple, but by now comprehending this
+ * is sufficient). So if you want to rotate the inner slice, you can draw
+ * one slice, rotate the anglestep for the centerslice, draw the inner slice,
+ * rotate reversely and draw the other slice.
+ * There is a sequence for drawing cubies for each axis being moved...
+ */
+       switch (slice.face) {
+               case NO_FACE:
+               case TOP_FACE:  /* BOTTOM_FACE too */
                        glPushMatrix();
-                       glTranslatef(-S1, -S1, 0);
-                       draw_cubit(mi, ' ', ' ',
-                                  F_[LEFT_ROTATION][1][0], ' ',
-                                  F_[BOTTOM_ROTATION][0][1], ' ');
-                       glTranslatef(S1, 0, 0);
-                       draw_cubit(mi, ' ', ' ',
-                                  ' ', ' ',
-                                  F_[BOTTOM_ROTATION][1][1], ' ');
-                       glTranslatef(S1, 0, 0);
-                       draw_cubit(mi, ' ', ' ',
-                                  ' ', F_[RIGHT_ROTATION][1][0],
-                                  F_[BOTTOM_ROTATION][LAST][1], ' ');
-                       glTranslatef(-S2, S1, 0);
-                       draw_cubit(mi, ' ', ' ',
-                                  F_[LEFT_ROTATION][1][1], ' ',
-                                  ' ', ' ');
-                       glTranslatef(2, 0, 0);
-                       draw_cubit(mi, ' ', ' ',
-                                  ' ', F_[RIGHT_ROTATION][1][1],
-                                  ' ', ' ');
-                       glTranslatef(-S2, S1, 0);
-                       draw_cubit(mi, ' ', ' ',
-                                  F_[LEFT_ROTATION][1][LAST], ' ',
-                                  ' ', F_[TOP_ROTATION][0][1]);
-                       glTranslatef(S1, 0, 0);
-                       draw_cubit(mi, ' ', ' ',
-                                  ' ', ' ',
-                                  ' ', F_[TOP_ROTATION][1][1]);
-                       glTranslatef(S1, 0, 0);
-                       draw_cubit(mi, ' ', ' ',
-                                  ' ', F_[RIGHT_ROTATION][1][LAST],
-                                  ' ', F_[TOP_ROTATION][LAST][1]);
+                       if (slice.depth == MAXSIZEY - 1)
+                               glRotatef(rotatestep, 0, HALFY, 0);
+
+                       glTranslatef(-HALFX, -HALFY, -HALFZ);
+                       draw_cubit(mi,
+                                  rp->cubeLoc[BACK_FACE][FIRSTX + MAXSIZEX * FIRSTY].face, NO_FACE,
+                                  rp->cubeLoc[LEFT_FACE][FIRSTZ + MAXSIZEZ * LASTY].face, NO_FACE,
+                                  rp->cubeLoc[BOTTOM_FACE][FIRSTX + MAXSIZEX * LASTZ].face, NO_FACE);
+                       for (k = 1; k < MAXSIZEZ - 1; k++) {
+                               glTranslatef(0, 0, S1);
+                               draw_cubit(mi,
+                                          NO_FACE, NO_FACE,
+                                          rp->cubeLoc[LEFT_FACE][k + MAXSIZEZ * LASTY].face, NO_FACE,
+                                          rp->cubeLoc[BOTTOM_FACE][FIRSTX + MAXSIZEX * REVZ(k)].face, NO_FACE);
+                       }
+                       glTranslatef(0, 0, S1);
+                       draw_cubit(mi,
+                                  NO_FACE, rp->cubeLoc[FRONT_FACE][FIRSTX + MAXSIZEX * LASTY].face,
+                                  rp->cubeLoc[LEFT_FACE][LASTZ + MAXSIZEZ * LASTY].face, NO_FACE,
+                                  rp->cubeLoc[BOTTOM_FACE][FIRSTX + MAXSIZEX * FIRSTZ].face, NO_FACE);
+                       for (i = 1; i < MAXSIZEX - 1; i++) {
+                               glTranslatef(S1, 0, -SZ);
+                               draw_cubit(mi,
+                                          rp->cubeLoc[BACK_FACE][i + MAXSIZEX * FIRSTY].face, NO_FACE,
+                                          NO_FACE, NO_FACE,
+                                          rp->cubeLoc[BOTTOM_FACE][i + MAXSIZEX * LASTZ].face, NO_FACE);
+                               for (k = 1; k < MAXSIZEZ - 1; k++) {
+                                       glTranslatef(0, 0, S1);
+                                       draw_cubit(mi,
+                                                  NO_FACE, NO_FACE,
+                                                  NO_FACE, NO_FACE,
+                                                  rp->cubeLoc[BOTTOM_FACE][i + MAXSIZEX * REVZ(k)].face, NO_FACE);
+                               }
+                               glTranslatef(0, 0, S1);
+                               draw_cubit(mi,
+                                          NO_FACE, rp->cubeLoc[FRONT_FACE][i + MAXSIZEX * LASTY].face,
+                                          NO_FACE, NO_FACE,
+                                          rp->cubeLoc[BOTTOM_FACE][i + MAXSIZEX * FIRSTZ].face, NO_FACE);
+                       }
+                       glTranslatef(1, 0, -SZ);
+                       draw_cubit(mi,
+                                  rp->cubeLoc[BACK_FACE][LASTX + MAXSIZEX * FIRSTY].face, NO_FACE,
+                                  NO_FACE, rp->cubeLoc[RIGHT_FACE][LASTZ + MAXSIZEZ * LASTY].face,
+                                  rp->cubeLoc[BOTTOM_FACE][LASTX + MAXSIZEX * LASTZ].face, NO_FACE);
+                       for (k = 1; k < MAXSIZEZ - 1; k++) {
+                               glTranslatef(0, 0, S1);
+                               draw_cubit(mi,
+                                          NO_FACE, NO_FACE,
+                                          NO_FACE, rp->cubeLoc[RIGHT_FACE][REVZ(k) + MAXSIZEZ * LASTY].face,
+                                          rp->cubeLoc[BOTTOM_FACE][LASTX + MAXSIZEX * REVZ(k)].face, NO_FACE);
+                       }
+                       glTranslatef(0, 0, S1);
+                       draw_cubit(mi,
+                                  NO_FACE, rp->cubeLoc[FRONT_FACE][LASTX + MAXSIZEX * LASTY].face,
+                                  NO_FACE, rp->cubeLoc[RIGHT_FACE][FIRSTZ + MAXSIZEZ * LASTY].face,
+                                  rp->cubeLoc[BOTTOM_FACE][LASTX + MAXSIZEX * FIRSTZ].face, NO_FACE);
                        glPopMatrix();
-                       if (rp->movement == FRONT_ROTATION)
-                               glRotatef(rp->rotatestep, 0, 0, 1);
-                       glTranslatef(-S1, -S1, S1);
-                       draw_cubit(mi, ' ', F_[FRONT_ROTATION][0][0],
-                                  F_[LEFT_ROTATION][LAST][0], ' ',
-                                  F_[BOTTOM_ROTATION][0][LAST], ' ');
-                       glTranslatef(S1, 0, 0);
-                       draw_cubit(mi, ' ', F_[FRONT_ROTATION][1][0],
-                                  ' ', ' ',
-                                  F_[BOTTOM_ROTATION][1][LAST], ' ');
-                       glTranslatef(S1, 0, 0);
-                       draw_cubit(mi, ' ', F_[FRONT_ROTATION][LASTX][0],
-                                  ' ', F_[RIGHT_ROTATION][0][0],
-                                  F_[BOTTOM_ROTATION][LAST][LAST], ' ');
-                       glTranslatef(-S2, S1, 0);
-                       draw_cubit(mi, ' ', F_[FRONT_ROTATION][0][1],
-                                  F_[LEFT_ROTATION][LAST][1], ' ',
-                                  ' ', ' ');
-                       glTranslatef(S1, 0, 0);
-                       draw_cubit(mi, ' ', F_[FRONT_ROTATION][1][1],
-                                  ' ', ' ',
-                                  ' ', ' ');
-                       glTranslatef(S1, 0, 0);
-                       draw_cubit(mi, ' ', F_[FRONT_ROTATION][LASTX][1],
-                                  ' ', F_[RIGHT_ROTATION][0][1],
-                                  ' ', ' ');
-                       glTranslatef(-S2, S1, 0);
-                       draw_cubit(mi, ' ', F_[FRONT_ROTATION][0][LASTY],
-                                  F_[LEFT_ROTATION][LAST][LAST], ' ',
-                                  ' ', F_[TOP_ROTATION][0][0]);
-                       glTranslatef(S1, 0, 0);
-                       draw_cubit(mi, ' ', F_[FRONT_ROTATION][1][LASTY],
-                                  ' ', ' ',
-                                  ' ', F_[TOP_ROTATION][1][0]);
-                       glTranslatef(S1, 0, 0);
-                       draw_cubit(mi, ' ', F_[FRONT_ROTATION][LASTX][LASTY],
-                                  ' ', F_[RIGHT_ROTATION][0][LAST],
-                                  ' ', F_[TOP_ROTATION][LAST][0]);
+                       for (j = 1; j < MAXSIZEY - 1; j++) {
+                               glPushMatrix();
+                               if (slice.depth == REVY(j))
+                                       glRotatef(rotatestep, 0, HALFY, 0);
+                               glTranslatef(-HALFX, MIDY(j), -HALFZ);
+                               draw_cubit(mi,
+                                          rp->cubeLoc[BACK_FACE][FIRSTX + MAXSIZEX * j].face, NO_FACE,
+                                          rp->cubeLoc[LEFT_FACE][FIRSTZ + MAXSIZEZ * REVY(j)].face, NO_FACE,
+                                          NO_FACE, NO_FACE);
+                               for (k = 1; k < MAXSIZEZ - 1; k++) {
+                                       glTranslatef(0, 0, S1);
+                                       draw_cubit(mi,
+                                                  NO_FACE, NO_FACE,
+                                                  rp->cubeLoc[LEFT_FACE][k + MAXSIZEZ * REVY(j)].face, NO_FACE,
+                                                  NO_FACE, NO_FACE);
+                               }
+                               glTranslatef(0, 0, S1);
+                               draw_cubit(mi,
+                                          NO_FACE, rp->cubeLoc[FRONT_FACE][FIRSTX + MAXSIZEX * REVY(j)].face,
+                                          rp->cubeLoc[LEFT_FACE][LASTZ + MAXSIZEZ * REVY(j)].face, NO_FACE,
+                                          NO_FACE, NO_FACE);
+                               for (i = 1; i < MAXSIZEX - 1; i++) {
+                                       glTranslatef(1, 0, -SZ);
+                                       draw_cubit(mi,
+                                                  rp->cubeLoc[BACK_FACE][i + MAXSIZEX * j].face, NO_FACE,
+                                                  NO_FACE, NO_FACE,
+                                                  NO_FACE, NO_FACE);
+                                       /* Center */
+                                       glTranslatef(0, 0, SZ);
+                                       draw_cubit(mi,
+                                                  NO_FACE, rp->cubeLoc[FRONT_FACE][i + MAXSIZEX * REVY(j)].face,
+                                                  NO_FACE, NO_FACE,
+                                                  NO_FACE, NO_FACE);
+                               }
+                               glTranslatef(S1, 0, -SZ);
+                               draw_cubit(mi,
+                                          rp->cubeLoc[BACK_FACE][LASTX + MAXSIZEX * j].face, NO_FACE,
+                                          NO_FACE, rp->cubeLoc[RIGHT_FACE][LASTZ + MAXSIZEZ * REVY(j)].face,
+                                          NO_FACE, NO_FACE);
+                               for (k = 1; k < MAXSIZEZ - 1; k++) {
+                                       glTranslatef(0, 0, S1);
+                                       draw_cubit(mi,
+                                                  NO_FACE, NO_FACE,
+                                                  NO_FACE, rp->cubeLoc[RIGHT_FACE][REVZ(k) + MAXSIZEZ * REVY(j)].face,
+                                                  NO_FACE, NO_FACE);
+                               }
+                               glTranslatef(0, 0, S1);
+                               draw_cubit(mi,
+                                          NO_FACE, rp->cubeLoc[FRONT_FACE][LASTX + MAXSIZEX * REVY(j)].face,
+                                          NO_FACE, rp->cubeLoc[RIGHT_FACE][FIRSTZ + MAXSIZEZ * REVY(j)].face,
+                                          NO_FACE, NO_FACE);
+                               glPopMatrix();
+                       }
+                       if (slice.depth == 0)
+                               glRotatef(rotatestep, 0, HALFY, 0);
+
+                       glTranslatef(-HALFX, HALFY, -HALFZ);
+                       draw_cubit(mi,
+                                  rp->cubeLoc[BACK_FACE][FIRSTX + MAXSIZEX * LASTY].face, NO_FACE,
+                                  rp->cubeLoc[LEFT_FACE][FIRSTZ + MAXSIZEZ * FIRSTY].face, NO_FACE,
+                                  NO_FACE, rp->cubeLoc[TOP_FACE][FIRSTX + MAXSIZEX * FIRSTZ].face);
+                       for (k = 1; k < MAXSIZEZ - 1; k++) {
+                               glTranslatef(0, 0, S1);
+                               draw_cubit(mi,
+                                          NO_FACE, NO_FACE,
+                                          rp->cubeLoc[LEFT_FACE][k + MAXSIZEZ * FIRSTY].face, NO_FACE,
+                                          NO_FACE, rp->cubeLoc[TOP_FACE][FIRSTX + MAXSIZEX * k].face);
+                       }
+                       glTranslatef(0, 0, S1);
+                       draw_cubit(mi,
+                                  NO_FACE, rp->cubeLoc[FRONT_FACE][FIRSTX + MAXSIZEX * FIRSTY].face,
+                                  rp->cubeLoc[LEFT_FACE][LASTZ + MAXSIZEZ * FIRSTY].face, NO_FACE,
+                                  NO_FACE, rp->cubeLoc[TOP_FACE][FIRSTX + MAXSIZEX * LASTZ].face);
+                       for (i = 1; i < MAXSIZEX - 1; i++) {
+                               glTranslatef(S1, 0, -SZ);
+                               draw_cubit(mi,
+                                          rp->cubeLoc[BACK_FACE][i + MAXSIZEX * LASTY].face, NO_FACE,
+                                          NO_FACE, NO_FACE,
+                                          NO_FACE, rp->cubeLoc[TOP_FACE][i + MAXSIZEX * FIRSTZ].face);
+                               for (k = 1; k < MAXSIZEZ - 1; k++) {
+                                       glTranslatef(0, 0, S1);
+                                       draw_cubit(mi,
+                                                  NO_FACE, NO_FACE,
+                                                  NO_FACE, NO_FACE,
+                                                  NO_FACE, rp->cubeLoc[TOP_FACE][i + MAXSIZEX * k].face);
+                               }
+                               glTranslatef(0, 0, S1);
+                               draw_cubit(mi,
+                                          NO_FACE, rp->cubeLoc[FRONT_FACE][i + MAXSIZEX * FIRSTY].face,
+                                          NO_FACE, NO_FACE,
+                                          NO_FACE, rp->cubeLoc[TOP_FACE][i + MAXSIZEX * LASTZ].face);
+                       }
+                       glTranslatef(S1, 0, -SZ);
+                       draw_cubit(mi,
+                                  rp->cubeLoc[BACK_FACE][LASTX + MAXSIZEX * LASTY].face, NO_FACE,
+                                  NO_FACE, rp->cubeLoc[RIGHT_FACE][LASTZ + MAXSIZEZ * FIRSTY].face,
+                                  NO_FACE, rp->cubeLoc[TOP_FACE][LASTX + MAXSIZEX * FIRSTZ].face);
+                       for (k = 1; k < MAXSIZEZ - 1; k++) {
+                               glTranslatef(0, 0, S1);
+                               draw_cubit(mi,
+                                          NO_FACE, NO_FACE,
+                                          NO_FACE, rp->cubeLoc[RIGHT_FACE][REVZ(k) + MAXSIZEZ * FIRSTY].face,
+                                          NO_FACE, rp->cubeLoc[TOP_FACE][LASTX + MAXSIZEX * k].face);
+                       }
+                       glTranslatef(0, 0, S1);
+                       draw_cubit(mi,
+                                  NO_FACE, rp->cubeLoc[FRONT_FACE][LASTX + MAXSIZEX * FIRSTY].face,
+                                  NO_FACE, rp->cubeLoc[RIGHT_FACE][FIRSTZ + MAXSIZEZ * FIRSTY].face,
+                                  NO_FACE, rp->cubeLoc[TOP_FACE][LASTX + MAXSIZEX * LASTZ].face);
                        break;
-               case LEFT_ROTATION:
-               case RIGHT_ROTATION:
+               case LEFT_FACE: /* RIGHT_FACE too */
+                       /* rotatestep is negative because the RIGHT face is the default here */
                        glPushMatrix();
-                       if (rp->movement == LEFT_ROTATION)
-                               glRotatef(-rp->rotatestep, 1, 0, 0);
-                       glTranslatef(-S1, -S1, -S1);
-                       draw_cubit(mi, F_[BACK_ROTATION][0][LAST], ' ',
-                                  F_[LEFT_ROTATION][0][0], ' ',
-                                  F_[BOTTOM_ROTATION][0][0], ' ');
-                       glTranslatef(0, S1, 0);
-                       draw_cubit(mi, F_[BACK_ROTATION][0][1], ' ',
-                                  F_[LEFT_ROTATION][0][1], ' ',
-                                  ' ', ' ');
-                       glTranslatef(0, S1, 0);
-                       draw_cubit(mi, F_[BACK_ROTATION][0][0], ' ',
-                                  F_[LEFT_ROTATION][0][LAST], ' ',
-                                  ' ', F_[TOP_ROTATION][0][LAST]);
-                       glTranslatef(0, -S2, S1);
-                       draw_cubit(mi, ' ', ' ',
-                                  F_[LEFT_ROTATION][1][0], ' ',
-                                  F_[BOTTOM_ROTATION][0][1], ' ');
-                       glTranslatef(0, S1, 0);
-                       draw_cubit(mi, ' ', ' ',
-                                  F_[LEFT_ROTATION][1][1], ' ',
-                                  ' ', ' ');
-                       glTranslatef(0, S1, 0);
-                       draw_cubit(mi, ' ', ' ',
-                                  F_[LEFT_ROTATION][1][LAST], ' ',
-                                  ' ', F_[TOP_ROTATION][0][1]);
-                       glTranslatef(0, -S2, S1);
-                       draw_cubit(mi, ' ', F_[FRONT_ROTATION][0][0],
-                                  F_[LEFT_ROTATION][LAST][0], ' ',
-                                  F_[BOTTOM_ROTATION][0][LAST], ' ');
-                       glTranslatef(0, S1, 0);
-                       draw_cubit(mi, ' ', F_[FRONT_ROTATION][0][1],
-                                  F_[LEFT_ROTATION][LAST][1], ' ',
-                                  ' ', ' ');
-                       glTranslatef(0, S1, 0);
-                       draw_cubit(mi, ' ', F_[FRONT_ROTATION][0][LASTY],
-                                  F_[LEFT_ROTATION][LAST][LAST], ' ',
-                                  ' ', F_[TOP_ROTATION][0][0]);
-                       glPopMatrix();
-                       glPushMatrix();
-                       glTranslatef(0, -S1, -S1);
-                       draw_cubit(mi, F_[BACK_ROTATION][1][LAST], ' ',
-                                  ' ', ' ',
-                                  F_[BOTTOM_ROTATION][1][0], ' ');
-                       glTranslatef(0, S1, 0);
-                       draw_cubit(mi, F_[BACK_ROTATION][1][1], ' ',
-                                  ' ', ' ',
-                                  ' ', ' ');
-                       glTranslatef(0, S1, 0);
-                       draw_cubit(mi, F_[BACK_ROTATION][1][0], ' ',
-                                  ' ', ' ',
-                                  ' ', F_[TOP_ROTATION][1][LAST]);
-                       glTranslatef(0, -S2, S1);
-                       draw_cubit(mi, ' ', ' ',
-                                  ' ', ' ',
-                                  F_[BOTTOM_ROTATION][1][1], ' ');
-                       glTranslatef(0, S2, 0);
-                       draw_cubit(mi, ' ', ' ',
-                                  ' ', ' ',
-                                  ' ', F_[TOP_ROTATION][1][1]);
-                       glTranslatef(0, -S2, S1);
-                       draw_cubit(mi, ' ', F_[FRONT_ROTATION][1][0],
-                                  ' ', ' ',
-                                  F_[BOTTOM_ROTATION][1][LAST], ' ');
+                       if (slice.depth == 0)
+                               glRotatef(-rotatestep, HALFX, 0, 0);
+
+                       glTranslatef(-HALFX, -HALFY, -HALFZ);
+                       draw_cubit(mi,
+                                  rp->cubeLoc[BACK_FACE][FIRSTX + MAXSIZEX * FIRSTY].face, NO_FACE,
+                                  rp->cubeLoc[LEFT_FACE][FIRSTZ + MAXSIZEZ * LASTY].face, NO_FACE,
+                                  rp->cubeLoc[BOTTOM_FACE][FIRSTX + MAXSIZEX * LASTZ].face, NO_FACE);
+                       for (j = 1; j < MAXSIZEY - 1; j++) {
+                               glTranslatef(0, S1, 0);
+                               draw_cubit(mi,
+                                          rp->cubeLoc[BACK_FACE][FIRSTX + MAXSIZEX * j].face, NO_FACE,
+                                          rp->cubeLoc[LEFT_FACE][FIRSTZ + MAXSIZEZ * REVY(j)].face, NO_FACE,
+                                          NO_FACE, NO_FACE);
+                       }
                        glTranslatef(0, S1, 0);
-                       draw_cubit(mi, ' ', F_[FRONT_ROTATION][1][1],
-                                  ' ', ' ',
-                                  ' ', ' ');
+                       draw_cubit(mi,
+                                  rp->cubeLoc[BACK_FACE][FIRSTX + MAXSIZEX * LASTY].face, NO_FACE,
+                                  rp->cubeLoc[LEFT_FACE][FIRSTZ + MAXSIZEZ * FIRSTY].face, NO_FACE,
+                                  NO_FACE, rp->cubeLoc[TOP_FACE][FIRSTX + MAXSIZEX * FIRSTZ].face);
+                       for (k = 1; k < MAXSIZEZ - 1; k++) {
+                               glTranslatef(0, -SY, S1);
+                               draw_cubit(mi,
+                                          NO_FACE, NO_FACE,
+                                          rp->cubeLoc[LEFT_FACE][k + MAXSIZEZ * LASTY].face, NO_FACE,
+                                          rp->cubeLoc[BOTTOM_FACE][FIRSTX + MAXSIZEX * REVZ(k)].face, NO_FACE);
+                               for (j = 1; j < MAXSIZEY - 1; j++) {
+                                       glTranslatef(0, S1, 0);
+                                       draw_cubit(mi,
+                                                  NO_FACE, NO_FACE,
+                                                  rp->cubeLoc[LEFT_FACE][k + MAXSIZEZ * REVY(j)].face, NO_FACE,
+                                                  NO_FACE, NO_FACE);
+                               }
+                               glTranslatef(0, S1, 0);
+                               draw_cubit(mi,
+                                          NO_FACE, NO_FACE,
+                                          rp->cubeLoc[LEFT_FACE][k + MAXSIZEZ * FIRSTY].face, NO_FACE,
+                                          NO_FACE, rp->cubeLoc[TOP_FACE][FIRSTX + MAXSIZEX * k].face);
+                       }
+                       glTranslatef(0, -SY, S1);
+                       draw_cubit(mi,
+                                  NO_FACE, rp->cubeLoc[FRONT_FACE][FIRSTX + MAXSIZEX * LASTY].face,
+                                  rp->cubeLoc[LEFT_FACE][LASTZ + MAXSIZEZ * LASTY].face, NO_FACE,
+                                  rp->cubeLoc[BOTTOM_FACE][FIRSTX + MAXSIZEX * FIRSTZ].face, NO_FACE);
+                       for (j = 1; j < MAXSIZEY - 1; j++) {
+                               glTranslatef(0, S1, 0);
+                               draw_cubit(mi,
+                                          NO_FACE, rp->cubeLoc[FRONT_FACE][FIRSTX + MAXSIZEX * REVY(j)].face,
+                                          rp->cubeLoc[LEFT_FACE][LASTZ + MAXSIZEZ * REVY(j)].face, NO_FACE,
+                                          NO_FACE, NO_FACE);
+                       }
                        glTranslatef(0, S1, 0);
-                       draw_cubit(mi, ' ', F_[FRONT_ROTATION][1][LASTY],
-                                  ' ', ' ',
-                                  ' ', F_[TOP_ROTATION][1][0]);
+                       draw_cubit(mi,
+                                  NO_FACE, rp->cubeLoc[FRONT_FACE][FIRSTX + MAXSIZEX * FIRSTY].face,
+                                  rp->cubeLoc[LEFT_FACE][LASTZ + MAXSIZEZ * FIRSTY].face, NO_FACE,
+                                  NO_FACE, rp->cubeLoc[TOP_FACE][FIRSTX + MAXSIZEX * LASTZ].face);
                        glPopMatrix();
-                       if (rp->movement == RIGHT_ROTATION)
-                               glRotatef(rp->rotatestep, 1, 0, 0);
-                       glTranslatef(S1, -S1, -S1);
-                       draw_cubit(mi, F_[BACK_ROTATION][LAST][LAST], ' ',
-                                  ' ', F_[RIGHT_ROTATION][LAST][0],
-                                  F_[BOTTOM_ROTATION][LAST][0], ' ');
-                       glTranslatef(0, S1, 0);
-                       draw_cubit(mi, F_[BACK_ROTATION][LAST][1], ' ',
-                                  ' ', F_[RIGHT_ROTATION][LAST][1],
-                                  ' ', ' ');
-                       glTranslatef(0, S1, 0);
-                       draw_cubit(mi, F_[BACK_ROTATION][LAST][0], ' ',
-                                  ' ', F_[RIGHT_ROTATION][LAST][LAST],
-                                  ' ', F_[TOP_ROTATION][LAST][LAST]);
-                       glTranslatef(0, -S2, S1);
-                       draw_cubit(mi, ' ', ' ',
-                                  ' ', F_[RIGHT_ROTATION][1][0],
-                                  F_[BOTTOM_ROTATION][LAST][1], ' ');
-                       glTranslatef(0, S1, 0);
-                       draw_cubit(mi, ' ', ' ',
-                                  ' ', F_[RIGHT_ROTATION][1][1],
-                                  ' ', ' ');
-                       glTranslatef(0, S1, 0);
-                       draw_cubit(mi, ' ', ' ',
-                                  ' ', F_[RIGHT_ROTATION][1][LAST],
-                                  ' ', F_[TOP_ROTATION][LAST][1]);
-                       glTranslatef(0, -S2, S1);
-                       draw_cubit(mi, ' ', F_[FRONT_ROTATION][LASTX][0],
-                                  ' ', F_[RIGHT_ROTATION][0][0],
-                                  F_[BOTTOM_ROTATION][LAST][LAST], ' ');
+                       for (i = 1; i < MAXSIZEX - 1; i++) {
+                               glPushMatrix();
+                               if (slice.depth == i)
+                                       glRotatef(-rotatestep, HALFX, 0, 0);
+                               glTranslatef(MIDX(i), -HALFY, -HALFZ);
+                               draw_cubit(mi,
+                                          rp->cubeLoc[BACK_FACE][i + MAXSIZEX * FIRSTY].face, NO_FACE,
+                                          NO_FACE, NO_FACE,
+                                          rp->cubeLoc[BOTTOM_FACE][i + MAXSIZEX * LASTZ].face, NO_FACE);
+                               for (j = 1; j < MAXSIZEY - 1; j++) {
+                                       glTranslatef(0, S1, 0);
+                                       draw_cubit(mi,
+                                                  rp->cubeLoc[BACK_FACE][i + MAXSIZEX * j].face, NO_FACE,
+                                                  NO_FACE, NO_FACE,
+                                                  NO_FACE, NO_FACE);
+                               }
+                               glTranslatef(0, S1, 0);
+                               draw_cubit(mi,
+                                          rp->cubeLoc[BACK_FACE][i + MAXSIZEX * LASTY].face, NO_FACE,
+                                          NO_FACE, NO_FACE,
+                                          NO_FACE, rp->cubeLoc[TOP_FACE][i + MAXSIZEX * FIRSTZ].face);
+                               for (k = 1; k < MAXSIZEZ - 1; k++) {
+                                       glTranslatef(0, -SY, S1);
+                                       draw_cubit(mi,
+                                                  NO_FACE, NO_FACE,
+                                                  NO_FACE, NO_FACE,
+                                                  rp->cubeLoc[BOTTOM_FACE][i + MAXSIZEX * REVZ(k)].face, NO_FACE);
+                                       /* Center */
+                                       glTranslatef(0, SY, 0);
+                                       draw_cubit(mi,
+                                                  NO_FACE, NO_FACE,
+                                                  NO_FACE, NO_FACE,
+                                                  NO_FACE, rp->cubeLoc[TOP_FACE][i + MAXSIZEX * k].face);
+                               }
+                               glTranslatef(0, -SY, S1);
+                               draw_cubit(mi,
+                                          NO_FACE, rp->cubeLoc[FRONT_FACE][i + MAXSIZEX * LASTY].face,
+                                          NO_FACE, NO_FACE,
+                                          rp->cubeLoc[BOTTOM_FACE][i + MAXSIZEX * FIRSTZ].face, NO_FACE);
+                               for (j = 1; j < MAXSIZEY - 1; j++) {
+                                       glTranslatef(0, S1, 0);
+                                       draw_cubit(mi,
+                                                  NO_FACE, rp->cubeLoc[FRONT_FACE][i + MAXSIZEX * REVY(j)].face,
+                                                  NO_FACE, NO_FACE,
+                                                  NO_FACE, NO_FACE);
+                               }
+                               glTranslatef(0, S1, 0);
+                               draw_cubit(mi,
+                                          NO_FACE, rp->cubeLoc[FRONT_FACE][i + MAXSIZEX * FIRSTY].face,
+                                          NO_FACE, NO_FACE,
+                                          NO_FACE, rp->cubeLoc[TOP_FACE][i + MAXSIZEX * LASTZ].face);
+                               glPopMatrix();
+                       }
+                       if (slice.depth == MAXSIZEX - 1)
+                               glRotatef(-rotatestep, HALFX, 0, 0);
+                       glTranslatef(HALFX, -HALFY, -HALFZ);
+                       draw_cubit(mi,
+                                  rp->cubeLoc[BACK_FACE][LASTX + MAXSIZEX * FIRSTY].face, NO_FACE,
+                                  NO_FACE, rp->cubeLoc[RIGHT_FACE][LASTZ + MAXSIZEZ * LASTY].face,
+                                  rp->cubeLoc[BOTTOM_FACE][LASTX + MAXSIZEX * LASTZ].face, NO_FACE);
+                       for (j = 1; j < MAXSIZEY - 1; j++) {
+                               glTranslatef(0, S1, 0);
+                               draw_cubit(mi,
+                                          rp->cubeLoc[BACK_FACE][LASTX + MAXSIZEX * j].face, NO_FACE,
+                                          NO_FACE, rp->cubeLoc[RIGHT_FACE][LASTZ + MAXSIZEZ * REVY(j)].face,
+                                          NO_FACE, NO_FACE);
+                       }
                        glTranslatef(0, S1, 0);
-                       draw_cubit(mi, ' ', F_[FRONT_ROTATION][LASTX][1],
-                                  ' ', F_[RIGHT_ROTATION][0][1],
-                                  ' ', ' ');
+                       draw_cubit(mi,
+                                  rp->cubeLoc[BACK_FACE][LASTX + MAXSIZEX * LASTY].face, NO_FACE,
+                                  NO_FACE, rp->cubeLoc[RIGHT_FACE][LASTZ + MAXSIZEZ * FIRSTY].face,
+                                  NO_FACE, rp->cubeLoc[TOP_FACE][LASTX + MAXSIZEX * FIRSTZ].face);
+                       for (k = 1; k < MAXSIZEZ - 1; k++) {
+                               glTranslatef(0, -SY, S1);
+                               draw_cubit(mi,
+                                          NO_FACE, NO_FACE,
+                                          NO_FACE, rp->cubeLoc[RIGHT_FACE][REVZ(k) + MAXSIZEZ * LASTY].face,
+                                          rp->cubeLoc[BOTTOM_FACE][LASTX + MAXSIZEX * REVZ(k)].face, NO_FACE);
+                               for (j = 1; j < MAXSIZEY - 1; j++) {
+                                       glTranslatef(0, S1, 0);
+                                       draw_cubit(mi,
+                                                  NO_FACE, NO_FACE,
+                                                  NO_FACE, rp->cubeLoc[RIGHT_FACE][REVZ(k) + MAXSIZEZ * REVY(j)].face,
+                                                  NO_FACE, NO_FACE);
+                               }
+                               glTranslatef(0, S1, 0);
+                               draw_cubit(mi,
+                                          NO_FACE, NO_FACE,
+                                          NO_FACE, rp->cubeLoc[RIGHT_FACE][REVZ(k) + MAXSIZEZ * FIRSTY].face,
+                                          NO_FACE, rp->cubeLoc[TOP_FACE][LASTX + MAXSIZEX * k].face);
+                       }
+                       glTranslatef(0, -SY, S1);
+                       draw_cubit(mi,
+                                  NO_FACE, rp->cubeLoc[FRONT_FACE][LASTX + MAXSIZEX * LASTY].face,
+                                  NO_FACE, rp->cubeLoc[RIGHT_FACE][FIRSTZ + MAXSIZEZ * LASTY].face,
+                                  rp->cubeLoc[BOTTOM_FACE][LASTX + MAXSIZEX * FIRSTZ].face, NO_FACE);
+                       for (j = 1; j < MAXSIZEY - 1; j++) {
+                               glTranslatef(0, S1, 0);
+                               draw_cubit(mi,
+                                          NO_FACE, rp->cubeLoc[FRONT_FACE][LASTX + MAXSIZEX * REVY(j)].face,
+                                          NO_FACE, rp->cubeLoc[RIGHT_FACE][FIRSTZ + MAXSIZEZ * REVY(j)].face,
+                                          NO_FACE, NO_FACE);
+                       }
                        glTranslatef(0, S1, 0);
-                       draw_cubit(mi, ' ', F_[FRONT_ROTATION][LASTX][LASTY],
-                                  ' ', F_[RIGHT_ROTATION][0][LAST],
-                                  ' ', F_[TOP_ROTATION][LAST][0]);
+                       draw_cubit(mi,
+                                  NO_FACE, rp->cubeLoc[FRONT_FACE][LASTX + MAXSIZEX * FIRSTY].face,
+                                  NO_FACE, rp->cubeLoc[RIGHT_FACE][FIRSTZ + MAXSIZEZ * FIRSTY].face,
+                                  NO_FACE, rp->cubeLoc[TOP_FACE][LASTX + MAXSIZEX * LASTZ].face);
                        break;
-               case BOTTOM_ROTATION:
-               case TOP_ROTATION:
+               case FRONT_FACE:        /* BACK_FACE too */
                        glPushMatrix();
-                       if (rp->movement == BOTTOM_ROTATION)
-                               glRotatef(-rp->rotatestep, 0, 1, 0);
-                       glTranslatef(-S1, -S1, -S1);
-                       draw_cubit(mi, F_[BACK_ROTATION][0][LAST], ' ',
-                                  F_[LEFT_ROTATION][0][0], ' ',
-                                  F_[BOTTOM_ROTATION][0][0], ' ');
-                       glTranslatef(0, 0, S1);
-                       draw_cubit(mi, ' ', ' ',
-                                  F_[LEFT_ROTATION][1][0], ' ',
-                                  F_[BOTTOM_ROTATION][0][1], ' ');
-                       glTranslatef(0, 0, S1);
-                       draw_cubit(mi, ' ', F_[FRONT_ROTATION][0][0],
-                                  F_[LEFT_ROTATION][LAST][0], ' ',
-                                  F_[BOTTOM_ROTATION][0][LAST], ' ');
-                       glTranslatef(S1, 0, -S2);
-                       draw_cubit(mi, F_[BACK_ROTATION][1][LAST], ' ',
-                                  ' ', ' ',
-                                  F_[BOTTOM_ROTATION][1][0], ' ');
-                       glTranslatef(0, 0, S1);
-                       draw_cubit(mi, ' ', ' ',
-                                  ' ', ' ',
-                                  F_[BOTTOM_ROTATION][1][1], ' ');
-                       glTranslatef(0, 0, S1);
-                       draw_cubit(mi, ' ', F_[FRONT_ROTATION][1][0],
-                                  ' ', ' ',
-                                  F_[BOTTOM_ROTATION][1][LAST], ' ');
-                       glTranslatef(1, 0, -S2);
-                       draw_cubit(mi, F_[BACK_ROTATION][LAST][LAST], ' ',
-                                  ' ', F_[RIGHT_ROTATION][LAST][0],
-                                  F_[BOTTOM_ROTATION][LAST][0], ' ');
-                       glTranslatef(0, 0, S1);
-                       draw_cubit(mi, ' ', ' ',
-                                  ' ', F_[RIGHT_ROTATION][1][0],
-                                  F_[BOTTOM_ROTATION][LAST][1], ' ');
-                       glTranslatef(0, 0, S1);
-                       draw_cubit(mi, ' ', F_[FRONT_ROTATION][LASTX][0],
-                                  ' ', F_[RIGHT_ROTATION][0][0],
-                                  F_[BOTTOM_ROTATION][LAST][LAST], ' ');
-                       glPopMatrix();
-                       glPushMatrix();
-                       glTranslatef(-S1, 0, -S1);
-                       draw_cubit(mi, F_[BACK_ROTATION][0][1], ' ',
-                                  F_[LEFT_ROTATION][0][1], ' ',
-                                  ' ', ' ');
-                       glTranslatef(0, 0, S1);
-                       draw_cubit(mi, ' ', ' ',
-                                  F_[LEFT_ROTATION][1][1], ' ',
-                                  ' ', ' ');
-                       glTranslatef(0, 0, S1);
-                       draw_cubit(mi, ' ', F_[FRONT_ROTATION][0][1],
-                                  F_[LEFT_ROTATION][LAST][1], ' ',
-                                  ' ', ' ');
-                       glTranslatef(1, 0, -S2);
-                       draw_cubit(mi, F_[BACK_ROTATION][1][1], ' ',
-                                  ' ', ' ',
-                                  ' ', ' ');
-                       glTranslatef(0, 0, S2);
-                       draw_cubit(mi, ' ', F_[FRONT_ROTATION][1][1],
-                                  ' ', ' ',
-                                  ' ', ' ');
-                       glTranslatef(S1, 0, -S2);
-                       draw_cubit(mi, F_[BACK_ROTATION][LAST][1], ' ',
-                                  ' ', F_[RIGHT_ROTATION][LAST][1],
-                                  ' ', ' ');
-                       glTranslatef(0, 0, S1);
-                       draw_cubit(mi, ' ', ' ',
-                                  ' ', F_[RIGHT_ROTATION][1][1],
-                                  ' ', ' ');
-                       glTranslatef(0, 0, S1);
-                       draw_cubit(mi, ' ', F_[FRONT_ROTATION][LASTX][1],
-                                  ' ', F_[RIGHT_ROTATION][0][1],
-                                  ' ', ' ');
+                       if (slice.depth == MAXSIZEZ - 1)
+                               glRotatef(rotatestep, 0, 0, HALFZ);
+
+                       glTranslatef(-HALFX, -HALFY, -HALFZ);
+                       draw_cubit(mi,
+                                  rp->cubeLoc[BACK_FACE][FIRSTX + MAXSIZEX * FIRSTY].face, NO_FACE,
+                                  rp->cubeLoc[LEFT_FACE][FIRSTZ + MAXSIZEZ * LASTY].face, NO_FACE,
+                                  rp->cubeLoc[BOTTOM_FACE][FIRSTX + MAXSIZEX * LASTZ].face, NO_FACE);
+                       for (i = 1; i < MAXSIZEX - 1; i++) {
+                               glTranslatef(S1, 0, 0);
+                               draw_cubit(mi,
+                                          rp->cubeLoc[BACK_FACE][i + MAXSIZEX * FIRSTY].face, NO_FACE,
+                                          NO_FACE, NO_FACE,
+                                          rp->cubeLoc[BOTTOM_FACE][i + MAXSIZEX * LASTZ].face, NO_FACE);
+                       }
+                       glTranslatef(S1, 0, 0);
+                       draw_cubit(mi,
+                                  rp->cubeLoc[BACK_FACE][LASTX + MAXSIZEX * FIRSTY].face, NO_FACE,
+                                  NO_FACE, rp->cubeLoc[RIGHT_FACE][LASTZ + MAXSIZEZ * LASTY].face,
+                                  rp->cubeLoc[BOTTOM_FACE][LASTX + MAXSIZEX * LASTZ].face, NO_FACE);
+                       for (j = 1; j < MAXSIZEY - 1; j++) {
+                               glTranslatef(-SX, S1, 0);
+                               draw_cubit(mi,
+                                          rp->cubeLoc[BACK_FACE][FIRSTX + MAXSIZEX * j].face, NO_FACE,
+                                          rp->cubeLoc[LEFT_FACE][FIRSTZ + MAXSIZEZ * REVY(j)].face, NO_FACE,
+                                          NO_FACE, NO_FACE);
+                               for (i = 1; i < MAXSIZEX - 1; i++) {
+                                       glTranslatef(S1, 0, 0);
+                                       draw_cubit(mi,
+                                                  rp->cubeLoc[BACK_FACE][i + MAXSIZEX * j].face, NO_FACE,
+                                                  NO_FACE, NO_FACE,
+                                                  NO_FACE, NO_FACE);
+                               }
+                               glTranslatef(S1, 0, 0);
+                               draw_cubit(mi,
+                                          rp->cubeLoc[BACK_FACE][LASTX + MAXSIZEX * j].face, NO_FACE,
+                                          NO_FACE, rp->cubeLoc[RIGHT_FACE][LASTZ + MAXSIZEZ * REVY(j)].face,
+                                          NO_FACE, NO_FACE);
+                       }
+                       glTranslatef(-SX, S1, 0);
+                       draw_cubit(mi,
+                                  rp->cubeLoc[BACK_FACE][FIRSTX + MAXSIZEX * LASTY].face, NO_FACE,
+                                  rp->cubeLoc[LEFT_FACE][FIRSTZ + MAXSIZEZ * FIRSTY].face, NO_FACE,
+                                  NO_FACE, rp->cubeLoc[TOP_FACE][FIRSTX + MAXSIZEX * FIRSTZ].face);
+                       for (i = 1; i < MAXSIZEX - 1; i++) {
+                               glTranslatef(S1, 0, 0);
+                               draw_cubit(mi,
+                                          rp->cubeLoc[BACK_FACE][i + MAXSIZEX * LASTY].face, NO_FACE,
+                                          NO_FACE, NO_FACE,
+                                          NO_FACE, rp->cubeLoc[TOP_FACE][i + MAXSIZEX * FIRSTZ].face);
+                       }
+                       glTranslatef(S1, 0, 0);
+                       draw_cubit(mi,
+                                  rp->cubeLoc[BACK_FACE][LASTX + MAXSIZEX * LASTY].face, NO_FACE,
+                                  NO_FACE, rp->cubeLoc[RIGHT_FACE][LASTZ + MAXSIZEZ * FIRSTY].face,
+                                  NO_FACE, rp->cubeLoc[TOP_FACE][LASTX + MAXSIZEX * FIRSTZ].face);
                        glPopMatrix();
-                       if (rp->movement == TOP_ROTATION)
-                               glRotatef(rp->rotatestep, 0, 1, 0);
-                       glTranslatef(-S1, S1, -S1);
-                       draw_cubit(mi, F_[BACK_ROTATION][0][0], ' ',
-                                  F_[LEFT_ROTATION][0][LAST], ' ',
-                                  ' ', F_[TOP_ROTATION][0][LAST]);
-                       glTranslatef(0, 0, S1);
-                       draw_cubit(mi, ' ', ' ',
-                                  F_[LEFT_ROTATION][1][LAST], ' ',
-                                  ' ', F_[TOP_ROTATION][0][1]);
-                       glTranslatef(0, 0, S1);
-                       draw_cubit(mi, ' ', F_[FRONT_ROTATION][0][LASTY],
-                                  F_[LEFT_ROTATION][LAST][LAST], ' ',
-                                  ' ', F_[TOP_ROTATION][0][0]);
-                       glTranslatef(S1, 0, -S2);
-                       draw_cubit(mi, F_[BACK_ROTATION][1][0], ' ',
-                                  ' ', ' ',
-                                  ' ', F_[TOP_ROTATION][1][LAST]);
-                       glTranslatef(0, 0, S1);
-                       draw_cubit(mi, ' ', ' ',
-                                  ' ', ' ',
-                                  ' ', F_[TOP_ROTATION][1][1]);
-                       glTranslatef(0, 0, S1);
-                       draw_cubit(mi, ' ', F_[FRONT_ROTATION][1][LASTY],
-                                  ' ', ' ',
-                                  ' ', F_[TOP_ROTATION][1][0]);
-                       glTranslatef(S1, 0, -S2);
-                       draw_cubit(mi, F_[BACK_ROTATION][LAST][0], ' ',
-                                  ' ', F_[RIGHT_ROTATION][LAST][LAST],
-                                  ' ', F_[TOP_ROTATION][LAST][LAST]);
-                       glTranslatef(0, 0, S1);
-                       draw_cubit(mi, ' ', ' ',
-                                  ' ', F_[RIGHT_ROTATION][1][LAST],
-                                  ' ', F_[TOP_ROTATION][LAST][1]);
-                       glTranslatef(0, 0, S1);
-                       draw_cubit(mi, ' ', F_[FRONT_ROTATION][LASTX][LASTY],
-                                  ' ', F_[RIGHT_ROTATION][0][LAST],
-                                  ' ', F_[TOP_ROTATION][LAST][0]);
+                       for (k = 1; k < MAXSIZEZ - 1; k++) {
+                               glPushMatrix();
+                               if (slice.depth == REVZ(k))
+                                       glRotatef(rotatestep, 0, 0, HALFZ);
+                               glTranslatef(-HALFX, -HALFY, MIDZ(k));
+                               draw_cubit(mi,
+                                          NO_FACE, NO_FACE,
+                                          rp->cubeLoc[LEFT_FACE][k + MAXSIZEZ * LASTY].face, NO_FACE,
+                                          rp->cubeLoc[BOTTOM_FACE][FIRSTX + MAXSIZEX * REVZ(k)].face, NO_FACE);
+                               for (i = 1; i < MAXSIZEX - 1; i++) {
+                                       glTranslatef(S1, 0, 0);
+                                       draw_cubit(mi,
+                                                  NO_FACE, NO_FACE,
+                                                  NO_FACE, NO_FACE,
+                                                  rp->cubeLoc[BOTTOM_FACE][i + MAXSIZEX * REVZ(k)].face, NO_FACE);
+                               }
+                               glTranslatef(S1, 0, 0);
+                               draw_cubit(mi,
+                                          NO_FACE, NO_FACE,
+                                          NO_FACE, rp->cubeLoc[RIGHT_FACE][REVZ(k) + MAXSIZEZ * LASTY].face,
+                                          rp->cubeLoc[BOTTOM_FACE][LASTX + MAXSIZEX * REVZ(k)].face, NO_FACE);
+                               for (j = 1; j < MAXSIZEY - 1; j++) {
+                                       glTranslatef(-SX, S1, 0);
+                                       draw_cubit(mi,
+                                                  NO_FACE, NO_FACE,
+                                                  rp->cubeLoc[LEFT_FACE][k + MAXSIZEZ * REVY(j)].face, NO_FACE,
+                                                  NO_FACE, NO_FACE);
+                                       /* Center */
+                                       glTranslatef(SX, 0, 0);
+                                       draw_cubit(mi,
+                                                  NO_FACE, NO_FACE,
+                                                  NO_FACE, rp->cubeLoc[RIGHT_FACE][REVZ(k) + MAXSIZEZ * REVY(j)].face,
+                                                  NO_FACE, NO_FACE);
+                               }
+                               glTranslatef(-SX, S1, 0);
+                               draw_cubit(mi,
+                                          NO_FACE, NO_FACE,
+                                          rp->cubeLoc[LEFT_FACE][k + MAXSIZEZ * FIRSTY].face, NO_FACE,
+                                          NO_FACE, rp->cubeLoc[TOP_FACE][FIRSTX + MAXSIZEX * k].face);
+                               for (i = 1; i < MAXSIZEX - 1; i++) {
+                                       glTranslatef(S1, 0, 0);
+                                       draw_cubit(mi,
+                                                  NO_FACE, NO_FACE,
+                                                  NO_FACE, NO_FACE,
+                                                  NO_FACE, rp->cubeLoc[TOP_FACE][i + MAXSIZEX * k].face);
+                               }
+                               glTranslatef(S1, 0, 0);
+                               draw_cubit(mi,
+                                          NO_FACE, NO_FACE,
+                                          NO_FACE, rp->cubeLoc[RIGHT_FACE][REVZ(k) + MAXSIZEZ * FIRSTY].face,
+                                          NO_FACE, rp->cubeLoc[TOP_FACE][LASTX + MAXSIZEX * k].face);
+                               glPopMatrix();
+                       }
+                       if (slice.depth == 0)
+                               glRotatef(rotatestep, 0, 0, HALFZ);
+                       glTranslatef(-HALFX, -HALFY, HALFZ);
+                       draw_cubit(mi,
+                                  NO_FACE, rp->cubeLoc[FRONT_FACE][FIRSTX + MAXSIZEX * LASTY].face,
+                                  rp->cubeLoc[LEFT_FACE][LASTZ + MAXSIZEZ * LASTY].face, NO_FACE,
+                                  rp->cubeLoc[BOTTOM_FACE][FIRSTX + MAXSIZEX * FIRSTZ].face, NO_FACE);
+                       for (i = 1; i < MAXSIZEX - 1; i++) {
+                               glTranslatef(S1, 0, 0);
+                               draw_cubit(mi,
+                                          NO_FACE, rp->cubeLoc[FRONT_FACE][i + MAXSIZEX * LASTY].face,
+                                          NO_FACE, NO_FACE,
+                                          rp->cubeLoc[BOTTOM_FACE][i + MAXSIZEX * FIRSTZ].face, NO_FACE);
+                       }
+                       glTranslatef(S1, 0, 0);
+                       draw_cubit(mi,
+                                  NO_FACE, rp->cubeLoc[FRONT_FACE][LASTX + MAXSIZEX * LASTY].face,
+                                  NO_FACE, rp->cubeLoc[RIGHT_FACE][FIRSTZ + MAXSIZEZ * LASTY].face,
+                                  rp->cubeLoc[BOTTOM_FACE][LASTX + MAXSIZEX * FIRSTZ].face, NO_FACE);
+                       for (j = 1; j < MAXSIZEY - 1; j++) {
+                               glTranslatef(-SX, S1, 0);
+                               draw_cubit(mi,
+                                          NO_FACE, rp->cubeLoc[FRONT_FACE][FIRSTX + MAXSIZEX * REVY(j)].face,
+                                          rp->cubeLoc[LEFT_FACE][LASTZ + MAXSIZEZ * REVY(j)].face, NO_FACE,
+                                          NO_FACE, NO_FACE);
+                               for (i = 1; i < MAXSIZEX - 1; i++) {
+                                       glTranslatef(S1, 0, 0);
+                                       draw_cubit(mi,
+                                                  NO_FACE, rp->cubeLoc[FRONT_FACE][i + MAXSIZEX * REVY(j)].face,
+                                                  NO_FACE, NO_FACE,
+                                                  NO_FACE, NO_FACE);
+                               }
+                               glTranslatef(S1, 0, 0);
+                               draw_cubit(mi,
+                                          NO_FACE, rp->cubeLoc[FRONT_FACE][LASTX + MAXSIZEX * REVY(j)].face,
+                                          NO_FACE, rp->cubeLoc[RIGHT_FACE][FIRSTZ + MAXSIZEZ * REVY(j)].face,
+                                          NO_FACE, NO_FACE);
+                       }
+                       glTranslatef(-SX, S1, 0);
+                       draw_cubit(mi,
+                                  NO_FACE, rp->cubeLoc[FRONT_FACE][FIRSTX + MAXSIZEX * FIRSTY].face,
+                                  rp->cubeLoc[LEFT_FACE][LASTZ + MAXSIZEZ * FIRSTY].face, NO_FACE,
+                                  NO_FACE, rp->cubeLoc[TOP_FACE][FIRSTX + MAXSIZEX * LASTZ].face);
+                       for (i = 1; i < MAXSIZEX - 1; i++) {
+                               glTranslatef(S1, 0, 0);
+                               draw_cubit(mi,
+                                          NO_FACE, rp->cubeLoc[FRONT_FACE][i + MAXSIZEX * FIRSTY].face,
+                                          NO_FACE, NO_FACE,
+                                          NO_FACE, rp->cubeLoc[TOP_FACE][i + MAXSIZEX * LASTZ].face);
+                       }
+                       glTranslatef(S1, 0, 0);
+                       draw_cubit(mi,
+                                  NO_FACE, rp->cubeLoc[FRONT_FACE][LASTX + MAXSIZEX * FIRSTY].face,
+                                  NO_FACE, rp->cubeLoc[RIGHT_FACE][FIRSTZ + MAXSIZEZ * FIRSTY].face,
+                                  NO_FACE, rp->cubeLoc[TOP_FACE][LASTX + MAXSIZEX * LASTZ].face);
                        break;
        }
 #undef S1
-#undef S2
+}
+
+/* From David Bagley's xrubik.  Used by permission. ;)  */
+static void
+readRC(rubikstruct * rp, int face, int dir, int h, int orient, int size)
+{
+       int         g;
+
+       if (dir == TOP || dir == BOTTOM)
+               for (g = 0; g < size; g++)
+                       rp->rowLoc[orient][g] =
+                               rp->cubeLoc[face][g * size + h];
+       else                    /* dir == RIGHT || dir == LEFT */
+               for (g = 0; g < size; g++)
+                       rp->rowLoc[orient][g] =
+                               rp->cubeLoc[face][h * size + g];
+}
+
+static void
+rotateRC(rubikstruct * rp, int rotate, int orient, int size)
+{
+       int         g;
+
+       for (g = 0; g < size; g++)
+               rp->rowLoc[orient][g].rotation =
+                       (rp->rowLoc[orient][g].rotation + rotate) % MAXORIENT;
+}
+
+static void
+reverseRC(rubikstruct * rp, int orient, int size)
+{
+       int         g;
+       RubikLoc    temp;
+
+       for (g = 0; g < size / 2; g++) {
+               temp = rp->rowLoc[orient][size - 1 - g];
+               rp->rowLoc[orient][size - 1 - g] = rp->rowLoc[orient][g];
+               rp->rowLoc[orient][g] = temp;
+       }
+}
+
+static void
+writeRC(rubikstruct * rp, int face, int dir, int h, int orient, int size)
+{
+       int         g, position;
+
+       if (dir == TOP || dir == BOTTOM) {
+               for (g = 0; g < size; g++) {
+                       position = g * size + h;
+                       rp->cubeLoc[face][position] = rp->rowLoc[orient][g];
+                       /* DrawSquare(face, position); */
+               }
+       } else {                /* dir == RIGHT || dir == LEFT */
+               for (g = 0; g < size; g++) {
+                       position = h * size + g;
+                       rp->cubeLoc[face][position] = rp->rowLoc[orient][g];
+                       /* DrawSquare(face, position); */
+               }
+       }
+}
+
+static void
+rotateFace(rubikstruct * rp, int face, int direction)
+{
+       int         position, i, j;
+       RubikLoc   *faceLoc = NULL;
+
+       if ((faceLoc = (RubikLoc *) malloc(AVSIZESQ * sizeof (RubikLoc))) == NULL)
+               (void) fprintf(stderr,
+                "Could not allocate memory for rubik face position info\n");
+       /* Read Face */
+       for (position = 0; position < AVSIZESQ; position++)
+               faceLoc[position] = rp->cubeLoc[face][position];
+       /* Write Face */
+       for (position = 0; position < AVSIZESQ; position++) {
+               i = position % AVSIZE;
+               j = position / AVSIZE;
+               rp->cubeLoc[face][position] = (direction == CW) ?
+                       faceLoc[(AVSIZE - i - 1) * AVSIZE + j] :
+                       faceLoc[i * AVSIZE + AVSIZE - j - 1];
+               rp->cubeLoc[face][position].rotation =
+                       (rp->cubeLoc[face][position].rotation + direction - MAXORIENT) %
+                       MAXORIENT;
+               /* DrawSquare(face, position); */
+       }
+       if (faceLoc != NULL)
+               (void) free((void *) faceLoc);
 }
 
 static void
-evalmovement(ModeInfo * mi, int face, char orient)
+moveRubik(rubikstruct * rp, int face, int direction, int position)
+{
+       int         newFace, newDirection, rotate, reverse = False;
+       int         h, k, newH = 0;
+       int         i, j;
+
+       if (direction == CW || direction == CCW) {
+               direction = (direction == CCW) ?
+                       (rotateToRow[face].direction + 2) % MAXORIENT :
+                       rotateToRow[face].direction;
+               i = j = (rotateToRow[face].sideFace == RIGHT ||
+                     rotateToRow[face].sideFace == BOTTOM) ? AVSIZE - 1 : 0;
+               face = rotateToRow[face].face;
+               position = j * AVSIZE + i;
+       }
+       i = position % AVSIZE;
+       j = position / AVSIZE;
+       h = (direction == TOP || direction == BOTTOM) ? i : j;
+       /* rotate sides CW or CCW */
+       if (h == AVSIZE - 1) {
+               newDirection = (direction == TOP || direction == BOTTOM) ?
+                       TOP : RIGHT;
+               if (direction == TOP || direction == RIGHT)
+                       rotateFace(rp, rowToRotate[face][newDirection], CW);
+               else            /* direction == BOTTOM || direction == LEFT */
+                       rotateFace(rp, rowToRotate[face][newDirection], CCW);
+       }
+       if (h == 0) {
+               newDirection = (direction == TOP || direction == BOTTOM) ?
+                       BOTTOM : LEFT;
+               if (direction == TOP || direction == RIGHT)
+                       rotateFace(rp, rowToRotate[face][newDirection], CCW);
+               else            /* direction == BOTTOM  || direction == LEFT */
+                       rotateFace(rp, rowToRotate[face][newDirection], CW);
+       }
+       /* Slide rows */
+       readRC(rp, face, direction, h, 0, AVSIZE);
+       for (k = 1; k <= MAXORIENT; k++) {
+               newFace = slideNextRow[face][direction].face;
+               rotate = slideNextRow[face][direction].rotation;
+               newDirection = (rotate + direction) % MAXORIENT;
+               switch (rotate) {
+                       case TOP:
+                               newH = h;
+                               reverse = False;
+                               break;
+                       case RIGHT:
+                               if (newDirection == TOP || newDirection == BOTTOM) {
+                                       newH = AVSIZE - 1 - h;
+                                       reverse = False;
+                               } else {        /* newDirection == RIGHT || newDirection == LEFT */
+                                       newH = h;
+                                       reverse = True;
+                               }
+                               break;
+                       case BOTTOM:
+                               newH = AVSIZE - 1 - h;
+                               reverse = True;
+                               break;
+                       case LEFT:
+                               if (newDirection == TOP || newDirection == BOTTOM) {
+                                       newH = h;
+                                       reverse = True;
+                               } else {        /* newDirection == RIGHT || newDirection == LEFT */
+                                       newH = AVSIZE - 1 - h;
+                                       reverse = False;
+                               }
+                               break;
+                       default:
+                               (void) printf("moveRubik: rotate %d\n", rotate);
+               }
+               if (k != MAXORIENT)
+                       readRC(rp, newFace, newDirection, newH, k, AVSIZE);
+               rotateRC(rp, rotate, k - 1, AVSIZE);
+               if (reverse == True)
+                       reverseRC(rp, k - 1, AVSIZE);
+               writeRC(rp, newFace, newDirection, newH, k - 1, AVSIZE);
+               face = newFace;
+               direction = newDirection;
+               h = newH;
+       }
+}
+
+#ifdef DEBUG
+void
+printCube(rubikstruct * rp)
+{
+       int         face, position;
+
+       for (face = 0; face < MAXFACES; face++) {
+               for (position = 0; position < AVSIZESQ; position++) {
+                       (void) printf("%d %d  ", rp->cubeLoc[face][position].face,
+                                     rp->cubeLoc[face][position].rotation);
+                       if (!((position + 1) % AVSIZE))
+                               (void) printf("\n");
+               }
+               (void) printf("\n");
+       }
+       (void) printf("\n");
+}
+
+#endif
+
+static void
+evalmovement(ModeInfo * mi, RubikMove movement)
 {
        rubikstruct *rp = &rubik[MI_SCREEN(mi)];
-       char        T1, T2, T3;
 
-       if (face < 0 || face > 5)
+#ifdef DEBUG
+       printCube(rp);
+#endif
+       if (movement.face < 0 || movement.face >= MAXFACES)
                return;
 
-       if (orient == CLOCK_WISE) {
-               T1 = F_[face][0][LAST];
-               T2 = F_[face][1][LAST];
-               F_[face][0][LAST] = F_[face][0][0];
-               F_[face][1][LAST] = F_[face][0][1];
-               F_[face][0][0] = F_[face][LAST][0];
-               F_[face][0][1] = F_[face][1][0];
-               F_[face][1][0] = F_[face][LAST][1];
-               F_[face][LAST][0] = F_[face][LAST][LAST];
-               F_[face][LAST][LAST] = T1;      /* F_[face][0][LAST]; */
-               F_[face][LAST][1] = T2;         /* F_[face][1][LAST]; */
-       } else {
-               T1 = F_[face][0][0];
-               T2 = F_[face][0][1];
-               F_[face][0][0] = F_[face][0][LAST];
-               F_[face][0][1] = F_[face][1][LAST];
-               F_[face][0][LAST] = F_[face][LAST][LAST];
-               F_[face][1][LAST] = F_[face][LAST][1];
-               F_[face][LAST][1] = F_[face][1][0];
-               F_[face][LAST][LAST] = F_[face][LAST][0];
-               F_[face][1][0] = T2;    /* F_[face][0][1]; */
-               F_[face][LAST][0] = T1;         /* F_[face][0][0]; */
-       }
+       moveRubik(rp, movement.face, movement.direction, movement.position);
 
-       switch (face) {
-               case BACK_ROTATION:
-                       if (orient == CLOCK_WISE) {
-                               T1 = F_[BOTTOM_ROTATION][0][0];
-                               T2 = F_[BOTTOM_ROTATION][1][0];
-                               T3 = F_[BOTTOM_ROTATION][LAST][0];
-                               F_[BOTTOM_ROTATION][0][0] = F_[LEFT_ROTATION][0][LAST];
-                               F_[BOTTOM_ROTATION][1][0] = F_[LEFT_ROTATION][0][1];
-                               F_[BOTTOM_ROTATION][LAST][0] = F_[LEFT_ROTATION][0][0];
-                               F_[LEFT_ROTATION][0][0] = F_[TOP_ROTATION][0][LAST];
-                               F_[LEFT_ROTATION][0][1] = F_[TOP_ROTATION][1][LAST];
-                               F_[LEFT_ROTATION][0][LAST] = F_[TOP_ROTATION][LAST][LAST];
-                               F_[TOP_ROTATION][0][LAST] = F_[RIGHT_ROTATION][LAST][LAST];
-                               F_[TOP_ROTATION][1][LAST] = F_[RIGHT_ROTATION][LAST][1];
-                               F_[TOP_ROTATION][LAST][LAST] = F_[RIGHT_ROTATION][LAST][0];
-                               F_[RIGHT_ROTATION][LAST][0] = T1;       /* F_[BOTTOM_ROTATION][0][0]; */
-                               F_[RIGHT_ROTATION][LAST][1] = T2;       /* F_[BOTTOM_ROTATION][1][0]; */
-                               F_[RIGHT_ROTATION][LAST][LAST] = T3;    /* F_[BOTTOM_ROTATION][LAST][0]; */
-                       } else {
-                               T1 = F_[LEFT_ROTATION][0][LAST];
-                               T2 = F_[LEFT_ROTATION][0][1];
-                               T3 = F_[LEFT_ROTATION][0][0];
-                               F_[LEFT_ROTATION][0][LAST] = F_[BOTTOM_ROTATION][0][0];
-                               F_[LEFT_ROTATION][0][1] = F_[BOTTOM_ROTATION][1][0];
-                               F_[LEFT_ROTATION][0][0] = F_[BOTTOM_ROTATION][LAST][0];
-                               F_[BOTTOM_ROTATION][0][0] = F_[RIGHT_ROTATION][LAST][0];
-                               F_[BOTTOM_ROTATION][1][0] = F_[RIGHT_ROTATION][LAST][1];
-                               F_[BOTTOM_ROTATION][LAST][0] = F_[RIGHT_ROTATION][LAST][LAST];
-                               F_[RIGHT_ROTATION][LAST][LAST] = F_[TOP_ROTATION][0][LAST];
-                               F_[RIGHT_ROTATION][LAST][1] = F_[TOP_ROTATION][1][LAST];
-                               F_[RIGHT_ROTATION][LAST][0] = F_[TOP_ROTATION][LAST][LAST];
-                               F_[TOP_ROTATION][0][LAST] = T3;         /* F_[LEFT_ROTATION][0][0]; */
-                               F_[TOP_ROTATION][1][LAST] = T2;         /* F_[LEFT_ROTATION][0][1]; */
-                               F_[TOP_ROTATION][LAST][LAST] = T1;      /* F_[LEFT_ROTATION][0][LAST]; */
-                       }
-                       break;
-               case FRONT_ROTATION:
-                       if (orient == CLOCK_WISE) {
-                               T1 = F_[RIGHT_ROTATION][0][LAST];
-                               T2 = F_[RIGHT_ROTATION][0][1];
-                               T3 = F_[RIGHT_ROTATION][0][0];
-                               F_[RIGHT_ROTATION][0][LAST] = F_[TOP_ROTATION][0][0];
-                               F_[RIGHT_ROTATION][0][1] = F_[TOP_ROTATION][1][0];
-                               F_[RIGHT_ROTATION][0][0] = F_[TOP_ROTATION][LAST][0];
-                               F_[TOP_ROTATION][0][0] = F_[LEFT_ROTATION][LAST][0];
-                               F_[TOP_ROTATION][1][0] = F_[LEFT_ROTATION][LAST][1];
-                               F_[TOP_ROTATION][LAST][0] = F_[LEFT_ROTATION][LAST][LAST];
-                               F_[LEFT_ROTATION][LAST][LAST] = F_[BOTTOM_ROTATION][0][LAST];
-                               F_[LEFT_ROTATION][LAST][1] = F_[BOTTOM_ROTATION][1][LAST];
-                               F_[LEFT_ROTATION][LAST][0] = F_[BOTTOM_ROTATION][LAST][LAST];
-                               F_[BOTTOM_ROTATION][0][LAST] = T3;      /* F_[RIGHT_ROTATION][0][0]; */
-                               F_[BOTTOM_ROTATION][1][LAST] = T2;      /* F_[RIGHT_ROTATION][0][1]; */
-                               F_[BOTTOM_ROTATION][LAST][LAST] = T1;   /* F_[RIGHT_ROTATION][0][LAST]; */
-                       } else {
-                               T1 = F_[TOP_ROTATION][0][0];
-                               T2 = F_[TOP_ROTATION][1][0];
-                               T3 = F_[TOP_ROTATION][LAST][0];
-                               F_[TOP_ROTATION][0][0] = F_[RIGHT_ROTATION][0][LAST];
-                               F_[TOP_ROTATION][1][0] = F_[RIGHT_ROTATION][0][1];
-                               F_[TOP_ROTATION][LAST][0] = F_[RIGHT_ROTATION][0][0];
-                               F_[RIGHT_ROTATION][0][0] = F_[BOTTOM_ROTATION][0][LAST];
-                               F_[RIGHT_ROTATION][0][1] = F_[BOTTOM_ROTATION][1][LAST];
-                               F_[RIGHT_ROTATION][0][LAST] = F_[BOTTOM_ROTATION][LAST][LAST];
-                               F_[BOTTOM_ROTATION][0][LAST] = F_[LEFT_ROTATION][LAST][LAST];
-                               F_[BOTTOM_ROTATION][1][LAST] = F_[LEFT_ROTATION][LAST][1];
-                               F_[BOTTOM_ROTATION][LAST][LAST] = F_[LEFT_ROTATION][LAST][0];
-                               F_[LEFT_ROTATION][LAST][0] = T1;        /* F_[TOP_ROTATION][0][0]; */
-                               F_[LEFT_ROTATION][LAST][1] = T2;        /* F_[TOP_ROTATION][1][0]; */
-                               F_[LEFT_ROTATION][LAST][LAST] = T3;     /* F_[TOP_ROTATION][LAST][0]; */
-                       }
-                       break;
-               case LEFT_ROTATION:
-                       if (orient == CLOCK_WISE) {
-                               T1 = F_[TOP_ROTATION][0][0];
-                               T2 = F_[TOP_ROTATION][0][1];
-                               T3 = F_[TOP_ROTATION][0][LAST];
-                               F_[TOP_ROTATION][0][0] = F_[BACK_ROTATION][0][0];
-                               F_[TOP_ROTATION][0][1] = F_[BACK_ROTATION][0][1];
-                               F_[TOP_ROTATION][0][LAST] = F_[BACK_ROTATION][0][LAST];
-                               F_[BACK_ROTATION][0][0] = F_[BOTTOM_ROTATION][0][0];
-                               F_[BACK_ROTATION][0][1] = F_[BOTTOM_ROTATION][0][1];
-                               F_[BACK_ROTATION][0][LAST] = F_[BOTTOM_ROTATION][0][LAST];
-                               F_[BOTTOM_ROTATION][0][0] = F_[FRONT_ROTATION][0][0];
-                               F_[BOTTOM_ROTATION][0][1] = F_[FRONT_ROTATION][0][1];
-                               F_[BOTTOM_ROTATION][0][LAST] = F_[FRONT_ROTATION][0][LASTY];
-                               F_[FRONT_ROTATION][0][0] = T1;  /* F_[TOP_ROTATION][0][0]; */
-                               F_[FRONT_ROTATION][0][1] = T2;  /* F_[TOP_ROTATION][0][1]; */
-                               F_[FRONT_ROTATION][0][LASTY] = T3;      /* F_[TOP_ROTATION][0][LAST]; */
-                       } else {
-                               T1 = F_[BACK_ROTATION][0][0];
-                               T2 = F_[BACK_ROTATION][0][1];
-                               T3 = F_[BACK_ROTATION][0][LAST];
-                               F_[BACK_ROTATION][0][0] = F_[TOP_ROTATION][0][0];
-                               F_[BACK_ROTATION][0][1] = F_[TOP_ROTATION][0][1];
-                               F_[BACK_ROTATION][0][LAST] = F_[TOP_ROTATION][0][LAST];
-                               F_[TOP_ROTATION][0][0] = F_[FRONT_ROTATION][0][0];
-                               F_[TOP_ROTATION][0][1] = F_[FRONT_ROTATION][0][1];
-                               F_[TOP_ROTATION][0][LAST] = F_[FRONT_ROTATION][0][LASTY];
-                               F_[FRONT_ROTATION][0][0] = F_[BOTTOM_ROTATION][0][0];
-                               F_[FRONT_ROTATION][0][1] = F_[BOTTOM_ROTATION][0][1];
-                               F_[FRONT_ROTATION][0][LASTY] = F_[BOTTOM_ROTATION][0][LAST];
-                               F_[BOTTOM_ROTATION][0][0] = T1;         /* F_[BACK_ROTATION][0][0]; */
-                               F_[BOTTOM_ROTATION][0][1] = T2;         /* F_[BACK_ROTATION][0][1]; */
-                               F_[BOTTOM_ROTATION][0][LAST] = T3;      /* F_[BACK_ROTATION][0][LAST]; */
-                       }
-                       break;
-               case RIGHT_ROTATION:
-                       if (orient == CLOCK_WISE) {
-                               T1 = F_[TOP_ROTATION][LAST][0];
-                               T2 = F_[TOP_ROTATION][LAST][1];
-                               T3 = F_[TOP_ROTATION][LAST][LAST];
-                               F_[TOP_ROTATION][LAST][0] = F_[FRONT_ROTATION][LASTX][0];
-                               F_[TOP_ROTATION][LAST][1] = F_[FRONT_ROTATION][LASTX][1];
-                               F_[TOP_ROTATION][LAST][LAST] = F_[FRONT_ROTATION][LASTX][LASTY];
-                               F_[FRONT_ROTATION][LASTX][0] = F_[BOTTOM_ROTATION][LAST][0];
-                               F_[FRONT_ROTATION][LASTX][1] = F_[BOTTOM_ROTATION][LAST][1];
-                               F_[FRONT_ROTATION][LASTX][LASTY] = F_[BOTTOM_ROTATION][LAST][LAST];
-                               F_[BOTTOM_ROTATION][LAST][0] = F_[BACK_ROTATION][LAST][0];
-                               F_[BOTTOM_ROTATION][LAST][1] = F_[BACK_ROTATION][LAST][1];
-                               F_[BOTTOM_ROTATION][LAST][LAST] = F_[BACK_ROTATION][LAST][LAST];
-                               F_[BACK_ROTATION][LAST][0] = T1;        /* F_[TOP_ROTATION][LAST][0]; */
-                               F_[BACK_ROTATION][LAST][1] = T2;        /* F_[TOP_ROTATION][LAST][1]; */
-                               F_[BACK_ROTATION][LAST][LAST] = T3;     /* F_[TOP_ROTATION][LAST][LAST]; */
-                       } else {
-                               T1 = F_[FRONT_ROTATION][LASTX][0];
-                               T2 = F_[FRONT_ROTATION][LASTX][1];
-                               T3 = F_[FRONT_ROTATION][LASTX][LASTY];
-                               F_[FRONT_ROTATION][LASTX][0] = F_[TOP_ROTATION][LAST][0];
-                               F_[FRONT_ROTATION][LASTX][1] = F_[TOP_ROTATION][LAST][1];
-                               F_[FRONT_ROTATION][LASTX][LASTY] = F_[TOP_ROTATION][LAST][LAST];
-                               F_[TOP_ROTATION][LAST][0] = F_[BACK_ROTATION][LAST][0];
-                               F_[TOP_ROTATION][LAST][1] = F_[BACK_ROTATION][LAST][1];
-                               F_[TOP_ROTATION][LAST][LAST] = F_[BACK_ROTATION][LAST][LAST];
-                               F_[BACK_ROTATION][LAST][0] = F_[BOTTOM_ROTATION][LAST][0];
-                               F_[BACK_ROTATION][LAST][1] = F_[BOTTOM_ROTATION][LAST][1];
-                               F_[BACK_ROTATION][LAST][LAST] = F_[BOTTOM_ROTATION][LAST][LAST];
-                               F_[BOTTOM_ROTATION][LAST][0] = T1;      /* F_[FRONT_ROTATION][LASTX][0]; */
-                               F_[BOTTOM_ROTATION][LAST][1] = T2;      /* F_[FRONT_ROTATION][LASTX][1]; */
-                               F_[BOTTOM_ROTATION][LAST][LAST] = T3;   /* F_[FRONT_ROTATION][LASTX][LASTY]; */
-                       }
-                       break;
-               case BOTTOM_ROTATION:
-                       if (orient == CLOCK_WISE) {
-                               T1 = F_[FRONT_ROTATION][0][0];
-                               T2 = F_[FRONT_ROTATION][1][0];
-                               T3 = F_[FRONT_ROTATION][LASTX][0];
-                               F_[FRONT_ROTATION][0][0] = F_[LEFT_ROTATION][0][0];
-                               F_[FRONT_ROTATION][1][0] = F_[LEFT_ROTATION][1][0];
-                               F_[FRONT_ROTATION][LASTX][0] = F_[LEFT_ROTATION][LAST][0];
-                               F_[LEFT_ROTATION][0][0] = F_[BACK_ROTATION][LAST][LAST];
-                               F_[LEFT_ROTATION][1][0] = F_[BACK_ROTATION][1][LAST];
-                               F_[LEFT_ROTATION][LAST][0] = F_[BACK_ROTATION][0][LAST];
-                               F_[BACK_ROTATION][LAST][LAST] = F_[RIGHT_ROTATION][0][0];
-                               F_[BACK_ROTATION][1][LAST] = F_[RIGHT_ROTATION][1][0];
-                               F_[BACK_ROTATION][0][LAST] = F_[RIGHT_ROTATION][LAST][0];
-                               F_[RIGHT_ROTATION][0][0] = T1;  /* F_[FRONT_ROTATION][0][0]; */
-                               F_[RIGHT_ROTATION][1][0] = T2;  /* F_[FRONT_ROTATION][1][0]; */
-                               F_[RIGHT_ROTATION][LAST][0] = T3;       /* F_[FRONT_ROTATION][LASTX][0]; */
-                       } else {
-                               T1 = F_[BACK_ROTATION][LAST][LAST];
-                               T2 = F_[BACK_ROTATION][1][LAST];
-                               T3 = F_[BACK_ROTATION][0][LAST];
-                               F_[BACK_ROTATION][LAST][LAST] = F_[LEFT_ROTATION][0][0];
-                               F_[BACK_ROTATION][1][LAST] = F_[LEFT_ROTATION][1][0];
-                               F_[BACK_ROTATION][0][LAST] = F_[LEFT_ROTATION][LAST][0];
-                               F_[LEFT_ROTATION][0][0] = F_[FRONT_ROTATION][0][0];
-                               F_[LEFT_ROTATION][1][0] = F_[FRONT_ROTATION][1][0];
-                               F_[LEFT_ROTATION][LAST][0] = F_[FRONT_ROTATION][LASTX][0];
-                               F_[FRONT_ROTATION][0][0] = F_[RIGHT_ROTATION][0][0];
-                               F_[FRONT_ROTATION][1][0] = F_[RIGHT_ROTATION][1][0];
-                               F_[FRONT_ROTATION][LASTX][0] = F_[RIGHT_ROTATION][LAST][0];
-                               F_[RIGHT_ROTATION][0][0] = T1;  /* F_[BACK_ROTATION][LAST][LAST]; */
-                               F_[RIGHT_ROTATION][1][0] = T2;  /* F_[BACK_ROTATION][1][LAST]; */
-                               F_[RIGHT_ROTATION][LAST][0] = T3;       /* F_[BACK_ROTATION][0][LAST]; */
-                       }
-                       break;
-               case TOP_ROTATION:
-                       if (orient == CLOCK_WISE) {
-                               T1 = F_[BACK_ROTATION][0][0];
-                               T2 = F_[BACK_ROTATION][1][0];
-                               T3 = F_[BACK_ROTATION][LAST][0];
-                               F_[BACK_ROTATION][0][0] = F_[LEFT_ROTATION][LAST][LAST];
-                               F_[BACK_ROTATION][1][0] = F_[LEFT_ROTATION][1][LAST];
-                               F_[BACK_ROTATION][LAST][0] = F_[LEFT_ROTATION][0][LAST];
-                               F_[LEFT_ROTATION][LAST][LAST] = F_[FRONT_ROTATION][LASTX][LASTY];
-                               F_[LEFT_ROTATION][1][LAST] = F_[FRONT_ROTATION][1][LASTY];
-                               F_[LEFT_ROTATION][0][LAST] = F_[FRONT_ROTATION][0][LASTY];
-                               F_[FRONT_ROTATION][LASTX][LASTY] = F_[RIGHT_ROTATION][LAST][LAST];
-                               F_[FRONT_ROTATION][1][LASTY] = F_[RIGHT_ROTATION][1][LAST];
-                               F_[FRONT_ROTATION][0][LASTY] = F_[RIGHT_ROTATION][0][LAST];
-                               F_[RIGHT_ROTATION][LAST][LAST] = T1;    /* F_[BACK_ROTATION][0][0]; */
-                               F_[RIGHT_ROTATION][1][LAST] = T2;       /* F_[BACK_ROTATION][1][0]; */
-                               F_[RIGHT_ROTATION][0][LAST] = T3;       /* F_[BACK_ROTATION][LAST][0]; */
-                       } else {
-                               T1 = F_[RIGHT_ROTATION][LAST][LAST];
-                               T2 = F_[RIGHT_ROTATION][1][LAST];
-                               T3 = F_[RIGHT_ROTATION][0][LAST];
-                               F_[RIGHT_ROTATION][LAST][LAST] = F_[FRONT_ROTATION][LASTX][LASTY];
-                               F_[RIGHT_ROTATION][1][LAST] = F_[FRONT_ROTATION][1][LASTY];
-                               F_[RIGHT_ROTATION][0][LAST] = F_[FRONT_ROTATION][0][LASTY];
-                               F_[FRONT_ROTATION][LASTX][LASTY] = F_[LEFT_ROTATION][LAST][LAST];
-                               F_[FRONT_ROTATION][1][LASTY] = F_[LEFT_ROTATION][1][LAST];
-                               F_[FRONT_ROTATION][0][LASTY] = F_[LEFT_ROTATION][0][LAST];
-                               F_[LEFT_ROTATION][LAST][LAST] = F_[BACK_ROTATION][0][0];
-                               F_[LEFT_ROTATION][1][LAST] = F_[BACK_ROTATION][1][0];
-                               F_[LEFT_ROTATION][0][LAST] = F_[BACK_ROTATION][LAST][0];
-                               F_[BACK_ROTATION][0][0] = T1;   /* F_[RIGHT_ROTATION][LAST][LAST]; */
-                               F_[BACK_ROTATION][1][0] = T2;   /* F_[RIGHT_ROTATION][1][LAST]; */
-                               F_[BACK_ROTATION][LAST][0] = T3;        /* F_[RIGHT_ROTATION][0][LAST]; */
-                       }
-                       break;
+}
+
+static      Bool
+compare_moves(rubikstruct * rp, RubikMove move1, RubikMove move2, Bool opp)
+{
+       RubikSlice  slice1, slice2;
+
+       slice1 = convertMove(rp, move1);
+       slice2 = convertMove(rp, move2);
+       if (slice1.face == slice2.face &&
+           slice1.depth == slice2.depth) {
+               if (slice1.rotation == slice2.rotation) {       /* CW or CCW */
+                       if (!opp)
+                               return True;
+               } else {
+                       if (opp)
+                               return True;
+               }
        }
+       return False;
 }
 
 static void
 shuffle(ModeInfo * mi)
 {
        rubikstruct *rp = &rubik[MI_SCREEN(mi)];
-       int         i, mov, ori;
-
-       memset(F_[TOP_ROTATION], 'R', MAXSIZEXZ);
-       memset(F_[LEFT_ROTATION], 'Y', MAXSIZEZY);
-       memset(F_[FRONT_ROTATION], 'W', MAXSIZEXY);
-       memset(F_[RIGHT_ROTATION], 'G', MAXSIZEZY);
-       memset(F_[BOTTOM_ROTATION], 'O', MAXSIZEXZ);
-       memset(F_[BACK_ROTATION], 'B', MAXSIZEXY);
+       int         i, face, position;
+       RubikMove   move;
+
+       AVSIZE = MI_SIZE(mi);
+       if (AVSIZE < -MINSIZE)
+               AVSIZE = NRAND(-AVSIZE - MINSIZE + 1) + MINSIZE;
+       else if (AVSIZE < MINSIZE)
+               AVSIZE = MINSIZE;
+       /* Let me waste a little space for the moment */
+       /* Future cube to be LxMxN and not just NxNxN, but not done yet */
+       AVSIZESQ = AVSIZE * AVSIZE;
+#ifdef LMN
+       MAXSIZEX = AVSIZE;
+       MAXSIZEY = AVSIZE;
+       MAXSIZEZ = AVSIZE;
+       MAXSIZE = AVSIZE;
+       MAXSIZESQ = AVSIZESQ;
+#endif
 
+       for (face = 0; face < MAXFACES; face++) {
+               if (rp->cubeLoc[face] != NULL)
+                       (void) free((void *) rp->cubeLoc[face]);
+               if ((rp->cubeLoc[face] =
+                 (RubikLoc *) malloc(AVSIZESQ * sizeof (RubikLoc))) == NULL)
+                       (void) fprintf(stderr,
+                                      "Could not allocate memory for rubik cube position info\n");
+               for (position = 0; position < AVSIZESQ; position++) {
+                       rp->cubeLoc[face][position].face = face;
+                       rp->cubeLoc[face][position].rotation = TOP;
+               }
+       }
+       for (i = 0; i < MAXORIENT; i++) {
+               if (rp->rowLoc[i] != NULL)
+                       (void) free((void *) rp->rowLoc[i]);
+               if ((rp->rowLoc[i] =
+                    (RubikLoc *) malloc(AVSIZE * sizeof (RubikLoc))) == NULL)
+                       (void) fprintf(stderr,
+                                      "Could not allocate memory for rubik row position info\n");
+       }
        rp->storedmoves = MI_BATCHCOUNT(mi);
        if (rp->storedmoves < 0) {
-               if (rp->movedfaces != NULL)
-                       (void) free((void *) rp->movedfaces);
-               if (rp->movedorient != NULL)
-                       (void) free((void *) rp->movedorient);
-               rp->movedfaces = NULL;
-               rp->movedorient = NULL;
+               if (rp->moves != NULL)
+                       (void) free((void *) rp->moves);
+               rp->moves = NULL;
                rp->storedmoves = NRAND(-rp->storedmoves) + 1;
        }
-       if ((rp->storedmoves) && (rp->movedfaces == NULL))
-               if ((rp->movedfaces =
-               (char *) calloc(rp->storedmoves + 1, sizeof (char))) == NULL)
-                                   (void) fprintf(stderr,
+       if ((rp->storedmoves) && (rp->moves == NULL))
+               if ((rp->moves =
+                    (RubikMove *) calloc(rp->storedmoves + 1, sizeof (RubikMove))) == NULL)
+                       (void) fprintf(stderr,
                        "Could not allocate memory for rubik move buffer\n");
 
-       if ((rp->storedmoves) && (rp->movedorient == NULL))
-               if ((rp->movedorient =
-               (char *) calloc(rp->storedmoves + 1, sizeof (char))) == NULL)
-                                   (void) fprintf(stderr,
-                                                  "Could not allocate memory for rubik orient buffer\n");
-
        if (MI_CYCLES(mi) <= 1) {
                rp->anglestep = 90.0;
        } else {
@@ -1189,40 +1573,115 @@ shuffle(ModeInfo * mi)
                int         condition;
 
                do {
-                       mov = NRAND(6);
-                       ori = NRAND(2);
+                       move.face = NRAND(6);
+                       move.direction = NRAND(4);      /* Exclude CW and CCW, its ok */
+                       /*
+                        * Randomize position along diagonal, each plane gets an equal chance.
+                        * This trick will only work for NxNxN cubes
+                        * draw_cube DEPENDS on that they are chosen this way.
+                        */
+                       move.position = NRAND(AVSIZE) * (AVSIZE + 1);
+
+
                        condition = 1;
+
                        if (i > 0)      /* avoid immediate undoing moves */
-                               if (mov == rp->movedfaces[i - 1] &&
-                                   ori == rp->movedorient[i - 1])
+                               if (compare_moves(rp, move, rp->moves[i - 1], True))
                                        condition = 0;
                        if (i > 1)      /* avoid 3 consecutive identical moves */
-                               if (mov == rp->movedfaces[i - 1] &&
-                                   ori != rp->movedorient[i - 1] &&
-                                   rp->movedfaces[i - 1] == rp->movedfaces[i - 2] &&
-                                   rp->movedorient[i - 1] == rp->movedorient[i - 2])
+                               if (compare_moves(rp, move, rp->moves[i - 1], False) &&
+                                   compare_moves(rp, move, rp->moves[i - 2], False))
                                        condition = 0;
+                       /*
+                          * Still some silly moves being made....
+                        */
                } while (!condition);
                if (hideshuffling)
-                       evalmovement(mi, mov, ori);
-               rp->movedfaces[i] = mov;
-               rp->movedorient[i] = (ori == CLOCK_WISE) ? C_CLOCK_WISE : CLOCK_WISE;
+                       evalmovement(mi, move);
+               rp->moves[i] = move;
        }
-       rp->movement = NO_ROTATION;
+       rp->movement.face = NO_FACE;
        rp->rotatestep = 0;
        rp->action = hideshuffling ? ACTION_SOLVE : ACTION_SHUFFLE;
        rp->shufflingmoves = 0;
        rp->done = 0;
 }
 
+static void
+reshape(ModeInfo * mi, int width, int height)
+{
+       rubikstruct *rp = &rubik[MI_SCREEN(mi)];
+
+       glViewport(0, 0, rp->WindW = (GLint) width, rp->WindH = (GLint) height);
+       glMatrixMode(GL_PROJECTION);
+       glLoadIdentity();
+       glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 15.0);
+       glMatrixMode(GL_MODELVIEW);
+
+       rp->AreObjectsDefined[ObjCubit] = 0;
+}
+
+static void
+pinit(ModeInfo * mi)
+{
+       glClearDepth(1.0);
+       glClearColor(0.0, 0.0, 0.0, 1.0);
+       glColor3f(1.0, 1.0, 1.0);
+
+       glLightfv(GL_LIGHT0, GL_AMBIENT, ambient);
+       glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse);
+       glLightfv(GL_LIGHT0, GL_POSITION, position0);
+       glLightfv(GL_LIGHT1, GL_AMBIENT, ambient);
+       glLightfv(GL_LIGHT1, GL_DIFFUSE, diffuse);
+       glLightfv(GL_LIGHT1, GL_POSITION, position1);
+       glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient);
+       glLightModelfv(GL_LIGHT_MODEL_TWO_SIDE, lmodel_twoside);
+       glEnable(GL_LIGHTING);
+       glEnable(GL_LIGHT0);
+       glEnable(GL_LIGHT1);
+       glEnable(GL_DEPTH_TEST);
+       glEnable(GL_NORMALIZE);
+       glEnable(GL_CULL_FACE);
+
+       glShadeModel(GL_FLAT);
+       glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, front_shininess);
+       glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, front_specular);
+
+       shuffle(mi);
+}
+
+void
+init_rubik(ModeInfo * mi)
+{
+       int         screen = MI_SCREEN(mi);
+       rubikstruct *rp;
+
+       if (rubik == NULL) {
+               if ((rubik = (rubikstruct *) calloc(MI_NUM_SCREENS(mi),
+                                             sizeof (rubikstruct))) == NULL)
+                       return;
+       }
+       rp = &rubik[screen];
+       rp->step = NRAND(90);
+
+       if ((rp->glx_context = init_GL(mi)) != NULL) {
+
+               reshape(mi, MI_WIN_WIDTH(mi), MI_WIN_HEIGHT(mi));
+               objects = glGenLists(1);
+               pinit(mi);
+       }
+}
+
 void
 draw_rubik(ModeInfo * mi)
 {
        rubikstruct *rp = &rubik[MI_SCREEN(mi)];
-
        Display    *display = MI_DISPLAY(mi);
        Window      window = MI_WINDOW(mi);
 
+       if (!rp->glx_context)
+               return;
+
        glDrawBuffer(GL_BACK);
        glXMakeCurrent(display, window, rp->glx_context);
 
@@ -1245,30 +1704,26 @@ draw_rubik(ModeInfo * mi)
        if (rp->action == ACTION_SHUFFLE) {
                if (rp->done) {
                        if (++rp->rotatestep > DELAY_AFTER_SHUFFLING) {
-                               rp->movement = NO_ROTATION;
+                               rp->movement.face = NO_FACE;
                                rp->rotatestep = 0;
                                rp->action = ACTION_SOLVE;
                                rp->done = 0;
                        }
                } else {
-                       if (rp->movement == NO_ROTATION) {
+                       if (rp->movement.face == NO_FACE) {
                                if (rp->shufflingmoves < rp->storedmoves) {
                                        rp->rotatestep = 0;
-                                       rp->movement = rp->movedfaces[rp->shufflingmoves];
-                                       rp->orientation =
-                                               (rp->movedorient[rp->shufflingmoves] == CLOCK_WISE) ?
-                                               C_CLOCK_WISE : CLOCK_WISE;
+                                       rp->movement = rp->moves[rp->shufflingmoves];
                                } else {
                                        rp->rotatestep = 0;
                                        rp->done = 1;
                                }
                        } else {
-                               rp->rotatestep += (rp->orientation == CLOCK_WISE) ?
-                                       -rp->anglestep : rp->anglestep;
-                               if (rp->rotatestep > 90 || rp->rotatestep < -90) {
-                                       evalmovement(mi, rp->movement, rp->orientation);
+                               rp->rotatestep += rp->anglestep;
+                               if (rp->rotatestep > 90) {
+                                       evalmovement(mi, rp->movement);
                                        rp->shufflingmoves++;
-                                       rp->movement = NO_ROTATION;
+                                       rp->movement.face = NO_FACE;
                                }
                        }
                }
@@ -1277,22 +1732,22 @@ draw_rubik(ModeInfo * mi)
                        if (++rp->rotatestep > DELAY_AFTER_SOLVING)
                                shuffle(mi);
                } else {
-                       if (rp->movement == NO_ROTATION) {
+                       if (rp->movement.face == NO_FACE) {
                                if (rp->storedmoves > 0) {
                                        rp->rotatestep = 0;
-                                       rp->movement = rp->movedfaces[rp->storedmoves - 1];
-                                       rp->orientation = rp->movedorient[rp->storedmoves - 1];
+                                       rp->movement = rp->moves[rp->storedmoves - 1];
+                                       rp->movement.direction = (rp->movement.direction + (MAXORIENT / 2)) %
+                                               MAXORIENT;
                                } else {
                                        rp->rotatestep = 0;
                                        rp->done = 1;
                                }
                        } else {
-                               rp->rotatestep += (rp->orientation == CLOCK_WISE) ?
-                                       -rp->anglestep : rp->anglestep;
-                               if (rp->rotatestep > 90 || rp->rotatestep < -90) {
-                                       evalmovement(mi, rp->movement, rp->orientation);
+                               rp->rotatestep += rp->anglestep;
+                               if (rp->rotatestep > 90) {
+                                       evalmovement(mi, rp->movement);
                                        rp->storedmoves--;
-                                       rp->movement = NO_ROTATION;
+                                       rp->movement.face = NO_FACE;
                                }
                        }
                }
@@ -1309,73 +1764,13 @@ draw_rubik(ModeInfo * mi)
        rp->step += 0.05;
 }
 
-static void
-reshape(ModeInfo * mi, int width, int height)
-{
-       rubikstruct *rp = &rubik[MI_SCREEN(mi)];
-
-       glViewport(0, 0, rp->WindW = (GLint) width, rp->WindH = (GLint) height);
-       glMatrixMode(GL_PROJECTION);
-       glLoadIdentity();
-       glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 15.0);
-       glMatrixMode(GL_MODELVIEW);
-
-       rp->AreObjectsDefined[ObjCubit] = 0;
-}
-
-static void
-pinit(ModeInfo * mi)
-{
-       glClearDepth(1.0);
-       glClearColor(0.0, 0.0, 0.0, 1.0);
-       glColor3f(1.0, 1.0, 1.0);
-
-       glLightfv(GL_LIGHT0, GL_AMBIENT, ambient);
-       glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse);
-       glLightfv(GL_LIGHT0, GL_POSITION, position0);
-       glLightfv(GL_LIGHT1, GL_AMBIENT, ambient);
-       glLightfv(GL_LIGHT1, GL_DIFFUSE, diffuse);
-       glLightfv(GL_LIGHT1, GL_POSITION, position1);
-       glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient);
-       glLightModelfv(GL_LIGHT_MODEL_TWO_SIDE, lmodel_twoside);
-       glEnable(GL_LIGHTING);
-       glEnable(GL_LIGHT0);
-       glEnable(GL_LIGHT1);
-       glEnable(GL_DEPTH_TEST);
-       glEnable(GL_NORMALIZE);
-       glEnable(GL_CULL_FACE);
-
-       glShadeModel(GL_FLAT);
-       glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, front_shininess);
-       glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, front_specular);
-
-       shuffle(mi);
-}
-
-void
-init_rubik(ModeInfo * mi)
-{
-       int         screen = MI_SCREEN(mi);
-       rubikstruct *rp;
-
-       if (rubik == NULL) {
-               if ((rubik = (rubikstruct *) calloc(MI_NUM_SCREENS(mi),
-                                             sizeof (rubikstruct))) == NULL)
-                       return;
-       }
-       rp = &rubik[screen];
-       rp->step = NRAND(90);
-
-       rp->glx_context = init_GL(mi);
-
-       reshape(mi, MI_WIN_WIDTH(mi), MI_WIN_HEIGHT(mi));
-       objects = glGenLists(1);
-       pinit(mi);
-}
-
 void
 change_rubik(ModeInfo * mi)
 {
+       rubikstruct *rp = &rubik[MI_SCREEN(mi)];
+
+       if (!rp->glx_context)
+               return;
        pinit(mi);
 }
 
@@ -1387,16 +1782,21 @@ release_rubik(ModeInfo * mi)
 
                for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
                        rubikstruct *rp = &rubik[screen];
-
-                       if (rp->movedfaces != NULL)
-                               (void) free((void *) rp->movedfaces);
-                       if (rp->movedorient != NULL)
-                               (void) free((void *) rp->movedorient);
+                       int         i;
+
+                       for (i = 0; i < MAXFACES; i++)
+                               if (rp->cubeLoc[i] != NULL)
+                                       (void) free((void *) rp->cubeLoc[i]);
+                       for (i = 0; i < MAXORIENT; i++)
+                               if (rp->rowLoc[i] != NULL)
+                                       (void) free((void *) rp->rowLoc[i]);
+                       if (rp->moves != NULL)
+                               (void) free((void *) rp->moves);
                }
                (void) free((void *) rubik);
                rubik = NULL;
        }
+       FreeAllGL(MI_DISPLAY(mi));
 }
 
-#undef F_
 #endif
index cb6bd38b3e91b96848748b04a9283c9df03dfb86..95ddb410492393dc629c562616f093b498af06d4 100644 (file)
 static double sins [360];
 static double coss [360];
 
-static GC draw_gc, erase_gc;
+static GC draw_gc;
 static unsigned int default_fg_pixel;
-static int erase_speed, sleep_time, erase_mode;
-
-void erase_window (Display *dpy, Window win, GC gc, int width, int height,
-                  int mode, int delay);
+static int sleep_time;
 
 static void
 init_helix (Display *dpy, Window window)
@@ -46,7 +43,6 @@ init_helix (Display *dpy, Window window)
     get_pixel_resource ("foreground", "Foreground", dpy, cmap);
   draw_gc = XCreateGC (dpy, window, GCForeground, &gcv);
   gcv.foreground = get_pixel_resource ("background", "Background", dpy, cmap);
-  erase_gc = XCreateGC (dpy, window, GCForeground, &gcv);
 
   for (i = 0; i < 360; i++)
     {
@@ -257,7 +253,6 @@ random_trig (Display *dpy, Window window, XColor *color, Bool *got_color)
 static void
 random_helix_or_trig (Display *dpy, Window window)
 {
-  int i;
   Bool free_color = False;
   XColor color;
   int width, height;
@@ -276,7 +271,7 @@ random_helix_or_trig (Display *dpy, Window window)
   XSync (dpy, True);
   sleep ( sleep_time );
 
-  erase_window(dpy, window, erase_gc, width, height, erase_mode, erase_speed);
+  erase_full_window(dpy, window);
 
   if (free_color) XFreeColors (dpy, cmap, &color.pixel, 1, 0);
   XSync (dpy, True);
@@ -288,15 +283,15 @@ char *progclass = "Helix";
 
 char *defaults [] = {
   "Helix.background: black",           /* to placate SGI */
-  "Helix.eraseSpeed: 400",
-  "Helix.delay: 5",
-  "Helix.eraseMode: -1",
+  "*delay:      5",
+  "*eraseSpeed: 400",
+  "*eraseMode: -1",
   0
 };
 
 XrmOptionDescRec options [] = {   
-  { "-erase-speed",    ".eraseSpeed",          XrmoptionSepArg, 0 },
   { "-delay",           ".delay",               XrmoptionSepArg, 0 },
+  { "-erase-speed",    ".eraseSpeed",          XrmoptionSepArg, 0 },
   { "-erase-mode",      ".eraseMode",           XrmoptionSepArg, 0 },
   { 0 },
 };
@@ -305,9 +300,7 @@ int options_size = (sizeof (options) / sizeof (options[0]));
 void
 screenhack (Display *dpy, Window window)
 {
-  erase_speed = get_integer_resource("eraseSpeed", "Integer");
   sleep_time = get_integer_resource("delay", "Integer");
-  erase_mode = get_integer_resource("eraseMode", "Integer");
   init_helix (dpy, window);
   while (1)
     random_helix_or_trig (dpy, window);
index 8b56155de8093a87304019b2d64dc2643b65369f..7d290f2d6bb8073a75bab7429b9e440a0a59fac8 100644 (file)
@@ -55,9 +55,12 @@ static const char sccsid[] = "@(#)hop.c      4.02 97/04/01 xlockmore";
 # define DEFAULTS      "*count:                1000    \n"                     \
                                        "*cycles:               2500    \n"                     \
                                        "*delay:                10000   \n"                     \
-                                       "*ncolors:              200     \n"
+                                       "*ncolors:              200     \n"                     \
+                                       "*eraseSpeed:   400 \n"                         \
+                                       "*eraseMode:    -1 \n"
 # define SMOOTH_COLORS
 # include "xlockmore.h"                                /* from the xscreensaver distribution */
+# include "erase.h"
 #else  /* !STANDALONE */
 # include "xlock.h"                                    /* from the xlockmore distribution */
 #endif /* !STANDALONE */
@@ -231,8 +234,12 @@ draw_hop(ModeInfo * mi)
        }
        XDrawPoints(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi),
                    pointBuffer, hp->bufsize, CoordModeOrigin);
-       if (++hp->count > MI_CYCLES(mi))
-               init_hop(mi);
+       if (++hp->count > MI_CYCLES(mi)) {
+#ifdef STANDALONE
+         erase_full_window(MI_DISPLAY(mi), MI_WINDOW(mi));
+#endif /* STANDALONE */
+         init_hop(mi);
+       }
 }
 
 void
index 9c0def91e8169d45b85ef3dd400a36e2de6b1d66..04b1560a9feaad9ed7d65930f23cea2fb0a70d38 100644 (file)
@@ -238,7 +238,7 @@ char *defaults [] = {
   "*zw:                0.000",
 
   "*observer-z:        5",
-  "*delay:     100000",
+  "*delay:     30000",
   0
 };
 
index ede1e6f82a4722e0a26b00bf0943b74a5fc08d37..58ce0318b5c04add5ee7f49ad30413598734fee6 100644 (file)
@@ -9,6 +9,7 @@ $ link/exe=blitspin.exe     screenhack,blitspin,vms_axp_12.opt/opt
 $ link/exe=bouboule.exe     screenhack-xlock,bouboule,xlockmore,vms_axp_12.opt/opt
 $ link/exe=braid.exe        screenhack-xlock,braid,xlockmore,vms_axp_12.opt/opt
 $ link/exe=bubbles.exe      screenhack,bubbles,bubbles_default,vms_axp_12.opt/opt
+$ link/exe=coral.exe        screenhack,coral,vms_axp_12.opt/opt
 $ link/exe=decayscreen.exe  screenhack,decayscreen,vms_axp_12.opt/opt
 $ link/exe=deco.exe         screenhack,deco,vms_axp_12.opt/opt
 $ link/exe=drift.exe        screenhack-xlock,drift,xlockmore,vms_axp_12.opt/opt
@@ -16,7 +17,7 @@ $ link/exe=fadeplot.exe     screenhack-xlock,fadeplot,xlockmore,vms_axp_12.opt/o
 $ link/exe=flag.exe         screenhack-xlock,flag,xlockmore,vms_axp_12.opt/opt
 $ link/exe=flame.exe        screenhack,flame,vms_axp_12.opt/opt
 $ link/exe=forest.exe       screenhack-xlock,forest,xlockmore,vms_axp_12.opt/opt
-$ link/exe=fract.exe        screenhack-xlock,fract,xlockmore,vms_axp_12.opt/opt
+$ link/exe=vines.exe        screenhack-xlock,vines,xlockmore,vms_axp_12.opt/opt
 $ link/exe=galaxy.exe       screenhack-xlock,galaxy,xlockmore,vms_axp_12.opt/opt
 $ link/exe=grav.exe         screenhack-xlock,grav,xlockmore,vms_axp_12.opt/opt
 $ link/exe=greynetic        screenhack,greynetic,vms_axp_12.opt/opt
@@ -39,6 +40,7 @@ $ link/exe=pedal.exe        screenhack,pedal,vms_axp_12.opt/opt
 $ link/exe=penrose.exe      screenhack-xlock,penrose,xlockmore,vms_axp_12.opt/opt
 $ link/exe=pyro.exe         screenhack,pyro,vms_axp_12.opt/opt
 $ link/exe=qix.exe          screenhack,qix,vms_axp_12.opt/opt
+$ link/exe=rd-bomb.exe      screenhack,rd-bomb,vms_axp_12.opt/opt
 $ link/exe=rocks.exe        screenhack,rocks,vms_axp_12.opt/opt
 $ link/exe=rorschach.exe    screenhack,rorschach,vms_axp_12.opt/opt
 $ link/exe=sierpinski.exe   screenhack-xlock,sierpinski,xlockmore,vms_axp_12.opt/opt
@@ -59,6 +61,7 @@ $ link/exe=blitspin.exe     screenhack,blitspin,vms_axp.opt/opt
 $ link/exe=bouboule.exe     screenhack-xlock,bouboule,xlockmore,vms_axp.opt/opt
 $ link/exe=braid.exe        screenhack-xlock,braid,xlockmore,vms_axp.opt/opt
 $ link/exe=bubbles.exe      screenhack,bubbles,bubbles_default,vms_axp.opt/opt
+$ link/exe=coral.exe        screenhack,coral,vms_axp.opt/opt
 $ link/exe=decayscreen.exe  screenhack,decayscreen,vms_axp.opt/opt
 $ link/exe=deco.exe         screenhack,deco,vms_axp.opt/opt
 $ link/exe=drift.exe        screenhack-xlock,drift,xlockmore,vms_axp.opt/opt
@@ -66,7 +69,7 @@ $ link/exe=fadeplot.exe     screenhack-xlock,fadeplot,xlockmore,vms_axp.opt/opt
 $ link/exe=flag.exe         screenhack-xlock,flag,xlockmore,vms_axp.opt/opt
 $ link/exe=flame.exe        screenhack,flame,vms_axp.opt/opt
 $ link/exe=forest.exe       screenhack-xlock,forest,xlockmore,vms_axp.opt/opt
-$ link/exe=fract.exe        screenhack-xlock,fract,xlockmore,vms_axp.opt/opt
+$ link/exe=vines.exe        screenhack-xlock,vines,xlockmore,vms_axp.opt/opt
 $ link/exe=galaxy.exe       screenhack-xlock,galaxy,xlockmore,vms_axp.opt/opt
 $ link/exe=grav.exe         screenhack-xlock,grav,xlockmore,vms_axp.opt/opt
 $ link/exe=greynetic        screenhack,greynetic,vms_axp.opt/opt
@@ -89,6 +92,7 @@ $ link/exe=pedal.exe        screenhack,pedal,vms_axp.opt/opt
 $ link/exe=penrose.exe      screenhack-xlock,penrose,xlockmore,vms_axp.opt/opt
 $ link/exe=pyro.exe         screenhack,pyro,vms_axp.opt/opt
 $ link/exe=qix.exe          screenhack,qix,vms_axp.opt/opt
+$ link/exe=rd-bomb.exe      screenhack,rd-bomb,vms_axp.opt/opt
 $ link/exe=rocks.exe        screenhack,rocks,vms_axp.opt/opt
 $ link/exe=rorschach.exe    screenhack,rorschach,vms_axp.opt/opt
 $ link/exe=sierpinski.exe   screenhack-xlock,sierpinski,xlockmore,vms_axp.opt/opt
index e730fb807d0a30e15abc707b28adfe0eefe971e0..3e001cd97928d020ad091d48b22fa0cc2e629105 100644 (file)
@@ -9,6 +9,7 @@ $ link/exe=blitspin.exe     screenhack,blitspin,vms_decc_12.opt/opt
 $ link/exe=bouboule.exe     screenhack-xlock,bouboule,xlockmore,vms_decc_12.opt/opt
 $ link/exe=braid.exe        screenhack-xlock,braid,xlockmore,vms_decc_12.opt/opt
 $ link/exe=bubbles.exe      screenhack,bubbles,bubbles_default,vms_decc_12.opt/opt
+$ link/exe=coral.exe        screenhack,coral,vms_decc_12.opt/opt
 $ link/exe=decayscreen.exe  screenhack,decayscreen,vms_decc_12.opt/opt
 $ link/exe=deco.exe         screenhack,deco,vms_decc_12.opt/opt
 $ link/exe=drift.exe        screenhack-xlock,drift,xlockmore,vms_decc_12.opt/opt
@@ -16,7 +17,7 @@ $ link/exe=fadeplot.exe     screenhack-xlock,fadeplot,xlockmore,vms_decc_12.opt/
 $ link/exe=flag.exe         screenhack-xlock,flag,xlockmore,vms_decc_12.opt/opt
 $ link/exe=flame.exe        screenhack,flame,vms_decc_12.opt/opt
 $ link/exe=forest.exe       screenhack-xlock,forest,xlockmore,vms_decc_12.opt/opt
-$ link/exe=fract.exe        screenhack-xlock,fract,xlockmore,vms_decc_12.opt/opt
+$ link/exe=vines.exe        screenhack-xlock,vines,xlockmore,vms_decc_12.opt/opt
 $ link/exe=galaxy.exe       screenhack-xlock,galaxy,xlockmore,vms_decc_12.opt/opt
 $ link/exe=grav.exe         screenhack-xlock,grav,xlockmore,vms_decc_12.opt/opt
 $ link/exe=greynetic        screenhack,greynetic,vms_decc_12.opt/opt
@@ -39,6 +40,7 @@ $ link/exe=pedal.exe        screenhack,pedal,vms_decc_12.opt/opt
 $ link/exe=penrose.exe      screenhack-xlock,penrose,xlockmore,vms_decc_12.opt/opt
 $ link/exe=pyro.exe         screenhack,pyro,vms_decc_12.opt/opt
 $ link/exe=qix.exe          screenhack,qix,vms_decc_12.opt/opt
+$ link/exe=rd-bomb.exe      screenhack,rd-bombs,vms_decc_12.opt/opt
 $ link/exe=rocks.exe        screenhack,rocks,vms_decc_12.opt/opt
 $ link/exe=rorschach.exe    screenhack,rorschach,vms_decc_12.opt/opt
 $ link/exe=sierpinski.exe   screenhack-xlock,sierpinski,xlockmore,vms_decc_12.opt/opt
@@ -59,6 +61,7 @@ $ link/exe=blitspin.exe     screenhack,blitspin,vms_decc.opt/opt
 $ link/exe=bouboule.exe     screenhack-xlock,bouboule,xlockmore,vms_decc.opt/opt
 $ link/exe=braid.exe        screenhack-xlock,braid,xlockmore,vms_decc.opt/opt
 $ link/exe=bubbles.exe      screenhack,bubbles,bubbles_default,vms_decc.opt/opt
+$ link/exe=coral.exe        screenhack,coral,vms_decc.opt/opt
 $ link/exe=decayscreen.exe  screenhack,decayscreen,vms_decc.opt/opt
 $ link/exe=deco.exe         screenhack,deco,vms_decc.opt/opt
 $ link/exe=drift.exe        screenhack-xlock,drift,xlockmore,vms_decc.opt/opt
@@ -66,7 +69,7 @@ $ link/exe=fadeplot.exe     screenhack-xlock,fadeplot,xlockmore,vms_decc.opt/opt
 $ link/exe=flag.exe         screenhack-xlock,flag,xlockmore,vms_decc.opt/opt
 $ link/exe=flame.exe        screenhack,flame,vms_decc.opt/opt
 $ link/exe=forest.exe       screenhack-xlock,forest,xlockmore,vms_decc.opt/opt
-$ link/exe=fract.exe        screenhack-xlock,fract,xlockmore,vms_decc.opt/opt
+$ link/exe=vines.exe        screenhack-xlock,vines,xlockmore,vms_decc.opt/opt
 $ link/exe=galaxy.exe       screenhack-xlock,galaxy,xlockmore,vms_decc.opt/opt
 $ link/exe=grav.exe         screenhack-xlock,grav,xlockmore,vms_decc.opt/opt
 $ link/exe=greynetic        screenhack,greynetic,vms_decc.opt/opt
@@ -89,6 +92,7 @@ $ link/exe=pedal.exe        screenhack,pedal,vms_decc.opt/opt
 $ link/exe=penrose.exe      screenhack-xlock,penrose,xlockmore,vms_decc.opt/opt
 $ link/exe=pyro.exe         screenhack,pyro,vms_decc.opt/opt
 $ link/exe=qix.exe          screenhack,qix,vms_decc.opt/opt
+$ link/exe=rd-bombs.exe     screenhack,rd-bombs,vms_decc.opt/opt
 $ link/exe=rocks.exe        screenhack,rocks,vms_decc.opt/opt
 $ link/exe=rorschach.exe    screenhack,rorschach,vms_decc.opt/opt
 $ link/exe=sierpinski.exe   screenhack-xlock,sierpinski,xlockmore,vms_decc.opt/opt
index 5859b77ec5ed4a8c31294f71209da65c64d6dc38..af680ea2057e4a3e4ff80c174011fc38943c659a 100644 (file)
@@ -1,8 +1,8 @@
-/* -*- Mode: C; tab-width: 4 -*-
- * lisa.c --- animated full-loop lisajous figures
- */
+/* -*- Mode: C; tab-width: 4 -*- */
+/* lisa --- animated full-loop lisajous figures */
+
 #if !defined( lint ) && !defined( SABER )
-static const char sccsid[] = "@(#)lisa.c       4.03 97/05/10 xlockmore";
+static const char sccsid[] = "@(#)lisa.c       4.04 97/07/28 xlockmore";
 #endif
 
 /* Copyright (c) 1997 by Caleb Cullen.
@@ -38,28 +38,51 @@ static const char sccsid[] = "@(#)lisa.c    4.03 97/05/10 xlockmore";
 # define HACK_INIT                                     init_lisa
 # define HACK_DRAW                                     draw_lisa
 # define lisa_opts                                     xlockmore_opts
-# define DEFAULTS      "*count:                1       \n"                     \
+# define DEFAULTS      "*delay:                25000   \n"                     \
+                                       "*count:                1       \n"                     \
                                        "*cycles:               256     \n"                     \
-                                       "*delay:                25000   \n"                     \
                                        "*size:                 -1      \n"                     \
                                        "*ncolors:              200     \n"
 # define UNIFORM_COLORS
 # include "xlockmore.h"                                /* from the xscreensaver distribution */
+  void refresh_lisa(ModeInfo * mi);
+  void change_lisa(ModeInfo * mi);
 #else  /* !STANDALONE */
 # include "xlock.h"                                    /* from the xlockmore distribution */
 #endif /* !STANDALONE */
 
-ModeSpecOpt lisa_opts = { 
-  0, NULL, 0, NULL, NULL };
+#define  DEF_ADDITIVE     "True"
+
+static Bool additive;
+
+static XrmOptionDescRec lisa_xrm_opts[] =
+{
+       {"-additive", ".lisa.additive", XrmoptionNoArg, (caddr_t) "True"},
+       {"+additive", ".lisa.additive", XrmoptionNoArg, (caddr_t) "False"}
+};
+
+static argtype lisa_vars[] =
+{
+       {(caddr_t *) & additive, "additive", "Additive", DEF_ADDITIVE, t_Bool}
+};
+
+static OptionStruct lisa_vars_desc[] =
+{
+       {"-/+additive", "turn on/off additive functions mode"}
+};
+
+ModeSpecOpt lisa_opts =
+{2, lisa_xrm_opts, 1, lisa_vars, lisa_vars_desc};
+
 
 #define  DRAWLINES    1
 #define  TWOLOOPS     1
-#define  ADDITIVE     "True"
 #define  XVMAX        10       /* Maximum velocities */
 #define  YVMAX        10
 #define  LISAMAXFUNCS 2
 #define  NUMSTDFUNCS  10
 #define  MAXCYCLES    3
+#define  MINLISAS 1
 #define  lisasetcolor() \
 if (MI_NPIXELS(mi) > 2) { \
   XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_PIXEL(mi, loop->color)); \
@@ -95,33 +118,6 @@ typedef struct lisacontext_struct {
 } lisacons;
 
 static lisacons *Lisa = NULL;
-static Bool additive;
-
-#ifndef STANDALONE
-static XrmOptionDescRec lisa_xrm_opts[] =
-{
-       {"-additive", ".lisa.additive", XrmoptionNoArg, (caddr_t) "True"},
-       {"+additive", ".lisa.additive", XrmoptionNoArg, (caddr_t) "False"}
-};
-
-static argtype lisa_vars[] =
-{
-       {(caddr_t *) & additive, "additive", "Additive", ADDITIVE, t_Bool}
-};
-
-static OptionStruct lisa_vars_desc[] =
-{
-       {"-/+additive", "turn on/off additive functions mode"}
-};
-
-ModeSpecOpt lisa_opts =
-{2, lisa_xrm_opts, 1, lisa_vars, lisa_vars_desc};
-#endif /* STANDALONE */
-
-
-void refresh_lisa(ModeInfo * mi);
-void change_lisa(ModeInfo * mi);
-
 
 static lisafuncs Function[NUMSTDFUNCS] =
 {
@@ -381,6 +377,16 @@ initlisa(ModeInfo * mi, lisas * loop)
                           lp[pctr].x, lp[pctr].y);
 #endif
        }
+
+       {
+         int line_width = -15;  /* #### make this a resource */
+         if (line_width == 0)
+               line_width = -8;
+         if (line_width < 0)
+               line_width = NRAND(-line_width)+1;
+         XSetLineAttributes(MI_DISPLAY(mi), MI_GC(mi), line_width,
+                                                LineSolid, CapProjecting, JoinMiter);
+       }
 }
 
 void
@@ -397,8 +403,10 @@ init_lisa(ModeInfo * mi)
        lc = &Lisa[MI_SCREEN(mi)];
        lc->width = MI_WIN_WIDTH(mi);
        lc->height = MI_WIN_HEIGHT(mi);
-       lc->nlisajous = MI_BATCHCOUNT(mi);
        lc->loopcount = 0;
+       lc->nlisajous = MI_BATCHCOUNT(mi);
+       if (lc->nlisajous <= 0)
+               lc->nlisajous = 1;
 
        if (lc->lisajous == NULL) {
                if ((lc->lisajous = (lisas *) calloc(lc->nlisajous, sizeof (lisas))) \
diff --git a/hacks/lissie.c b/hacks/lissie.c
new file mode 100644 (file)
index 0000000..2a8fafa
--- /dev/null
@@ -0,0 +1,284 @@
+/* -*- Mode: C; tab-width: 4 -*- */
+/* lissie --- the Lissajous worm */
+
+#if !defined( lint ) && !defined( SABER )
+static const char sccsid[] = "@(#)lissie.c     4.04 97/07/28 xlockmore";
+#endif
+
+/*-
+ * lissie.c - The Lissajous worm for xlock, the X Window System
+ *               lockscreen.
+ *
+ * Copyright (c) 1996 by Alexander Jolk <ub9x@rz.uni-karlsruhe.de>
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation.
+ *
+ * This file is provided AS IS with no warranties of any kind.  The author
+ * shall have no liability with respect to the infringement of copyrights,
+ * trade secrets or any patents by this file or any part thereof.  In no
+ * event will the author be liable for any lost revenue or profits or
+ * other special, indirect and consequential damages.
+ *
+ * Revision History:
+ * 10-May-97: Compatible with xscreensaver
+ * 18-Aug-96: added refresh-hook.
+ * 01-May-96: written.
+ */
+
+#ifdef STANDALONE
+# define PROGCLASS "Lissie"
+# define HACK_INIT init_lissie
+# define HACK_DRAW draw_lissie
+# define lissie_opts xlockmore_opts
+# define DEFAULTS      "*delay:   10000 \n"    \
+                                       "*count:   1     \n"    \
+                                       "*cycles:  2000  \n"    \
+                                       "*size:   -200   \n"    \
+                                       "*ncolors: 64    \n"
+# define SMOOTH_COLORS
+# include "xlockmore.h"                /* in xscreensaver distribution */
+#else /* STANDALONE */
+# include "xlock.h"            /* in xlockmore distribution */
+#endif /* STANDALONE */
+
+ModeSpecOpt lissie_opts =
+{0, NULL, 0, NULL, NULL};
+
+#define MINSIZE 1
+
+#define Lissie(n)\
+       if (lissie->loc[(n)].x > 0 && lissie->loc[(n)].y > 0 &&\
+               lissie->loc[(n)].x <= lp->width && lissie->loc[(n)].y <= lp->height) {\
+               if (lissie->ri < 2)\
+                       XDrawPoint(display, MI_WINDOW(mi),\
+                               gc, lissie->loc[(n)].x, lissie->loc[(n)].y);\
+               else\
+                       XDrawArc(display, MI_WINDOW(mi), gc,\
+                               lissie->loc[(n)].x - lissie->ri / 2,\
+                               lissie->loc[(n)].y - lissie->ri / 2,\
+                               lissie->ri, lissie->ri, 0, 23040);\
+       }
+
+#define FLOATRAND(min,max)     ((min)+(LRAND()/MAXRAND)*((max)-(min)))
+#define INTRAND(min,max)     ((min)+NRAND((max)-(min)+1))
+
+#define MINDT  0.01
+#define MAXDT  0.15
+
+#define MAXLISSIELEN  100
+#define MINLISSIELEN  10
+#define MINLISSIES 1
+
+/* How many segments to draw per cycle when redrawing */
+#define REDRAWSTEP 3
+
+typedef struct {
+       double      tx, ty, dtx, dty;
+       int         xi, yi, ri, rx, ry, len, pos;
+       int         redrawing, redrawpos;
+       XPoint      loc[MAXLISSIELEN];
+       int         color;
+} lissiestruct;
+
+typedef struct {
+       int         width, height;
+       int         nlissies;
+       lissiestruct *lissie;
+       int         loopcount;
+} lissstruct;
+
+static lissstruct *lisses = NULL;
+
+
+static void
+drawlissie(ModeInfo * mi, lissiestruct * lissie)
+{
+       Display    *display = MI_DISPLAY(mi);
+       GC          gc = MI_GC(mi);
+       lissstruct *lp = &lisses[MI_SCREEN(mi)];
+       int         p = (++lissie->pos) % MAXLISSIELEN;
+       int         oldp = (lissie->pos - lissie->len + MAXLISSIELEN) % MAXLISSIELEN;
+
+       /* Let time go by ... */
+       lissie->tx += lissie->dtx;
+       lissie->ty += lissie->dty;
+       if (lissie->tx > 2 * M_PI)
+               lissie->tx -= 2 * M_PI;
+       if (lissie->ty > 2 * M_PI)
+               lissie->ty -= 2 * M_PI;
+
+       /* vary both (x/y) speeds by max. 1% */
+       lissie->dtx *= FLOATRAND(0.99, 1.01);
+       lissie->dty *= FLOATRAND(0.99, 1.01);
+       if (lissie->dtx < MINDT)
+               lissie->dtx = MINDT;
+       else if (lissie->dtx > MAXDT)
+               lissie->dtx = MAXDT;
+       if (lissie->dty < MINDT)
+               lissie->dty = MINDT;
+       else if (lissie->dty > MAXDT)
+               lissie->dty = MAXDT;
+
+       lissie->loc[p].x = lissie->xi + (int) (sin(lissie->tx) * lissie->rx);
+       lissie->loc[p].y = lissie->yi + (int) (sin(lissie->ty) * lissie->ry);
+
+       /* Mask */
+       XSetForeground(display, gc, MI_WIN_BLACK_PIXEL(mi));
+       Lissie(oldp);
+
+       /* Redraw */
+       if (MI_NPIXELS(mi) > 2) {
+               XSetForeground(display, gc, MI_PIXEL(mi, lissie->color));
+               if (++lissie->color >= MI_NPIXELS(mi))
+                       lissie->color = 0;
+       } else
+               XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(mi));
+       Lissie(p);
+       if (lissie->redrawing) {
+               int         i;
+
+               lissie->redrawpos++;
+               /* This compensates for the changed p
+                  since the last callback. */
+
+               for (i = 0; i < REDRAWSTEP; i++) {
+                       Lissie((p - lissie->redrawpos + MAXLISSIELEN) % MAXLISSIELEN);
+                       if (++(lissie->redrawpos) >= lissie->len) {
+                               lissie->redrawing = 0;
+                               break;
+                       }
+               }
+       }
+}
+
+static void
+initlissie(ModeInfo * mi, lissiestruct * lissie)
+{
+       lissstruct *lp = &lisses[MI_SCREEN(mi)];
+       int         size = MI_SIZE(mi);
+       int         i;
+
+       if (MI_NPIXELS(mi) > 2)
+               lissie->color = NRAND(MI_NPIXELS(mi));
+       else
+               lissie->color = MI_WIN_WHITE_PIXEL(mi);
+       /* Initialize parameters */
+       if (size < -MINSIZE)
+               lissie->ri = NRAND(MIN(-size, MAX(MINSIZE,
+                  MIN(lp->width, lp->height) / 4)) - MINSIZE + 1) + MINSIZE;
+       else if (size < MINSIZE) {
+               if (!size)
+                       lissie->ri = MAX(MINSIZE, MIN(lp->width, lp->height) / 4);
+               else
+                       lissie->ri = MINSIZE;
+       } else
+               lissie->ri = MIN(size, MAX(MINSIZE, MIN(lp->width, lp->height) / 4));
+       lissie->xi = INTRAND(lp->width / 4 + lissie->ri,
+                            lp->width * 3 / 4 - lissie->ri);
+       lissie->yi = INTRAND(lp->height / 4 + lissie->ri,
+                            lp->height * 3 / 4 - lissie->ri);
+       lissie->rx = INTRAND(lp->width / 4,
+                  MIN(lp->width - lissie->xi, lissie->xi)) - 2 * lissie->ri;
+       lissie->ry = INTRAND(lp->height / 4,
+                 MIN(lp->height - lissie->yi, lissie->yi)) - 2 * lissie->ri;
+       lissie->len = INTRAND(MINLISSIELEN, MAXLISSIELEN - 1);
+       lissie->pos = 0;
+
+       lissie->redrawing = 0;
+
+       lissie->tx = FLOATRAND(0, 2 * M_PI);
+       lissie->ty = FLOATRAND(0, 2 * M_PI);
+       lissie->dtx = FLOATRAND(MINDT, MAXDT);
+       lissie->dty = FLOATRAND(MINDT, MAXDT);
+
+       for (i = 0; i < MAXLISSIELEN; i++)
+               lissie->loc[i].x = lissie->loc[i].y = 0;
+       /* Draw lissie */
+       drawlissie(mi, lissie);
+}
+
+void
+init_lissie(ModeInfo * mi)
+{
+       lissstruct *lp;
+       unsigned char ball;
+
+       if (lisses == NULL) {
+               if ((lisses = (lissstruct *) calloc(MI_NUM_SCREENS(mi),
+                                              sizeof (lissstruct))) == NULL)
+                       return;
+       }
+       lp = &lisses[MI_SCREEN(mi)];
+
+       lp->width = MI_WIN_WIDTH(mi);
+       lp->height = MI_WIN_HEIGHT(mi);
+
+       lp->nlissies = MI_BATCHCOUNT(mi);
+       if (lp->nlissies < -MINLISSIES) {
+               if (lp->lissie) {
+                       (void) free((void *) lp->lissie);
+                       lp->lissie = NULL;
+               }
+               lp->nlissies = NRAND(-lp->nlissies - MINLISSIES + 1) + MINLISSIES;
+       } else if (lp->nlissies < MINLISSIES)
+               lp->nlissies = MINLISSIES;
+
+       lp->loopcount = 0;
+
+       if (!lp->lissie)
+               lp->lissie = (lissiestruct *) calloc(lp->nlissies, sizeof (lissiestruct));
+       XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi));
+       for (ball = 0; ball < (unsigned char) lp->nlissies; ball++)
+               initlissie(mi, &lp->lissie[ball]);
+
+}
+
+void
+draw_lissie(ModeInfo * mi)
+{
+       lissstruct *lp = &lisses[MI_SCREEN(mi)];
+       register unsigned char ball;
+
+       if (++lp->loopcount > MI_CYCLES(mi))
+               init_lissie(mi);
+       else
+               for (ball = 0; ball < (unsigned char) lp->nlissies; ball++)
+                       drawlissie(mi, &lp->lissie[ball]);
+}
+
+void
+release_lissie(ModeInfo * mi)
+{
+       if (lisses != NULL) {
+               int         screen;
+
+               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
+                       lissstruct *lp = &lisses[screen];
+
+                       if (lp->lissie) {
+                               (void) free((void *) lp->lissie);
+                               lp->lissie = NULL;
+                       }
+               }
+               (void) free((void *) lisses);
+               lisses = NULL;
+       }
+}
+
+void
+refresh_lissie(ModeInfo * mi)
+{
+       if (lisses != NULL) {
+               lissstruct *lp = &lisses[MI_SCREEN(mi)];
+               int         i;
+
+               for (i = 0; i < lp->nlissies; i++) {
+                       lp->lissie[i].redrawing = 1;
+                       lp->lissie[i].redrawpos = 0;
+               }
+       }
+}
index 0c7571acaab9af71603ef89c6911a2db0760ed9d..70c91eee893e5c730166100eaeb45be3c0f4fc6b 100644 (file)
@@ -423,12 +423,22 @@ static void initLMorph (void)
     gcClear = XCreateGC(dpy, window, GCForeground, &gcv);
     XClearWindow(dpy, window);
 
-    srandom(time(NULL));
     initPointArrays();
     aCurr = aWork[nWork = 0];
     aPrev = NULL;
     gam = 2.0;
     nTo = RND(cFig);
+
+    {
+      int width = random() % 10;
+      int style = LineSolid;
+      int cap   = (width > 1 ? CapRound  : CapButt);
+      int join  = (width > 1 ? JoinRound : JoinBevel);
+      if (width == 1) width = 0;
+      XSetLineAttributes(dpy, gcDraw,  width, style, cap, join);
+      XSetLineAttributes(dpy, gcClear, width, style, cap, join);
+    }
+
 }
 
 static void animateLMorph (void)
index aa2de92fcd36f337c76f687630415f28cf0b6153..ed59345177da72598d857673695664d93aa569da 100644 (file)
@@ -49,6 +49,7 @@
  *****************************************************************************/
 
 #include "screenhack.h"
+#include "erase.h"
 
 #define XROGER
 
@@ -1338,6 +1339,8 @@ char *defaults[] = {
 #ifdef XROGER
   "*logoColor: red3",
 #endif
+  "*eraseSpeed:   400",
+  "*eraseMode:    -1",
   0
 };
 
@@ -1498,6 +1501,7 @@ screenhack(Display *display, Window window)
       XSync (dpy, False);
       usleep (post_solve_delay);
       state = 0 ;
+      erase_full_window(display, window);
       break;
     default:
       abort ();
diff --git a/hacks/mountain.c b/hacks/mountain.c
new file mode 100644 (file)
index 0000000..0b44442
--- /dev/null
@@ -0,0 +1,240 @@
+/* -*- Mode: C; tab-width: 4 -*- */
+/* mountain -- square grid mountains */
+
+#if !defined( lint ) && !defined( SABER )
+static const char sccsid[] = "@(#)mountain.c   4.04 97/07/28 xlockmore";
+
+#endif
+
+/*-
+ * Copyright (c) 1995 Pascal Pensa <pensa@aurora.unice.fr>
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation.
+ *
+ * This file is provided AS IS with no warranties of any kind.  The author
+ * shall have no liability with respect to the infringement of copyrights,
+ * trade secrets or any patents by this file or any part thereof.  In no
+ * event will the author be liable for any lost revenue or profits or
+ * other special, indirect and consequential damages.
+ *
+ * Revision History:
+ * 10-May-97: Compatible with xscreensaver
+ */
+
+#ifdef STANDALONE
+# define PROGCLASS "Mountain"
+# define HACK_INIT init_mountain
+# define HACK_DRAW draw_mountain
+# define mountain_opts xlockmore_opts
+# define DEFAULTS      "*delay: 0 \n"          \
+                                       "*count: 30 \n"         \
+                                       "*cycles: 100 \n"       \
+                                       "*ncolors: 64 \n"
+# define SMOOTH_COLORS
+#include "xlockmore.h"         /* in xscreensaver distribution */
+#else /* STANDALONE */
+#include "xlock.h"             /* in xlockmore distribution */
+#endif /* STANDALONE */
+
+ModeSpecOpt mountain_opts =
+{0, NULL, 0, NULL, NULL};
+
+/* ~ 5000 Max mountain height (1000 - 10000) */
+#define MAXHEIGHT  (3 * (mp->width + mp->height))
+
+#define WORLDWIDTH 50          /* World size x * y */
+
+#define RANGE_RAND(min,max) ((min) + NRAND((max) - (min)))
+
+typedef struct {
+       int         pixelmode;
+       int         width;
+       int         height;
+       int         x, y;
+       int         offset;
+       int         stage;
+       int         h[WORLDWIDTH][WORLDWIDTH];
+       int         time;       /* up time */
+       int         first;
+       GC          stippled_GC;
+} mountainstruct;
+
+static mountainstruct *mountains = NULL;
+
+static void
+spread(int  (*m)[50], int x, int y)
+{
+       int         x2, y2;
+       int         h = m[x][y];
+
+       for (y2 = y - 1; y2 <= y + 1; y2++)
+               for (x2 = x - 1; x2 <= x + 1; x2++)
+                       if (x2 >= 0 && y2 >= 0 && x2 < WORLDWIDTH && y2 < WORLDWIDTH)
+                               m[x2][y2] = (m[x2][y2] + h) / 2;
+}
+
+static void
+drawamountain(ModeInfo * mi)
+{
+       Display    *display = MI_DISPLAY(mi);
+       Window      window = MI_WINDOW(mi);
+       GC          gc = MI_GC(mi);
+       mountainstruct *mp = &mountains[MI_SCREEN(mi)];
+       int         x2, y2, x3, y3, y4, y5, c = 0;
+       XPoint      p[5];
+
+       if (MI_NPIXELS(mi) > 2) {
+               c = (mp->h[mp->x][mp->y] + mp->h[mp->x + 1][mp->y] +
+                 mp->h[mp->x][mp->y + 1] + mp->h[mp->x + 1][mp->y + 1]) / 4;
+               c = (c / 10 + mp->offset) % MI_NPIXELS(mi);
+       }
+       x2 = mp->x * (2 * mp->width) / (3 * WORLDWIDTH);
+       y2 = mp->y * (2 * mp->height) / (3 * WORLDWIDTH);
+       p[0].x = (x2 - y2 / 2) + (mp->width / 4);
+       p[0].y = (y2 - mp->h[mp->x][mp->y]) + mp->height / 4;
+
+       x3 = (mp->x + 1) * (2 * mp->width) / (3 * WORLDWIDTH);
+       y3 = mp->y * (2 * mp->height) / (3 * WORLDWIDTH);
+       p[1].x = (x3 - y3 / 2) + (mp->width / 4);
+       p[1].y = (y3 - mp->h[mp->x + 1][mp->y]) + mp->height / 4;
+
+       y4 = (mp->y + 1) * (2 * mp->height) / (3 * WORLDWIDTH);
+       p[2].x = (x3 - y4 / 2) + (mp->width / 4);
+       p[2].y = (y4 - mp->h[mp->x + 1][mp->y + 1]) + mp->height / 4;
+
+       y5 = (mp->y + 1) * (2 * mp->height) / (3 * WORLDWIDTH);
+       p[3].x = (x2 - y5 / 2) + (mp->width / 4);
+       p[3].y = (y5 - mp->h[mp->x][mp->y + 1]) + mp->height / 4;
+
+       p[4].x = p[0].x;
+       p[4].y = p[0].y;
+
+       if (MI_NPIXELS(mi) > 2)
+               XSetForeground(display, gc, MI_PIXEL(mi, c));
+       else
+               XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(mi));
+       XFillPolygon(display, window, gc, p, 4, Complex, CoordModeOrigin);
+
+       if (!mp->pixelmode) {
+               XSetForeground(display, gc, MI_WIN_BLACK_PIXEL(mi));
+               XDrawLines(display, window, gc, p, 5, CoordModeOrigin);
+       }
+       mp->x++;
+       if (mp->x == WORLDWIDTH - 1) {
+               mp->y++;
+               mp->x = 0;
+       }
+       if (mp->y == WORLDWIDTH - 1)
+               mp->stage++;
+}
+
+void
+init_mountain(ModeInfo * mi)
+{
+       mountainstruct *mp;
+       int         i, j, x, y;
+       XGCValues   gcv;
+
+       if (mountains == NULL) {
+               if ((mountains = (mountainstruct *) calloc(MI_NUM_SCREENS(mi),
+                                          sizeof (mountainstruct))) == NULL)
+                       return;
+       }
+       mp = &mountains[MI_SCREEN(mi)];
+       mp->width = MI_WIN_WIDTH(mi);
+       mp->height = MI_WIN_HEIGHT(mi);
+       mp->pixelmode = (mp->width + mp->height < 200);
+       mp->stage = 0;
+       mp->time = 0;
+       mp->x = mp->y = 0;
+       if (!mp->first) {
+               mp->first = 1;
+               gcv.foreground = MI_WIN_WHITE_PIXEL(mi);
+               gcv.background = MI_WIN_BLACK_PIXEL(mi);
+
+               mp->stippled_GC = XCreateGC(MI_DISPLAY(mi), MI_WINDOW(mi),
+                                         GCForeground | GCBackground, &gcv);
+       }
+       XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi));
+
+       for (y = 0; y < WORLDWIDTH; y++)
+               for (x = 0; x < WORLDWIDTH; x++)
+                       mp->h[x][y] = 0;
+
+       j = MI_BATCHCOUNT(mi);
+       if (j < 0)
+               j = NRAND(-j) + 1;
+       for (i = 0; i < j; i++)
+               mp->h[RANGE_RAND(1, WORLDWIDTH - 1)][RANGE_RAND(1, WORLDWIDTH - 1)] =
+                       NRAND(MAXHEIGHT);
+
+       for (y = 0; y < WORLDWIDTH; y++)
+               for (x = 0; x < WORLDWIDTH; x++)
+                       spread(mp->h, x, y);
+
+       for (y = 0; y < WORLDWIDTH; y++)
+               for (x = 0; x < WORLDWIDTH; x++) {
+                       mp->h[x][y] = mp->h[x][y] + NRAND(10) - 5;
+                       if (mp->h[x][y] < 10)
+                               mp->h[x][y] = 0;
+               }
+
+       if (MI_NPIXELS(mi) > 2)
+               mp->offset = NRAND(MI_NPIXELS(mi));
+       else
+               mp->offset = 0;
+}
+
+void
+draw_mountain(ModeInfo * mi)
+{
+       mountainstruct *mp = &mountains[MI_SCREEN(mi)];
+
+       switch (mp->stage) {
+               case 0:
+                       drawamountain(mi);
+                       break;
+               case 1:
+#ifdef STANDALONE
+                 XSync(MI_DISPLAY(mi), False);
+                 usleep(2000000);
+#else
+                       MI_PAUSE(mi) = 2000000;
+#endif
+                       /*if (++mp->time > MI_CYCLES(mi)); */
+                       mp->stage++;
+                       break;
+               case 2:
+                       init_mountain(mi);
+                       break;
+       }
+}
+
+void
+release_mountain(ModeInfo * mi)
+{
+       if (mountains != NULL) {
+               int         screen;
+
+               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
+                       mountainstruct *mp = &mountains[screen];
+
+                       XFreeGC(MI_DISPLAY(mi), mp->stippled_GC);
+               }
+               (void) free((void *) mountains);
+               mountains = NULL;
+       }
+}
+
+void
+refresh_mountain(ModeInfo * mi)
+{
+       mountainstruct *mp = &mountains[MI_SCREEN(mi)];
+
+       mp->x = 0;
+       mp->y = 0;
+}
index ff8791e6f64076b99a62acbad1a5430624a2e788..6454e283491fb1c224820af1faa313e2169c95b7 100644 (file)
@@ -1,6 +1,25 @@
 /* -*- Mode: C; tab-width: 4 -*-
  * penrose --- quasiperiodic tilings.
  */
+
+/*  As reported in News of the Weird:
+
+         In April, Sir Roger Penrose, a British math professor who has worked
+         with Stephen Hawking on such topics as relativity, black holes, and
+         whether time has a beginning, filed a copyright-infringement lawsuit
+         against the Kimberly-Clark Corporation, which Penrose said copied a
+         pattern he created (a pattern demonstrating that "a nonrepeating
+         pattern could exist in nature") for its Kleenex quilted toilet paper.
+         Penrose said he doesn't like litigation but, "When it comes to the
+         population of Great Britain being invited by a multinational to wipe
+         their bottoms on what appears to be the work of a Knight of the
+         Realm, then a last stand must be taken."
+
+                                NOTW #491, 4-jul-1997, by Chuck Shepherd.
+                                http://www.nine.org/notw/notw.html
+ */
+
+
 #if !defined( lint ) && !defined( SABER )
 static const char sccsid[] = "@(#)penrose.c    4.00 97/01/01 xlockmore";
 #endif
@@ -21,8 +40,7 @@ static const char sccsid[] = "@(#)penrose.c   4.00 97/01/01 xlockmore";
  *
  * Revision History:
  * 10-May-97: jwz@netscape.com: turned into a standalone program.
- * 09-Sep-96: Written.
- */
+ * 09-Sep-96: Written.  */
 
 /*-
 Be careful, this probably still has a few bugs (many of which may only
diff --git a/hacks/pieces/puzzle.xbm b/hacks/pieces/puzzle.xbm
new file mode 100644 (file)
index 0000000..b09d668
--- /dev/null
@@ -0,0 +1,1614 @@
+#define puzzle_width 523
+#define puzzle_height 366
+static char puzzle_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0x03,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x07,0x00,
+ 0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x01,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x07,0x00,0x00,0x00,0x10,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,
+ 0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,
+ 0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x80,0x07,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,
+ 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x00,
+ 0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x08,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x80,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x07,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x07,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x80,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
+ 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x07,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,
+ 0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x18,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,
+ 0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x80,0x01,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1c,0x00,0x00,
+ 0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0xe0,0x00,0x00,0x00,0x0e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x00,0xf0,0x01,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0xe0,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0x03,0x00,0x00,0x00,0x00,
+ 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0xfe,0xff,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0xc0,0x07,
+ 0x00,0x7c,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x20,0x00,0x00,0x00,0x00,0x00,0xf0,0x01,0x00,0x1f,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x80,0x03,0x00,0x00,0x00,0x00,0x10,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x0e,0x00,0x00,
+ 0xe0,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x1c,
+ 0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,
+ 0x00,0x00,0xc0,0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0xc0,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x18,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x80,0x01,0x00,0x00,
+ 0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x0c,
+ 0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x0c,0x00,0x00,
+ 0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x04,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x80,0x01,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x80,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x06,0x00,0x00,0xf8,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x20,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,
+ 0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0xf8,0x00,0x00,0x60,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x30,
+ 0x00,0x00,0xf8,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,
+ 0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0x07,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0xf8,0x00,0x00,0x08,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0xf8,
+ 0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x03,0x00,0xf8,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0xf8,0x00,0x80,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x08,0x00,0xf8,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0xf8,0x00,0x20,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0xf8,
+ 0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x40,0x00,0xf8,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0xf8,0x00,0x08,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x80,0x00,0xf8,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xf8,0x00,0x02,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0xf8,
+ 0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x02,0xf8,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0xf8,0x80,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x08,0xf8,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xf8,0x40,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0xf8,
+ 0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x10,0xf8,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0xf8,0x20,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x20,0xf8,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xf8,0x10,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xf8,
+ 0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x80,0xf8,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xf8,0x08,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x80,0xf8,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf9,0x04,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf9,
+ 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf9,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfa,0x02,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xfa,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfa,0x02,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfa,
+ 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xfa,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x01,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xfc,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xfc,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x01,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xfc,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xfc,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x01,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xfc,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xfc,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfa,0x02,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xfa,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfa,0x02,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfa,
+ 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xfa,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf9,0x04,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf9,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf9,0x08,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xf8,
+ 0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x80,0xf8,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xf8,0x10,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x40,0xf8,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xf8,0x20,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0xf8,
+ 0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x20,0xf8,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0xf8,0x40,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x10,0xf8,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xf8,0x80,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xf8,
+ 0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x04,0xf8,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0xf8,0x00,0x02,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x02,0xf8,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xf8,0x00,0x08,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xf8,
+ 0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x40,0x00,0xf8,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0xf8,0x00,0x20,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x20,0x00,0xf8,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0xf8,0x00,0x80,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0xf8,
+ 0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x04,0x00,0xf8,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0xf8,0x00,0x00,0x08,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
+ 0x00,0x00,0xf8,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,
+ 0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0x07,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0xf8,0x00,0x00,0x60,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0xc0,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x20,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0xf8,
+ 0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x40,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x20,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x08,0x00,0x00,0xf8,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,
+ 0x18,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,
+ 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x0c,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x80,0x01,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x80,0x01,0x00,0x00,
+ 0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x0c,
+ 0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0xc0,0x00,0x00,
+ 0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x1c,0x00,0x00,0x00,0x00,0x08,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0xc0,0x01,0x00,0x00,
+ 0x00,0x07,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x80,0x03,
+ 0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,
+ 0x00,0x00,0x00,0x0e,0x00,0x00,0xe0,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0xc0,0x07,0x00,0x7c,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0xf0,0x01,0x00,0x1f,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0x03,0x00,0x00,0x00,0x00,
+ 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0xfe,0xff,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0xe0,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x00,0xf0,0x01,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x00,0x00,
+ 0x00,0x0e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x1c,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x80,0x01,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,
+ 0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,
+ 0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x80,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x80,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
+ 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x07,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x07,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x07,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,
+ 0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x80,0x07,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,
+ 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,
+ 0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x20,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x80,0x07,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x08,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,
+ 0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x80,0x07,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0x03,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf8};
diff --git a/hacks/pieces/puzzle_a_e_f.xbm b/hacks/pieces/puzzle_a_e_f.xbm
new file mode 100644 (file)
index 0000000..6960129
--- /dev/null
@@ -0,0 +1,77 @@
+#define puzzle_a_e_f_width 88
+#define puzzle_a_e_f_height 78
+#define puzzle_a_e_f_x_hot 20
+#define puzzle_a_e_f_y_hot 6
+static unsigned char puzzle_a_e_f_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xfc,
+   0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x03, 0x00, 0x00, 0xc0, 0xff, 0xff,
+   0x3f, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f,
+   0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00,
+   0xe0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0xe0,
+   0xff, 0xff, 0x7f, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0xe0, 0xff,
+   0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0xe0, 0xff, 0xff,
+   0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0x7f,
+   0x00, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00,
+   0x00, 0xc0, 0xff, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x00, 0x00,
+   0x80, 0xff, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x80,
+   0xff, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x80, 0xff,
+   0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x80, 0xff, 0xff,
+   0x1f, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1f,
+   0x00, 0x80, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1f, 0x00,
+   0x80, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x00, 0xc0,
+   0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff,
+   0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x7f, 0x00, 0xe0, 0xff, 0xff,
+   0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x7f,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x03, 0xfc, 0xff, 0xff, 0x7f, 0x00,
+   0x00, 0x00, 0xfe, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00,
+   0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x7e, 0x80, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xc0, 0xff, 0xc1, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x7f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x7f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x7f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x7f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x7f, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,
+   0xc0, 0xff, 0xc1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00,
+   0x7f, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00,
+   0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe,
+   0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff,
+   0xff, 0x03, 0xfc, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff,
+   0x00, 0xf0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x7f, 0x00,
+   0xe0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x00, 0xc0,
+   0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff,
+   0xff, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff,
+   0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x7f,
+   0x00, 0x00, 0x80, 0xff, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x00,
+   0x00, 0x80, 0xff, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x00, 0x00,
+   0x80, 0xff, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x80,
+   0xff, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff,
+   0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff,
+   0x3f, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x3f,
+   0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00,
+   0xe0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0xe0,
+   0xff, 0xff, 0x7f, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0xe0, 0xff,
+   0xff, 0x7f, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0xe0, 0xff, 0xff,
+   0x7f, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0xe0, 0xff, 0xff, 0x7f,
+   0x00, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00,
+   0x00, 0x00, 0xfc, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x03, 0x00, 0x00,
+   0x00, 0xc0, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xfc, 0x07, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0x03, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_a_e_h.xbm b/hacks/pieces/puzzle_a_e_h.xbm
new file mode 100644 (file)
index 0000000..a0de0dd
--- /dev/null
@@ -0,0 +1,77 @@
+#define puzzle_a_e_h_width 88
+#define puzzle_a_e_h_height 78
+#define puzzle_a_e_h_x_hot 20
+#define puzzle_a_e_h_y_hot 6
+static unsigned char puzzle_a_e_h_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0x3f, 0x0c, 0x00, 0x00, 0xc3, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xfc,
+   0x03, 0x18, 0x00, 0x80, 0x01, 0xfc, 0x03, 0x00, 0x00, 0xc0, 0x3f, 0x00,
+   0x30, 0x00, 0xc0, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x60,
+   0x00, 0x60, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
+   0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60,
+   0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
+   0x00, 0x60, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
+   0x60, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00, 0x60,
+   0x00, 0x00, 0xc0, 0x00, 0x00, 0x38, 0x00, 0xc0, 0x01, 0x00, 0x60, 0x00,
+   0x00, 0xc0, 0x00, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x60, 0x00, 0x00,
+   0x80, 0x01, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x60, 0x00, 0x00, 0x80,
+   0x01, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x60, 0x00, 0x00, 0x80, 0x01,
+   0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x60, 0x00, 0x00, 0x80, 0x01, 0x00,
+   0x18, 0x00, 0x80, 0x01, 0x00, 0x60, 0x00, 0x00, 0x00, 0x03, 0x00, 0x18,
+   0x00, 0x80, 0x01, 0x00, 0x60, 0x00, 0x00, 0x00, 0x03, 0x00, 0x18, 0x00,
+   0x80, 0x01, 0x00, 0x60, 0x00, 0x00, 0x00, 0x03, 0x00, 0x38, 0x00, 0xc0,
+   0x01, 0x00, 0x60, 0x00, 0x00, 0x00, 0x03, 0x00, 0x30, 0x00, 0xc0, 0x00,
+   0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
+   0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0xe0, 0x00, 0x70, 0x00, 0x00, 0x60,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0xc0, 0x03, 0x3c, 0x00, 0x00, 0x60, 0x00,
+   0x00, 0x00, 0x06, 0x00, 0x80, 0x0f, 0x1f, 0x00, 0x00, 0x60, 0x00, 0x00,
+   0x00, 0x06, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
+   0x07, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x60, 0x00, 0x7e, 0x80, 0x03,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0xff, 0xc1, 0x01, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xe0, 0xc1, 0xff, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x60, 0x70, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x60, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x60, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x60, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x60, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x60, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x60, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x60, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x60, 0x70, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x60, 0xe0, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
+   0xc0, 0xff, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
+   0x7f, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
+   0x00, 0x03, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
+   0x06, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06,
+   0x00, 0x80, 0x0f, 0x1f, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00,
+   0xc0, 0x03, 0x3c, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0xe0,
+   0x00, 0x70, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, 0x00,
+   0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x03, 0x00, 0x30, 0x00, 0xc0,
+   0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x03, 0x00, 0x38, 0x00, 0xc0, 0x01,
+   0x00, 0x60, 0x00, 0x00, 0x00, 0x03, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00,
+   0x60, 0x00, 0x00, 0x00, 0x03, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x60,
+   0x00, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x60, 0x00,
+   0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x60, 0x00, 0x00,
+   0x80, 0x01, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x60, 0x00, 0x00, 0x80,
+   0x01, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x60, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x60, 0x00, 0x00, 0xc0, 0x00, 0x00,
+   0x38, 0x00, 0xc0, 0x01, 0x00, 0x60, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x30,
+   0x00, 0xc0, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x60, 0x00,
+   0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60,
+   0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
+   0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
+   0x60, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x7c,
+   0x00, 0x00, 0xc0, 0x3f, 0x00, 0x30, 0x00, 0xc0, 0x00, 0xc0, 0x3f, 0x00,
+   0x00, 0x00, 0xfc, 0x03, 0x18, 0x00, 0x80, 0x01, 0xfc, 0x03, 0x00, 0x00,
+   0x00, 0xc0, 0x3f, 0x0c, 0x00, 0x00, 0xc3, 0x3f, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xfc, 0x07, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0x03, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_a_f.xbm b/hacks/pieces/puzzle_a_f.xbm
new file mode 100644 (file)
index 0000000..10e9243
--- /dev/null
@@ -0,0 +1,96 @@
+#define puzzle_a_f_width 108
+#define puzzle_a_f_height 78
+#define puzzle_a_f_x_hot 20
+#define puzzle_a_f_y_hot 5
+static unsigned char puzzle_a_f_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x3c, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00,
+   0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x0f,
+   0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc,
+   0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0xe0, 0xff, 0xff,
+   0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0xe0,
+   0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f,
+   0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff,
+   0xff, 0x7f, 0x00, 0xe0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff,
+   0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x1f, 0x00, 0x80,
+   0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x1f,
+   0x00, 0x80, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff,
+   0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0xff, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xff, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x0f, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff,
+   0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x00, 0xc0,
+   0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f,
+   0x00, 0xc0, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe,
+   0xff, 0x7f, 0x00, 0xe0, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xfe, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x03, 0xfc, 0xff, 0xff, 0x07, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff,
+   0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x80, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xe0, 0x07, 0x00, 0xc0, 0xff,
+   0xc1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xf8, 0x3f, 0x00,
+   0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x7f, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xfc, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x07, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x07, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x07, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x03, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xe0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00,
+   0xc0, 0xff, 0xc1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xf8,
+   0x3f, 0x00, 0x00, 0x7f, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x1f, 0xe0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe,
+   0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xfe, 0xff, 0xff, 0x03, 0xfc, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x07, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x7f, 0x00, 0xe0, 0xff, 0xff,
+   0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x00, 0xc0,
+   0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f,
+   0x00, 0xc0, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
+   0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xff, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0xff, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x1f, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff,
+   0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x1f, 0x00, 0x80,
+   0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x1f,
+   0x00, 0x80, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff,
+   0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0xe0, 0xff, 0xff,
+   0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0xe0,
+   0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f,
+   0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff,
+   0xff, 0x7f, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xe0, 0xff, 0xff, 0x7f, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff,
+   0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x0f, 0x00, 0x00,
+   0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07,
+   0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0x03, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_a_h.xbm b/hacks/pieces/puzzle_a_h.xbm
new file mode 100644 (file)
index 0000000..dc9cc6d
--- /dev/null
@@ -0,0 +1,96 @@
+#define puzzle_a_h_width 108
+#define puzzle_a_h_height 78
+#define puzzle_a_h_x_hot 20
+#define puzzle_a_h_y_hot 5
+static unsigned char puzzle_a_h_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x3c, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00,
+   0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x3f, 0x0c,
+   0x00, 0x00, 0xc3, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc,
+   0x03, 0x18, 0x00, 0x80, 0x01, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0x3f, 0x00, 0x30, 0x00, 0xc0, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xe0, 0x03, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x7c, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
+   0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60,
+   0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
+   0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0x00, 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xc0, 0x00, 0x00, 0x38, 0x00, 0xc0, 0x01, 0x00, 0x30, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00,
+   0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x80,
+   0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x18,
+   0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x03, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x0c, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00,
+   0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x38, 0x00, 0xc0,
+   0x01, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x30,
+   0x00, 0xc0, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
+   0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x06, 0x00, 0xe0, 0x00, 0x70, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0xc0, 0x03, 0x3c, 0x00, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x0f, 0x1f, 0x00, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0xfe, 0x07,
+   0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00,
+   0xf0, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x80, 0x03,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0xe0, 0x07, 0x00, 0xc0, 0xff,
+   0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xf8, 0x3f, 0x00,
+   0xe0, 0xc1, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f,
+   0x78, 0x00, 0x70, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xe0, 0x07, 0xe0, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x0c, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x70, 0x00, 0x3e, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, 0xe0, 0x00, 0xe0, 0x80,
+   0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0x70, 0x00,
+   0xc0, 0xff, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xf8,
+   0x3f, 0x00, 0x00, 0x7f, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x18, 0xe0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0xf0, 0x00,
+   0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
+   0xfe, 0x07, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
+   0x00, 0x80, 0x0f, 0x1f, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x06, 0x00, 0xc0, 0x03, 0x3c, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0xe0, 0x00, 0x70, 0x00, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x30, 0x00, 0xc0,
+   0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x38,
+   0x00, 0xc0, 0x01, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
+   0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x03, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x0c, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00,
+   0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x80,
+   0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x18,
+   0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0x00, 0x00, 0x38, 0x00, 0xc0, 0x01, 0x00, 0x30, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xc0, 0x00, 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00, 0x30, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
+   0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60,
+   0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
+   0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
+   0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xe0, 0x03, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xc0, 0x3f, 0x00, 0x30, 0x00, 0xc0, 0x00, 0xc0, 0x3f, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x18, 0x00, 0x80, 0x01, 0xfc,
+   0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x3f, 0x0c, 0x00, 0x00,
+   0xc3, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07,
+   0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0x03, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_a_n_f.xbm b/hacks/pieces/puzzle_a_n_f.xbm
new file mode 100644 (file)
index 0000000..989fefb
--- /dev/null
@@ -0,0 +1,91 @@
+#define puzzle_a_n_f_width 108
+#define puzzle_a_n_f_height 73
+#define puzzle_a_n_f_x_hot 21
+#define puzzle_a_n_f_y_hot 1
+static unsigned char puzzle_a_n_f_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x7e,
+   0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xe0, 0x07, 0x00,
+   0xc0, 0xff, 0xc1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xf8,
+   0x3f, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x7f, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xfc, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x07, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x07, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x07, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x07, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x7f, 0x00, 0xc0, 0xff, 0xc1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x3f, 0xf8, 0x3f, 0x00, 0x00, 0x7f, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x1f, 0xe0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xfe, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x03, 0xfc, 0xff, 0xff, 0x07, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff,
+   0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x7f, 0x00, 0xe0,
+   0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f,
+   0x00, 0xc0, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
+   0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xff, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xff, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x0f, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff,
+   0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x1f, 0x00, 0x80,
+   0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x1f,
+   0x00, 0x80, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff,
+   0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0xff, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff,
+   0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0xe0,
+   0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f,
+   0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff,
+   0xff, 0x7f, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xe0, 0xff, 0xff, 0x7f, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff,
+   0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x1f, 0x00, 0x80,
+   0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x0f,
+   0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xfc, 0x07, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00};
diff --git a/hacks/pieces/puzzle_a_n_h.xbm b/hacks/pieces/puzzle_a_n_h.xbm
new file mode 100644 (file)
index 0000000..3c6ef13
--- /dev/null
@@ -0,0 +1,91 @@
+#define puzzle_a_n_h_width 108
+#define puzzle_a_n_h_height 73
+#define puzzle_a_n_h_x_hot 21
+#define puzzle_a_n_h_y_hot 1
+static unsigned char puzzle_a_n_h_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x7e,
+   0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0xe0, 0x07, 0x00,
+   0xc0, 0xff, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xf8,
+   0x3f, 0x00, 0xe0, 0xc1, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xf0, 0x3f, 0x78, 0x00, 0x70, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xe0, 0x07, 0xe0, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x1c, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x0c, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x18, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x70, 0x00,
+   0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, 0xe0, 0x00,
+   0xe0, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f,
+   0x70, 0x00, 0xc0, 0xff, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x30, 0xf8, 0x3f, 0x00, 0x00, 0x7f, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x18, 0xe0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
+   0xf0, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
+   0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x06, 0x00, 0x80, 0x0f, 0x1f, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0xc0, 0x03, 0x3c, 0x00, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0xe0, 0x00, 0x70, 0x00, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, 0x00, 0x60,
+   0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x30,
+   0x00, 0xc0, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
+   0x00, 0x38, 0x00, 0xc0, 0x01, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x03, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x0c, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x03, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x0c, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00,
+   0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x80,
+   0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x18,
+   0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0x00, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x30, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xc0, 0x00, 0x00, 0x38, 0x00, 0xc0, 0x01, 0x00, 0x30, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00,
+   0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x60, 0x00, 0x60,
+   0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
+   0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
+   0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xe0, 0x03, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x7c, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xc0, 0x3f, 0x00, 0x30, 0x00, 0xc0, 0x00, 0xc0,
+   0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x18, 0x00, 0x80,
+   0x01, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x3f, 0x0c,
+   0x00, 0x00, 0xc3, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xfc, 0x07, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00};
diff --git a/hacks/pieces/puzzle_a_ne_f.xbm b/hacks/pieces/puzzle_a_ne_f.xbm
new file mode 100644 (file)
index 0000000..5ed2517
--- /dev/null
@@ -0,0 +1,79 @@
+#define puzzle_a_ne_f_width 89
+#define puzzle_a_ne_f_height 74
+#define puzzle_a_ne_f_x_hot 21
+#define puzzle_a_ne_f_y_hot 1
+static unsigned char puzzle_a_ne_f_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x7e, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xc0, 0xff, 0xc1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xc0, 0xff, 0xc1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x7f, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x0f, 0xfe, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x03, 0xf8, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0x7f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x00, 0x80, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x00, 0x80, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x00, 0xff, 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x00, 0xff, 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x80, 0xff, 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x80, 0xff, 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x80, 0xff, 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x80, 0xff, 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0xc0, 0xff, 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0x80, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0x80, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x00,
+   0x00, 0x00, 0x00, 0xfc, 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x07, 0x00,
+   0x00, 0x00, 0x00, 0xc0, 0xff, 0x0f, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_a_ne_h.xbm b/hacks/pieces/puzzle_a_ne_h.xbm
new file mode 100644 (file)
index 0000000..6b0b353
--- /dev/null
@@ -0,0 +1,79 @@
+#define puzzle_a_ne_h_width 89
+#define puzzle_a_ne_h_height 74
+#define puzzle_a_ne_h_x_hot 21
+#define puzzle_a_ne_h_y_hot 1
+static unsigned char puzzle_a_ne_h_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x7e, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0xc0, 0xff, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0xe0, 0xc1, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x70, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x70, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0xe0, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0xc0, 0xff, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x7f, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0xfe, 0x0f, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x0f, 0x3e, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0xc0, 0x03, 0x78, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0xe0, 0x00, 0xe0, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0x60, 0x00, 0xc0, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x00, 0x03, 0x00, 0x30, 0x00, 0x80, 0x01, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x00, 0x03, 0x00, 0x38, 0x00, 0x80, 0x03, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x00, 0x03, 0x00, 0x18, 0x00, 0x00, 0x03, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x00, 0x03, 0x00, 0x18, 0x00, 0x00, 0x03, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x00, 0x03, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x00, 0x03, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x00, 0x03, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x00, 0x03, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0xc0, 0x00, 0x00, 0x18, 0x00, 0x00, 0x03, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0xc0, 0x00, 0x00, 0x38, 0x00, 0x80, 0x03, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0xc0, 0x00, 0x00, 0x30, 0x00, 0x80, 0x01, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0xc0, 0x00, 0x00, 0x60, 0x00, 0xc0, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0xc0, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0xc0, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0xc0, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0xe0, 0x03, 0x00, 0x60, 0x00, 0xc0, 0x00, 0x00, 0xf8, 0x00,
+   0x00, 0x00, 0xc0, 0x3f, 0x00, 0x30, 0x00, 0x80, 0x01, 0x80, 0x7f, 0x00,
+   0x00, 0x00, 0x00, 0xfc, 0x03, 0x18, 0x00, 0x00, 0x03, 0xf8, 0x07, 0x00,
+   0x00, 0x00, 0x00, 0xc0, 0x3f, 0x0c, 0x00, 0x00, 0x86, 0x7f, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_a_nw_f.xbm b/hacks/pieces/puzzle_a_nw_f.xbm
new file mode 100644 (file)
index 0000000..9af2ee0
--- /dev/null
@@ -0,0 +1,73 @@
+#define puzzle_a_nw_f_width 88
+#define puzzle_a_nw_f_height 74
+#define puzzle_a_nw_f_x_hot 1
+#define puzzle_a_nw_f_y_hot 1
+static unsigned char puzzle_a_nw_f_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0xfe, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x03, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x03, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x03, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03,
+   0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00,
+   0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0xfe,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00,
+   0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00,
+   0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x7e, 0x00, 0xfe,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x83, 0xff, 0x03, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xfe, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x0f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x07, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x83, 0xff, 0x03, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0xfe, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
+   0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe,
+   0xff, 0xff, 0x3f, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff,
+   0xff, 0x0f, 0x00, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff,
+   0x07, 0x00, 0xfe, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x03,
+   0x00, 0xfc, 0xff, 0xff, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x03, 0x00,
+   0xfc, 0xff, 0xff, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x01, 0x00, 0xf8,
+   0xff, 0xff, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x01, 0x00, 0xf8, 0xff,
+   0xff, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x01, 0x00, 0xf8, 0xff, 0xff,
+   0x01, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x01, 0x00, 0xf8, 0xff, 0xff, 0x01,
+   0x00, 0x00, 0xfe, 0xff, 0xff, 0x01, 0x00, 0xf8, 0xff, 0xff, 0x01, 0x00,
+   0x00, 0xfe, 0xff, 0xff, 0x01, 0x00, 0xf8, 0xff, 0xff, 0x01, 0x00, 0x00,
+   0xfe, 0xff, 0xff, 0x01, 0x00, 0xf8, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfe,
+   0xff, 0xff, 0x03, 0x00, 0xfc, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfe, 0xff,
+   0xff, 0x03, 0x00, 0xfc, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfe, 0xff, 0xff,
+   0x07, 0x00, 0xfe, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x07,
+   0x00, 0xfe, 0xff, 0xff, 0x07, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x07, 0x00,
+   0xfe, 0xff, 0xff, 0x07, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x07, 0x00, 0xfe,
+   0xff, 0xff, 0x07, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x07, 0x00, 0xfe, 0xff,
+   0xff, 0x07, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x03, 0x00, 0xfc, 0xff, 0xff,
+   0x03, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x01, 0x00, 0xf8, 0xff, 0x3f, 0x00,
+   0x00, 0x00, 0x00, 0xfc, 0xff, 0x00, 0x00, 0xf0, 0xff, 0x03, 0x00, 0x00,
+   0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x3c, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_a_nw_h.xbm b/hacks/pieces/puzzle_a_nw_h.xbm
new file mode 100644 (file)
index 0000000..20cf860
--- /dev/null
@@ -0,0 +1,73 @@
+#define puzzle_a_nw_h_width 88
+#define puzzle_a_nw_h_height 74
+#define puzzle_a_nw_h_x_hot 1
+#define puzzle_a_nw_h_y_hot 1
+static unsigned char puzzle_a_nw_h_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x06, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
+   0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00,
+   0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x06,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
+   0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
+   0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x7e, 0x00, 0x06,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0xff, 0x03, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x83, 0x07, 0x06, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x0e, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x60, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x60, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x7c, 0x00, 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xfe, 0x01, 0x07, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x83, 0xff, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0xfe, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0xc0, 0x00, 0x00,
+   0x00, 0x06, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
+   0x06, 0x00, 0x00, 0xf8, 0xf0, 0x01, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06,
+   0x00, 0x00, 0x3c, 0xc0, 0x03, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00,
+   0x00, 0x0e, 0x00, 0x07, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
+   0x06, 0x00, 0x06, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x03,
+   0x00, 0x0c, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x03, 0x00,
+   0x1c, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x01, 0x00, 0x18,
+   0x00, 0xc0, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00,
+   0xc0, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x80,
+   0x01, 0x00, 0x00, 0x06, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x80, 0x01,
+   0x00, 0x00, 0x06, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00,
+   0x00, 0x06, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x00,
+   0x06, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x06,
+   0x00, 0x80, 0x03, 0x00, 0x1c, 0x00, 0x00, 0x03, 0x00, 0x00, 0x06, 0x00,
+   0x00, 0x03, 0x00, 0x0c, 0x00, 0x00, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00,
+   0x06, 0x00, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06,
+   0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00,
+   0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x06,
+   0x00, 0x00, 0x06, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00,
+   0xc0, 0x07, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x03, 0x00, 0x0c, 0x00, 0xfc,
+   0x03, 0x00, 0x00, 0xc0, 0x3f, 0x80, 0x01, 0x00, 0x18, 0xc0, 0x3f, 0x00,
+   0x00, 0x00, 0x00, 0xfc, 0xc3, 0x00, 0x00, 0x30, 0xfc, 0x03, 0x00, 0x00,
+   0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x3c, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_a_s_f.xbm b/hacks/pieces/puzzle_a_s_f.xbm
new file mode 100644 (file)
index 0000000..687750f
--- /dev/null
@@ -0,0 +1,91 @@
+#define puzzle_a_s_f_width 108
+#define puzzle_a_s_f_height 73
+#define puzzle_a_s_f_x_hot 20
+#define puzzle_a_s_f_y_hot 5
+static unsigned char puzzle_a_s_f_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x3c, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00,
+   0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x0f,
+   0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc,
+   0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0xe0, 0xff, 0xff,
+   0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0xe0,
+   0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f,
+   0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff,
+   0xff, 0x7f, 0x00, 0xe0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff,
+   0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x1f, 0x00, 0x80,
+   0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x1f,
+   0x00, 0x80, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff,
+   0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0xff, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xff, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x0f, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff,
+   0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x00, 0xc0,
+   0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f,
+   0x00, 0xc0, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe,
+   0xff, 0x7f, 0x00, 0xe0, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xfe, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x03, 0xfc, 0xff, 0xff, 0x07, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff,
+   0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x80, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xe0, 0x0f, 0x00, 0xc0, 0xff,
+   0xc1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xf8, 0x3f, 0x00,
+   0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x7f, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xfc, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x07, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x07, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x07, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x03, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xe0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00,
+   0xc0, 0xff, 0xc1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xf8,
+   0x3f, 0x00, 0x00, 0x7e, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x1f, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00};
diff --git a/hacks/pieces/puzzle_a_s_h.xbm b/hacks/pieces/puzzle_a_s_h.xbm
new file mode 100644 (file)
index 0000000..78c0d3e
--- /dev/null
@@ -0,0 +1,91 @@
+#define puzzle_a_s_h_width 108
+#define puzzle_a_s_h_height 73
+#define puzzle_a_s_h_x_hot 20
+#define puzzle_a_s_h_y_hot 5
+static unsigned char puzzle_a_s_h_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x3c, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00,
+   0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x3f, 0x0c,
+   0x00, 0x00, 0xc3, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc,
+   0x03, 0x18, 0x00, 0x80, 0x01, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0x3f, 0x00, 0x30, 0x00, 0xc0, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xe0, 0x03, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x7c, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
+   0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60,
+   0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
+   0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0x00, 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xc0, 0x00, 0x00, 0x38, 0x00, 0xc0, 0x01, 0x00, 0x30, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00,
+   0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x80,
+   0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x18,
+   0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x03, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x0c, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00,
+   0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x38, 0x00, 0xc0,
+   0x01, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x30,
+   0x00, 0xc0, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
+   0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x06, 0x00, 0xe0, 0x00, 0x70, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0xc0, 0x03, 0x3c, 0x00, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x0f, 0x1f, 0x00, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0xfe, 0x07,
+   0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
+   0xf0, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x01,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xe0, 0x0f, 0x00, 0xc0, 0xff,
+   0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xf8, 0x3f, 0x00,
+   0xe0, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f,
+   0x70, 0x00, 0x70, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0x07, 0xe0, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x03, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x70, 0x00, 0x7e, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, 0xe0, 0x00, 0xe0, 0xc1,
+   0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x78, 0x00,
+   0xc0, 0xff, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xf8,
+   0x3f, 0x00, 0x00, 0x7e, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x1c, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00};
diff --git a/hacks/pieces/puzzle_a_se_f.xbm b/hacks/pieces/puzzle_a_se_f.xbm
new file mode 100644 (file)
index 0000000..dbc5d0f
--- /dev/null
@@ -0,0 +1,73 @@
+#define puzzle_a_se_f_width 88
+#define puzzle_a_se_f_height 74
+#define puzzle_a_se_f_x_hot 20
+#define puzzle_a_se_f_y_hot 6
+static unsigned char puzzle_a_se_f_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xfc,
+   0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x03, 0x00, 0x00, 0xc0, 0xff, 0xff,
+   0x3f, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f,
+   0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00,
+   0xe0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0xe0,
+   0xff, 0xff, 0x7f, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0xe0, 0xff,
+   0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0xe0, 0xff, 0xff,
+   0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0x7f,
+   0x00, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x00,
+   0x00, 0xc0, 0xff, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x00, 0x00,
+   0x80, 0xff, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x80,
+   0xff, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x80, 0xff,
+   0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x80, 0xff, 0xff,
+   0x1f, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1f,
+   0x00, 0x80, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1f, 0x00,
+   0x80, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x00, 0xc0,
+   0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff,
+   0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x7f, 0x00, 0xe0, 0xff, 0xff,
+   0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x7f,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x03, 0xfc, 0xff, 0xff, 0x7f, 0x00,
+   0x00, 0x00, 0xfe, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00,
+   0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x7f, 0x80, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xc0, 0xff, 0xc1, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x7f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x7f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x7f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x7f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x7f, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,
+   0xc0, 0xff, 0xc1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00,
+   0x7e, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00,
+   0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,
+   0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00,
+   0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00,
+   0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x80,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x7f, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x7f, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x7f, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,
+   0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_a_se_h.xbm b/hacks/pieces/puzzle_a_se_h.xbm
new file mode 100644 (file)
index 0000000..3dbe22a
--- /dev/null
@@ -0,0 +1,73 @@
+#define puzzle_a_se_h_width 88
+#define puzzle_a_se_h_height 74
+#define puzzle_a_se_h_x_hot 20
+#define puzzle_a_se_h_y_hot 6
+static unsigned char puzzle_a_se_h_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0x3f, 0x0c, 0x00, 0x00, 0xc3, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xfc,
+   0x03, 0x18, 0x00, 0x80, 0x01, 0xfc, 0x03, 0x00, 0x00, 0xc0, 0x3f, 0x00,
+   0x30, 0x00, 0xc0, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x60,
+   0x00, 0x60, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
+   0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60,
+   0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
+   0x00, 0x60, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
+   0x60, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00, 0x60,
+   0x00, 0x00, 0xc0, 0x00, 0x00, 0x38, 0x00, 0xc0, 0x01, 0x00, 0x60, 0x00,
+   0x00, 0xc0, 0x00, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x60, 0x00, 0x00,
+   0x80, 0x01, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x60, 0x00, 0x00, 0x80,
+   0x01, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x60, 0x00, 0x00, 0x80, 0x01,
+   0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x60, 0x00, 0x00, 0x80, 0x01, 0x00,
+   0x18, 0x00, 0x80, 0x01, 0x00, 0x60, 0x00, 0x00, 0x00, 0x03, 0x00, 0x18,
+   0x00, 0x80, 0x01, 0x00, 0x60, 0x00, 0x00, 0x00, 0x03, 0x00, 0x18, 0x00,
+   0x80, 0x01, 0x00, 0x60, 0x00, 0x00, 0x00, 0x03, 0x00, 0x38, 0x00, 0xc0,
+   0x01, 0x00, 0x60, 0x00, 0x00, 0x00, 0x03, 0x00, 0x30, 0x00, 0xc0, 0x00,
+   0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
+   0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0xe0, 0x00, 0x70, 0x00, 0x00, 0x60,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0xc0, 0x03, 0x3c, 0x00, 0x00, 0x60, 0x00,
+   0x00, 0x00, 0x06, 0x00, 0x80, 0x0f, 0x1f, 0x00, 0x00, 0x60, 0x00, 0x00,
+   0x00, 0x06, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
+   0x03, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x60, 0x00, 0x7f, 0x80, 0x01,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0xff, 0xc1, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xe0, 0x80, 0x7f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x60, 0x70, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x60, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x60, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x60, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x60, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x60, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x60, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x60, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x60, 0x70, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x60, 0xe0, 0xc1, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
+   0xc0, 0xff, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
+   0x7e, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
+   0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x60, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x60, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
+   0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
+   0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
+   0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80,
+   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc0, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x60, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,
+   0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_a_sw_f.xbm b/hacks/pieces/puzzle_a_sw_f.xbm
new file mode 100644 (file)
index 0000000..5a000bf
--- /dev/null
@@ -0,0 +1,73 @@
+#define puzzle_a_sw_f_width 88
+#define puzzle_a_sw_f_height 74
+#define puzzle_a_sw_f_x_hot 1
+#define puzzle_a_sw_f_y_hot 6
+static unsigned char puzzle_a_sw_f_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x3c, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
+   0x7f, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff,
+   0x00, 0x00, 0xf0, 0xff, 0x03, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x01,
+   0x00, 0xf8, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x03, 0x00,
+   0xfc, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x07, 0x00, 0xfe,
+   0xff, 0xff, 0x07, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x07, 0x00, 0xfe, 0xff,
+   0xff, 0x07, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x07, 0x00, 0xfe, 0xff, 0xff,
+   0x07, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x07, 0x00, 0xfe, 0xff, 0xff, 0x07,
+   0x00, 0x00, 0xfe, 0xff, 0xff, 0x07, 0x00, 0xfe, 0xff, 0xff, 0x03, 0x00,
+   0x00, 0xfe, 0xff, 0xff, 0x03, 0x00, 0xfc, 0xff, 0xff, 0x03, 0x00, 0x00,
+   0xfe, 0xff, 0xff, 0x03, 0x00, 0xfc, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfe,
+   0xff, 0xff, 0x01, 0x00, 0xf8, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfe, 0xff,
+   0xff, 0x01, 0x00, 0xf8, 0xff, 0xff, 0x01, 0x00, 0x00, 0xfe, 0xff, 0xff,
+   0x01, 0x00, 0xf8, 0xff, 0xff, 0x01, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x01,
+   0x00, 0xf8, 0xff, 0xff, 0x01, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x01, 0x00,
+   0xf8, 0xff, 0xff, 0x01, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x01, 0x00, 0xf8,
+   0xff, 0xff, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x01, 0x00, 0xf8, 0xff,
+   0xff, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x03, 0x00, 0xfc, 0xff, 0xff,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x03, 0x00, 0xfc, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0xfe, 0xff, 0xff, 0x07, 0x00, 0xfe, 0xff, 0x7f, 0x00, 0x00,
+   0x00, 0xfe, 0xff, 0xff, 0x0f, 0x00, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00,
+   0xfe, 0xff, 0xff, 0x3f, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe,
+   0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x83, 0xff, 0x03, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x07, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x0f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x3f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x3f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x1f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x0f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x83, 0xff, 0x03, 0xfe,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x7e, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
+   0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0xfe,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0xfe, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x03, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x03, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x07, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07,
+   0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00,
+   0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_a_sw_h.xbm b/hacks/pieces/puzzle_a_sw_h.xbm
new file mode 100644 (file)
index 0000000..9b34a48
--- /dev/null
@@ -0,0 +1,73 @@
+#define puzzle_a_sw_h_width 88
+#define puzzle_a_sw_h_height 74
+#define puzzle_a_sw_h_x_hot 1
+#define puzzle_a_sw_h_y_hot 6
+static unsigned char puzzle_a_sw_h_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x3c, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
+   0x7f, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xc3,
+   0x00, 0x00, 0x30, 0xfc, 0x03, 0x00, 0x00, 0x00, 0xc0, 0x3f, 0x80, 0x01,
+   0x00, 0x18, 0xc0, 0x3f, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x03, 0x00,
+   0x0c, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x06, 0x00, 0x06,
+   0x00, 0xc0, 0x07, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00,
+   0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00,
+   0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x06,
+   0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x03, 0x00,
+   0x00, 0x06, 0x00, 0x00, 0x03, 0x00, 0x0c, 0x00, 0x00, 0x03, 0x00, 0x00,
+   0x06, 0x00, 0x80, 0x03, 0x00, 0x1c, 0x00, 0x00, 0x03, 0x00, 0x00, 0x06,
+   0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x06, 0x00,
+   0x80, 0x01, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x00, 0x06, 0x00, 0x80,
+   0x01, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x00, 0x06, 0x00, 0x80, 0x01,
+   0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x00, 0x06, 0x00, 0x80, 0x01, 0x00,
+   0x18, 0x00, 0x80, 0x01, 0x00, 0x00, 0x06, 0x00, 0x80, 0x01, 0x00, 0x18,
+   0x00, 0xc0, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00,
+   0xc0, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x03, 0x00, 0x1c, 0x00, 0xc0,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x03, 0x00, 0x0c, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x60, 0x00, 0x00,
+   0x00, 0x06, 0x00, 0x00, 0x0e, 0x00, 0x07, 0x00, 0x60, 0x00, 0x00, 0x00,
+   0x06, 0x00, 0x00, 0x3c, 0xc0, 0x03, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06,
+   0x00, 0x00, 0xf8, 0xf0, 0x01, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00,
+   0x00, 0xe0, 0x7f, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
+   0x00, 0x0f, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x80, 0x01, 0xfe, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x83, 0xff, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xfe, 0x01, 0x07, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x7c, 0x00, 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x30, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x30, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x38, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x18, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00,
+   0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x83, 0x07,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0xff, 0x03, 0x06,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x7e, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00,
+   0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x06,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
+   0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
+   0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_a_w_f.xbm b/hacks/pieces/puzzle_a_w_f.xbm
new file mode 100644 (file)
index 0000000..f85ef75
--- /dev/null
@@ -0,0 +1,77 @@
+#define puzzle_a_w_f_width 88
+#define puzzle_a_w_f_height 78
+#define puzzle_a_w_f_x_hot 1
+#define puzzle_a_w_f_y_hot 6
+static unsigned char puzzle_a_w_f_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x3c, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
+   0x7f, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff,
+   0x00, 0x00, 0xf0, 0xff, 0x03, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x01,
+   0x00, 0xf8, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x03, 0x00,
+   0xfc, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x07, 0x00, 0xfe,
+   0xff, 0xff, 0x07, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x07, 0x00, 0xfe, 0xff,
+   0xff, 0x07, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x07, 0x00, 0xfe, 0xff, 0xff,
+   0x07, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x07, 0x00, 0xfe, 0xff, 0xff, 0x07,
+   0x00, 0x00, 0xfe, 0xff, 0xff, 0x07, 0x00, 0xfe, 0xff, 0xff, 0x03, 0x00,
+   0x00, 0xfe, 0xff, 0xff, 0x03, 0x00, 0xfc, 0xff, 0xff, 0x03, 0x00, 0x00,
+   0xfe, 0xff, 0xff, 0x03, 0x00, 0xfc, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfe,
+   0xff, 0xff, 0x01, 0x00, 0xf8, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfe, 0xff,
+   0xff, 0x01, 0x00, 0xf8, 0xff, 0xff, 0x01, 0x00, 0x00, 0xfe, 0xff, 0xff,
+   0x01, 0x00, 0xf8, 0xff, 0xff, 0x01, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x01,
+   0x00, 0xf8, 0xff, 0xff, 0x01, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x01, 0x00,
+   0xf8, 0xff, 0xff, 0x01, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x01, 0x00, 0xf8,
+   0xff, 0xff, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x01, 0x00, 0xf8, 0xff,
+   0xff, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x03, 0x00, 0xfc, 0xff, 0xff,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x03, 0x00, 0xfc, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0xfe, 0xff, 0xff, 0x07, 0x00, 0xfe, 0xff, 0x7f, 0x00, 0x00,
+   0x00, 0xfe, 0xff, 0xff, 0x0f, 0x00, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00,
+   0xfe, 0xff, 0xff, 0x3f, 0xc0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe,
+   0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x01, 0x7e, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x83, 0xff, 0x03, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x07, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x0f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x3f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x3f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x1f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x0f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x83, 0xff, 0x03, 0xfe,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xf0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x3f, 0xc0,
+   0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x0f, 0x00, 0xff,
+   0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x07, 0x00, 0xfe, 0xff,
+   0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x03, 0x00, 0xfc, 0xff, 0xff,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x03, 0x00, 0xfc, 0xff, 0xff, 0x00,
+   0x00, 0x00, 0xfe, 0xff, 0xff, 0x01, 0x00, 0xf8, 0xff, 0xff, 0x00, 0x00,
+   0x00, 0xfe, 0xff, 0xff, 0x01, 0x00, 0xf8, 0xff, 0xff, 0x00, 0x00, 0x00,
+   0xfe, 0xff, 0xff, 0x01, 0x00, 0xf8, 0xff, 0xff, 0x01, 0x00, 0x00, 0xfe,
+   0xff, 0xff, 0x01, 0x00, 0xf8, 0xff, 0xff, 0x01, 0x00, 0x00, 0xfe, 0xff,
+   0xff, 0x01, 0x00, 0xf8, 0xff, 0xff, 0x01, 0x00, 0x00, 0xfe, 0xff, 0xff,
+   0x01, 0x00, 0xf8, 0xff, 0xff, 0x01, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x01,
+   0x00, 0xf8, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x03, 0x00,
+   0xfc, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x03, 0x00, 0xfc,
+   0xff, 0xff, 0x03, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x07, 0x00, 0xfe, 0xff,
+   0xff, 0x03, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x07, 0x00, 0xfe, 0xff, 0xff,
+   0x07, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x07, 0x00, 0xfe, 0xff, 0xff, 0x07,
+   0x00, 0x00, 0xfe, 0xff, 0xff, 0x07, 0x00, 0xfe, 0xff, 0xff, 0x07, 0x00,
+   0x00, 0xfe, 0xff, 0xff, 0x07, 0x00, 0xfe, 0xff, 0xff, 0x07, 0x00, 0x00,
+   0xfc, 0xff, 0xff, 0x03, 0x00, 0xfc, 0xff, 0xff, 0x03, 0x00, 0x00, 0xc0,
+   0xff, 0xff, 0x01, 0x00, 0xf8, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xfc,
+   0xff, 0x00, 0x00, 0xf0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x7f,
+   0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00,
+   0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_a_w_h.xbm b/hacks/pieces/puzzle_a_w_h.xbm
new file mode 100644 (file)
index 0000000..a82478f
--- /dev/null
@@ -0,0 +1,77 @@
+#define puzzle_a_w_h_width 88
+#define puzzle_a_w_h_height 78
+#define puzzle_a_w_h_x_hot 1
+#define puzzle_a_w_h_y_hot 6
+static unsigned char puzzle_a_w_h_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x3c, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
+   0x7f, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xc3,
+   0x00, 0x00, 0x30, 0xfc, 0x03, 0x00, 0x00, 0x00, 0xc0, 0x3f, 0x80, 0x01,
+   0x00, 0x18, 0xc0, 0x3f, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x03, 0x00,
+   0x0c, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x06, 0x00, 0x06,
+   0x00, 0xc0, 0x07, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00,
+   0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00,
+   0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x06,
+   0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x03, 0x00,
+   0x00, 0x06, 0x00, 0x00, 0x03, 0x00, 0x0c, 0x00, 0x00, 0x03, 0x00, 0x00,
+   0x06, 0x00, 0x80, 0x03, 0x00, 0x1c, 0x00, 0x00, 0x03, 0x00, 0x00, 0x06,
+   0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x06, 0x00,
+   0x80, 0x01, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x00, 0x06, 0x00, 0x80,
+   0x01, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x00, 0x06, 0x00, 0x80, 0x01,
+   0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x00, 0x06, 0x00, 0x80, 0x01, 0x00,
+   0x18, 0x00, 0x80, 0x01, 0x00, 0x00, 0x06, 0x00, 0x80, 0x01, 0x00, 0x18,
+   0x00, 0xc0, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00,
+   0xc0, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x03, 0x00, 0x1c, 0x00, 0xc0,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x03, 0x00, 0x0c, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x60, 0x00, 0x00,
+   0x00, 0x06, 0x00, 0x00, 0x0e, 0x00, 0x07, 0x00, 0x60, 0x00, 0x00, 0x00,
+   0x06, 0x00, 0x00, 0x3c, 0xc0, 0x03, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06,
+   0x00, 0x00, 0xf8, 0xf0, 0x01, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00,
+   0x00, 0xe0, 0x7f, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
+   0x00, 0x0f, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xc0, 0x01, 0x7e, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x83, 0xff, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xff, 0x83, 0x07, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x7e, 0x00, 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x38, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x30, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x18, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00,
+   0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x07,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0xff, 0x03, 0x06,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0xfe, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x0f, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
+   0xe0, 0x7f, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0xf8,
+   0xf0, 0x01, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x3c, 0xc0,
+   0x03, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0e, 0x00, 0x07,
+   0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00,
+   0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x03, 0x00, 0x0c, 0x00, 0xc0,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x03, 0x00, 0x1c, 0x00, 0xc0, 0x00,
+   0x00, 0x00, 0x06, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0xc0, 0x00, 0x00,
+   0x00, 0x06, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0xc0, 0x00, 0x00, 0x00,
+   0x06, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x00, 0x06,
+   0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x00, 0x06, 0x00,
+   0x80, 0x01, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x00, 0x06, 0x00, 0x80,
+   0x01, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x00, 0x06, 0x00, 0x80, 0x01,
+   0x00, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x06, 0x00, 0x80, 0x03, 0x00,
+   0x1c, 0x00, 0x00, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x03, 0x00, 0x0c,
+   0x00, 0x00, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00,
+   0x00, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00,
+   0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x06,
+   0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00,
+   0x00, 0x3e, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc0, 0x07, 0x00, 0x00,
+   0xfc, 0x03, 0x00, 0x03, 0x00, 0x0c, 0x00, 0xfc, 0x03, 0x00, 0x00, 0xc0,
+   0x3f, 0x80, 0x01, 0x00, 0x18, 0xc0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xfc,
+   0xc3, 0x00, 0x00, 0x30, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x7f,
+   0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00,
+   0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_b_e_f.xbm b/hacks/pieces/puzzle_b_e_f.xbm
new file mode 100644 (file)
index 0000000..a49e771
--- /dev/null
@@ -0,0 +1,95 @@
+#define puzzle_b_e_f_width 74
+#define puzzle_b_e_f_height 108
+#define puzzle_b_e_f_x_hot 6
+#define puzzle_b_e_f_y_hot 21
+static unsigned char puzzle_b_e_f_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x3f,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,
+   0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff,
+   0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x03, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xf0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
+   0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff,
+   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
+   0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0xc0, 0xff, 0xff,
+   0x00, 0x00, 0xf0, 0x01, 0xe0, 0x3f, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00,
+   0xff, 0x01, 0xe0, 0xff, 0x03, 0xf0, 0xff, 0xff, 0x03, 0xf0, 0xff, 0x01,
+   0xe0, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0x07, 0xff, 0xff, 0x01, 0xe0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf8, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfc, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf8, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xe0, 0x1f, 0xf0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xc0, 0x07, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00,
+   0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfe,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00,
+   0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfe,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xc0, 0x07,
+   0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xe0, 0x1f, 0xf0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfc, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0xe0, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0x07, 0xff, 0xff, 0x01,
+   0xe0, 0xff, 0x03, 0xf0, 0xff, 0xff, 0x03, 0xf0, 0xff, 0x01, 0xe0, 0x3f,
+   0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0xff, 0x01, 0xc0, 0x03, 0x00, 0xc0,
+   0xff, 0xff, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,
+   0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff,
+   0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x03, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xf0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
+   0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff,
+   0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x80, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_b_e_h.xbm b/hacks/pieces/puzzle_b_e_h.xbm
new file mode 100644 (file)
index 0000000..daa13c1
--- /dev/null
@@ -0,0 +1,95 @@
+#define puzzle_b_e_h_width 74
+#define puzzle_b_e_h_height 108
+#define puzzle_b_e_h_x_hot 6
+#define puzzle_b_e_h_y_hot 21
+static unsigned char puzzle_b_e_h_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x38,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x60, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xe0, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x60, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
+   0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,
+   0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70,
+   0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x80,
+   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x80, 0x01, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
+   0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0xc0, 0x00, 0xc0,
+   0x00, 0x00, 0xf0, 0x01, 0xe0, 0x3f, 0x00, 0xe0, 0x00, 0x80, 0x01, 0x00,
+   0xff, 0x01, 0x60, 0xfc, 0x03, 0x70, 0x00, 0x00, 0x03, 0xf0, 0x8f, 0x01,
+   0x60, 0xc0, 0x3f, 0x38, 0x00, 0x00, 0x06, 0xff, 0x80, 0x01, 0x60, 0x00,
+   0xfc, 0x1f, 0x00, 0x00, 0xfc, 0x0f, 0x80, 0x01, 0x30, 0x00, 0xc0, 0x0f,
+   0x00, 0x00, 0xf8, 0x00, 0x80, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x18, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x18, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x0c, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x18, 0xf0,
+   0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x30, 0xf8, 0x3f, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0xe0, 0x1f, 0xf0, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0xc0, 0x07, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,
+   0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x06,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,
+   0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x06,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0xc0, 0x07,
+   0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0xe0, 0x1f, 0xf0, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x30, 0xf8, 0x3f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x18, 0xf0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x0c, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x18, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x30, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x30, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x30, 0x00, 0xc0, 0x0f, 0x00, 0x00,
+   0xf8, 0x00, 0x80, 0x01, 0x60, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0xfc, 0x0f,
+   0x80, 0x01, 0x60, 0xc0, 0x3f, 0x38, 0x00, 0x00, 0x06, 0xff, 0x80, 0x01,
+   0x60, 0xfc, 0x03, 0x70, 0x00, 0x00, 0x03, 0xf0, 0x8f, 0x01, 0xe0, 0x3f,
+   0x00, 0xe0, 0x00, 0x80, 0x01, 0x00, 0xff, 0x01, 0xc0, 0x03, 0x00, 0xc0,
+   0x00, 0xc0, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x60, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
+   0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00,
+   0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30,
+   0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
+   0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x80, 0x01, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x80, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x07, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_b_f.xbm b/hacks/pieces/puzzle_b_f.xbm
new file mode 100644 (file)
index 0000000..895abf9
--- /dev/null
@@ -0,0 +1,95 @@
+#define puzzle_b_f_width 78
+#define puzzle_b_f_height 108
+#define puzzle_b_f_x_hot 5
+#define puzzle_b_f_y_hot 20
+static unsigned char puzzle_b_f_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x3f,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
+   0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff,
+   0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x03, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xf0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
+   0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff,
+   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
+   0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0xc0, 0xff, 0xff,
+   0x00, 0x00, 0xf0, 0x00, 0xe0, 0x3f, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00,
+   0xff, 0x01, 0xe0, 0xff, 0x03, 0xf0, 0xff, 0xff, 0x03, 0xf0, 0xff, 0x01,
+   0xe0, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0x07, 0xff, 0xff, 0x01, 0xe0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x03, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x03, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xf8, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x07, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
+   0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xfc, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x1f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf8, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xf0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xe0, 0x1f, 0xf0, 0xff, 0xff, 0xff,
+   0xff, 0x03, 0xfe, 0x01, 0xc0, 0x07, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xf8, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe,
+   0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff,
+   0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x0f, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe,
+   0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff,
+   0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x3f, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xc0, 0x07,
+   0xc0, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf8, 0x00, 0xe0, 0x1f, 0xf0, 0xff,
+   0xff, 0xff, 0xff, 0x03, 0xfe, 0x01, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x03, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x07, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
+   0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xfc, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x07, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x07, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07,
+   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xf0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xf0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x03, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0xe0, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0x07, 0xff, 0xff, 0x01,
+   0xe0, 0xff, 0x03, 0xf0, 0xff, 0xff, 0x03, 0xf0, 0xff, 0x01, 0xe0, 0x3f,
+   0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0xff, 0x01, 0xc0, 0x03, 0x00, 0xc0,
+   0xff, 0xff, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,
+   0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff,
+   0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x03, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xf0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
+   0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff,
+   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x80, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_b_h.xbm b/hacks/pieces/puzzle_b_h.xbm
new file mode 100644 (file)
index 0000000..0ecc204
--- /dev/null
@@ -0,0 +1,95 @@
+#define puzzle_b_h_width 78
+#define puzzle_b_h_height 108
+#define puzzle_b_h_x_hot 5
+#define puzzle_b_h_y_hot 20
+static unsigned char puzzle_b_h_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x38,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x70, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xe0, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x60, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30,
+   0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,
+   0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30,
+   0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x80,
+   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x80, 0x01, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
+   0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0xc0, 0x00, 0xc0,
+   0x00, 0x00, 0xf0, 0x00, 0xe0, 0x3f, 0x00, 0x60, 0x00, 0xc0, 0x01, 0x00,
+   0xff, 0x01, 0x60, 0xfc, 0x03, 0x30, 0x00, 0x80, 0x03, 0xf0, 0x8f, 0x01,
+   0x60, 0xc0, 0x3f, 0x18, 0x00, 0x00, 0x07, 0xff, 0x80, 0x01, 0x60, 0x00,
+   0xfc, 0x0f, 0x00, 0x00, 0xfe, 0x0f, 0x80, 0x01, 0x30, 0x00, 0xc0, 0x07,
+   0x00, 0x00, 0xfc, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
+   0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x18, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x18, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c,
+   0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x18, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18,
+   0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x18, 0xf0,
+   0x1f, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, 0x06, 0x30, 0xf8, 0x3f, 0x00,
+   0x00, 0x00, 0x00, 0xff, 0x07, 0x03, 0xe0, 0x1f, 0xf0, 0x00, 0x00, 0x00,
+   0xc0, 0x03, 0xfe, 0x01, 0xc0, 0x07, 0xc0, 0x01, 0x00, 0x00, 0xe0, 0x00,
+   0xf8, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x07, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
+   0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
+   0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0c, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x0c, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
+   0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
+   0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x38, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0xc0, 0x07,
+   0xc0, 0x01, 0x00, 0x00, 0xe0, 0x00, 0xf8, 0x00, 0xe0, 0x1f, 0xf0, 0x00,
+   0x00, 0x00, 0xc0, 0x03, 0xfe, 0x01, 0x30, 0xf8, 0x3f, 0x00, 0x00, 0x00,
+   0x00, 0xff, 0x07, 0x03, 0x18, 0xf0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xfe,
+   0x03, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c,
+   0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x06, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
+   0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x30, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x30, 0x00, 0xc0, 0x07, 0x00, 0x00,
+   0xfc, 0x00, 0x00, 0x03, 0x60, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0xfe, 0x0f,
+   0x80, 0x01, 0x60, 0xc0, 0x3f, 0x18, 0x00, 0x00, 0x07, 0xff, 0x80, 0x01,
+   0x60, 0xfc, 0x03, 0x30, 0x00, 0x80, 0x03, 0xf0, 0x8f, 0x01, 0xe0, 0x3f,
+   0x00, 0x60, 0x00, 0xc0, 0x01, 0x00, 0xff, 0x01, 0xc0, 0x03, 0x00, 0xc0,
+   0x00, 0xc0, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x60, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
+   0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x80,
+   0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30,
+   0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x80,
+   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x80, 0x01, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x80, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x07, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_b_n_f.xbm b/hacks/pieces/puzzle_b_n_f.xbm
new file mode 100644 (file)
index 0000000..e7a84b1
--- /dev/null
@@ -0,0 +1,79 @@
+#define puzzle_b_n_f_width 78
+#define puzzle_b_n_f_height 88
+#define puzzle_b_n_f_x_hot 6
+#define puzzle_b_n_f_y_hot 1
+static unsigned char puzzle_b_n_f_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xf0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xf0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x03, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x07, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xf8, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xfc, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x0f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07,
+   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xe0, 0x1f,
+   0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0xfe, 0x01, 0xc0, 0x07, 0xc0, 0xff,
+   0xff, 0xff, 0xff, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff,
+   0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x3f, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xfe, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc,
+   0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff,
+   0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x0f, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xfe, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
+   0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
+   0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x7f, 0x00,
+   0x00, 0x00, 0xc0, 0x07, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf8, 0x00,
+   0xe0, 0x1f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0xfe, 0x01, 0xf0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x0f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x1f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xfc, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xf8, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x07, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x03, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03,
+   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xf0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xe0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xe0, 0xff, 0x3f, 0xf8, 0xff, 0xff,
+   0x07, 0xff, 0xff, 0x01, 0xe0, 0xff, 0x03, 0xf0, 0xff, 0xff, 0x03, 0xf0,
+   0xff, 0x01, 0xe0, 0x3f, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0xff, 0x01,
+   0xc0, 0x03, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
+   0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
+   0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xf0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
+   0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff,
+   0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x03, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xe0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,
+   0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff,
+   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_b_n_h.xbm b/hacks/pieces/puzzle_b_n_h.xbm
new file mode 100644 (file)
index 0000000..aae6333
--- /dev/null
@@ -0,0 +1,79 @@
+#define puzzle_b_n_h_width 78
+#define puzzle_b_n_h_height 88
+#define puzzle_b_n_h_x_hot 6
+#define puzzle_b_n_h_y_hot 1
+static unsigned char puzzle_b_n_h_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x30, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x03, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x06, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
+   0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x18, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0c, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x0c, 0x18, 0xf0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, 0x06,
+   0x30, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x07, 0x03, 0xe0, 0x1f,
+   0xf0, 0x00, 0x00, 0x00, 0xc0, 0x03, 0xfe, 0x01, 0xc0, 0x07, 0xc0, 0x01,
+   0x00, 0x00, 0xe0, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00,
+   0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x30, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x06, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c,
+   0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00,
+   0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0c, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x06, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
+   0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
+   0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x70, 0x00,
+   0x00, 0x00, 0xc0, 0x07, 0xc0, 0x01, 0x00, 0x00, 0xe0, 0x00, 0xf8, 0x00,
+   0xe0, 0x1f, 0xf0, 0x00, 0x00, 0x00, 0xc0, 0x03, 0xfe, 0x01, 0x30, 0xf8,
+   0x3f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x07, 0x03, 0x18, 0xf0, 0x1f, 0x00,
+   0x00, 0x00, 0x00, 0xfe, 0x03, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x0c, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x18, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c,
+   0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x18, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x18, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
+   0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x30, 0x00,
+   0xc0, 0x0f, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x03, 0x60, 0x00, 0xfc, 0x1f,
+   0x00, 0x00, 0xfc, 0x0f, 0x80, 0x01, 0x60, 0xc0, 0x3f, 0x38, 0x00, 0x00,
+   0x06, 0xff, 0x80, 0x01, 0x60, 0xfc, 0x03, 0x70, 0x00, 0x00, 0x03, 0xf0,
+   0x8f, 0x01, 0xe0, 0x3f, 0x00, 0xe0, 0x00, 0x80, 0x01, 0x00, 0xff, 0x01,
+   0xc0, 0x03, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
+   0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
+   0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x60, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x70, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30,
+   0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,
+   0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x60, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
+   0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0xc0,
+   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x07, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_b_ne_f.xbm b/hacks/pieces/puzzle_b_ne_f.xbm
new file mode 100644 (file)
index 0000000..1a56171
--- /dev/null
@@ -0,0 +1,79 @@
+#define puzzle_b_ne_f_width 74
+#define puzzle_b_ne_f_height 88
+#define puzzle_b_ne_f_x_hot 6
+#define puzzle_b_ne_f_y_hot 1
+static unsigned char puzzle_b_ne_f_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xe0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf8, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xe0, 0x1f,
+   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xc0, 0x07, 0xc0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00,
+   0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfc,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00,
+   0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0xc0, 0x07, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0xe0, 0x1f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf8, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xe0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xe0, 0xff, 0x3f, 0xf8, 0xff, 0xff,
+   0x07, 0xff, 0xff, 0x01, 0xe0, 0xff, 0x03, 0xf0, 0xff, 0xff, 0x03, 0xf0,
+   0xff, 0x01, 0xe0, 0x3f, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0xff, 0x01,
+   0xc0, 0x03, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00,
+   0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
+   0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xf0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
+   0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff,
+   0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x03, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xe0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,
+   0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff,
+   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_b_ne_h.xbm b/hacks/pieces/puzzle_b_ne_h.xbm
new file mode 100644 (file)
index 0000000..7246499
--- /dev/null
@@ -0,0 +1,79 @@
+#define puzzle_b_ne_h_width 74
+#define puzzle_b_ne_h_height 88
+#define puzzle_b_ne_h_x_hot 6
+#define puzzle_b_ne_h_y_hot 1
+static unsigned char puzzle_b_ne_h_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xe0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x30, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x30, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x18, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x0c, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x18, 0xf0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x30, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0xe0, 0x1f,
+   0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0xc0, 0x07, 0xc0, 0x01,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,
+   0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x0c,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,
+   0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x07,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0xc0, 0x07, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0xe0, 0x1f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x30, 0xf8,
+   0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x18, 0xf0, 0x1f, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x0c, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x18, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x18, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x30, 0x00,
+   0xc0, 0x0f, 0x00, 0x00, 0xf8, 0x00, 0x80, 0x01, 0x60, 0x00, 0xfc, 0x1f,
+   0x00, 0x00, 0xfc, 0x0f, 0x80, 0x01, 0x60, 0xc0, 0x3f, 0x38, 0x00, 0x00,
+   0x06, 0xff, 0x80, 0x01, 0x60, 0xfc, 0x03, 0x70, 0x00, 0x00, 0x03, 0xf0,
+   0x8f, 0x01, 0xe0, 0x3f, 0x00, 0xe0, 0x00, 0x80, 0x01, 0x00, 0xff, 0x01,
+   0xc0, 0x03, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00,
+   0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
+   0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x60, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x70, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30,
+   0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,
+   0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x60, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
+   0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0xc0,
+   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x07, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_b_nw_f.xbm b/hacks/pieces/puzzle_b_nw_f.xbm
new file mode 100644 (file)
index 0000000..393e0b6
--- /dev/null
@@ -0,0 +1,79 @@
+#define puzzle_b_nw_f_width 74
+#define puzzle_b_nw_f_height 88
+#define puzzle_b_nw_f_x_hot 1
+#define puzzle_b_nw_f_y_hot 1
+static unsigned char puzzle_b_nw_f_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x1f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x1f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x3f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x7f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x3f, 0xe0, 0x1f, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x0f, 0x80, 0x0f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x07, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00,
+   0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
+   0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x03, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00,
+   0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x80, 0x0f, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xe0, 0x1f, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x7f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x3f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0xfe, 0xff, 0x83, 0xff, 0xff, 0x7f,
+   0xf0, 0xff, 0x1f, 0x00, 0xfe, 0x3f, 0x00, 0xff, 0xff, 0x3f, 0x00, 0xff,
+   0x1f, 0x00, 0xfe, 0x03, 0x00, 0xfe, 0xff, 0x1f, 0x00, 0xf0, 0x1f, 0x00,
+   0x3e, 0x00, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
+   0x00, 0xfc, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc,
+   0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x0f,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
+   0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe,
+   0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x1f,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xf0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xe0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
+   0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_b_nw_h.xbm b/hacks/pieces/puzzle_b_nw_h.xbm
new file mode 100644 (file)
index 0000000..7b33030
--- /dev/null
@@ -0,0 +1,79 @@
+#define puzzle_b_nw_h_width 74
+#define puzzle_b_nw_h_height 88
+#define puzzle_b_nw_h_x_hot 1
+#define puzzle_b_nw_h_y_hot 1
+static unsigned char puzzle_b_nw_h_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x18, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x18, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x30, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xc0, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x3f, 0x60, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f, 0x30, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x3c, 0xe0, 0x1f, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x0e, 0x80, 0x0f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,
+   0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0xc0,
+   0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00,
+   0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00,
+   0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x80, 0x0f, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xe0, 0x1f, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f, 0x30, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xe0, 0x3f, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xc0, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xc0, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x30, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x06, 0x00,
+   0x7c, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x30, 0x00, 0x06, 0xc0, 0xff, 0x00,
+   0x00, 0xe0, 0xff, 0x00, 0x18, 0x00, 0x06, 0xfc, 0x83, 0x01, 0x00, 0x70,
+   0xf0, 0x0f, 0x18, 0x00, 0xc6, 0x3f, 0x00, 0x03, 0x00, 0x38, 0x00, 0xff,
+   0x18, 0x00, 0xfe, 0x03, 0x00, 0x06, 0x00, 0x1c, 0x00, 0xf0, 0x1f, 0x00,
+   0x3e, 0x00, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
+   0x00, 0x0c, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c,
+   0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x0c,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x03, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
+   0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x30,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x30, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x03, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
+   0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x1c,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x70, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xe0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
+   0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_b_s_f.xbm b/hacks/pieces/puzzle_b_s_f.xbm
new file mode 100644 (file)
index 0000000..f72d739
--- /dev/null
@@ -0,0 +1,79 @@
+#define puzzle_b_s_f_width 78
+#define puzzle_b_s_f_height 88
+#define puzzle_b_s_f_x_hot 5
+#define puzzle_b_s_f_y_hot 20
+static unsigned char puzzle_b_s_f_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x3f,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,
+   0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff,
+   0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x03, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xf0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
+   0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff,
+   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
+   0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0xc0, 0xff, 0xff,
+   0x00, 0x00, 0xf0, 0x00, 0xe0, 0x3f, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00,
+   0xff, 0x01, 0xe0, 0xff, 0x03, 0xf0, 0xff, 0xff, 0x03, 0xf0, 0xff, 0x01,
+   0xe0, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0x07, 0xff, 0xff, 0x01, 0xe0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x03, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x03, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xf8, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x07, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
+   0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xfc, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x1f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf8, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xf0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xe0, 0x1f, 0xf0, 0xff, 0xff, 0xff,
+   0xff, 0x03, 0xfe, 0x01, 0xc0, 0x07, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xf8, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe,
+   0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff,
+   0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x0f, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe,
+   0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff,
+   0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x3f, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xc0, 0x07,
+   0xc0, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf8, 0x00, 0xe0, 0x1f, 0xf0, 0xff,
+   0xff, 0xff, 0xff, 0x03, 0xfe, 0x01, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x03, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x07, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
+   0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xfc, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x07, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x07, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07,
+   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xf0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xf0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x03, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xe0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xc0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_b_s_h.xbm b/hacks/pieces/puzzle_b_s_h.xbm
new file mode 100644 (file)
index 0000000..5f90670
--- /dev/null
@@ -0,0 +1,79 @@
+#define puzzle_b_s_h_width 78
+#define puzzle_b_s_h_height 88
+#define puzzle_b_s_h_x_hot 5
+#define puzzle_b_s_h_y_hot 20
+static unsigned char puzzle_b_s_h_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x38,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x60, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xe0, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x60, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
+   0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,
+   0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70,
+   0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x80,
+   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x80, 0x01, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
+   0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0xc0, 0x00, 0xc0,
+   0x00, 0x00, 0xf0, 0x00, 0xe0, 0x3f, 0x00, 0xe0, 0x00, 0x80, 0x01, 0x00,
+   0xff, 0x01, 0x60, 0xfc, 0x03, 0x70, 0x00, 0x00, 0x03, 0xf0, 0x8f, 0x01,
+   0x60, 0xc0, 0x3f, 0x38, 0x00, 0x00, 0x06, 0xff, 0x80, 0x01, 0x60, 0x00,
+   0xfc, 0x1f, 0x00, 0x00, 0xfc, 0x0f, 0x80, 0x01, 0x30, 0x00, 0xc0, 0x0f,
+   0x00, 0x00, 0xf8, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
+   0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x18, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x18, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c,
+   0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x18, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18,
+   0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x18, 0xf0,
+   0x1f, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, 0x06, 0x30, 0xf8, 0x3f, 0x00,
+   0x00, 0x00, 0x00, 0xff, 0x07, 0x03, 0xe0, 0x1f, 0xf0, 0x00, 0x00, 0x00,
+   0xc0, 0x03, 0xfe, 0x01, 0xc0, 0x07, 0xc0, 0x01, 0x00, 0x00, 0xe0, 0x00,
+   0xf8, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x07, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
+   0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
+   0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0c, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x0c, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
+   0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
+   0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x38, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0xc0, 0x07,
+   0xc0, 0x01, 0x00, 0x00, 0xe0, 0x00, 0xf8, 0x00, 0xe0, 0x1f, 0xf0, 0x00,
+   0x00, 0x00, 0xc0, 0x03, 0xfe, 0x01, 0x30, 0xf8, 0x3f, 0x00, 0x00, 0x00,
+   0x00, 0xff, 0x07, 0x03, 0x18, 0xf0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xfe,
+   0x03, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c,
+   0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x06, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x06, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
+   0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x30, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0xe0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xc0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_b_se_f.xbm b/hacks/pieces/puzzle_b_se_f.xbm
new file mode 100644 (file)
index 0000000..537725e
--- /dev/null
@@ -0,0 +1,79 @@
+#define puzzle_b_se_f_width 74
+#define puzzle_b_se_f_height 88
+#define puzzle_b_se_f_x_hot 6
+#define puzzle_b_se_f_y_hot 20
+static unsigned char puzzle_b_se_f_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x3f,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,
+   0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff,
+   0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x03, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xf0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
+   0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff,
+   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
+   0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0xc0, 0xff, 0xff,
+   0x00, 0x00, 0xf0, 0x01, 0xe0, 0x3f, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00,
+   0xff, 0x01, 0xe0, 0xff, 0x03, 0xf0, 0xff, 0xff, 0x03, 0xf0, 0xff, 0x01,
+   0xe0, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0x07, 0xff, 0xff, 0x01, 0xe0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf8, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfc, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf8, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xe0, 0x1f, 0xf0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xc0, 0x07, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00,
+   0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfe,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00,
+   0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfe,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xc0, 0x07,
+   0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xe0, 0x1f, 0xf0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfc, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xe0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xc0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_b_se_h.xbm b/hacks/pieces/puzzle_b_se_h.xbm
new file mode 100644 (file)
index 0000000..df99f70
--- /dev/null
@@ -0,0 +1,79 @@
+#define puzzle_b_se_h_width 74
+#define puzzle_b_se_h_height 88
+#define puzzle_b_se_h_x_hot 6
+#define puzzle_b_se_h_y_hot 20
+static unsigned char puzzle_b_se_h_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x38,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x60, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xe0, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x60, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
+   0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,
+   0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70,
+   0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x80,
+   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x80, 0x01, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
+   0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0xc0, 0x00, 0xc0,
+   0x00, 0x00, 0xf0, 0x01, 0xe0, 0x3f, 0x00, 0xe0, 0x00, 0x80, 0x01, 0x00,
+   0xff, 0x01, 0x60, 0xfc, 0x03, 0x70, 0x00, 0x00, 0x03, 0xf0, 0x8f, 0x01,
+   0x60, 0xc0, 0x3f, 0x38, 0x00, 0x00, 0x06, 0xff, 0x80, 0x01, 0x60, 0x00,
+   0xfc, 0x1f, 0x00, 0x00, 0xfc, 0x0f, 0x80, 0x01, 0x30, 0x00, 0xc0, 0x0f,
+   0x00, 0x00, 0xf8, 0x00, 0x80, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x18, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x18, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x0c, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x18, 0xf0,
+   0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x30, 0xf8, 0x3f, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0xe0, 0x1f, 0xf0, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0xc0, 0x07, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,
+   0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x06,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,
+   0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x06,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0xc0, 0x07,
+   0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0xe0, 0x1f, 0xf0, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x30, 0xf8, 0x3f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x18, 0xf0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x0c, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x18, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x30, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x30, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0xe0, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xc0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_b_sw_f.xbm b/hacks/pieces/puzzle_b_sw_f.xbm
new file mode 100644 (file)
index 0000000..f183b52
--- /dev/null
@@ -0,0 +1,79 @@
+#define puzzle_b_sw_f_width 74
+#define puzzle_b_sw_f_height 88
+#define puzzle_b_sw_f_x_hot 1
+#define puzzle_b_sw_f_y_hot 21
+static unsigned char puzzle_b_sw_f_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,
+   0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x03,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x07, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xfe, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
+   0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
+   0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x1f,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x1f, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xfc, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc,
+   0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0xfc, 0xff, 0x0f,
+   0x00, 0x00, 0x0f, 0x00, 0xfe, 0x03, 0x00, 0xfe, 0xff, 0x1f, 0x00, 0xf0,
+   0x1f, 0x00, 0xfe, 0x3f, 0x00, 0xff, 0xff, 0x3f, 0x00, 0xff, 0x1f, 0x00,
+   0xfe, 0xff, 0x83, 0xff, 0xff, 0x7f, 0xf0, 0xff, 0x1f, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x3f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x3f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x7f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x3f, 0xe0, 0x1f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x80,
+   0x0f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x01, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
+   0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x01, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00,
+   0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x0f, 0x80, 0x0f, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x3f, 0xe0, 0x1f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x3f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x7f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x7f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x7f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x3f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x1f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_b_sw_h.xbm b/hacks/pieces/puzzle_b_sw_h.xbm
new file mode 100644 (file)
index 0000000..917853b
--- /dev/null
@@ -0,0 +1,79 @@
+#define puzzle_b_sw_h_width 74
+#define puzzle_b_sw_h_height 88
+#define puzzle_b_sw_h_x_hot 1
+#define puzzle_b_sw_h_y_hot 21
+static unsigned char puzzle_b_sw_h_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,
+   0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x80, 0x03,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x07, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x0e, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
+   0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x30,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x30, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
+   0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x18,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x0c, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c,
+   0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x0c, 0x00, 0x0c,
+   0x00, 0x00, 0x0f, 0x00, 0xfe, 0x03, 0x00, 0x06, 0x00, 0x1c, 0x00, 0xf0,
+   0x1f, 0x00, 0xc6, 0x3f, 0x00, 0x03, 0x00, 0x38, 0x00, 0xff, 0x18, 0x00,
+   0x06, 0xfc, 0x83, 0x01, 0x00, 0x70, 0xf0, 0x0f, 0x18, 0x00, 0x06, 0xc0,
+   0xff, 0x00, 0x00, 0xe0, 0xff, 0x00, 0x18, 0x00, 0x06, 0x00, 0x7c, 0x00,
+   0x00, 0xc0, 0x0f, 0x00, 0x30, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x30, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x30, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xe0, 0x3f, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xf0, 0x7f, 0x30, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x3c, 0xe0, 0x1f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x80,
+   0x0f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x80,
+   0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00,
+   0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x80,
+   0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00,
+   0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x0e, 0x80, 0x0f, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x3c, 0xe0, 0x1f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xf0, 0x7f, 0x30, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x3f,
+   0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x30, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x18, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_b_w_f.xbm b/hacks/pieces/puzzle_b_w_f.xbm
new file mode 100644 (file)
index 0000000..0b5b8d5
--- /dev/null
@@ -0,0 +1,95 @@
+#define puzzle_b_w_f_width 74
+#define puzzle_b_w_f_height 108
+#define puzzle_b_w_f_x_hot 1
+#define puzzle_b_w_f_y_hot 21
+static unsigned char puzzle_b_w_f_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,
+   0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x03,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x07, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xfe, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xfe, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
+   0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
+   0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x1f,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x1f, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xfc, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc,
+   0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0xfc, 0xff, 0x0f,
+   0x00, 0x00, 0x0f, 0x00, 0xfe, 0x03, 0x00, 0xfe, 0xff, 0x1f, 0x00, 0xf0,
+   0x1f, 0x00, 0xfe, 0x3f, 0x00, 0xff, 0xff, 0x3f, 0x00, 0xff, 0x1f, 0x00,
+   0xfe, 0xff, 0x83, 0xff, 0xff, 0x7f, 0xf0, 0xff, 0x1f, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x3f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x3f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x7f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x3f, 0xe0, 0x1f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x80,
+   0x0f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x01, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
+   0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x01, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00,
+   0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x0f, 0x80, 0x0f, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x3f, 0xe0, 0x1f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x3f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x7f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x7f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x7f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00,
+   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xfe, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xfe, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0x3f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x1f, 0x00, 0xfe, 0xff, 0x83, 0xff, 0xff, 0x7f, 0xf0, 0xff, 0x1f, 0x00,
+   0xfe, 0x3f, 0x00, 0xff, 0xff, 0x3f, 0x00, 0xff, 0x1f, 0x00, 0xfe, 0x03,
+   0x00, 0xfe, 0xff, 0x1f, 0x00, 0xf0, 0x1f, 0x00, 0x3e, 0x00, 0x00, 0xfc,
+   0xff, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x0f,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xfe, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe,
+   0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
+   0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1f,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x1f, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0xf8, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
+   0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x01,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/pieces/puzzle_b_w_h.xbm b/hacks/pieces/puzzle_b_w_h.xbm
new file mode 100644 (file)
index 0000000..2c105c1
--- /dev/null
@@ -0,0 +1,95 @@
+#define puzzle_b_w_h_width 74
+#define puzzle_b_w_h_height 108
+#define puzzle_b_w_h_x_hot 1
+#define puzzle_b_w_h_y_hot 21
+static unsigned char puzzle_b_w_h_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,
+   0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x80, 0x03,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x07, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x0e, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
+   0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x30,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x30, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
+   0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x18,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x0c, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c,
+   0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x0c, 0x00, 0x0c,
+   0x00, 0x00, 0x0f, 0x00, 0xfe, 0x03, 0x00, 0x06, 0x00, 0x1c, 0x00, 0xf0,
+   0x1f, 0x00, 0xc6, 0x3f, 0x00, 0x03, 0x00, 0x38, 0x00, 0xff, 0x18, 0x00,
+   0x06, 0xfc, 0x83, 0x01, 0x00, 0x70, 0xf0, 0x0f, 0x18, 0x00, 0x06, 0xc0,
+   0xff, 0x00, 0x00, 0xe0, 0xff, 0x00, 0x18, 0x00, 0x06, 0x00, 0x7c, 0x00,
+   0x00, 0xc0, 0x0f, 0x00, 0x30, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x30, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x30, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0xe0, 0x3f, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0xf0, 0x7f, 0x30, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x3c, 0xe0, 0x1f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x80,
+   0x0f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x80,
+   0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00,
+   0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x80,
+   0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00,
+   0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x0e, 0x80, 0x0f, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x3c, 0xe0, 0x1f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xf0, 0x7f, 0x30, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x3f,
+   0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xc0, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
+   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x06, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x06, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x06, 0x00, 0x7c, 0x00, 0x00, 0xc0,
+   0x0f, 0x00, 0x30, 0x00, 0x06, 0xc0, 0xff, 0x00, 0x00, 0xe0, 0xff, 0x00,
+   0x18, 0x00, 0x06, 0xfc, 0x83, 0x01, 0x00, 0x70, 0xf0, 0x0f, 0x18, 0x00,
+   0xc6, 0x3f, 0x00, 0x03, 0x00, 0x38, 0x00, 0xff, 0x18, 0x00, 0xfe, 0x03,
+   0x00, 0x06, 0x00, 0x1c, 0x00, 0xf0, 0x1f, 0x00, 0x3e, 0x00, 0x00, 0x0c,
+   0x00, 0x0c, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x0c,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
+   0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x38,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x30, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
+   0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x18,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x18, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70,
+   0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x01,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/hacks/puzzle.c b/hacks/puzzle.c
new file mode 100644 (file)
index 0000000..f16ccaa
--- /dev/null
@@ -0,0 +1,579 @@
+/* xscreensaver, Copyright (c) 1997 Jamie Zawinski <jwz@netscape.com>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation.  No representations are made about the suitability of this
+ * software for any purpose.  It is provided "as is" without express or 
+ * implied warranty.
+ */
+
+/*
+  TODO:
+
+    =  Rather than just flickering the pieces before swapping them,
+       show them lifting up and moving to their new positions.
+       The path on which they move shouldn't be a straight line;
+       try to avoid having them cross each other by moving them in
+       oppositely-positioned arcs.
+
+    =  Rotate the pieces as well, so that we can swap the corner
+       and edge pieces with each other.
+
+    =  The shapes of the piece bitmaps still aren't quite right.
+       They should line up with no overlap.  They don't...
+    
+    =  Have it drop all pieces to the "floor" then pick them up to
+       reassemble the picture.
+
+    =  As a joke, maybe sometimes have one piece that doesn't fit?
+       Or lose a piece?
+ */
+
+#include "screenhack.h"
+
+#define DEBUG
+
+#include "pieces/puzzle_a_h.xbm"
+#include "pieces/puzzle_a_n_h.xbm"
+#include "pieces/puzzle_a_ne_h.xbm"
+#include "pieces/puzzle_a_e_h.xbm"
+#include "pieces/puzzle_a_se_h.xbm"
+#include "pieces/puzzle_a_s_h.xbm"
+#include "pieces/puzzle_a_sw_h.xbm"
+#include "pieces/puzzle_a_w_h.xbm"
+#include "pieces/puzzle_a_nw_h.xbm"
+
+#include "pieces/puzzle_b_h.xbm"
+#include "pieces/puzzle_b_n_h.xbm"
+#include "pieces/puzzle_b_ne_h.xbm"
+#include "pieces/puzzle_b_e_h.xbm"
+#include "pieces/puzzle_b_se_h.xbm"
+#include "pieces/puzzle_b_s_h.xbm"
+#include "pieces/puzzle_b_sw_h.xbm"
+#include "pieces/puzzle_b_w_h.xbm"
+#include "pieces/puzzle_b_nw_h.xbm"
+
+#include "pieces/puzzle_a_f.xbm"
+#include "pieces/puzzle_a_n_f.xbm"
+#include "pieces/puzzle_a_ne_f.xbm"
+#include "pieces/puzzle_a_e_f.xbm"
+#include "pieces/puzzle_a_se_f.xbm"
+#include "pieces/puzzle_a_s_f.xbm"
+#include "pieces/puzzle_a_sw_f.xbm"
+#include "pieces/puzzle_a_w_f.xbm"
+#include "pieces/puzzle_a_nw_f.xbm"
+
+#include "pieces/puzzle_b_f.xbm"
+#include "pieces/puzzle_b_n_f.xbm"
+#include "pieces/puzzle_b_ne_f.xbm"
+#include "pieces/puzzle_b_e_f.xbm"
+#include "pieces/puzzle_b_se_f.xbm"
+#include "pieces/puzzle_b_s_f.xbm"
+#include "pieces/puzzle_b_sw_f.xbm"
+#include "pieces/puzzle_b_w_f.xbm"
+#include "pieces/puzzle_b_nw_f.xbm"
+
+#define GRID_WIDTH  66
+#define GRID_HEIGHT 66
+
+#define CENTER   0
+#define NORTH    1
+#define NORTHEAST 2
+#define EAST     3
+#define SOUTHEAST 4
+#define SOUTH    5
+#define SOUTHWEST 6
+#define WEST     7
+#define NORTHWEST 8
+
+struct piece {
+  int width, height;
+  int x, y;
+  Pixmap pixmap;
+};
+
+struct set {
+  struct piece pieces[9];
+};
+
+#define PIECE_A_HOLLOW 0
+#define PIECE_A_FILLED 1
+#define PIECE_B_HOLLOW 2
+#define PIECE_B_FILLED 3
+
+static struct set all_pieces[4];
+
+static void
+init_images(Display *dpy, Window window)
+{
+# define LOAD_PIECE(PIECE,NAME)                                        \
+    PIECE.x = puzzle_##NAME##_x_hot;                           \
+    PIECE.y = puzzle_##NAME##_y_hot;                           \
+    PIECE.pixmap =                                             \
+    XCreatePixmapFromBitmapData(dpy, window,                   \
+                               (char *) puzzle_##NAME##_bits,  \
+                               puzzle_##NAME##_width,          \
+                               puzzle_##NAME##_height,         \
+                               1, 0, 1)
+
+# define LOAD_PIECES(SET,PREFIX,SUFFIX)                                \
+    LOAD_PIECE(SET.pieces[CENTER],    PREFIX##_##SUFFIX);      \
+    LOAD_PIECE(SET.pieces[NORTH],     PREFIX##_n_##SUFFIX);    \
+    LOAD_PIECE(SET.pieces[NORTHEAST], PREFIX##_ne_##SUFFIX);   \
+    LOAD_PIECE(SET.pieces[EAST],      PREFIX##_e_##SUFFIX);    \
+    LOAD_PIECE(SET.pieces[SOUTHEAST], PREFIX##_se_##SUFFIX);   \
+    LOAD_PIECE(SET.pieces[SOUTH],     PREFIX##_s_##SUFFIX);    \
+    LOAD_PIECE(SET.pieces[SOUTHWEST], PREFIX##_sw_##SUFFIX);   \
+    LOAD_PIECE(SET.pieces[WEST],      PREFIX##_w_##SUFFIX);    \
+    LOAD_PIECE(SET.pieces[NORTHWEST], PREFIX##_nw_##SUFFIX)
+
+  LOAD_PIECES(all_pieces[PIECE_A_HOLLOW],a,h);
+  LOAD_PIECES(all_pieces[PIECE_A_FILLED],a,f);
+  LOAD_PIECES(all_pieces[PIECE_B_HOLLOW],b,h);
+  LOAD_PIECES(all_pieces[PIECE_B_FILLED],b,f);
+
+# undef LOAD_PIECE
+# undef LOAD_PIECES
+}
+
+static Pixmap
+read_screen (Display *dpy, Window window, int *widthP, int *heightP)
+{
+  Pixmap p;
+  XWindowAttributes xgwa;
+  XGCValues gcv;
+  GC gc;
+  XGetWindowAttributes (dpy, window, &xgwa);
+  *widthP = xgwa.width;
+  *heightP = xgwa.height;
+
+  XClearWindow(dpy, window);
+  grab_screen_image(xgwa.screen, window);
+  p = XCreatePixmap(dpy, window, *widthP, *heightP, xgwa.depth);
+  gcv.function = GXcopy;
+  gc = XCreateGC (dpy, window, GCFunction, &gcv);
+  XCopyArea (dpy, window, p, gc, 0, 0, *widthP, *heightP, 0, 0);
+
+  XFreeGC (dpy, gc);
+
+  return p;
+}
+
+
+static int width, height;
+static int x_border, y_border;
+static Pixmap source;
+static GC gc;
+static Bool tweak;
+static int fg, bg;
+static XPoint *state = 0;
+
+static void
+puzzle_init(Display *dpy, Window window)
+{
+  XWindowAttributes xgwa;
+  int x, y;
+  XGCValues gcv;
+  Colormap cmap;
+  int source_w, source_h;
+
+  tweak = random()&1;
+
+  source = read_screen (dpy, window, &source_w, &source_h);
+
+  XGetWindowAttributes (dpy, window, &xgwa);
+  cmap = xgwa.colormap;
+  width  = xgwa.width  / GRID_WIDTH;
+  height = xgwa.height / GRID_HEIGHT;
+  x_border = (xgwa.width  - (width  * GRID_WIDTH)) / 2;
+  y_border = (xgwa.height - (height * GRID_WIDTH)) / 2;
+
+  if (!state)
+    state = (XPoint *) malloc(width * height * sizeof(XPoint));
+  gc = XCreateGC (dpy, window, 0, &gcv);
+
+  {
+    XColor fgc, bgc;
+    char *fgs = get_string_resource("foreground", "Foreground");
+    char *bgs = get_string_resource("background", "Background");
+    Bool fg_ok, bg_ok;
+    if (!XParseColor (dpy, cmap, fgs, &fgc))
+      XParseColor (dpy, cmap, "gray", &fgc);
+    if (!XParseColor (dpy, cmap, bgs, &bgc))
+      XParseColor (dpy, cmap, "black", &bgc);
+
+    fg_ok = XAllocColor (dpy, cmap, &fgc);
+    bg_ok = XAllocColor (dpy, cmap, &bgc);
+
+    /* If we weren't able to allocate the two colors we want from the
+       colormap (which is likely if the screen has been grabbed on an
+       8-bit SGI visual -- don't ask) then just go through the map
+       and find the closest color to the ones we wanted, and use those
+       pixels without actually allocating them.
+     */
+    if (fg_ok)
+      fg = fgc.pixel;
+    else
+      fg = 0;
+
+    if (bg_ok)
+      bg = bgc.pixel;
+    else
+      bg = 1;
+
+    if (!fg_ok || bg_ok)
+      {
+       int i;
+       unsigned long fgd = ~0;
+       unsigned long bgd = ~0;
+       int max = visual_cells (xgwa.screen, xgwa.visual);
+       XColor *all = (XColor *) calloc(sizeof (*all), max);
+       for (i = 0; i < max; i++)
+         {
+           all[i].flags = DoRed|DoGreen|DoBlue;
+           all[i].pixel = i;
+         }
+       XQueryColors (dpy, cmap, all, max);
+       for(i = 0; i < max; i++)
+         {
+           long rd, gd, bd;
+           unsigned long d;
+           if (!fg_ok)
+             {
+               rd = (all[i].red   >> 8) - (fgc.red   >> 8);
+               gd = (all[i].green >> 8) - (fgc.green >> 8);
+               bd = (all[i].blue  >> 8) - (fgc.blue  >> 8);
+               if (rd < 0) rd = -rd;
+               if (gd < 0) gd = -gd;
+               if (bd < 0) bd = -bd;
+               d = (rd << 1) + (gd << 2) + bd;
+               if (d < fgd)
+                 {
+                   fgd = d;
+                   fg = all[i].pixel;
+                   if (d == 0)
+                     fg_ok = True;
+                 }
+             }
+
+           if (!bg_ok)
+             {
+               rd = (all[i].red   >> 8) - (bgc.red   >> 8);
+               gd = (all[i].green >> 8) - (bgc.green >> 8);
+               bd = (all[i].blue  >> 8) - (bgc.blue  >> 8);
+               if (rd < 0) rd = -rd;
+               if (gd < 0) gd = -gd;
+               if (bd < 0) bd = -bd;
+               d = (rd << 1) + (gd << 2) + bd;
+               if (d < bgd)
+                 {
+                   bgd = d;
+                   bg = all[i].pixel;
+                   if (d == 0)
+                     bg_ok = True;
+                 }
+             }
+
+           if (fg_ok && bg_ok)
+             break;
+         }
+       XFree(all);
+      }
+  }
+
+  /* Reset the window's background color... */
+  XSetWindowBackground (dpy, window, bg);
+  XClearWindow(dpy, window);
+
+  for (y = 0; y < height; y++)
+    for (x = 0; x < width; x++)
+      {
+       state[y * width + x].x = x;
+       state[y * width + x].y = y;
+      }
+}
+
+
+static void
+get_piece(int x, int y, struct piece **hollow, struct piece **filled)
+{
+  int p;
+  Bool which = (x & 1) == (y & 1);
+
+  if      (x == 0       && y == 0)       p = NORTHWEST;
+  else if (x == width-1 && y == 0)       p = NORTHEAST;
+  else if (x == width-1 && y == height-1) p = SOUTHEAST;
+  else if (x == 0       && y == height-1) p = SOUTHWEST;
+  else if (y == 0)                       p = NORTH;
+  else if (x == width-1)                 p = EAST;
+  else if (y == height-1)                p = SOUTH;
+  else if (x == 0)                       p = WEST;
+  else                                   p = CENTER;
+
+  if (tweak) which = !which;
+  if (hollow)
+    *hollow = (which
+              ? &all_pieces[PIECE_A_HOLLOW].pieces[p]
+              : &all_pieces[PIECE_B_HOLLOW].pieces[p]);
+  if (filled)
+    *filled = (which
+              ? &all_pieces[PIECE_A_FILLED].pieces[p]
+              : &all_pieces[PIECE_B_FILLED].pieces[p]);
+}
+
+
+static void
+draw_piece(Display *dpy, Window window, int x, int y, int clear_p)
+{
+  struct piece *hollow, *filled;
+  int from_x = state[y * width + x].x;
+  int from_y = state[y * width + x].y;
+
+  get_piece(x, y, &hollow, &filled);
+         
+  XSetClipMask(dpy, gc, filled->pixmap);
+  XSetClipOrigin(dpy, gc,
+                x_border + (x * GRID_WIDTH) - filled->x - 1,
+                y_border + (y * GRID_WIDTH) - filled->y - 1);
+
+  if (clear_p)
+    {
+      XSetForeground(dpy, gc, bg);
+      XFillRectangle(dpy, window, gc,
+                    x_border + (x * GRID_WIDTH)  - GRID_WIDTH/2,
+                    y_border + (y * GRID_HEIGHT) - GRID_HEIGHT/2,
+                    GRID_WIDTH*2, GRID_HEIGHT*2);
+    }
+  else
+    XCopyArea(dpy, source, window, gc,
+             x_border + (from_x * GRID_WIDTH)  - GRID_WIDTH/2,
+             y_border + (from_y * GRID_HEIGHT) - GRID_HEIGHT/2,
+             GRID_WIDTH*2, GRID_HEIGHT*2,
+             x_border + (x * GRID_WIDTH)  - GRID_WIDTH/2,
+             y_border + (y * GRID_HEIGHT) - GRID_HEIGHT/2);
+
+  if (clear_p > 1)
+    return;
+
+  XSetForeground(dpy, gc, fg);
+  XSetClipMask(dpy, gc, hollow->pixmap);
+  XSetClipOrigin(dpy, gc,
+                x_border + (x * GRID_WIDTH) - hollow->x - 1,
+                y_border + (y * GRID_WIDTH) - hollow->y - 1);
+  XFillRectangle(dpy, window, gc,
+                x_border + (x * GRID_WIDTH)  - GRID_WIDTH/2,
+                y_border + (y * GRID_HEIGHT) - GRID_HEIGHT/2,
+                GRID_WIDTH*2, GRID_HEIGHT*2);
+
+  if (clear_p)
+    {
+      /* If the pieces lined up right, we could do this by just not drawing
+        the outline -- but that doesn't look right, since it eats the outlines
+        of the adjascent pieces.  So draw the outline, then chop off the outer
+        edge if this is a border piece.
+       */
+      XSetForeground(dpy, gc, bg);
+      if (x == 0)
+       XFillRectangle(dpy, window, gc,
+                      x_border - 2,
+                      y_border + (y * GRID_HEIGHT),
+                      3, GRID_HEIGHT);
+      else if (x == width-1)
+       XFillRectangle(dpy, window, gc,
+                      x_border + ((x+1) * GRID_WIDTH) - 2,
+                      y_border + (y * GRID_HEIGHT),
+                      3, GRID_HEIGHT);
+
+      if (y == 0)
+       XFillRectangle(dpy, window, gc,
+                      x_border + (x * GRID_WIDTH),
+                      y_border - 2,
+                      GRID_WIDTH, 3);
+      else if (y == height-1)
+       XFillRectangle(dpy, window, gc,
+                      x_border + (x * GRID_WIDTH),
+                      y_border + ((y+1) * GRID_HEIGHT) - 2,
+                      GRID_WIDTH, 3);
+    }
+}
+
+
+static void
+swap_pieces(Display *dpy, Window window,
+           int src_x, int src_y, int dst_x, int dst_y,
+           Bool draw_p)
+{
+  XPoint swap;
+  int i;
+  if (draw_p)
+    for (i = 0; i < 3; i++)
+      {
+       draw_piece(dpy, window, src_x, src_y, 1);
+       draw_piece(dpy, window, dst_x, dst_y, 1);
+       XSync(dpy, False);
+       usleep(50000);
+       draw_piece(dpy, window, src_x, src_y, 0);
+       draw_piece(dpy, window, dst_x, dst_y, 0);
+       XSync(dpy, False);
+       usleep(50000);
+      }
+
+  swap = state[src_y * width + src_x];
+  state[src_y * width + src_x] = state[dst_y * width + dst_x];
+  state[dst_y * width + dst_x] = swap;
+
+  if (draw_p)
+    {
+      draw_piece(dpy, window, src_x, src_y, 0);
+      draw_piece(dpy, window, dst_x, dst_y, 0);
+      XSync(dpy, False);
+    }
+}
+
+
+static void
+shuffle(Display *dpy, Window window, Bool draw_p)
+{
+  struct piece *p1, *p2;
+  int src_x, src_y, dst_x = -1, dst_y = -1;
+
+ AGAIN:
+  p1 = p2 = 0;
+  src_x = random() % width;
+  src_y = random() % height;
+
+  get_piece(src_x, src_y, &p1, 0);
+
+  /* Pick random coordinates until we find one that has the same kind of
+     piece as the first one we picked.  Note that it's possible for there
+     to be only one piece of a particular shape on the board (this commonly
+     happens with the corner pieces.)
+   */
+  while (p1 != p2)
+    {
+      dst_x = random() % width;
+      dst_y = random() % height;
+      get_piece(dst_x, dst_y, &p2, 0);
+    }
+
+  if (src_x == dst_x && src_y == dst_y)
+    goto AGAIN;
+
+  swap_pieces(dpy, window, src_x, src_y, dst_x, dst_y, draw_p);
+}
+
+
+static void
+shuffle_all(Display *dpy, Window window)
+{
+  int i = (width * height * 10);
+  while (i > 0)
+    {
+      shuffle(dpy, window, False);
+      i--;
+    }
+}
+
+static void
+unshuffle(Display *dpy, Window window)
+{
+  int i;
+  for (i = 0; i < width * height * 4; i++)
+    {
+      int x = random() % width;
+      int y = random() % height;
+      int x2 = state[y * width + x].x;
+      int y2 = state[y * width + x].y;
+      if (x != x2 || y != y2)
+       {
+         swap_pieces(dpy, window, x, y, x2, y2, True);
+         break;
+       }
+    }
+}
+
+static void
+clear_all(Display *dpy, Window window)
+{
+  int n = width * height;
+  while (n > 0)
+    {
+      int x = random() % width;
+      int y = random() % height;
+      XPoint *p = &state[y * width + x];
+      if (p->x == -1)
+       continue;
+      draw_piece(dpy, window, p->x, p->y, 2);
+      XSync(dpy, False);
+      usleep(1000);
+      p->x = p->y = -1;
+      n--;
+    }
+}
+
+static Bool
+done(void)
+{
+  int x, y;
+  for (y = 0; y < height; y++)
+    for (x = 0; x < width; x++)
+      {
+       int x2 = state[y * width + x].x;
+       int y2 = state[y * width + x].y;
+       if (x != x2 || y != y2)
+         return False;
+      }
+  return True;
+}
+
+
+\f
+char *progclass = "Puzzle";
+
+char *defaults [] = {
+  "Puzzle.background:  Black",         /* to placate SGI */
+  "Puzzle.foreground:  Gray40",
+  "*delay:             70000",
+  "*delay2:            5",
+  0
+};
+
+XrmOptionDescRec options [] = {
+  { "-delay",          ".delay",               XrmoptionSepArg, 0 },
+  { "-delay2",         ".delay2",              XrmoptionSepArg, 0 },
+  { 0, 0, 0, 0 }
+};
+
+void
+screenhack (Display *dpy, Window window)
+{
+  int delay = get_integer_resource("delay", "Integer");
+  int delay2 = get_integer_resource("delay2", "Integer");
+
+  init_images(dpy, window);
+
+  while (1)
+    {
+      int x, y;
+      puzzle_init (dpy, window);
+      shuffle_all(dpy, window);
+
+      for (y = 0; y < height; y++)
+       for (x = 0; x < width; x++)
+         draw_piece(dpy, window, x, y, 0);
+
+      while (!done())
+       {
+         unshuffle(dpy, window);
+         XSync (dpy, True);
+         if (delay) usleep (delay);
+       }
+
+      if (delay2)
+       usleep (delay2 * 1000000);
+
+      clear_all(dpy, window);
+    }
+}
diff --git a/hacks/puzzle.man b/hacks/puzzle.man
new file mode 100644 (file)
index 0000000..7e95a2d
--- /dev/null
@@ -0,0 +1,74 @@
+.TH XScreenSaver 1 "25-Nov-97" "X Version 11"
+.SH NAME
+puzzle - permute the screen image like a jigsaw puzzle
+.SH SYNOPSIS
+.B puzzle
+[\-display \fIhost:display.screen\fP] [\-background \fIcolor\fP] [\-delay \fIusecs\fP] [\-window] [\-root] [\-install] [\-visual \fIvisual\fP]
+.SH DESCRIPTION
+The \fIpuzzle\fP program takes an image of the screen, carves it up into
+a crossword puzzle, shuffles it, and then solves it.
+.SH OPTIONS
+.I puzzle
+accepts the following options:
+.TP 8
+.B \-window
+Draw on a newly-created window.  This is the default.
+.TP 8
+.B \-root
+Draw on the root window.
+.TP 8
+.B \-install
+Install a private colormap for the window.
+.TP 8
+.B \-visual \fIvisual\fP
+Specify which visual to use.  Legal values are the name of a visual class,
+or the id number (decimal or hex) of a specific visual.
+.TP 8
+.B \-delay \fImicroseconds\fP
+How long to wait between shuffling pieces; default 700000, or 0.7 seconds.
+.SH RESOURCES
+On some systems (currently, only SGIs), this program can, instead of grabbing
+a desktop image, grab a frame of video from an external camera and manipulate
+that instead.  The following resources control that.
+.PP
+.TP 8
+.B grabVideoProbability \fR(Float)\fP
+What portion of the time to grab video rather than a screen image, 
+between 0.0 and 1.0.  Defaults to 0.5, or half the time.
+.TP 8
+.B videoDevice \fR(Integer)\fP
+The number of the default video input device to check first.  If unspecified, 
+the default camera (from videopanel(1)) will be checked first.  After that, all
+other available video input devices will be checked in order.  
+
+The first one which produces a non-black image will be used.  If all images
+are black, the others will be re-checked a few times before giving up and
+falling back to simply grabbing a desktop image (but note that this takes a
+few seconds, so if you don't actually have any video sources hooked up, you
+should consider turning off video grabbing by setting
+\fBgrabVideoProbability\fP to 0.0.)
+.TP 8
+.B videoGain \fR(Float)\fP
+The amount by which to brighten the grabbed image.  This defaults to 2.2.
+.SH ENVIRONMENT
+.PP
+.TP 8
+.B DISPLAY
+to get the default host and display number.
+.TP 8
+.B XENVIRONMENT
+to get the name of a resource file that overrides the global resources
+stored in the RESOURCE_MANAGER property.
+.SH SEE ALSO
+.BR X (1),
+.BR xscreensaver (1)
+.SH COPYRIGHT
+Copyright \(co 1997 by Jamie Zawinski.  Permission to use, copy, modify, 
+distribute, and sell this software and its documentation for any purpose is 
+hereby granted without fee, provided that the above copyright notice appear 
+in all copies and that both that copyright notice and this permission notice
+appear in supporting documentation.  No representations are made about the 
+suitability of this software for any purpose.  It is provided "as is" without
+express or implied warranty.
+.SH AUTHOR
+Jamie Zawinski <jwz@netscape.com>, 25-Nov-97.
index c648bd66546758a04d0fb387ceb6f06bb523e10a..9dfe8d38ec6388558ad73f8a04bfdc2bec8927c4 100644 (file)
@@ -43,7 +43,6 @@ char *defaults [] = {
   "*width:     100",
   "*height:    100",
   "*epoch:     40000",
-  "*palette:   -1",
   "*reaction:  -1",
   "*diffusion: -1",
   "*verbose:   off",
@@ -59,10 +58,9 @@ XrmOptionDescRec options [] = {
   { "-width",          ".width",       XrmoptionSepArg, 0 },
   { "-height",         ".height",      XrmoptionSepArg, 0 },
   { "-epoch",          ".epoch",       XrmoptionSepArg, 0 },
-  { "-palette",                ".palette",     XrmoptionSepArg, 0 },
   { "-reaction",       ".reaction",    XrmoptionSepArg, 0 },
   { "-diffusion",      ".diffusion",   XrmoptionSepArg, 0 },
-  { "-verbose",                ".verbose",     XrmoptionSepArg, 0 },
+  { "-verbose",                ".verbose",     XrmoptionNoArg, "True" },
   { "-radius",         ".radius",      XrmoptionSepArg, 0 },
   { "-speed",          ".speed",       XrmoptionSepArg, 0 },
   { "-size",           ".size",        XrmoptionSepArg, 0 },
@@ -231,10 +229,14 @@ screenhack (Display *dpy, Window win)
     if (verbose) {
       double tm = 0;
       struct timeval tp;
-      struct timezone tzp;
       if (!(frame%100)) {
        double tm2;
+#ifdef GETTIMEOFDAY_TWO_ARGS
+        struct timezone tzp;
        gettimeofday(&tp, &tzp);
+#else
+        gettimeofday(&tp);
+#endif
        tm2 = tp.tv_sec + tp.tv_usec * 1e-6;
        if (frame > 0)
          printf("fps = %2.4g\n", 100.0 / (tm2 - tm));
@@ -303,11 +305,9 @@ screenhack (Display *dpy, Window win)
       if (2 == reaction && 2 == diffusion)
        reaction = diffusion = 0;
       
-/*      if (verbose)
-       printf("reaction = %d\ndiffusion = %d\n"
-              "palette = %d\nradius = %d\n",
-              reaction, diffusion, palette, radius);
-*/
+      if (verbose)
+       printf("reaction = %d\ndiffusion = %d\nradius = %d\n",
+              reaction, diffusion, radius);
     }
     for (i = 0; i <= width+1; i++) {
       r1[i] = r1[i + w2 * height];
index 2eeb617035fa1926364a8863f133267cba3b6cad..32b5aba8a1bc1acb3201a2b9d68f2f6068135b04 100644 (file)
@@ -21,9 +21,6 @@ static int iterations, offset;
 static Bool xsym, ysym;
 static int erase_speed, sleep_time, erase_mode;
 
-void erase_window (Display *dpy, Window win, GC gc, int width, int height,
-                  int mode, int delay);
-
 static void
 init_rorschach (Display *dpy, Window window)
 {
@@ -99,7 +96,7 @@ hurm (Display *dpy, Window window)
     }
   sleep ( sleep_time );
 
-  erase_window(dpy, window, erase_gc, xlim, ylim, erase_mode, erase_speed);
+  erase_full_window(dpy, window);
 
   XClearWindow (dpy, window);
   if (got_color) XFreeColors (dpy, cmap, &color.pixel, 1, 0);
@@ -117,9 +114,9 @@ char *defaults [] = {
   "*ysymmetry: false",
   "*iterations:        4000",
   "*offset:    4",
-  "Rorschach.eraseSpeed: 400",
-  "Rorschach.delay: 5",
-  "Rorschach.eraseMode: -1",
+  "*delay:     5",
+  "*eraseSpeed: 400",
+  "*eraseMode: -1",
   0
 };
 
diff --git a/hacks/rotor.c b/hacks/rotor.c
new file mode 100644 (file)
index 0000000..135159e
--- /dev/null
@@ -0,0 +1,348 @@
+/* -*- Mode: C; tab-width: 4 -*- */
+/* rotor --- a swirly rotor */
+
+#if !defined( lint ) && !defined( SABER )
+static const char sccsid[] = "@(#)rotor.c      4.04 97/07/28 xlockmore";
+
+#endif
+
+/*-
+ * Copyright (c) 1991 by Patrick J. Naughton.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation.
+ *
+ * This file is provided AS IS with no warranties of any kind.  The author
+ * shall have no liability with respect to the infringement of copyrights,
+ * trade secrets or any patents by this file or any part thereof.  In no
+ * event will the author be liable for any lost revenue or profits or
+ * other special, indirect and consequential damages.
+ *
+ * Revision History:
+ * 10-May-97:  Compatible with xscreensaver
+ * 08-Mar-95: CAT stuff for ## was tripping up some C compilers.  Removed.
+ * 01-Dec-93: added patch for AIXV3 from Tom McConnell
+ *            <tmcconne@sedona.intel.com>
+ * 11-Nov-90: put into xlock by Steve Zellers <zellers@sun.com>
+ * 16-Oct-90: Received from Tom Lawrence (tcl@cs.brown.edu: 'flight' simulator)
+ */
+
+#ifdef STANDALONE
+# define PROGCLASS "Rotor"
+# define HACK_INIT init_rotor
+# define HACK_DRAW draw_rotor
+# define rotor_opts xlockmore_opts
+# define DEFAULTS      "*delay:   10000 \n"    \
+                                       "*count:   4 \n"                \
+                                       "*size:   -6 \n"                \
+                                       "*cycles:  20 \n"               \
+                                       "*ncolors: 200 \n"
+# define SMOOTH_COLORS
+# include "xlockmore.h"                /* in xscreensaver distribution */
+#else /* STANDALONE */
+# include "xlock.h"                    /* in xlockmore distribution */
+#endif /* STANDALONE */
+
+ModeSpecOpt rotor_opts =
+{0, NULL, 0, NULL, NULL};
+
+/*-
+ * A 'batchcount' of 3 or 4 works best!
+ */
+
+#define MAXANGLE       3000.0  /* irrectangular (jwz: was 10000.0) */
+
+/* How many segments to draw per cycle when redrawing */
+#define REDRAWSTEP 3
+
+typedef struct {
+       float       angle;
+       float       radius;
+       float       start_radius;
+       float       end_radius;
+       float       radius_drift_max;
+       float       radius_drift_now;
+
+       float       ratio;
+       float       start_ratio;
+       float       end_ratio;
+       float       ratio_drift_max;
+       float       ratio_drift_now;
+} elem;
+
+typedef struct {
+       int         pix;
+       int         lastx, lasty;
+       int         num, rotor, prev;
+       int         nsave;
+       float       angle;
+       int         centerx, centery;
+       int         prevcenterx, prevcentery;
+       unsigned char firsttime;
+       unsigned char iconifiedscreen;  /* for iconified view */
+       unsigned char forward;
+       unsigned char unused;
+       elem       *elements;
+       XPoint     *save;
+       int         redrawing, redrawpos;
+} rotorstruct;
+
+static rotorstruct *rotors = NULL;
+
+void
+init_rotor(ModeInfo * mi)
+{
+       rotorstruct *rp;
+       int         x;
+       elem       *pelem;
+       unsigned char wasiconified;
+
+       if (rotors == NULL) {
+               if ((rotors = (rotorstruct *) calloc(MI_NUM_SCREENS(mi),
+                                             sizeof (rotorstruct))) == NULL)
+                       return;
+       }
+       rp = &rotors[MI_SCREEN(mi)];
+
+       rp->prevcenterx = rp->centerx;
+       rp->prevcentery = rp->centery;
+
+       rp->centerx = MI_WIN_WIDTH(mi) / 2;
+       rp->centery = MI_WIN_HEIGHT(mi) / 2;
+
+       rp->redrawing = 0;
+       /*
+        * sometimes, you go into iconified view, only to see a really whizzy pattern
+        * that you would like to look more closely at. Normally, clicking in the
+        * icon reinitializes everything - but I don't, cuz I'm that kind of guy.
+        * HENCE, the wasiconified stuff you see here.
+        */
+
+       wasiconified = rp->iconifiedscreen;
+       rp->iconifiedscreen = MI_WIN_IS_ICONIC(mi);
+
+       if (wasiconified && !rp->iconifiedscreen)
+               rp->firsttime = True;
+       else {
+
+               /* This is a fudge is needed since prevcenter may not be set when it comes
+                  from the the random mode and return is pressed (and its not the first
+                  mode that was running). This assumes that the size of the lock screen
+                  window / size of the icon window = 12 */
+               if (!rp->prevcenterx)
+                       rp->prevcenterx = rp->centerx * 12;
+               if (!rp->prevcentery)
+                       rp->prevcentery = rp->centery * 12;
+
+               rp->num = MI_BATCHCOUNT(mi);
+               if (rp->num < 0) {
+                       rp->num = NRAND(-rp->num) + 1;
+                       if (rp->elements != NULL) {
+                               (void) free((void *) rp->elements);
+                               rp->elements = NULL;
+                       }
+               }
+               if (rp->elements == NULL)
+                       rp->elements = (elem *) calloc(rp->num, sizeof (elem));
+               rp->nsave = MI_CYCLES(mi);
+               if (rp->nsave <= 1)
+                       rp->nsave = 2;
+               if (rp->save == NULL)
+                       rp->save = (XPoint *) calloc(rp->nsave, sizeof (XPoint));
+
+               pelem = rp->elements;
+
+               for (x = rp->num; --x >= 0; pelem++) {
+                       pelem->radius_drift_max = 1.0;
+                       pelem->radius_drift_now = 1.0;
+
+                       pelem->end_radius = 100.0;
+
+                       pelem->ratio_drift_max = 1.0;
+                       pelem->ratio_drift_now = 1.0;
+                       pelem->end_ratio = 10.0;
+               }
+               if (MI_NPIXELS(mi) > 2)
+                       rp->pix = NRAND(MI_NPIXELS(mi));
+
+               rp->rotor = 0;
+               rp->prev = 1;
+               rp->lastx = rp->centerx;
+               rp->lasty = rp->centery;
+               rp->angle = (float) NRAND((long) MAXANGLE) / 3.0;
+               rp->forward = rp->firsttime = True;
+       }
+
+       {
+         int line_width = MI_SIZE(mi);
+         if (line_width == 0)
+               line_width = -5;
+         if (line_width < 0)
+               line_width = NRAND(-line_width)+1;
+         XSetLineAttributes(MI_DISPLAY(mi), MI_GC(mi), line_width,
+                                                LineSolid, CapButt, JoinMiter);
+       }
+
+       XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi));
+}
+
+void
+draw_rotor(ModeInfo * mi)
+{
+       Display    *display = MI_DISPLAY(mi);
+       GC          gc = MI_GC(mi);
+       register rotorstruct *rp = &rotors[MI_SCREEN(mi)];
+       register elem *pelem;
+       int         thisx, thisy;
+       int         i;
+       int         x_1, y_1, x_2, y_2;
+
+       if (!rp->iconifiedscreen) {
+               thisx = rp->centerx;
+               thisy = rp->centery;
+       } else {
+               thisx = rp->prevcenterx;
+               thisy = rp->prevcentery;
+       }
+       for (i = rp->num, pelem = rp->elements; --i >= 0; pelem++) {
+               if (pelem->radius_drift_max <= pelem->radius_drift_now) {
+                       pelem->start_radius = pelem->end_radius;
+                       pelem->end_radius = (float) NRAND(40000) / 100.0 - 200.0;
+                       pelem->radius_drift_max = (float) NRAND(100000) + 10000.0;
+                       pelem->radius_drift_now = 0.0;
+               }
+               if (pelem->ratio_drift_max <= pelem->ratio_drift_now) {
+                       pelem->start_ratio = pelem->end_ratio;
+                       pelem->end_ratio = (float) NRAND(2000) / 100.0 - 10.0;
+                       pelem->ratio_drift_max = (float) NRAND(100000) + 10000.0;
+                       pelem->ratio_drift_now = 0.0;
+               }
+               pelem->ratio = pelem->start_ratio +
+                       (pelem->end_ratio - pelem->start_ratio) /
+                       pelem->ratio_drift_max * pelem->ratio_drift_now;
+               pelem->angle = rp->angle * pelem->ratio;
+               pelem->radius = pelem->start_radius +
+                       (pelem->end_radius - pelem->start_radius) /
+                       pelem->radius_drift_max * pelem->radius_drift_now;
+
+               thisx += (int) (COSF(pelem->angle) * pelem->radius);
+               thisy += (int) (SINF(pelem->angle) * pelem->radius);
+
+               pelem->ratio_drift_now += 1.0;
+               pelem->radius_drift_now += 1.0;
+       }
+       if (rp->firsttime)
+               rp->firsttime = False;
+       else {
+               XSetForeground(display, gc, MI_WIN_BLACK_PIXEL(mi));
+
+               x_1 = (int) rp->save[rp->rotor].x;
+               y_1 = (int) rp->save[rp->rotor].y;
+               x_2 = (int) rp->save[rp->prev].x;
+               y_2 = (int) rp->save[rp->prev].y;
+
+               if (rp->iconifiedscreen) {
+                       x_1 = x_1 * rp->centerx / rp->prevcenterx;
+                       x_2 = x_2 * rp->centerx / rp->prevcenterx;
+                       y_1 = y_1 * rp->centery / rp->prevcentery;
+                       y_2 = y_2 * rp->centery / rp->prevcentery;
+               }
+               XDrawLine(display, MI_WINDOW(mi), gc, x_1, y_1, x_2, y_2);
+
+               if (MI_NPIXELS(mi) > 2) {
+                       XSetForeground(display, gc, MI_PIXEL(mi, rp->pix));
+                       if (++rp->pix >= MI_NPIXELS(mi))
+                               rp->pix = 0;
+               } else
+                       XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(mi));
+
+               x_1 = rp->lastx;
+               y_1 = rp->lasty;
+               x_2 = thisx;
+               y_2 = thisy;
+
+               if (rp->iconifiedscreen) {
+                       x_1 = x_1 * rp->centerx / rp->prevcenterx;
+                       x_2 = x_2 * rp->centerx / rp->prevcenterx;
+                       y_1 = y_1 * rp->centery / rp->prevcentery;
+                       y_2 = y_2 * rp->centery / rp->prevcentery;
+               }
+               XDrawLine(display, MI_WINDOW(mi), gc, x_1, y_1, x_2, y_2);
+       }
+       rp->save[rp->rotor].x = rp->lastx = thisx;
+       rp->save[rp->rotor].y = rp->lasty = thisy;
+
+       ++rp->rotor;
+       rp->rotor %= rp->nsave;
+       ++rp->prev;
+       rp->prev %= rp->nsave;
+       if (rp->forward) {
+               rp->angle += 0.01;
+               if (rp->angle >= MAXANGLE) {
+                       rp->angle = MAXANGLE;
+                       rp->forward = False;
+               }
+       } else {
+               rp->angle -= 0.1;
+               if (rp->angle <= 0) {
+                       rp->angle = 0.0;
+                       rp->forward = True;
+               }
+       }
+       if (rp->redrawing) {
+               int         j;
+
+               for (i = 0; i < REDRAWSTEP; i++) {
+                       j = (rp->rotor - rp->redrawpos + rp->nsave) % rp->nsave;
+
+                       x_1 = (int) rp->save[j].x;
+                       y_1 = (int) rp->save[j].y;
+                       x_2 = (int) rp->save[(j - 1 + rp->nsave) % rp->nsave].x;
+                       y_2 = (int) rp->save[(j - 1 + rp->nsave) % rp->nsave].y;
+
+                       if (rp->iconifiedscreen) {
+                               x_1 = x_1 * rp->centerx / rp->prevcenterx;
+                               x_2 = x_2 * rp->centerx / rp->prevcenterx;
+                               y_1 = y_1 * rp->centery / rp->prevcentery;
+                               y_2 = y_2 * rp->centery / rp->prevcentery;
+                       }
+                       XDrawLine(display, MI_WINDOW(mi), gc, x_1, y_1, x_2, y_2);
+
+                       if (++(rp->redrawpos) >= rp->nsave) {
+                               rp->redrawing = 0;
+                               break;
+                       }
+               }
+       }
+}
+
+void
+release_rotor(ModeInfo * mi)
+{
+       if (rotors != NULL) {
+               int         screen;
+
+               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
+                       rotorstruct *rp = &rotors[screen];
+
+                       if (rp->elements != NULL)
+                               (void) free((void *) rp->elements);
+                       if (rp->save != NULL)
+                               (void) free((void *) rp->save);
+               }
+               (void) free((void *) rotors);
+               rotors = NULL;
+       }
+}
+
+void
+refresh_rotor(ModeInfo * mi)
+{
+       rotorstruct *rp = &rotors[MI_SCREEN(mi)];
+
+       rp->redrawing = 1;
+       rp->redrawpos = 1;
+}
index 65110247ae66e12e68081acbf0e01af60efc6c9e..de108a703117483f3907d28263b30a4d4bf6e2cd 100644 (file)
@@ -1,6 +1,6 @@
-/* -*- Mode: C; tab-width: 4 -*-
- * sierpinski --- Sierpinski's triangle fractal.
- */
+/* -*- Mode: C; tab-width: 4 -*- */
+/* sierpinski --- Sierpinski's triangle fractal */
+
 #if !defined( lint ) && !defined( SABER )
 static const char sccsid[] = "@(#)sierpinski.c 4.05 97/09/19 xlockmore";
 #endif
@@ -32,10 +32,11 @@ static const char sccsid[] = "@(#)sierpinski.c      4.05 97/09/19 xlockmore";
 # define HACK_INIT                                     init_sierpinski
 # define HACK_DRAW                                     draw_sierpinski
 # define sierpinski_opts                       xlockmore_opts
-# define DEFAULTS      "*count:                2000    \n"                     \
+# define DEFAULTS      "*delay:                400000  \n"                     \
+                                       "*count:                2000    \n"                     \
                                        "*cycles:               100     \n"                     \
-                                       "*delay:                400000  \n"                     \
                                        "*ncolors:              64   \n"
+# define BRIGHT_COLORS
 # include "xlockmore.h"                                /* from the xscreensaver distribution */
 #else  /* !STANDALONE */
 # include "xlock.h"                                    /* from the xlockmore distribution */
@@ -114,7 +115,10 @@ init_sierpinski(ModeInfo * mi)
        sp->total_npoints = MI_BATCHCOUNT(mi);
        if (sp->total_npoints < 1)
                sp->total_npoints = 1;
-  sp->corners = (LRAND() & 1) + 3;
+  sp->corners = MI_SIZE(mi);
+       if (sp->corners < 3 || sp->corners > 4) {
+               sp->corners = (LRAND() & 1) + 3;
+       }
        for (i = 0; i < sp->corners; i++) {
                if (!sp->pointBuffer[i])
                        sp->pointBuffer[i] = (XPoint *) malloc(sp->total_npoints *
@@ -129,11 +133,9 @@ draw_sierpinski(ModeInfo * mi)
        Display    *display = MI_DISPLAY(mi);
        GC          gc = MI_GC(mi);
        sierpinskistruct *sp = &tris[MI_SCREEN(mi)];
-       XPoint     **xp;
+       XPoint     *xp[MAXCORNERS];
        int         i = 0, v;
 
-    xp = (XPoint **) malloc (sp->corners * sizeof (XPoint *));
-    
        if (MI_NPIXELS(mi) <= 2)
                XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(mi));
        for (i = 0; i < sp->corners; i++)
@@ -156,8 +158,6 @@ draw_sierpinski(ModeInfo * mi)
        }
        if (++sp->time >= MI_CYCLES(mi))
                startover(mi);
-
-    free (xp);
 }
 
 void
index a3792cd08f9ecfe214bbc600727217fbf287b5ba..f910dbe7eb9ac15b13dec02d8d5ff3e7b139fafd 100644 (file)
@@ -20,7 +20,7 @@ static int xoff, yoff;
 static int grid_w, grid_h;
 static int delay, delay2;
 static GC gc;
-int max_width, max_height;
+static int max_width, max_height;
 
 static void
 init_slide (Display *dpy, Window window)
@@ -28,13 +28,17 @@ init_slide (Display *dpy, Window window)
   int i;
   XGCValues gcv;
   XWindowAttributes xgwa;
+  long gcflags;
   int border;
-  unsigned long fg;
+  unsigned long fg, bg;
   Drawable d;
   Colormap cmap;
   Visual *visual;
 
   XGetWindowAttributes (dpy, window, &xgwa);
+  grab_screen_image (xgwa.screen, window);
+
+  XGetWindowAttributes (dpy, window, &xgwa);  /* re-retrieve colormap */
   cmap = xgwa.colormap;
   visual = xgwa.visual;
   max_width = xgwa.width;
@@ -45,17 +49,94 @@ init_slide (Display *dpy, Window window)
   grid_size = get_integer_resource ("gridSize", "Integer");
   pix_inc = get_integer_resource ("pixelIncrement", "Integer");
   border = get_integer_resource ("internalBorderWidth", "InternalBorderWidth");
-  fg = get_pixel_resource ("background", "Background", dpy, cmap);
-
-  grab_screen_image (xgwa.screen, window);
-
 
-  /* Total kludge -- if grab_screen_image() installed a new colormap, assume
-     that pixel 0 is the one we should use.  This further assumes that the
-     pixel is black, which overrides the user's -background setting, alas.
-   */
-  XGetWindowAttributes (dpy, window, &xgwa);
-  if (cmap != xgwa.colormap) fg = 0;
+  {
+    XColor fgc, bgc;
+    char *fgs = get_string_resource("background", "Background");
+    char *bgs = get_string_resource("foreground", "Foreground");
+    Bool fg_ok, bg_ok;
+    if (!XParseColor (dpy, cmap, fgs, &fgc))
+      XParseColor (dpy, cmap, "black", &bgc);
+    if (!XParseColor (dpy, cmap, bgs, &bgc))
+      XParseColor (dpy, cmap, "gray", &fgc);
+
+    fg_ok = XAllocColor (dpy, cmap, &fgc);
+    bg_ok = XAllocColor (dpy, cmap, &bgc);
+
+    /* If we weren't able to allocate the two colors we want from the
+       colormap (which is likely if the screen has been grabbed on an
+       8-bit SGI visual -- don't ask) then just go through the map
+       and find the closest color to the ones we wanted, and use those
+       pixels without actually allocating them.
+     */
+    if (fg_ok)
+      fg = fgc.pixel;
+    else
+      fg = 0;
+
+    if (bg_ok)
+      bg = bgc.pixel;
+    else
+      bg = 1;
+
+    if (!fg_ok || bg_ok)
+      {
+       unsigned long fgd = ~0;
+       unsigned long bgd = ~0;
+       int max = visual_cells (xgwa.screen, visual);
+       XColor *all = (XColor *) calloc(sizeof (*all), max);
+       for (i = 0; i < max; i++)
+         {
+           all[i].flags = DoRed|DoGreen|DoBlue;
+           all[i].pixel = i;
+         }
+       XQueryColors (dpy, cmap, all, max);
+       for(i = 0; i < max; i++)
+         {
+           long rd, gd, bd;
+           unsigned long d;
+           if (!fg_ok)
+             {
+               rd = (all[i].red   >> 8) - (fgc.red   >> 8);
+               gd = (all[i].green >> 8) - (fgc.green >> 8);
+               bd = (all[i].blue  >> 8) - (fgc.blue  >> 8);
+               if (rd < 0) rd = -rd;
+               if (gd < 0) gd = -gd;
+               if (bd < 0) bd = -bd;
+               d = (rd << 1) + (gd << 2) + bd;
+               if (d < fgd)
+                 {
+                   fgd = d;
+                   fg = all[i].pixel;
+                   if (d == 0)
+                     fg_ok = True;
+                 }
+             }
+
+           if (!bg_ok)
+             {
+               rd = (all[i].red   >> 8) - (bgc.red   >> 8);
+               gd = (all[i].green >> 8) - (bgc.green >> 8);
+               bd = (all[i].blue  >> 8) - (bgc.blue  >> 8);
+               if (rd < 0) rd = -rd;
+               if (gd < 0) gd = -gd;
+               if (bd < 0) bd = -bd;
+               d = (rd << 1) + (gd << 2) + bd;
+               if (d < bgd)
+                 {
+                   bgd = d;
+                   bg = all[i].pixel;
+                   if (d == 0)
+                     bg_ok = True;
+                 }
+             }
+
+           if (fg_ok && bg_ok)
+             break;
+         }
+       XFree(all);
+      }
+  }
 
 
   if (delay < 0) delay = 0;
@@ -66,8 +147,10 @@ init_slide (Display *dpy, Window window)
   gcv.foreground = fg;
   gcv.function = GXcopy;
   gcv.subwindow_mode = IncludeInferiors;
-  gc = XCreateGC (dpy, window, GCForeground |GCFunction | GCSubwindowMode,
-                 &gcv);
+  gcflags = GCForeground |GCFunction;
+  if (use_subwindow_mode_p(xgwa.screen, window)) /* see grabscreen.c */
+    gcflags |= GCSubwindowMode;
+  gc = XCreateGC (dpy, window, gcflags, &gcv);
 
   XGetWindowAttributes (dpy, window, &xgwa);
   bitmap_w = xgwa.width;
@@ -84,10 +167,23 @@ init_slide (Display *dpy, Window window)
 
   if (border)
     {
+      int half = border/2;
+      int half2 = (border & 1 ? half+1 : half);
+      XSetForeground(dpy, gc, bg);
+      for (i = 0; i < bitmap_w; i += grid_size)
+       {
+         int j;
+         for (j = 0; j < bitmap_h; j += grid_size)
+           XDrawRectangle (dpy, d, gc,
+                           xoff+i+half2, yoff+j+half2,
+                           grid_size-border-1, grid_size-border-1);
+       }
+
+      XSetForeground(dpy, gc, fg);
       for (i = 0; i <= bitmap_w; i += grid_size)
-       XFillRectangle (dpy, d, gc, xoff+i-border/2, yoff, border, bitmap_h);
+       XFillRectangle (dpy, d, gc, xoff+i-half, yoff, border, bitmap_h);
       for (i = 0; i <= bitmap_h; i += grid_size)
-       XFillRectangle (dpy, d, gc, xoff, yoff+i-border/2, bitmap_w, border);
+       XFillRectangle (dpy, d, gc, xoff, yoff+i-half, bitmap_w, border);
     }
 
   if (xoff)
@@ -235,10 +331,11 @@ char *defaults [] = {
   "*visualID:                  Best",
 #endif
 
-  "*background:                        Black",
+  "SlidePuzzle.background:     Black",
+  "SlidePuzzle.foreground:     Gray",
   "*gridSize:                  70",
   "*pixelIncrement:            10",
-  "*internalBorderWidth:       1",
+  "*internalBorderWidth:       4",
   "*delay:                     50000",
   "*delay2:                    1000000",
   0
index 3d03dc50a195316b09fa6df0bca66096f755953b..fac500337d01b01d243b86ac2381c7b3b19f43ec 100644 (file)
@@ -1,4 +1,4 @@
-.TH XScreenSaver 1 "3-dec-92" "X Version 11"
+.TH XScreenSaver 1 "24-Nov-97" "X Version 11"
 .SH NAME
 slidescreen - permute the screen image like an 8-puzzle
 .SH SYNOPSIS
@@ -43,7 +43,31 @@ is closely related to the \fI\-increment\fP parameter.
 .B \-delay \fImicroseconds\fP
 How much of a delay should be introduced between the end of the motion of
 one segment and the beginning of the motion of another.  Default 1000000,
-which isone second.
+which is one second.
+.SH RESOURCES
+On some systems (currently, only SGIs), this program can, instead of grabbing
+a desktop image, grab a frame of video from an external camera and manipulate
+that instead.  The following resources control that.
+.PP
+.TP 8
+.B grabVideoProbability \fR(Float)\fP
+What portion of the time to grab video rather than a screen image, 
+between 0.0 and 1.0.  Defaults to 0.5, or half the time.
+.TP 8
+.B videoDevice \fR(Integer)\fP
+The number of the default video input device to check first.  If unspecified, 
+the default camera (from videopanel(1)) will be checked first.  After that, all
+other available video input devices will be checked in order.  
+
+The first one which produces a non-black image will be used.  If all images
+are black, the others will be re-checked a few times before giving up and
+falling back to simply grabbing a desktop image (but note that this takes a
+few seconds, so if you don't actually have any video sources hooked up, you
+should consider turning off video grabbing by setting
+\fBgrabVideoProbability\fP to 0.0.)
+.TP 8
+.B videoGain \fR(Float)\fP
+The amount by which to brighten the grabbed image.  This defaults to 2.2.
 .SH ENVIRONMENT
 .PP
 .TP 8
index 3b83e2bbe53ae8a0b28e10eb1daaaffc1cc52d3d..e21bd2c479d0ae0bd91e16d5c560bf6e5694af97 100644 (file)
@@ -97,7 +97,7 @@ prepare_screen(ModeInfo * mi, slipstruct * s)
        int         not_solid = halfrandom(10);
 
 #ifdef STANDALONE                        /* jwz -- sometimes hack the desktop image! */
-       if (halfrandom(5) == 0)
+       if (halfrandom(2) == 0)
          {
                grab_screen_image(DefaultScreenOfDisplay (MI_DISPLAY(mi)),
                                                  MI_WINDOW(mi));
@@ -107,7 +107,7 @@ prepare_screen(ModeInfo * mi, slipstruct * s)
 
        s->backwards = LRAND() & 1;             /* jwz: go the other way sometimes */
 
-       if (s->first_time || !halfrandom(5)) {
+       if (s->first_time || (0 == halfrandom(10))) {
                XClearWindow(display, MI_WINDOW(mi));
                n = 300;
        } else {
@@ -127,6 +127,7 @@ prepare_screen(ModeInfo * mi, slipstruct * s)
                XSetForeground(display, gc, MI_WIN_BLACK_PIXEL(mi));
 
        for (i = 0; i < n; i++) {
+         int ww = ((w/2) + halfrandom(w));
                if (not_solid)
                        if (MI_NPIXELS(mi) > 2)
                                XSetForeground(display, gc, MI_PIXEL(mi, halfrandom(MI_NPIXELS(mi))));
@@ -135,9 +136,9 @@ prepare_screen(ModeInfo * mi, slipstruct * s)
                        else
                                XSetForeground(display, gc, MI_WIN_BLACK_PIXEL(mi));
                XFillRectangle(display, MI_WINDOW(mi), gc,
-                              halfrandom(s->width - w),
-                              halfrandom(s->height - w),
-                              ww);
+                              halfrandom(s->width - ww),
+                              halfrandom(s->height - ww),
+                              ww, ww);
        }
        s->first_time = 0;
 }
@@ -211,7 +212,7 @@ draw_slip(ModeInfo * mi)
 
                /* (x,y) is in biunit square */
                switch (s->mode) {
-                       case 0:
+                       case 0:                                                         /* rotor */
                                dx = x;
                                dy = y;
 
@@ -235,11 +236,11 @@ draw_slip(ModeInfo * mi)
                                        dy = -dy;
                                }
                                break;
-                       case 1:
+                       case 1:                                                         /* shuffle */
                                dx = erandom(3);
                                dy = erandom(3);
                                break;
-                       case 2:
+                       case 2:                                                         /* explode */
                                dx = x * 3;
                                dy = y * 3;
                                break;
index 569e1a1232de0dad522eaf8535dc2a7b86d9c697..f18d367fe57781f41ac43623e295c8426eabb53a 100644 (file)
@@ -1,13 +1,13 @@
-.TH XScreenSaver 1 "13-aug-92" "X Version 11"
+.TH XScreenSaver 1 "24-Nov-97" "X Version 11"
 .SH NAME
-flame - sucks your screen into a jet engine
+slip - sucks your screen into a jet engine
 .SH SYNOPSIS
-.B flame
+.B slip
 [\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-iterations \fIinteger\fP] [\-points \fIinteger\fP] [\-delay \fImicroseconds\fP] [\-delay2 \fImicroseconds\fP]
 .SH DESCRIPTION
 The \fIslip\fP program does lots of blits and chews up your screen image.
 .SH OPTIONS
-.I flame
+.I slip
 accepts the following options:
 .TP 8
 .B \-window
@@ -31,23 +31,40 @@ How many colors should be used (if possible).  Default 128.
 The colors used cycle through the hue, making N stops around 
 the color wheel.
 .TP 8
-.B \-iterations \fIinteger\fP
-How many fractals to generate.  Default 25.
+.B \-count \fIinteger\fP
+How many whooziwhatsis to generate.  Default 35.
 .TP 8
-.B \-points \fIinteger\fP
-How many pixels to draw for each fractal.  Default 10000.
+.B \-cycles \fIinteger\fP
+How long to frobnicate.  Default 50.
 .TP 8
 .B \-delay \fImicroseconds\fP
-How long we should wait between drawing each fractal.  Default 50000,
+How long we should wait between drawing each step.  Default 50000,
 or about 1/20th second.
-.TP 8
-.B \-cycles \fIinteger\fP
-How long to frobnicate.  Default 50.
 
+.SH RESOURCES
+On some systems (currently, only SGIs), this program can, instead of grabbing
+a desktop image, grab a frame of video from an external camera and manipulate
+that instead.  The following resources control that.
+.PP
 .TP 8
-.B \-count \fIinteger\fP
-How many whooziwhatsis.  Default 35.
+.B grabVideoProbability \fR(Float)\fP
+What portion of the time to grab video rather than a screen image, 
+between 0.0 and 1.0.  Defaults to 0.5, or half the time.
+.TP 8
+.B videoDevice \fR(Integer)\fP
+The number of the default video input device to check first.  If unspecified, 
+the default camera (from videopanel(1)) will be checked first.  After that, all
+other available video input devices will be checked in order.  
 
+The first one which produces a non-black image will be used.  If all images
+are black, the others will be re-checked a few times before giving up and
+falling back to simply grabbing a desktop image (but note that this takes a
+few seconds, so if you don't actually have any video sources hooked up, you
+should consider turning off video grabbing by setting
+\fBgrabVideoProbability\fP to 0.0.)
+.TP 8
+.B videoGain \fR(Float)\fP
+The amount by which to brighten the grabbed image.  This defaults to 2.2.
 .SH ENVIRONMENT
 .PP
 .TP 8
index 143ddf8b047be3aa997b59f6a3d55c89ccde0490..fa5a7124c26f09a2af648abeffbadaa03d058d8d 100644 (file)
@@ -512,7 +512,7 @@ screenhack (Display *dpy, Window window)
 
              free_starfish (s);
 
-             if (delay2 && !blob_p)
+             if (delay2 && !blob_p && cycle_p)
                {
                  int i = 0;
                  while (i < delay2)
diff --git a/hacks/triangle.c b/hacks/triangle.c
new file mode 100644 (file)
index 0000000..d8be189
--- /dev/null
@@ -0,0 +1,362 @@
+/* -*- Mode: C; tab-width: 4 -*- */
+/* triangle --- create a triangle-mountain */
+
+#if !defined( lint ) && !defined( SABER )
+static const char sccsid[] = "@(#)triangle.c   4.04 97/07/28 xlockmore";
+
+#endif
+
+/*-
+ * Copyright (c) 1995 by Tobias Gloth
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation.
+ *
+ * This file is provided AS IS with no warranties of any kind.  The author
+ * shall have no liability with respect to the infringement of copyrights,
+ * trade secrets or any patents by this file or any part thereof.  In no
+ * event will the author be liable for any lost revenue or profits or
+ * other special, indirect and consequential damages.
+ *
+ * Revision History:
+ * 10-May-97: Compatible with xscreensaver
+ * 10-Mar-96: re-arranged and re-formatted the code for appearance and
+ *            to make common subroutines.  Simplified.
+ *               Ron Hitchens <ron@idiom.com>
+ * 07-Mar-96: Removed internal delay code, set MI_PAUSE(mi) for inter-scene
+ *            delays.  No other delays are needed here.
+ *            Made pause time sensitive to value of cycles (in 10ths of a
+ *            second).  Removed (hopefully) all references to globals.
+ *               Ron Hitchens <ron@idiom.com>
+ * 27-Feb-96: Undid the changes listed below.  Added ModeInfo argument.
+ *               Implemented delay between scenes using the MI_PAUSE(mi)
+ *            scheme.  Ron Hitchens <ron@idiom.com>
+ * 27-Dec-95: Ron Hitchens <ron@idiom.com>
+ *            Modified logic of draw_triangle() to provide a delay
+ *            (sensitive to the value of cycles) between each iteration.
+ *            Because this mode is so compute intensive, when the new
+ *            event loop adjusted the delay to compensate, this mode had
+ *            almost no delay time left.  This change pauses between each
+ *            new landscape, but could still be done better (it is not
+ *            sensitive to input events while drawing, for example).
+ * 03-Nov-95: Many changes (hopefully some good ones) by David Bagley
+ * 01-Oct-95: Written by Tobias Gloth
+ */
+
+#ifdef STANDALONE
+# define PROGCLASS "Triangle"
+# define HACK_INIT init_triangle
+# define HACK_DRAW draw_triangle
+# define triangle_opts xlockmore_opts
+# define DEFAULTS      "*delay: 10000 \n"      \
+                                       "*ncolors: 128 \n"
+# define SMOOTH_COLORS
+# include "xlockmore.h"                /* in xscreensaver distribution */
+#else /* STANDALONE */
+# include "xlock.h"                    /* in xlockmore distribution */
+#endif /* STANDALONE */
+
+ModeSpecOpt triangle_opts =
+{0, NULL, 0, NULL, NULL};
+
+#define MAX_STEPS 8
+#define MAX_SIZE  (1<<MAX_STEPS)
+#define MAX_LEVELS 1000
+
+#define DELTA  0.4
+#define LEFT   (-0.25)
+#define RIGHT  1.25
+#define TOP    0.3
+#define BOTTOM 1.0
+#define BLUE   45              /* Just the right shade of blue */
+
+#define BACKFACE_REMOVAL
+
+#define DISPLACE(h,d) ((h)/2+LRAND()/(MAXRAND/(2*(d)+1))-d)
+
+typedef struct {
+       int         width;
+       int         height;
+       int         size;
+       int         steps;
+       int         stage;
+       int         init_now;
+       int         fast;
+       int         i;
+       int         j;
+       int         d;
+       short       level[MAX_LEVELS];
+       int         xpos[2 * MAX_SIZE + 1];
+       int         ypos[MAX_SIZE + 1];
+       short       H[(MAX_SIZE + 1) * (MAX_SIZE + 2) / 2];
+       short      *h[MAX_SIZE + 1];
+       short       delta[MAX_STEPS];
+} trianglestruct;
+
+static trianglestruct *triangles = NULL;
+
+static
+void
+draw_atriangle(ModeInfo * mi, XPoint * p, int y_0, int y_1, int y_2, double dinv)
+{
+       Display    *display = MI_DISPLAY(mi);
+       Window      window = MI_WINDOW(mi);
+       GC          gc = MI_GC(mi);
+
+       if (MI_NPIXELS(mi) > 2) {       /* color */
+               int         dmax, dmin;
+               long        color;
+
+               dmin = MIN(y_0, y_1);
+               dmin = MIN(dmin, y_2);
+               dmax = MAX(y_0, y_1);
+               dmax = MAX(dmax, y_2);
+
+               if (dmax == 0) {
+                       color = BLUE;
+               } else {
+                       color = MI_NPIXELS(mi) -
+                               (int) ((double) MI_NPIXELS(mi) / M_PI_2 * atan(dinv * (dmax - dmin)));
+               }
+
+               XSetForeground(display, gc, MI_PIXEL(mi, color % MI_NPIXELS(mi)));
+               XFillPolygon(display, window, gc, p, 3, Convex, CoordModeOrigin);
+       } else {
+               /* mono */
+#ifdef BACKFACE_REMOVAL
+               XSetForeground(display, gc, MI_WIN_BLACK_PIXEL(mi));
+               XFillPolygon(display, window, gc, p, 3, Convex, CoordModeOrigin);
+#endif
+               XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(mi));
+               XDrawLine(display, window, gc, p[0].x, p[0].y, p[1].x, p[1].y);
+               XDrawLine(display, window, gc, p[1].x, p[1].y, p[2].x, p[2].y);
+               XDrawLine(display, window, gc, p[2].x, p[2].y, p[0].x, p[0].y);
+       }
+}
+
+static
+void
+calc_points1(trianglestruct * tp, int d, int *y0_p, int *y1_p, int *y2_p, XPoint * p)
+{
+       *y0_p = tp->level[MAX(tp->h[tp->i][tp->j], 0)];
+       *y1_p = tp->level[MAX(tp->h[tp->i + d][tp->j], 0)];
+       *y2_p = tp->level[MAX(tp->h[tp->i][tp->j + d], 0)];
+
+       p[0].x = tp->xpos[2 * tp->i + tp->j];
+       p[1].x = tp->xpos[2 * (tp->i + d) + tp->j];
+       p[2].x = tp->xpos[2 * tp->i + (tp->j + d)];
+
+       p[0].y = tp->ypos[tp->j] - *y0_p;
+       p[1].y = tp->ypos[tp->j] - *y1_p;
+       p[2].y = tp->ypos[tp->j + d] - *y2_p;
+}
+
+static
+void
+calc_points2(trianglestruct * tp, int d, int *y0_p, int *y1_p, int *y2_p, XPoint * p)
+{
+       *y0_p = tp->level[MAX(tp->h[tp->i + d][tp->j], 0)];
+       *y1_p = tp->level[MAX(tp->h[tp->i + d][tp->j + d], 0)];
+       *y2_p = tp->level[MAX(tp->h[tp->i][tp->j + d], 0)];
+
+       p[0].x = tp->xpos[2 * (tp->i + d) + tp->j];
+       p[1].x = tp->xpos[2 * (tp->i + d) + (tp->j + d)];
+       p[2].x = tp->xpos[2 * tp->i + (tp->j + d)];
+
+       p[0].y = tp->ypos[tp->j] - *y0_p;
+       p[1].y = tp->ypos[tp->j + d] - *y1_p;
+       p[2].y = tp->ypos[tp->j + d] - *y2_p;
+}
+
+
+static
+void
+draw_mesh(ModeInfo * mi, trianglestruct * tp, int d, int count)
+{
+       XPoint      p[3];
+       int         first = 1;
+       int         y_0, y_1, y_2;
+       double      dinv = 0.2 / d;
+
+       if ((tp->j == 0) && (tp->i == 0)) {
+#if 0 /* jwz */
+               XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi));
+#else
+               {
+                 int x = 0;
+                 int y = 0;
+                 int x2 = MI_WIN_WIDTH(mi);
+                 int y2 = tp->ypos[0];
+                 XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_WIN_BLACK_PIXEL(mi));
+                 XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi),
+                                                x, y, x2, y2);
+               }
+#endif
+       }
+       for (; (tp->j < tp->size) && (count > 0); tp->j += ((count) ? d : 0)) {
+               for (tp->i = (first) ? tp->i : 0, first = 0;
+                    (tp->i < MAX_SIZE - tp->j) && (count > 0);
+                    tp->i += d, count--) {
+                       if (tp->i + tp->j < tp->size) {
+                               calc_points1(tp, d, &y_0, &y_1, &y_2, p);
+                               draw_atriangle(mi, p, y_0, y_1, y_2, dinv);
+                       }
+                       if (tp->i + tp->j + d < tp->size) {
+                               calc_points2(tp, d, &y_0, &y_1, &y_2, p);
+                               draw_atriangle(mi, p, y_0, y_1, y_2, dinv);
+                       }
+               }
+       }
+
+       if (tp->j == tp->size) {
+               tp->init_now = 1;
+       }
+}
+
+void
+init_triangle(ModeInfo * mi)
+{
+       trianglestruct *tp;
+       short      *tmp;
+       int         i, dim, one;
+
+       if (triangles == NULL) {
+               if ((triangles = (trianglestruct *) calloc(MI_NUM_SCREENS(mi),
+                                          sizeof (trianglestruct))) == NULL)
+                       return;
+       }
+       tp = &triangles[MI_SCREEN(mi)];
+
+       tp->width = MI_WIN_WIDTH(mi);
+       tp->height = MI_WIN_HEIGHT(mi);
+       tp->init_now = 1;
+       tp->fast = 2;
+
+       XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi));
+
+
+
+       tp->steps = MAX_STEPS;
+       do {
+               tp->size = 1 << --tp->steps;
+       } while (tp->size * 5 > tp->width);
+       tmp = tp->H;
+       for (i = 0; i < tp->size + 1; i++) {
+               tp->h[i] = tmp;
+               tmp += (tp->size) + 1 - i;
+       }
+
+       tp->stage = -1;
+       dim = MIN(tp->width, tp->height);
+
+       for (i = 0; i < 2 * tp->size + 1; i++) {
+               tp->xpos[i] = (short) ((((double) i)
+                        / ((double) (2 * tp->size)) * (RIGHT - LEFT) + LEFT)
+                                      * dim) + (tp->width - dim) / 2;
+       }
+
+       for (i = 0; i < (tp->size + 1); i++) {
+               tp->ypos[i] = (short) ((((double) i)
+                        / ((double) tp->size) * (BOTTOM - TOP) + TOP) * dim)
+                       + (tp->height - dim) / 2;
+       }
+
+       for (i = 0; i < tp->steps; i++) {
+               tp->delta[i] = ((short) (DELTA * dim)) >> i;
+       }
+
+       one = tp->delta[0];
+
+       if (one > 0)
+               for (i = 0; i < MAX_LEVELS; i++) {
+                       tp->level[i] = (i * i) / one;
+               }
+}
+
+void
+draw_triangle(ModeInfo * mi)
+{
+       trianglestruct *tp = &triangles[MI_SCREEN(mi)];
+       int         d, d2, i, j, delta;
+
+       if (!tp->init_now) {
+               draw_mesh(mi, tp, tp->d / 2, MAX_SIZE / tp->d);
+
+               /* The init_now flag will pop up when the scene is complete.
+                * Cycles specifies how long to wait, in 1/10 secs.
+                TODO: This is wrong for multi-screens ***
+                */
+               if (tp->init_now) {
+#ifndef STANDALONE
+                       MI_PAUSE(mi) = 2000000;
+#else
+                       if (tp->stage == -1)
+                         {
+                               XSync(MI_DISPLAY(mi), False);
+                               usleep(2000000);
+                               XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi));
+# if 1
+                               if (!mono_p)
+                                 {
+                                       free_colors(mi->dpy, mi->xgwa.colormap, mi->colors,
+                                                               mi->npixels);
+                                       make_smooth_colormap (mi->dpy,
+                                                                                 mi->xgwa.visual, mi->xgwa.colormap,
+                                                                                 mi->colors, &mi->npixels,
+                                                                                 True, &mi->writable_p, True);
+                                 }
+# endif /* 0 */
+                         }
+#endif
+               }
+               return;
+       }
+       if (tp->delta[0] > 0) {
+               if (!(++tp->stage)) {
+                       tp->h[0][0] = (short int) MAX(0, DISPLACE(0, tp->delta[0]));
+                       tp->h[tp->size][0] = (short int) MAX(0, DISPLACE(0, tp->delta[0]));
+                       tp->h[0][tp->size] = (short int) MAX(0, DISPLACE(0, tp->delta[0]));
+               } else {
+                       d = 2 << (tp->steps - tp->stage);
+                       d2 = d / 2;
+                       delta = tp->delta[tp->stage - 1];
+
+                       for (i = 0; i < tp->size; i += d) {
+                               for (j = 0; j < (tp->size - i); j += d) {
+                                       tp->h[i + d2][j] = (short int) DISPLACE(tp->h[i][j] +
+                                                    tp->h[i + d][j], delta);
+                                       tp->h[i][j + d2] = (short int) DISPLACE(tp->h[i][j] +
+                                                    tp->h[i][j + d], delta);
+                                       tp->h[i + d2][j + d2] = (short int) DISPLACE(tp->h[i + d][j] +
+                                                    tp->h[i][j + d], delta);
+                               }
+
+                               tp->init_now = 0;
+                               tp->i = 0;
+                               tp->j = 0;
+                               tp->d = d;
+                       }
+               }
+       }
+       if (tp->stage == tp->steps) {
+               tp->stage = -1;
+       }
+}
+
+void
+release_triangle(ModeInfo * mi)
+{
+       if (triangles != NULL) {
+               (void) free((void *) triangles);
+               triangles = NULL;
+       }
+}
+
+void
+refresh_triangle(ModeInfo * mi)
+{
+       /* Do nothing, it will refresh by itself */
+}
diff --git a/hacks/vines.c b/hacks/vines.c
new file mode 100644 (file)
index 0000000..2002946
--- /dev/null
@@ -0,0 +1,142 @@
+/* -*- Mode: C; tab-width: 4 -*-
+ * vines --- another geometric pattern generator.
+ */
+#if !defined( lint ) && !defined( SABER )
+static const char sccsid[] = "@(#)vines.c      4.02 97/04/01 xlockmore";
+#endif
+
+/* xlockmore mode written by Tracy Camp
+ * campt@hurrah.com 1997
+ * released to the public domain
+ *
+ * This was modifed from a 'screen saver' that a friend and I
+ * wrote on our TI-8x calculators in high school physics one day
+ * Basically another geometric pattern generator, this ones claim
+ * to fame is a pseudo-fractal looking vine like pattern that creates
+ * nifty whorls and loops.
+ *
+ * Revision History:
+ * 10-May-97: jwz@netscape.com: turned into a standalone program.
+ * 21-Mar-97:  David Hansen <dhansen@metapath.com>
+ *             Updated mode to draw complete patterns on every
+ *             iteration instead of growing the vine.  Also made
+ *             adjustments to randomization and changed variable
+ *             names to make logic easier to follow.
+ */
+
+#ifdef STANDALONE
+# define PROGCLASS                                     "Vines"
+# define HACK_INIT                                     init_vines
+# define HACK_DRAW                                     draw_vines
+# define vines_opts                                    xlockmore_opts
+# define DEFAULTS              "*delay:        200000 \n"                      \
+                                               "*ncolors:      64     \n"                      \
+                                               "*eraseSpeed:   400 \n"                 \
+                                               "*eraseMode:    -1 \n"
+# include "xlockmore.h"                                /* from the xscreensaver distribution */
+# include "erase.h"
+#else  /* !STANDALONE */
+# include "xlock.h"                                    /* from the xlockmore distribution */
+#endif /* !STANDALONE */
+
+ModeSpecOpt vines_opts = {
+  0, NULL, 0, NULL, NULL };
+
+typedef struct {
+       int         a;
+       int         x1;
+       int         y1;
+       int         x2;
+       int         y2;
+       int         length;
+       int         iterations;
+       int         constant;
+       int         ang;
+       int         centerx;
+       int         centery;
+} vinestruct;
+
+static vinestruct *vines = NULL;
+
+void
+refresh_vines(ModeInfo * mi)
+{
+}
+
+void
+init_vines(ModeInfo * mi)
+{
+       Display    *display = MI_DISPLAY(mi);
+       vinestruct *fp;
+
+       if (vines == NULL) {
+               if ((vines = (vinestruct *) calloc(MI_NUM_SCREENS(mi), sizeof (vinestruct))) == NULL) {
+                       return;
+               }
+       }
+       fp = &vines[MI_SCREEN(mi)];
+
+       fp->iterations = 30 + NRAND(100);
+
+       XClearWindow(display, MI_WINDOW(mi));
+}
+
+void
+draw_vines(ModeInfo * mi)
+{
+       vinestruct *fp = &vines[MI_SCREEN(mi)];
+       Display    *display = MI_DISPLAY(mi);
+       GC          gc = MI_GC(mi);
+       int         i;
+
+       if (--(fp->iterations) == 0) {
+#ifdef STANDALONE
+         erase_full_window(MI_DISPLAY(mi), MI_WINDOW(mi));
+#endif /* STANDALONE */
+         init_vines(mi);
+       }
+
+       fp->centerx = NRAND(MI_WIN_WIDTH(mi));
+       fp->centery = NRAND(MI_WIN_HEIGHT(mi));
+
+       fp->ang = 60 + NRAND(720);
+       fp->length = 100 + NRAND(3000);
+       fp->constant = fp->length * (10 + NRAND(10));
+
+       fp->a = 0;
+       fp->x1 = 0;
+       fp->y1 = 0;
+       fp->x2 = 1;
+       fp->y2 = 0;
+
+       if (MI_NPIXELS(mi) > 2)
+               XSetForeground(display, gc, MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))));
+       else
+               XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(mi));
+
+
+       for (i = 0; i < fp->length; i++) {
+               XDrawLine(display, MI_WINDOW(mi), gc,
+                         fp->centerx + (fp->x1 / fp->constant),
+                         fp->centery - (fp->y1 / fp->constant),
+                         fp->centerx + (fp->x2 / fp->constant),
+                         fp->centery - (fp->y2 / fp->constant));
+
+               fp->a += (fp->ang * i);
+
+               fp->x1 = fp->x2;
+               fp->y1 = fp->y2;
+
+               fp->x2 += (int) (i * ((cos(fp->a) * 360) / (2 * M_PI)));
+               fp->y2 += (int) (i * ((sin(fp->a) * 360) / (2 * M_PI)));
+       }
+}
+
+void
+release_vines(ModeInfo * mi)
+{
+       if (vines != NULL) {
+               (void) free((void *) vines);
+               vines = NULL;
+       }
+}
diff --git a/hacks/vines.man b/hacks/vines.man
new file mode 100644 (file)
index 0000000..0245cdc
--- /dev/null
@@ -0,0 +1,62 @@
+.TH XScreenSaver 1 "10-May-97" "X Version 11"
+.SH NAME
+vines - draws pseudo-fractal geometric patterns
+.SH SYNOPSIS
+.B vines
+[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-ncolors \fIinteger\fP] [\-delay \fImicroseconds\fP]
+
+.SH DESCRIPTION
+The \fIvines\fP program is yet another geometric pattern generator, this
+one's claim to fame being a pseudo-fractal looking vine like pattern that
+creates nifty whorls and loops.
+.SH OPTIONS
+.I vines
+accepts the following options:
+.TP 8
+.B \-window
+Draw on a newly-created window.  This is the default.
+.TP 8
+.B \-root
+Draw on the root window.
+.TP 8
+.B \-mono 
+If on a color display, pretend we're on a monochrome display.
+.TP 8
+.B \-install
+Install a private colormap for the window.
+.TP 8
+.B \-visual \fIvisual\fP
+Specify which visual to use.  Legal values are the name of a visual class,
+or the id number (decimal or hex) of a specific visual.
+.TP 8
+.B \-ncolors \fIinteger\fP
+How many colors should be used (if possible).  Default 200.
+The colors are chosen randomly.
+.SH ENVIRONMENT
+.PP
+.TP 8
+.B DISPLAY
+to get the default host and display number.
+.TP 8
+.B XENVIRONMENT
+to get the name of a resource file that overrides the global resources
+stored in the RESOURCE_MANAGER property.
+.SH SEE ALSO
+.BR X (1),
+.BR xscreensaver (1),
+.BR xlock (1)
+.SH COPYRIGHT
+Copyright \(co 1997 by Tracy Camp.
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation. 
+.SH AUTHOR
+Tracy Camp <campt@hurrah.com>, 1997.
+
+Tweaked by David Hansen <dhansen@metapath.com>, 21-Mar-97.
+
+Ability to run standalone or with \fIxscreensaver\fP added by 
+Jamie Zawinski <jwz@netscape.com>, 10-May-97.
diff --git a/hacks/worm.c b/hacks/worm.c
new file mode 100644 (file)
index 0000000..7eb5fdf
--- /dev/null
@@ -0,0 +1,441 @@
+
+/* -*- Mode: C; tab-width: 4 -*- */
+/* worm --- draw wiggly worms */
+
+#if !defined( lint ) && !defined( SABER )
+static const char sccsid[] = "@(#)worm.c       4.04 97/07/28 xlockmore";
+
+#endif
+
+/*-
+ * Copyright (c) 1991 by Patrick J. Naughton.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation.
+ *
+ * This file is provided AS IS with no warranties of any kind.  The author
+ * shall have no liability with respect to the infringement of copyrights,
+ * trade secrets or any patents by this file or any part thereof.  In no
+ * event will the author be liable for any lost revenue or profits or
+ * other special, indirect and consequential damages.
+ *
+ * Revision History:
+ * 10-May-97: Compatible with xscreensaver
+ * 03-Sep-96: fixed bug in allocation of space for worms, added 3d support
+ *            Henrik Theiling <theiling@coli.uni-sb.de>
+ * 27-Sep-95: put back malloc
+ * 23-Sep-93: got rid of "rint". (David Bagley)
+ * 27-Sep-91: got rid of all malloc calls since there were no calls to free().
+ * 25-Sep-91: Integrated into X11R5 contrib xlock.
+ *
+ * Adapted from a concept in the Dec 87 issue of Scientific American p. 142.
+ *
+ * SunView version: Brad Taylor <brad@sun.com>
+ * X11 version: Dave Lemke <lemke@ncd.com>
+ * xlock version: Boris Putanec <bp@cs.brown.edu>
+ */
+
+#ifdef STANDALONE
+# define PROGCLASS "Worm"
+# define HACK_INIT init_worm
+# define HACK_DRAW draw_worm
+# define worm_opts xlockmore_opts
+# define DEFAULTS      "*delay:  17000 \n"     \
+                                       "*count:  -20 \n"               \
+                                       "*cycles:  10 \n"               \
+                                       "*size:   -3 \n"                \
+                                       "*ncolors: 150 \n"              \
+                                       "*use3d:   False \n"    \
+                                       "*delta3d: 1.5 \n"              \
+                                       "*right3d: red \n"              \
+                                       "*left3d:  blue \n"             \
+                                       "*both3d:  magenta \n"  \
+                                       "*none3d:  black \n     "
+# define SMOOTH_COLORS
+# include "xlockmore.h"                /* in xscreensaver distribution */
+#else /* STANDALONE */
+# include "xlock.h"            /* in xlockmore distribution */
+#endif /* STANDALONE */
+
+ModeSpecOpt worm_opts =
+{0, NULL, 0, NULL, NULL};
+
+#define MINSIZE 1
+
+#define SEGMENTS  36
+#define MINWORMS 1
+
+#define MAXZ      750
+#define MINZ      100
+#define SCREENZ   200
+#define GETZDIFF(z) (MI_DELTA3D(mi)*20.0*(1.0-(SCREENZ)/((float)(z)+MINZ)))
+#define IRINT(x) ((int)(((x)>0.0)?(x)+0.5:(x)-0.5))
+
+/* How many segments to draw per cycle when redrawing */
+#define REDRAWSTEP 3
+
+typedef struct {
+       XPoint     *circ;
+       int        *diffcirc;
+       int         dir, dir2;
+       int         tail;
+       int         x, y, z;
+       int         redrawing, redrawpos;
+} wormstuff;
+
+typedef struct {
+       int         xsize, ysize, zsize;
+       int         wormlength;
+       int         nc;
+       int         nw;
+       int         circsize;
+       wormstuff  *worm;
+       XRectangle *rects;      /* [NUMCOLORS * batchcount/NUMCOLORS+1] */
+       int         maxsize;
+       int        *size;
+       unsigned int chromo;
+} wormstruct;
+
+static float sintab[SEGMENTS];
+static float costab[SEGMENTS];
+static int  init_table = 0;
+
+static wormstruct *worms = NULL;
+
+static void
+worm_doit(ModeInfo * mi, int which, unsigned long color)
+{
+       Display    *display = MI_DISPLAY(mi);
+       Window      window = MI_WINDOW(mi);
+       GC          gc = MI_GC(mi);
+       wormstruct *wp = &worms[MI_SCREEN(mi)];
+       wormstuff  *ws = &wp->worm[which];
+       int         x, y, z;
+       int         diff;
+
+       ws->tail++;
+       if (ws->tail == wp->wormlength)
+               ws->tail = 0;
+
+       x = ws->circ[ws->tail].x;
+       y = ws->circ[ws->tail].y;
+
+       if (MI_WIN_IS_USE3D(mi)) {
+               diff = ws->diffcirc[ws->tail];
+               if (MI_WIN_IS_INSTALL(mi)) {
+                       XSetForeground(display, gc, MI_NONE_COLOR(mi));
+                       XFillRectangle(display, window, gc, x - diff, y,
+                                      wp->circsize, wp->circsize);
+                       XFillRectangle(display, window, gc, x + diff, y,
+                                      wp->circsize, wp->circsize);
+               } else {
+                       XClearArea(display, window, x - diff, y,
+                                  wp->circsize, wp->circsize, False);
+                       XClearArea(display, window, x + diff, y,
+                                  wp->circsize, wp->circsize, False);
+               }
+       } else
+               XClearArea(display, window, x, y, wp->circsize, wp->circsize, False);
+
+       if (LRAND() & 1)
+               ws->dir = (ws->dir + 1) % SEGMENTS;
+       else
+               ws->dir = (ws->dir + SEGMENTS - 1) % SEGMENTS;
+
+       x = (ws->x + IRINT((float) wp->circsize * costab[ws->dir]) +
+            wp->xsize) % wp->xsize;
+       y = (ws->y + IRINT((float) wp->circsize * sintab[ws->dir]) +
+            wp->ysize) % wp->ysize;
+
+       ws->circ[ws->tail].x = x;
+       ws->circ[ws->tail].y = y;
+       ws->x = x;
+       ws->y = y;
+
+       if (MI_WIN_IS_USE3D(mi)) {
+               if (LRAND() & 1)
+                       ws->dir2 = (ws->dir2 + 1) % SEGMENTS;
+               else
+                       ws->dir2 = (ws->dir2 + SEGMENTS - 1) % SEGMENTS;
+               /* for the z-axis the wrap-around looks bad, so worms should just turn around. */
+               z = (int) (ws->z + wp->circsize * sintab[ws->dir2]);
+               if (z < 0 || z >= wp->zsize)
+                       z = (int) (ws->z - wp->circsize * sintab[ws->dir2]);
+
+               diff = (int) (GETZDIFF(z) + 0.5);       /* ROUND */
+               ws->diffcirc[ws->tail] = diff;
+
+               ws->z = z;
+
+               /* right eye */
+               color = 0;
+               wp->rects[color * wp->maxsize + wp->size[color]].x = x + diff;
+               wp->rects[color * wp->maxsize + wp->size[color]].y = y;
+               wp->size[color]++;
+
+               /* left eye */
+               color = 1;
+               wp->rects[color * wp->maxsize + wp->size[color]].x = x - diff;
+               wp->rects[color * wp->maxsize + wp->size[color]].y = y;
+               wp->size[color]++;
+
+#if 0
+               if (ws->redrawing) {    /* Too hard for now */
+                       int         j;
+
+                       for (j = 0; j < REDRAWSTEP; j++) {
+                               int         k = (ws->tail - ws->redrawpos + wp->wormlength)
+                               % wp->wormlength;
+
+                               color = 0;
+                               wp->rects[color * wp->maxsize + wp->size[color]].x =
+                                       ws->circ[k].x + ws->diffcirc[k];
+                               wp->rects[color * wp->maxsize + wp->size[color]].y =
+                                       ws->circ[k].y;
+                               wp->size[color]++;
+
+                               color = 1;
+                               wp->rects[color * wp->maxsize + wp->size[color]].x =
+                                       ws->circ[k].x - ws->diffcirc[k];
+                               wp->rects[color * wp->maxsize + wp->size[color]].y =
+                                       ws->circ[k].y;
+                               wp->size[color]++;
+
+                               if (++(ws->redrawpos) >= wp->wormlength) {
+                                       ws->redrawing = 0;
+                                       break;
+                               }
+                       }
+               }
+#endif
+
+       } else {
+
+               wp->rects[color * wp->maxsize + wp->size[color]].x = x;
+               wp->rects[color * wp->maxsize + wp->size[color]].y = y;
+               wp->size[color]++;
+               if (ws->redrawing) {
+                       int         j;
+
+                       ws->redrawpos++;
+                       /* Compensates for the changed ws->tail
+                          since the last callback. */
+
+                       for (j = 0; j < REDRAWSTEP; j++) {
+                               int         k = (ws->tail - ws->redrawpos + wp->wormlength)
+                               % wp->wormlength;
+
+                               wp->rects[color * wp->maxsize + wp->size[color]].x = ws->circ[k].x;
+                               wp->rects[color * wp->maxsize + wp->size[color]].y = ws->circ[k].y;
+                               wp->size[color]++;
+
+                               if (++(ws->redrawpos) >= wp->wormlength) {
+                                       ws->redrawing = 0;
+                                       break;
+                               }
+                       }
+               }
+       }
+}
+
+static void
+free_worms(wormstruct * wp)
+{
+       int         wn;
+
+       if (wp->worm) {
+               for (wn = 0; wn < wp->nw; wn++) {
+                       if (wp->worm[wn].circ)
+                               (void) free((void *) wp->worm[wn].circ);
+                       if (wp->worm[wn].diffcirc)
+                               (void) free((void *) wp->worm[wn].diffcirc);
+               }
+               (void) free((void *) wp->worm);
+               wp->worm = NULL;
+       }
+       if (wp->rects) {
+               (void) free((void *) wp->rects);
+               wp->rects = NULL;
+       }
+       if (wp->size) {
+               (void) free((void *) wp->size);
+               wp->size = NULL;
+       }
+}
+
+void
+init_worm(ModeInfo * mi)
+{
+       wormstruct *wp;
+       int         size = MI_SIZE(mi);
+       int         i, j;
+
+       if (worms == NULL) {
+               if ((worms = (wormstruct *) calloc(MI_NUM_SCREENS(mi),
+                                              sizeof (wormstruct))) == NULL)
+                       return;
+       }
+       wp = &worms[MI_SCREEN(mi)];
+       if (MI_NPIXELS(mi) <= 2 || MI_WIN_IS_USE3D(mi))
+               wp->nc = 2;
+       else
+               wp->nc = MI_NPIXELS(mi);
+       if (wp->nc > NUMCOLORS)
+               wp->nc = NUMCOLORS;
+
+       free_worms(wp);
+       wp->nw = MI_BATCHCOUNT(mi);
+       if (wp->nw < -MINWORMS)
+               wp->nw = NRAND(-wp->nw - MINWORMS + 1) + MINWORMS;
+       else if (wp->nw < MINWORMS)
+               wp->nw = MINWORMS;
+       if (!wp->worm)
+               wp->worm = (wormstuff *) malloc(wp->nw * sizeof (wormstuff));
+
+       if (!wp->size)
+               wp->size = (int *) malloc(NUMCOLORS * sizeof (int));
+
+       wp->maxsize = (REDRAWSTEP + 1) * wp->nw;        /*  / wp->nc + 1; */
+       if (!wp->rects)
+               wp->rects =
+                       (XRectangle *) malloc(wp->maxsize * NUMCOLORS * sizeof (XRectangle));
+
+
+       if (!init_table) {
+               init_table = 1;
+               for (i = 0; i < SEGMENTS; i++) {
+                       sintab[i] = SINF(i * 2.0 * M_PI / SEGMENTS);
+                       costab[i] = COSF(i * 2.0 * M_PI / SEGMENTS);
+               }
+       }
+       wp->xsize = MI_WIN_WIDTH(mi);
+       wp->ysize = MI_WIN_HEIGHT(mi);
+       wp->zsize = MAXZ - MINZ + 1;
+       if (MI_NPIXELS(mi) > 2)
+               wp->chromo = NRAND(MI_NPIXELS(mi));
+
+       if (size < -MINSIZE)
+               wp->circsize = NRAND(-size - MINSIZE + 1) + MINSIZE;
+       else if (size < MINSIZE)
+               wp->circsize = MINSIZE;
+       else
+               wp->circsize = size;
+
+       for (i = 0; i < wp->nc; i++) {
+               for (j = 0; j < wp->maxsize; j++) {
+                       wp->rects[i * wp->maxsize + j].width = wp->circsize;
+                       wp->rects[i * wp->maxsize + j].height = wp->circsize;
+
+               }
+       }
+       (void) memset((char *) wp->size, 0, wp->nc * sizeof (int));
+
+       wp->wormlength = (int) sqrt(wp->xsize + wp->ysize) *
+               MI_CYCLES(mi) / 8;      /* Fudge this to something reasonable */
+       for (i = 0; i < wp->nw; i++) {
+               wp->worm[i].circ = (XPoint *) malloc(wp->wormlength * sizeof (XPoint));
+               wp->worm[i].diffcirc = (int *) malloc(wp->wormlength * sizeof (int));
+
+               for (j = 0; j < wp->wormlength; j++) {
+                       wp->worm[i].circ[j].x = wp->xsize / 2;
+                       wp->worm[i].circ[j].y = wp->ysize / 2;
+                       if (MI_WIN_IS_USE3D(mi))
+                               wp->worm[i].diffcirc[j] = 0;
+               }
+               wp->worm[i].dir = NRAND(SEGMENTS);
+               wp->worm[i].dir2 = NRAND(SEGMENTS);
+               wp->worm[i].tail = 0;
+               wp->worm[i].x = wp->xsize / 2;
+               wp->worm[i].y = wp->ysize / 2;
+               wp->worm[i].z = SCREENZ - MINZ;
+               wp->worm[i].redrawing = 0;
+       }
+
+       if (MI_WIN_IS_INSTALL(mi) && MI_WIN_IS_USE3D(mi)) {
+               XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_NONE_COLOR(mi));
+               XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi),
+                              0, 0, wp->xsize, wp->ysize);
+       } else
+               XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi));
+}
+
+void
+draw_worm(ModeInfo * mi)
+{
+       Display    *display = MI_DISPLAY(mi);
+       Window      window = MI_WINDOW(mi);
+       GC          gc = MI_GC(mi);
+       wormstruct *wp = &worms[MI_SCREEN(mi)];
+       unsigned long wcolor;
+       int         i;
+
+       (void) memset((char *) wp->size, 0, wp->nc * sizeof (int));
+
+       for (i = 0; i < wp->nw; i++) {
+               if (MI_NPIXELS(mi) > 2) {
+                       wcolor = (i + wp->chromo) % wp->nc;
+
+                       worm_doit(mi, i, wcolor);
+               } else
+                       worm_doit(mi, i, (unsigned long) 0);
+       }
+
+       if (MI_WIN_IS_USE3D(mi)) {
+               if (MI_WIN_IS_INSTALL(mi))
+                       XSetFunction(display, gc, GXor);
+               XSetForeground(display, gc, MI_RIGHT_COLOR(mi));
+               XFillRectangles(display, window, gc, &(wp->rects[0]), wp->size[0]);
+
+               XSetForeground(display, gc, MI_LEFT_COLOR(mi));
+               XFillRectangles(display, window, gc, &(wp->rects[wp->maxsize]), wp->size[1]);
+               if (MI_WIN_IS_INSTALL(mi))
+                       XSetFunction(display, gc, GXcopy);
+       } else if (MI_NPIXELS(mi) > 2) {
+               for (i = 0; i < wp->nc; i++) {
+                       XSetForeground(display, gc, MI_PIXEL(mi, i));
+                       XFillRectangles(display, window, gc, &(wp->rects[i * wp->maxsize]), wp->size[i]);
+               }
+       } else {
+               XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(mi));
+               XFillRectangles(display, window, gc,
+                               &(wp->rects[0]), wp->size[0]);
+       }
+
+       if (++wp->chromo == (unsigned long) wp->nc)
+               wp->chromo = 0;
+}
+
+void
+release_worm(ModeInfo * mi)
+{
+       if (worms != NULL) {
+               int         screen;
+
+               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++)
+                       free_worms(&worms[screen]);
+               (void) free((void *) worms);
+               worms = NULL;
+       }
+}
+
+void
+refresh_worm(ModeInfo * mi)
+{
+       if (MI_WIN_IS_USE3D(mi))
+               /* The 3D code does drawing&clearing by XORing.  We do not
+                  want to go to too much trouble here to make it redraw
+                  correctly. */
+               XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi));
+       else if (worms != NULL) {
+               wormstruct *wp = &worms[MI_SCREEN(mi)];
+               int         i;
+
+               for (i = 0; i < wp->nw; i++) {
+                       wp->worm[i].redrawing = 1;
+                       wp->worm[i].redrawpos = 0;
+               }
+       }
+}
diff --git a/hacks/xjack.c b/hacks/xjack.c
new file mode 100644 (file)
index 0000000..9864919
--- /dev/null
@@ -0,0 +1,361 @@
+/* xscreensaver, Copyright (c) 1997 Jamie Zawinski <jwz@netscape.com>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation.  No representations are made about the suitability of this
+ * software for any purpose.  It is provided "as is" without express or 
+ * implied warranty.
+ *
+ * Wendy, let me explain something to you.  Whenever you come in here and
+ * interrupt me, you're BREAKING my CONCENTRATION.  You're DISTRACTING me!
+ * And it will then take me time to get back to where I was. You understand?
+ * Now, we're going to make a new rule.  When you come in here and you hear
+ * me typing, or whether you DON'T hear me typing, or whatever the FUCK you
+ * hear me doing; when I'm in here, it means that I am working, THAT means
+ * don't come in!  Now, do you think you can handle that?
+ */
+
+#include <ctype.h>
+#include "screenhack.h"
+
+char *progclass = "XJack";
+
+char *defaults [] = {
+  "XJack.background:   black",         /* to placate SGI */
+  "XJack.foreground:   #00EE00",
+  "XJack.font:         -*-courier-medium-r-*-*-*-240-*-*-m-*-*-*",
+  "*delay:             50000",
+  0
+};
+
+XrmOptionDescRec options [] = {
+  { "-delay",          ".delay",       XrmoptionSepArg, 0 },
+  { "-font",           ".font",        XrmoptionSepArg, 0 },
+  { 0, 0, 0, 0 }
+};
+
+void
+screenhack (Display *dpy, Window window)
+{
+  static const char *source = "All work and no play makes Jack a dull boy.  ";
+  const char *s = source;
+  int columns, rows;           /* characters */
+  int left, right;             /* characters */
+  int char_width, line_height; /* pixels */
+  int x, y;                    /* characters */
+  int mode = 0;
+  int hspace = 15;             /* pixels */
+  int vspace = 15;             /* pixels */
+  Bool break_para = True;
+  Bool caps = False;
+  int sentences = 0;
+  int paras = 0;
+
+  XWindowAttributes xgwa;
+  XGCValues gcv;
+  GC gc;
+  int delay = get_integer_resource ("delay", "Integer");
+  char *fontname = get_string_resource ("font", "Font");
+  XFontStruct *font = XLoadQueryFont (dpy, fontname);
+
+  if (!font)
+    font = XLoadQueryFont (dpy, "-*-*-medium-r-*-*-*-240-*-*-m-*-*-*");
+  if (!font)
+    font = XLoadQueryFont (dpy, "-*-courier-medium-r-*-*-*-180-*-*-m-*-*-*");
+  if (!font)
+    font = XLoadQueryFont (dpy, "-*-*-*-r-*-*-*-240-*-*-m-*-*-*");
+  if (!font)
+    {
+      fprintf(stderr, "no big fixed-width font like \"%s\"\n", fontname);
+      exit(1);
+    }
+
+  XGetWindowAttributes (dpy, window, &xgwa);
+
+  gcv.font = font->fid;
+  gcv.foreground = get_pixel_resource ("foreground", "Foreground", dpy,
+                                      xgwa.colormap);
+  gcv.background = get_pixel_resource ("background", "Background", dpy,
+                                      xgwa.colormap);
+  gc = XCreateGC (dpy, window, (GCFont | GCForeground | GCBackground), &gcv);
+
+  char_width = (font->per_char
+               ? font->per_char['n'-font->min_char_or_byte2].rbearing
+               : font->min_bounds.rbearing);
+  line_height = font->ascent + font->descent + 1;
+
+  columns = (xgwa.width - hspace - hspace) / char_width;
+  rows = (xgwa.height - vspace - vspace) / line_height;
+
+  left = 0xFF & (random() % ((columns / 2)+1));
+  right = left + (0xFF & (random() % (columns - left - 10)+10));
+  x = 0;
+  y = 0;
+
+  while (1)
+    {
+      int word_length = 0;
+      const char *s2;
+      for (s2 = s; *s2 && *s2 != ' '; s2++)
+       word_length++;
+
+      if (break_para ||
+         (*s != ' ' &&
+          (x + word_length) >= right))
+       {
+         x = left;
+         y++;
+
+         if (break_para)
+           y++;
+
+         if (mode == 1 || mode == 2)
+           {
+             /* 1 = left margin goes southwest; 2 = southeast */
+             left += (mode == 1 ? 1 : -1);
+             if (left >= right - 10)
+               {
+                 if ((right < (columns - 10)) && (random() & 1))
+                   right += (0xFF & (random() % (columns - right)));
+                 else
+                   mode = 2;
+               }
+             else if (left <= 0)
+               {
+                 left = 0;
+                 mode = 1;
+               }
+           }
+         else if (mode == 3 || mode == 4)
+           {
+             /* 3 = right margin goes southeast; 4 = southwest */
+             right += (mode == 3 ? 1 : -1);
+             if (right >= columns)
+               {
+                 right = columns;
+                 mode = 4;
+               }
+             else if (right <= left + 10)
+               mode = 3;
+           }
+
+         if (y >= rows)        /* bottom of page */
+           {
+             /* scroll by 1-5 lines */
+             int lines = (random() % 5 ? 0 : (0xFF & (random() % 5))) + 1;
+             if (break_para)
+               lines++;
+
+             /* but sometimes scroll by a whole page */
+             if (0 == (random() % 100))
+               lines += rows;
+
+             while (lines > 0)
+               {
+                 XCopyArea (dpy, window, window, gc,
+                            0, hspace + line_height,
+                            xgwa.width,
+                            xgwa.height - vspace - vspace - line_height,
+                            0, vspace);
+                 XClearArea (dpy, window,
+                             0, xgwa.height - vspace - line_height,
+                             xgwa.width,
+                             line_height + vspace + vspace,
+                             False);
+                 XClearArea (dpy, window, 0, 0, xgwa.width, vspace, False);
+                 /* See? It's OK. He saw it on the television. */
+                 XClearArea (dpy, window, 0, 0, hspace, xgwa.height, False);
+                 XClearArea (dpy, window, xgwa.width - vspace, 0,
+                             hspace, xgwa.height, False);
+                 y--;
+                 lines--;
+                 XSync (dpy, True);
+                 if (delay) usleep (delay * 10);
+               }
+             if (y < 0) y = 0;
+           }
+
+         break_para = False;
+       }
+
+      if (*s != ' ')
+       {
+         char c = *s;
+         int xshift = 0, yshift = 0;
+         if (0 == random() % 50)
+           {
+             xshift = random() % ((char_width / 3) + 1);      /* mis-strike */
+             yshift = random() % ((line_height / 6) + 1);
+             if (0 == (random() % 3))
+               yshift *= 2;
+             if (random() & 1)
+               xshift = -xshift;
+             if (random() & 1)
+               yshift = -yshift;
+           }
+
+         if (0 == (random() % 250))    /* introduce adjascent-key typo */
+           {
+             static const char * const typo[] = {
+               "asqw", "ASQW", "bgvhn", "cxdfv", "dserfcx", "ewsdrf",
+               "Jhuikmn", "kjiol,m", "lkop;.,", "mnjk,", "nbhjm", "oiklp09",
+               "pol;(-0", "redft54", "sawedxz", "uyhji87", "wqase32",
+               "yuhgt67", ".,l;/", 0 };
+             int i = 0;
+             while (typo[i] && typo[i][0] != c)
+               i++;
+             if (typo[i])
+               c = typo[i][0xFF & (random() % strlen(typo[i]+1))];
+           }
+
+         /* caps typo */
+         if (c >= 'a' && c <= 'z' && (caps || 0 == (random() % 350)))
+           {
+             c -= ('a'-'A');
+             if (c == 'O' && random() & 1)
+               c = '0';
+           }
+
+       OVERSTRIKE:
+         XDrawString (dpy, window, gc,
+                      (x * char_width) + hspace + xshift,
+                      (y * line_height) + vspace + font->ascent + yshift,
+                      &c, 1);
+         if (xshift == 0 && yshift == 0 && (0 == (random() & 3000)))
+           {
+             if (random() & 1)
+               xshift--;
+             else
+               yshift--;
+             goto OVERSTRIKE;
+           }
+
+         if ((tolower(c) != tolower(*s))
+             ? (0 == (random() % 10))          /* backup to correct */
+             : (0 == (random() % 400)))        /* fail to advance */
+           {
+             x--;
+             s--;
+             XSync (dpy, True);
+             if (delay) usleep (0xFFFF & (delay + (random() % (delay * 10))));
+           }
+       }
+
+      x++;
+      s++;
+
+      if (0 == random() % 200)
+       {
+         if (random() & 1 && s != source)
+           s--;        /* duplicate character */
+         else if (*s)
+           s++;        /* skip character */
+       }
+
+      if (*s == 0)
+       {
+         sentences++;
+         caps = (0 == random() % 40);  /* capitalize sentence */
+
+         if (0 == (random() % 10) ||   /* randomly break paragraph */
+             (mode == 0 &&
+              ((0 == (random() % 10)) || sentences > 20)))
+           {
+             break_para = True;
+             sentences = 0;
+             paras++;
+
+             if (random() & 1)         /* mode=0 50% of the time */
+               mode = 0;
+             else
+               mode = (0xFF & (random() % 5));
+
+             if (0 == (random() % 2))  /* re-pick margins */
+               {
+                 left = 0xFF & (random() % (columns / 3));
+                 right = columns - (0xFF & (random() % (columns / 3)));
+
+                 if (0 == random() % 3)        /* sometimes be wide */
+                   right = left + ((right - left) / 2);
+               }
+
+             if (right - left <= 10)   /* introduce sanity */
+               {
+                 left = 0;
+                 right = columns;
+               }
+
+             if (right - left > 50)    /* if wide, shrink and move */
+               {
+                 left += (0xFF & (random() % ((columns - 50) + 1)));
+                 right = left + (0xFF & ((random() % 40) + 10));
+               }
+
+             /* oh, gag. */
+             if (mode == 0 &&
+                 right - left < 25 &&
+                 columns > 40)
+               {
+                 right += 20;
+                 if (right > columns)
+                   left -= (right - columns);
+               }
+           }
+         s = source;
+       }
+
+      XSync (dpy, True);
+      if (delay)
+       {
+         usleep (delay);
+         if (0 == random() % 3)
+           usleep(0xFFFFFF & ((random() % (delay * 5)) + 1));
+
+         if (break_para)
+           usleep(0xFFFFFF & ((random() % (delay * 15)) + 1));
+       }
+
+      if (paras > 5 &&
+         (0 == (random() % 1000)) &&
+         y < rows-5)
+       {
+         int i;
+         int n = random() & 3;
+         y++;
+         for (i = 0; i < n; i++)
+           {
+             /* See also http://catalog.com/hopkins/unix-haters/login.html */
+             const char *n1 =
+               "NFS server overlook not responding, still trying...";
+             const char *n2 = "NFS server overlook ok.";
+             while (*n1)
+               {
+                 XDrawString (dpy, window, gc,
+                              (x * char_width) + hspace,
+                              (y * line_height) + vspace + font->ascent,
+                              n1, 1);
+                 x++;
+                 if (x >= columns) x = 0, y++;
+                 n1++;
+               }
+             XSync (dpy, True);
+             usleep (5000000);
+             while (*n2)
+               {
+                 XDrawString (dpy, window, gc,
+                              (x * char_width) + hspace,
+                              (y * line_height) + vspace + font->ascent,
+                              n2, 1);
+                 x++;
+                 if (x >= columns) x = 0, y++;
+                 n2++;
+               }
+             y++;
+             XSync (dpy, True);
+             usleep (500000);
+           }
+       }
+    }
+}
diff --git a/hacks/xjack.man b/hacks/xjack.man
new file mode 100644 (file)
index 0000000..4d31fe2
--- /dev/null
@@ -0,0 +1,51 @@
+.TH XScreenSaver 1 "18-sep-97" "X Version 11"
+.SH NAME
+xjack - all work and no play makes jack a dull boy
+.SH SYNOPSIS
+.B xjack
+[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-delay \fIusecs\fP]
+.SH DESCRIPTION
+All work and no play makes jack a dull boy.  All work and no play makes jack
+a dull boy.  All work and no play makes jack a dull boy.  All work and no
+play makes jack a dull boy.  All work and no play makes jack a dull boy.
+All work and no play makes jack a dull boy.  
+.PP
+.RS 8
+All work and no play makes jack a dull boy.  All work and no play makes jack
+a dull boy.  All work and no play makes jack a dull boy.  All work and no
+play makes jack a dull boy.  All work and no play makes jack a dull boy.
+All work and no play makes jack a dull boy.  
+.PP
+All work and no play makes jack a dull boy.  All work and no play makes jack
+a dull boy.  All work and no play makes jack a dull boy.  All work and no
+play makes jack a dull boy.  All work and no play makes jack a dull boy.  All
+work and no play makes jack a dull boy.  All work and no play makes jack a
+dull boy.  All work and no play makes jack a dull boy.
+.PP
+.RE
+All work and no play makes jack a dull boy.
+All work and no play makes jack a dull boy.  All work and no play makes jack
+a dull boy.  All work and no play makes jack a dull boy.  All work and no
+play makes jack a dull boy.  All work and no play makes jack a dull boy.
+All work and no play makes jack a dull boy.  All work and no play makes jack 
+a dull boy.  
+.SH ENVIRONMENT
+.PP
+.TP 8
+.B DISPLAY
+All work and no play makes jack a dull boy.  
+.TP 8
+.B XENVIRONMENT
+All work and no play makes jack a dull boy.  All work and no play makes jack
+a dull boy.
+.SH SEE ALSO
+.BR X (1),
+.BR xscreensaver (1)
+.SH COPYRIGHT
+Copyright \(co 1997 by Jamie Zawinski.  All work and no play makes jack a
+dull boy.  All work and no play makes jack a dull boy.  All work and no play
+makes jack a dull boy.  All work and no play makes jack a dull boy.  All work
+and no play makes jack a fnord dull boy.  All work and no play makes jack a
+dull boy.
+.SH AUTHOR
+Jamie Zawinski <jwz@netscape.com>, 15-Nov-97.
index f09248b7ec1535489a30f5b55ab61ae5b39b4d1f..23f350e995d76c4eb04910e8155554290cc6559d 100644 (file)
@@ -35,6 +35,7 @@ ERROR!  Sorry, xlockmore.h requires ANSI C (gcc, for example.)
 #ifdef USE_GL
 # include <GL/glx.h>
   extern GLXContext init_GL (ModeInfo *);
+# define FreeAllGL(dpy) /* */
 #endif
 
 /* Accessor macros for the ModeInfo structure
index 20df035263c98a9df50674482e34412ad1c82427..48279640b7d074448807cf9a9ea61a782272d94f 100644 (file)
 
 #include "screenhack.h"
 
+/* I'm told that the Sun version of OpenGL needs to have the constant
+   SUN_OGL_NO_VERTEX_MACROS defined in order for morph3d to compile
+   (the number of arguments to the glNormal3f macro changes...)
+   Verified with gcc 2.7.2.2 and Sun cc 4.2 with OpenGL 1.1.1 dev 4
+   on Solaris 2.5.1.
+ */
+#ifndef HAVE_MESA_GL
+# if defined(__sun) && defined(__SVR4) /* Solaris */
+#  define SUN_OGL_NO_VERTEX_MACROS 1
+# endif /* Solaris */
+#endif /* !HAVE_MESA_GL */
+
+
 /* Compatibility with the xlockmore RNG API
    (note that the xlockmore hacks never expect negative numbers.)
  */
diff --git a/hacks/xlyap.c b/hacks/xlyap.c
new file mode 100644 (file)
index 0000000..350888d
--- /dev/null
@@ -0,0 +1,1965 @@
+/* Lyap - calculate and display Lyapunov exponents */
+
+/* Written by Ron Record (rr@sco) 03 Sep 1991 */
+
+/* The idea here is to calculate the Lyapunov exponent for a periodically
+ * forced logistic map (later i added several other nonlinear maps of the unit
+ * interval). In order to turn the 1-dimensional parameter space of the
+ * logistic map into a 2-dimensional parameter space, select two parameter
+ * values ('a' and 'b') then alternate the iterations of the logistic map using
+ * first 'a' then 'b' as the parameter. This program accepts an argument to
+ * specify a forcing function, so instead of just alternating 'a' and 'b', you
+ * can use 'a' as the parameter for say 6 iterations, then 'b' for 6 iterations
+ * and so on. An interesting forcing function to look at is abbabaab (the
+ * Morse-Thue sequence, an aperiodic self-similar, self-generating sequence).
+ * Anyway, step through all the values of 'a' and 'b' in the ranges you want,
+ * calculating the Lyapunov exponent for each pair of values. The exponent
+ * is calculated by iterating out a ways (specified by the variable "settle")
+ * then on subsequent iterations calculating an average of the logarithm of
+ * the absolute value of the derivative at that point. Points in parameter
+ * space with a negative Lyapunov exponent are colored one way (using the
+ * value of the exponent to index into a color map) while points with a
+ * non-negative exponent are colored differently.
+ *
+ * The algorithm was taken from the September 1991 Scientific American article
+ * by A. K. Dewdney who gives credit to Mario Markus of the Max Planck Institute
+ * for its creation. Additional information and ideas were gleaned from the
+ * discussion on alt.fractals involving Stephen Hall, Ed Kubaitis, Dave Platt
+ * and Baback Moghaddam. Assistance with colormaps and spinning color wheels
+ * and X was gleaned from Hiram Clawson. Rubber banding code was adapted from
+ * an existing Mandelbrot program written by Stacey Campbell.
+ */
+
+#define LYAP_PATCHLEVEL 4
+#define LYAP_VERSION "#(@) lyap 2.3 2/20/92"
+
+#include <assert.h>
+#include <math.h>
+
+#include "screenhack.h"
+#include "yarandom.h"
+#include "hsv.h"
+#include "vroot.h"
+
+#include <X11/cursorfont.h> 
+#include <X11/Xutil.h> 
+
+char *progclass = "XLyap";
+
+char *defaults [] = {
+  "XLyap.background:   black",         /* to placate SGI */
+  "*randomize:         false",
+  "*builtin:           -1",
+  "*minColor:          1",
+  "*maxColor:          256",
+  "*dwell:             50",
+  "*useLog:            false",
+  "*colorExponent:     1.0",
+  "*colorOffset:       0",
+  "*randomForce:       ",              /* 0.5 */
+  "*settle:            50",
+  "*minA:              2.0",
+  "*minB:              2.0",
+  "*wheels:            7",
+  "*function:          10101010",
+  "*forcingFunction:   abbabaab",
+  "*bRange:            ",              /* 2.0 */
+  "*startX:            0.65",
+  "*mapIndex:          ",              /* 0 */
+  "*outputFile:                ",
+  "*beNegative:                false",
+  "*rgbMax:            65000",
+  "*spinLength:                256",
+  "*show:              false",
+  "*aRange:            ",              /* 2.0 */
+  0
+};
+
+XrmOptionDescRec options [] = {
+  { "-randomize", ".randomize",        XrmoptionNoArg, "true" },
+  { "-builtin",   ".builtin",  XrmoptionSepArg, 0 },
+  { "-C", ".minColor",         XrmoptionSepArg, 0 },   /* n */
+  { "-D", ".dwell",            XrmoptionSepArg, 0 },   /* n */
+  { "-L", ".useLog",           XrmoptionNoArg, "true" },
+  { "-M", ".colorExponent",    XrmoptionSepArg, 0 },   /* r */
+  { "-O", ".colorOffset",      XrmoptionSepArg, 0 },   /* n */
+  { "-R", ".randomForce",      XrmoptionSepArg, 0 },   /* p */
+  { "-S", ".settle",           XrmoptionSepArg, 0 },   /* n */
+  { "-a", ".minA",             XrmoptionSepArg, 0 },   /* r */
+  { "-b", ".minB",             XrmoptionSepArg, 0 },   /* n */
+  { "-c", ".wheels",           XrmoptionSepArg, 0 },   /* n */
+  { "-F", ".function",         XrmoptionSepArg, 0 },   /* 10101010 */
+  { "-f", ".forcingFunction",  XrmoptionSepArg, 0 },   /* abbabaab */
+  { "-h", ".bRange",           XrmoptionSepArg, 0 },   /* r */
+  { "-i", ".startX",           XrmoptionSepArg, 0 },   /* r */
+  { "-m", ".mapIndex",         XrmoptionSepArg, 0 },   /* n */
+  { "-o", ".outputFile",       XrmoptionSepArg, 0 },   /* filename */
+  { "-p", ".beNegative",       XrmoptionNoArg, "true" },
+  { "-r", ".rgbMax",           XrmoptionSepArg, 0 },   /* n */
+  { "-s", ".spinLength",       XrmoptionSepArg, 0 },   /* n */
+  { "-v", ".show",             XrmoptionNoArg, "true" },
+  { "-w", ".aRange",           XrmoptionSepArg, 0 },   /* r */
+  { 0, 0, 0, 0 }
+};
+
+
+#define ABS(a) (((a)<0) ? (0-(a)) : (a) )
+#define Min(x,y) ((x < y)?x:y)
+#define Max(x,y) ((x > y)?x:y)
+
+#ifdef SIXTEEN_COLORS
+#define MAXPOINTS  128
+#define MAXFRAMES 4
+#define MAXCOLOR 16
+static int maxcolor=16, startcolor=0, color_offset=0, mincolindex=1;
+static int dwell=50, settle=25;
+static int width=128, height=128, xposition=128, yposition=128;
+#else
+#define MAXPOINTS  256
+#define MAXFRAMES 8
+#define MAXCOLOR 256
+static int maxcolor=256, startcolor=17, color_offset=96, mincolindex=33;
+static int dwell=100, settle=50;
+static int width=256, height=256;
+#endif
+
+#ifndef TRUE
+#define TRUE 1
+#define FALSE 0
+#endif
+
+static int screen;
+static Display*        dpy;
+static Visual *visual;
+
+static unsigned long foreground, background;
+
+static Window canvas;
+
+typedef struct {
+       int x, y;
+} xy_t;
+
+typedef struct {
+       int start_x, start_y;
+       int last_x, last_y;
+       } rubber_band_data_t;
+
+typedef struct {
+       Cursor band_cursor;
+       double p_min, p_max, q_min, q_max;
+       rubber_band_data_t rubber_band;
+       } image_data_t;
+
+typedef struct points_t {
+       XPoint data[MAXCOLOR][MAXPOINTS];
+       int npoints[MAXCOLOR];
+       } points_t;
+
+static points_t Points;
+static image_data_t rubber_data;
+
+#ifndef TRUE
+#define TRUE 1
+#define FALSE 0
+#endif
+
+static GC Data_GC[MAXCOLOR], RubberGC;
+
+#define MAXINDEX 64
+#define FUNCMAXINDEX 16
+#define MAXWHEELS 7
+#define NUMMAPS 5
+
+typedef double (*PFD)(double,double);
+
+static double logistic(double,double), circle(double,double), leftlog(double,double), rightlog(double,double), doublelog(double,double);
+static double dlogistic(double,double), dcircle(double,double), dleftlog(double,double), drightlog(double,double), ddoublelog(double,double);
+static PFD map, deriv;
+static PFD Maps[NUMMAPS] = { logistic, circle, leftlog, rightlog, doublelog };
+static PFD Derivs[NUMMAPS] = { dlogistic, dcircle, dleftlog, drightlog, ddoublelog };
+
+static int aflag=0, bflag=0, wflag=0, hflag=0, Rflag=0;
+static double pmins[NUMMAPS] = { 2.0, 0.0, 0.0, 0.0, 0.0 };
+static double pmaxs[NUMMAPS] = { 4.0, 1.0, 6.75, 6.75, 16.0 };
+static double amins[NUMMAPS] = { 2.0, 0.0, 0.0, 0.0, 0.0 };
+static double aranges[NUMMAPS] = { 2.0, 1.0, 6.75, 6.75, 16.0 };
+static double bmins[NUMMAPS] = { 2.0, 0.0, 0.0, 0.0, 0.0 };
+static double branges[NUMMAPS] = { 2.0, 1.0, 6.75, 6.75, 16.0 };
+
+static int   forcing[MAXINDEX] = { 0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,
+                       0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,
+                       0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1 };
+static int   Forcing[FUNCMAXINDEX] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
+
+static int   maxindex = MAXINDEX;
+static int   funcmaxindex = FUNCMAXINDEX;
+static double  min_a=2.0, min_b=2.0, a_range=2.0, b_range=2.0, minlyap=1.0;
+static double  max_a=4.0, max_b=4.0;
+static double  start_x=0.65, lyapunov, a_inc, b_inc, a, b;
+static int     numcolors=16, numfreecols, displayplanes, lowrange;
+static xy_t    point;
+static Pixmap  pixmap;
+static Colormap cmap;
+static XColor  Colors[MAXCOLOR];
+static double  *exponents[MAXFRAMES];
+static double  a_minimums[MAXFRAMES], b_minimums[MAXFRAMES];
+static double  a_maximums[MAXFRAMES], b_maximums[MAXFRAMES];
+static double  minexp, maxexp, prob=0.5;
+static int     expind[MAXFRAMES]={0}, resized[MAXFRAMES]={0};
+static int     numwheels=MAXWHEELS, force=0, Force=0, negative=1;
+static int     rgb_max=65000, nostart=1, stripe_interval=7;
+static int     save=1, show=0, useprod=1, spinlength=256, savefile=0;
+static int     maxframe=0, frame=0, dorecalc=0, mapindex=0, run=1;
+static char    *outname="lyap.out";
+
+
+const char * const version = LYAP_VERSION;
+
+static void resize(void);
+static void redisplay(Window w, XExposeEvent *event);
+static void Spin(Window w);
+static void show_defaults(void);
+static void StartRubberBand(Window w, image_data_t *data, XEvent *event);
+static void TrackRubberBand(Window w, image_data_t *data, XEvent *event);
+static void EndRubberBand(Window w, image_data_t *data, XEvent *event);
+static void CreateXorGC(void);
+static void InitBuffer(void);
+static void BufferPoint(Display *display, Window window, int color,
+                       int x, int y);
+static void FlushBuffer(void);
+static void init_canvas(void);
+static void init_data(void);
+static void init_color(void);
+static void parseargs(void);
+static void Clear(void);
+static void setupmem(void);
+static void main_event(void);
+static int complyap(void);
+static void Getkey(XKeyEvent *event);
+static int sendpoint(double expo);
+static void save_to_file(void);
+static void setforcing(void);
+static void check_params(int mapnum, int parnum);
+static void usage(void);
+static void Destroy_frame(void);
+static void freemem(void);
+static void Redraw(void);
+static void redraw(double *exparray, int index, int cont);
+static void recalc(void);
+static void SetupCorners(XPoint *corners, image_data_t *data);
+static void set_new_params(Window w, image_data_t *data);
+static void go_down(void);
+static void go_back(void);
+static void go_init(void);
+static void jumpwin(void);
+static void print_help(void);
+static void print_values(void);
+
+
+void
+screenhack (Display *d, Window window)
+{
+  XWindowAttributes xgwa;
+  int builtin = -1;
+  dpy = d;
+  XGetWindowAttributes (dpy, window, &xgwa);
+  width = xgwa.width;
+  height = xgwa.height;
+  visual = xgwa.visual;
+  cmap = xgwa.colormap;
+
+  parseargs();
+
+  if (get_boolean_resource("randomize", "Boolean"))
+    builtin = random() % 22;
+  else {
+    char *s = get_string_resource("builtin", "Integer");
+    if (s && *s)
+      builtin = atoi(s);
+    if (s) free (s);
+  }
+    
+  if (builtin >= 0)
+    {
+      char *ff = 0;
+      switch (builtin) {
+      case 0:
+       min_a = 3.75; aflag++;
+       min_b = 3.299999; bflag++;
+       a_range = 0.05; wflag++;
+       b_range = 0.05; hflag++;
+       dwell = 200;
+       settle = 100;
+       ff = "abaabbaaabbb";
+       break;
+
+      case 1:
+       min_a = 3.8; aflag++;
+       min_b = 3.2; bflag++;
+       b_range = .05; hflag++;
+       a_range = .05; wflag++;
+       ff = "bbbbbaaaaa";
+       break;
+
+      case 2:
+       min_a =  3.4; aflag++;
+       min_b =  3.04; bflag++;
+       a_range =  .5; wflag++;
+       b_range =  .5; hflag++;
+       ff = "abbbbbbbbb";
+       settle = 500;
+       dwell = 1000;
+       break;
+
+      case 3:
+       min_a = 3.5; aflag++;
+       min_b = 3.0; bflag++;
+       a_range = 0.2; wflag++;
+       b_range = 0.2; hflag++;
+       dwell = 600;
+       settle = 300;
+       ff = "aaabbbab";
+       break;
+
+      case 4:
+       min_a = 3.55667; aflag++;
+       min_b = 3.2; bflag++;
+       b_range = .05; hflag++;
+       a_range = .05; wflag++;
+       ff = "bbbbbaaaaa";
+       break;
+
+      case 5:
+       min_a = 3.79; aflag++;
+       min_b = 3.22; bflag++;
+       b_range = .02999; hflag++;
+       a_range = .02999; wflag++;
+       ff = "bbbbbaaaaa";
+       break;
+
+      case 6:
+       min_a = 3.7999; aflag++;
+       min_b = 3.299999; bflag++;
+       a_range = 0.2; wflag++;
+       b_range = 0.2; hflag++;
+       dwell = 300;
+       settle = 150;
+       ff = "abaabbaaabbb";
+       break;
+
+      case 7:
+       min_a = 3.89; aflag++;
+       min_b = 3.22; bflag++;
+       b_range = .028; hflag++;
+       a_range = .02999; wflag++;
+       ff = "bbbbbaaaaa";
+       settle = 600;
+       dwell = 1000;
+       break;
+
+      case 8:
+       min_a = 3.2; aflag++;
+       min_b = 3.7; bflag++;
+       a_range = 0.05; wflag++;
+       b_range = .005; hflag++;
+       ff = "abbbbaa";
+       break;
+
+      case 9:
+       ff = "aaaaaabbbbbb";
+       mapindex = 1;
+       dwell =  400;
+       settle =  200;
+       minlyap = maxexp = ABS(-0.85);
+       minexp = -1.0 * minlyap;
+       break;
+
+      case 10:
+       ff = "aaaaaabbbbbb";
+       mapindex = 1;
+       dwell =  400;
+       settle = 200;
+       minlyap = maxexp = ABS(-0.85);
+       minexp = -1.0 * minlyap;
+       break;
+
+      case 11:
+       mapindex = 1;
+       dwell =  400;
+       settle = 200;
+       minlyap = maxexp = ABS(-0.85);
+       minexp = -1.0 * minlyap;
+       break;
+
+      case 12:
+       ff = "abbb";
+       mapindex = 1;
+       dwell =  400;
+       settle = 200;
+       minlyap = maxexp = ABS(-0.85);
+       minexp = -1.0 * minlyap;
+       break;
+
+      case 13:
+       ff = "abbabaab";
+       mapindex = 1;
+       dwell =  400;
+       settle = 200;
+       minlyap = maxexp = ABS(-0.85);
+       minexp = -1.0 * minlyap;
+       break;
+
+      case 14:
+       ff = "abbabaab";
+       dwell =  800;
+       settle = 200;
+       minlyap = maxexp = ABS(-0.85);
+       minexp = -1.0 * minlyap;
+       /* ####  -x 0.05 */
+       min_a = 3.91; aflag++;
+       a_range =  0.0899999999; wflag++;
+       min_b =  3.28; bflag++;
+       b_range =  0.35; hflag++;
+       break;
+
+      case 15:
+       ff = "aaaaaabbbbbb";
+       dwell =  400;
+       settle = 200;
+       minlyap = maxexp = ABS(-0.85);
+       minexp = -1.0 * minlyap;
+       break;
+
+      case 16:
+       dwell =  400;
+       settle = 200;
+       minlyap = maxexp = ABS(-0.85);
+       minexp = -1.0 * minlyap;
+       break;
+
+      case 17:
+       ff = "abbb";
+       dwell =  400;
+       settle = 200;
+       minlyap = maxexp = ABS(-0.85);
+       minexp = -1.0 * minlyap;
+       break;
+
+      case 18:
+       ff = "abbabaab";
+       dwell =  400;
+       settle = 200;
+       minlyap = maxexp = ABS(-0.85);
+       minexp = -1.0 * minlyap;
+       break;
+
+      case 19:
+       mapindex = 2;
+       ff = "aaaaaabbbbbb";
+       dwell =  400;
+       settle = 200;
+       minlyap = maxexp = ABS(-0.85);
+       minexp = -1.0 * minlyap;
+       break;
+
+      case 20:
+       mapindex = 2;
+       dwell =  400;
+       settle = 200;
+       minlyap = maxexp = ABS(-0.85);
+       minexp = -1.0 * minlyap;
+       break;
+
+      case 21:
+       mapindex = 2;
+       ff = "abbb";
+       dwell =  400;
+       settle = 200;
+       minlyap = maxexp = ABS(-0.85);
+       minexp = -1.0 * minlyap;
+       break;
+
+      case 22:
+       mapindex = 2;
+       ff = "abbabaab";
+       dwell =  400;
+       settle = 200;
+       minlyap = maxexp = ABS(-0.85);
+       minexp = -1.0 * minlyap;
+       break;
+      }
+
+      if (ff) {
+       char *ch;
+       int bindex = 0;
+       maxindex = strlen(ff);
+       if (maxindex > MAXINDEX)
+         usage();
+       ch = ff;
+       force++;
+       while (bindex < maxindex) {
+         if (*ch == 'a')
+           forcing[bindex++] = 0;
+         else if (*ch == 'b')
+           forcing[bindex++] = 1;
+         else
+           usage();
+         ch++;
+       }
+      }
+    }
+
+  screen = DefaultScreen(dpy);
+  background = BlackPixel(dpy, screen);
+  setupmem();
+  init_data();
+  if (displayplanes > 1)
+    foreground = startcolor;
+  else
+    foreground = WhitePixel(dpy, screen);
+
+  /*
+  * Create the window to display the Lyapunov exponents
+  */
+  canvas = window;
+  init_canvas();
+
+  if (window != DefaultRootWindow(dpy))
+    XSelectInput(dpy,canvas,KeyPressMask|ButtonPressMask|ButtonMotionMask|
+                ButtonReleaseMask|ExposureMask|StructureNotifyMask);
+  if (displayplanes > 1) {
+    init_color();
+  } else {
+    XQueryColors(dpy, DefaultColormap(dpy, DefaultScreen(dpy)),
+       Colors, numcolors);
+  }
+  pixmap = XCreatePixmap(dpy, DefaultRootWindow(dpy),
+                        width, height, DefaultDepth(dpy, screen));
+  rubber_data.band_cursor = XCreateFontCursor(dpy, XC_hand2);
+  CreateXorGC();
+  Clear();
+  for(;;)
+      main_event();
+}
+
+static void
+main_event(void)
+{
+  int n;
+  XEvent event;
+
+  if (complyap() == TRUE)
+      run=0;
+  n = XEventsQueued(dpy, QueuedAfterFlush);
+  while (n--) {
+         XNextEvent(dpy, &event);
+           switch(event.type)
+           {
+           case KeyPress:
+    Getkey(&event.xkey);
+    break;
+           case Expose:
+    redisplay(canvas, &event.xexpose);
+         break;
+           case ConfigureNotify:
+    resize();
+         break;
+           case ButtonPress:
+    StartRubberBand(canvas, &rubber_data, &event);
+         break;
+           case MotionNotify:
+    TrackRubberBand(canvas, &rubber_data, &event);
+         break;
+           case ButtonRelease:
+    EndRubberBand(canvas, &rubber_data, &event);
+         break;
+           }
+       }
+}
+
+/* complyap() is the guts of the program. This is where the Lyapunov exponent
+ * is calculated. For each iteration (past some large number of iterations)
+ * calculate the logarithm of the absolute value of the derivative at that
+ * point. Then average them over some large number of iterations. Some small
+ * speed up is achieved by utilizing the fact that log(a*b) = log(a) + log(b).
+ */
+static int
+complyap(void)
+{
+  register i, bindex;
+  double total, prod, x, r;
+
+  if (!run)
+    return TRUE;
+  a += a_inc;
+  if (a >= max_a)
+    if (sendpoint(lyapunov) == TRUE)
+      return FALSE;
+    else {
+      FlushBuffer();
+      if (savefile)
+       save_to_file();
+      return TRUE;
+    }
+  if (b >= max_b) {
+    FlushBuffer();
+    if (savefile)
+      save_to_file();
+    return TRUE;
+  }
+  prod = 1.0;
+  total = 0.0;
+  bindex = 0;
+  x = start_x;
+  r = (forcing[bindex]) ? b : a;
+#ifdef MAPS
+  findex = 0;
+  map = Maps[Forcing[findex]];
+#endif
+  for (i=0;i<settle;i++) {     /* Here's where we let the thing */
+    x = (*map)(x, r);   /* "settle down". There is usually */
+    if (++bindex >= maxindex) { /* some initial "noise" in the */
+      bindex = 0;    /* iterations. How can we optimize */
+      if (Rflag)      /* the value of settle ??? */
+         setforcing();
+    }
+    r = (forcing[bindex]) ? b : a;
+#ifdef MAPS
+    if (++findex >= funcmaxindex)
+      findex = 0;
+    map = Maps[Forcing[findex]];
+#endif
+  }
+#ifdef MAPS
+  deriv = Derivs[Forcing[findex]];
+#endif
+  if (useprod) {      /* using log(a*b) */
+    for (i=0;i<dwell;i++) {
+      x = (*map)(x, r);
+      prod *= ABS((*deriv)(x, r));
+      /* we need to prevent overflow and underflow */
+      if ((prod > 1.0e12) || (prod < 1.0e-12)) {
+       total += log(prod);
+       prod = 1.0;
+      }
+      if (++bindex >= maxindex) {
+       bindex = 0;
+       if (Rflag)
+         setforcing();
+      }
+      r = (forcing[bindex]) ? b : a;
+#ifdef MAPS
+      if (++findex >= funcmaxindex)
+       findex = 0;
+      map = Maps[Forcing[findex]];
+      deriv = Derivs[Forcing[findex]];
+#endif
+    }
+    total += log(prod);
+    lyapunov = (total * M_LOG2E) / (double)dwell;
+  }
+  else {       /* use log(a) + log(b) */
+    for (i=0;i<dwell;i++) {
+      x = (*map)(x, r);
+      total += log(ABS((*deriv)(x, r)));
+      if (++bindex >= maxindex) {
+       bindex = 0;
+       if (Rflag)
+         setforcing();
+      }
+      r = (forcing[bindex]) ? b : a;
+#ifdef MAPS
+      if (++findex >= funcmaxindex)
+       findex = 0;
+      map = Maps[Forcing[findex]];
+      deriv = Derivs[Forcing[findex]];
+#endif
+    }
+    lyapunov = (total * M_LOG2E) / (double)dwell;
+  }
+  if (sendpoint(lyapunov) == TRUE)
+    return FALSE;
+  else {
+    FlushBuffer();
+    if (savefile)
+      save_to_file();
+    return TRUE;
+  }
+}
+
+static double
+logistic(double x, double r)       /* the familiar logistic map */
+{
+  return(r * x * (1.0 - x));
+}
+
+static double
+dlogistic(double x, double r)      /* the derivative of logistic map */
+{
+  return(r - (2.0 * r * x));
+}
+
+static double
+circle(double x, double r)       /* sin() hump or sorta like the circle map */
+{
+  return(r * sin(M_PI * x));
+}
+
+static double
+dcircle(double x, double r)      /* derivative of the "sin() hump" */
+{
+  return(r * M_PI * cos(M_PI * x));
+}
+
+static double
+leftlog(double x, double r)      /* left skewed logistic */
+{
+  double d;
+
+  d = 1.0 - x;
+  return(r * x * d * d);
+}
+
+static double
+dleftlog(double x, double r)    /* derivative of the left skewed logistic */
+{
+  return(r * (1.0 - (4.0 * x) + (3.0 * x * x)));
+}
+
+static double
+rightlog(double x, double r)    /* right skewed logistic */
+{
+  return(r * x * x * (1.0 - x));
+}
+
+static double
+drightlog(double x, double r)    /* derivative of the right skewed logistic */
+{
+  return(r * ((2.0 * x) - (3.0 * x * x)));
+}
+
+static double
+doublelog(double x, double r)    /* double logistic */
+{
+  double d;
+
+  d = 1.0 - x;
+  return(r * x * x * d * d);
+}
+
+static double
+ddoublelog(double x, double r)   /* derivative of the double logistic */
+{
+  double d;
+
+  d = x * x;
+  return(r * ((2.0 * x) - (6.0 * d) + (4.0 * x * d)));
+}
+
+static void
+init_data(void)
+{
+  numcolors = XDisplayCells(dpy, XDefaultScreen(dpy));
+  displayplanes = DisplayPlanes(dpy, XDefaultScreen(dpy));
+  if (numcolors > maxcolor)
+    numcolors = maxcolor;
+  numfreecols = numcolors - mincolindex;
+  lowrange = mincolindex - startcolor;
+  a_inc = a_range / (double)width;
+  b_inc = b_range / (double)height;
+  point.x = -1;
+  point.y = 0;
+  a = rubber_data.p_min = min_a;
+  b = rubber_data.q_min = min_b;
+  rubber_data.p_max = max_a;
+  rubber_data.q_max = max_b;
+  if (show)
+    show_defaults();
+  InitBuffer();
+  ya_rand_init(0);
+}
+
+static void
+init_canvas(void)
+{
+  static int i;
+
+  /*
+  * create default, writable, graphics contexts for the canvas.
+  */
+       for (i=0; i<maxcolor; i++) {
+           Data_GC[i] = XCreateGC(dpy, DefaultRootWindow(dpy),
+               (unsigned long) NULL, (XGCValues *) NULL);
+           /* set the background to black */
+           XSetBackground(dpy,Data_GC[i],BlackPixel(dpy,XDefaultScreen(dpy)));
+           /* set the foreground of the ith context to i */
+           XSetForeground(dpy, Data_GC[i], i);
+       }
+       if (displayplanes == 1) {
+           XSetForeground(dpy,Data_GC[0],BlackPixel(dpy,XDefaultScreen(dpy)));
+           XSetForeground(dpy,Data_GC[1],WhitePixel(dpy,XDefaultScreen(dpy)));
+       }
+}
+
+#if 0
+static void
+hls2rgb(int hue_light_sat[3],
+       int rgb[3])             /*      Each in range [0..65535]        */
+{
+  unsigned short r, g, b;
+  hsv_to_rgb((int) (hue_light_sat[0] / 10),            /* 0-3600 -> 0-360 */
+            (int) ((hue_light_sat[2]/1000.0) * 64435), /* 0-1000 -> 0-65535 */
+            (int) ((hue_light_sat[1]/1000.0) * 64435), /* 0-1000 -> 0-65535 */
+            &r, &g, &b);
+  rgb[0] = r;
+  rgb[1] = g;
+  rgb[2] = b;
+}
+#endif /* 0 */
+
+
+static void
+init_color(void)
+{
+#if 1
+
+  int i;
+  XColor colors[256];
+  int ncolors = maxcolor;
+  Bool writable = False;
+  make_smooth_colormap(dpy, visual, cmap,
+                       colors, &ncolors, True, &writable, True);
+
+  for (i = 0; i < maxcolor; i++)
+    XSetForeground(dpy, Data_GC[i],
+                  colors[((int) ((i / ((float)maxcolor)) * ncolors))].pixel);
+
+#else
+  static int i, j, colgap, leg, step;
+  static Visual *visual;
+  Colormap def_cmap;
+  int hls[3], rgb[3];
+
+  def_cmap = DefaultColormap(dpy, DefaultScreen(dpy));
+  for (i=0; i<numcolors; i++) {
+    Colors[i].pixel = i;
+    Colors[i].flags = DoRed|DoGreen|DoBlue;
+  }
+
+  /* Try to write into a new color map */
+  visual = DefaultVisual(dpy, DefaultScreen(dpy));
+  cmap = XCreateColormap(dpy, canvas, visual, AllocAll);
+  XQueryColors(dpy, def_cmap, Colors, numcolors);
+  if (mincolindex)
+    colgap = rgb_max / mincolindex;
+  else
+    colgap = rgb_max;
+  hls[0] = 50; /* Hue in low range */
+  hls[2] = 1000;  /* Fully saturated */
+  for (i=startcolor; i<lowrange + startcolor; i++) {
+    hls[1] = 1000L * (i-startcolor) / lowrange;
+    hls2rgb(hls, rgb);
+    Colors[i].red = rgb[0];
+    Colors[i].green = rgb[1];
+    Colors[i].blue = rgb[2];
+  }
+  colgap = rgb_max / numcolors;
+  if (numwheels == 0)
+    XQueryColors(dpy, def_cmap, Colors, numcolors);
+  else if (numwheels == 1) {
+    colgap = 2*rgb_max/(numcolors - color_offset);
+    for (i=mincolindex; i<(numcolors/2); i++) {
+      Colors[i].blue = 0;
+      Colors[i].green=((i+color_offset)*colgap);
+      Colors[i].red=((i+color_offset)*colgap);
+    }
+    for (i=(numcolors/2); i<(numcolors); i++) {
+      Colors[i].blue = 0;
+      Colors[i].green=(((numcolors-i)+color_offset)*colgap);
+      Colors[i].red=(((numcolors-i)+color_offset)*colgap);
+    }
+  }
+  else if (numwheels == 2) {
+         hls[0] = 800; /* Hue in mid range */
+         hls[2] = 1000;  /* Fully saturated */
+         for (i=startcolor; i<lowrange + startcolor; i++) {
+      hls[1] = 1000L * (i-startcolor) / lowrange;
+      hls2rgb(hls, rgb);
+      Colors[i].red = rgb[0];
+      Colors[i].green = rgb[1];
+      Colors[i].blue = rgb[2];
+         }
+    for (i=mincolindex; i<(numcolors/2); i++) {
+      Colors[i].blue = rgb_max;
+      Colors[i].green = 0;
+      Colors[i].red=(i*2*rgb_max/numcolors);
+    }
+    for (i=(numcolors/2); i<numcolors; i++) {
+      Colors[i].blue = rgb_max;
+      Colors[i].green = 0;
+      Colors[i].red=((numcolors - i)*2*rgb_max/numcolors);
+    }
+  }
+  else if (numwheels == 3) {
+         hls[0] = 800; /* Hue in mid range */
+         hls[2] = 1000;  /* Fully saturated */
+         for (i=startcolor; i<lowrange + startcolor; i++) {
+      hls[1] = 1000L * (i-startcolor) / lowrange;
+      hls2rgb(hls, rgb);
+      Colors[i].red = rgb[0];
+      Colors[i].green = rgb[1];
+      Colors[i].blue = rgb[2];
+         }
+    colgap = 4*rgb_max/numcolors;
+    for (i=mincolindex; i<(numcolors/4); i++) {
+      Colors[i].blue = rgb_max;
+      Colors[i].green = 0;
+      Colors[i].red=(i*colgap);
+    }
+    for (i=(numcolors/4); i<(numcolors/2); i++) {
+      Colors[i].red = rgb_max;
+      Colors[i].green = 0;
+      Colors[i].blue=((numcolors/2) - i) * colgap;
+    }
+    for (i=(numcolors/2); i<(0.75*numcolors); i++) {
+      Colors[i].red = rgb_max;
+      Colors[i].blue=(i * colgap);
+      Colors[i].green = 0;
+    }
+    for (i=(0.75*numcolors); i<numcolors; i++) {
+      Colors[i].blue = rgb_max;
+      Colors[i].green = 0;
+      Colors[i].red=(numcolors-i)*colgap;
+    }
+  }
+  else if (numwheels == 4) {
+         hls[0] = 800; /* Hue in mid range */
+         hls[2] = 1000;  /* Fully saturated */
+         for (i=startcolor; i<lowrange + startcolor; i++) {
+      hls[1] = 1000L * (i-startcolor) / lowrange;
+      hls2rgb(hls, rgb);
+      Colors[i].red = rgb[0];
+      Colors[i].green = rgb[1];
+      Colors[i].blue = rgb[2];
+         }
+    colgap = numwheels * rgb_max / numcolors;
+    for (i=mincolindex; i<(numcolors/numwheels); i++) {
+      Colors[i].blue = rgb_max;
+      Colors[i].green = 0;
+      Colors[i].red=(i*colgap);
+    }
+    for (i=(numcolors/numwheels); i<(2*numcolors/numwheels); i++) {
+      Colors[i].red = rgb_max;
+      Colors[i].green = 0;
+      Colors[i].blue=((2*numcolors/numwheels) - i) * colgap;
+    }
+    for (i=(2*numcolors/numwheels); i<numcolors; i++) {
+      Colors[i].red = rgb_max;
+      Colors[i].green=(i - (2*numcolors/numwheels)) * colgap;
+      Colors[i].blue = 0;
+    }
+  }
+  else if (numwheels == 5) {
+    hls[1] = 700; /* Lightness in midrange */
+    hls[2] = 1000;  /* Fully saturated */
+    for (i=mincolindex; i<numcolors; i++) {
+      hls[0] = 3600L * i / numcolors;
+      hls2rgb(hls, rgb);
+      Colors[i].red = rgb[0];
+      Colors[i].green = rgb[1];
+      Colors[i].blue = rgb[2];
+    }
+    for (i=mincolindex; i<numcolors; i+=stripe_interval) {
+      hls[0] = 3600L * i / numcolors;
+      hls2rgb(hls, rgb);
+      Colors[i].red = rgb[0] / 2;
+      Colors[i].green = rgb[1] / 2;
+      Colors[i].blue = rgb[2] / 2;
+    }
+  }
+  else if (numwheels == 6) {
+      hls[0] = 800; /* Hue in mid range */
+      hls[2] = 1000;  /* Fully saturated */
+      for (i=startcolor; i<lowrange + startcolor; i++) {
+    hls[1] = 1000L * (i-startcolor) / lowrange;
+    hls2rgb(hls, rgb);
+    Colors[i].red = rgb[0];
+    Colors[i].green = rgb[1];
+    Colors[i].blue = rgb[2];
+      }
+      step = numfreecols / 3;
+      leg = step+mincolindex;
+      for (i = mincolindex; i < leg; ++i)
+      {
+    Colors[i].pixel = i;
+    Colors[i].red = fabs(65535 - (double)i / step * 65535.0);
+    Colors[i].blue = (double)i / step * 65535.0;
+    Colors[i].green = 0;
+    Colors[i].flags = DoRed | DoGreen | DoBlue;
+      }
+      for (j = 0, i = leg, leg += step; i < leg; ++i, ++j)
+      {
+    Colors[i].pixel = i;
+    Colors[i].red = (double)j / step * 65535.0;
+    Colors[i].blue = 65535;
+    Colors[i].green = Colors[i].red;
+    Colors[i].flags = DoRed | DoGreen | DoBlue;
+      }
+      for (j = 0, i = leg, leg += step; i < leg; ++i, ++j)
+      {
+    Colors[i].pixel = i;
+    Colors[i].red = 65535;
+    Colors[i].blue = fabs(65535 - (double)j / step * 65535.0);
+    Colors[i].green = Colors[i].blue;
+    Colors[i].flags = DoRed | DoGreen | DoBlue;
+      }
+  }
+  else if (numwheels == MAXWHEELS) {  /* rainbow palette */
+    hls[1] = 500; /* Lightness in midrange */
+    hls[2] = 1000;  /* Fully saturated */
+    for (i=mincolindex; i<numcolors; i++) {
+      hls[0] = 3600L * i / numcolors;
+      hls2rgb(hls, rgb);
+      Colors[i].red = rgb[0];
+      Colors[i].green = rgb[1];
+      Colors[i].blue = rgb[2];
+    }
+  }
+  XStoreColors(dpy, cmap, Colors, numcolors);
+
+  XSetWindowColormap(dpy, canvas, cmap);
+#endif
+}
+
+static void
+parseargs()
+{
+  static int i;
+  int bindex=0, findex;
+  char *s, *ch;
+
+  map = Maps[0];
+  deriv = Derivs[0];
+  maxexp=minlyap; minexp= -1.0 * minlyap;
+
+  mincolindex = get_integer_resource("minColor", "Integer");
+  dwell = get_integer_resource("dwell", "Integer");
+#ifdef MAPS
+  {
+    char *optarg = get_string_resource("function", "String");
+    funcmaxindex = strlen(optarg);
+    if (funcmaxindex > FUNCMAXINDEX)
+      usage();
+    ch = optarg;
+    Force++;
+    for (findex=0;findex<funcmaxindex;findex++) {
+      Forcing[findex] = (int)(*ch++ - '0');;
+      if (Forcing[findex] >= NUMMAPS)
+       usage();
+    }
+  }
+#endif
+  if (get_boolean_resource("useLog", "Boolean"))
+    useprod=0;
+
+  minlyap=ABS(get_float_resource("colorExponent", "Float"));
+  maxexp=minlyap;
+  minexp= -1.0 * minlyap;
+
+  color_offset = get_integer_resource("colorOffset", "Integer");
+
+  maxcolor=ABS(get_integer_resource("maxColor", "Integer"));
+  if ((maxcolor - startcolor) <= 0)
+    startcolor = 0;
+  if ((maxcolor - mincolindex) <= 0) {
+    mincolindex = 1;
+    color_offset = 0;
+  }
+
+  s = get_string_resource("randomForce", "Float");
+  if (s && *s) {
+    prob=atof(s); Rflag++; setforcing();
+  }
+
+  settle = get_integer_resource("settle", "Integer");
+
+  s = get_string_resource("minA", "Float");
+  if (s && *s) {
+    min_a = atof(s);
+    aflag++;
+  }
+  
+  s = get_string_resource("minB", "Float");
+  if (s && *s) {
+    min_b=atof(s); bflag++;
+  }
+  
+  numwheels = get_integer_resource("wheels", "Integer");
+
+  s = get_string_resource("forcingFunction", "String");
+  if (s && *s) {
+    maxindex = strlen(s);
+    if (maxindex > MAXINDEX)
+      usage();
+    ch = s;
+    force++;
+    while (bindex < maxindex) {
+      if (*ch == 'a')
+       forcing[bindex++] = 0;
+      else if (*ch == 'b')
+       forcing[bindex++] = 1;
+      else
+       usage();
+      ch++;
+    }
+  }
+
+  s = get_string_resource("bRange", "Float");
+  if (s && *s) {
+    b_range = atof(s);
+    hflag++;
+  }
+
+  start_x = get_float_resource("startX", "Float");
+
+  s = get_string_resource("mapIndex", "Integer");
+  if (s && *s) {
+    mapindex=atoi(s);
+    if ((mapindex >= NUMMAPS) || (mapindex < 0))
+      usage();
+    map = Maps[mapindex];
+    deriv = Derivs[mapindex];
+    if (!aflag)
+      min_a = amins[mapindex];
+    if (!wflag)
+      a_range = aranges[mapindex];
+    if (!bflag)
+      min_b = bmins[mapindex];
+    if (!hflag)
+      b_range = branges[mapindex];
+    if (!Force)
+      for (i=0;i<FUNCMAXINDEX;i++)
+       Forcing[i] = mapindex;
+  }
+
+  outname = get_string_resource("outputFile", "Integer");
+
+  if (get_boolean_resource("beNegative", "Boolean"))
+    negative--;
+
+  rgb_max = get_integer_resource("rgbMax", "Integer");
+  spinlength = get_integer_resource("spinLength", "Integer");
+  show = get_boolean_resource("show", "Boolean");
+
+  s = get_string_resource("aRange", "Float");
+  if (s && *s) {
+    a_range = atof(s); wflag++;
+  }
+
+  max_a = min_a + a_range;
+  max_b = min_b + b_range;
+
+  a_minimums[0] = min_a; b_minimums[0] = min_b;
+  a_maximums[0] = max_a; b_maximums[0] = max_b;
+
+  if (Force)
+    if (maxindex == funcmaxindex)
+      for (findex=0;findex<funcmaxindex;findex++)
+       check_params(Forcing[findex],forcing[findex]);
+    else
+      fprintf(stderr, "Warning! Unable to check parameters\n");
+  else
+    check_params(mapindex,2);
+}
+
+static void
+check_params(int mapnum, int parnum)
+{
+
+  if (parnum != 1) {
+      if ((max_a > pmaxs[mapnum]) || (min_a < pmins[mapnum])) {
+    fprintf(stderr, "Warning! Parameter 'a' out of range.\n");
+    fprintf(stderr, "You have requested a range of (%f,%f).\n",
+      min_a,max_a);
+    fprintf(stderr, "Valid range is (%f,%f).\n",
+      pmins[mapnum],pmaxs[mapnum]);
+      }
+  }
+  if (parnum != 0) {
+      if ((max_b > pmaxs[mapnum]) || (min_b < pmins[mapnum])) {
+    fprintf(stderr, "Warning! Parameter 'b' out of range.\n");
+    fprintf(stderr, "You have requested a range of (%f,%f).\n",
+      min_b,max_b);
+    fprintf(stderr, "Valid range is (%f,%f).\n",
+      pmins[mapnum],pmaxs[mapnum]);
+      }
+  }
+}
+
+static void
+usage(void)
+{
+    fprintf(stderr,"lyap [-BLs][-W#][-H#][-a#][-b#][-w#][-h#][-x xstart]\n");
+    fprintf(stderr,"\t[-M#][-S#][-D#][-f string][-r#][-O#][-C#][-c#][-m#]\n");
+#ifdef MAPS
+    fprintf(stderr,"\t[-F string]\n");
+#endif
+    fprintf(stderr,"\tWhere: -C# specifies the minimum color index\n");
+    fprintf(stderr,"\t      -r# specifies the maxzimum rgb value\n");
+    fprintf(stderr,"\t      -u displays this message\n");
+    fprintf(stderr,"\t      -a# specifies the minimum horizontal parameter\n");
+    fprintf(stderr,"\t      -b# specifies the minimum vertical parameter\n");
+    fprintf(stderr,"\t      -w# specifies the horizontal parameter range\n");
+    fprintf(stderr,"\t      -h# specifies the vertical parameter range\n");
+    fprintf(stderr,"\t      -D# specifies the dwell\n");
+    fprintf(stderr,"\t      -S# specifies the settle\n");
+    fprintf(stderr,"\t      -H# specifies the initial window height\n");
+    fprintf(stderr,"\t      -W# specifies the initial window width\n");
+    fprintf(stderr,"\t      -O# specifies the color offset\n");
+    fprintf(stderr,"\t      -c# specifies the desired color wheel\n");
+    fprintf(stderr,"\t      -m# specifies the desired map (0-4)\n");
+    fprintf(stderr,"\t      -f aabbb specifies a forcing function of 00111\n");
+#ifdef MAPS
+    fprintf(stderr,"\t      -F 00111 specifies the function forcing function\n");
+#endif
+    fprintf(stderr,"\t      -L indicates use log(x)+log(y) rather than log(xy)\n");
+    fprintf(stderr,"\tDuring display :\n");
+    fprintf(stderr,"\t    Use the mouse to zoom in on an area\n");
+    fprintf(stderr,"\t    e or E recalculates color indices\n");
+    fprintf(stderr,"\t    f or F saves exponents to a file\n");
+    fprintf(stderr,"\t    KJmn increase/decrease minimum negative exponent\n");
+    fprintf(stderr,"\t    r or R redraws\n");
+    fprintf(stderr,"\t    s or S spins the colorwheel\n");
+    fprintf(stderr,"\t    w or W changes the color wheel\n");
+    fprintf(stderr,"\t    x or X clears the window\n");
+    fprintf(stderr,"\t    q or Q exits\n");
+    exit(1);
+}
+
+static void
+Cycle_frames(void)
+{
+  static int i;
+  for (i=0;i<=maxframe;i++)
+    redraw(exponents[i], expind[i], 1);
+}
+
+static void
+Spin(Window w)
+{
+  static int i, j;
+  long tmpxcolor;
+
+  if (displayplanes > 1) {
+    for (j=0;j<spinlength;j++) {
+      tmpxcolor = Colors[mincolindex].pixel;
+      for (i=mincolindex;i<numcolors-1;i++)
+       Colors[i].pixel = Colors[i+1].pixel;
+      Colors[numcolors-1].pixel = tmpxcolor;
+      XStoreColors(dpy, cmap, Colors, numcolors);
+    }
+    for (j=0;j<spinlength;j++) {
+      tmpxcolor = Colors[numcolors-1].pixel;
+      for (i=numcolors-1;i>mincolindex;i--)
+       Colors[i].pixel = Colors[i-1].pixel;
+      Colors[mincolindex].pixel = tmpxcolor;
+      XStoreColors(dpy, cmap, Colors, numcolors);
+    }
+  }
+}
+
+static void
+Getkey(XKeyEvent *event)
+{
+  unsigned char key;
+  static int i;
+  if (XLookupString(event, (char *)&key, sizeof(key), (KeySym *)0,
+           (XComposeStatus *) 0) > 0)
+    switch (key) {
+  case '<': dwell /= 2; if (dwell < 1) dwell = 1; break;
+  case '>': dwell *= 2; break;
+  case '[': settle /= 2; if (settle < 1) settle = 1; break;
+  case ']': settle *= 2; break;
+  case 'd': go_down(); break;
+  case 'D': FlushBuffer(); break;
+  case 'e':
+  case 'E': FlushBuffer();
+      dorecalc = (!dorecalc);
+      if (dorecalc)
+      recalc();
+      else {
+      maxexp = minlyap; minexp = -1.0 * minlyap;
+      }
+      redraw(exponents[frame], expind[frame], 1);
+      break;
+  case 'f':
+  case 'F': save_to_file(); break;
+  case 'i': if (stripe_interval > 0) {
+      stripe_interval--;
+       if (displayplanes > 1) {
+           init_color();
+       }
+      }
+      break;
+  case 'I': stripe_interval++;
+      if (displayplanes > 1) {
+       init_color();
+      }
+      break;
+  case 'K': if (minlyap > 0.05)
+      minlyap -= 0.05;
+       break;
+  case 'J': minlyap += 0.05;
+       break;
+  case 'm': mapindex++;
+                 if (mapindex >= NUMMAPS)
+                       mapindex=0;
+                 map = Maps[mapindex];
+                 deriv = Derivs[mapindex];
+      if (!aflag)
+                       min_a = amins[mapindex];
+                 if (!wflag)
+                       a_range = aranges[mapindex];
+                 if (!bflag)
+                       min_b = bmins[mapindex];
+                 if (!hflag)
+                       b_range = branges[mapindex];
+                 if (!Force)
+                       for (i=0;i<FUNCMAXINDEX;i++)
+                            Forcing[i] = mapindex;
+           max_a = min_a + a_range;
+           max_b = min_b + b_range;
+           a_minimums[0] = min_a; b_minimums[0] = min_b;
+           a_maximums[0] = max_a; b_maximums[0] = max_b;
+           a_inc = a_range / (double)width;
+           b_inc = b_range / (double)height;
+           point.x = -1;
+           point.y = 0;
+           a = rubber_data.p_min = min_a;
+           b = rubber_data.q_min = min_b;
+           rubber_data.p_max = max_a;
+           rubber_data.q_max = max_b;
+                 Clear();
+                 break;
+  case 'M': if (minlyap > 0.005)
+      minlyap -= 0.005;
+       break;
+  case 'N': minlyap += 0.005;
+       break;
+  case 'p':
+  case 'P': negative = (!negative);
+      FlushBuffer(); redraw(exponents[frame], expind[frame], 1);
+      break;
+  case 'r': FlushBuffer(); redraw(exponents[frame], expind[frame], 1);
+      break;
+  case 'R': FlushBuffer(); Redraw(); break;
+  case 's':
+       spinlength=spinlength/2;
+  case 'S': if (displayplanes > 1)
+      Spin(canvas);
+       spinlength=spinlength*2; break;
+  case 'u': go_back(); break;
+  case 'U': go_init(); break;
+  case 'v':
+  case 'V': print_values(); break;
+  case 'W': if (numwheels < MAXWHEELS)
+      numwheels++;
+       else
+      numwheels = 0;
+       if (displayplanes > 1) {
+       init_color();
+       }
+       break;
+  case 'w': if (numwheels > 0)
+      numwheels--;
+       else
+      numwheels = MAXWHEELS;
+       if (displayplanes > 1) {
+       init_color();
+       }
+       break;
+  case 'x': Clear(); break;
+  case 'X': Destroy_frame(); break;
+  case 'z': Cycle_frames(); redraw(exponents[frame], expind[frame], 1);
+      break;
+  case 'Z': while (!XPending(dpy)) Cycle_frames();
+      redraw(exponents[frame], expind[frame], 1); break;
+  case 'q':
+  case 'Q': exit(0); break;
+  case '?':
+  case 'h':
+  case 'H': print_help(); break;
+  default:  break;
+  }
+}
+
+/* Here's where we index into a color map. After the Lyapunov exponent is
+ * calculated, it is used to determine what color to use for that point.
+ * I suppose there are a lot of ways to do this. I used the following :
+ * if it's non-negative then there's a reserved area at the lower range
+ * of the color map that i index into. The ratio of some "minimum exponent
+ * value" and the calculated value is used as a ratio of how high to index
+ * into this reserved range. Usually these colors are dark red (see init_color).
+ * If the exponent is negative, the same ratio (expo/minlyap) is used to index
+ * into the remaining portion of the colormap (which is usually some light
+ * shades of color or a rainbow wheel). The coloring scheme can actually make
+ * a great deal of difference in the quality of the picture. Different colormaps
+ * bring out different details of the dynamics while different indexing
+ * algorithms also greatly effect what details are seen. Play around with this.
+ */
+static int
+sendpoint(double expo)
+{
+  static int index;
+  static double tmpexpo;
+
+  point.x++;
+  tmpexpo = (negative) ? expo : -1.0 * expo;
+  if (tmpexpo > 0) {
+    if (displayplanes >1) {
+       index = (int)(tmpexpo*lowrange/maxexp);
+       index = (index % lowrange) + startcolor;
+    }
+    else
+       index = 0;
+  }
+  else {
+    if (displayplanes >1) {
+       index = (int)(tmpexpo*numfreecols/minexp);
+       index = (index % numfreecols) + mincolindex;
+    }
+    else
+       index = 1;
+  }
+    BufferPoint(dpy, canvas, index, point.x, point.y);
+  if (save)
+    exponents[frame][expind[frame]++] = expo;
+  if (point.x >= width) {
+    point.y++;
+    point.x = 0;
+    if (save) {
+      b += b_inc;
+      a = min_a;
+    }
+    if (point.y >= height)
+      return FALSE;
+    else
+      return TRUE;
+  }
+  return TRUE;
+}
+
+static void
+redisplay (Window w, XExposeEvent *event)
+{
+  /*
+  * Extract the exposed area from the event and copy
+  * from the saved pixmap to the window.
+  */
+  XCopyArea(dpy, pixmap, canvas, Data_GC[0],
+          event->x, event->y, event->width, event->height,
+          event->x, event->y);
+}
+
+static void
+resize(void)
+{
+  Window r;
+  int n, x, y;
+  unsigned int bw, d, new_w, new_h;
+
+  XGetGeometry(dpy,canvas,&r,&x,&y,&new_w,&new_h,&bw,&d);
+  if ((new_w == width) && (new_h == height))
+    return;
+  width = new_w; height = new_h;
+  XClearWindow(dpy, canvas);
+  if (pixmap)
+    XFreePixmap(dpy, pixmap);
+  pixmap = XCreatePixmap(dpy, DefaultRootWindow(dpy),
+      width, height, DefaultDepth(dpy, screen));
+  a_inc = a_range / (double)width;
+  b_inc = b_range / (double)height;
+  point.x = -1;
+  point.y = 0;
+  run = 1;
+  a = rubber_data.p_min = min_a;
+  b = rubber_data.q_min = min_b;
+  rubber_data.p_max = max_a;
+  rubber_data.q_max = max_b;
+  freemem();
+  setupmem();
+       for (n=0;n<MAXFRAMES;n++)
+    if ((n <= maxframe) && (n != frame))
+       resized[n] = 1;
+  InitBuffer();
+  Clear();
+  Redraw();
+}
+
+static void
+redraw(double *exparray, int index, int cont)
+{
+  static int i;
+  static int x_sav, y_sav;
+
+  x_sav = point.x;
+  y_sav = point.y;
+
+  point.x = -1;
+  point.y = 0;
+
+  save=0;
+  for (i=0;i<index;i++)
+    sendpoint(exparray[i]);
+  save=1;
+
+  if (cont) {
+    point.x = x_sav;
+    point.y = y_sav;
+  }
+  else {
+    a = point.x * a_inc + min_a;
+    b = point.y * b_inc + min_b;
+  }
+  FlushBuffer();
+}
+
+static void
+Redraw(void)
+{
+  FlushBuffer();
+       point.x = -1;
+       point.y = 0;
+  run = 1;
+       a = min_a;
+       b = min_b;
+  expind[frame] = 0;
+  resized[frame] = 0;
+}
+
+/* Store color pics in PPM format and monochrome in PGM */
+static void
+save_to_file(void)
+{
+  FILE *outfile;
+  unsigned char c;
+  XImage *ximage;
+  static int i,j;
+  struct Colormap {
+    unsigned char red;
+    unsigned char green;
+    unsigned char blue;
+  };
+  struct Colormap *colormap=NULL;
+
+  if (colormap)
+    free(colormap);
+  if ((colormap=
+    (struct Colormap *)malloc(sizeof(struct Colormap)*maxcolor))
+      == NULL) {
+    fprintf(stderr,"Error malloc'ing colormap array\n");
+    exit(-1);
+  }
+  outfile = fopen(outname,"w");
+  if(!outfile) {
+    perror(outname);
+    exit(-1);
+  }
+
+  ximage=XGetImage(dpy, pixmap, 0, 0, width, height, AllPlanes, XYPixmap);
+
+  if (displayplanes > 1) {
+    for (i=0;i<maxcolor;i++) {
+      colormap[i].red=(unsigned char)(Colors[i].red >> 8);
+      colormap[i].green=(unsigned char)(Colors[i].green >> 8);
+      colormap[i].blue =(unsigned char)(Colors[i].blue >> 8);
+    }
+    fprintf(outfile,"P%d %d %d\n",6,width,height);
+  }
+  else
+    fprintf(outfile,"P%d %d %d\n",5,width,height);
+  fprintf(outfile,"# settle=%d dwell=%d start_x=%f\n",settle,dwell,
+       start_x);
+  fprintf(outfile,"# min_a=%f  a_rng=%f         max_a=%f\n",min_a,a_range,max_a);
+  fprintf(outfile,"# min_b=%f  b_rng=%f         max_b=%f\n",min_b,b_range,max_b);
+  if (Rflag)
+    fprintf(outfile,"# pseudo-random forcing\n");
+  else if (force) {
+    fprintf(outfile,"# periodic forcing=");
+    for (i=0;i<maxindex;i++) {
+      fprintf(outfile,"%d",forcing[i]);
+    }
+    fprintf(outfile,"\n");
+  }
+  else
+    fprintf(outfile,"# periodic forcing=01\n");
+  if (Force) {
+    fprintf(outfile,"# function forcing=");
+    for (i=0;i<funcmaxindex;i++) {
+      fprintf(outfile,"%d",Forcing[i]);
+    }
+    fprintf(outfile,"\n");
+  }
+  fprintf(outfile,"%d\n",numcolors-1);
+
+  for (j=0;j<height;j++)
+      for (i=0;i<width;i++) {
+    c = (unsigned char)XGetPixel(ximage,i,j);
+    if (displayplanes > 1)
+       fwrite((char *)&colormap[c],sizeof colormap[0],1,outfile);
+    else
+       fwrite((char *)&c,sizeof c,1,outfile);
+      }
+  fclose(outfile);
+}
+
+static void
+recalc(void)
+{
+  static int i, x, y;
+
+  minexp = maxexp = 0.0;
+  x = y = 0;
+  for (i=0;i<expind[frame];i++) {
+    if (exponents[frame][i] < minexp)
+      minexp = exponents[frame][i];
+    if (exponents[frame][i] > maxexp)
+      maxexp = exponents[frame][i];
+  }
+}
+
+static void
+Clear(void)
+{
+      XClearWindow(dpy, canvas);
+  XCopyArea(dpy, canvas, pixmap, Data_GC[0],
+           0, 0, width, height, 0, 0);
+  InitBuffer();
+}
+
+static void
+show_defaults(void)
+{
+
+  printf("Width=%d  Height=%d  numcolors=%d  settle=%d dwell=%d\n",
+    width,height,numcolors,settle,dwell);
+  printf("min_a=%f  a_range=%f max_a=%f\n", min_a,a_range,max_a);
+  printf("min_b=%f  b_range=%f max_b=%f\n", min_b,b_range,max_b);
+  printf("minlyap=%f  minexp=%f         maxexp=%f\n", minlyap,minexp,maxexp);
+  exit(0);
+}
+
+static void
+CreateXorGC(void)
+{
+  XGCValues values;
+
+  values.foreground = foreground;
+  values.line_style = LineSolid;
+  values.function = GXxor;
+  RubberGC = XCreateGC(dpy, DefaultRootWindow(dpy),
+       GCForeground | GCBackground | GCFunction | GCLineStyle, &values);
+}
+
+static void
+StartRubberBand(Window w, image_data_t *data, XEvent *event)
+{
+  XPoint corners[5];
+
+  nostart = 0;
+  data->rubber_band.last_x = data->rubber_band.start_x = event->xbutton.x;
+  data->rubber_band.last_y = data->rubber_band.start_y = event->xbutton.y;
+  SetupCorners(corners, data);
+  XDrawLines(dpy, canvas, RubberGC,
+      corners, sizeof(corners) / sizeof(corners[0]), CoordModeOrigin);
+}
+
+static void
+SetupCorners(XPoint *corners, image_data_t *data)
+{
+  corners[0].x = data->rubber_band.start_x;
+  corners[0].y = data->rubber_band.start_y;
+  corners[1].x = data->rubber_band.start_x;
+  corners[1].y = data->rubber_band.last_y;
+  corners[2].x = data->rubber_band.last_x;
+  corners[2].y = data->rubber_band.last_y;
+  corners[3].x = data->rubber_band.last_x;
+  corners[3].y = data->rubber_band.start_y;
+  corners[4] = corners[0];
+}
+
+static void
+TrackRubberBand(Window w, image_data_t *data, XEvent *event)
+{
+  XPoint corners[5];
+  int xdiff, ydiff;
+
+  if (nostart)
+    return;
+  SetupCorners(corners, data);
+  XDrawLines(dpy, canvas, RubberGC,
+      corners, sizeof(corners) / sizeof(corners[0]), CoordModeOrigin);
+  ydiff = event->xbutton.y - data->rubber_band.start_y;
+  xdiff = event->xbutton.x - data->rubber_band.start_x;
+  data->rubber_band.last_x = data->rubber_band.start_x + xdiff;
+  data->rubber_band.last_y = data->rubber_band.start_y + ydiff;
+  if (data->rubber_band.last_y < data->rubber_band.start_y ||
+      data->rubber_band.last_x < data->rubber_band.start_x)
+  {
+    data->rubber_band.last_y = data->rubber_band.start_y;
+    data->rubber_band.last_x = data->rubber_band.start_x;
+  }
+  SetupCorners(corners, data);
+  XDrawLines(dpy, canvas, RubberGC,
+      corners, sizeof(corners) / sizeof(corners[0]), CoordModeOrigin);
+}
+
+static void
+EndRubberBand(Window w, image_data_t *data, XEvent *event)
+{
+  XPoint corners[5];
+  XPoint top, bot;
+  double delta, diff;
+
+  nostart = 1;
+  SetupCorners(corners, data);
+  XDrawLines(dpy, canvas, RubberGC,
+      corners, sizeof(corners) / sizeof(corners[0]), CoordModeOrigin);
+  if (data->rubber_band.start_x >= data->rubber_band.last_x ||
+      data->rubber_band.start_y >= data->rubber_band.last_y)
+    return;
+  top.x = data->rubber_band.start_x;
+  bot.x = data->rubber_band.last_x;
+  top.y = data->rubber_band.start_y;
+  bot.y = data->rubber_band.last_y;
+  diff = data->q_max - data->q_min;
+  delta = (double)top.y / (double)height;
+  data->q_min += diff * delta;
+  delta = (double)(height - bot.y) / (double)height;
+  data->q_max -= diff * delta;
+  diff = data->p_max - data->p_min;
+  delta = (double)top.x / (double)width;
+  data->p_min += diff * delta;
+  delta = (double)(width - bot.x) / (double)width;
+  data->p_max -= diff * delta;
+  fflush(stdout);
+  set_new_params(w, data);
+}
+
+static void
+set_new_params(Window w, image_data_t *data)
+{
+  frame = (maxframe + 1) % MAXFRAMES;
+  if (frame > maxframe)
+    maxframe = frame;
+  a_range = data->p_max - data->p_min;
+  b_range = data->q_max - data->q_min;
+       a_minimums[frame] = min_a = data->p_min;
+       b_minimums[frame] = min_b = data->q_min;
+       a_inc = a_range / (double)width;
+       b_inc = b_range / (double)height;
+       point.x = -1;
+       point.y = 0;
+  run = 1;
+       a = min_a;
+       b = min_b;
+       a_maximums[frame] = max_a = data->p_max;
+       b_maximums[frame] = max_b = data->q_max;
+  expind[frame] = 0;;
+  Clear();
+}
+
+static void
+go_down(void)
+{
+  frame++;
+  if (frame > maxframe)
+    frame = 0;
+  jumpwin();
+}
+
+static void
+go_back(void)
+{
+  frame--;
+  if (frame < 0)
+    frame = maxframe;
+  jumpwin();
+}
+
+static void
+jumpwin(void)
+{
+  rubber_data.p_min = min_a = a_minimums[frame];
+  rubber_data.q_min = min_b = b_minimums[frame];
+  rubber_data.p_max = max_a = a_maximums[frame];
+  rubber_data.q_max = max_b = b_maximums[frame];
+  a_range = max_a - min_a;
+  b_range = max_b - min_b;
+       a_inc = a_range / (double)width;
+       b_inc = b_range / (double)height;
+       point.x = -1;
+       point.y = 0;
+       a = min_a;
+       b = min_b;
+  Clear();
+  if (resized[frame])
+    Redraw();
+  else
+    redraw(exponents[frame], expind[frame], 0);
+}
+
+static void
+go_init(void)
+{
+  frame = 0;
+  jumpwin();
+}
+
+static void
+Destroy_frame(void)
+{
+  static int i;
+
+  for (i=frame; i<maxframe; i++) {
+    exponents[frame] = exponents[frame+1];
+    expind[frame] = expind[frame+1];
+    a_minimums[frame] = a_minimums[frame+1];
+    b_minimums[frame] = b_minimums[frame+1];
+    a_maximums[frame] = a_maximums[frame+1];
+    b_maximums[frame] = b_maximums[frame+1];
+  }
+  maxframe--;
+  go_back();
+}
+
+static void
+InitBuffer(void)
+{
+  int i;
+
+  for (i = 0 ; i < maxcolor; ++i)
+    Points.npoints[i] = 0;
+}
+
+static void
+BufferPoint(Display *display, Window window, int color, int x, int y)
+{
+  if (Points.npoints[color] == MAXPOINTS)
+  {
+    XDrawPoints(display, window, Data_GC[color],
+       Points.data[color], Points.npoints[color], CoordModeOrigin);
+    XDrawPoints(display, pixmap, Data_GC[color],
+       Points.data[color], Points.npoints[color], CoordModeOrigin);
+    Points.npoints[color] = 0;
+  }
+  Points.data[color][Points.npoints[color]].x = x;
+  Points.data[color][Points.npoints[color]].y = y;
+  ++Points.npoints[color];
+}
+
+static void
+FlushBuffer(void)
+{
+  int color;
+
+  for (color = 0; color < maxcolor; ++color)
+    if (Points.npoints[color])
+    {
+       XDrawPoints(dpy, canvas, Data_GC[color],
+         Points.data[color], Points.npoints[color],
+         CoordModeOrigin);
+       XDrawPoints(dpy, pixmap, Data_GC[color],
+         Points.data[color], Points.npoints[color],
+         CoordModeOrigin);
+       Points.npoints[color] = 0;
+    }
+}
+
+static void
+print_help(void)
+{
+    printf("During run-time, interactive control can be exerted via : \n");
+    printf("Mouse buttons allow rubber-banding of a zoom box\n");
+    printf("< halves the 'dwell', > doubles the 'dwell'\n");
+    printf("[ halves the 'settle', ] doubles the 'settle'\n");
+    printf("D flushes the drawing buffer\n");
+    printf("e or E recalculates color indices\n");
+    printf("f or F saves exponents to a file\n");
+    printf("h or H or ? displays this message\n");
+    printf("i decrements, I increments the stripe interval\n");
+    printf("KJMN increase/decrease minimum negative exponent\n");
+    printf("m increments the map index, changing maps\n");
+    printf("p or P reverses the colormap for negative/positive exponents\n");
+    printf("r redraws without recalculating\n");
+    printf("R redraws, recalculating with new dwell and settle values\n");
+    printf("s or S spins the colorwheel\n");
+    printf("u pops back up to the last zoom\n");
+    printf("U pops back up to the first picture\n");
+    printf("v or V displays the values of various settings\n");
+    printf("w decrements, W increments the color wheel index\n");
+    printf("x or X clears the window\n");
+    printf("q or Q exits\n");
+}
+
+static void
+print_values(void)
+{
+    static int i;
+
+    printf("\nminlyap=%f minexp=%f maxexp=%f\n",minlyap,minexp,maxexp);
+    printf("width=%d height=%d\n",width,height);
+    printf("settle=%d  dwell=%d start_x=%f\n",settle,dwell, start_x);
+    printf("min_a=%f  a_rng=%f max_a=%f\n",min_a,a_range,max_a);
+    printf("min_b=%f  b_rng=%f max_b=%f\n",min_b,b_range,max_b);
+    if (Rflag)
+  printf("pseudo-random forcing\n");
+    else if (force) {
+  printf("periodic forcing=");
+  for (i=0;i<maxindex;i++)
+    printf("%d",forcing[i]);
+  printf("\n");
+    }
+    else
+  printf("periodic forcing=01\n");
+    if (Force) {
+  printf("function forcing=");
+  for (i=0;i<funcmaxindex;i++) {
+    printf("%d",Forcing[i]);
+  }
+  printf("\n");
+    }
+    printf("numcolors=%d\n",numcolors-1);
+}
+
+static void
+freemem(void)
+{
+  static int i;
+
+       for (i=0;i<MAXFRAMES;i++)
+               free(exponents[i]);
+}
+
+static void
+setupmem(void)
+{
+  static int i;
+
+       for (i=0;i<MAXFRAMES;i++) {
+               if((exponents[i]=
+                   (double *)malloc(sizeof(double)*width*height))==NULL){
+                   fprintf(stderr,"Error malloc'ing exponent array.\n");
+                   exit(-1);
+               }
+       }
+}
+
+static void
+setforcing(void)
+{
+  static int i;
+  for (i=0;i<MAXINDEX;i++)
+    forcing[i] = (ya_random() > prob) ? 0 : 1;
+}
diff --git a/hacks/xlyap.man b/hacks/xlyap.man
new file mode 100644 (file)
index 0000000..6f69cad
--- /dev/null
@@ -0,0 +1,237 @@
+.TH XLYAP 6X
+.SH NAME
+xlyap \- display an array of Lyapunov exponents graphically
+.SH SYNOPSIS
+.in +8n
+.ti -8n
+\fIxlyap\fR
+[-BLps][-W width][-H height][-o filename][-a 
+\fIn\fR ]
+[-b 
+\fIn\fR ]
+[-w 
+\fIn\fR ]
+[-h 
+\fIn\fR ]
+[-i xstart]
+[-M 
+\fIn\fR ]
+[-R 
+\fIp\fR ]
+[-S 
+\fIn\fR ]
+[-D 
+\fIn\fR ]
+[-F string][-f string][-r 
+\fIn\fR ]
+[-O 
+\fIn\fR ]
+[-C 
+\fIn\fR ]
+[-c 
+\fIn\fR ]
+[-m 
+\fIn\fR ]
+[-x xpos]
+[-y ypos]
+.in -8n
+.SH DESCRIPTION
+\fIxlyap\fR
+generates and graphically displays an array of Lyapunov exponents for a 
+variety of iterated periodically forced non-linear maps of the unit interval.
+.SH OPTIONS
+.TP 8
+-random
+A good choice for use with xscreensaver: picks random parameters from 
+a built-in list.
+.TP 8
+-C \fIn\fP
+Specifies the minimum color index to be used for negative exponents
+.TP
+-D \fIn\fP
+Specifies the "dwell" or number of iterations over which to average in order
+to calculate the Lyapunov exponent. Default is 400.
+.TP
+-B 
+Causes the stop, go, spin and quit buttons to be displayed.
+.TP
+-H \fIn\fP
+Specifies the height of the window. Default is 256.
+.TP
+-L 
+Indicates use log(x) + log(y) rather than log(xy).
+.TP
+-M \fIr\fP
+Specifies the real value to compare exponent values to for indexing into
+a color wheel. The default value is 1.0.
+.TP
+-O \fIn\fP
+Specifies the minimum color index to be used for positive exponents
+.TP
+-R \fIp\fP
+Specifies pseudo-random forcing with probability \fIp\fP of using parameter
+value 'a'.
+.TP
+-S \fIn\fP
+Specifies the "settle" or number of iterations prior to the beginning of
+the calculation of the Lyapunov exponent. Default is 200.
+.TP
+-W \fIn\fP
+Specifies the width of the window. Default is 256.
+.TP
+-a \fIr\fP
+Specifies the real value to use as the minimum parameter value of the 
+horizontal axis. Default is 3.0 for the logistic map.
+.TP
+-b \fIn\fP
+Specifies the real value to use as the minimum parameter value of the 
+vertical axis. Default is 3.0 for the logistic map.
+.TP
+-c \fIn\fP
+Selects one of six different color wheels to use. The default color
+wheel is a rainbow palette.
+.TP
+-F \fI10101010\fP
+Specifies the "Function" forcing function to use. The example above would 
+alternate between iterating the circle and logistic maps. An argument of
+"-F 2323" would alternate between left and right logistic maps. The default
+is to only use the single specified map (see the description of -m).
+.TP
+-f \fIabbabaab\fP
+Specifies the forcing function to use. The default is to alternate between
+the "a" parameter and the "b" parameter.
+.TP
+-h \fIr\fP
+Specifies the real value to be used as the range over which the vertical
+parameter values vary. The default is 1.0.
+.TP
+-i \fIr\fP
+Specifies the real value of the initial condition to use. Default is 0.05.
+.TP
+-m \fIn\fP
+Selects between available non-linear maps of the unit interval. A value of
+0 specifies the logistic map. A value of 1, the circle map. A value of 2,
+the left-logistic. A value of 3, the right-logistic. A value of 4, the
+double-logistic. The default is 0, the logistic map.
+.TP
+-o \fIfilename\fP
+Specifies the output filename to be used. If the -o option is given, this
+file will automatically be written out at the completion of the drawing.
+If it is not specified, a default filename of lyap.out is used and only
+written if the 'f' or 'F' keys are pressed during a run. The format of the
+output file is PPM for color and PGM for monochrom. The parameters used to
+calculate the picture are included as comments at the beginning of the output
+file.
+.TP
+-p
+Switches color indices for negative and positive exponents. Generally,
+causes negative exponents to be displayed in more detail while darkening
+and narrowing the color range for positive exponents. This can be toggled
+during runtime by pressing the 'p' key.
+.TP
+-r \fIn\fP
+Specifies the maximum rgb value to be used. Default is 35000.
+.TP
+-s \fIn\fP
+Specifies the length of the color wheel spin.
+.TP
+-u
+Produces a usage message.
+.TP
+-v 
+Prints out the various values to be used and exits.
+.TP
+-w \fIr\fP
+Specifies the real value to be used as the range over which the horizontal
+parameter values vary. The default is 1.0.
+.TP
+-x \fIn\fP
+Specifies the x screen coordinate of the window (default is 256).
+.TP
+-y \fIn\fP
+Specifies the y screen coordinate of the window (default is 256).
+.sp 2
+.SH NOTES
+.sp
+During display, pressing any mouse button allows you to select the area to
+be investigated with the mouse. The upper left hand corner of the desired
+area is the location of the cursor when the button is pressed. The lower
+right hand corner is specified by the cursor when the button is released.
+.sp 2
+Use of the keys 
+\fIbBeEfFkKjJmnrRsSwWxXqQ\fP
+indicates:
+.sp
+.ti 10
+(<) Halve dwell value.
+.ti 10
+(>) Double dwell value.
+.ti 10
+([) Halve settle value.
+.ti 10
+(]) Double settle value.
+.ti 10
+(B or b) Toggle button display on/off
+.ti 10
+(E or e) Recalculate the indices into the color wheel using a different method
+.ti 10
+(F or f) Save current screen to ouput file (not yet implemented)
+.ti 10
+(H or h or ?) Display brief help message
+.ti 10
+(i) Decrement the interval between stripes for the striped color map.
+.ti 10
+(I) Increment the interval between stripes for the striped color map.
+.ti 10
+(K) Decrease value exponents are compared against by 0.05.
+.ti 10
+(J) Increase value exponents are compared against by 0.05.
+.ti 10
+(M) Decrease value exponents are compared against by 0.005.
+.ti 10
+(N) Increase value exponents are compared against by 0.005.
+.ti 10
+(m) Increment the map index, changing the map to be iterated.
+.ti 10
+(P or p) Toggle positive/negative exponent display.
+.ti 10
+(r) Redraw the window using previously calculated exponents.
+.ti 10
+(R) Redraw the window using the newly set dwell and/or settle values.
+.ti 10
+(S) Spin the color wheel
+.ti 10
+(s) Halve the length of the spin and spin the color wheel
+.ti 10
+(u) Go up to the window just prior to the most recent zoom.
+.ti 10
+(U) Go all the way up to the original window.
+.ti 10
+(V or v) Display values of various parameters currently in use
+.ti 10
+(W or w) Use next color map.
+.ti 10
+(X or x) Clear window
+.ti 10
+(Q or q) quit
+.sp 2
+.SH AUTHOR
+.nf
+        Ronald Joe Record
+     The Santa Cruz Operation 
+          P.O. Box 1900
+       Santa Cruz, CA 95061
+            rr@sco.com
+.fi
+.sp 2
+.SH ACKNOWLEDGEMENTS
+.PP
+The algorithm was taken from the September 1991 Scientific American article
+by A. K. Dewdney who gives credit to Mario Markus of the Max Planck Institute
+for its creation. Additional information and ideas were gleaned from the
+discussion on alt.fractals involving Stephen Hall, Ed Kubaitis, Dave Platt
+and Baback Moghaddam. Assistance with colormaps and spinning color wheels
+and X was gleaned from Hiram Clawson. Rubber banding code was adapted from
+an existing Mandelbrot program written by Stacey Campbell.
+
+Viciously hacked for xscreensaver by Jamie Zawinski, 20-Nov-97.
diff --git a/hacks/xscreensaver-sgigl.c b/hacks/xscreensaver-sgigl.c
new file mode 100644 (file)
index 0000000..fd03d1b
--- /dev/null
@@ -0,0 +1,256 @@
+/* xscreensaver, Copyright (c) 1997 Jamie Zawinski <jwz@netscape.com>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation.  No representations are made about the suitability of this
+ * software for any purpose.  It is provided "as is" without express or 
+ * implied warranty.
+ */
+
+/* This is a kludge that lets xscreensaver work with SGI demos that expect
+   to be run from `haven'.  It runs the program given on the command line,
+   then waits for an X window to be created whose name is that of the 
+   program.  Then, it resizes that window to fill the screen.  Run it
+   like this:
+
+       xscreensaver-sgigl /usr/demos/bin/ep -S
+       xscreensaver-sgigl -n ant /usr/demos/General_Demos/ant/RUN
+       xscreensaver-sgigl -n atlantis /usr/demos/General_Demos/atlantis/RUN
+       xscreensaver-sgigl -n /usr/demos/General_Demos/powerflip/powerflip \
+          /usr/demos/General_Demos/powerflip/RUN
+
+   Except that doesn't really work.  You have to do this instead:
+
+       xscreensaver-sgigl -n ant ant.sh
+
+   where ant.sh contains
+
+       #!/bin/sh
+       cd /usr/demos/General_Demos/ant
+       exec ./ant -S
+
+   There's no way to make this work with powerflip at all, since it doesn't
+   take a -S option to run in the foreground.
+ */
+
+/* #### Another way to do this would be:
+   instead of exec'ing the hack, fork it; then wait for that fork to die.
+   If it dies, but the window ID is still valid, then that means the 
+   sub-process has forked itself (as those fuckwits at SGI are wont to do.)
+   In that case, this process should go to sleep, and set up a signal handler
+   that will destroy the X window when it is killed.  That way, the caller
+   is given a foreground pid which, when killed, will cause the hack to die
+   (by a roundabout mechanism.)
+
+   This would all be so much simpler if those assholes would just:
+
+   1: get out of the habit of writing programs that magically background
+      themselves, and
+
+   2: give the fucking programs arguments which control the window size
+      instead of always making 100x100 windows!
+
+   I won't even dream of having a "-root" option that understood virtual-roots;
+   that would just be too outlandish to even dream about.
+ */
+
+static char *progname;
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <signal.h>
+#include <sys/time.h>
+#include <X11/Xlib.h>
+#include <X11/Xmu/Error.h>
+
+#include "vroot.h"
+#undef RootWindowOfScreen
+#undef RootWindow
+#undef DefaultRootWindow
+
+
+static int
+BadWindow_ehandler (Display *dpy, XErrorEvent *error)
+{
+  if (error->error_code == BadWindow ||
+      error->error_code == BadMatch ||
+      error->error_code == BadDrawable)
+    return 0;
+  else
+    {
+      fprintf (stderr, "\nX error in %s:\n", progname);
+      if (XmuPrintDefaultErrorMessage (dpy, error, stderr))
+       exit(1);
+      else
+       fprintf (stderr, " (nonfatal.)\n");
+    }
+  return 0;
+}
+
+
+void
+main(int ac, char **av)
+{
+  char buf [512];
+  pid_t parent, forked;
+  Display *dpy;
+  Screen *screen;
+  char *s;
+  char *n1 = 0;
+  char *n2 = 0;
+  Bool verbose = False;
+  Window root, vroot;
+
+  progname = av[0];
+
+  s = strrchr(progname, '/');
+  if (s) progname = s+1;
+
+  if (ac < 1)
+    {
+      fprintf(stderr,
+             "usage: %s [ -v ] [ -n window-name ] program arguments...\n",
+             progname);
+      exit(1);
+    }
+
+  if (ac > 2 && !strcmp(av[1], "-v"))
+    {
+      verbose = True;
+      av++;
+      ac--;
+    }
+
+  if (ac > 2 && !strcmp(av[1], "-n"))
+    {
+      n2 = av[2];
+      av += 2;
+      ac -= 2;
+    }
+
+  n1 = strrchr(av[1], '/');
+  if (n1) n1++;
+  else n1 = av[1];
+
+
+  dpy = XOpenDisplay(0);
+  if (!dpy)
+    {
+      fprintf(stderr, "%s: couldn't open display\n", progname);
+      exit(1);
+    }
+
+  screen = DefaultScreenOfDisplay(dpy);
+  root   = XRootWindowOfScreen (screen);
+  vroot  = VirtualRootWindowOfScreen (screen);
+
+  XSelectInput (dpy, root, SubstructureNotifyMask);
+  if (root != vroot)
+    XSelectInput (dpy, vroot, SubstructureNotifyMask);
+
+  XSetErrorHandler (BadWindow_ehandler);
+
+  if (verbose)
+    fprintf(stderr, "%s: selected SubstructureNotifyMask on 0x%x / 0x%x\n",
+           progname, root, vroot);
+
+  parent = getpid();
+
+  if (verbose)
+    fprintf(stderr, "%s: pid is %d\n", progname, parent);
+
+  switch ((int) (forked = fork ()))
+    {
+    case -1:
+      {
+       sprintf (buf, "%s: couldn't fork", progname);
+       perror (buf);
+       exit (1);
+       break;
+      }
+    case 0:    /* forked */
+      {
+       time_t start = time((time_t) 0);
+       XEvent event;
+
+       if (verbose)
+         fprintf(stderr, "%s: forked pid is %d\n", progname, getpid());
+
+       while (1)
+         {
+           XNextEvent(dpy, &event);
+
+           if (event.xany.type == CreateNotify)
+             {
+               char *name = 0;
+               Window w = event.xcreatewindow.window;
+               XSync(dpy, False);
+
+               XFetchName(dpy, w, &name);
+               if (!name)
+                 {
+                   /* Try again to see if the name has been set later... */
+                   XSync(dpy, False);
+                   sleep(1);
+                   XFetchName(dpy, w, &name);
+                 }
+
+               if (name &&
+                   ((n1 && !strcmp(name, n1)) ||
+                    (n2 && !strcmp(name, n2))))
+                 {
+                   if (verbose)
+                     fprintf(stderr, "%s: resizing 0x%x\n", progname, w);
+
+                   XMoveResizeWindow(dpy, w, 0, 0,
+                                     WidthOfScreen(screen),
+                                     HeightOfScreen(screen));
+
+#if 0
+                   if (vroot && vroot != root &&
+                       event.xcreatewindow.parent == root)
+                     {
+                       if (verbose)
+                         fprintf(stderr,
+                                 "%s: reparenting 0x%x from 0x%x to 0x%x\n",
+                                 progname, w, root, vroot);
+                       XReparentWindow(dpy, w, vroot, 0, 0);
+                     }
+#endif
+
+                   XSync(dpy, False);
+                   fflush(stdout);
+                   fflush(stderr);
+                   exit(0);    /* Note that this only exits a child fork.  */
+                 }
+             }
+
+           if (start + 5 < time((time_t) 0))
+             {
+               fprintf(stderr,
+                   "%s: timed out: no window named \"%s\" has been created\n",
+                       progname, (n2 ? n2 : n1));
+               fflush(stdout);
+               fflush(stderr);
+               kill(parent, SIGTERM);
+               exit(1);
+             }
+         }
+       break;
+      }
+    default:   /* foreground */
+      {
+       close (ConnectionNumber (dpy));         /* close display fd */
+       execvp (av[1], av+1);                   /* shouldn't return. */
+       sprintf (buf, "%s: execvp(\"%s\") failed", progname, av[1]);
+       perror (buf);
+       fflush(stderr);
+       fflush(stdout);
+       exit (1);
+       break;
+      }
+    }
+}
index 24002f69102488d1ad40de935f69975e08d002d5..881d30f9d7aa366eda67d72b99c0aa00ead0dc24 100644 (file)
--- a/setup.com
+++ b/setup.com
@@ -3,57 +3,68 @@ $ set NOON
 $ set def [.HACKS]
 $ mydisk = f$trnlmn("SYS$DISK")
 $ mydir  = mydisk+f$directory()
-$ attrac*tion :== $'mydir'attraction
-$ blitspin    :== $'mydir'blitspin
-$ bouboule    :== $'mydir'bouboule
-$ braid       :== $'mydir'braid
-$ bubbles     :== $'mydir'bubbles
-$ decays*creen:== $'mydir'decayscreen
-$ deco        :== $'mydir'deco
-$ drift       :== $'mydir'drift
-$ fadeplot    :== $'mydir'fadeplot
-$ flag        :== $'mydir'flag
-$ flame       :== $'mydir'flame
-$ forest      :== $'mydir'forest
-$ fract       :== $'mydir'fract
-$ galaxy      :== $'mydir'galaxy 
-$ goop        :== $'mydir'goop
-$ grav        :== $'mydir'grav
-$ greyne*tic  :== $'mydir'greynetic
-$ halo        :== $'mydir'halo
-$ helix       :== $'mydir'helix
-$ hopalong    :== $'mydir'hopalong
-$ hypercube   :== $'mydir'hypercube
-$ imsmap      :== $'mydir'imsmap
-$ ifs         :== $'mydir'ifs
-$ julia       :== $'mydir'julia
-$ kaleidescope:== $'mydir'kaleidescope
-$ laser       :== $'mydir'laser
-$ lightning   :== $'mydir'lightning
-$ lisa        :== $'mydir'lisa
-$ lmorph      :== $'mydir'lmorph
-$ maze        :== $'mydir'maze
-$ moire       :== $'mydir'moire
-$ munch       :== $'mydir'munch
-$ noseguy     :== $'mydir'noseguy
-$ pedal       :== $'mydir'pedal
-$ penrose     :== $'mydir'penrose
-$ pyro        :== $'mydir'pyro
-$ qix         :== $'mydir'qix
-$ rocks       :== $'mydir'rocks
-$ rorsch*ach  :== $'mydir'rorschach
-$ sierpinski  :== $'mydir'sierpinski
-$ slidescr*een:== $'mydir'slidescreen
-$ slip        :== $'mydir'slip
-$ sphere      :== $'mydir'sphere
-$ spiral      :== $'mydir'spiral
-$ starfish    :== $'mydir'starfish
-$ strange     :== $'mydir'strange
-$ swirl       :== $'mydir'swirl
-$ xroger      :== $'mydir'xroger
+$ ant          :== $'mydir'ant
+$ attraction   :== $'mydir'attraction
+$ blitspin     :== $'mydir'blitspin
+$ bouboule     :== $'mydir'bouboule
+$ braid                :== $'mydir'braid
+$ bubbles      :== $'mydir'bubbles
+$ coral                :== $'mydir'coral
+$ decayscreen  :== $'mydir'decayscreen
+$ deco         :== $'mydir'deco
+$ drift                :== $'mydir'drift
+$ fadeplot     :== $'mydir'fadeplot
+$ flag         :== $'mydir'flag
+$ flame                :== $'mydir'flame
+$ forest       :== $'mydir'forest
+$ galaxy       :== $'mydir'galaxy
+$ goop         :== $'mydir'goop
+$ grav         :== $'mydir'grav
+$ greynetic    :== $'mydir'greynetic
+$ halo         :== $'mydir'halo
+$ helix                :== $'mydir'helix
+$ hopalong     :== $'mydir'hopalong
+$ hypercube    :== $'mydir'hypercube
+$ ifs          :== $'mydir'ifs
+$ imsmap       :== $'mydir'imsmap
+$ julia                :== $'mydir'julia
+$ kaleidescope :== $'mydir'kaleidescope
+$ laser                :== $'mydir'laser
+$ lightning    :== $'mydir'lightning
+$ lisa         :== $'mydir'lisa
+$ lissie       :== $'mydir'lissie
+$ lmorph       :== $'mydir'lmorph
+$ maze         :== $'mydir'maze
+$ moire                :== $'mydir'moire
+$ mountain     :== $'mydir'mountain
+$ munch                :== $'mydir'munch
+$ noseguy      :== $'mydir'noseguy
+$ pedal                :== $'mydir'pedal
+$ penrose      :== $'mydir'penrose
+$ puzzle       :== $'mydir'puzzle
+$ pyro         :== $'mydir'pyro
+$ qix          :== $'mydir'qix
+$ rd-bomb      :== $'mydir'rd-bomb
+$ rocks                :== $'mydir'rocks
+$ rorschach    :== $'mydir'rorschach
+$ rotor                :== $'mydir'rotor
+$ sierpinski   :== $'mydir'sierpinski
+$ slidescreen  :== $'mydir'slidescreen
+$ slip         :== $'mydir'slip
+$ sphere       :== $'mydir'sphere
+$ spiral       :== $'mydir'spiral
+$ starfish     :== $'mydir'starfish
+$ strange      :== $'mydir'strange
+$ swirl                :== $'mydir'swirl
+$ triangle     :== $'mydir'triangle
+$ vines                :== $'mydir'vines
+$ worm         :== $'mydir'worm
+$ xjack                :== $'mydir'xjack
+$ xlyap                :== $'mydir'xlyap
+$ xroger       :== $'mydir'xroger
 $ set def [-.DRIVER]
 $ mydir  = mydisk+f$directory()
 $ xscreensaver :== $'mydir'xscreensaver
 $ xscreen*command :== $'mydir'xscreensaver-command
 $ set def [-]
-$ exit 
+$ exit
index 8931dc568722220b3148812b633b032c0944df61..6828083c3932b04a5639275948b5acdaa86e7566 100644 (file)
@@ -25,13 +25,13 @@ INCLUDES    = -I$(srcdir) -I$(srcdir)/.. @INCLUDES@
 
 SRCS           = alpha.c colors.c fade.c grabscreen.c hsv.c overlay.c \
                  resources.c spline.c usleep.c visual.c xmu.c xroger.c \
-                 yarandom.c erase.c
+                 yarandom.c erase.c sgivideo.c
 OBJS           = alpha.o colors.o fade.o grabscreen.o hsv.o overlay.o \
                  resources.o spline.o usleep.o visual.o xmu.o xroger.o \
-                 yarandom.o erase.o
+                 yarandom.o erase.o sgivideo.o
 HDRS           = alpha.h colors.h fade.h grabscreen.h hsv.h resources.h \
                  spline.h usleep.h utils.h version.h visual.h vroot.h xmu.h \
-                 yarandom.h erase.h
+                 yarandom.h erase.h sgivideo.h
 EXTRAS         = README Makefile.in ad2c
 VMSFILES       = compile_axp.com compile_decc.com vms-gtod.c vms-gtod.h \
                  vms-strdup.c
@@ -69,7 +69,7 @@ depend:
 # close.  This excludes dependencies on files in /usr/include, etc.  It tries
 # to include only dependencies on files which are themselves a part of this
 # package.
-distdepend:
+distdepend::
        @echo updating dependencies in `pwd`/Makefile.in... ;               \
        $(DEPEND) -w 0 -f -                                                 \
        -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
@@ -97,6 +97,30 @@ echo_tarfiles:
        $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $<
 
 
+# Rules for generating the VMS makefiles on Unix, so that it doesn't have to
+# be done by hand...
+#
+VMS_AXP_COMPILE=$$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-])
+
+compile_axp.com: Makefile.in
+       @echo generating $@ from $<...  ;                                   \
+       ( ( for c in $(SRCS) vms-*.c ; do                                   \
+             c=`echo $$c | tr a-z A-Z` ;                                   \
+             echo "$(VMS_AXP_COMPILE) $$c" ;                               \
+            done ;                                                         \
+         ) | sort ;                                                        \
+          echo '$$ lib/cre utils.olb_axp' ;                                \
+         echo '$$ lib utils.olb_axp *.obj' ;                               \
+         echo '$$! delete/noconf *.obj;' ;                                 \
+        ) > $@
+
+compile_decc.com: compile_axp.com
+       @echo generating $@ from $<...  ;                                   \
+       sed 's/axp/decc/g' < $< > $@
+
+distdepend:: compile_axp.com compile_decc.com
+
+
 ##############################################################################
 #
 # DO NOT DELETE: updated by make distdepend
@@ -120,11 +144,14 @@ fade.o: $(srcdir)/usleep.h
 fade.o: $(srcdir)/fade.h
 grabscreen.o: $(srcdir)/utils.h
 grabscreen.o: $(srcdir)/../config.h
+grabscreen.o: $(srcdir)/yarandom.h
 grabscreen.o: $(srcdir)/usleep.h
 grabscreen.o: $(srcdir)/colors.h
 grabscreen.o: $(srcdir)/grabscreen.h
-grabscreen.o: $(srcdir)/vroot.h
+grabscreen.o: $(srcdir)/sgivideo.h
 grabscreen.o: $(srcdir)/visual.h
+grabscreen.o: $(srcdir)/resources.h
+grabscreen.o: $(srcdir)/vroot.h
 hsv.o: $(srcdir)/utils.h
 hsv.o: $(srcdir)/../config.h
 hsv.o: $(srcdir)/hsv.h
@@ -151,4 +178,10 @@ erase.o: $(srcdir)/utils.h
 erase.o: $(srcdir)/../config.h
 erase.o: $(srcdir)/yarandom.h
 erase.o: $(srcdir)/usleep.h
+erase.o: $(srcdir)/resources.h
+sgivideo.o: $(srcdir)/utils.h
+sgivideo.o: $(srcdir)/../config.h
+sgivideo.o: $(srcdir)/sgivideo.h
+sgivideo.o: $(srcdir)/resources.h
+sgivideo.o: $(srcdir)/usleep.h
 
index 86b134426b44306620951295d3b629e5f2913b4e..096311624e207601682f6542056870d1171b86bb 100644 (file)
@@ -50,7 +50,7 @@ allocate_writable_colors (Display *dpy, Colormap cmap,
   while (got < desired
         && requested > 0)
     {
-      if (desired - got > requested)
+      if (desired - got < requested)
        requested = desired - got;
 
       if (XAllocColorCells (dpy, cmap, False, 0, 0, new_pixels, requested))
@@ -494,7 +494,7 @@ make_smooth_colormap (Display *dpy, Visual *visual, Colormap cmap,
          if (dh < 0) dh = -dh;
          if (dh > 0.5) dh = 0.5 - (dh - 0.5);
          distance = sqrt ((dh * dh) +
-                          ((s[j] - s[i]) * (s[j] - v[i])) +
+                          ((s[j] - s[i]) * (s[j] - s[i])) +
                           ((v[j] - v[i]) * (v[j] - v[i])));
          if (distance < 0.2)
            goto REPICK_THIS_COLOR;
index ca2f68078a1552c54148e5b61f2ad2d12547bd25..d22243d822c95fb0c5b556581bc0098194d223d1 100644 (file)
@@ -1,17 +1,20 @@
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCLUDE=([],[-]) ALPHA.C
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCLUDE=([],[-]) COLORS.C
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCLUDE=([],[-]) FADE.C
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCLUDE=([],[-]) GRABSCREEN.C
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCLUDE=([],[-]) HSV.C
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCLUDE=([],[-]) OVERLAY.C
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCLUDE=([],[-]) RESOURCES.C
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCLUDE=([],[-]) SPLINE.C
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCLUDE=([],[-]) USLEEP.C
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCLUDE=([],[-]) VISUAL.C
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCLUDE=([],[-]) XROGER.C
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCLUDE=([],[-]) YARANDOM.C
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCLUDE=([],[-]) VMS-STRDUP.C
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCLUDE=([],[-]) VMS-GTOD.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) ALPHA.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) COLORS.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) ERASE.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) FADE.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) GRABSCREEN.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) HSV.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) OVERLAY.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) RESOURCES.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) SGIVIDEO.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) SPLINE.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) USLEEP.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) VISUAL.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) VMS-GTOD.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) VMS-STRDUP.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) XMU.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) XROGER.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) YARANDOM.C
 $ lib/cre utils.olb_axp
 $ lib utils.olb_axp *.obj
 $! delete/noconf *.obj;
index 5e4fe9f6c406d7cfb99f2effefd8724763865ab9..cd1792e6e7437b3daff17ee10932d07cfacb3232 100644 (file)
@@ -1,17 +1,20 @@
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCLUDE=([],[-]) ALPHA.C
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCLUDE=([],[-]) COLORS.C
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCLUDE=([],[-]) FADE.C
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCLUDE=([],[-]) GRABSCREEN.C
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCLUDE=([],[-]) HSV.C
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCLUDE=([],[-]) OVERLAY.C
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCLUDE=([],[-]) RESOURCES.C
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCLUDE=([],[-]) SPLINE.C
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCLUDE=([],[-]) USLEEP.C
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCLUDE=([],[-]) VISUAL.C
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCLUDE=([],[-]) XROGER.C
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCLUDE=([],[-]) YARANDOM.C
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCLUDE=([],[-]) VMS-STRDUP.C
-$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCLUDE=([],[-]) VMS-GTOD.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) ALPHA.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) COLORS.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) ERASE.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) FADE.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) GRABSCREEN.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) HSV.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) OVERLAY.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) RESOURCES.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) SGIVIDEO.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) SPLINE.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) USLEEP.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) VISUAL.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) VMS-GTOD.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) VMS-STRDUP.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) XMU.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) XROGER.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) YARANDOM.C
 $ lib/cre utils.olb_decc
 $ lib utils.olb_decc *.obj
 $! delete/noconf *.obj;
index f30f97168979e3675162a6b49e404e3819b88633..72f5a87a469b3d6129dadb55ed0ac47cd5b477ce 100644 (file)
@@ -8,8 +8,9 @@
 #include "utils.h"
 #include "yarandom.h"
 #include "usleep.h"
+#include "resources.h"
 
-#define NUM_MODES 6
+#define NUM_MODES 8
 
 void
 erase_window(Display *dpy, Window window, GC gc,
@@ -30,7 +31,7 @@ erase_window(Display *dpy, Window window, GC gc,
       granularity = 25;
       switch(mode)
        {
-       case 0:
+       case 0:                         /* clear random horizontal lines */
          for(i = 0; i < height; i++)
            clear_lines[i] = i;
          for(i = 0; i < height; i++)
@@ -43,7 +44,8 @@ erase_window(Display *dpy, Window window, GC gc,
            }
          num_lines = height;
          break;
-       case 1:
+
+       case 1:                         /* clear random vertical lines */
          for(i = 0; i < width; i++)
            clear_lines[i] = i+height;
          for(i = 0; i < width; i++)
@@ -56,7 +58,9 @@ erase_window(Display *dpy, Window window, GC gc,
            }
          num_lines = width;
          break;
-       case 2:
+
+       case 2:                                 /* 4 sequential wipes,
+                                                  L-R, T-B, R-L, B-T. */
          for(i = 0; i < width/2; i++)
            clear_lines[i] = i*2+height;
          for(i = 0; i < height/2; i++)
@@ -66,7 +70,9 @@ erase_window(Display *dpy, Window window, GC gc,
          num_lines = width+height/2;
          granularity = 4;
          break;
-       case 3:
+
+       case 3:                                 /* 4 parallel wipes,
+                                                  L-R, T-B, R-L, B-T. */
          for(i = 0; i < max_num/4; i++)
            {
              clear_lines[i*4] = i*2;
@@ -77,7 +83,8 @@ erase_window(Display *dpy, Window window, GC gc,
          num_lines = max_num;
          granularity = 4;
          break;
-       case 4:
+
+       case 4:                                 /* flutter wipe L-R */
          j = 0;
          for(i = 0; i < width*2; i++)
            {
@@ -91,7 +98,8 @@ erase_window(Display *dpy, Window window, GC gc,
          num_lines = width;
          granularity = 4;
          break;
-       case 5:
+
+       case 5:                                 /* flutter wipe R-L */
          j = 0;
          for(i = width*2; i >= 0; i--)
            {
@@ -105,7 +113,61 @@ erase_window(Display *dpy, Window window, GC gc,
          num_lines = width;
          granularity = 4;
          break;
+
+       case 6:                                 /* circle wipe */
+         {
+           int full = 360 * 64;
+           int inc = full / 64;
+           int start = random() % full;
+           int rad = (width > height ? width : height);
+           if (random() & 1)
+             inc = -inc;
+           for (i = (inc > 0 ? 0 : full);
+                (inc > 0 ? i < full : i > 0);
+                i += inc) {
+             XFillArc(dpy, window, gc,
+                      (width/2)-rad, (height/2)-rad, rad*2, rad*2,
+                      (i+start) % full, inc);
+             XFlush (dpy);
+             usleep (delay*granularity);
+           }
+         num_lines = 0;
+         }
+         break;
+
+       case 7:                                 /* three-circle wipe */
+         {
+           int full = 360 * 64;
+           int q = full / 3;
+           int inc = full / 180;
+           int start = random() % q;
+           int rad = (width > height ? width : height);
+           if (random() & 1)
+             inc = -inc;
+           for (i = (inc > 0 ? 0 : q);
+                (inc > 0 ? i < q : i > 0);
+                i += inc) {
+             XFillArc(dpy, window, gc,
+                      (width/2)-rad, (height/2)-rad, rad*2, rad*2,
+                      (i+start) % full, inc);
+             XFillArc(dpy, window, gc,
+                      (width/2)-rad, (height/2)-rad, rad*2, rad*2,
+                      (i+start+q) % full, inc);
+             XFillArc(dpy, window, gc,
+                      (width/2)-rad, (height/2)-rad, rad*2, rad*2,
+                      (i+start+q+q) % full, inc);
+             XFlush (dpy);
+             usleep (delay*granularity);
+           }
+         num_lines = 0;
+         }
+         break;
+
+       default:
+         abort();
+         break;
        }
+
       for (i = 0; i < num_lines; i++)
        { 
          if(clear_lines[i] < height)
@@ -125,4 +187,27 @@ erase_window(Display *dpy, Window window, GC gc,
     }
 
   XClearWindow (dpy, window);
+  XSync(dpy, False);
+}
+
+
+void
+erase_full_window(Display *dpy, Window window)
+{
+  XWindowAttributes xgwa;
+  XGCValues gcv;
+  GC erase_gc;
+  XColor black;
+  int erase_speed = get_integer_resource("eraseSpeed", "Integer");
+  int erase_mode = get_integer_resource("eraseMode", "Integer");
+  XGetWindowAttributes (dpy, window, &xgwa);
+  black.flags = DoRed|DoGreen|DoBlue;
+  black.red = black.green = black.blue = 0;
+  XAllocColor(dpy, xgwa.colormap, &black);
+  gcv.foreground = black.pixel;
+  erase_gc = XCreateGC (dpy, window, GCForeground, &gcv);
+  erase_window (dpy, window, erase_gc, xgwa.width, xgwa.height,
+               erase_mode, erase_speed);
+  XFreeColors(dpy, xgwa.colormap, &black.pixel, 1, 0);
+  XFreeGC(dpy, erase_gc);
 }
index 44f8dbcce87257fd9591eab119d30fd40251fe56..2f00d3e1ae3caf6aa8f4a49c459da550cffd7070 100644 (file)
@@ -10,5 +10,6 @@
 
 extern void erase_window(Display *dpy, Window window, GC gc,
                         int width, int height, int mode, int delay);
+extern void erase_full_window(Display *dpy, Window window);
 
 #endif /* __XSCREENSAVER_ERASE_H__ */
index e174dfbf148318bb4aeb43d6e43eeb13f7643691..eed532218ba77151667111a63d724ce4a6ace5c6 100644 (file)
@@ -72,17 +72,56 @@ blacken_colormap (Screen *screen, Colormap cmap)
 }
 
 
+
+static void fade_screens_1 (Display *dpy, Colormap *cmaps,
+                           Window *black_windows, int seconds, int ticks,
+                           Bool out_p, Bool clear_windows);
+#ifdef HAVE_SGI_VC_EXTENSION
+static int sgi_gamma_fade (Display *dpy,
+                          Window *black_windows, int seconds, int ticks,
+                          Bool out_p, Bool clear_windows);
+#endif /* HAVE_SGI_VC_EXTENSION */
+
+
+
+void
+fade_screens (Display *dpy, Colormap *cmaps, Window *black_windows,
+             int seconds, int ticks,
+             Bool out_p, Bool clear_windows)
+{
+#ifdef HAVE_SGI_VC_EXTENSION
+  /* First try to do it by fading the gamma in an SGI-specific way... */
+  if (0 != sgi_gamma_fade(dpy, black_windows, seconds, ticks, out_p,
+                         clear_windows))
+#endif /* HAVE_SGI_VC_EXTENSION */
+    /* Else, do it the old-fashioned way, which (somewhat) loses if
+       there are TrueColor windows visible. */
+    fade_screens_1 (dpy, cmaps, black_windows, seconds, ticks,
+                   out_p, clear_windows);
+}
+
+
 /* The business with `cmaps_per_screen' is to fake out the SGI 8-bit video
    hardware, which is capable of installing multiple (4) colormaps
    simultaniously.  We have to install multiple copies of the same set of
    colors in order to fill up all the available slots in the hardware color
    lookup table, so we install an extra N colormaps per screen to make sure
-   that all screens really go black.  */
+   that all screens really go black.
 
-void
-fade_screens (Display *dpy, Colormap *cmaps,
-             int seconds, int ticks,
-             Bool out_p)
+   I'm told that this trick also works with XInside's AcceleratedX when using
+   the Matrox Millenium card (which also allows multiple PseudoColor and
+   TrueColor visuals to co-exist and display properly at the same time.)  
+
+   This trick works ok on the 24-bit Indy video hardware, but doesn't work at
+   all on the O2 24-bit hardware.  I guess the higher-end hardware is too
+   "good" for this to work (dammit.)  So... I figured out the "right" way to
+   do this on SGIs, which is to ramp the monitor's gamma down to 0.  That's
+   what is implemented in sgi_gamma_fade(), so we use that if we can.
+ */
+static void
+fade_screens_1 (Display *dpy, Colormap *cmaps, Window *black_windows,
+               int seconds, int ticks,
+               Bool out_p, Bool clear_windows)
 {
   int i, j, k;
   int steps = seconds * ticks;
@@ -91,7 +130,7 @@ fade_screens (Display *dpy, Colormap *cmaps,
   int cmaps_per_screen = 5;
   int nscreens = ScreenCount(dpy);
   int ncmaps = nscreens * cmaps_per_screen;
-  static Colormap *fade_cmaps = 0;
+  Colormap *fade_cmaps = 0;
   Bool installed = False;
   int total_ncolors;
   XColor *orig_colors, *current_colors, *screen_colors, *orig_screen_colors;
@@ -187,7 +226,7 @@ fade_screens (Display *dpy, Colormap *cmaps,
          screen_colors += ncolors;
        }
 
-      /* Put the maps on the screens...
+      /* Put the maps on the screens, and then take the windows off the screen.
         (only need to do this the first time through the loop.)
        */
       if (!installed)
@@ -196,6 +235,14 @@ fade_screens (Display *dpy, Colormap *cmaps,
            if (fade_cmaps[j])
              XInstallColormap (dpy, fade_cmaps[j]);
          installed = True;
+
+         if (black_windows && !out_p)
+           for (j = 0; j < nscreens; j++)
+             if (black_windows[j])
+               {
+                 XUnmapWindow (dpy, black_windows[j]);
+                 XClearWindow (dpy, black_windows[j]);
+               }
        }
 
       XSync (dpy, False);
@@ -240,33 +287,255 @@ fade_screens (Display *dpy, Colormap *cmaps,
   if (orig_colors)    free (orig_colors);
   if (current_colors) free (current_colors);
 
-  /* Now put the original maps back, if we want to end up with them.
+  /* If we've been given windows to raise after blackout, raise them before
+     releasing the colormaps.
    */
-  if (!out_p)
+  if (out_p && black_windows)
+    for (i = 0; i < nscreens; i++)
+      {
+       if (clear_windows)
+         XClearWindow (dpy, black_windows[i]);
+       XMapRaised (dpy, black_windows[i]);
+      }
+
+
+  /* Now put the target maps back.
+     If we're fading out, use the given cmap (or the default cmap, if none.)
+     If we're fading in, always use the default cmap.
+   */
+  for (i = 0; i < nscreens; i++)
     {
-      for (i = 0; i < nscreens; i++)
+      Colormap cmap = (cmaps ? cmaps[i] : 0);
+      if (!cmap || !out_p)
+       cmap = DefaultColormap(dpy, i);
+      XInstallColormap (dpy, cmap);
+    }
+
+  /* The fade (in or out) is complete, so we don't need the black maps on
+     stage any more.
+   */
+  for (i = 0; i < ncmaps; i++)
+    if (fade_cmaps[i])
+      {
+       XUninstallColormap(dpy, fade_cmaps[i]);
+       XFreeColormap(dpy, fade_cmaps[i]);
+       fade_cmaps[i] = 0;
+      }
+  free(fade_cmaps);
+  fade_cmaps = 0;
+}
+
+
+#ifdef HAVE_SGI_VC_EXTENSION
+
+# include <X11/extensions/XSGIvc.h>
+
+struct screen_gamma_info {
+  int gamma_map;  /* ??? always using 0 */
+  int nred, ngreen, nblue;
+  unsigned short *red1, *green1, *blue1;
+  unsigned short *red2, *green2, *blue2;
+  int gamma_size;
+  int gamma_precision;
+  Bool alpha_p;
+};
+
+
+static void whack_gamma(Display *dpy, int screen,
+                       struct screen_gamma_info *info, float ratio);
+
+static int
+sgi_gamma_fade (Display *dpy,
+               Window *black_windows, int seconds, int ticks,
+               Bool out_p, Bool clear_windows)
+{
+  int steps = seconds * ticks;
+  long usecs_per_step = (long)(seconds * 1000000) / (long)steps;
+  XEvent dummy_event;
+  int nscreens = ScreenCount(dpy);
+  struct timeval then, now;
+#ifdef GETTIMEOFDAY_TWO_ARGS
+  struct timezone tzp;
+#endif
+  int i, screen;
+  int status = -1;
+  struct screen_gamma_info *info = (struct screen_gamma_info *)
+    calloc(nscreens, sizeof(*info));
+
+  /* Get the current gamma maps for all screens.
+     Bug out and return -1 if we can't get them for some screen.
+   */
+  for (screen = 0; screen < nscreens; screen++)
+    {
+      if (!XSGIvcQueryGammaMap(dpy, screen, info[screen].gamma_map,
+                              &info[screen].gamma_size,
+                              &info[screen].gamma_precision,
+                              &info[screen].alpha_p))
+       goto FAIL;
+
+      if (!XSGIvcQueryGammaColors(dpy, screen, info[screen].gamma_map,
+                                 XSGIVC_COMPONENT_RED,
+                                 &info[screen].nred, &info[screen].red1))
+       goto FAIL;
+      if (! XSGIvcQueryGammaColors(dpy, screen, info[screen].gamma_map,
+                                  XSGIVC_COMPONENT_GREEN,
+                                  &info[screen].ngreen, &info[screen].green1))
+       goto FAIL;
+      if (!XSGIvcQueryGammaColors(dpy, screen, info[screen].gamma_map,
+                                 XSGIVC_COMPONENT_BLUE,
+                                 &info[screen].nblue, &info[screen].blue1))
+       goto FAIL;
+
+      if (info[screen].gamma_precision == 8)    /* Scale it up to 16 bits. */
        {
-         Colormap cmap = (cmaps ? cmaps[i] : 0);
-         if (!cmap) cmap = DefaultColormap(dpy, i);
-         XInstallColormap (dpy, cmap);
+         int j;
+         for(j = 0; j < info[screen].nred; j++)
+           info[screen].red1[j]   =
+             ((info[screen].red1[j]   << 8) | info[screen].red1[j]);
+         for(j = 0; j < info[screen].ngreen; j++)
+           info[screen].green1[j] =
+             ((info[screen].green1[j] << 8) | info[screen].green1[j]);
+         for(j = 0; j < info[screen].nblue; j++)
+           info[screen].blue1[j]  =
+             ((info[screen].blue1[j]  << 8) | info[screen].blue1[j]);
        }
 
-      /* We've faded to the default cmaps, so we don't need the black maps
-        on stage any more.  (We can't uninstall these maps yet if we've
-        faded to black, because that would lead to flicker between when
-        we uninstalled them and when the caller raised its black window.)
-       */
-      for (i = 0; i < ncmaps; i++)
-       if (fade_cmaps[i])
+      info[screen].red2   = (unsigned short *)
+       malloc(sizeof(*info[screen].red2)   * (info[screen].nred+1));
+      info[screen].green2 = (unsigned short *)
+       malloc(sizeof(*info[screen].green2) * (info[screen].ngreen+1));
+      info[screen].blue2  = (unsigned short *)
+       malloc(sizeof(*info[screen].blue2)  * (info[screen].nblue+1));
+    }
+
+#ifdef GETTIMEOFDAY_TWO_ARGS
+  gettimeofday(&then, &tzp);
+#else
+  gettimeofday(&then);
+#endif
+
+  /* If we're fading in (from black), then first crank the gamma all the
+     way down to 0, then take the windows off the screen.
+   */
+  if (!out_p)
+    for (screen = 0; screen < nscreens; screen++)
+      {
+       whack_gamma(dpy, screen, &info[screen], 0.0);
+       if (black_windows && black_windows[screen])
+         {
+           XUnmapWindow (dpy, black_windows[screen]);
+           XClearWindow (dpy, black_windows[screen]);
+         }
+      }
+
+
+  /* Iterate by steps of the animation... */
+  for (i = (out_p ? steps : 0);
+       (out_p ? i > 0 : i < steps);
+       (out_p ? i-- : i++))
+    {
+      for (screen = 0; screen < nscreens; screen++)
+       {
+         whack_gamma(dpy, screen, &info[screen],
+                     (((float)i) / ((float)steps)));
+
+         /* If there is user activity, bug out.  (Bug out on keypresses or
+            mouse presses, but not motion, and not release events.  Bugging
+            out on motion made the unfade hack be totally useless, I think.)
+
+            We put the event back so that the calling code can notice it too.
+            It would be better to not remove it at all, but that's harder
+            because Xlib has such a non-design for this kind of crap, and
+            in this application it doesn't matter if the events end up out
+            of order, so in the grand unix tradition we say "fuck it" and
+            do something that mostly works for the time being.
+          */
+         if (XCheckMaskEvent (dpy, (KeyPressMask|ButtonPressMask),
+                              &dummy_event))
+           {
+             XPutBackEvent (dpy, &dummy_event);
+             goto DONE;
+           }
+
+#ifdef GETTIMEOFDAY_TWO_ARGS
+         gettimeofday(&now, &tzp);
+#else
+         gettimeofday(&now);
+#endif
+
+         /* If we haven't already used up our alotted time, sleep to avoid
+            changing the colormap too fast. */
          {
-           XFreeColormap(dpy, fade_cmaps[i]);
-           fade_cmaps[i] = 0;
+           long diff = (((now.tv_sec - then.tv_sec) * 1000000) +
+                        now.tv_usec - then.tv_usec);
+           then.tv_sec = now.tv_sec;
+           then.tv_usec = now.tv_usec;
+           if (usecs_per_step > diff)
+             usleep (usecs_per_step - diff);
          }
-      free(fade_cmaps);
-      fade_cmaps = 0;
+       }
     }
+  
+
+ DONE:
+
+  if (out_p && black_windows)
+    {
+      for (screen = 0; screen < nscreens; screen++)
+       {
+         if (clear_windows)
+           XClearWindow (dpy, black_windows[i]);
+         XMapRaised (dpy, black_windows[i]);
+       }
+      XSync(dpy, False);
+    }
+
+  for (screen = 0; screen < nscreens; screen++)
+    whack_gamma(dpy, screen, &info[screen], 1.0);
+  XSync(dpy, False);
+
+  status = 0;
+
+ FAIL:
+  for (screen = 0; screen < nscreens; screen++)
+    {
+      if (info[screen].red1)   free (info[screen].red1);
+      if (info[screen].green1) free (info[screen].green1);
+      if (info[screen].blue1)  free (info[screen].blue1);
+      if (info[screen].red2)   free (info[screen].red2);
+      if (info[screen].green2) free (info[screen].green2);
+      if (info[screen].blue2)  free (info[screen].blue2);
+    }
+  free(info);
+  return status;
+}
+
+static void
+whack_gamma(Display *dpy, int screen, struct screen_gamma_info *info,
+           float ratio)
+{
+  int k;
+  if (ratio < 0) ratio = 0;
+  if (ratio > 1) ratio = 1;
+  for (k = 0; k < info->gamma_size; k++)
+    {
+      info->red2[k]   = info->red1[k]   * ratio;
+      info->green2[k] = info->green1[k] * ratio;
+      info->blue2[k]  = info->blue1[k]  * ratio;
+    }
+  XSGIvcStoreGammaColors16(dpy, screen, info->gamma_map, info->nred,
+                          XSGIVC_MComponentRed, info->red2);
+  XSGIvcStoreGammaColors16(dpy, screen, info->gamma_map, info->ngreen,
+                          XSGIVC_MComponentGreen, info->green2);
+  XSGIvcStoreGammaColors16(dpy, screen, info->gamma_map, info->nblue,
+                          XSGIVC_MComponentBlue, info->blue2);
+  XSync(dpy, False);
 }
 
+#endif /* HAVE_SGI_VC_EXTENSION */
+
+
+
 \f
 #if 0
 #include "screenhack.h"
index 4c2a32f4918368861b67dc3b9ce474a740a913ac..5fd8c1879029314468a259f50a6d8b73c8dd8b47 100644 (file)
@@ -14,6 +14,8 @@
 
 extern Colormap copy_colormap (Screen *, Visual *, Colormap from, Colormap to);
 extern void blacken_colormap (Screen *, Colormap cmap);
-extern void fade_screens (Display *dpy, Colormap *cmaps,
-                         int seconds, int ticks, Bool out_p);
+extern void fade_screens (Display *dpy,
+                         Colormap *cmaps, Window *black_windows,
+                         int seconds, int ticks,
+                         Bool out_p, Bool clear_windows);
 #endif /* __FADE_H__ */
index 1dba4328d509e4b7a4539d8b037381028b480ae2..edc6acb30819ab8be7a5a38582f2de1f1a005c67 100644 (file)
@@ -18,6 +18,7 @@
  */
 
 #include "utils.h"
+#include "yarandom.h"
 
 #include <X11/Xatom.h>
 #include <X11/Xutil.h>
@@ -33,6 +34,9 @@
 #include "usleep.h"
 #include "colors.h"
 #include "grabscreen.h"
+#include "sgivideo.h"
+#include "visual.h"
+#include "resources.h"
 
 #include "vroot.h"
 #undef RootWindowOfScreen
@@ -41,7 +45,6 @@
 
 
 #ifdef HAVE_READ_DISPLAY_EXTENSION
-# include "visual.h"
 # include <X11/extensions/readdisplay.h>
   static Bool read_display (Screen *, Window, Pixmap, Bool);
 #endif /* HAVE_READ_DISPLAY_EXTENSION */
 
 static void copy_default_colormap_contents (Screen *, Colormap, Visual *);
 
+#if defined(HAVE_READ_DISPLAY_EXTENSION) || defined(HAVE_SGI_VIDEO)
+static void make_cubic_colormap (Screen *, Window, Visual *);
+#endif
+
 
 static Bool
 MapNotify_event_p (Display *dpy, XEvent *event, XPointer window)
@@ -131,6 +138,25 @@ BadWindow_ehandler (Display *dpy, XErrorEvent *error)
 }
 
 
+/* XCopyArea seems not to work right on SGI O2s if you draw in SubwindowMode
+   on a window whose depth is not the maximal depth of the screen?  Or
+   something.  Anyway, things don't work unless we: use SubwindowMode for
+   the real root window (or a legitimate virtual root window); but do not
+   use SubwindowMode for the xscreensaver window.  I make no attempt to
+   explain.
+ */
+Bool
+use_subwindow_mode_p(Screen *screen, Window window)
+{
+  if (window != VirtualRootWindowOfScreen(screen))
+    return False;
+  else if (xscreensaver_window_p(DisplayOfScreen(screen), window))
+    return False;
+  else
+    return True;
+}
+
+
 /* Install the colormaps of all visible windows, deepest first.
    This should leave the colormaps of the topmost windows installed
    (if only N colormaps can be installed at a time, then only the
@@ -174,8 +200,8 @@ install_screen_colormaps (Screen *screen)
 }
 
 
-void
-grab_screen_image (Screen *screen, Window window)
+static void
+grab_screen_image_1 (Screen *screen, Window window)
 {
   Display *dpy = DisplayOfScreen (screen);
   XWindowAttributes xgwa;
@@ -196,10 +222,18 @@ grab_screen_image (Screen *screen, Window window)
 
   if (!root_p)
     {
+      double unmap = 0;
       if (saver_p)
-       unmap_time = 2500000;  /* 2 1/2 seconds */
+       {
+         unmap = get_float_resource("grabRootDelay", "Seconds");
+         if (unmap <= 0.00001 || unmap > 20) unmap = 2.5;
+       }
       else
-       unmap_time =  660000;  /* 2/3rd second */
+       {
+         unmap = get_float_resource("grabWindowDelay", "Seconds");
+         if (unmap <= 0.00001 || unmap > 20) unmap = 0.66;
+       }
+      unmap_time = unmap * 100000;
     }
 
 #ifdef DEBUG
@@ -293,6 +327,42 @@ grab_screen_image (Screen *screen, Window window)
   XSync (dpy, True);
 }
 
+void
+grab_screen_image (Screen *screen, Window window)
+{
+#ifdef HAVE_SGI_VIDEO
+  char c, *s = get_string_resource("grabVideoProbability", "Float");
+  double prob = -1;
+  if (!s ||
+      (1 != sscanf (s, " %lf %c", &prob, &c)) ||
+      prob < 0 ||
+      prob > 1)
+    prob = 0.5;
+
+  if ((random() % 100) < ((int) (100 * prob)))
+    {
+      XWindowAttributes xgwa;
+      Display *dpy = DisplayOfScreen (screen);
+      XGetWindowAttributes (dpy, window, &xgwa);
+# ifdef DEBUG
+      fprintf(stderr, "%s: trying to grab from video...\n", progname);
+# endif /* DEBUG */
+      if (grab_video_frame (screen, xgwa.visual, window))
+       {
+         if (xgwa.depth < 24)
+           {
+             int class = visual_class (screen, xgwa.visual);
+             if (class == PseudoColor || class == DirectColor)
+               make_cubic_colormap (screen, window, xgwa.visual);
+           }
+         return;
+       }
+    }
+#endif /* HAVE_SGI_VIDEO */
+
+  grab_screen_image_1 (screen, window);
+}
+
 
 /* When we are grabbing and manipulating a screen image, it's important that
    we use the same colormap it originally had.  So, if the screensaver was
@@ -345,7 +415,35 @@ copy_default_colormap_contents (Screen *screen,
 
   got_cells = max_cells;
   allocate_writable_colors (dpy, to_cmap, pixels, &got_cells);
-  XStoreColors (dpy, to_cmap, old_colors, got_cells);
+
+#ifdef DEBUG
+  if (got_cells != max_cells)
+    fprintf(stderr, "%s: got only %d of %d cells\n", progname,
+           got_cells, max_cells);
+#endif /* DEBUG */
+
+  if (got_cells <= 0)                                   /* we're screwed */
+    ;
+  else if (got_cells == max_cells &&                    /* we're golden */
+          from_cells == to_cells)
+    XStoreColors (dpy, to_cmap, old_colors, got_cells);
+  else                                                  /* try to cope... */
+    {
+      for (i = 0; i < got_cells; i++)
+       {
+         XColor *c = old_colors + i;
+         int j;
+         for (j = 0; j < got_cells; j++)
+           if (pixels[j] == c->pixel)
+             {
+               /* only store this color value if this is one of the pixels
+                  we were able to allocate. */
+               XStoreColors (dpy, to_cmap, c, 1);
+               break;
+             }
+       }
+    }
+
 
 #ifdef DEBUG
   fprintf(stderr, "%s: installing copy of default colormap\n", progname);
@@ -368,8 +466,6 @@ copy_default_colormap_contents (Screen *screen,
 
 #ifdef HAVE_READ_DISPLAY_EXTENSION
 
-static void make_cubic_colormap (Screen *, Window, Visual *);
-
 static Bool
 read_display (Screen *screen, Window window, Pixmap into_pixmap,
              Bool dont_wait)
@@ -430,7 +526,7 @@ read_display (Screen *screen, Window window, Pixmap into_pixmap,
      If the visual is of depth 24, but the image came back as depth 32,
      hack it to be 24 lest we get a BadMatch from XPutImage.  (I presume
      I'm expected to look at the server's pixmap formats or some such
-     nonsense... but fuck it.
+     nonsense... but fuck it.)
    */
   if (xgwa.depth == 24 && image->depth == 32)
     image->depth = 24;
@@ -532,7 +628,14 @@ read_display (Screen *screen, Window window, Pixmap into_pixmap,
 
   return True;
 }
+#endif /* HAVE_READ_DISPLAY_EXTENSION */
+
+
+#if defined(HAVE_READ_DISPLAY_EXTENSION) || defined(HAVE_SGI_VIDEO)
 
+/* Makes and installs a colormap that makes a PseudoColor or DirectColor
+   visual behave like a TrueColor visual of the same depth.
+ */
 static void
 make_cubic_colormap (Screen *screen, Window window, Visual *visual)
 {
@@ -606,5 +709,4 @@ make_cubic_colormap (Screen *screen, Window window, Visual *visual)
   XInstallColormap (dpy, cmap);
 }
 
-
-#endif /* HAVE_READ_DISPLAY_EXTENSION */
+#endif /* HAVE_READ_DISPLAY_EXTENSION || HAVE_SGI_VIDEO */
index 20a5ce408d6928d71a34805b783b729fdb6089e1..9c70eab82fe922c3ecedf9c1a244539bb20cdb86 100644 (file)
@@ -19,4 +19,9 @@
  */
 extern void grab_screen_image (Screen *, Window);
 
+/* Whether one should use GCSubwindowMode when drawing on this window
+   (assuming a screen image has been grabbed onto it.)  Yes, this is a
+   total kludge. */
+extern Bool use_subwindow_mode_p(Screen *screen, Window window);
+
 #endif /* __GRABSCREEN_H__ */
diff --git a/utils/sgivideo.c b/utils/sgivideo.c
new file mode 100644 (file)
index 0000000..fa2dcdf
--- /dev/null
@@ -0,0 +1,459 @@
+/* xscreensaver, Copyright (c) 1997 Jamie Zawinski <jwz@netscape.com>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation.  No representations are made about the suitability of this
+ * software for any purpose.  It is provided "as is" without express or 
+ * implied warranty.
+ */
+
+/* This file contains code for grabbing a frame from one of the video inputs
+   on an SGI.  It returns it on a Drawable where it can be hacked at will.
+   This code checks all available video devices for the first one with a
+   non-blank signal.
+
+   It checks the deviced whose number comes from the `videoDevice' resource
+   first, then the default video device, then all the devices in order.
+
+   The intensity of the video signal is increased by the value of the
+   `videoGain' resource (a float) defaulting to 2.2, since NTSC video tends
+   to appear kind of dim on computer screens.
+
+   The video image is expanded to fit the window (while preserving the aspect
+   ratio.)  This is done by simply replicating pixels, not dithering.  That
+   turns out to look good enough most of the time.
+
+   If the target window is not TrueColor, the grabbed image will be quantized
+   to fit.  This also is done without dithering, but in this case, dithering
+   would help a lot, because it looks like crap.  So use TrueColor if you care.
+ */
+
+#include "utils.h"
+#include "sgivideo.h"
+#include "resources.h"
+
+#ifdef HAVE_SGI_VIDEO  /* whole file */
+
+#include "usleep.h"
+
+#include <X11/Xutil.h>
+
+#ifdef DEBUG
+extern char *progname;
+#endif /* DEBUG */
+
+
+# include <dmedia/vl.h>
+
+static Bool dark_image_p(unsigned long *image, int width, int height);
+static Bool install_video_frame(unsigned long *image, int width, int height,
+                               Screen *screen, Visual *visual, Drawable dest);
+
+static Bool
+grab_frame_1(Screen *screen, Visual *visual, Drawable dest, int camera)
+{
+  Bool status = False;
+  int width = 0;
+  int height = 0;
+  VLServer server = 0;
+  VLNode input = -1;
+  VLNode output = -1;
+  VLPath path = 0;
+  VLBuffer buffer = 0;
+  VLControlValue ctl;
+  VLInfoPtr info;
+  VLTransferDescriptor trans;
+  unsigned long *image = 0;
+
+  server = vlOpenVideo (NULL);
+  if (!server)
+    {
+#ifdef DEBUG
+      fprintf (stderr, "%s: unable to open video server\n", progname);
+#endif /* DEBUG */
+      goto DONE;
+    }
+
+  input  = vlGetNode (server, VL_SRC, VL_VIDEO, camera);
+  output = vlGetNode (server, VL_DRN, VL_MEM, VL_ANY);
+
+  if (input == -1 || output == -1)
+    {
+#ifdef DEBUG
+      fprintf (stderr, "%s: unable to get video I/O nodes: %d\n",
+              progname, vlErrno);
+#endif /* DEBUG */
+      goto DONE;
+    }
+
+  path = vlCreatePath (server, VL_ANY, input, output);
+  if (path == -1)
+    {
+#ifdef DEBUG
+      fprintf (stderr, "%s: unable to get video path: %d\n",
+              progname, vlErrno);
+#endif /* DEBUG */
+      goto DONE;
+    }
+
+  if (vlSetupPaths (server, (VLPathList) &path, 1, VL_SHARE, VL_SHARE) == -1)
+    {
+#ifdef DEBUG
+      fprintf (stderr, "%s: unable to set up video path: %d\n",
+              progname, vlErrno);
+#endif /* DEBUG */
+      goto DONE;
+    }
+
+  ctl.intVal = VL_CAPTURE_INTERLEAVED;
+  if (vlSetControl (server, path, output, VL_CAP_TYPE, &ctl) == -1)
+    {
+#ifdef DEBUG
+      fprintf (stderr,
+              "%s: unable to set video capture type to interleaved: %d\n",
+              progname, vlErrno);
+#endif /* DEBUG */
+      goto DONE;
+    }
+
+  ctl.intVal = VL_PACKING_RGBA_8;
+  if (vlSetControl (server, path, output, VL_PACKING, &ctl) == -1)
+    {
+#ifdef DEBUG
+      fprintf (stderr, "%s: unable to set video packing to RGB8: %d\n",
+              progname, vlErrno);
+#endif /* DEBUG */
+      goto DONE;
+    }
+
+  buffer = vlCreateBuffer (server, path, output, 3);
+  if (!buffer)
+    {
+#ifdef DEBUG
+      fprintf (stderr, "%s: unable to create video buffer: %d\n",
+              progname, vlErrno);
+#endif /* DEBUG */
+      goto DONE;
+    }
+
+  vlRegisterBuffer (server, path, output, buffer);
+
+  memset(&trans, 0, sizeof(trans));
+  trans.trigger = VLTriggerImmediate;
+  trans.mode = VL_TRANSFER_MODE_DISCRETE;
+  trans.delay = 0;
+  trans.count = 1;
+  if (vlBeginTransfer (server, path, 1, &trans) == -1)
+    {
+#ifdef DEBUG
+      fprintf (stderr, "%s: unable to begin video transfer: %d\n",
+              progname, vlErrno);
+#endif /* DEBUG */
+      goto DONE;
+    }
+    
+  
+  /* try to get a frame; don't try more than a zillion times.
+     I strongly suspect this isn't the best way to do this...
+   */
+  {
+    int i;
+    for (i = 0; i < 1000; i++)
+      {
+       info = vlGetLatestValid (server, buffer);
+       if (info) break;
+       usleep(10000);  /* 1/100th second (a bit more than half a field) */
+      }
+  }
+
+  if (!info)
+    {
+#ifdef DEBUG
+      fprintf (stderr, "%s: unable to get video info: %d\n",
+              progname, vlErrno);
+#endif /* DEBUG */
+      goto DONE;
+    }
+
+  image = vlGetActiveRegion (server, buffer, info);
+  if (!image)
+    {
+#ifdef DEBUG
+      fprintf (stderr, "%s: unable to grab video frame: %d\n",
+              progname, vlErrno);
+#endif /* DEBUG */
+      goto DONE;
+    }
+
+  if (vlGetControl (server, path, input, VL_SIZE, &ctl) != -1)
+    {
+      width  = ctl.xyVal.x;
+      height = ctl.xyVal.y;
+    }
+  else
+    {
+#ifdef DEBUG
+      fprintf (stderr, "%s: unable to get video image size: %d\n",
+              progname, vlErrno);
+#endif /* DEBUG */
+      goto DONE;
+    }
+
+  if (dark_image_p(image, width, height))
+    goto DONE;
+
+  status = install_video_frame(image, width, height, screen, visual, dest);
+
+ DONE:
+
+  /* I think `image' is freed as a result of destroying buffer. */
+
+  if (buffer)
+    vlDestroyBuffer(server, buffer);
+  if (path)
+    vlDestroyPath(server, path);
+  if (server)
+    vlCloseVideo (server);
+
+  return status;
+}
+
+
+static Bool
+dark_image_p(unsigned long *image, int width, int height)
+{
+  double max = 0.02;
+  double total = 0.0;
+  int i;
+  int pixels = (width * height);
+#ifdef DEBUG
+  int mr = 0, mg = 0, mb = 0;
+#endif /* DEBUG */
+  for (i = pixels-1; i >= 0; i--)
+    {
+      unsigned long pixel = image[i];
+      unsigned int r = (pixel & 0x0000FF);
+      unsigned int g = (pixel & 0x00FF00) >> 8;
+      unsigned int b = (pixel & 0xFF0000) >> 16;
+#ifdef DEBUG
+      if (r > mr) mr = r;
+      if (g > mg) mg = g;
+      if (b > mb) mb = b;
+#endif /* DEBUG */
+      total += ((r * (0.3086 / 0xFF)) +       /* gamma 1.0 intensity values */
+               (g * (0.6094 / 0xFF)) +
+               (b * (0.0820 / 0xFF)));
+    }
+  total /= pixels;
+#ifdef DEBUG
+  fprintf(stderr, "%s: %sdark %f (max rgb: %d %d %d)\n", progname,
+         (total < max ? "" : "not "),
+         total, mr, mg, mb);
+#endif /* DEBUG */
+  return (total < max);
+}
+
+
+Bool
+grab_video_frame(Screen *screen, Visual *visual, Drawable dest)
+{
+  char *def_camera = get_string_resource("videoDevice", "Integer");
+  if (def_camera && *def_camera)
+    {
+      int cam;
+      char c;
+      int ok = (1 == sscanf(def_camera, " %d %c", &cam, &c));
+      free (def_camera);
+      if (ok && grab_frame_1(screen, visual, dest, cam))
+       return True;
+    }
+
+  if (grab_frame_1(screen, visual, dest, VL_ANY))
+    return True;
+  else
+    {
+      int i;
+      for (i = 0; i < 5; i++)  /* if we get all black images, retry up to
+                                  five times. */
+       {
+         VLServer server = vlOpenVideo (NULL);
+         VLDevList dl;
+         int j;
+         vlGetDeviceList(server, &dl);
+         vlCloseVideo (server);
+         for (j = 0; j < dl.numDevices; j++)
+           {
+             VLDevice *d = &dl.devices[j];
+             int k;
+             for (k = 0; k < d->numNodes; k++)
+               if (d->nodes[k].type == VL_SRC &&
+                   d->nodes[k].kind == VL_VIDEO)
+                 if (grab_frame_1(screen, visual, dest, d->nodes[k].number))
+                   return True;
+           }
+         /* nothing yet?  go around and try again... */
+       }
+    }
+#ifdef DEBUG
+  fprintf (stderr, "%s: images on all video feeds are too dark.\n",
+          progname);
+#endif /* DEBUG */
+  return False;
+}
+
+
+static Bool
+install_video_frame(unsigned long *image, int width, int height,
+                   Screen *screen, Visual *visual, Drawable dest)
+{
+  Display *dpy = DisplayOfScreen(screen);
+  int x, y;
+  unsigned int w, h, b, d;
+  Window root;
+  XGCValues gcv;
+  GC gc;
+  XImage *ximage = 0;
+  Bool free_data = False;
+  int vblank_kludge = 3;       /* lose the closed-captioning blips... */
+
+  double gain;
+  char c, *G = get_string_resource("videoGain", "Float");
+  if (!G || (1 != sscanf (G, " %lf %c", &gain, &c)))
+    /* default to the usual NTSC gamma value.  Is this the right thing to do?
+       (Yeah, "gain" isn't quite "gamma", but it's close enough...) */
+    gain = 2.2;
+  if (G) free (G);
+
+  XGetGeometry(dpy, dest, &root, &x, &y, &w, &h, &b, &d);
+  
+  gcv.function = GXcopy;
+  gcv.foreground = BlackPixelOfScreen(screen);
+  gc = XCreateGC (dpy, dest, GCFunction|GCForeground, &gcv);
+
+  ximage = XCreateImage (dpy, visual, 32, ZPixmap, 0, (char *) image,
+                        width, height, 8, 0);
+  XInitImage(ximage);
+  if (!ximage)
+    return False;
+
+  if (ximage->depth == 32 && d == 24)
+    ximage->depth = d;
+
+
+  if (gain > 0.0)      /* Pump up the volume */
+    {
+      unsigned char *end = (unsigned char *) (image + (width * height));
+      unsigned char *s = (unsigned char *) image;
+      while (s < end)
+       {
+         unsigned int r = s[1] * gain;
+         unsigned int g = s[2] * gain;
+         unsigned int b = s[3] * gain;
+         s[1] = (r > 255 ? 255 : r);
+         s[2] = (g > 255 ? 255 : g);
+         s[3] = (b > 255 ? 255 : b);
+         s += 4;
+       }
+    }
+
+  /* If the drawable is not of truecolor depth, we need to convert the
+     grabbed bits to match the depth by clipping off the less significant
+     bit-planes of each color component.
+  */
+  if (d != 24 && d != 32)
+    {
+      int x, y;
+      /* We use the same ximage->data in both images -- that's ok, because
+        since we're reading from B and writing to A, and B uses more bytes
+        per pixel than A, the write pointer won't overrun the read pointer.
+      */
+      XImage *ximage2 = XCreateImage (dpy, visual, d, ZPixmap, 0,
+                                     (char *) image,
+                                     width, height, 8, 0);
+      XInitImage(ximage2);
+      if (!ximage2)
+       {
+         XDestroyImage(ximage);
+         return False;
+       }
+
+#ifdef DEBUG
+      fprintf(stderr, "%s: converting from depth %d to depth %d\n",
+             progname, ximage->depth, ximage2->depth);
+#endif /* DEBUG */
+
+      for (y = 0; y < ximage->height; y++)
+       for (x = 0; x < ximage->width; x++)
+         {
+           unsigned long pixel = XGetPixel(ximage, x, y);
+           unsigned int r = (pixel & 0x0000FF);
+           unsigned int g = (pixel & 0x00FF00) >> 8;
+           unsigned int b = (pixel & 0xFF0000) >> 16;
+
+           if (d == 8)
+             pixel = ((r >> 5) | ((g >> 5) << 3) | ((b >> 6) << 6));
+           else if (d == 12)
+             pixel = ((r >> 4) | ((g >> 4) << 4) | ((b >> 4) << 8));
+           else if (d == 16)
+             pixel = ((r >> 3) | ((g >> 3) << 5) | ((b >> 3) << 10));
+           else
+             abort();
+
+           XPutPixel(ximage2, x, y, pixel);
+         }
+      ximage->data = 0;
+      XDestroyImage(ximage);
+      ximage = ximage2;
+    }
+
+  if (width < w && height < h)      /* Stretch the image to fit the window. */
+    {
+      double dw = (((double) w) / ((double) width));
+      double dh = (((double) h) / ((double) height));
+      double d = (dw > dh ? dh : dw);
+      int width2  = d * width;
+      int height2 = d * height;
+      int x, y;
+      XImage *ximage2 = XCreateImage (dpy, visual, ximage->depth, ZPixmap,
+                                     0, NULL,
+                                     width2, height2, 8, 0);
+      if (!ximage2->data)
+       ximage2->data = (char *) malloc(width2 * height2 * 4);
+      free_data = True;
+      XInitImage(ximage2);
+#ifdef DEBUG
+      fprintf(stderr, "%s: stretching video image by %f (%d %d -> %d %d)\n",
+             progname, d, width, height, width2, height2);
+#endif /* DEBUG */
+      for (y = 0; y < height2; y++)
+       {
+         int y2 = (int) (y / d);
+         for (x = 0; x < width2; x++)
+           XPutPixel(ximage2, x, y, XGetPixel(ximage, (int) (x / d), y2));
+       }
+      ximage->data = 0;
+      XDestroyImage(ximage);
+      ximage = ximage2;
+      width = width2;
+      height = height2;
+      vblank_kludge *= d;
+    }
+
+  XFillRectangle(dpy, dest, gc, 0, 0, w, h);
+  XPutImage(dpy, dest, gc, ximage, 0, vblank_kludge,
+           (w - width) / 2,
+           (h - height) / 2,
+           width, height - vblank_kludge);
+  XSync(dpy, False);
+
+  if (free_data)
+    free(ximage->data);
+  ximage->data = 0;
+  XDestroyImage(ximage);
+  XFreeGC (dpy, gc);
+  return True;
+}
+
+#endif /* HAVE_SGI_VIDEO */
diff --git a/utils/sgivideo.h b/utils/sgivideo.h
new file mode 100644 (file)
index 0000000..065350f
--- /dev/null
@@ -0,0 +1,18 @@
+/* xscreensaver, Copyright (c) 1997 Jamie Zawinski <jwz@netscape.com>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation.  No representations are made about the suitability of this
+ * software for any purpose.  It is provided "as is" without express or 
+ * implied warranty.
+ */
+
+#ifndef __SGIVIDEO_H__
+# ifdef HAVE_SGI_VIDEO
+
+Bool grab_video_frame(Screen *screen, Visual *visual, Drawable dest);
+
+# endif /* HAVE_SGI_VIDEO */
+#endif /* __SGIVIDEO_H__ */
index bf753aca52ecc42008b780d2723280a6ce5bd417..cdd03fbe0d2ba4f93d3ad762a6f5e019a866d8db 100644 (file)
@@ -1,2 +1,2 @@
 static const char screensaver_id[] =
-       "@(#)xscreensaver 2.10, by Jamie Zawinski (jwz@netscape.com)";
+       "@(#)xscreensaver 2.14, by Jamie Zawinski (jwz@netscape.com)";